-
Notifications
You must be signed in to change notification settings - Fork 386
Update info on finalities #2514
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
base: master
Are you sure you want to change the base?
Conversation
docs/api/rpc/setup.md
Outdated
1. `optimistic` the transaction is in a block that might be skipped _(< 1 second delay after the transaction is submitted)_ | ||
2. `near-final` the transaction is in a block that is irreversible, unless at least one block producer is slashed _(1 block / approx. 1 second delay)_ | ||
3. `final` the block is final and irreversible _(usually takes 2 blocks / approx. 2 second delay)_ |
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.
optimistic
still requires a block to be produced and broadcasted, so in the worst case if transaction landed right after the previous block was produced it will take 1 block to wait until the next block will start forming, then 1 block to get included+converted to receipt in the block (at this point, 2 "seconds" since submission, the transaction will be in an "optimistic" block), then 1 block to execute the receipt + N blocks for cross-account interaction (if needed), and so if someone is looking for "optimistic transaction execution result", they will see it in the block T+3, where T is the optimistic block height at the moment of transaction submission, the block with the transaction result will become "near-final" at T+4 timestamp, and the block will become "final" at T+5 timestamp.
Also, with nearcore 2.6.0 (released yesterday to testnet), the block production time was reduced to 0.6s, so the seconds reference might need to be adjusted accordingly (T+3 will become 1.8s instead of 3s)
We are missing one finality parameter (
near-final
) which provides more guaranties thanoptimistic
while being a block faster thanfinal