Skip to content
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

feat: namespace-aware tx iterator #1014

Merged
merged 14 commits into from
Jan 24, 2024
Merged

feat: namespace-aware tx iterator #1014

merged 14 commits into from
Jan 24, 2024

Conversation

akonring
Copy link
Contributor

@akonring akonring commented Jan 22, 2024

closes #931

@CLAassistant
Copy link

CLAassistant commented Jan 22, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@ggutoski ggutoski left a comment

Choose a reason for hiding this comment

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

Thanks for this! A few notes below.

sequencer/src/block2.rs Outdated Show resolved Hide resolved
sequencer/src/block2.rs Outdated Show resolved Hide resolved
sequencer/src/block2.rs Outdated Show resolved Hide resolved
sequencer/src/block2.rs Outdated Show resolved Hide resolved
sequencer/src/block2.rs Outdated Show resolved Hide resolved
sequencer/src/block2.rs Outdated Show resolved Hide resolved
sequencer/src/block2.rs Outdated Show resolved Hide resolved
sequencer/src/block2.rs Outdated Show resolved Hide resolved
sequencer/src/block2.rs Outdated Show resolved Hide resolved
sequencer/src/block2.rs Outdated Show resolved Hide resolved
@akonring akonring marked this pull request as ready for review January 23, 2024 19:16
@akonring akonring requested review from jbearer and removed request for jbearer January 23, 2024 19:17
}

// returns (ns_id, payload_offset)
// payload_offset is not checked, could be anything
Copy link
Contributor

Choose a reason for hiding this comment

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

What does "not checked" here mean?

Copy link
Contributor

Choose a reason for hiding this comment

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

It means that this function parses whatever's in the namespace table as an offset. So if that data is corrupted then the returned offset is corrupted.

This should never happen now that the namespace table is part of the header, so consensus nodes enforce a well-formed namespace table. But I want this code / docs to be paranoid.

Copy link
Contributor

@ggutoski ggutoski left a comment

Choose a reason for hiding this comment

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

I rebased main and force-pushed new commits to this branch. Need approval from @jbearer and/or @nomaxg .

We are currently pushing to close #1009 , #1011 . Some code from this PR will be used to close these subsequent issues.

Code still needs significant tidying. We already have a few issues posted about this #856 #951 #1012 that will be addressed after we close #1011 . In the meantime, I ask that you be forgiving about code cleanliness.

Flagged a couple notes for @jbearer in comments below.

sequencer/src/block2.rs Show resolved Hide resolved
sequencer/src/block2.rs Outdated Show resolved Hide resolved
@ggutoski ggutoski requested a review from nomaxg January 23, 2024 22:28
@ggutoski ggutoski changed the title Ak/931 feat: namespace-aware tx iterator Jan 23, 2024
Copy link
Member

@jbearer jbearer left a comment

Choose a reason for hiding this comment

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

LGTM

@ggutoski ggutoski enabled auto-merge (squash) January 24, 2024 16:21
@ggutoski ggutoski merged commit aeec911 into main Jan 24, 2024
8 checks passed
@ggutoski ggutoski deleted the ak/931 branch January 24, 2024 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement QueryablePayload::iter for multiple namespaces
6 participants