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

Using Transaction Nonce to indicate transaction order. #2861

Closed
Jim8y opened this issue May 22, 2023 · 6 comments
Closed

Using Transaction Nonce to indicate transaction order. #2861

Jim8y opened this issue May 22, 2023 · 6 comments
Labels
discussion Initial issue state - proposed but not yet accepted

Comments

@Jim8y
Copy link
Contributor

Jim8y commented May 22, 2023

Summary or problem description
Currently, the nonce filed in the transaction is of no actual use. Maybe we can use it to indicate user transaction orders. This would be useful for anti-MEV services or other transaction order-sensitive applications.

Do you have any solution you want to propose?
Make nonce an increment field and update the Consensus to order transactions (of the same user) by nonces.

Neo Version

  • Neo 3

Where in the software does this update applies to?

  • Consensus
@Jim8y Jim8y added the discussion Initial issue state - proposed but not yet accepted label May 22, 2023
@roman-khimov
Copy link
Contributor

Duplicates #1502.

@Jim8y
Copy link
Contributor Author

Jim8y commented May 22, 2023

@roman-khimov So, is deterministic transactions order worth a discussion?

@roman-khimov
Copy link
Contributor

Even though that discussion had happened quite some time ago I doubt a lot has changed. Nonce is useful as it is now, it's just it has zero relation to E-letter chain transaction nonce. Notice also that same user is also a bit of vague concept for Neo with transactions having multiple signers.

Even if we'd like to do it, I don't think we can introduce this behavior into existing networks without a new transaction format, at least not without a new attribute for it. I'd try DependsOn route (#1502 (comment)) if we really want to have deterministic order for a single signer (notice that Conflicts is almost there in #2818). Other than that I'd just enjoy the possibility of sending a lot of independent transactions.

@vncoelho
Copy link
Member

Make nonce an increment field and update the Consensus to order transactions (of the same user) by nonces.

If we consider that transactions are fully homogeneous distributed among peers and consensus I believe this will not open space for attacks that delay blocks.
We just need to ensure that users can not send specific transactions that will make Consensus to propose blocks that are difficulty to be agreed during the consensus phase. Because after speaker proposes, the backups need to also have the same txs and they synchronize them using messages on the P2P TCP.

@roman-khimov
Copy link
Contributor

If we're to consider this behavior in the context of block delays caused by network inconsistency then it's just not a solution, accounts are not limited (this also rules out any per-sender mempool partitioning approaches).

@cschuchardt88
Copy link
Member

I think what he is saying, is to have IStore keys to be order seekable. That would be nice, their by timestamp or nonce but some kind of order other than random SHA256 hash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Initial issue state - proposed but not yet accepted
Projects
None yet
Development

No branches or pull requests

4 participants