Skip to content
This repository was archived by the owner on Aug 3, 2026. It is now read-only.

fix: validate Shasta grandparent base fee - #697

Merged
smtmfft merged 2 commits into
mainfrom
fix/shasta-grandparent-basefee-main
Jun 29, 2026
Merged

fix: validate Shasta grandparent base fee#697
smtmfft merged 2 commits into
mainfrom
fix/shasta-grandparent-basefee-main

Conversation

@smtmfft

@smtmfft smtmfft commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • port the Shasta grandparent/base-fee validation fix from the hotfix branch to main
  • require and bind the L2 grandparent header before using it for first-block Shasta base-fee validation
  • run Shasta base-fee validation after manifest selection so default-manifest fallback cannot skip it
  • include dev fork env values in SGX manifests so devnet/mainnet builds use the same image measurement path
  • bump gaiko to 47944ca (taikoxyz/gaiko#31) to remove committed enclave signing material

Test Plan

  • cargo fmt -p raiko-lib -- --check
  • cargo test -p raiko-lib -- --nocapture
  • git diff --check origin/main...HEAD
  • checked gaiko@47944ca does not contain docker/enclave-key.pem or PEM private-key material

Copilot AI review requested due to automatic review settings June 26, 2026 09:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Ports the Shasta grandparent/base-fee validation hotfix to main, tightening first-block base-fee validation by ensuring the L2 grandparent header linkage is verified and by running validation after manifest selection so fallback manifests can’t bypass it. Also updates SGX Gramine manifest templates to carry additional dev fork env bindings for consistent enclave measurement paths across build modes.

Changes:

  • Move Shasta base-fee validation to occur after protocol/default manifest selection in Shasta transaction generation.
  • Strengthen Shasta base-fee validation by requiring a correctly linked L2 grandparent header (reject missing/mismatched grandparent).
  • Add missing dev fork env bindings to SGX Gramine manifest templates.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
provers/sgx/config/sgx-guest.local.manifest.template Adds DEV_SHASTA_TIMESTAMP env binding for local SGX guest manifest parity.
provers/sgx/config/sgx-guest.docker.manifest.template Adds dev fork env bindings for Docker SGX guest manifest (noted inconsistency to address).
lib/src/utils/shasta.rs Runs Shasta base-fee validation after manifest selection (default fallback can’t skip validation).
lib/src/utils/shasta_rules.rs Requires/validates L2 grandparent linkage when computing first-block Shasta base fee; adds targeted tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread provers/sgx/config/sgx-guest.docker.manifest.template
@smtmfft
smtmfft enabled auto-merge June 27, 2026 01:29
@smtmfft
smtmfft added this pull request to the merge queue Jun 29, 2026
Merged via the queue into main with commit 769a3f9 Jun 29, 2026
17 of 19 checks passed
@smtmfft
smtmfft deleted the fix/shasta-grandparent-basefee-main branch June 29, 2026 00:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants