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

commitment: use Update for domain IO #11445

Merged
merged 8 commits into from
Aug 6, 2024
Merged

commitment: use Update for domain IO #11445

merged 8 commits into from
Aug 6, 2024

Conversation

awskii
Copy link
Member

@awskii awskii commented Aug 1, 2024

Simplifies PatriciaContext interface: return state Update instead of filling the Cell is more general and allows other trie implementation follow that interface without converting their inner representation of Cell/Node/etc.

Slightly reduces code complexity as now Cell has state part (Update) and intrinsic parts (lens and other unexproted fields like apk/spk/downHashedKey).

Finally that allows us as of next step to remove batch of Process* functions and keep just Process(context.Context, updates *Updates, logPrefix string) ([]byte, error). In that case Updates.mode only will decide if need to collect Update during execution or not. In general, we don't really need keep Update close to key because it's already in SharedDomains if it's just a regular exec.

@awskii awskii added this to the 3.0.0-alpha2 milestone Aug 1, 2024
@awskii
Copy link
Member Author

awskii commented Aug 1, 2024

started test on mainnet tip

@yperbasis yperbasis added the imp1 High importance label Aug 2, 2024
@AskAlexSharov AskAlexSharov removed the imp1 High importance label Aug 2, 2024
@awskii awskii enabled auto-merge (squash) August 6, 2024 16:17
@awskii awskii merged commit 2038c79 into main Aug 6, 2024
10 checks passed
@awskii awskii deleted the useUpdateInCell branch August 6, 2024 16:23
somnathb1 pushed a commit that referenced this pull request Aug 16, 2024
Simplifies PatriciaContext interface: return state Update instead of
filling the Cell is more general and allows other trie implementation
follow that interface without converting their inner representation of
Cell/Node/etc.

Slightly reduces code complexity as now Cell has state part (Update) and
intrinsic parts (lens and other unexproted fields like
apk/spk/downHashedKey).

Finally that allows us as of next step to remove batch of `Process*`
functions and keep just `Process(context.Context, updates *Updates,
logPrefix string) ([]byte, error)`. In that case `Updates.mode` only
will decide if need to collect `Update` during execution or not. In
general, we don't really need keep Update close to key because it's
already in `SharedDomains` if it's just a regular exec.
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.

3 participants