Skip to content

echonet: squash timestamp + block metadata changes for editing#14184

Open
ron-starkware wants to merge 1 commit into
mainfrom
ron/echonet-sequencer-changes
Open

echonet: squash timestamp + block metadata changes for editing#14184
ron-starkware wants to merge 1 commit into
mainfrom
ron/echonet-sequencer-changes

Conversation

@ron-starkware
Copy link
Copy Markdown
Contributor

Squashes the rebased ron/add-timestamp-to-block stack into a single commit on top of main for ad-hoc editing. Combines:

  • echonet: rename replay functions before getting block metadata
  • echonet: share json parse func
  • echonet: fetch block metadata from echonet
  • echonet: Add timestamp to block metadata

@cursor
Copy link
Copy Markdown

cursor Bot commented May 25, 2026

PR Summary

Medium Risk
Changes consensus proposal init gas prices/version and FIFO block sequencing (empty blocks); failures fall back to defaults but incorrect replay could affect block validity in Echonet mode.

Overview
This PR extends Echonet replay so block proposals use canonical mainnet metadata (not just a timestamp): timestamps, block numbers, L1/L2 gas prices, and Starknet version flow from mempool → batcher → consensus orchestrator.

API rename: get_batch_timestamp / resolve_batch_timestamp become get_block_metadata / resolve_block_metadata, returning the new ReplayMetadata struct instead of a bare u64.

Mempool (FIFO/Echonet): resolve_metadata now tracks block number (including empty blocks), and in Echonet mode optionally HTTP-fetches echonet/get_block_metadata from the recorder (shared JSON helper with tx metadata). Gateway adds behavior_mode + recorder_url and sets effective Starknet version at startup from echonet. Consensus uses override_block_metadata to apply replayed prices/version in ProposalInit; Cende blobs carry proposal starknet_version instead of hardcoded LATEST. Config schema, node pointers, Grafana panels, and tests are updated accordingly.

Reviewed by Cursor Bugbot for commit d9abae3. Bugbot is set up for automated code reviews on this repo. Configure here.

@reviewable-StarkWare
Copy link
Copy Markdown

This change is Reviewable

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 25, 2026

Comment thread crates/apollo_consensus_orchestrator/src/build_proposal.rs
@ron-starkware ron-starkware force-pushed the ron/echonet-sequencer-changes branch from d2fedcc to 4848940 Compare May 25, 2026 11:26
Comment thread crates/apollo_gateway/src/gateway.rs
@ron-starkware ron-starkware force-pushed the ron/echonet-sequencer-changes branch from 4848940 to 9b75b5f Compare May 25, 2026 11:40
Comment thread crates/apollo_mempool/src/fifo_transaction_queue.rs
@ron-starkware ron-starkware force-pushed the ron/echonet-sequencer-changes branch 2 times, most recently from f6ab080 to 74222ba Compare May 25, 2026 13:09
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 74222ba. Configure here.

Comment thread crates/apollo_mempool/src/communication.rs
Squashes the rebased ron/add-timestamp-to-block stack into a single commit
on top of main for ad-hoc editing. Combines:
  - echonet: rename replay functions before getting block metadata
  - echonet: share json parse func
  - echonet: fetch block metadata from echonet
  - echonet: Add timestamp to block metadata
@ron-starkware ron-starkware force-pushed the ron/echonet-sequencer-changes branch from 74222ba to d9abae3 Compare May 25, 2026 18:51
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.

2 participants