Skip to content

src(lucid): add EIP-8184 LUCID encrypted mempool as unscheduled fork#1

Draft
jflo wants to merge 1 commit into
eips/bogota/eip-7805from
eips/unscheduled/eip-8184
Draft

src(lucid): add EIP-8184 LUCID encrypted mempool as unscheduled fork#1
jflo wants to merge 1 commit into
eips/bogota/eip-7805from
eips/unscheduled/eip-8184

Conversation

@jflo
Copy link
Copy Markdown
Owner

@jflo jflo commented Jun 2, 2026

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 forksrc/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 cryptosrc/ethereum/crypto/

  • chacha20poly1305.py: ChaCha20-Poly1305 AEAD decrypt wrapper
  • ssz.py: SSZ hash_tree_root for RevealCommitmentPreimage

t8n supportsrc/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.

🗒️ Description

🔗 Related Issues or PRs

N/A.

✅ Checklist

  • All: Ran fast static checks to avoid unnecessary CI fails, see also Code Standards and Enabling Pre-commit Checks:
    just static
  • All: PR title adheres to the repo standard - it will be used as the squash commit message and should start type(scope):.
  • All: Considered updating the online docs in the ./docs/ directory.
  • All: Set appropriate labels for the changes (only maintainers can apply labels).
  • Tests: Ran mkdocs serve locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.
  • Tests: For PRs implementing a missed test case, update the post-mortem document to add an entry the list.
  • Ported Tests: All converted JSON/YML tests from ethereum/tests or tests/static have been assigned @ported_from marker.

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

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`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant