Giter Club home page Giter Club logo

photon's People

Contributors

calvindc avatar chuck52 avatar dognie avatar huamou avatar liamgettingbetter avatar senhuawang avatar senhuawang123 avatar smartmeshfoundation avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

photon's Issues

Request for `websocket` Feature for HTTP

Right now, the SmartRaiden Project does not support features like websocket in HTTP. Websocket is a transport layer protocol that provides two-way communication between a client-side which runs untrusted code in a controlled environment and a remote server that has an opted-in communication.

The main purpose for websocket in our project is to

  • After receiving withdraw from channel counterpart, we need main-chain to provide info like withdraw amount.
  • Once transferred invoices of token have been obtained, we should proactively feed this invoice to main-chain.
  • We can send a notification to main-chain after ChannelClosed event occurs.
  • Feed connection status of public chain.
  • Other info that need to proactively feed.

punish does't work

When analyze the unlock event from the chain,miss the LockHash field, which cause punish fail when needed

Crash Case EventSendAnnouncedDisposedBefore

Feature

EventSendAnnouncedDisposedBefore

Scenario

Route:Alice->Bob->Charle->Dave
Alice tx to Dave 60token, Charle Crash without sending AnnouncedDisposed

  • Reconnect before Expiration

  • Reconnect after Expiration

the alarm task should start after history events process completely

It is guaranteed that the alarm task's new block event will be received after the history events has been processed.
The current crash recovery processing requires that the latest block not be received before the historical event is processed. Failure to do so may result in a status error.

Crash Case EventSendRevealSecretBefore

Feature

EventSendRevealSecretBefore

Scenario

Route:Alice->Bob->Charle->Dave
Alice tx to Dave 20token, Charle Crash without sending RevealSecret

  • Reconnect before Expiration

  • Reconnect after Expiration

Crash Case EventSendAnnouncedDisposedResponseBefore

Feature

EventSendAnnouncedDisposedResponseBefore

Scenario

Route:Alice->Bob->Charle->Dave
Alice tx to Dave 60token, Bob Crash without sending AnnouncedDisposedResponse

  • Reconnect before Expiration
  • Reconnect after Expiration

Crash Case EventSendSecretRequestBefore

Feature

EventSendSecretRequestBefore

Scenario

Route:Alice->Bob->Charle->Dave
Alice tx to Dave 20token,Dave Crash without sending SecretRequest

  • Reconnect before Expiration

  • Reconnect after Expiration

Crash Case EventSendAnnouncedDisposedAfter

Feature

EventSendAnnouncedDisposedBefore

Scenario

Route:Alice->Bob->Charle->Dave
Alice tx to Dave 20token, Charle Crash occurs after sending AnnouncedDisposed

  • Reconnect before Expiration

  • Reconnect after Expiration

Issue about SmartRaiden contract

Issue Description

Some updates about our SmartRaiden contract design.

  • recoverAddressFromBalanceProofDelegate should rename contracts and delete additional_hash and partner_signature which are not in demand.
  • withdraw only can be used by one participant, not both.

Issue about compatibility of local storage

Currently, we are using storm as a key-value storage for our local data. Maybe in the future we have a demand to upgrade our database, then we need to reconsider our database design to support these future-needed feature.

Issue about third-party delegation service

As a reference from Raiden document, there are possibilities that user node accidentally disconnect from payment network. What if that happens in SmartRaiden, is there anything to help users to complete transfer process like third-party delegation or just cancel this transfer ? Do we support feature in release version 0.8 like that ?

Issue about some operation about hop node

We should have countermeasures when channel initiator or mediator have received SettleRequest and WithdrawRequest. Such as wen channel initiator received SettleRequest or withdrawRequest at that time he should make a response to his channel partner, and wait for related event occurs on-chain (just like receiving AnnounceDisposed message).

  • At the time that B sending MediatedTransfer to C receives WithdrawRequest/SettleRequest, he should not submit withdraw/settle request on behalf of C, because there is risk that participant A and C collude with each other and let B to be a scapegoat, which is unreasonable.

  • StateManager is in charge of handling with Withdraw and CooperativeSettle on-chain, if a channel route is impassable, it should alter to another secure route.

  • Settle on chain has no need to be dealt with, for the reason that if channel partner chooses to close the channel once he received MediatedTransfer, and wait for channel settle, then the hash lock in this channel gets expired 100%, and to make this transfer failed and this lock gets removed.

Issue about old balance proof update fraud

Issue Definition

In the settle period, when channel participants have finished their transaction and prepares to update their finalized BalanceProof on-chain, in order to claim their deserved token. However, what if one of them submits proof that are not the latest version, how should we deal with that ?

Crash Case EventSendSecretRequestAfter

Feature

EventSendSecretRequestAfter

Scenario

Route:Alice->Bob->Charle->Dave
Alice tx to Dave 20token,Dave Crash occurs after sending SecretRequest

  • Reconnect before Expiration

  • Reconnect after Expiration

Issue about risks for forking attack.

Due to the potential risk of hard-fork, there is a strong need for us to better design our codebase, like Deposit, we may consider some amount of confirmation blocks, as 12 blocks. After that amount, the transfer can take effect. The same condition should be applied to Openchannel and so on.

On the other hand, like CloseChannel or Settle, these state transitions should take effect as soon as they have been invoked.

Potential risks of crash exist among all these state transitions, we should also consider crash recovery of them.

Issue about compatibility of SmartRaiden Message

Issue Definition

Message Version of SmartRaiden have to be forward and backward compatible.

Specification

  • We are going to design the message as a forward and backward compatible, so that any node can send out and receive messages of older or newer version.
  • In order to achieve this feature, what we have to do are
    • We can't reduce fields in the data structure of message, which means that updated version message just has additional fields but not less.
    • Even some fields are no longer used in future version, we still need to assign proper value for them when newer message structure is adopted.
  • Support a new handshake mechanism, comprising of messages with features like when talking to other node, he can decide to send messages compatible to that node.

Issue about fee-charging feature

Does anybody know that our SmartRaiden service add feature like charging fee? According to Raiden 101, when users try to use feature like MediateTransfer, it seems like they need to pay fees to those mediate router.

How about our SmartRaiden? Do we also need to take a charge while furthering transfers ?

Issue about transfer timeout

If users intentionally do nothing and wait for transfer timeout, how to deal with this situation in SmartRaiden? Do we need to remove StateManager ?

remove failed target state manager

As the transfer target, if the initiator does not respond to the SecretRequest, the corresponding StateManager should be expired and then removed

Issue about transfers halting while channel nodes are upgrading.

In our TokenNetwork, while node alive in the channel has to upgrade its local software, we need to design a feature of failsafe for them.

  • we can check /api/1/prepare-update API, if node is able to upgrade, return OK, else throw error message.
  • If there are transfers in channel and node is unable to process upgrade, then client-side has three chances to try, 20 secs as interval.
  • Whether transfers are processing in that channel, upgrading node has to kill them and override them.

Issue about design of mediated node

I think there are still some uncertainties in my mind about design of mediated node, I need someone help me figure that out.

  • If one mediated node receives a RevealSecret from next-to-nearest node, does he need to check channels status connecting him and the node right ahead? What if this channel is closed, how to deal with that ?

  • If one node has received a Unlock from his 'right-ahead' node, does he immediately refer this message to next one?

Intranet penetration strategy

Problem Definition

I found that the python version has been constantly polling to ping channel endpoint for NAT traversing, while the go version has been optimized in this regard.
What is the reason for optimization?
What are the disadvantages of python version?

Scence

raiden

Issue about handling crash cases

Issue Description

When transfer is cancelled, the state transition has to be handled, in case that tokens in channels can be properly processed.

Viable Solution

  • We can add a crash state manager to fix these stuff.

hi,there is a problem when go install..

SmartRaiden a212$ go install
raidenService.go:27:2: cannot find package "github.com/SmartMeshFoundation/SmartRaiden/blockchain" in any of:
/usr/local/Cellar/go/1.10.2/libexec/src/github.com/SmartMeshFoundation/SmartRaiden/blockchain (from $GOROOT)
/Users/a212/go/src/github.com/SmartMeshFoundation/SmartRaiden/blockchain (from $GOPATH)
connectionmanager.go:13:2: cannot find package "github.com/SmartMeshFoundation/SmartRaiden/channel" in any of:

how can i start it?

Crash Case EventSendMediatedTransferBefore

Feature

EventSendMediatedTransferBefore

Scenario

Route:Alice->Bob->Charle->Dave
Alice tx to Dave 20token, Charle Crash without sending Mtr

  • Reconnect before Expiration
    EventSendMediatedTransferBefore

  • Reconnect after Expiration
    EventSendMediatedTransferBefore

No net switch down, expired locks will not be processed

Scenario:

When I switch to the nonetwork state, I should refuse to accept mediated transfer, only accept direct transfer.(It only exists in an expired MTR scenario.)

  • Now Bob has switched to the state of no net./api/1/switch/true
  • Alice send Bob to mediated transfer
  • Bob refused to accept, giving log “MessageHandler.onMessage deny any mediated transfer when there is no internet connection” all of which are logical.
  • Strangely enough, Alice sends a MTR to Bob all the time. When Bob switches back to the netted state,/api/1/switch/false it receives MTR without any processing, and Alice does not make any processing, even if the lock has expired. At this point, Alice and Bob have different channel states, and the channel is invalid, which does not conform to the design principle.

Nonetwork DirectTransfer

Sending DirectTransfer is unsuccessful without registering the other node, but the sender channel state has changed.

Is this reasonable?

Crash Case EventSendAnnouncedDisposedResponseAfter

Feature

EventSendAnnouncedDisposedResponseAfter

Scenario

Route:Alice->Bob->Charle->Dave
Alice tx to Dave 60token, Bob Crash occurs after sending AnnounceDisposedResponse

  • Reconnect before Expiration

  • Reconnect after Expiration

Crash Case EventSendMediatedTransferAfter

Feature

EventSendMediatedTransferAfter

Scenario

Route:Alice->Bob->Charle->Dave
Alice tx to Dave 20token, Charle send MediatedTransfer before crash

  • Reconnect before Expiration
    EventSendMediatedTransferAfter_BR

  • Reconnect after Expiration
    EventSendMediatedTransferAfter_AR

Crash Case EventSendRevealSecretAfter

Feature

EventSendRevealSecretAfter

Scenario

Route:Alice->Bob->Charle->Dave
Alice tx to Dave 20token, Charle Crash occurs after sending RevealSecret

  • Reconnect before Expiration

  • Reconnect after Expiration

Issue about states in payment channels

How about channel states in our database ? Previously we assume that when invoking UpdateChannelState, the entire channel information will be updated. Can we try our best to minimize the data updated? Could we just update State section of Channel rather than the whole part ?

Issue about local storage update

Hey guys, currently we make a use of storm as our local database for payment channel network. And till now it operates safe and sound. However, in future maybe there are another info structure added in our database. Is there any support for this addition?

Issue about nounce discontinuance situation

Assume that, Alice sends to Bob a transfer but Bob somehow gets offline from the network. After Bob goes online again, Alice does not resend same message to Bob, which leads to a situation that nounce value in transfer differs. How to deal with this situation?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.