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: increase supported predicate length in transactions #1033

Merged

Conversation

danielbate
Copy link
Member

@danielbate danielbate commented May 31, 2023

In the TS SDK, we are expecting a u16 integer for predicateLength:

parts.push(new NumberCoder('u16').encode(value.predicateLength));
parts.push(new NumberCoder('u16').encode(value.predicateDataLength));

Therefore encoding/decoding larger predicates will throw an error. We can actually expect a u32 integer for predicate length, as dictated by the fuel spec.

This PR will support u32 int length predicates and support with tests.

@danielbate danielbate added the bug Issue is a bug label May 31, 2023
@danielbate danielbate self-assigned this May 31, 2023
@github-actions
Copy link
Contributor

github-actions bot commented May 31, 2023

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements 84.59% 4496/5315
🟡 Branches 64.44% 647/1004
🟡 Functions 69.3% 727/1049
🟢 Lines 84.8% 4336/5113

Test suite run success

974 tests passing in 172 suites.

Report generated by 🧪jest coverage report action from 1c4fbdf

@danielbate danielbate marked this pull request as ready for review May 31, 2023 14:21
danielbate added 2 commits May 31, 2023 15:39
Copy link
Member

@arboleya arboleya left a comment

Choose a reason for hiding this comment

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

🎯

Copy link
Contributor

@camsjams camsjams left a comment

Choose a reason for hiding this comment

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

Lgtm

@danielbate danielbate enabled auto-merge (squash) May 31, 2023 16:18
@danielbate danielbate merged commit fe312e8 into master May 31, 2023
@danielbate danielbate deleted the db/feat/increase-supported-predicate-length-in-transactions branch May 31, 2023 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants