-
Notifications
You must be signed in to change notification settings - Fork 645
State sync from local snapshot: Understand problem, explore solutions #28
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
Comments
So, some feedback on the state here:
We understand.
They definitely want. It is very painful not to, they are ready to solve the problem by them own.
My question here is another. Should we use old ADR 083, new ADR 103 (it will be renumbered, but anyway) to propose the new solution discussed on May 4th meeting? Or should we start a new ADR X with that solution? A possible solution would be:
|
What I mean here is to keep ADR 103 proposing a solution that is not a local sync, as it involves no snapshot. Make it clear on its wording. Point out some disadvantages of this solution. |
The way I see it (with the context I have):
|
So, we have to consider here another option that was implemented (is already merged) by the SDK. It consists of two parts: This PR creates a snapshot manager binary In the context of this issue, 3 commands are relevant:
These three commands, plus the snapshot manager CLI, enables transferring the application state between two nodes in a pretty safe way. The problem at this point is that the restored snapshot might produce an application state that is not compatible with the CometBFT state (putting it simple, the heights don't match). This second PR bootstraps CometBFT's state (namely, state store and block store) at a given height, relying on a light client. The light client configuration is set on the CometBFT's configuration file. The light client does its magic and, given a height of the blockchain, produces a The code added by this PR is identical to the code used by State Sync to bootstrap a node. In the case of State Sync, the light client is configured with the height of the candidate snapshot retrieved from the p2p network. Assuming that the snapshot is valid and can be fully downloaded and installed, CometBFT is bootstrap at the snapshot's height, and starts its operation (either via block sync, or directly via consensus) from the next height. Regarding the SDK solution, specifically, the This solution, putting in simple works, setups a state for all components (state store, block store, and application) that enables the famous |
dev: chg: solve vulns and set maxInboundPeer and maxOutBoundPeer to 100
cometbft#28) (cometbft#32) * perf(internal/bits): Significantly speedup bitArray.PickRandom (backport cometbft#2841) (cometbft#2887) This PR significantly speeds up bitArray.PickRandom which is used in VoteGossip and BlockPart gossip. We saw for a query serving full node, over an hour, this was a very large amount of RAM allocations. (75GB of RAM!)  This PR drops it down to 0 allocations, and makes the routine 10x faster on my machine. OLD: ``` BenchmarkPickRandomBitArray-12 1545199 846.1 ns/op 1280 B/op 1 allocs/op ``` NEW: ``` BenchmarkPickRandomBitArray-12 22192857 75.39 ns/op 0 B/op 0 allocs/op ``` I think the new tests I wrote make this more tested than the old code that was here tbh, but pls let me know if theres more tests we'd like to see! --- - [x] Tests written/updated - [x] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog) - [x] Updated relevant documentation (`docs/` or `spec/`) and code comments - [x] Title follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec <hr>This is an automatic backport of pull request cometbft#2841 done by [Mergify](https://mergify.com). --------- Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com> Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com> * fix failing test * changelog --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com> Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com> (cherry picked from commit f6abfce) Co-authored-by: Adam Tucker <adam@osmosis.team>
cometbft#28) * perf(internal/bits): Significantly speedup bitArray.PickRandom (backport cometbft#2841) (cometbft#2887) This PR significantly speeds up bitArray.PickRandom which is used in VoteGossip and BlockPart gossip. We saw for a query serving full node, over an hour, this was a very large amount of RAM allocations. (75GB of RAM!)  This PR drops it down to 0 allocations, and makes the routine 10x faster on my machine. OLD: ``` BenchmarkPickRandomBitArray-12 1545199 846.1 ns/op 1280 B/op 1 allocs/op ``` NEW: ``` BenchmarkPickRandomBitArray-12 22192857 75.39 ns/op 0 B/op 0 allocs/op ``` I think the new tests I wrote make this more tested than the old code that was here tbh, but pls let me know if theres more tests we'd like to see! --- - [x] Tests written/updated - [x] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog) - [x] Updated relevant documentation (`docs/` or `spec/`) and code comments - [x] Title follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec <hr>This is an automatic backport of pull request cometbft#2841 done by [Mergify](https://mergify.com). --------- Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com> Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com> * fix failing test * changelog --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com> Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
Uh oh!
There was an error while loading. Please reload this page.
Tasks:
DoD:
Original issue: tendermint/tendermint#9947
The text was updated successfully, but these errors were encountered: