-
Notifications
You must be signed in to change notification settings - Fork 150
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
protect: Add "Nonce Management" page to document eth_getTransactionCount
behavior.
#573
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
eth_getTransactionCount
behavior.eth_getTransactionCount
behavior.
### Authentication | ||
|
||
To authenticate your request, Flashbots endpoints require you to sign the payload and include the signed payload in the `X-Flashbots-Signature` header of your request. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want to (instead, or in addition) link directly to the authentication section in our API docs https://docs.flashbots.net/flashbots-auction/advanced/rpc-endpoint#authentication.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about that, but that section is relay-specific so includes some wording such as:
Any valid ECDSA-secp256k1 key, like an arbitrary Ethereum key, can be used to sign the payload. The address associated with this key will be used by Flashbots to keep track of your reputation over time and provide user statistics. You can change the key you use at any time.
That conflicts with the usage here.
Normally, a wallet can call `eth_getTransactionCount` to get the next nonce to use for a transaction. | ||
However, since transactions sent to Flashbots Protect are potentially sensitive, even exposing the incremented nonce can leak information about the user's activity. | ||
|
||
As such, Flashbots Protect requires that all requests to `eth_getTransactionCount` be signed by the user when querying the `"pending"` nonce. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might specify that if the request is signed, the response will include pending private transactions in the tx count. If the request is unsigned, the response will only include pending public transactions. (Falls back to the default behavior).
Right now it sounds like you can't even get a response if you don't sign the request which isn't 100% true.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup good call, will update!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated! I'll re-read it again for clarity tomorrow morning then merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two small comments, otherwise lgtm!
ad09730
to
e99813f
Compare
No description provided.