-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reducing the number of blocks that Raiden client needs to read on startup #705
Comments
I currently do not know how to achieve this. I guess the contract can provide a hash of the global state, and other offchain parties can provide the corresponding global state. Now how does this global state look like? @hackaugusto |
The token network does not save all data in storage but publish it with events, for a node to recover the network state it must fetch all events since the smart contract deployment block. This is a problem for two reasons:
I can think of two possible solutions for the above:
For the second approach, here are a few ideas:
I have the impression that any alternative to improve the second option will require additional storage, which is just silly and I would then prefer to remove the optimization and just have the data available. |
Here is a third approach. We can keep the storage optimizations, but remove the need for the node to poll for all the events since the smart contract was deployed. This can be achieved by making the channel open an operation that needs both parties (e.g with Edit: This would only help if the internal routing is removed from the python client, |
Currently, for figuring out the current state of a TokenNetwork, Raiden client reads all blocks since the contract's deployment. This issue keeps track of designing and implementing a way to reduce the number of blocks that Raiden clients need to read when they start up.
The text was updated successfully, but these errors were encountered: