-
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
Support speculative trx execution in irreversible mode #1036
Conversation
…ibuted transaction test
… The distributed transaction test now always tests speculative, irreversible, and head.
…_block >= pending_block since blocks are not processed until they become irreversible
assert(root_bsp); | ||
root = root_bsp; | ||
root->set_valid(true); | ||
pending_savanna_lib_id = block_id_type{}; | ||
index.clear(); | ||
} | ||
|
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.
The reset of pending_savanna_lib_id
is needed as starting in irreversible mode can reset the forkdb root to head. If the node is started again then it would try and advance LIB and segfault because the fork db didn't have anything in the index which means forkdb.head()
returns nullptr. I attempted to reproduce this in 1.0.x, but couldn't find a way to trigger it. Not sure if we should backport it to 1.0.x or not.
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.
Maybe not backport for now as it is a rare case and 1.1.x is not far away.
…rxs in irreversible mode when not in savanna
…cing in controller
assert(root_bsp); | ||
root = root_bsp; | ||
root->set_valid(true); | ||
pending_savanna_lib_id = block_id_type{}; | ||
index.clear(); | ||
} | ||
|
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.
Maybe not backport for now as it is a rare case and 1.1.x is not far away.
Note:start |
With Savanna instant finality, there is now no longer a good reason to prevent speculative trx execution on irreversible nodes; so remove the restriction.
Changed the distributed transaction test to always run with speculative, head, and irreversible mode nodes.
Note to disable speculative trx execution on irreversible nodes (or any node), it now must be specified via
api-accept-transactions = false
andp2p-accept-transactions = false
.Modify syncing heuristic in
producer_plugin
to 5 minutes to match what is used in controller.Resolves #1030