-
Notifications
You must be signed in to change notification settings - Fork 152
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
Evaluation order of transactions in a block #244
Labels
discussion needed
We need to dicuss about this
Comments
I started to work on this issue 😁 |
It's resolved by #355. |
In #355, I decided to order transactions by its nonce for hash. But it can cause undetermined hash, which also affects the order in which transactions are executed. |
limebell
pushed a commit
to limebell/libplanet
that referenced
this issue
Jul 7, 2021
…brunnr-battle Fix mimisbrunnr battle action
OnedgeLee
pushed a commit
to OnedgeLee/libplanet
that referenced
this issue
Jan 31, 2023
update slack webhook configuration
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently the evaluation order of transactions signed by multiple signers in a block are arbitrary and can be reoredered (fabricated) by a miner. This indeterministic order makes games unfair.
For example, suppose there are two actions, Attack which decreases target's health and Defend which invalidates one succeeding Attack against on the signer. A signs a transaction tA to Attack B, and B signs a transaction tB to Defend itself. If two transactions try to belong to a block, a block miner can determine whether to decrease B's health or not. If tA is followed by tB B gets damage, whereas if tB is followed by tA A loses its chance.
Therefore, the evaluation order of transactions in a block should not be determined by any certain party.
One idea I have is to make the evaluation order determined after a block is mined so that a miner can't deal with it:
Block<T>.Mine()
to take a set of transactions instead of a sequence of transactions. These transactions are unordered.This makes the order of evaluation impossible to predict until a block is mined. The order is still arbitrary, but it makes game play in general more fair.
Any opinions are welcome.
The text was updated successfully, but these errors were encountered: