Skip to content
This repository has been archived by the owner on Dec 26, 2024. It is now read-only.

Commit

Permalink
feat(common): calculate block body commitments (#1203)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoavGrs authored Sep 28, 2023
1 parent f711cec commit 56f4eff
Show file tree
Hide file tree
Showing 16 changed files with 171 additions and 103 deletions.
54 changes: 21 additions & 33 deletions Cargo.lock

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

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,6 @@ tracing-subscriber = "0.3.16"
tower = "0.4"
url = "2.2.2"
validator = "0.12"

[patch.crates-io]
starknet_api = { git = "https://github.com/starkware-libs/starknet-api", rev = "1526a40921762641a39872643c53305c3e959ab2" }
8 changes: 7 additions & 1 deletion crates/papyrus_common/resources/block_hash.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"gas_price": "0x41ab3fdb5",
"state_root": "0x6c4171ece740d153a40106b18545f147d62c513a9cb67eb7b06f83a2508b3a4",
"sequencer": "0x1176a1bd84444c89232ec27754698e5d2e7e1a7f1539f12027f28b23ec9f3d8",
"timestamp": 1693484880
"timestamp": 1693484880,
"n_transactions": 332,
"n_events": 1561
},
"body": {
"transactions": [
Expand Down Expand Up @@ -31910,5 +31912,9 @@
"0x3d441f44150eb5cdc78f15403c9b9e30f967897112f896da00c84bffe3b26c0",
"0x600f222f797801af5de701de7e240790c6b0bac312ec2d6c3f298381299fe38"
]
},
"commitments": {
"transactions_commitment": "0x0",
"events_commitment": "0x0"
}
}
10 changes: 8 additions & 2 deletions crates/papyrus_common/resources/deprecated_block_hash_v0.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"gas_price": "0x0",
"state_root": "0x3810b7805897aff09b3bba1d41fe2eb21a3853d98553794928684d1089f25cf",
"sequencer": "0x0",
"timestamp": 1643150436
"timestamp": 1643150436,
"n_transactions": 31,
"n_events": 0
},
"body": {
"transactions": [
Expand Down Expand Up @@ -777,5 +779,9 @@
"0x23dea100ac41500d28bb9426a08385c0af0f4546ff9abe8187c9446c5c23539",
"0x2cf9ed8ec288e35a2939ffc60be5edef318251a74af6f8ed85fb44aa2ec218f"
]
},
"commitments": {
"transactions_commitment": "0x0",
"events_commitment": "0x0"
}
}
}
10 changes: 8 additions & 2 deletions crates/papyrus_common/resources/deprecated_block_hash_v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"gas_price": "0x0",
"state_root": "0x46a99896768700c5848dbc53a6048e554884ea6b0e881ba2f9a3d4e3096feb6",
"sequencer": "0x0",
"timestamp": 1643463800
"timestamp": 1643463800,
"n_transactions": 44,
"n_events": 1
},
"body": {
"transactions": [
Expand Down Expand Up @@ -1259,5 +1261,9 @@
"0x6b0559b7931b5e47492c6a9df64559fb34b4117c7e26a5e12875fa49f9eded",
"0x405d74766b46c3509843514f59a2b0fddd9c3ab193e0accd1f3168be36a2f0f"
]
},
"commitments": {
"transactions_commitment": "0x0",
"events_commitment": "0x0"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"gas_price": "0x0",
"state_root": "0x5a5f26ce761d20ac9dfdc3a009b6adeaabac74b97de38c7633af690efd9b175",
"sequencer": "0x0",
"timestamp": 1643609156
"timestamp": 1643609156,
"n_transactions": 111,
"n_events": 0
},
"body": {
"transactions": [
Expand Down Expand Up @@ -3169,5 +3171,9 @@
"0x912170b6c5b0454e66fb8dab8da03f8cd9a32acfe9df6690d05dcdca19e52",
"0x4822394e8699126997fbdc7d4427926e01876e19970fadbfa0307653ec53e47"
]
},
"commitments": {
"transactions_commitment": "0x0",
"events_commitment": "0x0"
}
}
}
10 changes: 8 additions & 2 deletions crates/papyrus_common/resources/deprecated_block_hash_v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"gas_price": "0x38ae2e27b",
"state_root": "0x67d06ffd8b41a4a4d4bbe0b6f991760e365aa499add0180b7ee52c0d6b67843",
"sequencer": "0x0",
"timestamp": 1652680274
"timestamp": 1652680274,
"n_transactions": 171,
"n_events": 36
},
"body": {
"transactions": [
Expand Down Expand Up @@ -4377,5 +4379,9 @@
"0x445cbfe77407c2092e2906b1e0319dac9cde3a27d7b4b1108cbeb8ba5bfd4a",
"0x521761e9ed44deb91b85e46f2f93b35fca588784424fecda7d44d14b70a2939"
]
},
"commitments": {
"transactions_commitment": "0x0",
"events_commitment": "0x0"
}
}
}
Loading

0 comments on commit 56f4eff

Please sign in to comment.