Skip to content

Conversation

@guy-starkware
Copy link
Contributor

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Contributor

@sirandreww-starkware sirandreww-starkware left a comment

Choose a reason for hiding this comment

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

@sirandreww-starkware reviewed 1 of 3 files at r1.
Reviewable status: 1 of 3 files reviewed, 1 unresolved discussion (waiting on @guy-starkware)


crates/apollo_l1_provider/src/transaction_manager.rs line 179 at r1 (raw file):

                    );
                }
                record.tx.set(tx, block_timestamp, scrape_timestamp);

You set either way? should there be a check that hashes match?

Copy link
Contributor Author

@guy-starkware guy-starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 1 of 3 files reviewed, 1 unresolved discussion (waiting on @sirandreww-starkware)


crates/apollo_l1_provider/src/transaction_manager.rs line 179 at r1 (raw file):

Previously, sirandreww-starkware (Andrew Luka) wrote…

You set either way? should there be a check that hashes match?

The record is stored by hash. You can't have a duplicated tx if the hash doesn't match (it will be recorded as a new tx).

Copy link
Contributor Author

@guy-starkware guy-starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 1 of 3 files reviewed, 1 unresolved discussion (waiting on @sirandreww-starkware)


crates/apollo_l1_provider/src/transaction_manager.rs line 179 at r1 (raw file):

Previously, guy-starkware wrote…

The record is stored by hash. You can't have a duplicated tx if the hash doesn't match (it will be recorded as a new tx).

The reason we set it even if it exists is that you can get a HashOnly payload from sync, and then get it again from the scraper, which sets it to a Full payload.

I'm adding a situation where it was already a Full payload and we try to set it again, which is a bug. This shouldn't happen but if it does we don't want to accidentally re-put it on the proposable index (the queue we are using to validate or propose).

@guy-starkware guy-starkware force-pushed the guyn/l1provider/improve_add_tx_logic branch from 8f322a9 to 977f627 Compare December 7, 2025 13:19
@guy-starkware guy-starkware force-pushed the guyn/l1provider/l1_block_time_config branch from 45ec5b5 to 46338eb Compare December 7, 2025 13:19
@guy-starkware guy-starkware changed the base branch from guyn/l1provider/l1_block_time_config to graphite-base/10508 December 8, 2025 10:05
Copy link
Contributor

@sirandreww-starkware sirandreww-starkware left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: 1 of 3 files reviewed, all discussions resolved


crates/apollo_l1_provider/src/transaction_manager.rs line 179 at r1 (raw file):

Previously, guy-starkware wrote…

The reason we set it even if it exists is that you can get a HashOnly payload from sync, and then get it again from the scraper, which sets it to a Full payload.

I'm adding a situation where it was already a Full payload and we try to set it again, which is a bug. This shouldn't happen but if it does we don't want to accidentally re-put it on the proposable index (the queue we are using to validate or propose).

I see

@guy-starkware guy-starkware force-pushed the guyn/l1provider/improve_add_tx_logic branch from 977f627 to aaa8741 Compare December 9, 2025 08:45
@guy-starkware guy-starkware changed the base branch from graphite-base/10508 to guyn/l1provider/l1_block_time_config December 9, 2025 08:45
@guy-starkware guy-starkware force-pushed the guyn/l1provider/improve_add_tx_logic branch from aaa8741 to 73c16c9 Compare December 10, 2025 12:23
@guy-starkware guy-starkware force-pushed the guyn/l1provider/l1_block_time_config branch from ea8a958 to 0322762 Compare December 10, 2025 12:23
Copy link
Collaborator

@ShahakShama ShahakShama left a comment

Choose a reason for hiding this comment

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

:lgtm:

@ShahakShama reviewed 1 of 3 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @guy-starkware)


crates/apollo_l1_provider/src/transaction_manager.rs line 168 at r2 (raw file):

        // If exists, return false and do nothing. If not, create the record as a HashOnly payload.
        let is_new_record = self.create_record_if_not_exist(tx_hash);
        // Replace a HashOnly payload with a Full payload. If a full payload already exists, do not

Describe the entire thing in one sentence. then explain why in another sentence
Replacing a HashOnly payload is allowed, but a full payload is forbidden. The reason why is that a double scrape should not happen and may cause the tx to be re-added to the proposable index


crates/apollo_l1_provider/src/transaction_manager.rs line 176 at r2 (raw file):

                    info!(
                        "Transaction {tx_hash} already exists as a HashOnly payload. It was \
                         probably gotten via sync, and is now updated with a Full payload."

the word sync is ambiguous. Try to add more words to describe which sync
consider "via bootstrap from sync" or "via state sync component"

@graphite-app graphite-app bot changed the base branch from guyn/l1provider/l1_block_time_config to graphite-base/10508 December 10, 2025 13:34
Copy link
Contributor Author

@guy-starkware guy-starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @guy-starkware)


crates/apollo_l1_provider/src/transaction_manager.rs line 168 at r2 (raw file):

Previously, ShahakShama wrote…

Describe the entire thing in one sentence. then explain why in another sentence
Replacing a HashOnly payload is allowed, but a full payload is forbidden. The reason why is that a double scrape should not happen and may cause the tx to be re-added to the proposable index

Done.


crates/apollo_l1_provider/src/transaction_manager.rs line 176 at r2 (raw file):

Previously, ShahakShama wrote…

the word sync is ambiguous. Try to add more words to describe which sync
consider "via bootstrap from sync" or "via state sync component"

Done.

@guy-starkware guy-starkware force-pushed the guyn/l1provider/improve_add_tx_logic branch from 73c16c9 to 897dc8e Compare December 10, 2025 13:45
@guy-starkware guy-starkware changed the base branch from graphite-base/10508 to guyn/l1provider/l1_block_time_config December 10, 2025 13:46
Copy link
Contributor Author

@guy-starkware guy-starkware left a comment

Choose a reason for hiding this comment

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

@guy-starkware reviewed 1 of 3 files at r1, 1 of 1 files at r2, 1 of 1 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @guy-starkware)

@guy-starkware guy-starkware changed the base branch from guyn/l1provider/l1_block_time_config to main-v0.14.1 December 10, 2025 15:22
Copy link
Contributor Author

@guy-starkware guy-starkware left a comment

Choose a reason for hiding this comment

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

@guy-starkware reviewed 5 of 5 files at r4, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @guy-starkware)

@guy-starkware guy-starkware added this pull request to the merge queue Dec 10, 2025
Merged via the queue into main-v0.14.1 with commit 6cad50a Dec 10, 2025
28 of 47 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Dec 13, 2025
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.

5 participants