-
Notifications
You must be signed in to change notification settings - Fork 7
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
Thv/fix rollback issue #147
Commits on May 10, 2024
-
Remove WARN log from function testing block's PoW validity
This logging disturbs the test-output. And the caller's to this function already log correctly if appropriate.
Configuration menu - View commit details
-
Copy full SHA for c5ce76b - Browse repository at this point
Copy the full SHA c5ce76bView commit details -
feat(archival_state): Add method to get parent block of tip
We want to use this functionality when we set a new tip header since we are going to new the previous block's mutator set.
Configuration menu - View commit details
-
Copy full SHA for 99abbdc - Browse repository at this point
Copy the full SHA 99abbdcView commit details -
archival-state: Always set stored block as tip
Always set the new block we are storing to disk and indexing in the database as the tip. Previously, we would check if this block exceeded the proof of work family number of the current tip but this responsibility is now delegated to the caller. This is needed to fix a bug in `store_block_internal_worker` where the value `previous_ms_accumulator` is set incorrectly whenever there is a fork, i.e. whenever `store_block_internal_worker` receives a block that is not the child of what the block currently considers the tip. In order to set `previous_ms_accumulator`, we need to know that the block we are storing now is considered the tip (by the `ArchivalState`) *and* we need a method to fetch the parent of the tip after this function `write_block_as_tip` has been called. Cf. #143.
Configuration menu - View commit details
-
Copy full SHA for 09b7f19 - Browse repository at this point
Copy the full SHA 09b7f19View commit details -
Configuration menu - View commit details
-
Copy full SHA for 348748b - Browse repository at this point
Copy the full SHA 348748bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4e0e75d - Browse repository at this point
Copy the full SHA 4e0e75dView commit details -
Configuration menu - View commit details
-
Copy full SHA for d8d9298 - Browse repository at this point
Copy the full SHA d8d9298View commit details -
Always consider newly added block as tip
When the global state is updated with a new block, that new block is always considered the new tip. This change is reflected in a new name for this function also. This allows us to correctly handle state updates in the case of forks. Since the block is no longer carrying around the previous state of the mutator set accumulator, we have to get that state from somewhere else. We elect to get it from the archival state which can identify the parent of the current tip. Cf. #143
Configuration menu - View commit details
-
Copy full SHA for 45c73b5 - Browse repository at this point
Copy the full SHA 45c73b5View commit details -
refactor(test): Update state through
GlobalState
's `set_new_tip_int……ernal` Previously tests had their own helper functions for updating the global state. With this commit, most tests now go through the same state updater function as the main code. This shortens multiple tests and make us more likely to catch errors, like the one in #143.
Configuration menu - View commit details
-
Copy full SHA for c64b790 - Browse repository at this point
Copy the full SHA c64b790View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8ef7eb5 - Browse repository at this point
Copy the full SHA 8ef7eb5View commit details -
Fix tests after redefining behavior of
set_new_tip
After redefining the behavior of the `set_new_tip` to update global state with a new block, the function formerly known as `store_block`, we need to rearrange the order in which blocks are added in a few tests. With these changes, all tests pass, and #143 is closed.
Configuration menu - View commit details
-
Copy full SHA for b2928eb - Browse repository at this point
Copy the full SHA b2928ebView commit details -
fix(test): Fix flaky timelock test
The timelock test was flaky since it often overflowed on the addition of two `BfieldElement`'s. This closes #148.
Configuration menu - View commit details
-
Copy full SHA for 0a540f8 - Browse repository at this point
Copy the full SHA 0a540f8View commit details -
docs(tip-updater): Elaborate on comments in method to update tip
Also changes the fn name of the internal worker to match that of the outer methods.
Configuration menu - View commit details
-
Copy full SHA for 65b283c - Browse repository at this point
Copy the full SHA 65b283cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0b212d1 - Browse repository at this point
Copy the full SHA 0b212d1View commit details