Skip to content

Custom da legacy #353

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

Draft
wants to merge 2 commits into
base: v2-main
Choose a base branch
from
Draft

Custom da legacy #353

wants to merge 2 commits into from

Conversation

Tristan-Wilson
Copy link
Member

No description provided.

Implement CustomDA preimage type support in OneStepProverHostIo:
- Add VALIDATE_PREIMAGE opcode (0x8019) to Instructions.sol
- Implement executeValidatePreimage for CustomDA preimages
- Extend executeReadPreImage to handle CustomDA preimage type
- Create ICustomDAValidator interface for DA proof validation
@cla-bot cla-bot bot added the s label Jun 3, 2025
// Custom validator contract proof
// Format: [validatorAddress (20 bytes)][proof data]
require(proof.length >= proofOffset + 20, "INVALID_CUSTOMDA_PROOF");
address validatorAddress = address(bytes20(proof[proofOffset:proofOffset+20]));
Copy link
Contributor

Choose a reason for hiding this comment

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

you cannot read validatorAddress from the proof.
It must be a variable of a contract that only chain owner can set (during contract initialization and/or upgraade)


bool valid = false;

if (proofType == 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we need to support a simple proof type. external DA contract should be able to deal with anything that could come here

@@ -236,6 +307,52 @@ contract OneStepProverHostIo is IOneStepProver {

extracted = kzgProof[64:96];
}
} else if (inst.argumentData == 3) {
Copy link
Contributor

Choose a reason for hiding this comment

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

same comments as validate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants