src(lucid): add EIP-8184 LUCID encrypted mempool as unscheduled fork#1
Draft
jflo wants to merge 1 commit into
Draft
src(lucid): add EIP-8184 LUCID encrypted mempool as unscheduled fork#1jflo wants to merge 1 commit into
jflo wants to merge 1 commit into
Conversation
Implements EIP-8184 (LUCID Encrypted Mempool) as a new unscheduled fork
`src/ethereum/forks/lucid/` (Unscheduled, order_index=4) built on top of
Amsterdam (which includes FOCIL).
## What's included
**New fork** — `src/ethereum/forks/lucid/`
- `SealedTicketTransaction` (type 0x05): outer bidding envelope with
ChaCha20-Poly1305 encrypted payload, commitment hashes, and ToB fee
- `process_sealed_tickets()`: top-of-block execution of decrypted tickets
in commitment order (descending ToB fee, then gas limit, then index)
- `SLOTNUM` opcode (0x4B): returns the slot number of the block in which
the sealed ticket's commitment was included; 0 for ordinary transactions
- `validate_sealed_transaction_context()`: verifies ciphertext hash,
key commitment, reveal commitment (SSZ hash_tree_root), and plaintext
gas/fee constraints
**Shared crypto** — `src/ethereum/crypto/`
- `chacha20poly1305.py`: ChaCha20-Poly1305 AEAD decrypt wrapper
- `ssz.py`: SSZ `hash_tree_root` for `RevealCommitmentPreimage`
**t8n support** — `src/ethereum_spec_tools/evm_tools/t8n/`
- Accepts `sealedTransactionContexts` in the env JSON input
- Executes sealed tickets before the regular transaction list
## Running the tests
# Blockchain tests (SLOTNUM opcode)
fill tests/unscheduled/eip8184_lucid/test_lucid.py --fork Lucid
# Unit tests (fee calculation, ordering, context validation)
pytest tests/unscheduled/eip8184_lucid/test_lucid_unit.py
The `test_lucid_unit.py` file uses plain pytest (not fill) and is excluded
from fill collection automatically by `conftest.py`.
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements EIP-8184 (LUCID Encrypted Mempool) as a new unscheduled fork
src/ethereum/forks/lucid/(Unscheduled, order_index=4) built on top of Amsterdam (which includes FOCIL).What's included
New fork —
src/ethereum/forks/lucid/SealedTicketTransaction(type 0x05): outer bidding envelope with ChaCha20-Poly1305 encrypted payload, commitment hashes, and ToB feeprocess_sealed_tickets(): top-of-block execution of decrypted tickets in commitment order (descending ToB fee, then gas limit, then index)SLOTNUMopcode (0x4B): returns the slot number of the block in which the sealed ticket's commitment was included; 0 for ordinary transactionsvalidate_sealed_transaction_context(): verifies ciphertext hash, key commitment, reveal commitment (SSZ hash_tree_root), and plaintext gas/fee constraintsShared crypto —
src/ethereum/crypto/chacha20poly1305.py: ChaCha20-Poly1305 AEAD decrypt wrapperssz.py: SSZhash_tree_rootforRevealCommitmentPreimaget8n support —
src/ethereum_spec_tools/evm_tools/t8n/sealedTransactionContextsin the env JSON inputRunning the tests
The
test_lucid_unit.pyfile uses plain pytest (not fill) and is excluded from fill collection automatically byconftest.py.🗒️ Description
🔗 Related Issues or PRs
N/A.
✅ Checklist
just statictype(scope):.mkdocs servelocally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.@ported_frommarker.Cute Animal Picture