Skip to content

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Update info on finalities #2514

wants to merge 5 commits into from

Conversation

gagdiez
Copy link
Collaborator

@gagdiez gagdiez commented Apr 8, 2025

We are missing one finality parameter (near-final) which provides more guaranties than optimistic while being a block faster than final

@gagdiez gagdiez requested a review from bucanero as a code owner April 8, 2025 12:16
@github-project-automation github-project-automation bot moved this to NEW❗ in DevRel Apr 8, 2025
@trechriron trechriron temporarily deployed to gagdiez-patch-1 - near-docs PR #2514 April 8, 2025 12:16 — with Render Destroyed
@gagdiez gagdiez requested a review from ilblackdragon April 8, 2025 12:16
@trechriron trechriron temporarily deployed to gagdiez-patch-1 - near-docs PR #2514 April 8, 2025 12:18 — with Render Destroyed
Comment on lines 87 to 89
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)_
Copy link
Collaborator

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)

@trechriron trechriron temporarily deployed to gagdiez-patch-1 - near-docs PR #2514 April 16, 2025 16:13 — with Render Destroyed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: NEW❗
Development

Successfully merging this pull request may close these issues.

[BUG] Missing near-final finality option in RPC documentation
4 participants