Skip to content

Conversation

roynalnaruto
Copy link
Collaborator

No description provided.

@roynalnaruto roynalnaruto requested a review from lispc as a code owner August 27, 2025 09:15
@@ -0,0 +1,209 @@
use alloy_primitives::{B256, keccak256};
Copy link
Member

Choose a reason for hiding this comment

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

So we have almost identical code between validium.rs and v7.rs?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, almost identical (for now).

There are a few bound constraints in v7 that are not applicable for validium (like upper bound on number of bytes from witness). Also, future versions (v2) of validium could diverge massively, hence I have preferred creating a new module and types altogether.

@github-actions github-actions bot added crate-chunk-circuit Updates to the guest program chunk-circuit crate-circuits Any update made to the circuits, i.e. commitments reflect a change labels Aug 27, 2025
@github-actions github-actions bot added crate-batch-circuit Updates to the guest program batch-circuit crate-bundle-circuit Updates to the guest grogram bundle-circuit crate-integration Updates to the integration crate labels Aug 27, 2025
// blockhash is unused for scroll domain.
if version.domain == Domain::Scroll {
assert_eq!(self.prev_blockhash, B256::ZERO);
assert_eq!(self.post_blockhash, B256::ZERO);
Copy link
Collaborator

Choose a reason for hiding this comment

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

just populate them? may be useful for future

domain: Domain::Validium,
stf_version: STFVersion::V1,
fork: ForkName::Feynman,
codec: Codec::V9,
Copy link
Collaborator

Choose a reason for hiding this comment

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

so this Codec::V9 enum is something fully inner. We don't put a '0x9' byte at the beginning of DA? (instead we use 65?)

// Conditionally decode depending on the flag set in the envelope.
let payload_bytes = if envelope.is_encoded & 1 == 1 {
vm_zstd::process(&envelope.unpadded_bytes)
.expect("zstd decode should succeed")
Copy link
Collaborator

Choose a reason for hiding this comment

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

haha we should rename this crate later vm_zstd::process to like rust_zstd_decompressor

@lispc
Copy link
Collaborator

lispc commented Aug 27, 2025

the framework seems good. though some details i may revisit later.

@roynalnaruto roynalnaruto merged commit df6c966 into feat/validium Sep 3, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crate-batch-circuit Updates to the guest program batch-circuit crate-bundle-circuit Updates to the guest grogram bundle-circuit crate-chunk-circuit Updates to the guest program chunk-circuit crate-circuits Any update made to the circuits, i.e. commitments reflect a change crate-integration Updates to the integration crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants