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

Deduplicate contract data bumps #903

Closed
dmkozh opened this issue Jun 29, 2023 · 1 comment
Closed

Deduplicate contract data bumps #903

dmkozh opened this issue Jun 29, 2023 · 1 comment
Assignees

Comments

@dmkozh
Copy link
Contributor

dmkozh commented Jun 29, 2023

Currently we just accumulate all the contract data bumps in a vec and apply them one-by-one in Core. This may cause fees to be double-charged and bumps to be overridden. Instead, we should deduplicate bumps by key and only keep the max value.

This could be done either in the host or in core. Host is preferable as it ensures consistent behavior between core and preflight.

@dmkozh dmkozh self-assigned this Jul 3, 2023
@dmkozh
Copy link
Contributor Author

dmkozh commented Jul 17, 2023

There are some inconsistencies with how bump duration is computed in core and in host; I'll experiment with moving this logic completely to the host side to avoid such inconsistencies.

@dmkozh dmkozh closed this as completed Aug 1, 2023
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

No branches or pull requests

1 participant