Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

RPC: getSignatureStatuses is not callable with a commitment config #10108

Closed
jstarry opened this issue May 19, 2020 · 7 comments
Closed

RPC: getSignatureStatuses is not callable with a commitment config #10108

jstarry opened this issue May 19, 2020 · 7 comments

Comments

@jstarry
Copy link
Contributor

jstarry commented May 19, 2020

Problem

getSignatureStatuses always returns signature status and confirmation counts for the "recent" commitment level. This makes it impossible to check for 'max' and 'single' commitment levels

Proposed Solution

Add a commitment config param RpcSignatureStatusConfig

@CriesofCarrots
Copy link
Contributor

@jstarry , you requested that parameter be removed here: #9314 (comment)
Can you help me understand how your thinking has changed on this? The confirmation count does reflect cluster confirmations:

let confirmations = if r_block_commitment_cache.root() >= slot

It is the number of confirmed blocks since signature confirmation; null if rooted on this node + rooted by a supermajority of the cluster

In fact, the only commitment case we can't really check for right now is 'root'.

I am not necessarily opposed to re-adding the commitment param, but want to make sure we're on the same page about how this endpoint functions to determine if it is needed. @mvines also had concerns about that syntax here: #9314 (comment)

Both v1.0 and v1.1 actually retain this parameter:
#9324
#9329
So it would be good to get this re-added before v1.2 is cut for continuity, if we're going to do it.

@jstarry
Copy link
Contributor Author

jstarry commented May 19, 2020

@jstarry , you requested that parameter be removed here: #9314 (comment)

😅 yes, I remember!

The confirmation count does reflect cluster confirmations

Ah! I guess I need to read the code better, I missed that change

In fact, the only commitment case we can't really check for right now is 'root'.

What about 'single'?

I am not necessarily opposed to re-adding the commitment param, but want to make sure we're on the same page about how this endpoint functions to determine if it is needed.

I think I misstepped by proposing "Add a commitment config param to RpcSignatureStatusConfig" as the solution. Maybe a better solution would be to specify whether you wanted "node" or "cluster" confirmations?

@CriesofCarrots
Copy link
Contributor

What about 'single'?

confirmations:1 is the 'single' case

I think I misstepped by proposing "Add a commitment config param to RpcSignatureStatusConfig" as the solution. Maybe a better solution would be to specify whether you wanted "node" or "cluster" confirmations?

Ah, okay, interesting. Confirmation means "cluster confirmations" (blocks voted on by 2/3+ of the cluster) by definition, but we could add a toggle between confirmations and node votes/lockout. Maybe it would be better to add an additional nodeLockout or nodeVotes field?

@jstarry
Copy link
Contributor Author

jstarry commented May 19, 2020

Ah, I missed that confirmations represents the cluster confirmations now too 🤦 I don't think this issue is needed then. Sorry for the noise! Appreciate you walking me through this :)

@jstarry jstarry closed this as completed May 19, 2020
@mvines
Copy link
Contributor

mvines commented May 19, 2020

Could we use better docs to avoid this kind of confusion again @jstarry?

@jstarry
Copy link
Contributor Author

jstarry commented May 19, 2020

The docs look fine, I just didn't know they changed

@jstarry
Copy link
Contributor Author

jstarry commented May 19, 2020

And for context, this only came up because I wanted to add support for single commitment to the web3 sdk (to use it in break). I think the underlying issue is the solana / solana-web3.js disconnect

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants