Skip to content

Commit

Permalink
Add missing input files
Browse files Browse the repository at this point in the history
  • Loading branch information
codyx committed Jan 29, 2025
1 parent b0fba6e commit 7965d98
Show file tree
Hide file tree
Showing 3 changed files with 112 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ mod tests {
#[tokio::test(flavor = "multi_thread", worker_threads = 1)]
async fn test_fetch_proofs_endpoint() {
let app = build_test_app();
let input = serde_json::from_str::<SyscallHandler>(&std::fs::read_to_string("../../hdp_keys.json").unwrap()).unwrap();
let input = serde_json::from_str::<SyscallHandler>(&std::fs::read_to_string("tests/input_hdp_keys.json").unwrap()).unwrap();

let response = app
.oneshot(
Expand Down Expand Up @@ -169,7 +169,7 @@ mod tests {
"layout": "starknet_with_keccak",
"input": HDPInput {
chain_proofs: serde_json::from_str::<Vec<ChainProofs>>(
&std::fs::read_to_string("../../hdp_proofs.json").unwrap()
&std::fs::read_to_string("tests/input_hdp_proofs.json").unwrap()
).unwrap(),
params: sub_input.params,
compiled_class: sub_input.compiled_class,
Expand Down Expand Up @@ -217,7 +217,7 @@ mod tests {
assert_eq!(dry_run_response.status(), StatusCode::OK);

// 2. Then fetch proofs
let fetch_input = serde_json::from_str::<SyscallHandler>(&std::fs::read_to_string("../../hdp_keys.json").unwrap()).unwrap();
let fetch_input = serde_json::from_str::<SyscallHandler>(&std::fs::read_to_string("tests/input_hdp_keys.json").unwrap()).unwrap();
let fetch_response = app
.clone()
.oneshot(
Expand All @@ -238,7 +238,7 @@ mod tests {
"layout": "starknet_with_keccak",
"input": HDPInput {
chain_proofs: serde_json::from_str::<Vec<ChainProofs>>(
&std::fs::read_to_string("../../hdp_proofs.json").unwrap()
&std::fs::read_to_string("tests/input_hdp_proofs.json").unwrap()
).unwrap(),
params: sub_input.params,
compiled_class: sub_input.compiled_class,
Expand Down
1 change: 1 addition & 0 deletions crates/server/tests/input_hdp_keys.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"call_contract_handler":{"evm_call_contract_handler":{"key_set":[{"storage":{"chain_id":11155111,"block_number":6000000,"address":"0x75cec1db9dceb703200eaa6595f66885c962b920","storage_slot":"0x0000000000000000000000000000000000000000000000000000000000000001"}}]},"starknet_call_contract_handler":{"key_set":[]}}}
107 changes: 107 additions & 0 deletions crates/server/tests/input_hdp_proofs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
[
{
"EthereumSepolia": {
"headers_with_mmr": [
{
"headers": [
{
"rlp": "0xf90266a021e65fc6e962d4c8d0a0fb7a9e3d3f715cfce27b38bbb87ab1be0318c5a6e312a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347949b7e335088762ad8061c04d08c37902abc8acb87a02378fe6355340aec33ac0a401efcd9b4817271e87d530571fd93beefe826af78a0fdfa9ffadb4cf0f880207c17a0aaf854e24369f85f9dcf8a53c2b7f93cdd4309a0a1221588b2b63fdc80106f1e11ccbe9638f73a78b0e0a6f606e6c07fc0954733b901009a0c824cc960d78d00900ae3c09838e2015df1983849c0582d2041fa467c0d9030c81480616ab2465c534505ce746e88a6d41856ea29042052549624a934318740ed62e36d3448024033404b21e969a41f825612b29ee5897338b19335c4822704e600582b1a0960024c3003c8023ea2040889d1402e020a143e201048842a0a1762041412e49d01a641924a61214415491041006984805e931d0c1c07e48e80030821dad4c64650696c001020ad249044c0fa018542f0562da22222001490848946d56aba70caf09e3124cfcc731c1624b4936821bc0060d90d994d87c1e2599d310875d50168502a227003e80efb45c06173095932222ad04e1a800958f04e80835b8d808401c9c380840106170a846657115899d883010d0b846765746888676f312e32312e36856c696e7578a0525eb521f3b6c59b369135daae3b715a989953cfee51aaee0e838f7c56a8c95988000000000000000085079820dc63a082df261ae6c5dd8fd44465878b72d1e90106458b34f268645c539b3b74d03db0830a00008404a20000a0064381775eee41b26bd2d1dfff8310d6b9c3712ee04fcda134100d7f8ce1a0d8",
"proof": {
"leaf_idx": 2576846,
"mmr_path": [
"0x17613044d8ce821c40110b93b236b9c5bd819b8d35a4a5e54d2f2487ed2b684",
"0x62b42b39a10ac8ee9aa86a567b1cfa7ea2ec936496b7470867c07ce818f1afe",
"0x63cfcec9d94fd75983e89204a0970185739dad03c288b25cffc73d239edbbf5",
"0x7bfe24d7f3cd7a5e5af922d7d39c5114a7fe3ec019ef817828c8a4bc857d6f5",
"0x17e5c76989274b0e8dbb8a340684b31558dbf41bda5e9fd514118797b817079",
"0x7167af3b4bd8b75c3848e995c933e42b99e9bcec91391f4873fa2c7bafdb527",
"0x41348559d81f24893f8c78397c60e3560b28c6cc07af04c4b3acd2ad7769004",
"0x50bdced3e4df31bb700853166f6eaef368d9bce1a27c4d0c7daa6f50053eae",
"0x4e3b7afd69e37eeb424a6d103a47c38c80c34e3b5071a57374266d7f306ac30",
"0x634119374b27838e0d2ecc94b926a157317dbbfd9fc6969c66f1a8e51af365d",
"0x27660450233f3bcab252d273fa362f56aef655d14537d39bd54e96d989d6988",
"0x4ee77ddbb863eddead4f359738b93e25facd0ca6a254dcbe913e41b219f6b91",
"0x62b6b1334a5830b6a0e90f3603f4297ffbb47852a56d38defea06748f0d04e7",
"0x24580bbf0da0a2ecc54c724f1b8f75a5747c167fc00a19ef13c339e696e42b",
"0x2b0b16af2098c39adc065551d5f600b2dfa2680b053142564a66eb739227276",
"0x617a6708deda9135e11b9f41b78f8aefa3919cce284a30d2129ffae5d999e0f",
"0x14a2b0d3e7f586929f03df07eba47fdc42ed168733ab693c33988fbccdfbca6",
"0x4599466dbcea1d670b6328807b12b134cd24bd712e291b436742fb15e3e111",
"0x5fb041f4fd1df0210de09d0ebca364414c1b5bda21c68b4f97ce0005cd83f93",
"0x428a803e7df93719b9c8ae01ba9ca50cf0d643b4239606d406e1e2cac0bd29d",
"0x277c4a591102cbc6860658b1f4b1817406764ccc52140097512e8a24a2c3e37"
]
}
}
],
"mmr_meta": {
"id": 1,
"size": 6168396,
"root": "0x022878f14b9205a937ba7ec2f382a6d3437366532552c9e82383616b71d814ed",
"peaks": [
"0x00ed6cd2685b1f97fce8819a5f2c57cd06dd2d12afd05019ebaa1a088cf7a281",
"0x036ab69cd3fee515042a56720edc9379371d139686b875d023f57b6118285345",
"0x01f55b9eee3d617900ca269c0776dcbecaa135300c878380a9256c9cce71d929",
"0x0318f4592c7ea32d1f87208f3ee34e46a452dfb37b05d80389cb1dfa99fce9ec",
"0x0475c19de3e5cf21761bd46cdb67d52964b42e742d48275306736d10e51836e1",
"0x078df71edf29dcc69036e478ce88c4dfedd5b0bc6347d43e83a96aa60cfce27f",
"0x0722c8322915b80a4a490aadc47b08f41fd960f29cba1e474f24a6b4e32ed8ec",
"0x07e47f46dc222c72a2e26e1911497c05c1f16fd4425bd7c7af7b88a19552cf64",
"0x06ce3d747d557a71c98d6fdbf14f0d51e920aae5d0a42dcbf72e09c6905bd90c",
"0x02ea73e07466a3f366bff3cd17d23cecad012a0094b45b67e0d262f773c28f10",
"0x0229446a5f65c3a92e0b432d46d17b10181fb5ea646ebe7a4cd31e80936758a0",
"0x017de81843ced8d1647d2d071a3649525514961e1c57d25a2a782aa92c8a7d12",
"0x008b33bd251a1940728999f2500c3fcda21c975ff5c0732ee374b1ff6e829d86",
"0x04f7590d8a7bc06551ad75fec910ac3c36d8173e2825a59678d0417d3d057f57"
]
}
}
],
"accounts": [
{
"address": "0x75cec1db9dceb703200eaa6595f66885c962b920",
"account_key": "0x962f445fc8476432660877b666f653759ea69189b60d2f4a7008e70555746ad1",
"proofs": [
{
"block_number": 6000000,
"proof": [
"0xf90211a0a4e95519b19947e274174b07f0ac7193c5f8c9a8a0be4d49165fcf788ed6b7e3a0ac4c9f685609fec6e80aa040f7396eca0154b0c608c65f8aa606fe6eb47718aba062db605e5b7cedac2740b1cc160d3c53e22f93692551b6bfa28e7ff31aefc52fa020076ed2aca0c04fab3db95ca0c8139d34630d247b9f5b695ac60b360c53ec87a05926c1f32ace2fe992e2aef1c1adde6f7fc775033e79a0418913188c5fac9b3ca00d1a8fb169c88c6cb0ab3af702b0d3ba8242c877ae97c0bcf0f22276ed538f93a06d9fe2fda576366f82ea0b3affb836052769d564ead60fbf96c88645e739fc9ea044f00ce034ab6e751605ed9470fcaddb3c46d2b71bf2ea938db9b2a5be1f7080a07b720be4d208ba15cf9ced207bd27f889d5e588a0a25cf6015ad9748448eeec4a03fc8e9af0aa9ba11b76fae20caaaef4580bbac895268d60e8e85208ab99fa3bda056a8e013011d46e04cadb41618e22d91e84e620b42c0f12c367a9ae3321a6aeda0235d8e928af74e97c456313b3765cb75166f0cd950c9a97b23c2b048c40e27b8a0a2484dd262602363b53193be2aadba074e293487035389e41c2e6b3ae38de36ea0df264df8b3e3075b8eba755025c560db99cb84688bc7adf856cf7db34991f6d7a0fdff97b0e762eb0618fbe295122d1deb9758c448a7818419554a4bbd533db42fa0915d3e33e142b71ea48b49ef5481adba3ae819bcf95a07cab4cd474206a22b6180",
"0xf90211a0f8835bdceb006ba61e61275cda02a0efcf935b7e264dd33e349c8f3303785f24a05cf82d2c0c56c9e305a0049604fcb06434aae182c2372ef597a79ff0e3000a52a0767b1c5bec331ca8cd581d87c9cdb6a09198d64a6036310d23f295d71fcd6881a0b9c7368dacac6c84b6421418f4ee55be7d8750b865eb09f3347b0e1520d9fb4ea053db22703e975747866be5000010cd3485e1e5b3e8cb7477170abdd86e65bc50a05fcf2482f7362e631e733defbbeec2ae643c9529e52855489ff6e3c7770fff0aa01657366ff8210d62b9b68dc864c4a93f43006f669e663cb3575aef2420e66917a084d1cc979f69922ac546b20494447b177ae2c4f15dbc76d9a94e93b9f5d03dcaa0b108cdcda11eb59df3753f82595cc7c4e93a2ff0b423fca9cd304c8ef94bab7fa06d751675b13c9af6e814d3e7d4747e368db950b1ca70c411969d1bfe2c267b2ba026f7b42d300a3a3769aff526dcd2b55da5ca0a0abf4bcfbf46dd8179ca524cdaa067407338e60a02619780b0478a796c4ef5cbbfe7135477b597edf722d148cb5ba008ffba7abcf70f3b6c94c5f78b6a419bd0ef759de83dabe62c261f8c9bee55dca0a04e6e21f2ee764819e2aa2b47fb9f081e5dcbcbf220ef7f016aa18009e3d8d9a045a6a5dc9912140d26eb3f033b05be99919e3644a7a86d9a0583eaec2be79e48a064d8bdd809bae097161bf5307443f4a5a0230bc232a59ba0bc9cabfd1c547c1c80",
"0xf90211a04ba690a1c609399087ee77160e4522000989edc27e32a5172733a8bfaa96d5e5a00771a965d46ed7f6ce6c5d38232fd83f01955dccc337e2e9e35c29b616130ad0a098ae44b9e1c410a60c02d953a16991db5085d905bdd4809469dcb5c6da861575a09fc0e167f05032404d6b569588bff39241c1bc59d244c9425a09abdb1d4f1f29a0cc76f40a3220c2b913edf7ca6eab3eacc6a014dc9a7450a931d57a5a9daf151ba08865c69adef0165773652c3f1cc2d200d4e2a58a67d4915b9597e1df1ce9bf9ba0f1aa72ce71b027a54d492b801f2d6e31845b02165bb947f703b43cf061863f2ca00c260d6d3afbd40c8805190a8249ebdbca07a9c679973ef717e715aaa74b2662a0260ed441fc47417eecfa30f6245ffc0c6063703d1fb5322ec720c88245bd7324a07fb427f092bf59e9eed042fd70bd6cdae8d9d421d5402a0ac31da9faa23eb48da020086bf1e1fd56b8d18a97eacb64e6efa2ab64a9251f2e57fd139691650fa05ea0b0884b9f18d1b22af2bcdc1498c3c0cc4ca6ee3a8f86f2fb0f680f4fe0e1183fa088e98400b84133e7bccf8ddd148a4d75a062c5c3f7877e91519806eda75dd854a042521836216ce39730ee0bd3fe0f6dd7e1b689ec17a440343c9ba6a3d34771efa0aca2c819019f206dbd220002798bbaa9e7a46c5cd37ef0e66b887df203065660a072f6bd7243cf47fcfb22bc8ce0ce7d83effe99216a18de68642e05c9ef00c30f80",
"0xf90211a08c156d4012062637d0b73a093633a642eccb728dbb3279c2eeafc968d025ec4fa0ec1fda08f0cfc0b5755bf847fac276803e2d829f1c451d3862e166c18e0e8f58a0601609315dea18c1bd5af4de55f555fc58094d2d10a3df2172a85e8d08f07246a072a6ab0b419a84d39445275394877ecae7c1ddf5a55270c00948b0c16fa69f37a0f539b58bbcee318b5080bea9fa062621bc33608469492c08cdf10808b9666f13a0c06e96a995278a206134f4f40ae36c5ab66737354c35fb3626776fb35d19bab9a0504b5c9a235b5991b6cd8ea9ea27629a204b89f1d6ee32ba871cfd6164498446a0a2ecca46925cd05922a779c5834922fa06ee74be143ceb726d9a6e2242613f0da0b893de2ddfe1711d16df810fab356bf8bba2dab118de01a84497f34a18d35542a0febd95a4f1bfd3bc6afd7e8650737da64819378bbd9943fa7808375581f58da7a06dd6442bbcea272366eb6b121e565853bbba992670cbe04264337b614a1a1cc0a0ac780763e2aa7b2d5c3f7307ae93619acb3c4fcc7e87bfff073432471c4ce0dea02fc8c680d9d79435b12ecb337d5b6d3369f6ecc3d074e88e17f81e75271e2c88a042b64c5727fa628fd9bbcd943f6819a08a5d911e1750573dddc8dc4583887e63a021adeb757ac8f67834b4552e0a5c80efcbada3f70a0b4d735a36333ed8997c57a08ab52c3a2228a681bf802c74701444e6b2fb46a6135621a517cd9a699cbd165880",
"0xf90211a05cabdf5a3dc2934d4203f6906cf512240e6b714c064392166859a3847be3fb86a07c9b91be1d115bcb713a5b052cd693fb970385b92b4a8bf0116e965eb1257aeea005025b28a3a30fef741fb58ce1849c29fae21b031b802ec0d9a868e5dd2b8903a02378998a0d99d1cec9d25d0a8131b1998d17cb46008947666b0469fef26b34c3a0d8f59da19df917cc2b6c89a1ff88393d678fa5c9f8ab24ecd77b358c5518634ba030de47479af6bf5679db515cb62ee86673b73185ede28d8171b74c82e518b830a031e8d2fbaf313f4e8b1fab149b162c3c7c6847d9a36bd025f72862ce62f68508a0ade082420ebd1f4d6507d12ebdee6e24501124249f7fa2fe052705abafab1439a0533dd851965d0781a2e6f9ed820f42d5bb2f0f61b18ff5a1cd82753226e782cca0a8030f4c6fc22ec79f79a5fbe16c50edde38e83eb6d87169b52ac721410053b5a082f630a03b030084de2c5fcb9b4d7c0b3790b65909a99893b026fe5fd8d64e04a01b710d42dc326e1b030934add41bd081c1655fbb5551f7ca756dcd317eaf99aea0554a6f1e6ad5f221eea690a7d7f265d9f255006dde96cb25f0ca96569edc21dca04e50a7cd133b9310f67d71aefe4110279b07d31ea7af9a8532ec6e8cfa33e5aea0e9edeb77640bd9e2d60f34795634f1865bdabee97d139371e741246e086e8510a0d240040db4fcbdf6dd0dbef9f4980d5a4a9c50f599ea29d30dabbb52742cc41480",
"0xf901d1a06d6223af2401971b5d3667a3a58a872ea759e76582fb375e4f2de0e420df275ea0f158252d20b99f3aa36e5b97c87644eaabc50f582e769ea41cf18f7ae3602227a0a4faeacc33284fdd0eafce32e0776543e3ac349de68dfcb7abcc40b0ae82df5fa0245f6fda91c1d0dd6036c8799a9338cbf85cbbca8a3a45f35a27bb076d10cb65a0990f784313954691b94698cdab8874bb064dafd8888e425e6af53d024923c8cba077499f3ba879737a73d6628cbe5d5b8ad598430031ca879cdcb3a2509d3f7d5fa0c91ebaef1a0e560845ba673efd813a313e8b9e870524adc4aa4cb6ce4eb47358a078db9a4d7a85f223a7e7b0b4e22c8f0b0c1e976d6197f0ab565b16d7d2143852a02aaaa42933c19eec648bef646eda705a1e84cffbe4ecd62a31862aee16e05241a06e516cdf1f81d33ffae52ca5bf785219501710b5302738b2c405127406ef3c94a0c8ed1799c413fefe7f902fd41911193db6378456ac10eb218c8f7a137b7b50b4a0e412c32035edec4058b02f8137c18a403f5d0274e1ca1f0beff3257f61788af8a0be49c166207007fd651f379fdd6a16bea5854e57e6fcf0109551e5d7f28f883680a08c91d5c0e3460f1c162f097f2170a00f5a4c0e6d014f23f1c09b1eef57a76d8b8080",
"0xf871a0ccf45266c2d24214e960187dfbd6d558e720394e806aee0e67396c1a26a45b7680808080a01922ad14def89076bde0011d514a50cae7632d617136bb83c1b2fcbed3383c7380808080808080a0e81a4320e846af94db949f1a5298f425864e8eecbe8b72342b0aea33c0ea6e3c808080",
"0xf86c9d3fc8476432660877b666f653759ea69189b60d2f4a7008e70555746ad1b84cf84a018612309ce54000a069bbf0407f9d5438512c6218768a9581f377fa5dc119ea1409b917b75c242e1ca0eab3448e22d0f75e09ed849b2e87ac6739db4104db4eaeeffcc66cfa819755fd"
]
}
]
}
],
"storages": [
{
"address": "0x75cec1db9dceb703200eaa6595f66885c962b920",
"slot": "0x0000000000000000000000000000000000000000000000000000000000000001",
"storage_key": "0xb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6",
"proofs": [
{
"block_number": 6000000,
"proof": [
"0xf8918080a0b7a7c859e6ddbad6c18adb60b9f48842e652021b4f8b875894b8b879568629f880a0e7f9c6d331c7d110c992550a7baa3e051adc1e26a53d928dbd517a313d221863808080808080a0e40cf9c20b1e8e4aaf3201dd3cb84ab06d2bac34e8dc3e918626e5c44c4f0707808080a0c01a2f302bfc71151daac60eeb4c1b73470845d4fe219e71644752abaafb02ab80",
"0xe9a0310e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6878612309ce54000"
]
}
]
}
],
"transactions": [],
"transaction_receipts": []
}
},
{
"StarknetSepolia": {
"headers_with_mmr": [],
"storages": []
}
}
]

0 comments on commit 7965d98

Please sign in to comment.