-
Notifications
You must be signed in to change notification settings - Fork 104
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
refactor(core): apply numerated to pages #3861
Conversation
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.
So huge refactoring
But in the end most parts of the code looks much better. GJ!
I guess it won't be excess to check this PR on validators so we're 100% sure that no compatibility broken and nothing is differ from current impl |
@ark0f please review |
Testnet and Mainnet was successfully full synced |
Fixes #3830
Related PR: #3791
Make pages refactoring:
gear-core
andgear-lazy-pages
to increase safety.Numerated
implementation for gear and wasm pages ingear-code
andgear-lazy-pages
.WasmPage
andGearPage
are just type names overPage<SIZE>
.PagesAmount<SIZE>
, which should be considered as possible wasm or gear pages amount. In comparisonPagesAmount<SIZE>
max value is bigger thanPage<SIZE>
max value, because indexes amount is always bigger than max possible index, if indexes start from0
.Apply
IntervalsTree
forgear-lazy-pages
in order to simplify work with sets of pages and show how to work with tree.NOTE:
IntervalsTree
is NOT applied togear-core
in order to split big changes in code in one PR: migration, benchmarks changes and changes in runtime code.