-
Notifications
You must be signed in to change notification settings - Fork 28
Add permit flashtestations tx calls from builder #285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
ad61301
to
75e520c
Compare
|
||
pub trait BuilderTransactions<ExtraCtx: Debug + Default = ()>: Debug { | ||
fn simulate_builder_txs<Extra: Debug + Default>( | ||
pub trait BuilderTransactions<ExtraCtx: Debug + Default = (), Extra: Debug + Default = ()> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it starts to look scary :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can move Extra fields to ExtraCtx :)
260cb95
to
2bd3b66
Compare
75e520c
to
ef81cca
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds permit-based registration and block proof verification for flashtestations so the TEE signer no longer needs funding; introduces new tests and refactors builder transaction simulation to support permit flows.
- Introduces EIP-712 style permit functions on registry and builder policy contracts plus related signature/nonce logic.
- Refactors builder transaction trait and implementations to generic over extra context and execution info, adding unified simulation helpers and error types.
- Adds CLI flag --flashtestations.use-permit and corresponding test coverage for permit registration and block proof flows.
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 6 comments.
Show a summary per file
File | Description |
---|---|
crates/op-rbuilder/src/tests/mod.rs | Updates test contract addresses used in setup. |
crates/op-rbuilder/src/tests/flashtestations.rs | Expands test suite with permit, invalid quote, unauthorized workload, and block proof scenarios; adjusts expected tx counts. |
crates/op-rbuilder/src/flashtestations/service.rs | Extends bootstrap to pass builder key and support permit flag gating RPC registration. |
crates/op-rbuilder/src/flashtestations/mod.rs | Adds permit-related function and error definitions to interfaces; simplifies revert enum. |
crates/op-rbuilder/src/flashtestations/builder_tx.rs | Implements permit registration and block proof signing logic; refactors simulation paths and error handling. |
crates/op-rbuilder/src/flashtestations/args.rs | Adds CLI arg flashtestations_use_permit. |
crates/op-rbuilder/src/builders/standard/service.rs | Passes builder key into flashtestations bootstrap with new signature. |
crates/op-rbuilder/src/builders/standard/builder_tx.rs | Adjusts trait usage for new generics and error-tolerant flashtestations integration. |
crates/op-rbuilder/src/builders/mod.rs | Re-exports new error/result types, removes obsolete helper. |
crates/op-rbuilder/src/builders/flashblocks/service.rs | Updates generic bounds to include execution info type for flashblocks. |
crates/op-rbuilder/src/builders/flashblocks/payload.rs | Adds FlashblocksExecutionInfo; updates trait bounds accordingly. |
crates/op-rbuilder/src/builders/flashblocks/builder_tx.rs | Adapts builder tx structures to new generic trait; commits state before flashtestations txs. |
crates/op-rbuilder/src/builders/builder_tx.rs | Major refactor: adds unified simulation utilities, new error variants, generic BuilderTxBase, and removes log_exists helper. |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
95a824c
to
82c5fea
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated 5 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
82c5fea
to
e79a2c9
Compare
📝 Summary
Add permit function calls so that tee signer don't need funding to do the flashtestation transactions. Adds additional flashtestation tests and improves error handling.
CLI Changes
--flashtestations.use-permit
enables the permit contract call and does not attempt to fund the tee key. It would use the builder key and many flags such as --flashtestations.rpc-url, --flashtestations.funding-key will not be needed to support flashtestations✅ I have completed the following steps:
make lint
make test