Update commitment options (#12173)
This commit is contained in:
@ -111,11 +111,15 @@ Requests can be sent in batches by sending an array of JSON-RPC request objects
|
|||||||
Solana nodes choose which bank state to query based on a commitment requirement
|
Solana nodes choose which bank state to query based on a commitment requirement
|
||||||
set by the client. Clients may specify either:
|
set by the client. Clients may specify either:
|
||||||
|
|
||||||
- `"max"` - the node will query the most recent bank confirmed by the cluster as having reached maximum lockout.
|
- `"max"` - the node will query the most recent block confirmed by supermajority of the cluster as having reached
|
||||||
- `"root"` - the node will query the most recent bank having reached maximum lockout on this node.
|
maximum lockout.
|
||||||
- `"single"` - the node will query the most recent bank having reached 1 cluster confirmation.
|
- `"root"` - the node will query the most recent block having reached maximum lockout on this node.
|
||||||
- `"singleGossip"` - the node will query the most recent bank having reached 1 cluster confirmation via gossip votes; may occur before or after `single`, depending on gossip traffic.
|
- `"singleGossip"` - the node will query the most recent block that has been voted on by supermajority of the cluster.
|
||||||
- `"recent"` - the node will query its most recent bank.
|
- It incorporates votes from gossip and replay.
|
||||||
|
- It does not count votes on descendants of a block, only direct votes on that block.
|
||||||
|
- This confirmation level also upholds "optimistic confirmation" guarantees in
|
||||||
|
release 1.3 and onwards.
|
||||||
|
- `"recent"` - the node will query its most recent block.
|
||||||
|
|
||||||
The commitment parameter should be included as the last element in the `params` array:
|
The commitment parameter should be included as the last element in the `params` array:
|
||||||
|
|
||||||
|
@ -62,11 +62,15 @@ pub enum CommitmentLevel {
|
|||||||
/// The highest slot having reached max vote lockout.
|
/// The highest slot having reached max vote lockout.
|
||||||
Root,
|
Root,
|
||||||
|
|
||||||
/// The highest slot having reached 1 confirmation.
|
/// (DEPRECATED) The highest slot having reached 1 confirmation by supermajority of the cluster.
|
||||||
Single,
|
Single,
|
||||||
|
|
||||||
/// The highest slot having reached 1 confirmation via gossip votes; may occur before or after Single,
|
/// The highest slot that has been voted on by supermajority of the cluster
|
||||||
/// depending on gossip traffic.
|
/// This differs from `single` in that:
|
||||||
|
/// 1) It incorporates votes from gossip and replay.
|
||||||
|
/// 2) It does not count votes on descendants of a block, only direct votes on that block.
|
||||||
|
/// 3) This confirmation level also upholds "optimistic confirmation" guarantees in
|
||||||
|
/// release 1.3 and onwards.
|
||||||
SingleGossip,
|
SingleGossip,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user