Commit 124f57d
authored
fault_proving(merklized_registry): add merklized registry tables (#2719)
## Linked Issues/PRs
<!-- List of related issues/PRs -->
part 1/4 of #2568
## Description
<!-- List of detailed changes -->
Implementation of various V2 temporal registry tables with Merklized
encoding.
New modules and features for fault-proofing:
*
[`crates/fuel-core/src/graphql_api/storage/da_compression.rs`](diffhunk://#diff-950254edead884ff443b7cc612f20d04acba8e37d8e6decab435348f84d0c51dR38-R40):
Added a new module `v2` under the `da_compression` directory to support
fault-proofing.
*
[`crates/fuel-core/src/graphql_api/storage/da_compression/v2.rs`](diffhunk://#diff-9fb44668f23048acd6709f3532aab5afbdf1297855a03d3bd258b26cf9e9c06aR1-R11):
Introduced new modules for `address`, `asset_id`, `contract_id`,
`predicate_code`, and `script_code` to handle fault-proofing.
Updates to `Column` enum:
*
[`crates/fuel-core/src/graphql_api/storage.rs`](diffhunk://#diff-f40129b7382c84ff5de9ccbc254350dbdb9cd62c5e23e0f653cdb49d32f2e5e7R126-R160):
Added new entries to the `Column` enum to support the new data
compression types for fault-proofing.
Implementation of V2 tables with Merklized encoding:
*
[`crates/fuel-core/src/graphql_api/storage/da_compression/v2/address.rs`](diffhunk://#diff-86681ac54c3c34d2cc3c942db5d24cc5002f2d439ed94e3a784a19dd3d259a57R1-R119):
Implemented `DaCompressionTemporalRegistryAddressV2` and related
structures with Merklized encoding.
*
[`crates/fuel-core/src/graphql_api/storage/da_compression/v2/asset_id.rs`](diffhunk://#diff-14903aaebdaf9e608a2f2c1fb245001f44f54d09c75c5609cebe0133dbc42efcR1-R117):
Implemented `DaCompressionTemporalRegistryAssetIdV2` and related
structures with Merklized encoding.
*
[`crates/fuel-core/src/graphql_api/storage/da_compression/v2/contract_id.rs`](diffhunk://#diff-81f055d34308e9e2b9f0dacc8806ca34068e5c4b4e9d1991c86f898a0a80b254R1-R118):
Implemented `DaCompressionTemporalRegistryContractIdV2` and related
structures with Merklized encoding.
*
[`crates/fuel-core/src/graphql_api/storage/da_compression/v2/predicate_code.rs`](diffhunk://#diff-93ccf013d8d2c5d19d7a29ce71e5043249228c48409477290bf753badf25377dR1-R116):
Implemented `DaCompressionTemporalRegistryPredicateCodeV2` and related
structures with Merklized encoding.
*
[`crates/fuel-core/src/graphql_api/storage/da_compression/v2/script_code.rs`](diffhunk://#diff-e08f9a8999be7e426ce3ac5688d987be33883998d960073a976dd7248184d29dR1-R118):
Implemented `DaCompressionTemporalRegistryScriptCodeV2` and related
structures with Merklized encoding.
Other changes:
*
[`crates/fuel-core/Cargo.toml`](diffhunk://#diff-7fc200bcb8e651840f8692da4101cfcdba429acc82847ed81d1d0ed63e0a5bd2R131-R132):
Added new fault-proofing dependencies for `fuel-core-importer` and
`fuel-core-poa`.
*
[`crates/storage/src/blueprint/merklized.rs`](diffhunk://#diff-0173b542fbd232931eb6bbbfabbaf4c10ad64b4fb96c76483ac9973607ab0f59L437-R437):
Updated the seed value in `basic_merklelized_storage_tests` macro for
consistency in tests.
[[1]](diffhunk://#diff-0173b542fbd232931eb6bbbfabbaf4c10ad64b4fb96c76483ac9973607ab0f59L437-R437)
[[2]](diffhunk://#diff-0173b542fbd232931eb6bbbfabbaf4c10ad64b4fb96c76483ac9973607ab0f59L480-R480)
## Checklist
- [ ] Breaking changes are clearly marked as such in the PR description
and changelog
- [ ] New behavior is reflected in tests
- [ ] [The specification](https://github.com/FuelLabs/fuel-specs/)
matches the implemented behavior (link update PR if changes are needed)
### Before requesting review
- [ ] I have reviewed the code myself
- [ ] I have created follow-up issues caused by this PR and linked them
here
### After merging, notify other teams
[Add or remove entries as needed]
- [ ] [Rust SDK](https://github.com/FuelLabs/fuels-rs/)
- [ ] [Sway compiler](https://github.com/FuelLabs/sway/)
- [ ] [Platform
documentation](https://github.com/FuelLabs/devrel-requests/issues/new?assignees=&labels=new+request&projects=&template=NEW-REQUEST.yml&title=%5BRequest%5D%3A+)
(for out-of-organization contributors, the person merging the PR will do
this)
- [ ] Someone else?1 parent 5f1378e commit 124f57d
File tree
15 files changed
+1000
-8
lines changed- .changes/added
- crates
- fuel-core
- src/graphql_api
- storage
- da_compression
- v2
- storage/src/blueprint
15 files changed
+1000
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
131 | 133 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
126 | 179 | | |
127 | 180 | | |
128 | 181 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
38 | 41 | | |
39 | 42 | | |
40 | 43 | | |
| |||
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| |||
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
Lines changed: 119 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
Lines changed: 117 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
0 commit comments