Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

feat(metering): add DA size getter and dynamic DA config#1114

Open
niran wants to merge 1 commit intoniran/priority-fee-2-ingestionbase/base:niran/priority-fee-2-ingestionfrom
niran/priority-fee-3-dynamic-dabase/base:niran/priority-fee-3-dynamic-daCopy head branch name to clipboard
Open

feat(metering): add DA size getter and dynamic DA config#1114
niran wants to merge 1 commit intoniran/priority-fee-2-ingestionbase/base:niran/priority-fee-2-ingestionfrom
niran/priority-fee-3-dynamic-dabase/base:niran/priority-fee-3-dynamic-daCopy head branch name to clipboard

Conversation

@niran
Copy link
Contributor

@niran niran commented Mar 6, 2026

PR Stack

This is PR 5 of 5 in the metered priority fee stack:

  1. feat(metering): add base_meteredPriorityFeePerGas RPC endpoint #355 base_meteredPriorityFeePerGas RPC endpoint
  2. feat(metering): add per-flashblock estimation with cache #1111 Per-flashblock estimation with cache
  3. feat(metering): use rolling estimates from cache #1112 Rolling estimates from cache
  4. feat(metering): live data ingestion from flashblocks #1113 Live data ingestion from flashblocks
  5. This PR — DA size getter and dynamic DA config ⬅️

Summary

  • Add miner_getMaxDASize RPC to MinerApiExt trait and implement in OpMinerExtApi
  • Thread da_config through MeteringExtension / MeteringConfig so the node can query the sequencer's current DA budget

Test Plan

  • Existing miner RPC tests cover set_max_da_size; getter follows the same pattern
  • All metering tests pass with the new config threading

Comment on lines +186 to +189
Ok(()) => info!(
url = %rpc_url,
tx_hash = %tx_hash,
"Forwarded metering information"
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: This fires on every successfully forwarded metering event. At high transaction throughput this will be very noisy. Consider downgrading to debug! — the error/warn paths already cover the cases operators need to monitor.

Suggested change
Ok(()) => info!(
url = %rpc_url,
tx_hash = %tx_hash,
"Forwarded metering information"
Ok(()) => debug!(
url = %rpc_url,
tx_hash = %tx_hash,
"Forwarded metering information"
),

Comment on lines +191 to +195
Ok(n) => info!(
receivers = n,
bundle_hash = %bundle_hash,
"Broadcast metering data to builder connectors"
),
Copy link
Contributor

Choose a reason for hiding this comment

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

Same concern: this logs at info! on every successful broadcast, which fires per-transaction. Consider debug! to avoid log noise in production.

Suggested change
Ok(n) => info!(
receivers = n,
bundle_hash = %bundle_hash,
"Broadcast metering data to builder connectors"
),
Ok(n) => debug!(
receivers = n,
bundle_hash = %bundle_hash,
"Broadcast metering data to builder connectors"
),

Comment on lines +40 to 44
/// Sets the shared DA configuration.
pub fn with_da_config(mut self, da_config: OpDAConfig) -> Self {
self.da_config = Some(da_config);
self
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This method and the da_config field are added here and threaded through launch_node, but no caller in this PR invokes with_da_config. Is this intended as scaffolding for a subsequent PR? If so, consider adding a brief doc comment noting that, or deferring the addition until there's a caller to avoid dead code.

@niran niran force-pushed the niran/priority-fee-3-dynamic-da branch from 2401403 to f2bbd3f Compare March 9, 2026 18:52
@niran niran force-pushed the niran/priority-fee-2-ingestion branch from 72cf5bd to 118bff9 Compare March 9, 2026 18:52
Comment on lines +40 to 44
/// Sets the shared DA configuration.
pub fn with_da_config(mut self, da_config: OpDAConfig) -> Self {
self.da_config = Some(da_config);
self
}
Copy link
Contributor

Choose a reason for hiding this comment

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

with_da_config is defined on impl BaseNodeRunner<DefaultPayloadServiceBuilder> but da_config is a field on the generic struct. If a caller chains with_service_builder() before with_da_config(), the method disappears because the SB parameter is no longer DefaultPayloadServiceBuilder.

Consider moving it to the generic impl<SB: PayloadServiceBuilder> BaseNodeRunner<SB> block (alongside with_service_builder, install_ext, and run) so it composes correctly regardless of call order.

Suggested change
/// Sets the shared DA configuration.
pub fn with_da_config(mut self, da_config: OpDAConfig) -> Self {
self.da_config = Some(da_config);
self
}
impl<SB: PayloadServiceBuilder> BaseNodeRunner<SB> {
/// Sets the shared DA configuration.
pub fn with_da_config(mut self, da_config: OpDAConfig) -> Self {
self.da_config = Some(da_config);
self
}

@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2026

Review Summary

PR adds miner_getMaxDASize RPC, threads MeteringResourceLimits through CLI/config, and improves BuilderConnector error handling. Overall a clean change.

Findings

with_da_config on overly-narrow impl block (crates/execution/runner/src/runner.rs:40-44) — The builder method is defined on impl BaseNodeRunner<DefaultPayloadServiceBuilder> but operates on a generic field. Moving it to impl<SB: PayloadServiceBuilder> would prevent it from disappearing after a with_service_builder() call. See inline comment.

Observations (no action required)

  • The miner HTTP API is now exposed on base-client in devnet docker-compose. This is fine for devnet but is worth noting since miner_setMaxDASize and miner_setGasLimit are mutating RPCs — ensure production configs don't accidentally inherit this.
  • The info!-level logs on every successful metering forward/broadcast (flagged in prior inline comments) will be noisy under load. Agree with existing suggestions to use debug!.

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.