-
Notifications
You must be signed in to change notification settings - Fork 10
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
Blocks log replay fix, enhance libtester to support customizing startup options, and add blocks log replay tests #133
Conversation
I don't see how this fixes the issue. For example:
Wait for:
|
Thanks for running the branch. The new tests (replaying from genesis and in Savanna mode) works. It seems some additional fixes are required for replaying from snapshot or in Legacy mode? |
Do I miss something? I ctrl-c during the replay of blocks log:
I then restarted the nodeos. It replayed successfully:
|
|
Note:start |
…o actually restart instead of replaying again. Add additional test case that test multiple replays.
… existing state startup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@heifner Thanks for finishing the PR! It looks good. You can approve it.
@@ -199,9 +199,9 @@ namespace eosio::testing { | |||
open(snapshot); | |||
} | |||
|
|||
void base_tester::init(controller::config config, const genesis_state& genesis) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may prefer an enum class do_statrtup_t { no, yes }
instead of the bool here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll make the changes to use enum class do_statrtup_t { no, yes }
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done by d08e3ae
It seemed somewhat cleaner to have all the state we need in |
The block state is variable length, so would require loading the fork database and then writing it back out on an interrupted replay. If we did move it, seems we would want to consider moving |
This doesn't seem so bad to me.
Well, you can see it that way. Or you could rename it I think it is somewhat worse for users to add a new file, and I don't think we would have a convincing explanation as to why it is needed. |
…ment value in init() and open() to have clearer intention of parameters
chain_head
now saved tochain_head.dat
in state directory. This allows replay to be interrupted and restarted without impacting fork database.Note to devs: Restart from snapshot required for any existing running node.
Resolves #7