0xMiden / 0xMiden/protocol

Transaction events: Kernel logging and transaction integration

Aperta
#3,831 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Rust
Stelle
132
Fork
167
Merge medio
1g 23h
PR unite (30g)
110

Descrizione

Part of #3803. Depends on the event types and commitment specification.

Implement `miden::protocol::tx::log(topic, PAYLOAD_COMMITMENT)` and bind emitted events to transaction proofs.

Scope:
- Authenticate the calling procedure against the active account, derive the emitter, verify the payload preimage, enforce size limits, and update the ordered event commitment.
- Support public and private accounts, including events emitted during FPI. Logged data is public.
- Collect event records through host VM events.
- Implement explicit, idempotent event finalization restricted to authenticated native account procedures. Logging after finalization must fail the transaction.
- Finalize events before including their commitment in the standard signed transaction summary. The epilogue must finalize any remaining open event list after authentication.
- Add events to `TransactionOutputs` and `ProvenTransaction`. Add the event commitment to `TransactionHeader`, the output stack, the transaction ID, and the signed transaction summary.
- Update the executor, prover, verifier, serialization, and affected protobuf representations. Verification must recompute the commitment from the submitted event records.

Tests should cover native and nested FPI emitter attribution, caller authorization, size limits, finalization, authentication with and without signatures, and rejection of altered, missing, additional, or reordered event records.

Separate event data fees, backward compatibility, and batch and block kernel MASM changes are outside this issue's scope.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.