Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start node from live snapshot (iotaledger#2618)
* Snapshot creation and loading * Bind /slot/:index to dashboard explorer routes * Do not set chainID in the settings to latest commitment of settings. This lead to an issue where a newly joining always sets its chain ID based on whatever it reads from an obtained snapshot * Clean up prints * Remove debug prints * More debug prints for node startup with existing DB * Forking point of initialized chain should always be Genesis * works * still works.. * Amend join_network.sh * Make chainManager commits evictable * WIP: start with ChainManager's rootCommitment * Git to ignore docker network dynamic snapshot * Evaluate against chain rootCommitment * Fix unit tests * Fixes and some unit tests * rootCommit needs to be on a valid chain * Comment fix * Simplify methods * Add unit tests for processing root commitment * WIP * Set rootCommitment on eviction * WIP * Extend test with eviction and add check for root commitment when retrieving commitment * Introduce CommitmentBelowRoot event and fix unit tests * More detailed prints * Set root commitment only after engine is initialized (and thus snapshot loaded) and more detailed prints * Set main Engine chain to snapshot commitment * Store commitments along rootblocks to set chainID from snapshot * DEBUG: remove prints * Enable WebAPISnapshot when deploying * Fix some unit tests * Fix chain forking test * Please doggo * Proper lock ChainManager's evictionMutex from exported methods * Remove TODO: we set chainID from snapshot even on forking * Do not double-lock on detecting forks * Address review comments * Added comments and root commitment check when setting * Test root blocks and chain ids * WIP test * Unit test for rootBlocks and chainID from snapshot * Address review --------- Co-authored-by: jonastheis <[email protected]>
- Loading branch information