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(store): prevent onchain state and indexer state from diverging #1581

Merged
merged 38 commits into from
Sep 23, 2023
Merged
Changes from 7 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
e5666fd
add overload for static data location with a single key
alvrs Sep 22, 2023
2b913f4
optimize get field layout
alvrs Sep 22, 2023
def3f89
load field layout from storage
alvrs Sep 22, 2023
31fe746
try emitting event instead of loading from storage for comparison
alvrs Sep 22, 2023
a86497d
Revert "try emitting event instead of loading from storage for compar…
alvrs Sep 22, 2023
b09468d
remove field layout from deleteRecord signature
alvrs Sep 22, 2023
34f8d29
remove field layout from setRecord
alvrs Sep 22, 2023
51692ad
fix world methods
alvrs Sep 23, 2023
be383d6
fix modules and gas report
alvrs Sep 23, 2023
2282499
add internal StoreCore methods that allow passing fieldLayout in
alvrs Sep 23, 2023
4f7831c
use internal StoreCore methods in tablegen's internal methods
alvrs Sep 23, 2023
1cf018f
remove unnecessary validation
alvrs Sep 23, 2023
6046fb0
remove deleteCount from SpliceStaticData
alvrs Sep 23, 2023
9729f67
integrate new SpliceStaticData event
alvrs Sep 23, 2023
e452215
reuse numStaticFields
alvrs Sep 23, 2023
004fe9c
actually delete data in deleteRecord
alvrs Sep 23, 2023
e818707
add more meaningful gas report for deleting on cold slot
alvrs Sep 23, 2023
b703216
add longer dynamic field for test purposes
alvrs Sep 23, 2023
10fbec7
verify out of bounds in getFieldSlice
alvrs Sep 23, 2023
74987e1
revert if data out of bounds is accessed in dynamic field
alvrs Sep 23, 2023
05ac89d
before refacor of all usages
alvrs Sep 23, 2023
2b84cf6
refactor except tests
alvrs Sep 23, 2023
5ffbbd7
refactor tests and gas-report
alvrs Sep 23, 2023
efcec63
expose methods to explicitly set static or dynamic fields
alvrs Sep 23, 2023
57b8cd5
use setStaticField or setDynamicField in tablegen
alvrs Sep 23, 2023
a503e72
add overloads for getRecord, getField, getFieldLength and setField th…
alvrs Sep 23, 2023
5df9270
use getDynamicFieldLength in codegen
alvrs Sep 23, 2023
8a05518
regenerate artifacts
alvrs Sep 23, 2023
c12617c
fix e2e
alvrs Sep 23, 2023
9b22c74
regenerate test data
alvrs Sep 23, 2023
fd361df
fix type error in dev tools
alvrs Sep 23, 2023
e28b0a0
Create wicked-squids-do.md
alvrs Sep 23, 2023
c79eec2
expect revert when accessing out of bound
alvrs Sep 23, 2023
5a29de7
remove updateInField
alvrs Sep 23, 2023
d9fdbf9
Update wicked-squids-do.md
alvrs Sep 23, 2023
05eb31b
update gas report
alvrs Sep 23, 2023
1d3adb8
prettier
alvrs Sep 23, 2023
7893115
replace custom function with size
alvrs Sep 23, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions e2e/packages/contracts/src/codegen/tables/Multi.sol

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions e2e/packages/contracts/src/codegen/tables/Number.sol

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions e2e/packages/contracts/src/codegen/tables/NumberList.sol

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions e2e/packages/contracts/src/codegen/tables/Vector.sol

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions packages/cli/contracts/src/codegen/tables/Dynamics1.sol

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading