-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Add EIP-5875: Instruction to Get Transaction Index of Block #5875
Conversation
Hi! I'm a bot, and I wanted to automerge your PR, but couldn't because of the following issue(s): (fail) eip-5875.md
|
Previously discussed in #222. |
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.
Initial review. There's a lot to like!
Co-authored-by: Pandapip1 <[email protected]>
Co-authored-by: Pandapip1 <[email protected]>
Co-authored-by: Pandapip1 <[email protected]>
Co-authored-by: Pandapip1 <[email protected]>
Co-authored-by: Pandapip1 <[email protected]>
Co-authored-by: Pandapip1 <[email protected]>
Thank you @Pandapip1 , all suggestions commited. Ready to merge |
Also discussed here: #4363 |
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.
Generally:
s/tx number/transaction index/g
- There are real implications of this in block production that need to be explored in the rationale and security considerations. For starters, how will this affect mev?
Co-authored-by: lightclient <[email protected]>
Co-authored-by: lightclient <[email protected]>
1. Parameter Table | ||
|
||
* `FORK_NUM_TBD`: the fork block number to start introducing this change. | ||
* `OPCODE_TBD`: the opcode value being introduced. |
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.
This is unnecessary.
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.
Sure, I could remove it.
QQ: If we don't make OPCODE a placeholder number, how do we allow people to propose EIPs picking arbitrary unused new opcodes without conflicting with other drafts, knowing some of such core EIPs are taking long / never going to be adopted?
|
||
An example use-case is snapshot weighted voting, in which a snapshot of voting rights is generated. The current options are with `block.timesamp` or `block.number`, which only have block-level granularity. But the world state changes across transactions within a block. If there is any transaction in the same block that causes a voting right to change, the block number or block timestamp is not sufficient to pinpoint the world state of a snapshot of voting rights. | ||
|
||
## Specification |
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.
You don't specify how much the operation costs.
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.
Good point. Added now. Thank you!
EIPS/eip-5875.md
Outdated
|
||
## Rationale | ||
|
||
1. We choose the Transaction Index length for a world length for simplicity. |
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 don't understand this sentence. Did you mean word length? In that case I would just omit this because the word length is not decidable by an instruction.
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 was referring to the bounding. Updated the sentence and could you check if it reads better now?
Co-authored-by: lightclient <[email protected]>
Co-authored-by: lightclient <[email protected]>
Co-authored-by: lightclient <[email protected]>
Co-authored-by: Pandapip1 <[email protected]>
Co-authored-by: lightclient <[email protected]>
Co-authored-by: Pandapip1 <[email protected]>
Co-authored-by: lightclient <[email protected]>
Co-authored-by: Pandapip1 <[email protected]>
4. Further discussion is needed about potentially bounding the transaction index for simpler on-chain computation if use case arises. | ||
5. Further discussion is needed about whether to use transaction index within the block or globally. Globally makes it easier to compute number distance between two transactions directly but is useless for DAG | ||
if we foresee a DAG future. |
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.
4. Further discussion is needed about potentially bounding the transaction index for simpler on-chain computation if use case arises. | |
5. Further discussion is needed about whether to use transaction index within the block or globally. Globally makes it easier to compute number distance between two transactions directly but is useless for DAG | |
if we foresee a DAG future. | |
- Further discussion is needed about potentially bounding the transaction index for simpler on-chain computation if use case arises. | |
- Further discussion is needed about whether to use transaction index within the block or globally. Globally makes it easier to compute number distance between two transactions directly but is useless for DAG | |
if we foresee a DAG future. |
There has been no activity on this pull request for 2 weeks. It will be closed after 3 months of inactivity. If you would like to move this PR 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. |
This pull request 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. |
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.
Ok
When opening a pull request to submit a new EIP, please use the suggested template: https://github.com/ethereum/EIPs/blob/master/eip-template.md
We have a GitHub bot that automatically merges some PRs. It will merge yours immediately if certain criteria are met: