smartmeshfoundation / photon Goto Github PK
View Code? Open in Web Editor NEWPhoton for mobile devices and other devices
Photon for mobile devices and other devices
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
withdraw
from channel counterpart, we need main-chain to provide info like withdraw amount.ChannelClosed
event occurs.When analyze the unlock event from the chain,miss the LockHash field, which cause punish fail when needed
If the smart raiden crashes unexpectedly during token swap, there is no guarantee that the token swap is atomic.
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.
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.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.
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 ?
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.
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 ?
Do we support any participant in the payment channel to proactively refuse a certain transfer by some means? And if SmartRaiden approves this feature, how to further this transfer ?
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.
Message Version of SmartRaiden have to be forward and backward compatible.
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 ?
If users intentionally do nothing and wait for transfer timeout, how to deal with this situation in SmartRaiden? Do we need to remove StateManager ?
As the transfer target, if the initiator does not respond to the SecretRequest, the corresponding StateManager should be expired and then removed
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.
kill
them and override them.Do our SmartRaiden contracts be in accordance with rules in Solidity 0.5 ? Like explicitly assigning memory
, storage
keyword to variables, or updates new abi.* functions ?
as EIP191, all the signature should start with "\x19Ethereum Signed Message:\n"
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?
When transfer is cancelled, the state transition has to be handled, in case that tokens in channels can be properly processed.
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?
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
.)
/api/1/switch/true
“MessageHandler.onMessage deny any mediated transfer when there is no internet connection”
all of which are logical./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.Sending DirectTransfer is unsuccessful without registering the other node, but the sender channel state has changed.
Is this reasonable?
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 ?
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?
Do we update our format for BalanceProof? Raiden team makes their BalanceProof updated.
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.