Skip to content

WIP: Deserialized Compliance Unit Struct#190

Draft
agureev wants to merge 5 commits intomainfrom
artem/deserialized-structs
Draft

WIP: Deserialized Compliance Unit Struct#190
agureev wants to merge 5 commits intomainfrom
artem/deserialized-structs

Conversation

@agureev
Copy link
Copy Markdown
Contributor

@agureev agureev commented Jan 13, 2026

Currently the compliance instance field is in a serialized format. This PR makes the field store the instance in a deserialized manner, minimizing dependency on the top-level zkvm package.

AHartNtkn and others added 5 commits January 12, 2026 10:38
- Add sha2 dependency (optional)
- Add 'solana' feature that enables SHA-256 instead of Keccak-256
- Conditionally select hash function based on feature flag
- Default behavior (Keccak-256) unchanged for EVM compatibility

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Introduces and EVM feature flag with an optional sha3 dependency

Makes it a default for testing
Now operations that bar recovery IDs above 1 or necessitate
translation to 27/28 instead  of usual 1, 2 for IDs under a specified flag
Copy link
Copy Markdown
Collaborator

@XuyangSong XuyangSong left a comment

Choose a reason for hiding this comment

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

thank you for the work
the changes make sense to me

let cu_instances: Vec<Vec<u8>> = cus.iter().map(|cu| cu.instance.clone()).collect();
let cu_instances: Vec<Vec<u8>> = cus
.iter()
.map(|cu| cu.instance.to_journal().unwrap())
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

was there a particular reason you took out the error handler here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not in particular, just to keep stable the current core types

But if you like the change, I can also handle errors properly

Comment thread arm/src/delta_proof.rs
Comment on lines +101 to +103
#[cfg(not(feature = "evm"))]
let recid_byte = self.recid.to_byte();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Since you've already added the solana feature, would "solana" be clearer than "not evm"?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I was thinking about this and this is basically future-oriented. We may have more chains with more quirks and this one particularly has to be avoided for the evm and not other chains as the recovery ID trick seems to be very EVM specific. So I thought a not would be more suitable here

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

makes sense

Comment thread arm/src/delta_proof.rs
Comment on lines +113 to +114
#[cfg(not(feature = "evm"))]
let recid_byte = bytes[64];
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

ditto

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ditto

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

3 participants