Skip to content

feat: adapt proof-engine client to zkboost v0.9.0 API#40

Open
han0110 wants to merge 2 commits into
eth-act:optional-proofsfrom
han0110:feature/chain-config
Open

feat: adapt proof-engine client to zkboost v0.9.0 API#40
han0110 wants to merge 2 commits into
eth-act:optional-proofsfrom
han0110:feature/chain-config

Conversation

@han0110

@han0110 han0110 commented Jul 10, 2026

Copy link
Copy Markdown
  • Replace the old query-parameter proof request and verification endpoints with SSZ-encoded ProofRequestBody and ProofVerificationBody
  • Attach ChainConfig to proof request and verification endpoints.
  • Resolve each block active fork from the consensus ChainSpec and the block timestamp
  • To resolve the active fork, HttpProofEngine constructor now takes extra (spec, genesis_time, slots_per_epoch) so we can resolve by comparing the timestamp (hence ExecutionLayer::from_config now takes extra (spec, genesis_time))

@han0110 han0110 requested review from frisitano and removed request for frisitano July 10, 2026 13:47
@han0110 han0110 marked this pull request as draft July 10, 2026 14:53
@han0110 han0110 force-pushed the feature/chain-config branch 3 times, most recently from 00da738 to 0f583de Compare July 11, 2026 04:51
@han0110 han0110 force-pushed the feature/chain-config branch from 0f583de to 6634874 Compare July 11, 2026 06:43
@han0110 han0110 marked this pull request as ready for review July 13, 2026 01:46
@han0110 han0110 requested a review from frisitano July 13, 2026 01:47
Comment on lines +455 to +469
let beacon_chain_builder = if let Some(execution_config) = config.execution_layer.clone() {
let genesis_time = beacon_chain_builder
.genesis_time
.ok_or("execution layer requires a genesis time")?;
let execution_layer = ExecutionLayer::from_config(
execution_config,
context.executor.clone(),
&spec,
genesis_time,
)
.map_err(|e| format!("unable to start execution layer endpoints: {:?}", e))?;
beacon_chain_builder.execution_layer(Some(execution_layer))
} else {
beacon_chain_builder
};

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Move after the ExecutionLayer construction a bit in order to get genesis_time

Comment on lines +14 to +29
/// Execution fork identifier, encoded as a `u64` discriminant.
///
/// Only the forks a consensus client can resolve are listed.
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
#[repr(u64)]
pub enum ProtocolFork {
Paris = 14,
Shanghai = 15,
Cancun = 16,
Prague = 17,
Osaka = 18,
Bpo1 = 19,
Bpo2 = 20,
// Skipping Bpo3, Bpo4 and Bpo5 which will be removed in next spec release.
Amsterdam = 24,
}

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

It only includes the forks after the merge here (the whole list can be found here, and note that in next update of spec the enum is also updated, so we'd need to bump the values here).

Comment on lines +151 to +157
blob_max.map(|max| BlobSchedule {
max,
// `target` and `base_fee_update_fraction` left `0` to be filled
// by proof node. Eventually `BlobSchedule` will be removed.
target: 0,
base_fee_update_fraction: 0,
}),

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Note: the blob_schedule will be removed for the next release of spec

pub request_root: Hash256,
pub parent_hash: ExecutionBlockHash,
pub block_number: u64,
pub block_timestamp: u64,

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Added block_timestamp so when verification we can resolve the correct activated ChainConfig, not sure if there is simpler way to get timestamp without storing it.

ssz_body: Vec<u8>,
proof_attributes: ProofAttributes,
) -> Result<Hash256, ProofEngineError>;
async fn request_proofs(&self, ssz_body: Vec<u8>) -> Result<Hash256, ProofEngineError>;

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Takes SSZ-encoded ProofRequestBody to avoid EthSpec generic, same for verify_proof below

Comment on lines 39 to 46
pub enum ProofType {
EthrexRisc0 = 0,
EthrexOpenVM = 0,
EthrexSP1 = 1,
EthrexZisk = 2,
RethOpenVM = 3,
RethRisc0 = 4,
RethSP1 = 5,
RethZisk = 6,
RethSP1 = 4,
RethZisk = 5,
}

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Updated the ProofType enum accordinng to ere-guests released guests

@@ -18,10 +18,10 @@ participants:
cl_extra_params:

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Update the kurtosis network file to use latest zkboost and ere images (and update --proof-types)

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