Skip to content

Conversation

@avivg-starkware
Copy link
Contributor

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Contributor Author

avivg-starkware commented Jan 25, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@avivg-starkware avivg-starkware marked this pull request as ready for review January 25, 2026 14:48
@avivg-starkware avivg-starkware force-pushed the avivg/apollo_storage/invoke_backwad_compitability branch 4 times, most recently from 65b9223 to ac5b92b Compare January 25, 2026 15:28
@avivg-starkware
Copy link
Contributor Author

crates/apollo_storage/src/serialization/serializers.rs line 1282 at r1 (raw file):

    // NOTE: InvokeTransactionV3 has a custom StorageSerde impl below for backward compatibility
    // (handling transactions stored before the proof_facts field was added)

Not sure whether it's better with or without that here

Code quote:

    // NOTE: InvokeTransactionV3 has a custom StorageSerde impl below for backward compatibility
    // (handling transactions stored before the proof_facts field was added)

@avivg-starkware
Copy link
Contributor Author

crates/apollo_storage/src/serialization/serializers.rs line 1373 at r2 (raw file):

    }

    fn deserialize_from(bytes: &mut impl std::io::Read) -> Option<Self> {

@ShahakShama - this PR is only relevant if we need to read previously saved txs. Do you know if we ever try reading those? If not, perhaps we don't need this PR

@avivg-starkware avivg-starkware changed the base branch from main to graphite-base/11952 January 28, 2026 11:16
@avivg-starkware avivg-starkware force-pushed the avivg/apollo_storage/invoke_backwad_compitability branch from ac5b92b to f132973 Compare January 28, 2026 11:16
@avivg-starkware avivg-starkware changed the base branch from graphite-base/11952 to main-v0.14.2 January 28, 2026 11:16
@avivg-starkware avivg-starkware force-pushed the avivg/apollo_storage/invoke_backwad_compitability branch from f132973 to 193966d Compare January 29, 2026 09:34
Copy link
Collaborator

@dan-starkware dan-starkware left a comment

Choose a reason for hiding this comment

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

@dan-starkware made 3 comments.
Reviewable status: 0 of 2 files reviewed, 2 unresolved discussions (waiting on @noaov1 and @ShahakShama).


a discussion (no related file):
Consider fixing typo in commit message (compitability)


crates/apollo_storage/src/serialization/serializers.rs line 1340 at r2 (raw file):

// NOTE: This is a temporary migration shim. Once all nodes have re-synced (i.e., no stored
// transactions exist in the old format), remove this impl and move InvokeTransactionV3 back
// to `auto_storage_serde_conditionally_compressed!`.

Add corresponding TODO

Code quote:

// NOTE: This is a temporary migration shim. Once all nodes have re-synced (i.e., no stored
// transactions exist in the old format), remove this impl and move InvokeTransactionV3 back
// to `auto_storage_serde_conditionally_compressed!`.

crates/apollo_storage/src/serialization/serializers.rs line 1394 at r2 (raw file):

        // Backward compatibility: proof_facts may not exist in old transactions.
        // If there's no more data, default to empty ProofFacts.
        let proof_facts = ProofFacts::deserialize_from(data).unwrap_or_default();

This will silently default to empty ProofFacts if deserialization fails for ANY reason, including corrupted data.
In general, a safer approach would be to only default on empty data (legacy format) and propagate actual errors.
For a "temporary migration shim" I think unwrap_or_default() approach is pragmatic and fine for this case.

@avivg-starkware avivg-starkware force-pushed the avivg/apollo_storage/invoke_backwad_compitability branch from 193966d to 1e65643 Compare January 29, 2026 10:49
Copy link
Contributor Author

@avivg-starkware avivg-starkware left a comment

Choose a reason for hiding this comment

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

@avivg-starkware made 2 comments.
Reviewable status: 0 of 2 files reviewed, 2 unresolved discussions (waiting on @noaov1 and @ShahakShama).


crates/apollo_storage/src/serialization/serializers.rs line 1340 at r2 (raw file):

Previously, dan-starkware wrote…

Add corresponding TODO

Added


crates/apollo_storage/src/serialization/serializers.rs line 1394 at r2 (raw file):

Previously, dan-starkware wrote…

This will silently default to empty ProofFacts if deserialization fails for ANY reason, including corrupted data.
In general, a safer approach would be to only default on empty data (legacy format) and propagate actual errors.
For a "temporary migration shim" I think unwrap_or_default() approach is pragmatic and fine for this case.

Thanks! I updated this so we only default when no data remains, allowing other deserialization errors to be surfaced.

@avivg-starkware avivg-starkware force-pushed the avivg/apollo_storage/invoke_backwad_compitability branch from 1e65643 to 8abeefb Compare February 1, 2026 10:03
Copy link
Contributor Author

@avivg-starkware avivg-starkware left a comment

Choose a reason for hiding this comment

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

@avivg-starkware resolved 1 discussion.
Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @noaov1 and @ShahakShama).

Copy link
Collaborator

@noaov1 noaov1 left a comment

Choose a reason for hiding this comment

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

@noaov1 reviewed 2 files and all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @ShahakShama).

Copy link
Contributor Author

@avivg-starkware avivg-starkware left a comment

Choose a reason for hiding this comment

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

@avivg-starkware resolved 1 discussion.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @ShahakShama).

@avivg-starkware avivg-starkware added this pull request to the merge queue Feb 1, 2026
Merged via the queue into main-v0.14.2 with commit e2c7e60 Feb 1, 2026
20 of 22 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Feb 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants