-
Notifications
You must be signed in to change notification settings - Fork 629
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
jsonrpc: add finality to tx requests (
tx
, EXPERIMENTAL_tx_status
)…
…, add method `broadcast_tx` (#9644) Fixes #6837 I'll need to update the [docs](https://github.com/near/docs) and [jsonrpc_client](https://github.com/near/near-jsonrpc-client-rs) (and maybe something else, I haven't already checked) Important updates: 1. We have a new concept for all tx-related methods - `finality`. `finality` in the response is merged to master 2 weeks ago: #9556. `finality` field in the request means "I want at least this level of confidence". So, the stricter the level, the longer the user needs to wait. 2. I decided to use `Final` as a default `finality` value because it gives the strongest guarantee and does not change backward compatibility for any of the methods (though, the waiting time may be increased sometimes to achieve the strictest level of confidence). 3. Methods `tx`, `EXPERIMENTAL_tx_status` have `finality` as an additional optional field. 4. A new method appeared - `broadcast_tx`. It allows to send the tx, it also have the optional field `finality`. 6. `broadcast_tx_async` is equal to `broadcast_tx` with hardcoded `finality None`, I'll mark it as deprecated in the doc 7. `broadcast_tx_commit` is equal to `broadcast_tx` with hardcoded `finality Final`, I'll mark it as deprecated in the doc.
- Loading branch information
1 parent
c3e9b5f
commit fa1cfa1
Showing
14 changed files
with
350 additions
and
188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.