feat(prs-556): integrate MetadataTrustPolicy into Ethereum converter - #453
Draft
pepe-anchor wants to merge 1 commit into
Draft
feat(prs-556): integrate MetadataTrustPolicy into Ethereum converter#453pepe-anchor wants to merge 1 commit into
pepe-anchor wants to merge 1 commit into
Conversation
Wire the deploy-time policy through try_extract_from_chain_metadata. Remove AbiExtraction wrapper; function now returns Option<AbiRegistry>.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why am I making this PR?
The Ethereum converter needs to honour the deploy-time MetadataTrustPolicy: drop unsigned caller ABIs under require-signed, accept them under accept-unsigned while still verifying integrity of present signatures.
What am I changing?
Thread the policy through
try_extract_from_chain_metadata. Under AcceptUnsigned, entries with no signature are accepted and present signatures are verified for integrity (signer identity not checked). Under RequireAllowlistedSigner, unsigned entries are dropped and signatures must match an allowed key. Remove theAbiExtractionwrapper struct; the function now returnsOption<AbiRegistry>. Update CLI plugin to construct the require-signed posture.This commit also introduces
abi_metadata::signer_allowlist_from_hex, which the parser_app commit on top of this one consumes. That dependency is why this PR sits below parser_app in the stack rather than above it, which is how the original split had it.What is the Linear ticket?
PRS-556
What are the rollback steps?
Revert the commit.
Is this change backwards compatible?
The public API changes (
AbiExtractionremoved,try_extract_from_chain_metadatareturn type narrowed). Callers are internal to the workspace.Does this require cross-team/service coordination?
No.
How do I know it works as designed? Which tests exercise this code?
Existing converter tests updated for the new signature. Test helpers (
require_signed_converter) constructed from cfg(test) dev keys.Verified at this commit:
cargo clippy --all-targets -- -D warningsclean.