-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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!: new encoding scheme for logs and encode RawSlice
as u8
#1673
Conversation
…/feat/new-log-encoding
…/feat/new-log-encoding
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Coverage Report:
Changed Files:
|
Oh shoot, I didn't have the chance to review it, and it's merged already. 😅 I trust the reviewers. 🤞 |
Sorry @arboleya, I enabled auto merge because of the 2 SDK reviews, but also on the basis that a FE review would be the third reviewer. However it doesn't seem to have blocked? It has merged with 2 failing steps (both the FE review steps).
|
Any concerns can also be picked up in #1672 |
Yeah, it shouldn't be possible to merge this one without the review from someone in the FE team 🤔 . |
@danielbate Perhaps we should avoid using auto-merge in considerably big PRs to gather the maximum reviews possible. @Torres-ssf Yes, I will take a look at it later on. Maybe I need to change something in the repo settings, but I'm unsure. |
I believe in order for that to happen the 'FE conditional review' check should be required if it is enabled. |
@Dhaiwat10 I believe that was the problem. The check didn't pass but the PR got merged anyway. |
@Torres-ssf Yes. That's what I'll double check in the repo settings. |
Closes #1671
This PR adds support for sway's experimental encoding in logs. This is demonstrated via a new test suite, which is a subset of
fuel-gauge
, which builds anotherforc
workspace using the experimental flag (--experimental-new-encoding
).There are opportunities for refactoring here, however that shall be detailed and implemented as part of #1672 given this PR is already over 2K lines.
Breaking Change
RawSlice
data encoded as unpaddedu8
, also implemented by the RS SDK. Currently we are encoding it asu64
and doing additional arithmetic onencode
anddecode
to compute the byte length. ARawSlice
indicates a slice of bytes so we should treat it as so.This poses a problem either on
v0
orv1
, one will have to compromise to the other asv1
assumes the data asu8
so we'd have to do additional arithmetic to get the correctlen
, rather than decoding it from the byte data. I have opted to introduce the breaking change inv0
as it brings us closer tov1
.Type Support
u8
u16
u32
u64
b256
b512
str[n]
)struct String
)Further changes
ABIEncode
implementations fromsway-std-lib
v1
codersdecode
validation #1426Blockers
0.49.2
upgrade - chore: upgradingforc
to0.49.2
#1707