-
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
Store proposed producers and proposed finalizers in building block #188
Conversation
…lock instead of global_property_object. Fixes bug with non-shared types of finalizer_policy being stored in chainbase.
Validated this works, no crash. Version Log message
|
Reran the tests.
|
I will address this in a separate PR: #192 |
Note:start |
The chainbase
global_property_object
was used to storefinalizer_policy
during block construction as a means to provide automatic rollback if the transaction/block failed. See #99. However,finalizer_policy
contains non-shared types ofstd::vector
andfc::crypto::blslib::bls_public_key
.This PR solves the problem of avoiding side-effects of proposed finalizer policy made in an aborted transaction in a different way than committing the speculative changes into the
global_property_object
inchainbase
. Now we store the speculative changes in the transaction context. Then if we commit the transaction, it copies them over (assuming they are not nullopt) from the transaction context to the building block. This avoids having to add a shared version of thefinalizer_policy
andbls_public_key
.For symmetry, the proposer schedule in Savanna was modified to also be managed the same way as
finalier_policy
intransaction_context
.This PR removes
proposed_fin_pol_block_num
andproposed_fin_pol
fromglobal_property_object
and therefore is not state compatible with previous versions. The proposed scheduleproposed_schedule_block_num
&proposed_schedule
were not removed fromglobal_property_object
because they are still needed pre-Savanna.Resolves #182