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: [ADR-070] Unordered Transactions (1/2) #18641

Merged
merged 27 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
22daac7
init commit
alexanderbez Dec 6, 2023
bd17641
updates
alexanderbez Dec 6, 2023
990dd48
updates
alexanderbez Dec 6, 2023
60a2d4a
updates
alexanderbez Dec 6, 2023
03597f3
updates
alexanderbez Dec 6, 2023
1e2254c
updates
alexanderbez Dec 6, 2023
bc35655
updates
alexanderbez Dec 6, 2023
7a421d4
updates
alexanderbez Dec 9, 2023
38f1ec4
updates
alexanderbez Dec 9, 2023
c573943
Merge branch 'main' into bez/feature/unordered-txs
alexanderbez Dec 9, 2023
cded15e
updates
alexanderbez Dec 11, 2023
dbb80dd
updates
alexanderbez Dec 11, 2023
86ba3fa
Merge branch 'main' into bez/feature/unordered-txs
alexanderbez Dec 11, 2023
f88f383
updates
alexanderbez Dec 11, 2023
d265a13
Merge branch 'main' into bez/feature/unordered-txs
alexanderbez Dec 12, 2023
deb44e1
updates
alexanderbez Dec 12, 2023
fb216de
updates
alexanderbez Dec 12, 2023
6194fdb
lint++
alexanderbez Dec 12, 2023
6c5f722
updates
alexanderbez Dec 13, 2023
d1a59f0
Merge branch 'main' into bez/feature/unordered-txs
alexanderbez Dec 13, 2023
975e224
Merge branch 'main' into bez/feature/unordered-txs
alexanderbez Dec 18, 2023
453e270
feat: [ADR-070] Unordered Transactions (2/2) (#18739)
alexanderbez Jan 3, 2024
44b960b
Merge branch 'main' into bez/feature/unordered-txs
alexanderbez Jan 3, 2024
be3cad7
fix TestUnknownFields by moving some_new_field to tag 5
facundomedica Jan 4, 2024
11cddfe
add comment
facundomedica Jan 4, 2024
7017fdd
Merge branch 'main' into bez/feature/unordered-txs
alexanderbez Jan 4, 2024
4f1c992
cl++
alexanderbez Jan 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion testutil/testdata/testpb/unknonwnproto.proto
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ message TestUpdatedTxBody {
repeated google.protobuf.Any messages = 1;
string memo = 2;
int64 timeout_height = 3;
uint64 some_new_field = 4;
uint64 some_new_field = 5;
Copy link
Contributor

Choose a reason for hiding this comment

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

Changing the field number of an existing field can break backward compatibility as serialized data will not be correctly understood by the new schema. Ensure that this change is intentional and that all consumers of this protobuf are updated accordingly.

Copy link
Member

Choose a reason for hiding this comment

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

@facundomedica why does this fix the issue?

Copy link
Member

Choose a reason for hiding this comment

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

It's because a new field was added with tag 4 to TxBody which in TestUpdatedTxBody is some_new_field.

From what I understand, the rejecting of unknown fields happen by checking the tag numbers, so TxBody didn't have a tag 4 but because TestUpdatedTxBody did have it it was erroring (as expected). Now a field with tag 4 is expected, so to trigger the error of an unexpected field we have to modify the proto message used for this test.

Copy link
Member

Choose a reason for hiding this comment

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

good find!! could you add a comment to not confuse future readers

Copy link
Member

Choose a reason for hiding this comment

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

added a small comment on the test case 👌

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah this was such a footgun -- never would've found out. Thanks!

string some_new_field_non_critical_field = 1050;
repeated google.protobuf.Any extension_options = 1023;
repeated google.protobuf.Any non_critical_extension_options = 2047;
Expand Down
8 changes: 4 additions & 4 deletions testutil/testdata/testpb/unknonwnproto.pulsar.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions testutil/testdata/unknonwnproto.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading