diff --git a/Cargo.lock b/Cargo.lock index dad75ad72..85537c34f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,7 +8,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f7b0a21988c1bf877cf4759ef5ddaac04c1c9fe808c9142ecb78ba97d97a28a" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "bytes", "futures-core", "futures-sink", @@ -29,9 +29,9 @@ dependencies = [ "actix-rt", "actix-service", "actix-utils", - "ahash", + "ahash 0.8.11", "base64", - "bitflags 2.5.0", + "bitflags 2.6.0", "brotli", "bytes", "bytestring", @@ -65,7 +65,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" dependencies = [ "quote", - "syn 2.0.67", + "syn 2.0.70", ] [[package]] @@ -146,7 +146,7 @@ dependencies = [ "actix-service", "actix-utils", "actix-web-codegen", - "ahash", + "ahash 0.8.11", "bytes", "bytestring", "cfg-if", @@ -181,7 +181,7 @@ dependencies = [ "actix-router", "proc-macro2", "quote", - "syn 2.0.67", + "syn 2.0.70", ] [[package]] @@ -199,6 +199,17 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "ahash" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" +dependencies = [ + "getrandom", + "once_cell", + "version_check", +] + [[package]] name = "ahash" version = "0.8.11" @@ -244,9 +255,9 @@ checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "alloy-chains" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04e9a1892803b02f53e25bea3e414ddd0501f12d97456c9d5ade4edf88f9516f" +checksum = "1752d7d62e2665da650a36d84abbf239f812534475d51f072a49a533513b7cdd" dependencies = [ "num_enum", "strum", @@ -254,9 +265,9 @@ dependencies = [ [[package]] name = "alloy-consensus" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a016bfa21193744d4c38b3f3ab845462284d129e5e23c7cc0fafca7e92d9db37" +checksum = "da374e868f54c7f4ad2ad56829827badca388efd645f8cf5fccc61c2b5343504" dependencies = [ "alloy-eips", "alloy-primitives", @@ -268,9 +279,9 @@ dependencies = [ [[package]] name = "alloy-eips" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32d6d8118b83b0489cfb7e6435106948add2b35217f4a5004ef895f613f60299" +checksum = "f76ecab54890cdea1e4808fc0891c7e6cfcf71fe1a9fe26810c7280ef768f4ed" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -283,9 +294,9 @@ dependencies = [ [[package]] name = "alloy-genesis" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "894f33a7822abb018db56b10ab90398e63273ce1b5a33282afd186c132d764a6" +checksum = "bca15afde1b6d15e3fc1c97421262b1bbb37aee45752e3c8b6d6f13f776554ff" dependencies = [ "alloy-primitives", "alloy-serde", @@ -294,9 +305,9 @@ dependencies = [ [[package]] name = "alloy-json-rpc" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61f0ae6e93b885cc70fe8dae449e7fd629751dbee8f59767eaaa7285333c5727" +checksum = "6d6f34930b7e3e2744bcc79056c217f00cb2abb33bc5d4ff88da7623c5bb078b" dependencies = [ "alloy-primitives", "serde", @@ -307,9 +318,9 @@ dependencies = [ [[package]] name = "alloy-network" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc122cbee2b8523854cc11d87bcd5773741602c553d2d2d106d82eeb9c16924a" +checksum = "25f6895fc31b48fa12306ef9b4f78b7764f8bd6d7d91cdb0a40e233704a0f23f" dependencies = [ "alloy-consensus", "alloy-eips", @@ -327,9 +338,9 @@ dependencies = [ [[package]] name = "alloy-node-bindings" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df0e005ecc1b41f0b3bf90f68df5a446971e7eb34e1ea051da401e7e8eeef8fd" +checksum = "494b2fb0276a78ec13791446a417c2517eee5c8e8a8c520ae0681975b8056e5c" dependencies = [ "alloy-genesis", "alloy-primitives", @@ -343,9 +354,9 @@ dependencies = [ [[package]] name = "alloy-primitives" -version = "0.7.6" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f783611babedbbe90db3478c120fb5f5daacceffc210b39adc0af4fe0da70bad" +checksum = "ccb3ead547f4532bc8af961649942f0b9c16ee9226e26caa3f38420651cc0bf4" dependencies = [ "alloy-rlp", "bytes", @@ -365,9 +376,9 @@ dependencies = [ [[package]] name = "alloy-provider" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d5af289798fe8783acd0c5f10644d9d26f54a12bc52a083e4f3b31718e9bf92" +checksum = "9c538bfa893d07e27cb4f3c1ab5f451592b7c526d511d62b576a2ce59e146e4a" dependencies = [ "alloy-chains", "alloy-consensus", @@ -397,9 +408,9 @@ dependencies = [ [[package]] name = "alloy-rlp" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b155716bab55763c95ba212806cf43d05bcc70e5f35b02bad20cf5ec7fe11fed" +checksum = "a43b18702501396fa9bcdeecd533bc85fac75150d308fc0f6800a01e6234a003" dependencies = [ "alloy-rlp-derive", "arrayvec", @@ -408,20 +419,20 @@ dependencies = [ [[package]] name = "alloy-rlp-derive" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8037e03c7f462a063f28daec9fda285a9a89da003c552f8637a80b9c8fd96241" +checksum = "d83524c1f6162fcb5b0decf775498a125066c86dda6066ed609531b0e912f85a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.67", + "syn 2.0.70", ] [[package]] name = "alloy-rpc-client" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b40fcb53b2a9d0a78a4968b2eca8805a4b7011b9ee3fdfa2acaf137c5128f36b" +checksum = "5ba31bae67773fd5a60020bea900231f8396202b7feca4d0c70c6b59308ab4a8" dependencies = [ "alloy-json-rpc", "alloy-transport", @@ -440,9 +451,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f2fbe956a3e0f0975c798f488dc6be96b669544df3737e18f4a325b42f4c86" +checksum = "184a7a42c7ba9141cc9e76368356168c282c3bc3d9e5d78f3556bdfe39343447" dependencies = [ "alloy-rpc-types-eth", "alloy-serde", @@ -450,9 +461,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-eth" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "083f443a83b9313373817236a8f4bea09cca862618e9177d822aee579640a5d6" +checksum = "ab4123ee21f99ba4bd31bfa36ba89112a18a500f8b452f02b35708b1b951e2b9" dependencies = [ "alloy-consensus", "alloy-eips", @@ -468,9 +479,9 @@ dependencies = [ [[package]] name = "alloy-serde" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d94da1c0c4e27cc344b05626fe22a89dc6b8b531b9475f3b7691dbf6913e4109" +checksum = "9416c52959e66ead795a11f4a86c248410e9e368a0765710e57055b8a1774dd6" dependencies = [ "alloy-primitives", "serde", @@ -479,9 +490,9 @@ dependencies = [ [[package]] name = "alloy-signer" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58d876be3afd8b78979540084ff63995292a26aa527ad0d44276405780aa0ffd" +checksum = "b33753c09fa1ad85e5b092b8dc2372f1e337a42e84b9b4cff9fede75ba4adb32" dependencies = [ "alloy-primitives", "async-trait", @@ -493,23 +504,23 @@ dependencies = [ [[package]] name = "alloy-sol-macro" -version = "0.7.6" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bad41a7c19498e3f6079f7744656328699f8ea3e783bdd10d85788cd439f572" +checksum = "2b40397ddcdcc266f59f959770f601ce1280e699a91fc1862f29cef91707cd09" dependencies = [ "alloy-sol-macro-expander", "alloy-sol-macro-input", "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.67", + "syn 2.0.70", ] [[package]] name = "alloy-sol-macro-expander" -version = "0.7.6" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd9899da7d011b4fe4c406a524ed3e3f963797dbc93b45479d60341d3a27b252" +checksum = "867a5469d61480fea08c7333ffeca52d5b621f5ca2e44f271b117ec1fc9a0525" dependencies = [ "alloy-sol-macro-input", "const-hex", @@ -518,31 +529,31 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.67", + "syn 2.0.70", "syn-solidity", "tiny-keccak", ] [[package]] name = "alloy-sol-macro-input" -version = "0.7.6" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32d595768fdc61331a132b6f65db41afae41b9b97d36c21eb1b955c422a7e60" +checksum = "2e482dc33a32b6fadbc0f599adea520bd3aaa585c141a80b404d0a3e3fa72528" dependencies = [ "const-hex", "dunce", "heck", "proc-macro2", "quote", - "syn 2.0.67", + "syn 2.0.70", "syn-solidity", ] [[package]] name = "alloy-sol-types" -version = "0.7.6" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a49042c6d3b66a9fe6b2b5a8bf0d39fc2ae1ee0310a2a26ffedd79fb097878dd" +checksum = "a91ca40fa20793ae9c3841b83e74569d1cc9af29a2f5237314fd3452d51e38c7" dependencies = [ "alloy-primitives", "alloy-sol-macro", @@ -551,9 +562,9 @@ dependencies = [ [[package]] name = "alloy-transport" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "245af9541f0a0dbd5258669c80dfe3af118164cacec978a520041fc130550deb" +checksum = "01b51a291f949f755e6165c3ed562883175c97423703703355f4faa4b7d0a57c" dependencies = [ "alloy-json-rpc", "base64", @@ -564,14 +575,15 @@ dependencies = [ "thiserror", "tokio", "tower", + "tracing", "url", ] [[package]] name = "alloy-transport-http" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5619c017e1fdaa1db87f9182f4f0ed97c53d674957f4902fba655e972d359c6c" +checksum = "86d65871f9f1cafe1ed25cde2f1303be83e6473e995a2d56c275ae4fcce6119c" dependencies = [ "alloy-json-rpc", "alloy-transport", @@ -591,7 +603,7 @@ dependencies = [ "alloy-primitives", "alloy-rlp", "derive_more", - "hashbrown", + "hashbrown 0.14.5", "nybbles", "smallvec", "tracing", @@ -807,18 +819,18 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.67", + "syn 2.0.70", ] [[package]] name = "async-trait" -version = "0.1.80" +version = "0.1.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", - "syn 2.0.67", + "syn 2.0.70", ] [[package]] @@ -845,7 +857,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.67", + "syn 2.0.70", ] [[package]] @@ -910,9 +922,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" dependencies = [ "serde", ] @@ -984,6 +996,28 @@ version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" +[[package]] +name = "bytecheck" +version = "0.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23cdc57ce23ac53c931e88a43d06d070a6fd142f2617be5855eb75efc9beb1c2" +dependencies = [ + "bytecheck_derive", + "ptr_meta", + "simdutf8", +] + +[[package]] +name = "bytecheck_derive" +version = "0.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3db406d29fbcd95542e92559bed4d8ad92636d1ca8b3b72ede10b4bcc010e659" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "bytemuck" version = "1.16.1" @@ -1036,9 +1070,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.0.99" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96c51067fd44124faa7f870b4b1c969379ad32b2ba805aa959430ceaa384f695" +checksum = "066fce287b1d4eafef758e89e09d724a24808a9196fe9756b8ca90e86d0719a2" dependencies = [ "jobserver", "libc", @@ -1080,9 +1114,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.7" +version = "4.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5db83dced34638ad474f39f250d7fea9598bdd239eaced1bdf45d597da0f433f" +checksum = "64acc1846d54c1fe936a78dc189c34e28d3f5afc348403f28ecf53660b9b8462" dependencies = [ "clap_builder", "clap_derive", @@ -1090,9 +1124,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.7" +version = "4.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7e204572485eb3fbf28f871612191521df159bc3e15a9f5064c66dba3a8c05f" +checksum = "6fb8393d67ba2e7bfaf28a23458e4e2b543cc73a99595511eb207fdb8aede942" dependencies = [ "anstream", "anstyle", @@ -1102,14 +1136,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.5" +version = "4.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c780290ccf4fb26629baa7a1081e68ced113f1d3ec302fa5948f1c381ebf06c6" +checksum = "2bac35c6dafb060fd4d275d9a4ffae97917c13a6327903a8be2153cd964f7085" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.67", + "syn 2.0.70", ] [[package]] @@ -1310,7 +1344,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ "cfg-if", - "hashbrown", + "hashbrown 0.14.5", "lock_api", "once_cell", "parking_lot_core", @@ -1365,7 +1399,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version 0.4.0", - "syn 2.0.67", + "syn 2.0.70", ] [[package]] @@ -1417,9 +1451,9 @@ dependencies = [ [[package]] name = "either" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "elliptic-curve" @@ -1457,7 +1491,7 @@ checksum = "6fd000fd6988e73bbe993ea3db9b1aa64906ab88766d654973924340c8cddb42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.67", + "syn 2.0.70", ] [[package]] @@ -1629,7 +1663,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.67", + "syn 2.0.70", ] [[package]] @@ -1761,13 +1795,22 @@ dependencies = [ "crunchy", ] +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +dependencies = [ + "ahash 0.7.8", +] + [[package]] name = "hashbrown" version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ - "ahash", + "ahash 0.8.11", "allocator-api2", "serde", ] @@ -1867,9 +1910,9 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "1.3.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe575dd17d0862a9a33781c8c4696a55c320909004a67a00fb286ba8b1bc496d" +checksum = "c4fe55fb7a772d59a5ff1dfbff4fe0258d19b89fec4b233e75d35d5d2316badc" dependencies = [ "bytes", "futures-channel", @@ -1920,9 +1963,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b875924a60b96e5d7b9ae7b066540b1dd1cbd90d1828f54c92e02a283351c56" +checksum = "3ab92f4f49ee4fb4f997c784b7a2e0fa70050211e0b6a287f898c3c9785ca956" dependencies = [ "bytes", "futures-channel", @@ -1975,7 +2018,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", - "hashbrown", + "hashbrown 0.14.5", ] [[package]] @@ -1984,7 +2027,7 @@ version = "0.11.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "321f0f839cd44a4686e9504b0a62b4d69a50b62072144c71c68f5873c167b8d9" dependencies = [ - "ahash", + "ahash 0.8.11", "indexmap", "is-terminal", "itoa", @@ -2028,6 +2071,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + [[package]] name = "itertools" version = "0.13.0" @@ -2131,7 +2183,7 @@ dependencies = [ "kona-common", "proc-macro2", "quote", - "syn 2.0.67", + "syn 2.0.70", ] [[package]] @@ -2154,7 +2206,7 @@ dependencies = [ "async-trait", "brotli", "c-kzg", - "hashbrown", + "hashbrown 0.14.5", "kona-primitives", "lazy_static", "lru", @@ -2279,6 +2331,7 @@ dependencies = [ "async-trait", "cfg-if", "kona-common", + "rkyv", "serde", "tempfile", "tokio", @@ -2372,9 +2425,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.21" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "loki-api" @@ -2392,7 +2445,7 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3262e75e648fce39813cb56ac41f3c3e3f65217ebf3844d818d1f9398cfb0dc" dependencies = [ - "hashbrown", + "hashbrown 0.14.5", ] [[package]] @@ -2481,7 +2534,7 @@ version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "cfg-if", "libc", ] @@ -2512,9 +2565,9 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ "num-integer", "num-traits", @@ -2613,7 +2666,7 @@ checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.67", + "syn 2.0.70", ] [[package]] @@ -2628,9 +2681,9 @@ dependencies = [ [[package]] name = "object" -version = "0.36.0" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "576dfe1fc8f9df304abb159d767a29d0476f7750fbf8aa7ad07816004a207434" +checksum = "081b846d1d56ddfc18fdf1a922e4f6e07a11768ea1b92dec44e42b72712ccfce" dependencies = [ "memchr", ] @@ -2643,15 +2696,15 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "oorandom" -version = "11.1.3" +version = "11.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" +checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9" [[package]] name = "op-alloy-consensus" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e17dfa6c70fdf14ea5199cca1e1d37e10adf4b68f28b6e94e600f28c0846e2" +checksum = "f491085509d77ebd05dbf75592093a9bebc8e7fc642b90fb4ac13b747d48b2fc" dependencies = [ "alloy-consensus", "alloy-eips", @@ -2667,7 +2720,7 @@ version = "0.10.64" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "cfg-if", "foreign-types", "libc", @@ -2684,7 +2737,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.67", + "syn 2.0.70", ] [[package]] @@ -2769,7 +2822,7 @@ dependencies = [ "libc", "redox_syscall", "smallvec", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -2786,9 +2839,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.10" +version = "2.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "560131c633294438da9f7c4b08189194b20946c8274c6b9e38881a7874dc8ee8" +checksum = "cd53dff83f26735fdc1ca837098ccf133605d794cdae66acfc2bfac3ec809d95" dependencies = [ "memchr", "thiserror", @@ -2812,7 +2865,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.67", + "syn 2.0.70", ] [[package]] @@ -2973,7 +3026,7 @@ version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "731e0d9356b0c25f16f33b5be79b1c57b562f141ebfcdb0ad8ac2c13a24293b4" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "hex", "lazy_static", "procfs-core", @@ -2986,7 +3039,7 @@ version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d3554923a69f4ce04c4a754260c338f505ce22642d3830e049a399fc2059a29" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "hex", ] @@ -3015,7 +3068,7 @@ checksum = "b4c2511913b88df1637da85cc8d96ec8e43a3f8bb8ccb71ee1ac240d6f3df58d" dependencies = [ "bit-set", "bit-vec", - "bitflags 2.5.0", + "bitflags 2.6.0", "lazy_static", "num-traits", "rand", @@ -3044,10 +3097,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" dependencies = [ "anyhow", - "itertools 0.10.5", + "itertools 0.12.1", "proc-macro2", "quote", - "syn 2.0.67", + "syn 2.0.70", ] [[package]] @@ -3065,6 +3118,26 @@ version = "2.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94" +[[package]] +name = "ptr_meta" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" +dependencies = [ + "ptr_meta_derive", +] + +[[package]] +name = "ptr_meta_derive" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "quick-error" version = "1.2.3" @@ -3160,7 +3233,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", ] [[package]] @@ -3198,6 +3271,15 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +[[package]] +name = "rend" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71fe3824f5629716b1589be05dacd749f6aa084c87e00e016714a8cdfccc997c" +dependencies = [ + "bytecheck", +] + [[package]] name = "reqwest" version = "0.12.5" @@ -3289,14 +3371,14 @@ source = "git+https://github.com/bluealloy/revm?tag=v37#99367b1db2c436359c0155ed dependencies = [ "alloy-primitives", "auto_impl", - "bitflags 2.5.0", + "bitflags 2.6.0", "bitvec", "c-kzg", "cfg-if", "derive_more", "dyn-clone", "enumn", - "hashbrown", + "hashbrown 0.14.5", "hex", "once_cell", "serde", @@ -3314,9 +3396,9 @@ dependencies = [ [[package]] name = "rgb" -version = "0.8.40" +version = "0.8.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7439be6844e40133eda024efd85bf07f59d0dd2f59b10c00dd6cfb92cc5c741" +checksum = "1aee83dc281d5a3200d37b299acd13b81066ea126a7f16f0eae70fc9aed241d9" dependencies = [ "bytemuck", ] @@ -3345,6 +3427,35 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "rkyv" +version = "0.7.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cba464629b3394fc4dbc6f940ff8f5b4ff5c7aef40f29166fd4ad12acbc99c0" +dependencies = [ + "bitvec", + "bytecheck", + "bytes", + "hashbrown 0.12.3", + "ptr_meta", + "rend", + "rkyv_derive", + "seahash", + "tinyvec", + "uuid", +] + +[[package]] +name = "rkyv_derive" +version = "0.7.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7dddfff8de25e6f62b9d64e6e432bf1c6736c57d20323e15ee10435fbda7c65" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "rlp" version = "0.5.2" @@ -3421,7 +3532,7 @@ version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", @@ -3430,9 +3541,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.10" +version = "0.23.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05cff451f60db80f490f3c182b77c35260baace73209e9cdbbe526bfe3a4d402" +checksum = "4828ea528154ae444e5a642dbb7d5623354030dc9822b83fd9bb79683c7399d0" dependencies = [ "once_cell", "rustls-pki-types", @@ -3459,9 +3570,9 @@ checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" [[package]] name = "rustls-webpki" -version = "0.102.4" +version = "0.102.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff448f7e92e913c4b7d4c6d8e4540a1724b319b4152b8aef6d4cf8339712b33e" +checksum = "f9a6fccd794a42c2c105b513a2f62bc3fd8f3ba57a4593677ceb0bd035164d78" dependencies = [ "ring", "rustls-pki-types", @@ -3516,6 +3627,12 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +[[package]] +name = "seahash" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" + [[package]] name = "sec1" version = "0.7.3" @@ -3555,7 +3672,7 @@ version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "core-foundation", "core-foundation-sys", "libc", @@ -3598,29 +3715,29 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.203" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" +checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.203" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" +checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" dependencies = [ "proc-macro2", "quote", - "syn 2.0.67", + "syn 2.0.70", ] [[package]] name = "serde_json" -version = "1.0.117" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" +checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" dependencies = [ "indexmap", "itoa", @@ -3636,7 +3753,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.67", + "syn 2.0.70", ] [[package]] @@ -3711,6 +3828,12 @@ dependencies = [ "rand_core", ] +[[package]] +name = "simdutf8" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" + [[package]] name = "simple-revm" version = "0.1.0" @@ -3808,9 +3931,9 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "strum" -version = "0.26.2" +version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d8cec3501a5194c432b2b7976db6b7d10ec95c253208b45f83f7136aa985e29" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" dependencies = [ "strum_macros", ] @@ -3825,7 +3948,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.67", + "syn 2.0.70", ] [[package]] @@ -3843,9 +3966,9 @@ dependencies = [ [[package]] name = "subtle" -version = "2.6.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d0208408ba0c3df17ed26eb06992cb1a1268d41b2c0e12e65203fbe3972cee5" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "superchain-primitives" @@ -3859,7 +3982,7 @@ dependencies = [ "alloy-primitives", "alloy-sol-types", "anyhow", - "hashbrown", + "hashbrown 0.14.5", "serde", "serde_repr", ] @@ -3900,9 +4023,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.67" +version = "2.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff8655ed1d86f3af4ee3fd3263786bc14245ad17c4c7e85ba7187fb3ae028c90" +checksum = "2f0209b68b3613b093e0ec905354eccaedcfe83b8cb37cbdeae64026c3064c16" dependencies = [ "proc-macro2", "quote", @@ -3911,14 +4034,14 @@ dependencies = [ [[package]] name = "syn-solidity" -version = "0.7.6" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d71e19bca02c807c9faa67b5a47673ff231b6e7449b251695188522f1dc44b2" +checksum = "c837dc8852cb7074e46b444afb81783140dab12c58867b49fb3898fbafedf7ea" dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.67", + "syn 2.0.70", ] [[package]] @@ -3983,7 +4106,7 @@ checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" dependencies = [ "proc-macro2", "quote", - "syn 2.0.67", + "syn 2.0.70", ] [[package]] @@ -4057,9 +4180,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ "tinyvec_macros", ] @@ -4097,7 +4220,7 @@ checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.67", + "syn 2.0.70", ] [[package]] @@ -4211,7 +4334,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.67", + "syn 2.0.70", ] [[package]] @@ -4401,9 +4524,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.9.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de17fd2f7da591098415cff336e12965a28061ddace43b59cb3c430179c9439" +checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" [[package]] name = "valuable" @@ -4478,7 +4601,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.67", + "syn 2.0.70", "wasm-bindgen-shared", ] @@ -4512,7 +4635,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.67", + "syn 2.0.70", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -4579,7 +4702,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -4599,18 +4722,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -4621,9 +4744,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -4633,9 +4756,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -4645,15 +4768,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -4663,9 +4786,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -4675,9 +4798,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -4687,9 +4810,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -4699,9 +4822,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" @@ -4733,22 +4856,22 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.7.34" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.34" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.67", + "syn 2.0.70", ] [[package]] @@ -4768,32 +4891,32 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.67", + "syn 2.0.70", ] [[package]] name = "zstd" -version = "0.13.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d789b1514203a1120ad2429eae43a7bd32b90976a7bb8a05f7ec02fa88cc23a" +checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "7.1.0" +version = "7.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd99b45c6bc03a018c8b8a86025678c87e55526064e38f9df301989dce7ec0a" +checksum = "fa556e971e7b568dc775c136fc9de8c779b1c2fc3a63defaafadffdbd3181afa" dependencies = [ "zstd-sys", ] [[package]] name = "zstd-sys" -version = "2.0.11+zstd.1.5.6" +version = "2.0.12+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75652c55c0b6f3e6f12eb786fe1bc960396bf05a1eb3bf1f3691c3610ac2e6d4" +checksum = "0a4e40c320c3cb459d9a9ff6de98cff88f4751ee9275d140e2be94a2b74e4c13" dependencies = [ "cc", "pkg-config", diff --git a/bin/client/src/comms/caching_oracle.rs b/bin/client/src/comms/caching_oracle.rs index ab3d84df2..8eac4670b 100644 --- a/bin/client/src/comms/caching_oracle.rs +++ b/bin/client/src/comms/caching_oracle.rs @@ -3,12 +3,12 @@ //! //! [OracleReader]: kona_preimage::OracleReader -use crate::ORACLE_READER; +use crate::{HINT_WRITER, ORACLE_READER}; use alloc::{boxed::Box, sync::Arc, vec::Vec}; use anyhow::Result; use async_trait::async_trait; use core::num::NonZeroUsize; -use kona_preimage::{PreimageKey, PreimageOracleClient}; +use kona_preimage::{HintWriterClient, PreimageKey, PreimageOracleClient}; use lru::LruCache; use spin::Mutex; @@ -63,3 +63,10 @@ impl PreimageOracleClient for CachingOracle { } } } + +#[async_trait] +impl HintWriterClient for CachingOracle { + async fn write(&self, hint: &str) -> Result<()> { + HINT_WRITER.write(hint).await + } +} diff --git a/bin/client/src/kona.rs b/bin/client/src/kona.rs index d905ebf00..bba1039c1 100644 --- a/bin/client/src/kona.rs +++ b/bin/client/src/kona.rs @@ -9,7 +9,7 @@ use alloc::sync::Arc; use alloy_consensus::Header; use kona_client::{ l1::{DerivationDriver, OracleBlobProvider, OracleL1ChainProvider}, - l2::{FPVMPrecompileOverride, OracleL2ChainProvider, TrieDBHintWriter}, + l2::{FPVMPrecompileOverride, OracleL2ChainProvider}, BootInfo, CachingOracle, }; use kona_common_proc::client_entry; @@ -57,12 +57,14 @@ fn main() -> Result<()> { .await?; let L2AttributesWithParent { attributes, .. } = driver.produce_disputed_payload().await?; - let precompile_overrides = - FPVMPrecompileOverride::::default(); + let precompile_overrides = FPVMPrecompileOverride::< + OracleL2ChainProvider, + OracleL2ChainProvider, + >::default(); let mut executor = StatelessL2BlockExecutor::builder(&boot.rollup_config) .with_parent_header(driver.take_l2_safe_head_header()) - .with_fetcher(l2_provider) - .with_hinter(TrieDBHintWriter) + .with_fetcher(l2_provider.clone()) + .with_hinter(l2_provider) .with_precompile_overrides(precompile_overrides) .build()?; let Header { number, .. } = *executor.execute_payload(attributes)?; diff --git a/bin/client/src/l1/blob_provider.rs b/bin/client/src/l1/blob_provider.rs index 01b7375a2..265fa33db 100644 --- a/bin/client/src/l1/blob_provider.rs +++ b/bin/client/src/l1/blob_provider.rs @@ -1,6 +1,6 @@ //! Contains the concrete implementation of the [BlobProvider] trait for the client program. -use crate::{CachingOracle, HintType, HINT_WRITER}; +use crate::HintType; use alloc::{boxed::Box, sync::Arc, vec::Vec}; use alloy_consensus::Blob; use alloy_eips::eip4844::FIELD_ELEMENTS_PER_BLOB; @@ -10,18 +10,18 @@ use kona_derive::{ traits::BlobProvider, types::{BlobProviderError, IndexedBlobHash}, }; -use kona_preimage::{HintWriterClient, PreimageKey, PreimageKeyType, PreimageOracleClient}; +use kona_preimage::{CommsClient, PreimageKey, PreimageKeyType}; use kona_primitives::BlockInfo; /// An oracle-backed blob provider. #[derive(Debug, Clone)] -pub struct OracleBlobProvider { - oracle: Arc, +pub struct OracleBlobProvider { + oracle: Arc, } -impl OracleBlobProvider { +impl OracleBlobProvider { /// Constructs a new `OracleBlobProvider`. - pub fn new(oracle: Arc) -> Self { + pub fn new(oracle: Arc) -> Self { Self { oracle } } @@ -45,7 +45,7 @@ impl OracleBlobProvider { blob_req_meta[40..48].copy_from_slice(block_ref.timestamp.to_be_bytes().as_ref()); // Send a hint for the blob commitment and field elements. - HINT_WRITER.write(&HintType::L1Blob.encode_with(&[blob_req_meta.as_ref()])).await?; + self.oracle.write(&HintType::L1Blob.encode_with(&[blob_req_meta.as_ref()])).await?; // Fetch the blob commitment. let mut commitment = [0u8; 48]; @@ -77,7 +77,7 @@ impl OracleBlobProvider { } #[async_trait] -impl BlobProvider for OracleBlobProvider { +impl BlobProvider for OracleBlobProvider { async fn get_blobs( &mut self, block_ref: &BlockInfo, diff --git a/bin/client/src/l1/chain_provider.rs b/bin/client/src/l1/chain_provider.rs index c6725c9e7..940f905ae 100644 --- a/bin/client/src/l1/chain_provider.rs +++ b/bin/client/src/l1/chain_provider.rs @@ -1,6 +1,6 @@ //! Contains the concrete implementation of the [ChainProvider] trait for the client program. -use crate::{BootInfo, CachingOracle, HintType, HINT_WRITER}; +use crate::{BootInfo, HintType}; use alloc::{boxed::Box, sync::Arc, vec::Vec}; use alloy_consensus::{Header, Receipt, ReceiptEnvelope, TxEnvelope}; use alloy_eips::eip2718::Decodable2718; @@ -10,30 +10,30 @@ use anyhow::{anyhow, Result}; use async_trait::async_trait; use kona_derive::traits::ChainProvider; use kona_mpt::{OrderedListWalker, TrieDBFetcher}; -use kona_preimage::{HintWriterClient, PreimageKey, PreimageKeyType, PreimageOracleClient}; +use kona_preimage::{CommsClient, PreimageKey, PreimageKeyType}; use kona_primitives::BlockInfo; /// The oracle-backed L1 chain provider for the client program. #[derive(Debug, Clone)] -pub struct OracleL1ChainProvider { +pub struct OracleL1ChainProvider { /// The boot information boot_info: Arc, /// The preimage oracle client. - oracle: Arc, + pub oracle: Arc, } -impl OracleL1ChainProvider { +impl OracleL1ChainProvider { /// Creates a new [OracleL1ChainProvider] with the given boot information and oracle client. - pub fn new(boot_info: Arc, oracle: Arc) -> Self { + pub fn new(boot_info: Arc, oracle: Arc) -> Self { Self { boot_info, oracle } } } #[async_trait] -impl ChainProvider for OracleL1ChainProvider { +impl ChainProvider for OracleL1ChainProvider { async fn header_by_hash(&mut self, hash: B256) -> Result
{ // Send a hint for the block header. - HINT_WRITER.write(&HintType::L1BlockHeader.encode_with(&[hash.as_ref()])).await?; + self.oracle.write(&HintType::L1BlockHeader.encode_with(&[hash.as_ref()])).await?; // Fetch the header RLP from the oracle. let header_rlp = @@ -72,7 +72,7 @@ impl ChainProvider for OracleL1ChainProvider { // Send a hint for the block's receipts, and walk through the receipts trie in the header to // verify them. - HINT_WRITER.write(&HintType::L1Receipts.encode_with(&[hash.as_ref()])).await?; + self.oracle.write(&HintType::L1Receipts.encode_with(&[hash.as_ref()])).await?; let trie_walker = OrderedListWalker::try_new_hydrated(header.receipts_root, self)?; // Decode the receipts within the transactions trie. @@ -103,7 +103,7 @@ impl ChainProvider for OracleL1ChainProvider { // Send a hint for the block's transactions, and walk through the transactions trie in the // header to verify them. - HINT_WRITER.write(&HintType::L1Transactions.encode_with(&[hash.as_ref()])).await?; + self.oracle.write(&HintType::L1Transactions.encode_with(&[hash.as_ref()])).await?; let trie_walker = OrderedListWalker::try_new_hydrated(header.transactions_root, self)?; // Decode the transactions within the transactions trie. @@ -119,7 +119,7 @@ impl ChainProvider for OracleL1ChainProvider { } } -impl TrieDBFetcher for OracleL1ChainProvider { +impl TrieDBFetcher for OracleL1ChainProvider { fn trie_node_preimage(&self, key: B256) -> Result { // On L1, trie node preimages are stored as keccak preimage types in the oracle. We assume // that a hint for these preimages has already been sent, prior to this call. diff --git a/bin/client/src/l1/driver.rs b/bin/client/src/l1/driver.rs index dd8506a03..07167759b 100644 --- a/bin/client/src/l1/driver.rs +++ b/bin/client/src/l1/driver.rs @@ -4,7 +4,7 @@ //! [L2PayloadAttributes]: kona_derive::types::L2PayloadAttributes use super::{OracleBlobProvider, OracleL1ChainProvider}; -use crate::{l2::OracleL2ChainProvider, BootInfo, CachingOracle, HintType, HINT_WRITER}; +use crate::{l2::OracleL2ChainProvider, BootInfo, HintType}; use alloc::sync::Arc; use alloy_consensus::{Header, Sealed}; use anyhow::{anyhow, Result}; @@ -19,31 +19,32 @@ use kona_derive::{ traits::{ChainProvider, L2ChainProvider}, }; use kona_mpt::TrieDBFetcher; -use kona_preimage::{HintWriterClient, PreimageKey, PreimageKeyType, PreimageOracleClient}; +use kona_preimage::{CommsClient, PreimageKey, PreimageKeyType}; use kona_primitives::{BlockInfo, L2AttributesWithParent, L2BlockInfo}; use tracing::{info, warn}; /// An oracle-backed derivation pipeline. -pub type OraclePipeline = - DerivationPipeline, OracleL2ChainProvider>; +pub type OraclePipeline = + DerivationPipeline, O>, OracleL2ChainProvider>; /// An oracle-backed Ethereum data source. -pub type OracleDataProvider = EthereumDataSource; +pub type OracleDataProvider = + EthereumDataSource, OracleBlobProvider>; /// An oracle-backed payload attributes builder for the `AttributesQueue` stage of the derivation /// pipeline. -pub type OracleAttributesBuilder = - StatefulAttributesBuilder; +pub type OracleAttributesBuilder = + StatefulAttributesBuilder, OracleL2ChainProvider>; /// An oracle-backed attributes queue for the derivation pipeline. -pub type OracleAttributesQueue = AttributesQueue< +pub type OracleAttributesQueue = AttributesQueue< BatchQueue< ChannelReader< - ChannelBank>>>, + ChannelBank>>>>, >, - OracleL2ChainProvider, + OracleL2ChainProvider, >, - OracleAttributesBuilder, + OracleAttributesBuilder, >; /// The [DerivationDriver] struct is responsible for handling the [L2PayloadAttributes] derivation @@ -54,16 +55,16 @@ pub type OracleAttributesQueue = AttributesQueue< /// /// [L2PayloadAttributes]: kona_derive::types::L2PayloadAttributes #[derive(Debug)] -pub struct DerivationDriver { +pub struct DerivationDriver { /// The current L2 safe head. l2_safe_head: L2BlockInfo, /// The header of the L2 safe head. l2_safe_head_header: Sealed
, /// The inner pipeline. - pipeline: OraclePipeline, + pipeline: OraclePipeline, } -impl DerivationDriver { +impl DerivationDriver { /// Returns the current L2 safe head [L2BlockInfo]. pub fn l2_safe_head(&self) -> &L2BlockInfo { &self.l2_safe_head @@ -92,10 +93,10 @@ impl DerivationDriver { /// - A new [DerivationDriver] instance. pub async fn new( boot_info: &BootInfo, - caching_oracle: &CachingOracle, - blob_provider: OracleBlobProvider, - mut chain_provider: OracleL1ChainProvider, - mut l2_chain_provider: OracleL2ChainProvider, + caching_oracle: &O, + blob_provider: OracleBlobProvider, + mut chain_provider: OracleL1ChainProvider, + mut l2_chain_provider: OracleL2ChainProvider, ) -> Result { let cfg = Arc::new(boot_info.rollup_config.clone()); @@ -159,13 +160,13 @@ impl DerivationDriver { /// ## Returns /// - A tuple containing the L1 origin block information and the L2 safe head information. async fn find_startup_info( - caching_oracle: &CachingOracle, + caching_oracle: &O, boot_info: &BootInfo, - chain_provider: &mut OracleL1ChainProvider, - l2_chain_provider: &mut OracleL2ChainProvider, + chain_provider: &mut OracleL1ChainProvider, + l2_chain_provider: &mut OracleL2ChainProvider, ) -> Result<(BlockInfo, L2BlockInfo, Sealed
)> { // Find the initial safe head, based off of the starting L2 block number in the boot info. - HINT_WRITER + caching_oracle .write(&HintType::StartingL2Output.encode_with(&[boot_info.l2_output_root.as_ref()])) .await?; let mut output_preimage = [0u8; 128]; diff --git a/bin/client/src/l2/chain_provider.rs b/bin/client/src/l2/chain_provider.rs index 92cf3e90d..f540ae248 100644 --- a/bin/client/src/l2/chain_provider.rs +++ b/bin/client/src/l2/chain_provider.rs @@ -1,16 +1,16 @@ //! Contains the concrete implementation of the [L2ChainProvider] trait for the client program. -use crate::{BootInfo, CachingOracle, HintType, HINT_WRITER}; +use crate::{BootInfo, HintType}; use alloc::{boxed::Box, sync::Arc, vec::Vec}; use alloy_consensus::Header; use alloy_eips::eip2718::Decodable2718; -use alloy_primitives::{Bytes, B256}; +use alloy_primitives::{Address, Bytes, B256}; use alloy_rlp::Decodable; use anyhow::{anyhow, Result}; use async_trait::async_trait; use kona_derive::traits::L2ChainProvider; -use kona_mpt::{OrderedListWalker, TrieDBFetcher}; -use kona_preimage::{HintWriterClient, PreimageKey, PreimageKeyType, PreimageOracleClient}; +use kona_mpt::{OrderedListWalker, TrieDBFetcher, TrieDBHinter}; +use kona_preimage::{CommsClient, PreimageKey, PreimageKeyType}; use kona_primitives::{ L2BlockInfo, L2ExecutionPayloadEnvelope, OpBlock, RollupConfig, SystemConfig, }; @@ -18,26 +18,26 @@ use op_alloy_consensus::OpTxEnvelope; /// The oracle-backed L2 chain provider for the client program. #[derive(Debug, Clone)] -pub struct OracleL2ChainProvider { +pub struct OracleL2ChainProvider { /// The boot information boot_info: Arc, /// The preimage oracle client. - oracle: Arc, + oracle: Arc, } -impl OracleL2ChainProvider { +impl OracleL2ChainProvider { /// Creates a new [OracleL2ChainProvider] with the given boot information and oracle client. - pub fn new(boot_info: Arc, oracle: Arc) -> Self { + pub fn new(boot_info: Arc, oracle: Arc) -> Self { Self { boot_info, oracle } } } -impl OracleL2ChainProvider { +impl OracleL2ChainProvider { /// Returns a [Header] corresponding to the given L2 block number, by walking back from the /// L2 safe head. async fn header_by_number(&mut self, block_number: u64) -> Result
{ // Fetch the starting L2 output preimage. - HINT_WRITER + self.oracle .write( &HintType::StartingL2Output.encode_with(&[self.boot_info.l2_output_root.as_ref()]), ) @@ -68,7 +68,7 @@ impl OracleL2ChainProvider { } #[async_trait] -impl L2ChainProvider for OracleL2ChainProvider { +impl L2ChainProvider for OracleL2ChainProvider { async fn l2_block_info_by_number(&mut self, number: u64) -> Result { // Get the payload at the given block number. let payload = self.payload_by_number(number).await?; @@ -84,7 +84,7 @@ impl L2ChainProvider for OracleL2ChainProvider { let header_hash = header.hash_slow(); // Fetch the transactions in the block. - HINT_WRITER.write(&HintType::L2Transactions.encode_with(&[header_hash.as_ref()])).await?; + self.oracle.write(&HintType::L2Transactions.encode_with(&[header_hash.as_ref()])).await?; let trie_walker = OrderedListWalker::try_new_hydrated(transactions_root, self)?; // Decode the transactions within the transactions trie. @@ -118,7 +118,7 @@ impl L2ChainProvider for OracleL2ChainProvider { } } -impl TrieDBFetcher for OracleL2ChainProvider { +impl TrieDBFetcher for OracleL2ChainProvider { fn trie_node_preimage(&self, key: B256) -> Result { // On L2, trie node preimages are stored as keccak preimage types in the oracle. We assume // that a hint for these preimages has already been sent, prior to this call. @@ -133,7 +133,7 @@ impl TrieDBFetcher for OracleL2ChainProvider { fn bytecode_by_hash(&self, hash: B256) -> Result { // Fetch the bytecode preimage from the caching oracle. kona_common::block_on(async move { - HINT_WRITER.write(&HintType::L2Code.encode_with(&[hash.as_ref()])).await?; + self.oracle.write(&HintType::L2Code.encode_with(&[hash.as_ref()])).await?; self.oracle .get(PreimageKey::new(*hash, PreimageKeyType::Keccak256)) @@ -145,7 +145,7 @@ impl TrieDBFetcher for OracleL2ChainProvider { fn header_by_hash(&self, hash: B256) -> Result
{ // Fetch the header from the caching oracle. kona_common::block_on(async move { - HINT_WRITER.write(&HintType::L2BlockHeader.encode_with(&[hash.as_ref()])).await?; + self.oracle.write(&HintType::L2BlockHeader.encode_with(&[hash.as_ref()])).await?; let header_bytes = self.oracle.get(PreimageKey::new(*hash, PreimageKeyType::Keccak256)).await?; @@ -154,3 +154,39 @@ impl TrieDBFetcher for OracleL2ChainProvider { }) } } + +impl TrieDBHinter for OracleL2ChainProvider { + fn hint_trie_node(&self, hash: B256) -> Result<()> { + kona_common::block_on(async move { + self.oracle.write(&HintType::L2StateNode.encode_with(&[hash.as_slice()])).await + }) + } + + fn hint_account_proof(&self, address: Address, block_number: u64) -> Result<()> { + kona_common::block_on(async move { + self.oracle + .write( + &HintType::L2AccountProof + .encode_with(&[block_number.to_be_bytes().as_ref(), address.as_slice()]), + ) + .await + }) + } + + fn hint_storage_proof( + &self, + address: alloy_primitives::Address, + slot: alloy_primitives::U256, + block_number: u64, + ) -> Result<()> { + kona_common::block_on(async move { + self.oracle + .write(&HintType::L2AccountStorageProof.encode_with(&[ + block_number.to_be_bytes().as_ref(), + address.as_slice(), + slot.to_be_bytes::<32>().as_ref(), + ])) + .await + }) + } +} diff --git a/bin/client/src/l2/mod.rs b/bin/client/src/l2/mod.rs index 908208abc..c2db9a884 100644 --- a/bin/client/src/l2/mod.rs +++ b/bin/client/src/l2/mod.rs @@ -1,8 +1,5 @@ //! Contains the L2-specifc contstructs of the client program. -mod trie_hinter; -pub use trie_hinter::TrieDBHintWriter; - mod chain_provider; pub use chain_provider::OracleL2ChainProvider; diff --git a/bin/client/src/l2/trie_hinter.rs b/bin/client/src/l2/trie_hinter.rs deleted file mode 100644 index 53e9ecf7d..000000000 --- a/bin/client/src/l2/trie_hinter.rs +++ /dev/null @@ -1,51 +0,0 @@ -//! Contains the hinter for the [TrieDB]. -//! -//! [TrieDB]: kona_mpt::TrieDB - -use crate::{HintType, HINT_WRITER}; -use alloy_primitives::{Address, B256}; -use anyhow::Result; -use kona_mpt::TrieDBHinter; -use kona_preimage::HintWriterClient; - -/// The [TrieDBHinter] implementation for the block executor's [TrieDB]. -/// -/// [TrieDB]: kona_mpt::TrieDB -#[derive(Debug)] -pub struct TrieDBHintWriter; - -impl TrieDBHinter for TrieDBHintWriter { - fn hint_trie_node(&self, hash: B256) -> Result<()> { - kona_common::block_on(async move { - HINT_WRITER.write(&HintType::L2StateNode.encode_with(&[hash.as_slice()])).await - }) - } - - fn hint_account_proof(&self, address: Address, block_number: u64) -> Result<()> { - kona_common::block_on(async move { - HINT_WRITER - .write( - &HintType::L2AccountProof - .encode_with(&[block_number.to_be_bytes().as_ref(), address.as_slice()]), - ) - .await - }) - } - - fn hint_storage_proof( - &self, - address: alloy_primitives::Address, - slot: alloy_primitives::U256, - block_number: u64, - ) -> Result<()> { - kona_common::block_on(async move { - HINT_WRITER - .write(&HintType::L2AccountStorageProof.encode_with(&[ - block_number.to_be_bytes().as_ref(), - address.as_slice(), - slot.to_be_bytes::<32>().as_ref(), - ])) - .await - }) - } -} diff --git a/crates/preimage/Cargo.toml b/crates/preimage/Cargo.toml index 6f38ca540..ce6f745ae 100644 --- a/crates/preimage/Cargo.toml +++ b/crates/preimage/Cargo.toml @@ -18,7 +18,7 @@ async-trait.workspace = true # local kona-common = { path = "../common", version = "0.0.2" } - +rkyv = { version = "0.7.44", optional = true } serde = { version = "1.0.203", features = ["derive"], optional = true } [dev-dependencies] @@ -27,4 +27,5 @@ tempfile = "3.10.1" [features] default = [] +rkyv = ["dep:rkyv"] serde = ["dep:serde"] diff --git a/crates/preimage/src/key.rs b/crates/preimage/src/key.rs index 99784bb2b..39a3bb862 100644 --- a/crates/preimage/src/key.rs +++ b/crates/preimage/src/key.rs @@ -2,13 +2,17 @@ //! the preimage oracle. use alloy_primitives::{B256, U256}; +#[cfg(feature = "rkyv")] +use rkyv::{Archive, Deserialize as RkyvDeserialize, Serialize as RkyvSerialize}; #[cfg(feature = "serde")] -use serde::{Deserialize, Serialize}; +use serde::{Deserialize as SerdeDeserialize, Serialize as SerdeSerialize}; /// -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[derive(Debug, Default, Clone, Copy, Eq, PartialEq, Hash)] #[repr(u8)] +#[cfg_attr(feature = "rkyv", derive(Archive, RkyvSerialize, RkyvDeserialize))] +#[cfg_attr(feature = "rkyv", archive_attr(derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)))] +#[cfg_attr(feature = "serde", derive(SerdeSerialize, SerdeDeserialize))] pub enum PreimageKeyType { /// Local key types are local to a given instance of a fault-proof and context dependent. /// Commonly these local keys are mapped to bootstrap data for the fault proof program. @@ -56,8 +60,10 @@ impl TryFrom for PreimageKeyType { /// |---------|-------------| /// | [0, 1) | Type byte | /// | [1, 32) | Data | -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[derive(Debug, Default, Clone, Copy, Eq, PartialEq, Hash)] +#[cfg_attr(feature = "rkyv", derive(Archive, RkyvSerialize, RkyvDeserialize))] +#[cfg_attr(feature = "rkyv", archive_attr(derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)))] +#[cfg_attr(feature = "serde", derive(SerdeSerialize, SerdeDeserialize))] pub struct PreimageKey { data: [u8; 31], key_type: PreimageKeyType, diff --git a/crates/preimage/src/lib.rs b/crates/preimage/src/lib.rs index c9d3fe9ed..77e9ff5a8 100644 --- a/crates/preimage/src/lib.rs +++ b/crates/preimage/src/lib.rs @@ -20,6 +20,6 @@ pub use pipe::PipeHandle; mod traits; pub use traits::{ - HintReaderServer, HintRouter, HintWriterClient, PreimageFetcher, PreimageOracleClient, - PreimageOracleServer, + CommsClient, HintReaderServer, HintRouter, HintWriterClient, PreimageFetcher, + PreimageOracleClient, PreimageOracleServer, }; diff --git a/crates/preimage/src/traits.rs b/crates/preimage/src/traits.rs index f70e8341b..913615e18 100644 --- a/crates/preimage/src/traits.rs +++ b/crates/preimage/src/traits.rs @@ -37,6 +37,12 @@ pub trait HintWriterClient { async fn write(&self, hint: &str) -> Result<()>; } +/// A [CommsClient] is a trait that combines the [PreimageOracleClient] and [HintWriterClient] +pub trait CommsClient: PreimageOracleClient + Clone + HintWriterClient {} + +// Implement the super trait for any type that satisfies the bounds +impl CommsClient for T {} + /// A [PreimageOracleServer] is a high-level interface to accept read requests from the client and /// write the preimage data to the client pipe. #[async_trait]