Skip to content
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

[4.0 -> main] Restore read-mode=speculative #992

Merged
merged 5 commits into from
Apr 10, 2023

Conversation

heifner
Copy link
Member

@heifner heifner commented Apr 8, 2023

Restore deprecated read-mode=speculative that was removed in #414. read-mode=head remains the default.

Although, read-mode=speculative can cause confusion to users, this PR restores the option as an alternative non-default read-mode. This does not restore persisted trxs. Persisted trxs were API trxs re-applied for each block. This new restored speculative mode therefore will not have the state of API trxs auto applied at the start of each speculative block. It is up to the user to re-apply any transactions at each speculative block in order to observe their side-effects.

Also the restored read-mode=speculative does not, unlike the old removed read-mode=speculative, apply schedule changes, protocol activations, or onblock trxs for a speculative mode into the speculative block which will be aborted when a new block is received from the network. This is in alignment with read-mode=head.

  --read-mode arg (=head)               Database read mode ("head",
                                        "irreversible", "speculative").
                                        In "head" mode: database contains state
                                        changes up to the head block;
                                        transactions received by the node are
                                        relayed if valid.
                                        In "irreversible" mode: database
                                        contains state changes up to the last
                                        irreversible block; transactions
                                        received via the P2P network are not
                                        relayed and transactions cannot be
                                        pushed via the chain API.
                                        In "speculative" mode: (DEPRECATED:
                                        head mode recommended) database
                                        contains state changes by transactions
                                        in the blockchain up to the head block
                                        as well as some transactions not yet
                                        included in the blockchain;
                                        transactions received by the node are
                                        relayed if valid.

Merges #986 into main

Resolves #980

@heifner heifner requested review from linh2931 and arhag April 8, 2023 13:11
@heifner heifner added the OCI Work exclusive to OCI team label Apr 8, 2023
@heifner heifner merged commit f08592d into main Apr 10, 2023
@heifner heifner deleted the GH-980-restore-read-mode-speculative-main branch April 10, 2023 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCI Work exclusive to OCI team
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Restore deprecated read-mode=speculative
3 participants