Skip to content
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

Specify ambiguity in eth_getTransactionCount #188

Closed
Smithgift opened this issue Dec 31, 2016 · 2 comments
Closed

Specify ambiguity in eth_getTransactionCount #188

Smithgift opened this issue Dec 31, 2016 · 2 comments
Labels

Comments

@Smithgift
Copy link

The JSON-RPC method eth_getTransactionCount, according to the specification, returns the number of transactions sent from an account. All well and good. In the majority of situations, this is the same as returning the nonce.

However, if the nonce does not start at 0, this leads to inconsistent behavior across clients.

a) In geth and Parity, getTransactionCount returns the nonce.
b) In pyethapp, getTransactionCount actually calculates the number of transactions, and returns that.

While this is irrelevant for the mainnet, it does matter for a testnet with multiple clients, or if an alternate nonce scheme was implemented. As written, it seems it should be pyethapp's behavior that is correct, but de facto it works as geth and Parity implement it.

I see three options:

  1. Explicitly specify that getTransactionCount returns the transaction count, not the nonce.
  2. Explicitly specify that getTransactionCount returns the nonce.
    2a) And maybe change the name to getNonce, too.
  3. Specify that getTransactionCount returns the transaction count, but create a new method getNonce which returns the nonce.

References:

The pull request wherein I discovered this issue.
A short discussion in pyethapp's repo.

@github-actions
Copy link

github-actions bot commented Jan 3, 2022

There has been no activity on this issue for two months. It will be closed in a week if no further activity occurs. If you would like to move this EIP forward, please respond to any outstanding feedback or add a comment indicating that you have addressed all required feedback and are ready for a review.

@github-actions github-actions bot added the stale label Jan 3, 2022
@github-actions
Copy link

This issue was closed due to inactivity. If you are still pursuing it, feel free to reopen it and respond to any feedback or request a review in a comment.

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

No branches or pull requests

3 participants