diff --git a/.github/workflows/book.yml b/.github/workflows/book.yml index 98796115678f..4ff06ec7b34c 100644 --- a/.github/workflows/book.yml +++ b/.github/workflows/book.yml @@ -55,7 +55,8 @@ jobs: steps: - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@nightly - + with: + toolchain: nightly-2023-10-29 - name: Install mdbook run: | mkdir mdbook diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 86a668335d70..3e109e6ee780 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,6 +16,8 @@ jobs: steps: - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@clippy + with: + toolchain: nightly-2023-10-29 - uses: Swatinem/rust-cache@v2 with: cache-on-failure: true @@ -30,6 +32,8 @@ jobs: steps: - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@nightly + with: + toolchain: nightly-2023-10-29 - uses: Swatinem/rust-cache@v2 with: cache-on-failure: true @@ -49,6 +53,7 @@ jobs: - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@nightly with: + toolchain: nightly-2023-10-29 components: rustfmt - run: cargo fmt --all --check diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index b274aec71b3d..63eee472b367 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -6,7 +6,7 @@ on: env: CARGO_TERM_COLOR: always - GETH_BUILD: 1.12.0-e501b3b0 + GETH_BUILD: 1.13.4-3f907d6a SEED: rustethereumethereumrust concurrency: @@ -37,6 +37,7 @@ jobs: mkdir -p "$HOME/bin" wget -q https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-$GETH_BUILD.tar.gz tar -xvf geth-linux-amd64-$GETH_BUILD.tar.gz + rm geth-linux-amd64-$GETH_BUILD.tar.gz mv geth-linux-amd64-$GETH_BUILD/geth $HOME/bin/geth chmod u+x "$HOME/bin/geth" export PATH=$HOME/bin:$PATH diff --git a/.github/workflows/sanity.yml b/.github/workflows/sanity.yml index cd95457d919a..b2c4361a3a90 100644 --- a/.github/workflows/sanity.yml +++ b/.github/workflows/sanity.yml @@ -10,7 +10,7 @@ on: env: RUSTFLAGS: -D warnings CARGO_TERM_COLOR: always - GETH_BUILD: 1.12.0-e501b3b0 + GETH_BUILD: 1.13.4-3f907d6a name: sanity jobs: @@ -34,6 +34,7 @@ jobs: mkdir -p "$HOME/bin" wget -q https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-$GETH_BUILD.tar.gz tar -xvf geth-linux-amd64-$GETH_BUILD.tar.gz + rm geth-linux-amd64-$GETH_BUILD.tar.gz mv geth-linux-amd64-$GETH_BUILD/geth $HOME/bin/geth chmod u+x "$HOME/bin/geth" export PATH=$HOME/bin:$PATH diff --git a/Cargo.lock b/Cargo.lock index 49735224a273..10c5e60e4ae5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -74,28 +74,29 @@ dependencies = [ [[package]] name = "aes-gcm" -version = "0.9.4" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df5f85a83a7d8b0442b6aa7b504b8212c1733da07b98aae43d4bc21b2cb3cdf6" +checksum = "bc3be92e19a7ef47457b8e6f90707e12b6ac5d20c6f3866584fa3be0787d839f" dependencies = [ "aead", "aes 0.7.5", "cipher 0.3.0", - "ctr 0.8.0", + "ctr 0.7.0", "ghash", "subtle", ] [[package]] name = "ahash" -version = "0.8.3" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" dependencies = [ "cfg-if", "getrandom 0.2.10", "once_cell", "version_check", + "zerocopy", ] [[package]] @@ -656,9 +657,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.4" +version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ba43ea6f343b788c8764558649e08df62f86c6ef251fdaeb1ffd010a9ae50a2" +checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" [[package]] name = "base64ct" @@ -668,9 +669,9 @@ checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] name = "basic-toml" -version = "0.1.4" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bfc506e7a2370ec239e1d072507b2a80c833083699d3c6fa176fbb4de8448c6" +checksum = "2f2139706359229bfa8f19142ac1155b4b80beafb7a60471ac5dd109d4a19778" dependencies = [ "serde", ] @@ -684,6 +685,8 @@ dependencies = [ "futures-util", "mev-share-sse", "reth", + "serde", + "serde_json", "tokio", "tracing", ] @@ -1033,9 +1036,9 @@ dependencies = [ [[package]] name = "brotli-decompressor" -version = "2.5.0" +version = "2.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da74e2b81409b1b743f8f0c62cc6254afefb8b8e50bbfe3735550f7aeefa3448" +checksum = "4e2e4afe60d7dd600fdd3de8d0f08c2b7ec039712e3b6137ff98b7004e82de4f" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -1097,9 +1100,9 @@ dependencies = [ [[package]] name = "c-kzg" -version = "0.1.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac926d808fb72fe09ebf471a091d6d72918876ccf0b4989766093d2d0d24a0ef" +checksum = "32700dc7904064bb64e857d38a1766607372928e2466ee5f02a869829b3297d7" dependencies = [ "bindgen 0.66.1", "blst", @@ -1267,9 +1270,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.6" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d04704f56c2cde07f43e8e2c154b43f216dc5c92fc98ada720177362f953b956" +checksum = "ac495e00dcec98c83465d5ad66c5c4fabd652fd6686e7c6269b117e729a6f17b" dependencies = [ "clap_builder", "clap_derive", @@ -1277,9 +1280,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.6" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e231faeaca65ebd1ea3c737966bf858971cd38c3849107aa3ea7de90a804e45" +checksum = "c77ed9a32a62e6ca27175d00d29d05ca32e396ea1eb5fb01d8256b669cec7663" dependencies = [ "anstream", "anstyle", @@ -1289,9 +1292,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.4.2" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0862016ff20d69b84ef8247369fabf5c008a7417002411897d40ee1f4532b873" +checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" dependencies = [ "heck", "proc-macro2", @@ -1301,9 +1304,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" +checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" [[package]] name = "cli-extension-event-hooks" @@ -1371,7 +1374,7 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5286a0843c21f8367f7be734f89df9b822e0321d8bcce8d6e735aadff7d74979" dependencies = [ - "base64 0.21.4", + "base64 0.21.5", "bech32", "bs58", "digest 0.10.7", @@ -1438,13 +1441,14 @@ dependencies = [ [[package]] name = "const-hex" -version = "1.9.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c37be52ef5e3b394db27a2341010685ad5103c72ac15ce2e9420a7e8f93f342c" +checksum = "a5104de16b218eddf8e34ffe2f86f74bfa4e61e95a1b89732fccf6325efd0557" dependencies = [ "cfg-if", "cpufeatures", "hex", + "proptest", "serde", ] @@ -1502,9 +1506,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fbc60abd742b35f2492f808e1abbb83d45f72db402e14c55057edc9c7b1e9e4" +checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" dependencies = [ "libc", ] @@ -1668,9 +1672,9 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.5.0" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071c0f5945634bc9ba7a452f492377dd6b1993665ddb58f28704119b32f07a9a" +checksum = "740fe28e594155f10cfc383984cbefd529d7396050557148f79cb0f621204124" dependencies = [ "generic-array", "rand_core 0.6.4", @@ -1688,6 +1692,15 @@ dependencies = [ "typenum", ] +[[package]] +name = "ctr" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a232f92a03f37dd7d7dd2adc67166c77e9cd88de5b019b9a9eecfaeaf7bfd481" +dependencies = [ + "cipher 0.3.0", +] + [[package]] name = "ctr" version = "0.8.0" @@ -2110,9 +2123,9 @@ checksum = "23d2f3407d9a573d666de4b5bdf10569d73ca9478087346697dcbae6244bfbcd" [[package]] name = "dyn_size_of" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b8b8aeb5763fce4ccb8916a3c111f4b004d2de4d74b21da803f5671446cf519" +checksum = "6c8adcce29eef18ae1369bbd268fd56bf98144e80281315e9d4a82e34df001c7" [[package]] name = "ecdsa" @@ -2240,7 +2253,7 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe81b5c06ecfdbc71dd845216f225f53b62a10cb8a16c946836a3467f701d05b" dependencies = [ - "base64 0.21.4", + "base64 0.21.5", "bytes", "ed25519-dalek", "hex", @@ -2481,7 +2494,7 @@ dependencies = [ "ethabi", "generic-array", "k256", - "num_enum 0.7.0", + "num_enum 0.7.1", "once_cell", "open-fastrlp", "rand 0.8.5", @@ -2546,7 +2559,7 @@ checksum = "6838fa110e57d572336178b7c79e94ff88ef976306852d8cb87d9e5b1fc7c0b5" dependencies = [ "async-trait", "auto_impl", - "base64 0.21.4", + "base64 0.21.5", "bytes", "const-hex", "enr", @@ -2618,6 +2631,7 @@ dependencies = [ "reth-revm", "reth-rpc-builder", "reth-rpc-types", + "reth-rpc-types-compat", "reth-tasks", "reth-transaction-pool", "tokio", @@ -2686,9 +2700,9 @@ dependencies = [ [[package]] name = "fiat-crypto" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0870c84016d4b481be5c9f323c24f65e31e901ae618f0e80f4308fb00de1d2d" +checksum = "a481586acf778f1b1455424c343f71124b048ffa5f4fc3f8f6ae9dc432dcb3c7" [[package]] name = "findshlibs" @@ -2777,9 +2791,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" +checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" dependencies = [ "futures-channel", "futures-core", @@ -2792,9 +2806,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" dependencies = [ "futures-core", "futures-sink", @@ -2802,15 +2816,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" +checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" [[package]] name = "futures-executor" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" +checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" dependencies = [ "futures-core", "futures-task", @@ -2819,9 +2833,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" +checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" [[package]] name = "futures-lite" @@ -2850,9 +2864,9 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" +checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" dependencies = [ "proc-macro2", "quote", @@ -2861,15 +2875,15 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" +checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" [[package]] name = "futures-task" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" +checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" [[package]] name = "futures-timer" @@ -2883,9 +2897,9 @@ dependencies = [ [[package]] name = "futures-util" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" dependencies = [ "futures-channel", "futures-core", @@ -3301,9 +3315,9 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.24.1" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", "http", @@ -3690,9 +3704,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.8.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "iri-string" @@ -3711,7 +3725,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi", - "rustix 0.38.20", + "rustix 0.38.21", "windows-sys 0.48.0", ] @@ -3790,9 +3804,9 @@ dependencies = [ [[package]] name = "jsonrpsee" -version = "0.20.2" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de902baa44bf34a58b1a4906f8b840d7d60dcec5f41fe08b4dbc14cf9efa821c" +checksum = "affdc52f7596ccb2d7645231fc6163bb314630c989b64998f3699a28b4d5d4dc" dependencies = [ "jsonrpsee-client-transport", "jsonrpsee-core", @@ -3808,9 +3822,9 @@ dependencies = [ [[package]] name = "jsonrpsee-client-transport" -version = "0.20.2" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58d9851f8f5653e0433a898e9032bde4910b35d625bd9dcf33ef6e36e7c3d456" +checksum = "b5b005c793122d03217da09af68ba9383363caa950b90d3436106df8cabce935" dependencies = [ "futures-channel", "futures-util", @@ -3831,9 +3845,9 @@ dependencies = [ [[package]] name = "jsonrpsee-core" -version = "0.20.2" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51f45d37af23707750136379f6799e76ebfcf2d425ec4e36d0deb7921da5e65c" +checksum = "da2327ba8df2fdbd5e897e2b5ed25ce7f299d345b9736b6828814c3dbd1fd47b" dependencies = [ "anyhow", "async-lock", @@ -3857,9 +3871,9 @@ dependencies = [ [[package]] name = "jsonrpsee-http-client" -version = "0.20.2" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02308562f2e8162a32f8d6c3dc19c29c858d5d478047c886a5c3c25b5f7fa868" +checksum = "5f80c17f62c7653ce767e3d7288b793dfec920f97067ceb189ebdd3570f2bc20" dependencies = [ "async-trait", "hyper", @@ -3877,12 +3891,12 @@ dependencies = [ [[package]] name = "jsonrpsee-proc-macros" -version = "0.20.2" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26b3675a943d083d0bf6e367ec755dccec56c41888afa13b191c1c4ff87c652" +checksum = "29110019693a4fa2dbda04876499d098fa16d70eba06b1e6e2b3f1b251419515" dependencies = [ "heck", - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 1.0.109", @@ -3890,9 +3904,9 @@ dependencies = [ [[package]] name = "jsonrpsee-server" -version = "0.20.2" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ed2bec9c76cee118c27138cc1c877938bcaa01207a5d902b80dbfc60466bc9c" +checksum = "82c39a00449c9ef3f50b84fc00fc4acba20ef8f559f07902244abf4c15c5ab9c" dependencies = [ "futures-util", "http", @@ -3913,9 +3927,9 @@ dependencies = [ [[package]] name = "jsonrpsee-types" -version = "0.20.2" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05eaff23af19f10ba6fbb76519bed6da4d3b9bbaef13d39b7c2b6c14e532d27e" +checksum = "5be0be325642e850ed0bdff426674d2e66b2b7117c9be23a7caef68a2902b7d9" dependencies = [ "anyhow", "beef", @@ -3927,9 +3941,9 @@ dependencies = [ [[package]] name = "jsonrpsee-wasm-client" -version = "0.20.2" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7ae1c71afe02a21713e197438f1bcfaa171c3dfe533b9505a0990cb8297779e" +checksum = "7c7cbb3447cf14fd4d2f407c3cc96e6c9634d5440aa1fbed868a31f3c02b27f0" dependencies = [ "jsonrpsee-client-transport", "jsonrpsee-core", @@ -3938,9 +3952,9 @@ dependencies = [ [[package]] name = "jsonrpsee-ws-client" -version = "0.20.2" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd34d3ab8c09f02fd4c432f256bc8b143b616b222b03050f941ee53f0e8d7b24" +checksum = "bca9cb3933ccae417eb6b08c3448eb1cb46e39834e5b503e395e5e5bd08546c0" dependencies = [ "http", "jsonrpsee-client-transport", @@ -3955,9 +3969,9 @@ version = "8.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" dependencies = [ - "base64 0.21.4", + "base64 0.21.5", "pem", - "ring", + "ring 0.16.20", "serde", "serde_json", "simple_asn1", @@ -4179,18 +4193,18 @@ checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" [[package]] name = "memmap2" -version = "0.5.10" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" +checksum = "f49388d20533534cd19360ad3d6a7dadc885944aa802ba3995040c5ec11288c6" dependencies = [ "libc", ] [[package]] name = "memmap2" -version = "0.7.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f49388d20533534cd19360ad3d6a7dadc885944aa802ba3995040c5ec11288c6" +checksum = "43a5a03cefb0d953ec0be133036f14e109412fa594edc2f77227249db66cc3ed" dependencies = [ "libc", ] @@ -4221,7 +4235,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a4964177ddfdab1e3a2b37aec7cf320e14169abb0ed73999f558136409178d5" dependencies = [ - "base64 0.21.4", + "base64 0.21.5", "hyper", "indexmap 1.9.3", "ipnet", @@ -4331,9 +4345,9 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.8" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" +checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" dependencies = [ "libc", "log", @@ -4568,11 +4582,11 @@ dependencies = [ [[package]] name = "num_enum" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70bf6736f74634d299d00086f02986875b3c2d924781a6a2cb6c201e73da0ceb" +checksum = "683751d591e6d81200c39fb0d1032608b77724f34114db54f571ff1317b337c0" dependencies = [ - "num_enum_derive 0.7.0", + "num_enum_derive 0.7.1", ] [[package]] @@ -4581,7 +4595,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 2.0.38", @@ -4589,11 +4603,11 @@ dependencies = [ [[package]] name = "num_enum_derive" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ea360eafe1022f7cc56cd7b869ed57330fb2453d0c7831d99b74c65d2f5597" +checksum = "6c11e44798ad209ccdd91fc192f0526a369a01234f7373e1b141c96d7cee4f0e" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 2.0.0", "proc-macro2", "quote", "syn 2.0.38", @@ -4760,7 +4774,7 @@ version = "3.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "312270ee71e1cd70289dacf597cab7b207aa107d2f28191c2ae45b2ece18a260" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 1.0.109", @@ -4882,9 +4896,9 @@ checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pest" -version = "2.7.4" +version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c022f1e7b65d6a24c0dbbd5fb344c66881bc01f3e5ae74a1c8100f2f985d98a4" +checksum = "ae9cee2a55a544be8b89dc6848072af97a20f2422603c10865be2a42b580fff5" dependencies = [ "memchr", "thiserror", @@ -4893,9 +4907,9 @@ dependencies = [ [[package]] name = "ph" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb7b1e6e2f58e63b69c3eab9ab28bea7074d327e8334a72f16cc9096c98315b9" +checksum = "88c6e62e083483e2812a9d2a6eff6b97871302ef4166b5182c6da30624b7e991" dependencies = [ "binout", "bitm", @@ -5067,9 +5081,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31114a898e107c51bb1609ffaf55a0e011cf6a4d7f1170d0015a165082c0338b" +checksum = "b559898e0b4931ed2d3b959ab0c2da4d99cc644c4b0b1a35b4d344027f474023" [[package]] name = "postcard" @@ -5191,6 +5205,15 @@ dependencies = [ "toml_edit 0.19.15", ] +[[package]] +name = "proc-macro-crate" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" +dependencies = [ + "toml_edit 0.20.7", +] + [[package]] name = "proc-macro-error" version = "1.0.4" @@ -5234,7 +5257,7 @@ dependencies = [ "byteorder", "hex", "lazy_static", - "rustix 0.36.16", + "rustix 0.36.17", ] [[package]] @@ -5463,15 +5486,6 @@ dependencies = [ "bitflags 1.3.2", ] -[[package]] -name = "redox_syscall" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" -dependencies = [ - "bitflags 1.3.2", -] - [[package]] name = "redox_syscall" version = "0.4.1" @@ -5558,7 +5572,7 @@ version = "0.11.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" dependencies = [ - "base64 0.21.4", + "base64 0.21.5", "bytes", "encoding_rs", "futures-core", @@ -5673,7 +5687,7 @@ dependencies = [ "tempfile", "thiserror", "tokio", - "toml 0.8.2", + "toml 0.8.6", "tracing", "tui", "vergen", @@ -5800,12 +5814,11 @@ dependencies = [ "reth-net-nat", "reth-network", "reth-primitives", - "reth-stages", "secp256k1 0.27.0", "serde", "serde_json", "tempfile", - "toml 0.8.2", + "toml 0.8.6", ] [[package]] @@ -5833,6 +5846,7 @@ dependencies = [ "futures", "heapless", "iai", + "itertools 0.11.0", "metrics", "modular-bitfield", "page_size", @@ -5844,6 +5858,7 @@ dependencies = [ "proptest", "proptest-derive", "rand 0.8.5", + "rayon", "reth-codecs", "reth-interfaces", "reth-libmdbx", @@ -6007,7 +6022,6 @@ dependencies = [ "clap", "futures", "modular-bitfield", - "parity-scale-codec", "parking_lot 0.12.1", "rand 0.8.5", "reth-codecs", @@ -6191,9 +6205,8 @@ version = "0.1.0-alpha.10" dependencies = [ "anyhow", "bincode", - "bytes", "cuckoofilter", - "hex", + "derive_more", "lz4_flex", "memmap2 0.7.1", "ph", @@ -6203,7 +6216,6 @@ dependencies = [ "tempfile", "thiserror", "tracing", - "tracing-appender", "zstd 0.12.4", ] @@ -6235,7 +6247,6 @@ version = "0.1.0-alpha.10" dependencies = [ "alloy-primitives", "alloy-rlp", - "alloy-sol-types", "arbitrary", "assert_matches", "byteorder", @@ -6249,7 +6260,7 @@ dependencies = [ "hash-db", "itertools 0.11.0", "modular-bitfield", - "num_enum 0.7.0", + "num_enum 0.7.1", "once_cell", "plain_hasher", "pprof", @@ -6259,6 +6270,7 @@ dependencies = [ "rayon", "reth-codecs", "reth-primitives", + "reth-rpc-types", "revm", "revm-primitives", "secp256k1 0.27.0", @@ -6271,7 +6283,7 @@ dependencies = [ "tempfile", "test-fuzz", "thiserror", - "toml 0.8.2", + "toml 0.8.6", "tracing", "triehash", "url", @@ -6285,13 +6297,16 @@ dependencies = [ "alloy-rlp", "assert_matches", "auto_impl", + "dashmap", "itertools 0.11.0", + "metrics", "parking_lot 0.12.1", "pin-project", "rand 0.8.5", "rayon", "reth-db", "reth-interfaces", + "reth-metrics", "reth-nippy-jar", "reth-primitives", "reth-trie", @@ -6482,6 +6497,7 @@ dependencies = [ "reth-rpc-types", "reth-rpc-types-compat", "reth-tasks", + "serde", "thiserror", "tokio", "tracing", @@ -6493,15 +6509,21 @@ version = "0.1.0-alpha.10" dependencies = [ "alloy-primitives", "alloy-rlp", + "arbitrary", + "bytes", + "c-kzg", "itertools 0.11.0", "jsonrpsee-types", + "proptest", + "proptest-derive", "rand 0.8.5", - "reth-primitives", + "secp256k1 0.27.0", "serde", "serde_json", "serde_with", "similar-asserts", "thiserror", + "url", ] [[package]] @@ -6659,7 +6681,7 @@ dependencies = [ [[package]] name = "revm" version = "3.5.0" -source = "git+https://github.com/bluealloy/revm?rev=df44297bc3949dc9e0cec06594c62dd946708b2a#df44297bc3949dc9e0cec06594c62dd946708b2a" +source = "git+https://github.com/bluealloy/revm?rev=1609e07c68048909ad1682c98cf2b9baa76310b5#1609e07c68048909ad1682c98cf2b9baa76310b5" dependencies = [ "auto_impl", "revm-interpreter", @@ -6669,7 +6691,7 @@ dependencies = [ [[package]] name = "revm-interpreter" version = "1.3.0" -source = "git+https://github.com/bluealloy/revm?rev=df44297bc3949dc9e0cec06594c62dd946708b2a#df44297bc3949dc9e0cec06594c62dd946708b2a" +source = "git+https://github.com/bluealloy/revm?rev=1609e07c68048909ad1682c98cf2b9baa76310b5#1609e07c68048909ad1682c98cf2b9baa76310b5" dependencies = [ "revm-primitives", ] @@ -6677,7 +6699,7 @@ dependencies = [ [[package]] name = "revm-precompile" version = "2.2.0" -source = "git+https://github.com/bluealloy/revm?rev=df44297bc3949dc9e0cec06594c62dd946708b2a#df44297bc3949dc9e0cec06594c62dd946708b2a" +source = "git+https://github.com/bluealloy/revm?rev=1609e07c68048909ad1682c98cf2b9baa76310b5#1609e07c68048909ad1682c98cf2b9baa76310b5" dependencies = [ "aurora-engine-modexp", "c-kzg", @@ -6693,7 +6715,7 @@ dependencies = [ [[package]] name = "revm-primitives" version = "1.3.0" -source = "git+https://github.com/bluealloy/revm?rev=df44297bc3949dc9e0cec06594c62dd946708b2a#df44297bc3949dc9e0cec06594c62dd946708b2a" +source = "git+https://github.com/bluealloy/revm?rev=1609e07c68048909ad1682c98cf2b9baa76310b5#1609e07c68048909ad1682c98cf2b9baa76310b5" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -6738,11 +6760,25 @@ dependencies = [ "libc", "once_cell", "spin 0.5.2", - "untrusted", + "untrusted 0.7.1", "web-sys", "winapi", ] +[[package]] +name = "ring" +version = "0.17.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb0205304757e5d899b9c2e448b867ffd03ae7f988002e47cd24954391394d0b" +dependencies = [ + "cc", + "getrandom 0.2.10", + "libc", + "spin 0.9.8", + "untrusted 0.9.0", + "windows-sys 0.48.0", +] + [[package]] name = "ripemd" version = "0.1.3" @@ -6877,9 +6913,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.36.16" +version = "0.36.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6da3636faa25820d8648e0e31c5d519bbb01f72fdf57131f0f5f7da5fed36eab" +checksum = "305efbd14fde4139eb501df5f136994bb520b033fa9fbdce287507dc23b8c7ed" dependencies = [ "bitflags 1.3.2", "errno 0.3.5", @@ -6891,9 +6927,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.20" +version = "0.38.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67ce50cb2e16c2903e30d1cbccfd8387a74b9d4c938b6a4c5ec6cc7556f7a8a0" +checksum = "2b426b0506e5d50a7d8dafcf2e81471400deb602392c7dd110815afb4eaf02a3" dependencies = [ "bitflags 2.4.1", "errno 0.3.5", @@ -6904,12 +6940,12 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.7" +version = "0.21.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd8d6c9f025a446bc4d18ad9632e69aec8f287aa84499ee335599fabd20c3fd8" +checksum = "446e14c5cda4f3f30fe71863c34ec70f5ac79d6087097ad0bb433e1be5edf04c" dependencies = [ "log", - "ring", + "ring 0.17.5", "rustls-webpki", "sct", ] @@ -6932,17 +6968,17 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" dependencies = [ - "base64 0.21.4", + "base64 0.21.5", ] [[package]] name = "rustls-webpki" -version = "0.101.6" +version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c7d5dece342910d9ba34d259310cae3e0154b873b35408b787b59bce53d34fe" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring", - "untrusted", + "ring 0.17.5", + "untrusted 0.9.0", ] [[package]] @@ -7011,7 +7047,7 @@ version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abf2c68b89cafb3b8d918dd07b42be0da66ff202cf1155c5739a4e0c1ea0dc19" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 1.0.109", @@ -7057,12 +7093,12 @@ dependencies = [ [[package]] name = "sct" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring", - "untrusted", + "ring 0.17.5", + "untrusted 0.9.0", ] [[package]] @@ -7181,9 +7217,9 @@ checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" [[package]] name = "serde" -version = "1.0.189" +version = "1.0.190" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e422a44e74ad4001bdc8eede9a4570ab52f71190e9c076d14369f38b9200537" +checksum = "91d3c334ca1ee894a2c6f6ad698fe8c435b76d504b13d436f0685d648d6d96f7" dependencies = [ "serde_derive", ] @@ -7199,9 +7235,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.189" +version = "1.0.190" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e48d1f918009ce3145511378cf68d613e3b3d9137d67272562080d68a2b32d5" +checksum = "67c5609f394e5c2bd7fc51efda478004ea80ef42fee983d5c67a65e34f32c0e3" dependencies = [ "proc-macro2", "quote", @@ -7232,9 +7268,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186" +checksum = "12022b835073e5b11e90a14f86838ceb1c8fb0325b72416845c487ac0fa95e80" dependencies = [ "serde", ] @@ -7257,7 +7293,7 @@ version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64cd236ccc1b7a29e7e2739f27c0b2dd199804abc4290e32f59f3b68d6405c23" dependencies = [ - "base64 0.21.4", + "base64 0.21.5", "chrono", "hex", "indexmap 1.9.3", @@ -7643,9 +7679,9 @@ dependencies = [ [[package]] name = "subtle" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" [[package]] name = "sucds" @@ -7668,21 +7704,21 @@ dependencies = [ [[package]] name = "symbolic-common" -version = "12.4.1" +version = "12.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fac08504d60cf5bdffeb8a6a028f1a4868a5da1098bb19eb46239440039163fb" +checksum = "6d3aa424281de488c1ddbaffb55a421ad87d04b0fdd5106e7e71d748c0c71ea6" dependencies = [ "debugid", - "memmap2 0.5.10", + "memmap2 0.8.0", "stable_deref_trait", "uuid 1.5.0", ] [[package]] name = "symbolic-demangle" -version = "12.4.1" +version = "12.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b212728d4f6c527c1d50d6169e715f6e02d849811843c13e366d8ca6d0cf5c4" +checksum = "9bdcf77effe2908a21c1011b4d49a7122e0f44487a6ad89db67c55a1687e2572" dependencies = [ "cpp_demangle", "rustc-demangle", @@ -7764,14 +7800,14 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.8.0" +version = "3.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" +checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" dependencies = [ "cfg-if", "fastrand 2.0.1", - "redox_syscall 0.3.5", - "rustix 0.38.20", + "redox_syscall 0.4.1", + "rustix 0.38.21", "windows-sys 0.48.0", ] @@ -7792,9 +7828,9 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "test-fuzz" -version = "4.0.2" +version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e47fe9eb29998b02f6d93627531603da1bc5d7b758e87567af1fafa8c960d876" +checksum = "59bdd14ea6ac9fd993d966b0133da233f534bac0c1a44a2200cec1eb244c733c" dependencies = [ "serde", "test-fuzz-internal", @@ -7804,9 +7840,9 @@ dependencies = [ [[package]] name = "test-fuzz-internal" -version = "4.0.2" +version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52d59630b15f1a2f396030f3003d43c30ae9e99998dab992194cb26a85431851" +checksum = "7eb212edbf2406eed119bd5e1b89bf3201f3f9d9961b5ae39324873f2a0805ed" dependencies = [ "bincode", "cargo_metadata 0.18.1", @@ -7815,9 +7851,9 @@ dependencies = [ [[package]] name = "test-fuzz-macro" -version = "4.0.2" +version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "372a64c51728f98776a624e87b6ed0a8c3e7f2bd18513f56b14281225db513d8" +checksum = "5b2f42720e86f42661bd88d7aaa9d041056530f79c1f0bc6ac90dfb681905e86" dependencies = [ "darling 0.20.3", "if_chain", @@ -7832,9 +7868,9 @@ dependencies = [ [[package]] name = "test-fuzz-runtime" -version = "4.0.2" +version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a16256c08ddf5ec8cf9bcf46512b460a3696f5bdbc9c76a834a5eef5fbada951" +checksum = "6e0aae6ea22e9e0730b79eac5cb7426dc257503d07ecedf7bd799598070908d1" dependencies = [ "hex", "num-traits", @@ -8040,9 +8076,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.9" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d68074620f57a0b21594d9735eb2e98ab38b17f80d3fcb189fca266771ca60d" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" dependencies = [ "bytes", "futures-core", @@ -8077,21 +8113,21 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.2" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" +checksum = "8ff9e3abce27ee2c9a37f9ad37238c1bdd4e789c84ba37df76aa4d528f5072cc" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.20.2", + "toml_edit 0.20.7", ] [[package]] name = "toml_datetime" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" dependencies = [ "serde", ] @@ -8111,9 +8147,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.20.2" +version = "0.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" dependencies = [ "indexmap 2.0.2", "serde", @@ -8163,7 +8199,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" dependencies = [ "async-compression", - "base64 0.21.4", + "base64 0.21.5", "bitflags 2.4.1", "bytes", "futures-core", @@ -8279,12 +8315,12 @@ dependencies = [ [[package]] name = "tracing-log" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" +checksum = "f751112709b4e791d8ce53e32c4ed2d353565a795ce84da2285393f41557bdf2" dependencies = [ - "lazy_static", "log", + "once_cell", "tracing-core", ] @@ -8363,9 +8399,9 @@ dependencies = [ [[package]] name = "trust-dns-proto" -version = "0.23.1" +version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "559ac980345f7f5020883dd3bcacf176355225e01916f8c2efecad7534f682c6" +checksum = "3119112651c157f4488931a01e586aa459736e9d6046d3bd9105ffb69352d374" dependencies = [ "async-trait", "cfg-if", @@ -8388,9 +8424,9 @@ dependencies = [ [[package]] name = "trust-dns-resolver" -version = "0.23.1" +version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c723b0e608b24ad04c73b2607e0241b2c98fd79795a95e98b068b6966138a29d" +checksum = "10a3e6c3aff1718b3c73e395d1f35202ba2ffa847c6a62eea0db8fb4cfe30be6" dependencies = [ "cfg-if", "futures-util", @@ -8404,7 +8440,7 @@ dependencies = [ "thiserror", "tokio", "tracing", - "trust-dns-proto 0.23.1", + "trust-dns-proto 0.23.2", ] [[package]] @@ -8540,9 +8576,9 @@ checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" [[package]] name = "universal-hash" -version = "0.4.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" +checksum = "8326b2c654932e3e4f9196e69d08fdf7cfd718e1dc6f66b347e6024a0c961402" dependencies = [ "generic-array", "subtle", @@ -8554,6 +8590,12 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + [[package]] name = "url" version = "2.4.1" @@ -8788,7 +8830,7 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.20", + "rustix 0.38.21", ] [[package]] @@ -9098,6 +9140,26 @@ dependencies = [ "synstructure", ] +[[package]] +name = "zerocopy" +version = "0.7.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ede7d7c7970ca2215b8c1ccf4d4f354c4733201dfaaba72d44ae5b37472e4901" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b27b1bb92570f989aac0ab7e9cbfbacdd65973f7ee920d9f0e71ebac878fd0b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.38", +] + [[package]] name = "zerofrom" version = "0.1.3" diff --git a/Cargo.toml b/Cargo.toml index 5535d63842ff..10ef5bf2beab 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -111,8 +111,8 @@ reth-ecies = { path = "./crates/net/ecies" } reth-tracing = { path = "./crates/tracing" } reth-tokio-util = { path = "crates/tokio-util" } # revm -revm = { git = "https://github.com/bluealloy/revm", rev = "df44297bc3949dc9e0cec06594c62dd946708b2a" } -revm-primitives = { git = "https://github.com/bluealloy/revm", rev = "df44297bc3949dc9e0cec06594c62dd946708b2a" } +revm = { git = "https://github.com/bluealloy/revm", rev = "1609e07c68048909ad1682c98cf2b9baa76310b5" } +revm-primitives = { git = "https://github.com/bluealloy/revm", rev = "1609e07c68048909ad1682c98cf2b9baa76310b5" } ## eth alloy-primitives = "0.4" @@ -179,7 +179,7 @@ secp256k1 = { version = "0.27.0", default-features = false, features = [ ] } enr = { version = "0.9", default-features = false, features = ["k256"] } # for eip-4844 -c-kzg = "0.1.1" +c-kzg = "0.4.0" ## config confy = "0.5" diff --git a/bin/reth/src/args/mod.rs b/bin/reth/src/args/mod.rs index 0710176a0d59..b6a68eef1043 100644 --- a/bin/reth/src/args/mod.rs +++ b/bin/reth/src/args/mod.rs @@ -31,7 +31,7 @@ pub use stage_args::StageEnum; mod gas_price_oracle_args; pub use gas_price_oracle_args::GasPriceOracleArgs; -/// TxPoolArgs for congiguring the transaction pool +/// TxPoolArgs for configuring the transaction pool mod txpool_args; pub use txpool_args::TxPoolArgs; @@ -44,3 +44,5 @@ mod pruning_args; pub use pruning_args::PruningArgs; pub mod utils; + +pub mod types; diff --git a/bin/reth/src/args/network_args.rs b/bin/reth/src/args/network_args.rs index afaf8cf42374..69d31877d0f4 100644 --- a/bin/reth/src/args/network_args.rs +++ b/bin/reth/src/args/network_args.rs @@ -18,7 +18,8 @@ pub struct NetworkArgs { #[command(flatten)] pub discovery: DiscoveryArgs, - /// Target trusted peer enodes + /// Comma separated enode URLs of trusted peers for P2P connections. + /// /// --trusted-peers enode://abcd@192.168.0.1:30303 #[arg(long, value_delimiter = ',')] pub trusted_peers: Vec, @@ -27,7 +28,7 @@ pub struct NetworkArgs { #[arg(long)] pub trusted_only: bool, - /// Bootnodes to connect to initially. + /// Comma separated enode URLs for P2P discovery bootstrap. /// /// Will fall back to a network-specific default if not specified. #[arg(long, value_delimiter = ',')] diff --git a/bin/reth/src/args/rpc_server_args.rs b/bin/reth/src/args/rpc_server_args.rs index 4b66eae3bd22..175c73b1ded0 100644 --- a/bin/reth/src/args/rpc_server_args.rs +++ b/bin/reth/src/args/rpc_server_args.rs @@ -1,7 +1,7 @@ //! clap [Args](clap::Args) for RPC related arguments. use crate::{ - args::GasPriceOracleArgs, + args::{types::ZeroAsNone, GasPriceOracleArgs}, cli::{ components::{RethNodeComponents, RethRpcComponents, RethRpcServerHandles}, config::RethRpcConfig, @@ -52,7 +52,7 @@ pub(crate) const RPC_DEFAULT_MAX_REQUEST_SIZE_MB: u32 = 15; /// Default max response size in MB. /// /// This is only relevant for very large trace responses. -pub(crate) const RPC_DEFAULT_MAX_RESPONSE_SIZE_MB: u32 = 115; +pub(crate) const RPC_DEFAULT_MAX_RESPONSE_SIZE_MB: u32 = 150; /// Default number of incoming connections. pub(crate) const RPC_DEFAULT_MAX_CONNECTIONS: u32 = 500; @@ -116,10 +116,23 @@ pub struct RpcServerArgs { #[arg(long = "authrpc.port", default_value_t = constants::DEFAULT_AUTH_PORT)] pub auth_port: u16, - /// Path to a JWT secret to use for authenticated RPC endpoints + /// Path to a JWT secret to use for the authenticated engine-API RPC server. + /// + /// This will enforce JWT authentication for all requests coming from the consensus layer. + /// + /// If no path is provided, a secret will be generated and stored in the datadir under + /// `//jwt.hex`. For mainnet this would be `~/.reth/mainnet/jwt.hex` by default. #[arg(long = "authrpc.jwtsecret", value_name = "PATH", global = true, required = false)] pub auth_jwtsecret: Option, + /// Hex encoded JWT secret to authenticate the regular RPC server(s), see `--http.api` and + /// `--ws.api`. + /// + /// This is __not__ used for the authenticated engine-API RPC server, see + /// `--authrpc.jwtsecret`. + #[arg(long = "rpc.jwtsecret", value_name = "HEX", global = true, required = false)] + pub rpc_jwtsecret: Option, + /// Set the maximum RPC request payload size for both HTTP and WS in megabytes. #[arg(long, default_value_t = RPC_DEFAULT_MAX_REQUEST_SIZE_MB)] pub rpc_max_request_size: u32, @@ -140,9 +153,13 @@ pub struct RpcServerArgs { #[arg(long, value_name = "COUNT", default_value_t = constants::DEFAULT_MAX_TRACING_REQUESTS)] pub rpc_max_tracing_requests: u32, - /// Maximum number of logs that can be returned in a single response. - #[arg(long, value_name = "COUNT", default_value_t = constants::DEFAULT_MAX_LOGS_PER_RESPONSE)] - pub rpc_max_logs_per_response: usize, + /// Maximum number of blocks that could be scanned per filter request. (0 = entire chain) + #[arg(long, value_name = "COUNT", default_value_t = ZeroAsNone::new(constants::DEFAULT_MAX_BLOCKS_PER_FILTER))] + pub rpc_max_blocks_per_filter: ZeroAsNone, + + /// Maximum number of logs that can be returned in a single response. (0 = no limit) + #[arg(long, value_name = "COUNT", default_value_t = ZeroAsNone::new(constants::DEFAULT_MAX_LOGS_PER_RESPONSE as u64))] + pub rpc_max_logs_per_response: ZeroAsNone, /// Maximum gas limit for `eth_call` and call tracing RPC methods. #[arg( @@ -326,7 +343,8 @@ impl RethRpcConfig for RpcServerArgs { fn eth_config(&self) -> EthConfig { EthConfig::default() .max_tracing_requests(self.rpc_max_tracing_requests) - .max_logs_per_response(self.rpc_max_logs_per_response) + .max_blocks_per_filter(self.rpc_max_blocks_per_filter.unwrap_or_max()) + .max_logs_per_response(self.rpc_max_logs_per_response.unwrap_or_max() as usize) .rpc_gas_cap(self.rpc_gas_cap) .gpo_config(self.gas_price_oracle_config()) } @@ -392,7 +410,7 @@ impl RethRpcConfig for RpcServerArgs { } fn rpc_server_config(&self) -> RpcServerConfig { - let mut config = RpcServerConfig::default(); + let mut config = RpcServerConfig::default().with_jwt_secret(self.rpc_secret_key()); if self.http { let socket_address = SocketAddr::new(self.http_addr, self.http_port); @@ -422,7 +440,7 @@ impl RethRpcConfig for RpcServerArgs { Ok(AuthServerConfig::builder(jwt_secret).socket_addr(address).build()) } - fn jwt_secret(&self, default_jwt_path: PathBuf) -> Result { + fn auth_jwt_secret(&self, default_jwt_path: PathBuf) -> Result { match self.auth_jwtsecret.as_ref() { Some(fpath) => { debug!(target: "reth::cli", user_path=?fpath, "Reading JWT auth secret file"); @@ -439,6 +457,10 @@ impl RethRpcConfig for RpcServerArgs { } } } + + fn rpc_secret_key(&self) -> Option { + self.rpc_jwtsecret.clone() + } } /// clap value parser for [RpcModuleSelection]. @@ -598,4 +620,36 @@ mod tests { ); assert_eq!(config.ipc_endpoint().unwrap().path(), constants::DEFAULT_IPC_ENDPOINT); } + + #[test] + fn test_zero_filter_limits() { + let args = CommandParser::::parse_from([ + "reth", + "--rpc-max-blocks-per-filter", + "0", + "--rpc-max-logs-per-response", + "0", + ]) + .args; + + let config = args.eth_config().filter_config(); + assert_eq!(config.max_blocks_per_filter, Some(u64::MAX)); + assert_eq!(config.max_logs_per_response, Some(usize::MAX)); + } + + #[test] + fn test_custom_filter_limits() { + let args = CommandParser::::parse_from([ + "reth", + "--rpc-max-blocks-per-filter", + "100", + "--rpc-max-logs-per-response", + "200", + ]) + .args; + + let config = args.eth_config().filter_config(); + assert_eq!(config.max_blocks_per_filter, Some(100)); + assert_eq!(config.max_logs_per_response, Some(200)); + } } diff --git a/bin/reth/src/args/secret_key.rs b/bin/reth/src/args/secret_key.rs index 7ff36bfb3b3d..9ecb1792ebe0 100644 --- a/bin/reth/src/args/secret_key.rs +++ b/bin/reth/src/args/secret_key.rs @@ -15,7 +15,7 @@ pub enum SecretKeyError { SecretKeyDecodeError(#[from] SecretKeyBaseError), #[error(transparent)] SecretKeyFsPathError(#[from] FsPathError), - #[error("Failed to access key file {secret_file:?}: {error}")] + #[error("failed to access key file {secret_file:?}: {error}")] FailedToAccessKeyFile { error: io::Error, secret_file: PathBuf }, } diff --git a/bin/reth/src/args/types.rs b/bin/reth/src/args/types.rs new file mode 100644 index 000000000000..d193e2dffeae --- /dev/null +++ b/bin/reth/src/args/types.rs @@ -0,0 +1,49 @@ +//! Additional helper types for CLI parsing. + +use std::{fmt, str::FromStr}; + +/// A helper type that maps `0` to `None` when parsing CLI arguments. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub struct ZeroAsNone(pub Option); + +impl ZeroAsNone { + /// Returns the inner value. + pub const fn new(value: u64) -> Self { + Self(Some(value)) + } + + /// Returns the inner value or `u64::MAX` if `None`. + pub fn unwrap_or_max(self) -> u64 { + self.0.unwrap_or(u64::MAX) + } +} + +impl fmt::Display for ZeroAsNone { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self.0 { + Some(value) => write!(f, "{}", value), + None => write!(f, "0"), + } + } +} + +impl FromStr for ZeroAsNone { + type Err = std::num::ParseIntError; + + fn from_str(s: &str) -> Result { + let value = s.parse::()?; + Ok(Self(if value == 0 { None } else { Some(value) })) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_zero_parse() { + let val = "0".parse::().unwrap(); + assert_eq!(val, ZeroAsNone(None)); + assert_eq!(val.unwrap_or_max(), u64::MAX); + } +} diff --git a/bin/reth/src/args/utils.rs b/bin/reth/src/args/utils.rs index 3a59556aabb0..ab195311088b 100644 --- a/bin/reth/src/args/utils.rs +++ b/bin/reth/src/args/utils.rs @@ -34,8 +34,11 @@ pub fn chain_spec_value_parser(s: &str) -> eyre::Result, eyre::Er }) } -/// Clap value parser for [ChainSpec]s that takes either a built-in genesis format or the path -/// to a custom one. +/// Clap value parser for [ChainSpec]s. +/// +/// The value parser matches either a known chain, the path +/// to a json file, or a json formatted string in-memory. The json can be either +/// a serialized [ChainSpec] or Genesis struct. pub fn genesis_value_parser(s: &str) -> eyre::Result, eyre::Error> { Ok(match s { "mainnet" => MAINNET.clone(), @@ -44,8 +47,47 @@ pub fn genesis_value_parser(s: &str) -> eyre::Result, eyre::Error "holesky" => HOLESKY.clone(), "dev" => DEV.clone(), _ => { - let raw = fs::read_to_string(PathBuf::from(shellexpand::full(s)?.into_owned()))?; + // try to read json from path first + let mut raw = + match fs::read_to_string(PathBuf::from(shellexpand::full(s)?.into_owned())) { + Ok(raw) => raw, + Err(io_err) => { + // valid json may start with "\n", but must contain "{" + if s.contains('{') { + s.to_string() + } else { + return Err(io_err.into()) // assume invalid path + } + } + }; + + // The ethereum mainnet TTD is 58750000000000000000000, and geth serializes this + // without quotes, because that is how golang `big.Int`s marshal in JSON. Numbers + // are arbitrary precision in JSON, so this is valid JSON. This number is also + // greater than a `u64`. + // + // Unfortunately, serde_json only supports parsing up to `u64`, resorting to `f64` + // once `u64` overflows: + // + // + // + // + // serde_json does have an arbitrary precision feature, but this breaks untagged + // enums in serde: + // + // + // + // To solve this, we surround the mainnet TTD with quotes, which our custom Visitor + // accepts. + if raw.contains("58750000000000000000000") && + !raw.contains("\"58750000000000000000000\"") + { + raw = raw.replacen("58750000000000000000000", "\"58750000000000000000000\"", 1); + } + + // both serialized Genesis and ChainSpec structs supported let genesis: AllGenesisFormats = serde_json::from_str(&raw)?; + Arc::new(genesis.into()) } }) @@ -63,16 +105,16 @@ pub fn hash_or_num_value_parser(value: &str) -> eyre::Result eyre::Result Result; + fn auth_jwt_secret(&self, default_jwt_path: PathBuf) -> Result; + + /// Returns the configured jwt secret key for the regular rpc servers, if any. + /// + /// Note: this is not used for the auth server (engine API). + fn rpc_secret_key(&self) -> Option; } /// A trait that provides payload builder settings. diff --git a/bin/reth/src/cli/mod.rs b/bin/reth/src/cli/mod.rs index 5fb1224397a4..0e4586b528c9 100644 --- a/bin/reth/src/cli/mod.rs +++ b/bin/reth/src/cli/mod.rs @@ -79,7 +79,8 @@ impl Cli { /// Execute the configured cli command. pub fn run(mut self) -> eyre::Result<()> { // add network name to logs dir - self.logs.log_directory = self.logs.log_directory.join(self.chain.chain.to_string()); + self.logs.log_file_directory = + self.logs.log_file_directory.join(self.chain.chain.to_string()); let _guard = self.init_tracing()?; @@ -105,13 +106,12 @@ impl Cli { pub fn init_tracing(&self) -> eyre::Result> { let mut layers = vec![reth_tracing::stdout(self.verbosity.directive(), &self.logs.color.to_string())]; - let guard = self.logs.layer()?.map(|(layer, guard)| { - layers.push(layer); - guard - }); + + let (additional_layers, guard) = self.logs.layers()?; + layers.extend(additional_layers); reth_tracing::init(layers); - Ok(guard.flatten()) + Ok(guard) } /// Configures the given node extension. @@ -181,31 +181,34 @@ impl Commands { #[command(next_help_heading = "Logging")] pub struct Logs { /// The path to put log files in. - #[arg( - long = "log.directory", - value_name = "PATH", - global = true, - default_value_t, - conflicts_with = "journald" - )] - log_directory: PlatformPath, + #[arg(long = "log.file.directory", value_name = "PATH", global = true, default_value_t)] + log_file_directory: PlatformPath, - /// The maximum size (in MB) of log files. - #[arg(long = "log.max-size", value_name = "SIZE", global = true, default_value_t = 200)] - log_max_size: u64, + /// The maximum size (in MB) of one log file. + #[arg(long = "log.file.max-size", value_name = "SIZE", global = true, default_value_t = 200)] + log_file_max_size: u64, /// The maximum amount of log files that will be stored. If set to 0, background file logging /// is disabled. - #[arg(long = "log.max-files", value_name = "COUNT", global = true, default_value_t = 5)] - log_max_files: usize, + #[arg(long = "log.file.max-files", value_name = "COUNT", global = true, default_value_t = 5)] + log_file_max_files: usize, - /// Log events to journald. - #[arg(long = "log.journald", global = true, conflicts_with = "log_directory")] + /// The filter to use for logs written to the log file. + #[arg(long = "log.file.filter", value_name = "FILTER", global = true, default_value = "debug")] + log_file_filter: String, + + /// Write logs to journald. + #[arg(long = "log.journald", global = true)] journald: bool, - /// The filter to use for logs written to the log file. - #[arg(long = "log.filter", value_name = "FILTER", global = true, default_value = "error")] - filter: String, + /// The filter to use for logs written to journald. + #[arg( + long = "log.journald.filter", + value_name = "FILTER", + global = true, + default_value = "error" + )] + journald_filter: String, /// Sets whether or not the formatter emits ANSI terminal escape codes for colors and other /// text formatting. @@ -222,28 +225,36 @@ pub struct Logs { const MB_TO_BYTES: u64 = 1024 * 1024; impl Logs { - /// Builds a tracing layer from the current log options. - pub fn layer(&self) -> eyre::Result, Option)>> + /// Builds tracing layers from the current log options. + pub fn layers(&self) -> eyre::Result<(Vec>, Option)> where S: Subscriber, for<'a> S: LookupSpan<'a>, { - let filter = EnvFilter::builder().parse(&self.filter)?; + let mut layers = Vec::new(); if self.journald { - Ok(Some((reth_tracing::journald(filter).expect("Could not connect to journald"), None))) - } else if self.log_max_files > 0 { + layers.push( + reth_tracing::journald(EnvFilter::builder().parse(&self.journald_filter)?) + .expect("Could not connect to journald"), + ); + } + + let file_guard = if self.log_file_max_files > 0 { let (layer, guard) = reth_tracing::file( - filter, - &self.log_directory, + EnvFilter::builder().parse(&self.log_file_filter)?, + &self.log_file_directory, "reth.log", - self.log_max_size * MB_TO_BYTES, - self.log_max_files, + self.log_file_max_size * MB_TO_BYTES, + self.log_file_max_files, ); - Ok(Some((layer, Some(guard)))) + layers.push(layer); + Some(guard) } else { - Ok(None) - } + None + }; + + Ok((layers, file_guard)) } } @@ -342,13 +353,15 @@ mod tests { #[test] fn parse_logs_path() { let mut reth = Cli::<()>::try_parse_from(["reth", "node"]).unwrap(); - reth.logs.log_directory = reth.logs.log_directory.join(reth.chain.chain.to_string()); - let log_dir = reth.logs.log_directory; + reth.logs.log_file_directory = + reth.logs.log_file_directory.join(reth.chain.chain.to_string()); + let log_dir = reth.logs.log_file_directory; assert!(log_dir.as_ref().ends_with("reth/logs/mainnet"), "{:?}", log_dir); let mut reth = Cli::<()>::try_parse_from(["reth", "node", "--chain", "sepolia"]).unwrap(); - reth.logs.log_directory = reth.logs.log_directory.join(reth.chain.chain.to_string()); - let log_dir = reth.logs.log_directory; + reth.logs.log_file_directory = + reth.logs.log_file_directory.join(reth.chain.chain.to_string()); + let log_dir = reth.logs.log_file_directory; assert!(log_dir.as_ref().ends_with("reth/logs/sepolia"), "{:?}", log_dir); } diff --git a/bin/reth/src/db/snapshots/bench.rs b/bin/reth/src/db/snapshots/bench.rs index edcfe6fa503f..47c5ec2fa077 100644 --- a/bin/reth/src/db/snapshots/bench.rs +++ b/bin/reth/src/db/snapshots/bench.rs @@ -4,7 +4,7 @@ use reth_primitives::{ ChainSpec, SnapshotSegment, }; use reth_provider::{DatabaseProviderRO, ProviderFactory}; -use std::{sync::Arc, time::Instant}; +use std::{fmt::Debug, sync::Arc, time::Instant}; #[derive(Debug)] pub(crate) enum BenchKind { @@ -14,7 +14,7 @@ pub(crate) enum BenchKind { RandomHash, } -pub(crate) fn bench( +pub(crate) fn bench( bench_kind: BenchKind, db: (DatabaseEnvRO, Arc), segment: SnapshotSegment, @@ -24,28 +24,34 @@ pub(crate) fn bench( database_method: F2, ) -> eyre::Result<()> where - F1: FnMut() -> eyre::Result<()>, - F2: Fn(DatabaseProviderRO<'_, DatabaseEnvRO>) -> eyre::Result<()>, + F1: FnMut() -> eyre::Result, + F2: Fn(DatabaseProviderRO<'_, DatabaseEnvRO>) -> eyre::Result, + R: Debug + PartialEq, { let (db, chain) = db; println!(); println!("############"); println!("## [{segment:?}] [{compression:?}] [{filters:?}] [{bench_kind:?}]"); - { + let snap_result = { let start = Instant::now(); - snapshot_method()?; + let result = snapshot_method()?; let end = start.elapsed().as_micros(); println!("# snapshot {bench_kind:?} | {end} μs"); - } - { + result + }; + + let db_result = { let factory = ProviderFactory::new(db, chain); let provider = factory.provider()?; let start = Instant::now(); - database_method(provider)?; + let result = database_method(provider)?; let end = start.elapsed().as_micros(); println!("# database {bench_kind:?} | {end} μs"); - } + result + }; + + assert_eq!(snap_result, db_result); Ok(()) } diff --git a/bin/reth/src/db/snapshots/headers.rs b/bin/reth/src/db/snapshots/headers.rs index 4fc60f3cf6f1..6533dd881759 100644 --- a/bin/reth/src/db/snapshots/headers.rs +++ b/bin/reth/src/db/snapshots/headers.rs @@ -2,23 +2,23 @@ use super::{ bench::{bench, BenchKind}, Command, }; -use crate::utils::DbTool; use rand::{seq::SliceRandom, Rng}; -use reth_db::{database::Database, open_db_read_only, table::Decompress, DatabaseEnvRO}; +use reth_db::{database::Database, open_db_read_only, snapshot::HeaderMask}; use reth_interfaces::db::LogLevel; -use reth_nippy_jar::NippyJar; use reth_primitives::{ snapshot::{Compression, Filters, InclusionFilter, PerfectHashingFunction}, - ChainSpec, Header, SnapshotSegment, + BlockHash, ChainSpec, Header, SnapshotSegment, }; -use reth_provider::{HeaderProvider, ProviderError, ProviderFactory}; -use reth_snapshot::segments::{get_snapshot_segment_file_name, Headers, Segment}; +use reth_provider::{ + providers::SnapshotProvider, DatabaseProviderRO, HeaderProvider, ProviderError, ProviderFactory, +}; +use reth_snapshot::segments::{Headers, Segment}; use std::{path::Path, sync::Arc}; impl Command { - pub(crate) fn generate_headers_snapshot( + pub(crate) fn generate_headers_snapshot( &self, - tool: &DbTool<'_, DatabaseEnvRO>, + provider: &DatabaseProviderRO<'_, DB>, compression: Compression, inclusion_filter: InclusionFilter, phf: PerfectHashingFunction, @@ -31,7 +31,7 @@ impl Command { Filters::WithoutFilters }, ); - segment.snapshot(&tool.db.tx()?, self.from..=(self.from + self.block_interval - 1))?; + segment.snapshot::(provider, self.from..=(self.from + self.block_interval - 1))?; Ok(()) } @@ -55,20 +55,12 @@ impl Command { let mut row_indexes = range.clone().collect::>(); let mut rng = rand::thread_rng(); - let mut dictionaries = None; - let mut jar = NippyJar::load_without_header(&get_snapshot_segment_file_name( - SnapshotSegment::Headers, - filters, - compression, - &range, - ))?; - - let (provider, decompressors) = self.prepare_jar_provider(&mut jar, &mut dictionaries)?; - let mut cursor = if !decompressors.is_empty() { - provider.cursor_with_decompressors(decompressors) - } else { - provider.cursor() - }; + let path = + SnapshotSegment::Headers.filename_with_configuration(filters, compression, &range); + let provider = SnapshotProvider::default(); + let jar_provider = + provider.get_segment_provider(SnapshotSegment::Headers, self.from, Some(path))?; + let mut cursor = jar_provider.cursor()?; for bench_kind in [BenchKind::Walk, BenchKind::RandomAll] { bench( @@ -79,14 +71,9 @@ impl Command { compression, || { for num in row_indexes.iter() { - Header::decompress( - cursor - .row_by_number_with_cols::<0b01, 2>((num - self.from) as usize)? - .ok_or(ProviderError::HeaderNotFound((*num).into()))?[0], - )?; - // TODO: replace with below when eventually SnapshotProvider re-uses cursor - // provider.header_by_number(num as - // u64)?.ok_or(ProviderError::HeaderNotFound((*num as u64).into()))?; + cursor + .get_one::>((*num).into())? + .ok_or(ProviderError::HeaderNotFound((*num).into()))?; } Ok(()) }, @@ -114,18 +101,14 @@ impl Command { filters, compression, || { - Header::decompress( - cursor - .row_by_number_with_cols::<0b01, 2>((num - self.from) as usize)? - .ok_or(ProviderError::HeaderNotFound((num as u64).into()))?[0], - )?; - Ok(()) + Ok(cursor + .get_one::>(num.into())? + .ok_or(ProviderError::HeaderNotFound(num.into()))?) }, |provider| { - provider + Ok(provider .header_by_number(num as u64)? - .ok_or(ProviderError::HeaderNotFound((num as u64).into()))?; - Ok(()) + .ok_or(ProviderError::HeaderNotFound((num as u64).into()))?) }, )?; } @@ -146,21 +129,19 @@ impl Command { filters, compression, || { - let header = Header::decompress( - cursor - .row_by_key_with_cols::<0b01, 2>(header_hash.as_slice())? - .ok_or(ProviderError::HeaderNotFound(header_hash.into()))?[0], - )?; + let (header, hash) = cursor + .get_two::>((&header_hash).into())? + .ok_or(ProviderError::HeaderNotFound(header_hash.into()))?; // Might be a false positive, so in the real world we have to validate it - assert_eq!(header.hash_slow(), header_hash); - Ok(()) + assert_eq!(hash, header_hash); + + Ok(header) }, |provider| { - provider + Ok(provider .header(&header_hash)? - .ok_or(ProviderError::HeaderNotFound(header_hash.into()))?; - Ok(()) + .ok_or(ProviderError::HeaderNotFound(header_hash.into()))?) }, )?; } diff --git a/bin/reth/src/db/snapshots/mod.rs b/bin/reth/src/db/snapshots/mod.rs index afc2b0ce8529..efce4878393a 100644 --- a/bin/reth/src/db/snapshots/mod.rs +++ b/bin/reth/src/db/snapshots/mod.rs @@ -1,44 +1,22 @@ -use crate::{db::genesis_value_parser, utils::DbTool}; use clap::Parser; use itertools::Itertools; -use reth_db::open_db_read_only; +use reth_db::{open_db_read_only, DatabaseEnvRO}; use reth_interfaces::db::LogLevel; -use reth_nippy_jar::{ - compression::{DecoderDictionary, Decompressor}, - NippyJar, -}; use reth_primitives::{ snapshot::{Compression, InclusionFilter, PerfectHashingFunction}, BlockNumber, ChainSpec, SnapshotSegment, }; -use reth_provider::providers::SnapshotProvider; +use reth_provider::ProviderFactory; use std::{path::Path, sync::Arc}; mod bench; mod headers; +mod receipts; +mod transactions; #[derive(Parser, Debug)] /// Arguments for the `reth db snapshot` command. pub struct Command { - /// The chain this node is running. - /// - /// Possible values are either a built-in chain or the path to a chain specification file. - /// - /// Built-in chains: - /// - mainnet - /// - goerli - /// - sepolia - /// - holesky - #[arg( - long, - value_name = "CHAIN_OR_PATH", - verbatim_doc_comment, - default_value = "mainnet", - value_parser = genesis_value_parser, - global = true, - )] - chain: Arc, - /// Snapshot segments to generate. segments: Vec, @@ -87,19 +65,33 @@ impl Command { { let db = open_db_read_only(db_path, None)?; - let tool = DbTool::new(&db, chain.clone())?; + let factory = ProviderFactory::new(db, chain.clone()); + let provider = factory.provider()?; if !self.only_bench { for ((mode, compression), phf) in all_combinations.clone() { match mode { - SnapshotSegment::Headers => self.generate_headers_snapshot( - &tool, - *compression, - InclusionFilter::Cuckoo, - *phf, - )?, - SnapshotSegment::Transactions => todo!(), - SnapshotSegment::Receipts => todo!(), + SnapshotSegment::Headers => self + .generate_headers_snapshot::( + &provider, + *compression, + InclusionFilter::Cuckoo, + *phf, + )?, + SnapshotSegment::Transactions => self + .generate_transactions_snapshot::( + &provider, + *compression, + InclusionFilter::Cuckoo, + *phf, + )?, + SnapshotSegment::Receipts => self + .generate_receipts_snapshot::( + &provider, + *compression, + InclusionFilter::Cuckoo, + *phf, + )?, } } } @@ -116,30 +108,26 @@ impl Command { InclusionFilter::Cuckoo, *phf, )?, - SnapshotSegment::Transactions => todo!(), - SnapshotSegment::Receipts => todo!(), + SnapshotSegment::Transactions => self.bench_transactions_snapshot( + db_path, + log_level, + chain.clone(), + *compression, + InclusionFilter::Cuckoo, + *phf, + )?, + SnapshotSegment::Receipts => self.bench_receipts_snapshot( + db_path, + log_level, + chain.clone(), + *compression, + InclusionFilter::Cuckoo, + *phf, + )?, } } } Ok(()) } - - /// Returns a [`SnapshotProvider`] of the provided [`NippyJar`], alongside a list of - /// [`DecoderDictionary`] and [`Decompressor`] if necessary. - fn prepare_jar_provider<'a>( - &self, - jar: &'a mut NippyJar, - dictionaries: &'a mut Option>>, - ) -> eyre::Result<(SnapshotProvider<'a>, Vec>)> { - let mut decompressors: Vec> = vec![]; - if let Some(reth_nippy_jar::compression::Compressors::Zstd(zstd)) = jar.compressor_mut() { - if zstd.use_dict { - *dictionaries = zstd.generate_decompress_dictionaries(); - decompressors = zstd.generate_decompressors(dictionaries.as_ref().expect("qed"))?; - } - } - - Ok((SnapshotProvider { jar: &*jar, jar_start_block: self.from }, decompressors)) - } } diff --git a/bin/reth/src/db/snapshots/receipts.rs b/bin/reth/src/db/snapshots/receipts.rs new file mode 100644 index 000000000000..ffe09814e2aa --- /dev/null +++ b/bin/reth/src/db/snapshots/receipts.rs @@ -0,0 +1,155 @@ +use super::{ + bench::{bench, BenchKind}, + Command, Compression, PerfectHashingFunction, +}; +use rand::{seq::SliceRandom, Rng}; +use reth_db::{database::Database, open_db_read_only, snapshot::ReceiptMask}; +use reth_interfaces::db::LogLevel; +use reth_primitives::{ + snapshot::{Filters, InclusionFilter}, + ChainSpec, Receipt, SnapshotSegment, +}; +use reth_provider::{ + providers::SnapshotProvider, DatabaseProviderRO, ProviderError, ProviderFactory, + ReceiptProvider, TransactionsProvider, TransactionsProviderExt, +}; +use reth_snapshot::{segments, segments::Segment}; +use std::{path::Path, sync::Arc}; + +impl Command { + pub(crate) fn generate_receipts_snapshot( + &self, + provider: &DatabaseProviderRO<'_, DB>, + compression: Compression, + inclusion_filter: InclusionFilter, + phf: PerfectHashingFunction, + ) -> eyre::Result<()> { + let segment = segments::Receipts::new( + compression, + if self.with_filters { + Filters::WithFilters(inclusion_filter, phf) + } else { + Filters::WithoutFilters + }, + ); + segment.snapshot::(provider, self.from..=(self.from + self.block_interval - 1))?; + + Ok(()) + } + + pub(crate) fn bench_receipts_snapshot( + &self, + db_path: &Path, + log_level: Option, + chain: Arc, + compression: Compression, + inclusion_filter: InclusionFilter, + phf: PerfectHashingFunction, + ) -> eyre::Result<()> { + let filters = if self.with_filters { + Filters::WithFilters(inclusion_filter, phf) + } else { + Filters::WithoutFilters + }; + + let block_range = self.from..=(self.from + self.block_interval - 1); + + let mut rng = rand::thread_rng(); + + let tx_range = ProviderFactory::new(open_db_read_only(db_path, log_level)?, chain.clone()) + .provider()? + .transaction_range_by_block_range(block_range.clone())?; + + let mut row_indexes = tx_range.clone().collect::>(); + + let path = SnapshotSegment::Receipts.filename_with_configuration( + filters, + compression, + &block_range, + ); + let provider = SnapshotProvider::default(); + let jar_provider = + provider.get_segment_provider(SnapshotSegment::Receipts, self.from, Some(path))?; + let mut cursor = jar_provider.cursor()?; + + for bench_kind in [BenchKind::Walk, BenchKind::RandomAll] { + bench( + bench_kind, + (open_db_read_only(db_path, log_level)?, chain.clone()), + SnapshotSegment::Receipts, + filters, + compression, + || { + for num in row_indexes.iter() { + cursor + .get_one::>((*num).into())? + .ok_or(ProviderError::ReceiptNotFound((*num).into()))?; + } + Ok(()) + }, + |provider| { + for num in row_indexes.iter() { + provider + .receipt(*num)? + .ok_or(ProviderError::ReceiptNotFound((*num).into()))?; + } + Ok(()) + }, + )?; + + // For random walk + row_indexes.shuffle(&mut rng); + } + + // BENCHMARK QUERYING A RANDOM RECEIPT BY NUMBER + { + let num = row_indexes[rng.gen_range(0..row_indexes.len())]; + bench( + BenchKind::RandomOne, + (open_db_read_only(db_path, log_level)?, chain.clone()), + SnapshotSegment::Receipts, + filters, + compression, + || { + Ok(cursor + .get_one::>(num.into())? + .ok_or(ProviderError::ReceiptNotFound(num.into()))?) + }, + |provider| { + Ok(provider + .receipt(num as u64)? + .ok_or(ProviderError::ReceiptNotFound((num as u64).into()))?) + }, + )?; + } + + // BENCHMARK QUERYING A RANDOM RECEIPT BY HASH + { + let num = row_indexes[rng.gen_range(0..row_indexes.len())] as u64; + let tx_hash = + ProviderFactory::new(open_db_read_only(db_path, log_level)?, chain.clone()) + .transaction_by_id(num)? + .ok_or(ProviderError::ReceiptNotFound(num.into()))? + .hash(); + + bench( + BenchKind::RandomHash, + (open_db_read_only(db_path, log_level)?, chain.clone()), + SnapshotSegment::Receipts, + filters, + compression, + || { + Ok(cursor + .get_one::>((&tx_hash).into())? + .ok_or(ProviderError::ReceiptNotFound(tx_hash.into()))?) + }, + |provider| { + Ok(provider + .receipt_by_hash(tx_hash)? + .ok_or(ProviderError::ReceiptNotFound(tx_hash.into()))?) + }, + )?; + } + Ok(()) + } +} diff --git a/bin/reth/src/db/snapshots/transactions.rs b/bin/reth/src/db/snapshots/transactions.rs new file mode 100644 index 000000000000..a52c33ddb7f9 --- /dev/null +++ b/bin/reth/src/db/snapshots/transactions.rs @@ -0,0 +1,160 @@ +use super::{ + bench::{bench, BenchKind}, + Command, Compression, PerfectHashingFunction, +}; +use rand::{seq::SliceRandom, Rng}; +use reth_db::{database::Database, open_db_read_only, snapshot::TransactionMask}; +use reth_interfaces::db::LogLevel; +use reth_primitives::{ + snapshot::{Filters, InclusionFilter}, + ChainSpec, SnapshotSegment, TransactionSignedNoHash, +}; +use reth_provider::{ + providers::SnapshotProvider, DatabaseProviderRO, ProviderError, ProviderFactory, + TransactionsProvider, TransactionsProviderExt, +}; +use reth_snapshot::{segments, segments::Segment}; +use std::{path::Path, sync::Arc}; + +impl Command { + pub(crate) fn generate_transactions_snapshot( + &self, + provider: &DatabaseProviderRO<'_, DB>, + compression: Compression, + inclusion_filter: InclusionFilter, + phf: PerfectHashingFunction, + ) -> eyre::Result<()> { + let segment = segments::Transactions::new( + compression, + if self.with_filters { + Filters::WithFilters(inclusion_filter, phf) + } else { + Filters::WithoutFilters + }, + ); + segment.snapshot::(provider, self.from..=(self.from + self.block_interval - 1))?; + + Ok(()) + } + + pub(crate) fn bench_transactions_snapshot( + &self, + db_path: &Path, + log_level: Option, + chain: Arc, + compression: Compression, + inclusion_filter: InclusionFilter, + phf: PerfectHashingFunction, + ) -> eyre::Result<()> { + let filters = if self.with_filters { + Filters::WithFilters(inclusion_filter, phf) + } else { + Filters::WithoutFilters + }; + + let block_range = self.from..=(self.from + self.block_interval - 1); + + let mut rng = rand::thread_rng(); + + let tx_range = ProviderFactory::new(open_db_read_only(db_path, log_level)?, chain.clone()) + .provider()? + .transaction_range_by_block_range(block_range.clone())?; + + let mut row_indexes = tx_range.clone().collect::>(); + + let path = SnapshotSegment::Transactions.filename_with_configuration( + filters, + compression, + &block_range, + ); + let provider = SnapshotProvider::default(); + let jar_provider = + provider.get_segment_provider(SnapshotSegment::Transactions, self.from, Some(path))?; + let mut cursor = jar_provider.cursor()?; + + for bench_kind in [BenchKind::Walk, BenchKind::RandomAll] { + bench( + bench_kind, + (open_db_read_only(db_path, log_level)?, chain.clone()), + SnapshotSegment::Transactions, + filters, + compression, + || { + for num in row_indexes.iter() { + cursor + .get_one::>((*num).into())? + .ok_or(ProviderError::TransactionNotFound((*num).into()))? + .with_hash(); + } + Ok(()) + }, + |provider| { + for num in row_indexes.iter() { + provider + .transaction_by_id(*num)? + .ok_or(ProviderError::TransactionNotFound((*num).into()))?; + } + Ok(()) + }, + )?; + + // For random walk + row_indexes.shuffle(&mut rng); + } + + // BENCHMARK QUERYING A RANDOM TRANSACTION BY NUMBER + { + let num = row_indexes[rng.gen_range(0..row_indexes.len())]; + bench( + BenchKind::RandomOne, + (open_db_read_only(db_path, log_level)?, chain.clone()), + SnapshotSegment::Transactions, + filters, + compression, + || { + Ok(cursor + .get_one::>(num.into())? + .ok_or(ProviderError::TransactionNotFound(num.into()))? + .with_hash()) + }, + |provider| { + Ok(provider + .transaction_by_id(num as u64)? + .ok_or(ProviderError::TransactionNotFound((num as u64).into()))?) + }, + )?; + } + + // BENCHMARK QUERYING A RANDOM TRANSACTION BY HASH + { + let num = row_indexes[rng.gen_range(0..row_indexes.len())] as u64; + let transaction_hash = + ProviderFactory::new(open_db_read_only(db_path, log_level)?, chain.clone()) + .transaction_by_id(num)? + .ok_or(ProviderError::TransactionNotFound(num.into()))? + .hash(); + + bench( + BenchKind::RandomHash, + (open_db_read_only(db_path, log_level)?, chain.clone()), + SnapshotSegment::Transactions, + filters, + compression, + || { + Ok(cursor + .get_one::>( + (&transaction_hash).into(), + )? + .ok_or(ProviderError::TransactionNotFound(transaction_hash.into()))? + .with_hash()) + }, + |provider| { + Ok(provider + .transaction_by_hash(transaction_hash)? + .ok_or(ProviderError::TransactionNotFound(transaction_hash.into()))?) + }, + )?; + } + Ok(()) + } +} diff --git a/bin/reth/src/dirs.rs b/bin/reth/src/dirs.rs index c93e8234ba4d..c7bf9dc80398 100644 --- a/bin/reth/src/dirs.rs +++ b/bin/reth/src/dirs.rs @@ -260,26 +260,36 @@ impl ChainPath { } /// Returns the path to the db directory for this chain. + /// + /// `//db` pub fn db_path(&self) -> PathBuf { self.0.join("db").into() } /// Returns the path to the reth p2p secret key for this chain. + /// + /// `//discovery-secret` pub fn p2p_secret_path(&self) -> PathBuf { self.0.join("discovery-secret").into() } /// Returns the path to the known peers file for this chain. + /// + /// `//known-peers.json` pub fn known_peers_path(&self) -> PathBuf { self.0.join("known-peers.json").into() } /// Returns the path to the config file for this chain. + /// + /// `//reth.toml` pub fn config_path(&self) -> PathBuf { self.0.join("reth.toml").into() } /// Returns the path to the jwtsecret file for this chain. + /// + /// `//jwt.hex` pub fn jwt_path(&self) -> PathBuf { self.0.join("jwt.hex").into() } diff --git a/bin/reth/src/init.rs b/bin/reth/src/init.rs index 9f10f8881333..3ebc5d407364 100644 --- a/bin/reth/src/init.rs +++ b/bin/reth/src/init.rs @@ -25,7 +25,7 @@ use tracing::debug; pub enum InitDatabaseError { /// An existing genesis block was found in the database, and its hash did not match the hash of /// the chainspec. - #[error("Genesis hash in the database does not match the specified chainspec: chainspec is {chainspec_hash}, database is {database_hash}")] + #[error("genesis hash in the database does not match the specified chainspec: chainspec is {chainspec_hash}, database is {database_hash}")] GenesisHashMismatch { /// Expected genesis hash. chainspec_hash: B256, diff --git a/bin/reth/src/node/events.rs b/bin/reth/src/node/events.rs index 21e2cd76c0e9..8b5d7c76ad6a 100644 --- a/bin/reth/src/node/events.rs +++ b/bin/reth/src/node/events.rs @@ -56,25 +56,36 @@ impl NodeState { /// Processes an event emitted by the pipeline fn handle_pipeline_event(&mut self, event: PipelineEvent) { match event { - PipelineEvent::Running { pipeline_position, pipeline_total, stage_id, checkpoint } => { + PipelineEvent::Running { pipeline_stages_progress, stage_id, checkpoint } => { let notable = self.current_stage.is_none(); self.current_stage = Some(stage_id); self.current_checkpoint = checkpoint.unwrap_or_default(); if notable { - info!( - pipeline_stages = %format!("{pipeline_position}/{pipeline_total}"), - stage = %stage_id, - from = self.current_checkpoint.block_number, - checkpoint = %self.current_checkpoint, - eta = %self.eta.fmt_for_stage(stage_id), - "Executing stage", - ); + if let Some(progress) = self.current_checkpoint.entities() { + info!( + pipeline_stages = %pipeline_stages_progress, + stage = %stage_id, + from = self.current_checkpoint.block_number, + checkpoint = %self.current_checkpoint.block_number, + %progress, + eta = %self.eta.fmt_for_stage(stage_id), + "Executing stage", + ); + } else { + info!( + pipeline_stages = %pipeline_stages_progress, + stage = %stage_id, + from = self.current_checkpoint.block_number, + checkpoint = %self.current_checkpoint.block_number, + eta = %self.eta.fmt_for_stage(stage_id), + "Executing stage", + ); + } } } PipelineEvent::Ran { - pipeline_position, - pipeline_total, + pipeline_stages_progress, stage_id, result: ExecOutput { checkpoint, done }, } => { @@ -84,19 +95,27 @@ impl NodeState { } self.eta.update(self.current_checkpoint); - info!( - pipeline_stages = %format!("{pipeline_position}/{pipeline_total}"), - stage = %stage_id, - block = checkpoint.block_number, - %checkpoint, - eta = %self.eta.fmt_for_stage(stage_id), - "{}", - if done { - "Stage finished executing" - } else { - "Stage committed progress" - } - ); + let message = + if done { "Stage finished executing" } else { "Stage committed progress" }; + + if let Some(progress) = checkpoint.entities() { + info!( + pipeline_stages = %pipeline_stages_progress, + stage = %stage_id, + checkpoint = %checkpoint.block_number, + %progress, + eta = %self.eta.fmt_for_stage(stage_id), + "{message}", + ); + } else { + info!( + pipeline_stages = %pipeline_stages_progress, + stage = %stage_id, + checkpoint = %checkpoint.block_number, + eta = %self.eta.fmt_for_stage(stage_id), + "{message}", + ); + } if done { self.current_stage = None; @@ -254,15 +273,27 @@ where let mut this = self.project(); while this.info_interval.poll_tick(cx).is_ready() { - if let Some(stage_id) = this.state.current_stage { - info!( - target: "reth::cli", - connected_peers = this.state.num_connected_peers(), - stage = %stage_id.to_string(), - checkpoint = %this.state.current_checkpoint, - eta = %this.state.eta.fmt_for_stage(stage_id), - "Status" - ); + if let Some(stage) = this.state.current_stage { + if let Some(progress) = this.state.current_checkpoint.entities() { + info!( + target: "reth::cli", + connected_peers = this.state.num_connected_peers(), + %stage, + checkpoint = %this.state.current_checkpoint.block_number, + %progress, + eta = %this.state.eta.fmt_for_stage(stage), + "Status" + ); + } else { + info!( + target: "reth::cli", + connected_peers = this.state.num_connected_peers(), + %stage, + checkpoint = %this.state.current_checkpoint.block_number, + eta = %this.state.eta.fmt_for_stage(stage), + "Status" + ); + } } else { info!( target: "reth::cli", diff --git a/bin/reth/src/node/mod.rs b/bin/reth/src/node/mod.rs index e7f0cfae7fd4..0dc54d31611c 100644 --- a/bin/reth/src/node/mod.rs +++ b/bin/reth/src/node/mod.rs @@ -25,6 +25,7 @@ use clap::{value_parser, Parser}; use eyre::Context; use fdlimit::raise_fd_limit; use futures::{future::Either, pin_mut, stream, stream_select, StreamExt}; +use metrics_exporter_prometheus::PrometheusHandle; use reth_auto_seal_consensus::{AutoSealBuilder, AutoSealConsensus, MiningMode}; use reth_beacon_consensus::{ hooks::{EngineHooks, PruneHook}, @@ -72,7 +73,6 @@ use reth_stages::{ IndexAccountHistoryStage, IndexStorageHistoryStage, MerkleStage, SenderRecoveryStage, StorageHashingStage, TotalDifficultyStage, TransactionLookupStage, }, - MetricEventsSender, MetricsListener, }; use reth_tasks::TaskExecutor; use reth_transaction_pool::{ @@ -247,12 +247,14 @@ impl NodeCommand { // always store reth.toml in the data dir, not the chain specific data dir info!(target: "reth::cli", path = ?config_path, "Configuration loaded"); + let prometheus_handle = self.install_prometheus_recorder()?; + let db_path = data_dir.db_path(); info!(target: "reth::cli", path = ?db_path, "Opening database"); - let db = Arc::new(init_db(&db_path, self.db.log_level)?); + let db = Arc::new(init_db(&db_path, self.db.log_level)?.with_metrics()); info!(target: "reth::cli", "Database opened"); - self.start_metrics_endpoint(Arc::clone(&db)).await?; + self.start_metrics_endpoint(prometheus_handle, Arc::clone(&db)).await?; debug!(target: "reth::cli", chain=%self.chain.chain, genesis=?self.chain.genesis_hash(), "Initializing genesis"); @@ -260,19 +262,14 @@ impl NodeCommand { info!(target: "reth::cli", "{}", DisplayHardforks::from(self.chain.hardforks().clone())); - let consensus: Arc = if self.dev.dev { - debug!(target: "reth::cli", "Using auto seal"); - Arc::new(AutoSealConsensus::new(Arc::clone(&self.chain))) - } else { - Arc::new(BeaconConsensus::new(Arc::clone(&self.chain))) - }; + let consensus = self.consensus(); self.init_trusted_nodes(&mut config); - debug!(target: "reth::cli", "Spawning metrics listener task"); - let (metrics_tx, metrics_rx) = unbounded_channel(); - let metrics_listener = MetricsListener::new(metrics_rx); - ctx.task_executor.spawn_critical("metrics listener task", metrics_listener); + debug!(target: "reth::cli", "Spawning stages metrics listener task"); + let (sync_metrics_tx, sync_metrics_rx) = unbounded_channel(); + let sync_metrics_listener = reth_stages::MetricsListener::new(sync_metrics_rx); + ctx.task_executor.spawn_critical("stages metrics listener task", sync_metrics_listener); let prune_config = self.pruning.prune_config(Arc::clone(&self.chain))?.or(config.prune.clone()); @@ -289,9 +286,10 @@ impl NodeCommand { BlockchainTreeConfig::default(), prune_config.clone().map(|config| config.segments), )? - .with_sync_metrics_tx(metrics_tx.clone()); + .with_sync_metrics_tx(sync_metrics_tx.clone()); let canon_state_notification_sender = tree.canon_state_notification_sender(); let blockchain_tree = ShareableBlockchainTree::new(tree); + debug!(target: "reth::cli", "configured blockchain tree"); // fetch the head block from the database let head = self.lookup_head(Arc::clone(&db)).wrap_err("the head block is missing")?; @@ -408,7 +406,7 @@ impl NodeCommand { Arc::clone(&consensus), db.clone(), &ctx.task_executor, - metrics_tx, + sync_metrics_tx, prune_config.clone(), max_block, ) @@ -428,7 +426,7 @@ impl NodeCommand { Arc::clone(&consensus), db.clone(), &ctx.task_executor, - metrics_tx, + sync_metrics_tx, prune_config.clone(), max_block, ) @@ -523,7 +521,7 @@ impl NodeCommand { // extract the jwt secret from the args if possible let default_jwt_path = data_dir.jwt_path(); - let jwt_secret = self.rpc.jwt_secret(default_jwt_path)?; + let jwt_secret = self.rpc.auth_jwt_secret(default_jwt_path)?; // adjust rpc port numbers based on instance number self.adjust_instance_ports(); @@ -555,6 +553,18 @@ impl NodeCommand { } } + /// Returns the [Consensus] instance to use. + /// + /// By default this will be a [BeaconConsensus] instance, but if the `--dev` flag is set, it + /// will be an [AutoSealConsensus] instance. + pub fn consensus(&self) -> Arc { + if self.dev.dev { + Arc::new(AutoSealConsensus::new(Arc::clone(&self.chain))) + } else { + Arc::new(BeaconConsensus::new(Arc::clone(&self.chain))) + } + } + /// Constructs a [Pipeline] that's wired to the network #[allow(clippy::too_many_arguments)] async fn build_networked_pipeline( @@ -564,7 +574,7 @@ impl NodeCommand { consensus: Arc, db: DB, task_executor: &TaskExecutor, - metrics_tx: MetricEventsSender, + metrics_tx: reth_stages::MetricEventsSender, prune_config: Option, max_block: Option, ) -> eyre::Result> @@ -627,11 +637,24 @@ impl NodeCommand { } } - async fn start_metrics_endpoint(&self, db: Arc) -> eyre::Result<()> { + fn install_prometheus_recorder(&self) -> eyre::Result { + prometheus_exporter::install_recorder() + } + + async fn start_metrics_endpoint( + &self, + prometheus_handle: PrometheusHandle, + db: Arc, + ) -> eyre::Result<()> { if let Some(listen_addr) = self.metrics { info!(target: "reth::cli", addr = %listen_addr, "Starting metrics endpoint"); - prometheus_exporter::initialize(listen_addr, db, metrics_process::Collector::default()) - .await?; + prometheus_exporter::serve( + listen_addr, + prometheus_handle, + db, + metrics_process::Collector::default(), + ) + .await?; } Ok(()) @@ -789,7 +812,7 @@ impl NodeCommand { consensus: Arc, max_block: Option, continuous: bool, - metrics_tx: MetricEventsSender, + metrics_tx: reth_stages::MetricEventsSender, prune_config: Option, ) -> eyre::Result> where @@ -891,34 +914,41 @@ impl NodeCommand { Ok(pipeline) } + /// Builds a [Pruner] with the given config. fn build_pruner( &self, config: &PruneConfig, db: DB, highest_snapshots_rx: HighestSnapshotsTracker, ) -> Pruner { - let mut segments = SegmentSet::new(); - - if let Some(mode) = config.segments.receipts { - segments = segments.add_segment(reth_prune::segments::Receipts::new(mode)); - } - if !config.segments.receipts_log_filter.is_empty() { - segments = segments.add_segment(reth_prune::segments::ReceiptsByLogs::new( - config.segments.receipts_log_filter.clone(), - )); - } - if let Some(mode) = config.segments.transaction_lookup { - segments = segments.add_segment(reth_prune::segments::TransactionLookup::new(mode)); - } - if let Some(mode) = config.segments.sender_recovery { - segments = segments.add_segment(reth_prune::segments::SenderRecovery::new(mode)); - } - if let Some(mode) = config.segments.account_history { - segments = segments.add_segment(reth_prune::segments::AccountHistory::new(mode)); - } - if let Some(mode) = config.segments.storage_history { - segments = segments.add_segment(reth_prune::segments::StorageHistory::new(mode)); - } + let segments = SegmentSet::default() + // Receipts + .segment_opt(config.segments.receipts.map(reth_prune::segments::Receipts::new)) + // Receipts by logs + .segment_opt((!config.segments.receipts_log_filter.is_empty()).then(|| { + reth_prune::segments::ReceiptsByLogs::new( + config.segments.receipts_log_filter.clone(), + ) + })) + // Transaction lookup + .segment_opt( + config + .segments + .transaction_lookup + .map(reth_prune::segments::TransactionLookup::new), + ) + // Sender recovery + .segment_opt( + config.segments.sender_recovery.map(reth_prune::segments::SenderRecovery::new), + ) + // Account history + .segment_opt( + config.segments.account_history.map(reth_prune::segments::AccountHistory::new), + ) + // Storage history + .segment_opt( + config.segments.storage_history.map(reth_prune::segments::StorageHistory::new), + ); Pruner::new( db, @@ -960,7 +990,7 @@ async fn run_network_until_shutdown( if let Some(file_path) = persistent_peers_file { let known_peers = network.all_peers().collect::>(); if let Ok(known_peers) = serde_json::to_string_pretty(&known_peers) { - trace!(target : "reth::cli", peers_file =?file_path, num_peers=%known_peers.len(), "Saving current peers"); + trace!(target: "reth::cli", peers_file =?file_path, num_peers=%known_peers.len(), "Saving current peers"); let parent_dir = file_path.parent().map(std::fs::create_dir_all).transpose(); match parent_dir.and_then(|_| std::fs::write(&file_path, known_peers)) { Ok(_) => { diff --git a/bin/reth/src/prometheus_exporter.rs b/bin/reth/src/prometheus_exporter.rs index bb612d53825f..4fa622bffda4 100644 --- a/bin/reth/src/prometheus_exporter.rs +++ b/bin/reth/src/prometheus_exporter.rs @@ -15,17 +15,29 @@ use tracing::error; pub(crate) trait Hook: Fn() + Send + Sync {} impl Hook for T {} -/// Installs Prometheus as the metrics recorder and serves it over HTTP with hooks. +/// Installs Prometheus as the metrics recorder. +pub(crate) fn install_recorder() -> eyre::Result { + let recorder = PrometheusBuilder::new().build_recorder(); + let handle = recorder.handle(); + + // Build metrics stack + Stack::new(recorder) + .push(PrefixLayer::new("reth")) + .install() + .wrap_err("Couldn't set metrics recorder.")?; + + Ok(handle) +} + +/// Serves Prometheus metrics over HTTP with hooks. /// /// The hooks are called every time the metrics are requested at the given endpoint, and can be used /// to record values for pull-style metrics, i.e. metrics that are not automatically updated. -pub(crate) async fn initialize_with_hooks( +pub(crate) async fn serve_with_hooks( listen_addr: SocketAddr, + handle: PrometheusHandle, hooks: impl IntoIterator, ) -> eyre::Result<()> { - let recorder = PrometheusBuilder::new().build_recorder(); - let handle = recorder.handle(); - let hooks: Vec<_> = hooks.into_iter().collect(); // Start endpoint @@ -33,12 +45,6 @@ pub(crate) async fn initialize_with_hooks( .await .wrap_err("Could not start Prometheus endpoint")?; - // Build metrics stack - Stack::new(recorder) - .push(PrefixLayer::new("reth")) - .install() - .wrap_err("Couldn't set metrics recorder.")?; - Ok(()) } @@ -67,10 +73,10 @@ async fn start_endpoint( Ok(()) } -/// Installs Prometheus as the metrics recorder and serves it over HTTP with database and process -/// metrics. -pub(crate) async fn initialize( +/// Serves Prometheus metrics over HTTP with database and process metrics. +pub(crate) async fn serve( listen_addr: SocketAddr, + handle: PrometheusHandle, db: Arc, process: metrics_process::Collector, ) -> eyre::Result<()> { @@ -119,7 +125,7 @@ pub(crate) async fn initialize( Box::new(move || cloned_process.collect()), Box::new(collect_memory_stats), ]; - initialize_with_hooks(listen_addr, hooks).await?; + serve_with_hooks(listen_addr, handle, hooks).await?; // We describe the metrics after the recorder is installed, otherwise this information is not // registered diff --git a/bin/reth/src/stage/run.rs b/bin/reth/src/stage/run.rs index d08c8835e3f2..53ae2eec89fd 100644 --- a/bin/reth/src/stage/run.rs +++ b/bin/reth/src/stage/run.rs @@ -131,8 +131,9 @@ impl Command { if let Some(listen_addr) = self.metrics { info!(target: "reth::cli", "Starting metrics endpoint at {}", listen_addr); - prometheus_exporter::initialize( + prometheus_exporter::serve( listen_addr, + prometheus_exporter::install_recorder()?, Arc::clone(&db), metrics_process::Collector::default(), ) diff --git a/book/cli/cli.md b/book/cli/cli.md index 304711adfdbf..e695068b230d 100644 --- a/book/cli/cli.md +++ b/book/cli/cli.md @@ -74,26 +74,31 @@ Options: Print version Logging: - --log.directory + --log.file.directory The path to put log files in [default: /reth/logs] - --log.max-size - The maximum size (in MB) of log files + --log.file.max-size + The maximum size (in MB) of one log file [default: 200] - --log.max-files + --log.file.max-files The maximum amount of log files that will be stored. If set to 0, background file logging is disabled [default: 5] + --log.file.filter + The filter to use for logs written to the log file + + [default: debug] + --log.journald - Log events to journald + Write logs to journald - --log.filter - The filter to use for logs written to the log file + --log.journald.filter + The filter to use for logs written to journald [default: error] diff --git a/book/cli/config.md b/book/cli/config.md index 12d8c83f7981..d754916d4b3c 100644 --- a/book/cli/config.md +++ b/book/cli/config.md @@ -42,26 +42,31 @@ Options: Print help (see a summary with '-h') Logging: - --log.directory + --log.file.directory The path to put log files in [default: /reth/logs] - --log.max-size - The maximum size (in MB) of log files + --log.file.max-size + The maximum size (in MB) of one log file [default: 200] - --log.max-files + --log.file.max-files The maximum amount of log files that will be stored. If set to 0, background file logging is disabled [default: 5] + --log.file.filter + The filter to use for logs written to the log file + + [default: debug] + --log.journald - Log events to journald + Write logs to journald - --log.filter - The filter to use for logs written to the log file + --log.journald.filter + The filter to use for logs written to journald [default: error] diff --git a/book/cli/db.md b/book/cli/db.md index 30e41d711ebc..5af1e19a7a64 100644 --- a/book/cli/db.md +++ b/book/cli/db.md @@ -72,26 +72,31 @@ Database: - extra: Enables logging for extra debug-level messages Logging: - --log.directory + --log.file.directory The path to put log files in [default: /reth/logs] - --log.max-size - The maximum size (in MB) of log files + --log.file.max-size + The maximum size (in MB) of one log file [default: 200] - --log.max-files + --log.file.max-files The maximum amount of log files that will be stored. If set to 0, background file logging is disabled [default: 5] + --log.file.filter + The filter to use for logs written to the log file + + [default: debug] + --log.journald - Log events to journald + Write logs to journald - --log.filter - The filter to use for logs written to the log file + --log.journald.filter + The filter to use for logs written to journald [default: error] diff --git a/book/cli/debug.md b/book/cli/debug.md index b250cb3d231b..8de345a662fb 100644 --- a/book/cli/debug.md +++ b/book/cli/debug.md @@ -53,26 +53,31 @@ Options: Print help (see a summary with '-h') Logging: - --log.directory + --log.file.directory The path to put log files in [default: /reth/logs] - --log.max-size - The maximum size (in MB) of log files + --log.file.max-size + The maximum size (in MB) of one log file [default: 200] - --log.max-files + --log.file.max-files The maximum amount of log files that will be stored. If set to 0, background file logging is disabled [default: 5] + --log.file.filter + The filter to use for logs written to the log file + + [default: debug] + --log.journald - Log events to journald + Write logs to journald - --log.filter - The filter to use for logs written to the log file + --log.journald.filter + The filter to use for logs written to journald [default: error] diff --git a/book/cli/import.md b/book/cli/import.md index e73fb600cbc0..14f6fbcf9b38 100644 --- a/book/cli/import.md +++ b/book/cli/import.md @@ -70,26 +70,31 @@ Database: remaining stages are executed. Logging: - --log.directory + --log.file.directory The path to put log files in [default: /reth/logs] - --log.max-size - The maximum size (in MB) of log files + --log.file.max-size + The maximum size (in MB) of one log file [default: 200] - --log.max-files + --log.file.max-files The maximum amount of log files that will be stored. If set to 0, background file logging is disabled [default: 5] + --log.file.filter + The filter to use for logs written to the log file + + [default: debug] + --log.journald - Log events to journald + Write logs to journald - --log.filter - The filter to use for logs written to the log file + --log.journald.filter + The filter to use for logs written to journald [default: error] diff --git a/book/cli/init.md b/book/cli/init.md index 582c229d9ec9..c1d974280bcc 100644 --- a/book/cli/init.md +++ b/book/cli/init.md @@ -61,26 +61,31 @@ Database: - extra: Enables logging for extra debug-level messages Logging: - --log.directory + --log.file.directory The path to put log files in [default: /reth/logs] - --log.max-size - The maximum size (in MB) of log files + --log.file.max-size + The maximum size (in MB) of one log file [default: 200] - --log.max-files + --log.file.max-files The maximum amount of log files that will be stored. If set to 0, background file logging is disabled [default: 5] + --log.file.filter + The filter to use for logs written to the log file + + [default: debug] + --log.journald - Log events to journald + Write logs to journald - --log.filter - The filter to use for logs written to the log file + --log.journald.filter + The filter to use for logs written to journald [default: error] diff --git a/book/cli/node.md b/book/cli/node.md index 101bbd25104b..d7b38a8134f7 100644 --- a/book/cli/node.md +++ b/book/cli/node.md @@ -389,26 +389,31 @@ Pruning: Run full node. Only the most recent 10064 block states are stored. This flag takes priority over pruning configuration in reth.toml Logging: - --log.directory + --log.file.directory The path to put log files in [default: /reth/logs] - --log.max-size - The maximum size (in MB) of log files + --log.file.max-size + The maximum size (in MB) of one log file [default: 200] - --log.max-files + --log.file.max-files The maximum amount of log files that will be stored. If set to 0, background file logging is disabled [default: 5] + --log.file.filter + The filter to use for logs written to the log file + + [default: debug] + --log.journald - Log events to journald + Write logs to journald - --log.filter - The filter to use for logs written to the log file + --log.journald.filter + The filter to use for logs written to journald [default: error] diff --git a/book/cli/p2p.md b/book/cli/p2p.md index 770892888621..4e616976d28d 100644 --- a/book/cli/p2p.md +++ b/book/cli/p2p.md @@ -100,26 +100,31 @@ Database: - extra: Enables logging for extra debug-level messages Logging: - --log.directory + --log.file.directory The path to put log files in [default: /reth/logs] - --log.max-size - The maximum size (in MB) of log files + --log.file.max-size + The maximum size (in MB) of one log file [default: 200] - --log.max-files + --log.file.max-files The maximum amount of log files that will be stored. If set to 0, background file logging is disabled [default: 5] + --log.file.filter + The filter to use for logs written to the log file + + [default: debug] + --log.journald - Log events to journald + Write logs to journald - --log.filter - The filter to use for logs written to the log file + --log.journald.filter + The filter to use for logs written to journald [default: error] diff --git a/book/cli/recover.md b/book/cli/recover.md index 25db4a260526..a18f83d664dc 100644 --- a/book/cli/recover.md +++ b/book/cli/recover.md @@ -40,26 +40,31 @@ Options: Print help (see a summary with '-h') Logging: - --log.directory + --log.file.directory The path to put log files in [default: /reth/logs] - --log.max-size - The maximum size (in MB) of log files + --log.file.max-size + The maximum size (in MB) of one log file [default: 200] - --log.max-files + --log.file.max-files The maximum amount of log files that will be stored. If set to 0, background file logging is disabled [default: 5] + --log.file.filter + The filter to use for logs written to the log file + + [default: debug] + --log.journald - Log events to journald + Write logs to journald - --log.filter - The filter to use for logs written to the log file + --log.journald.filter + The filter to use for logs written to journald [default: error] diff --git a/book/cli/stage.md b/book/cli/stage.md index 31892c929156..788753ef3f80 100644 --- a/book/cli/stage.md +++ b/book/cli/stage.md @@ -43,26 +43,31 @@ Options: Print help (see a summary with '-h') Logging: - --log.directory + --log.file.directory The path to put log files in [default: /reth/logs] - --log.max-size - The maximum size (in MB) of log files + --log.file.max-size + The maximum size (in MB) of one log file [default: 200] - --log.max-files + --log.file.max-files The maximum amount of log files that will be stored. If set to 0, background file logging is disabled [default: 5] + --log.file.filter + The filter to use for logs written to the log file + + [default: debug] + --log.journald - Log events to journald + Write logs to journald - --log.filter - The filter to use for logs written to the log file + --log.journald.filter + The filter to use for logs written to journald [default: error] diff --git a/book/cli/test-vectors.md b/book/cli/test-vectors.md index 8164af82ca53..232a4e397174 100644 --- a/book/cli/test-vectors.md +++ b/book/cli/test-vectors.md @@ -40,26 +40,31 @@ Options: Print help (see a summary with '-h') Logging: - --log.directory + --log.file.directory The path to put log files in [default: /reth/logs] - --log.max-size - The maximum size (in MB) of log files + --log.file.max-size + The maximum size (in MB) of one log file [default: 200] - --log.max-files + --log.file.max-files The maximum amount of log files that will be stored. If set to 0, background file logging is disabled [default: 5] + --log.file.filter + The filter to use for logs written to the log file + + [default: debug] + --log.journald - Log events to journald + Write logs to journald - --log.filter - The filter to use for logs written to the log file + --log.journald.filter + The filter to use for logs written to journald [default: error] diff --git a/crates/blockchain-tree/src/blockchain_tree.rs b/crates/blockchain-tree/src/blockchain_tree.rs index b563bc5d29c6..cb6765219466 100644 --- a/crates/blockchain-tree/src/blockchain_tree.rs +++ b/crates/blockchain-tree/src/blockchain_tree.rs @@ -2,7 +2,7 @@ use crate::{ canonical_chain::CanonicalChain, chain::BlockKind, - metrics::TreeMetrics, + metrics::{MakeCanonicalAction, MakeCanonicalDurationsRecorder, TreeMetrics}, state::{BlockChainId, TreeState}, AppendableChain, BlockIndices, BlockchainTreeConfig, BundleStateData, TreeExternals, }; @@ -10,7 +10,7 @@ use reth_db::database::Database; use reth_interfaces::{ blockchain_tree::{ error::{BlockchainTreeError, CanonicalError, InsertBlockError, InsertBlockErrorKind}, - BlockStatus, CanonicalOutcome, InsertPayloadOk, + BlockStatus, BlockValidationKind, CanonicalOutcome, InsertPayloadOk, }, consensus::{Consensus, ConsensusError}, executor::{BlockExecutionError, BlockValidationError}, @@ -286,21 +286,22 @@ impl BlockchainTree { /// Try inserting a validated [Self::validate_block] block inside the tree. /// - /// If blocks does not have parent [`BlockStatus::Disconnected`] would be returned, in which - /// case it is buffered for future inclusion. + /// If the block's parent block is unknown, this returns [`BlockStatus::Disconnected`] and the + /// block will be buffered until the parent block is inserted and then attached. #[instrument(level = "trace", skip_all, fields(block = ?block.num_hash()), target = "blockchain_tree", ret)] fn try_insert_validated_block( &mut self, block: SealedBlockWithSenders, + block_validation_kind: BlockValidationKind, ) -> Result { debug_assert!(self.validate_block(&block).is_ok(), "Block must be validated"); let parent = block.parent_num_hash(); - // check if block parent can be found in Tree + // check if block parent can be found in any side chain. if let Some(chain_id) = self.block_indices().get_blocks_chain_id(&parent.hash) { // found parent in side tree, try to insert there - return self.try_insert_block_into_side_chain(block, chain_id) + return self.try_insert_block_into_side_chain(block, chain_id, block_validation_kind) } // if not found, check if the parent can be found inside canonical chain. @@ -308,7 +309,7 @@ impl BlockchainTree { .is_block_hash_canonical(&parent.hash) .map_err(|err| InsertBlockError::new(block.block.clone(), err.into()))? { - return self.try_append_canonical_chain(block) + return self.try_append_canonical_chain(block, block_validation_kind) } // this is another check to ensure that if the block points to a canonical block its block @@ -362,6 +363,7 @@ impl BlockchainTree { fn try_append_canonical_chain( &mut self, block: SealedBlockWithSenders, + block_validation_kind: BlockValidationKind, ) -> Result { let parent = block.parent_num_hash(); let block_num_hash = block.num_hash(); @@ -417,8 +419,15 @@ impl BlockchainTree { canonical_chain.inner(), parent, &self.externals, + block_validation_kind, )?; - (BlockStatus::Valid, chain) + let status = if block_validation_kind.is_exhaustive() { + BlockStatus::Valid + } else { + BlockStatus::Accepted + }; + + (status, chain) } else { let chain = AppendableChain::new_canonical_fork( block, @@ -444,6 +453,7 @@ impl BlockchainTree { &mut self, block: SealedBlockWithSenders, chain_id: BlockChainId, + block_validation_kind: BlockValidationKind, ) -> Result { debug!(target: "blockchain_tree", "Inserting block into side chain"); let block_num_hash = block.num_hash(); @@ -495,11 +505,12 @@ impl BlockchainTree { &self.externals, canonical_fork, block_kind, + block_validation_kind, )?; self.block_indices_mut().insert_non_fork_block(block_number, block_hash, chain_id); - if block_kind.extends_canonical_head() { + if block_kind.extends_canonical_head() && block_validation_kind.is_exhaustive() { // if the block can be traced back to the canonical head, we were able to fully // validate it Ok(BlockStatus::Valid) @@ -602,7 +613,7 @@ impl BlockchainTree { block: SealedBlock, ) -> Result { match block.try_seal_with_senders() { - Ok(block) => self.insert_block(block), + Ok(block) => self.insert_block(block, BlockValidationKind::Exhaustive), Err(block) => Err(InsertBlockError::sender_recovery_error(block)), } } @@ -681,6 +692,9 @@ impl BlockchainTree { /// This means that if the block becomes canonical, we need to fetch the missing blocks over /// P2P. /// + /// If the [BlockValidationKind::SkipStateRootValidation] is provided the state root is not + /// validated. + /// /// # Note /// /// If the senders have not already been recovered, call @@ -688,6 +702,7 @@ impl BlockchainTree { pub fn insert_block( &mut self, block: SealedBlockWithSenders, + block_validation_kind: BlockValidationKind, ) -> Result { // check if we already have this block match self.is_block_known(block.num_hash()) { @@ -701,7 +716,9 @@ impl BlockchainTree { return Err(InsertBlockError::consensus_error(err, block.block)) } - Ok(InsertPayloadOk::Inserted(self.try_insert_validated_block(block)?)) + Ok(InsertPayloadOk::Inserted( + self.try_insert_validated_block(block, block_validation_kind)?, + )) } /// Finalize blocks up until and including `finalized_block`, and remove them from the tree. @@ -803,17 +820,20 @@ impl BlockchainTree { fn try_connect_buffered_blocks(&mut self, new_block: BlockNumHash) { trace!(target: "blockchain_tree", ?new_block, "try_connect_buffered_blocks"); + // first remove all the children of the new block from the buffer let include_blocks = self.state.buffered_blocks.remove_with_children(new_block); - // insert block children + // then try to reinsert them into the tree for block in include_blocks.into_iter() { // dont fail on error, just ignore the block. - let _ = self.try_insert_validated_block(block).map_err(|err| { - debug!( - target: "blockchain_tree", ?err, - "Failed to insert buffered block", - ); - err - }); + let _ = self + .try_insert_validated_block(block, BlockValidationKind::SkipStateRootValidation) + .map_err(|err| { + debug!( + target: "blockchain_tree", ?err, + "Failed to insert buffered block", + ); + err + }); } } @@ -891,12 +911,18 @@ impl BlockchainTree { #[track_caller] #[instrument(level = "trace", skip(self), target = "blockchain_tree")] pub fn make_canonical(&mut self, block_hash: &BlockHash) -> RethResult { + let mut durations_recorder = MakeCanonicalDurationsRecorder::default(); + let old_block_indices = self.block_indices().clone(); let old_buffered_blocks = self.state.buffered_blocks.parent_to_child.clone(); + durations_recorder.record_relative(MakeCanonicalAction::CloneOldBlocks); // If block is already canonical don't return error. - if let Some(header) = self.find_canonical_header(block_hash)? { + let canonical_header = self.find_canonical_header(block_hash)?; + durations_recorder.record_relative(MakeCanonicalAction::FindCanonicalHeader); + if let Some(header) = canonical_header { info!(target: "blockchain_tree", ?block_hash, "Block is already canonical, ignoring."); + // TODO: this could be fetched from the chainspec first let td = self.externals.database().provider()?.header_td(block_hash)?.ok_or( CanonicalError::from(BlockValidationError::MissingTotalDifficulty { hash: *block_hash, @@ -924,6 +950,7 @@ impl BlockchainTree { // we are splitting chain at the block hash that we want to make canonical let canonical = self.split_chain(chain_id, chain, SplitAt::Hash(*block_hash)); + durations_recorder.record_relative(MakeCanonicalAction::SplitChain); let mut block_fork = canonical.fork_block(); let mut block_fork_number = canonical.fork_block_number(); @@ -938,9 +965,10 @@ impl BlockchainTree { block_fork_number = canonical.fork_block_number(); chains_to_promote.push(canonical); } + durations_recorder.record_relative(MakeCanonicalAction::SplitChainForks); let old_tip = self.block_indices().canonical_tip(); - // Merge all chain into one chain. + // Merge all chains into one chain. let mut new_canon_chain = chains_to_promote.pop().expect("There is at least one block"); trace!(target: "blockchain_tree", ?new_canon_chain, "Merging chains"); let mut chain_appended = false; @@ -949,12 +977,14 @@ impl BlockchainTree { trace!(target: "blockchain_tree", ?chain, "Appending chain"); new_canon_chain.append_chain(chain).expect("We have just build the chain."); } + durations_recorder.record_relative(MakeCanonicalAction::MergeAllChains); if chain_appended { - trace!(target: "blockchain_tree", ?new_canon_chain, "Canonical appended chain"); + trace!(target: "blockchain_tree", ?new_canon_chain, "Canonical chain appended"); } // update canonical index self.block_indices_mut().canonicalize_blocks(new_canon_chain.blocks()); + durations_recorder.record_relative(MakeCanonicalAction::UpdateCanonicalIndex); // event about new canonical chain. let chain_notification; @@ -968,7 +998,8 @@ impl BlockchainTree { chain_notification = CanonStateNotification::Commit { new: Arc::new(new_canon_chain.clone()) }; // append to database - self.commit_canonical(new_canon_chain)?; + self.commit_canonical_to_database(new_canon_chain)?; + durations_recorder.record_relative(MakeCanonicalAction::CommitCanonicalChainToDatabase); } else { // it forks to canonical block that is not the tip. @@ -984,7 +1015,9 @@ impl BlockchainTree { unreachable!("all chains should point to canonical chain."); } - let old_canon_chain = self.revert_canonical(canon_fork.number); + let old_canon_chain = self.revert_canonical_from_database(canon_fork.number); + durations_recorder + .record_relative(MakeCanonicalAction::RevertCanonicalChainFromDatabase); let old_canon_chain = match old_canon_chain { val @ Err(_) => { @@ -1001,7 +1034,8 @@ impl BlockchainTree { Ok(val) => val, }; // commit new canonical chain. - self.commit_canonical(new_canon_chain.clone())?; + self.commit_canonical_to_database(new_canon_chain.clone())?; + durations_recorder.record_relative(MakeCanonicalAction::CommitCanonicalChainToDatabase); if let Some(old_canon_chain) = old_canon_chain { // state action @@ -1013,6 +1047,7 @@ impl BlockchainTree { // insert old canon chain self.insert_chain(AppendableChain::new(old_canon_chain)); + durations_recorder.record_relative(MakeCanonicalAction::InsertOldCanonicalChain); self.update_reorg_metrics(reorg_depth as f64); } else { @@ -1024,12 +1059,17 @@ impl BlockchainTree { } } - // let head = chain_notification.tip().header.clone(); // send notification about new canonical chain. let _ = self.canon_state_notification_sender.send(chain_notification); + debug!( + target: "blockchain_tree", + actions = ?durations_recorder.actions, + "Canonicalization finished" + ); + Ok(CanonicalOutcome::Committed { head }) } @@ -1045,8 +1085,8 @@ impl BlockchainTree { self.canon_state_notification_sender.clone() } - /// Canonicalize the given chain and commit it to the database. - fn commit_canonical(&self, chain: Chain) -> RethResult<()> { + /// Write the given chain to the database as canonical. + fn commit_canonical_to_database(&self, chain: Chain) -> RethResult<()> { let provider = DatabaseProvider::new_rw( self.externals.db.tx_mut()?, self.externals.chain_spec.clone(), @@ -1074,7 +1114,7 @@ impl BlockchainTree { return Ok(()) } // revert `N` blocks from current canonical chain and put them inside BlockchanTree - let old_canon_chain = self.revert_canonical(unwind_to)?; + let old_canon_chain = self.revert_canonical_from_database(unwind_to)?; // check if there is block in chain if let Some(old_canon_chain) = old_canon_chain { @@ -1089,7 +1129,10 @@ impl BlockchainTree { /// Revert canonical blocks from the database and return them. /// /// The block, `revert_until`, is non-inclusive, i.e. `revert_until` stays in the database. - fn revert_canonical(&mut self, revert_until: BlockNumber) -> RethResult> { + fn revert_canonical_from_database( + &mut self, + revert_until: BlockNumber, + ) -> RethResult> { // read data that is needed for new sidechain let provider = DatabaseProvider::new_rw( @@ -1157,7 +1200,12 @@ mod tests { use crate::block_buffer::BufferedBlocks; use assert_matches::assert_matches; use linked_hash_set::LinkedHashSet; - use reth_db::{tables, test_utils::create_test_rw_db, transaction::DbTxMut, DatabaseEnv}; + use reth_db::{ + tables, + test_utils::{create_test_rw_db, TempDatabase}, + transaction::DbTxMut, + DatabaseEnv, + }; use reth_interfaces::test_utils::TestConsensus; use reth_primitives::{ constants::EMPTY_ROOT_HASH, stage::StageCheckpoint, ChainSpecBuilder, B256, MAINNET, @@ -1170,7 +1218,7 @@ mod tests { fn setup_externals( exec_res: Vec, - ) -> TreeExternals, TestExecutorFactory> { + ) -> TreeExternals>, TestExecutorFactory> { let db = create_test_rw_db(); let consensus = Arc::new(TestConsensus::default()); let chain_spec = Arc::new( @@ -1309,7 +1357,7 @@ mod tests { // block 2 parent is not known, block2 is buffered. assert_eq!( - tree.insert_block(block2.clone()).unwrap(), + tree.insert_block(block2.clone(), BlockValidationKind::Exhaustive).unwrap(), InsertPayloadOk::Inserted(BlockStatus::Disconnected { missing_ancestor: block2.parent_num_hash() }) @@ -1341,7 +1389,7 @@ mod tests { // insert block1 and buffered block2 is inserted assert_eq!( - tree.insert_block(block1.clone()).unwrap(), + tree.insert_block(block1.clone(), BlockValidationKind::Exhaustive).unwrap(), InsertPayloadOk::Inserted(BlockStatus::Valid) ); @@ -1364,13 +1412,13 @@ mod tests { // already inserted block will `InsertPayloadOk::AlreadySeen(_)` assert_eq!( - tree.insert_block(block1.clone()).unwrap(), + tree.insert_block(block1.clone(), BlockValidationKind::Exhaustive).unwrap(), InsertPayloadOk::AlreadySeen(BlockStatus::Valid) ); // block two is already inserted. assert_eq!( - tree.insert_block(block2.clone()).unwrap(), + tree.insert_block(block2.clone(), BlockValidationKind::Exhaustive).unwrap(), InsertPayloadOk::AlreadySeen(BlockStatus::Valid) ); @@ -1410,7 +1458,7 @@ mod tests { // reinsert two blocks that point to canonical chain assert_eq!( - tree.insert_block(block1a.clone()).unwrap(), + tree.insert_block(block1a.clone(), BlockValidationKind::Exhaustive).unwrap(), InsertPayloadOk::Inserted(BlockStatus::Accepted) ); @@ -1425,7 +1473,7 @@ mod tests { .assert(&tree); assert_eq!( - tree.insert_block(block2a.clone()).unwrap(), + tree.insert_block(block2a.clone(), BlockValidationKind::Exhaustive).unwrap(), InsertPayloadOk::Inserted(BlockStatus::Accepted) ); // Trie state: @@ -1615,7 +1663,7 @@ mod tests { block2b.parent_hash = B256::new([0x88; 32]); assert_eq!( - tree.insert_block(block2b.clone()).unwrap(), + tree.insert_block(block2b.clone(), BlockValidationKind::Exhaustive).unwrap(), InsertPayloadOk::Inserted(BlockStatus::Disconnected { missing_ancestor: block2b.parent_num_hash() }) diff --git a/crates/blockchain-tree/src/chain.rs b/crates/blockchain-tree/src/chain.rs index 12460f3f7f42..48f5974bf258 100644 --- a/crates/blockchain-tree/src/chain.rs +++ b/crates/blockchain-tree/src/chain.rs @@ -6,7 +6,10 @@ use super::externals::TreeExternals; use crate::BundleStateDataRef; use reth_db::database::Database; use reth_interfaces::{ - blockchain_tree::error::{BlockchainTreeError, InsertBlockError}, + blockchain_tree::{ + error::{BlockchainTreeError, InsertBlockError}, + BlockValidationKind, + }, consensus::{Consensus, ConsensusError}, RethResult, }; @@ -54,15 +57,17 @@ impl AppendableChain { self.chain } - /// Create a new chain that forks off the canonical. + /// Create a new chain that forks off the canonical chain. /// - /// This will also verify the state root of the block extending the canonical chain. + /// if [BlockValidationKind::Exhaustive] is provides this will verify the state root of the + /// block extending the canonical chain. pub fn new_canonical_head_fork( block: SealedBlockWithSenders, parent_header: &SealedHeader, canonical_block_hashes: &BTreeMap, canonical_fork: ForkBlock, externals: &TreeExternals, + block_validation_kind: BlockValidationKind, ) -> Result where DB: Database, @@ -78,11 +83,13 @@ impl AppendableChain { canonical_fork, }; - let bundle_state = Self::validate_and_execute_canonical_head_descendant( + let bundle_state = Self::validate_and_execute( block.clone(), parent_header, state_provider, externals, + BlockKind::ExtendsCanonicalHead, + block_validation_kind, ) .map_err(|err| InsertBlockError::new(block.block.clone(), err.into()))?; @@ -170,13 +177,21 @@ impl AppendableChain { } /// Validate and execute the given block that _extends the canonical chain_, validating its - /// state root after execution. + /// state root after execution if possible and requested. + /// + /// Note: State root validation is limited to blocks that extend the canonical chain and is + /// optional, see [BlockValidationKind]. So this function takes two parameters to determine + /// if the state can and should be validated. + /// - [BlockKind] represents if the block extends the canonical chain, and thus if the state + /// root __can__ be validated. + /// - [BlockValidationKind] determines if the state root __should__ be validated. fn validate_and_execute( block: SealedBlockWithSenders, parent_block: &SealedHeader, post_state_data_provider: BSDP, externals: &TreeExternals, block_kind: BlockKind, + block_validation_kind: BlockValidationKind, ) -> RethResult where BSDP: BundleStateDataProvider, @@ -200,8 +215,9 @@ impl AppendableChain { executor.execute_and_verify_receipt(&block, U256::MAX, Some(senders))?; let bundle_state = executor.take_output_state(); - // check state root if the block extends the canonical chain. - if block_kind.extends_canonical_head() { + // check state root if the block extends the canonical chain __and__ if state root + // validation was requested. + if block_kind.extends_canonical_head() && block_validation_kind.is_exhaustive() { // check state root let state_root = provider.state_root(&bundle_state)?; if block.state_root != state_root { @@ -216,28 +232,6 @@ impl AppendableChain { Ok(bundle_state) } - /// Validate and execute the given block that _extends the canonical chain_, validating its - /// state root after execution. - fn validate_and_execute_canonical_head_descendant( - block: SealedBlockWithSenders, - parent_block: &SealedHeader, - post_state_data_provider: BSDP, - externals: &TreeExternals, - ) -> RethResult - where - BSDP: BundleStateDataProvider, - DB: Database, - EF: ExecutorFactory, - { - Self::validate_and_execute( - block, - parent_block, - post_state_data_provider, - externals, - BlockKind::ExtendsCanonicalHead, - ) - } - /// Validate and execute the given sidechain block, skipping state root validation. fn validate_and_execute_sidechain( block: SealedBlockWithSenders, @@ -256,6 +250,7 @@ impl AppendableChain { post_state_data_provider, externals, BlockKind::ForksHistoricalBlock, + BlockValidationKind::SkipStateRootValidation, ) } @@ -271,6 +266,7 @@ impl AppendableChain { /// is the canonical head, or: state root check can't be performed if the given canonical is /// __not__ the canonical head. #[track_caller] + #[allow(clippy::too_many_arguments)] pub(crate) fn append_block( &mut self, block: SealedBlockWithSenders, @@ -279,6 +275,7 @@ impl AppendableChain { externals: &TreeExternals, canonical_fork: ForkBlock, block_kind: BlockKind, + block_validation_kind: BlockValidationKind, ) -> Result<(), InsertBlockError> where DB: Database, @@ -299,6 +296,7 @@ impl AppendableChain { post_state_data, externals, block_kind, + block_validation_kind, ) .map_err(|err| InsertBlockError::new(block.block.clone(), err.into()))?; // extend the state. diff --git a/crates/blockchain-tree/src/metrics.rs b/crates/blockchain-tree/src/metrics.rs index acc82bb644ef..dcaaaafaaf33 100644 --- a/crates/blockchain-tree/src/metrics.rs +++ b/crates/blockchain-tree/src/metrics.rs @@ -1,7 +1,9 @@ +use metrics::Histogram; use reth_metrics::{ metrics::{Counter, Gauge}, Metrics, }; +use std::time::{Duration, Instant}; /// Metrics for the entire blockchain tree #[derive(Metrics)] @@ -26,3 +28,73 @@ pub struct BlockBufferMetrics { /// Total blocks in the block buffer pub blocks: Gauge, } + +#[derive(Debug)] +pub(crate) struct MakeCanonicalDurationsRecorder { + start: Instant, + pub(crate) actions: Vec<(MakeCanonicalAction, Duration)>, + latest: Option, +} + +impl Default for MakeCanonicalDurationsRecorder { + fn default() -> Self { + Self { start: Instant::now(), actions: Vec::new(), latest: None } + } +} + +impl MakeCanonicalDurationsRecorder { + /// Records the duration since last record, saves it for future logging and instantly reports as + /// a metric with `action` label. + pub(crate) fn record_relative(&mut self, action: MakeCanonicalAction) { + let elapsed = self.start.elapsed(); + let duration = elapsed - self.latest.unwrap_or_default(); + + self.actions.push((action, duration)); + MakeCanonicalMetrics::new_with_labels(&[("action", action.as_str())]) + .duration + .record(duration); + + self.latest = Some(elapsed); + } +} + +#[derive(Debug, Copy, Clone)] +pub(crate) enum MakeCanonicalAction { + CloneOldBlocks, + FindCanonicalHeader, + SplitChain, + SplitChainForks, + MergeAllChains, + UpdateCanonicalIndex, + CommitCanonicalChainToDatabase, + RevertCanonicalChainFromDatabase, + InsertOldCanonicalChain, +} + +impl MakeCanonicalAction { + fn as_str(&self) -> &'static str { + match self { + MakeCanonicalAction::CloneOldBlocks => "clone old blocks", + MakeCanonicalAction::FindCanonicalHeader => "find canonical header", + MakeCanonicalAction::SplitChain => "split chain", + MakeCanonicalAction::SplitChainForks => "split chain forks", + MakeCanonicalAction::MergeAllChains => "merge all chains", + MakeCanonicalAction::UpdateCanonicalIndex => "update canonical index", + MakeCanonicalAction::CommitCanonicalChainToDatabase => { + "commit canonical chain to database" + } + MakeCanonicalAction::RevertCanonicalChainFromDatabase => { + "revert canonical chain from database" + } + MakeCanonicalAction::InsertOldCanonicalChain => "insert old canonical chain", + } + } +} + +#[derive(Metrics)] +#[metrics(scope = "blockchain_tree.make_canonical")] +/// Canonicalization metrics +struct MakeCanonicalMetrics { + /// The time it took to execute an action + duration: Histogram, +} diff --git a/crates/blockchain-tree/src/noop.rs b/crates/blockchain-tree/src/noop.rs index d9c87e6d71a7..95709dc7de81 100644 --- a/crates/blockchain-tree/src/noop.rs +++ b/crates/blockchain-tree/src/noop.rs @@ -1,7 +1,8 @@ use reth_interfaces::{ blockchain_tree::{ error::{BlockchainTreeError, InsertBlockError}, - BlockchainTreeEngine, BlockchainTreeViewer, CanonicalOutcome, InsertPayloadOk, + BlockValidationKind, BlockchainTreeEngine, BlockchainTreeViewer, CanonicalOutcome, + InsertPayloadOk, }, RethResult, }; @@ -30,6 +31,7 @@ impl BlockchainTreeEngine for NoopBlockchainTree { fn insert_block( &self, block: SealedBlockWithSenders, + _validation_kind: BlockValidationKind, ) -> Result { Err(InsertBlockError::tree_error( BlockchainTreeError::BlockHashNotFoundInChain { block_hash: block.hash }, diff --git a/crates/blockchain-tree/src/shareable.rs b/crates/blockchain-tree/src/shareable.rs index e8b7759b14b5..ebb57ca1c783 100644 --- a/crates/blockchain-tree/src/shareable.rs +++ b/crates/blockchain-tree/src/shareable.rs @@ -4,8 +4,8 @@ use parking_lot::RwLock; use reth_db::database::Database; use reth_interfaces::{ blockchain_tree::{ - error::InsertBlockError, BlockchainTreeEngine, BlockchainTreeViewer, CanonicalOutcome, - InsertPayloadOk, + error::InsertBlockError, BlockValidationKind, BlockchainTreeEngine, BlockchainTreeViewer, + CanonicalOutcome, InsertPayloadOk, }, RethResult, }; @@ -48,10 +48,11 @@ impl BlockchainTreeEngine for ShareableBlockc fn insert_block( &self, block: SealedBlockWithSenders, + validation_kind: BlockValidationKind, ) -> Result { trace!(target: "blockchain_tree", hash=?block.hash, number=block.number, parent_hash=?block.parent_hash, "Inserting block"); let mut tree = self.tree.write(); - let res = tree.insert_block(block); + let res = tree.insert_block(block, validation_kind); tree.update_chains_metrics(); res } diff --git a/crates/config/Cargo.toml b/crates/config/Cargo.toml index e4de7d7c5157..80d9a464b233 100644 --- a/crates/config/Cargo.toml +++ b/crates/config/Cargo.toml @@ -13,7 +13,6 @@ reth-network = { path = "../net/network" } reth-net-nat = { path = "../net/nat" } reth-discv4 = { path = "../net/discv4" } reth-downloaders = { path = "../net/downloaders" } -reth-stages = { path = "../../crates/stages" } reth-primitives = { path = "../primitives" } # io @@ -24,8 +23,8 @@ serde_json.workspace = true secp256k1 = { workspace = true, features = ["global-context", "rand-std", "recovery"] } # misc -confy.workspace = true tempfile.workspace = true [dev-dependencies] +confy.workspace = true toml.workspace = true \ No newline at end of file diff --git a/crates/consensus/beacon/src/engine/error.rs b/crates/consensus/beacon/src/engine/error.rs index d5f19b536343..925414e03251 100644 --- a/crates/consensus/beacon/src/engine/error.rs +++ b/crates/consensus/beacon/src/engine/error.rs @@ -13,13 +13,13 @@ pub type BeaconEngineResult = Result; #[derive(Debug, thiserror::Error)] pub enum BeaconConsensusEngineError { /// Pipeline channel closed. - #[error("Pipeline channel closed")] + #[error("pipeline channel closed")] PipelineChannelClosed, /// Pipeline error. #[error(transparent)] Pipeline(#[from] Box), /// Pruner channel closed. - #[error("Pruner channel closed")] + #[error("pruner channel closed")] PrunerChannelClosed, /// Hook error. #[error(transparent)] @@ -50,7 +50,7 @@ impl From for BeaconConsensusEngineError { #[derive(Debug, thiserror::Error)] pub enum BeaconForkChoiceUpdateError { /// Thrown when a forkchoice update resulted in an error. - #[error("Forkchoice update error: {0}")] + #[error("forkchoice update error: {0}")] ForkchoiceUpdateError(#[from] ForkchoiceUpdateError), /// Internal errors, for example, error while reading from the database. #[error(transparent)] diff --git a/crates/consensus/beacon/src/engine/hooks/controller.rs b/crates/consensus/beacon/src/engine/hooks/controller.rs index 73302e5080b8..a477a4c05932 100644 --- a/crates/consensus/beacon/src/engine/hooks/controller.rs +++ b/crates/consensus/beacon/src/engine/hooks/controller.rs @@ -26,16 +26,16 @@ pub(crate) struct EngineHooksController { /// Collection of hooks. /// /// Hooks might be removed from the collection, and returned upon completion. - /// In the current implementation, it only happens when moved to `running_hook_with_db_write`. + /// In the current implementation, it only happens when moved to `active_db_write_hook`. hooks: VecDeque>, /// Currently running hook with DB write access, if any. - running_hook_with_db_write: Option>, + active_db_write_hook: Option>, } impl EngineHooksController { /// Creates a new [`EngineHooksController`]. pub(crate) fn new(hooks: EngineHooks) -> Self { - Self { hooks: hooks.inner.into(), running_hook_with_db_write: None } + Self { hooks: hooks.inner.into(), active_db_write_hook: None } } /// Polls currently running hook with DB write access, if any. @@ -49,12 +49,12 @@ impl EngineHooksController { /// 2. Currently running hook with DB write access returned [`Poll::Pending`] on polling. /// 3. Currently running hook with DB write access returned [`Poll::Ready`] on polling, but no /// action to act upon. - pub(crate) fn poll_running_hook_with_db_write( + pub(crate) fn poll_active_db_write_hook( &mut self, cx: &mut Context<'_>, args: EngineContext, ) -> Poll> { - let Some(mut hook) = self.running_hook_with_db_write.take() else { return Poll::Pending }; + let Some(mut hook) = self.active_db_write_hook.take() else { return Poll::Pending }; match hook.poll(cx, args)? { Poll::Ready((event, action)) => { @@ -73,7 +73,7 @@ impl EngineHooksController { ); if !result.event.is_finished() { - self.running_hook_with_db_write = Some(hook); + self.active_db_write_hook = Some(hook); } else { self.hooks.push_back(hook); } @@ -81,7 +81,7 @@ impl EngineHooksController { return Poll::Ready(Ok(result)) } Poll::Pending => { - self.running_hook_with_db_write = Some(hook); + self.active_db_write_hook = Some(hook); } } @@ -118,8 +118,8 @@ impl EngineHooksController { .. })) ) { - // If a read-write hook started, set `running_hook_with_db_write` to it - self.running_hook_with_db_write = Some(hook); + // If a read-write hook started, set `active_db_write_hook` to it + self.active_db_write_hook = Some(hook); } else { // Otherwise, push it back to the collection of hooks to poll it next time self.hooks.push_back(hook); @@ -138,7 +138,7 @@ impl EngineHooksController { // Hook with DB write access level is not allowed to run due to already running hook with DB // write access level or active DB write according to passed argument if hook.db_access_level().is_read_write() && - (self.running_hook_with_db_write.is_some() || db_write_active) + (self.active_db_write_hook.is_some() || db_write_active) { return Poll::Pending } @@ -164,9 +164,9 @@ impl EngineHooksController { Poll::Pending } - /// Returns `true` if there's a hook with DB write access running. - pub(crate) fn is_hook_with_db_write_running(&self) -> bool { - self.running_hook_with_db_write.is_some() + /// Returns a running hook with DB write access, if there's any. + pub(crate) fn active_db_write_hook(&self) -> Option<&dyn EngineHook> { + self.active_db_write_hook.as_ref().map(|hook| hook.as_ref()) } } @@ -230,19 +230,19 @@ mod tests { } #[tokio::test] - async fn poll_running_hook_with_db_write() { + async fn poll_active_db_write_hook() { let mut controller = EngineHooksController::new(EngineHooks::new()); let context = EngineContext { tip_block_number: 2, finalized_block_number: Some(1) }; // No currently running hook with DB write access is set - let result = poll!(poll_fn(|cx| controller.poll_running_hook_with_db_write(cx, context))); + let result = poll!(poll_fn(|cx| controller.poll_active_db_write_hook(cx, context))); assert!(result.is_pending()); // Currently running hook with DB write access returned `Pending` on polling - controller.running_hook_with_db_write = Some(Box::new(TestHook::new_rw("read-write"))); + controller.active_db_write_hook = Some(Box::new(TestHook::new_rw("read-write"))); - let result = poll!(poll_fn(|cx| controller.poll_running_hook_with_db_write(cx, context))); + let result = poll!(poll_fn(|cx| controller.poll_active_db_write_hook(cx, context))); assert!(result.is_pending()); // Currently running hook with DB write access returned `Ready` on polling, but didn't @@ -250,9 +250,9 @@ mod tests { // Currently running hooks with DB write should still be set. let mut hook = TestHook::new_rw("read-write"); hook.add_result(Ok((EngineHookEvent::Started, None))); - controller.running_hook_with_db_write = Some(Box::new(hook)); + controller.active_db_write_hook = Some(Box::new(hook)); - let result = poll!(poll_fn(|cx| controller.poll_running_hook_with_db_write(cx, context))); + let result = poll!(poll_fn(|cx| controller.poll_active_db_write_hook(cx, context))); assert_eq!( result.map(|result| { let polled_hook = result.unwrap(); @@ -262,7 +262,7 @@ mod tests { }), Poll::Ready(true) ); - assert!(controller.running_hook_with_db_write.is_some()); + assert!(controller.active_db_write_hook.is_some()); assert!(controller.hooks.is_empty()); // Currently running hook with DB write access returned `Ready` on polling and @@ -270,9 +270,9 @@ mod tests { // Currently running hooks with DB write should be moved to collection of hooks. let mut hook = TestHook::new_rw("read-write"); hook.add_result(Ok((EngineHookEvent::Finished(Ok(())), None))); - controller.running_hook_with_db_write = Some(Box::new(hook)); + controller.active_db_write_hook = Some(Box::new(hook)); - let result = poll!(poll_fn(|cx| controller.poll_running_hook_with_db_write(cx, context))); + let result = poll!(poll_fn(|cx| controller.poll_active_db_write_hook(cx, context))); assert_eq!( result.map(|result| { let polled_hook = result.unwrap(); @@ -282,7 +282,7 @@ mod tests { }), Poll::Ready(true) ); - assert!(controller.running_hook_with_db_write.is_none()); + assert!(controller.active_db_write_hook.is_none()); assert!(controller.hooks.pop_front().is_some()); } @@ -305,7 +305,7 @@ mod tests { // Read-write hook can't be polled when external DB write is active let result = poll!(poll_fn(|cx| controller.poll_next_hook(cx, context, true))); assert!(result.is_pending()); - assert!(controller.running_hook_with_db_write.is_none()); + assert!(controller.active_db_write_hook.is_none()); // Read-only hook can be polled when external DB write is active let result = poll!(poll_fn(|cx| controller.poll_next_hook(cx, context, true))); @@ -360,7 +360,7 @@ mod tests { Poll::Ready(true) ); assert_eq!( - controller.running_hook_with_db_write.as_ref().map(|hook| hook.name()), + controller.active_db_write_hook.as_ref().map(|hook| hook.name()), Some(hook_rw_1_name) ); @@ -393,7 +393,7 @@ mod tests { let result = poll!(poll_fn(|cx| controller.poll_next_hook(cx, context, false))); assert_eq!(result.map(|result| { result.is_err() }), Poll::Ready(true)); - assert!(controller.running_hook_with_db_write.is_some()); + assert!(controller.active_db_write_hook.is_some()); assert_eq!(controller.hooks.len(), hooks_len - 1) } } diff --git a/crates/consensus/beacon/src/engine/hooks/mod.rs b/crates/consensus/beacon/src/engine/hooks/mod.rs index a619e99900d7..3b4144c38331 100644 --- a/crates/consensus/beacon/src/engine/hooks/mod.rs +++ b/crates/consensus/beacon/src/engine/hooks/mod.rs @@ -102,13 +102,13 @@ pub enum EngineHookAction {} #[derive(Debug, thiserror::Error)] pub enum EngineHookError { /// Hook channel closed. - #[error("Hook channel closed")] + #[error("hook channel closed")] ChannelClosed, /// Common error. Wrapper around [RethError]. #[error(transparent)] Common(#[from] RethError), /// An internal error occurred. - #[error("Internal hook error occurred.")] + #[error(transparent)] Internal(#[from] Box), } diff --git a/crates/consensus/beacon/src/engine/mod.rs b/crates/consensus/beacon/src/engine/mod.rs index 496b47d1d22f..0f426b9ec5fd 100644 --- a/crates/consensus/beacon/src/engine/mod.rs +++ b/crates/consensus/beacon/src/engine/mod.rs @@ -72,6 +72,7 @@ pub use handle::BeaconConsensusEngineHandle; mod forkchoice; use crate::hooks::{EngineHookEvent, EngineHooks, PolledHook}; pub use forkchoice::ForkchoiceStatus; +use reth_interfaces::blockchain_tree::BlockValidationKind; mod metrics; @@ -347,7 +348,7 @@ where // If the checkpoint of any stage is less than the checkpoint of the first stage, // retrieve and return the block hash of the latest header and use it as the target. if stage_checkpoint < first_stage_checkpoint { - warn!( + debug!( target: "consensus::engine", first_stage_checkpoint, inconsistent_stage_id = %stage_id, @@ -631,8 +632,9 @@ where return Ok(OnForkChoiceUpdated::invalid_state()) } + // check if the new head hash is connected to any ancestor that we previously marked as + // invalid let lowest_buffered_ancestor_fcu = self.lowest_buffered_ancestor_or(state.head_block_hash); - if let Some(status) = self.check_invalid_ancestor(lowest_buffered_ancestor_fcu) { return Ok(OnForkChoiceUpdated::with_invalid(status)) } @@ -644,11 +646,12 @@ where return Ok(OnForkChoiceUpdated::syncing()) } - if self.hooks.is_hook_with_db_write_running() { + if let Some(hook) = self.hooks.active_db_write_hook() { // We can only process new forkchoice updates if no hook with db write is running, // since it requires exclusive access to the database warn!( target: "consensus::engine", + hook = %hook.name(), "Hook is in progress, skipping forkchoice update. \ This may affect the performance of your node as a validator." ); @@ -658,6 +661,7 @@ where let start = Instant::now(); let make_canonical_result = self.blockchain.make_canonical(&state.head_block_hash); let elapsed = self.record_make_canonical_latency(start, &make_canonical_result); + let status = match make_canonical_result { Ok(outcome) => { match outcome { @@ -868,7 +872,7 @@ where head_block.total_difficulty = self.blockchain.header_td_by_number(head_block.number)?.ok_or_else(|| { RethError::Provider(ProviderError::TotalDifficultyNotFound { - number: head_block.number, + block_number: head_block.number, }) })?; self.sync_state_updater.update_status(head_block); @@ -952,7 +956,9 @@ where }) .with_latest_valid_hash(B256::ZERO) } - RethError::BlockchainTree(BlockchainTreeError::BlockHashNotFoundInChain { .. }) => { + RethError::Canonical(CanonicalError::BlockchainTree( + BlockchainTreeError::BlockHashNotFoundInChain { .. }, + )) => { // This just means we couldn't find the block when attempting to make it canonical, // so we should not warn the user, since this will result in us attempting to sync // to a new target and is considered normal operation during sync @@ -1099,13 +1105,17 @@ where return Ok(status) } - let res = if self.sync.is_pipeline_idle() && !self.hooks.is_hook_with_db_write_running() { + let res = if self.sync.is_pipeline_idle() && self.hooks.active_db_write_hook().is_none() { // we can only insert new payloads if the pipeline and any hook with db write // are _not_ running, because they hold exclusive access to the database self.try_insert_new_payload(block) } else { - if self.hooks.is_hook_with_db_write_running() { - debug!(target: "consensus::engine", "Hook is in progress, buffering new payload."); + if let Some(hook) = self.hooks.active_db_write_hook() { + debug!( + target: "consensus::engine", + hook = %hook.name(), + "Hook is in progress, buffering new payload." + ); } self.try_buffer_payload(block) }; @@ -1294,7 +1304,9 @@ where debug_assert!(self.sync.is_pipeline_idle(), "pipeline must be idle"); let block_hash = block.hash; - let status = self.blockchain.insert_block_without_senders(block.clone())?; + let status = self + .blockchain + .insert_block_without_senders(block.clone(), BlockValidationKind::Exhaustive)?; let mut latest_valid_hash = None; let block = Arc::new(block); let status = match status { @@ -1415,7 +1427,10 @@ where return } - match self.blockchain.insert_block_without_senders(block) { + match self + .blockchain + .insert_block_without_senders(block, BlockValidationKind::SkipStateRootValidation) + { Ok(status) => { match status { InsertPayloadOk::Inserted(BlockStatus::Valid) => { @@ -1796,7 +1811,7 @@ where loop { // Poll a running hook with db write access first, as we will not be able to process // any engine messages until it's finished. - if let Poll::Ready(result) = this.hooks.poll_running_hook_with_db_write( + if let Poll::Ready(result) = this.hooks.poll_active_db_write_hook( cx, EngineContext { tip_block_number: this.blockchain.canonical_tip().number, diff --git a/crates/consensus/beacon/src/engine/sync.rs b/crates/consensus/beacon/src/engine/sync.rs index 3db1c569a01c..0d95412f2e49 100644 --- a/crates/consensus/beacon/src/engine/sync.rs +++ b/crates/consensus/beacon/src/engine/sync.rs @@ -396,7 +396,7 @@ mod tests { use futures::poll; use reth_db::{ mdbx::{Env, WriteMap}, - test_utils::create_test_rw_db, + test_utils::{create_test_rw_db, TempDatabase}, }; use reth_interfaces::{p2p::either::EitherDownloader, test_utils::TestFullBlockClient}; use reth_primitives::{ @@ -449,7 +449,7 @@ mod tests { } /// Builds the pipeline. - fn build(self, chain_spec: Arc) -> Pipeline>> { + fn build(self, chain_spec: Arc) -> Pipeline>>> { reth_tracing::init_test_tracing(); let db = create_test_rw_db(); diff --git a/crates/consensus/beacon/src/engine/test_utils.rs b/crates/consensus/beacon/src/engine/test_utils.rs index e6827210248c..45ad646fe3cc 100644 --- a/crates/consensus/beacon/src/engine/test_utils.rs +++ b/crates/consensus/beacon/src/engine/test_utils.rs @@ -6,7 +6,11 @@ use crate::{ use reth_blockchain_tree::{ config::BlockchainTreeConfig, externals::TreeExternals, BlockchainTree, ShareableBlockchainTree, }; -use reth_db::{test_utils::create_test_rw_db, DatabaseEnv}; +use reth_db::{ + test_utils::{create_test_rw_db, TempDatabase}, + DatabaseEnv as DE, +}; +type DatabaseEnv = TempDatabase; use reth_downloaders::{ bodies::bodies::BodiesDownloaderBuilder, headers::reverse_headers::ReverseHeadersDownloaderBuilder, diff --git a/crates/interfaces/Cargo.toml b/crates/interfaces/Cargo.toml index 75e304f78d91..1af41c74f611 100644 --- a/crates/interfaces/Cargo.toml +++ b/crates/interfaces/Cargo.toml @@ -18,7 +18,6 @@ reth-eth-wire = { path = "../net/eth-wire" } # eth revm-primitives.workspace = true -parity-scale-codec = { version = "3.2.1", features = ["bytes"] } # async async-trait.workspace = true diff --git a/crates/interfaces/src/blockchain_tree/error.rs b/crates/interfaces/src/blockchain_tree/error.rs index 695902fb0c1b..c3b9f6063b3c 100644 --- a/crates/interfaces/src/blockchain_tree/error.rs +++ b/crates/interfaces/src/blockchain_tree/error.rs @@ -11,37 +11,37 @@ use reth_primitives::{BlockHash, BlockNumber, SealedBlock}; #[allow(missing_docs)] pub enum BlockchainTreeError { /// Thrown if the block number is lower than the last finalized block number. - #[error("Block number is lower than the last finalized block number #{last_finalized}")] + #[error("block number is lower than the last finalized block number #{last_finalized}")] PendingBlockIsFinalized { /// The block number of the last finalized block. last_finalized: BlockNumber, }, /// Thrown if no side chain could be found for the block. - #[error("BlockChainId can't be found in BlockchainTree with internal index {chain_id}")] + #[error("blockChainId can't be found in BlockchainTree with internal index {chain_id}")] BlockSideChainIdConsistency { /// The internal identifier for the side chain. chain_id: u64, }, /// Thrown if a canonical chain header cannot be found. - #[error("Canonical chain header #{block_hash} can't be found ")] + #[error("canonical chain header {block_hash} can't be found")] CanonicalChain { /// The block hash of the missing canonical chain header. block_hash: BlockHash, }, /// Thrown if a block number cannot be found in the blockchain tree chain. - #[error("Block number #{block_number} not found in blockchain tree chain")] + #[error("block number #{block_number} not found in blockchain tree chain")] BlockNumberNotFoundInChain { /// The block number that could not be found. block_number: BlockNumber, }, /// Thrown if a block hash cannot be found in the blockchain tree chain. - #[error("Block hash {block_hash} not found in blockchain tree chain")] + #[error("block hash {block_hash} not found in blockchain tree chain")] BlockHashNotFoundInChain { /// The block hash that could not be found. block_hash: BlockHash, }, // Thrown if the block failed to buffer - #[error("Block with hash {block_hash:?} failed to buffer")] + #[error("block with hash {block_hash} failed to buffer")] BlockBufferingFailed { /// The block hash of the block that failed to buffer. block_hash: BlockHash, @@ -62,10 +62,10 @@ pub enum CanonicalError { #[error(transparent)] BlockchainTree(#[from] BlockchainTreeError), /// Error indicating a transaction reverted during execution. - #[error("Transaction error on revert: {inner:?}")] + #[error("transaction error on revert: {inner}")] CanonicalRevert { inner: String }, /// Error indicating a transaction failed to commit during execution. - #[error("Transaction error on commit: {inner:?}")] + #[error("transaction error on commit: {inner}")] CanonicalCommit { inner: String }, } @@ -190,23 +190,23 @@ impl InsertBlockErrorData { #[derive(Debug, thiserror::Error)] pub enum InsertBlockErrorKind { /// Failed to recover senders for the block - #[error("Failed to recover senders for block")] + #[error("failed to recover senders for block")] SenderRecovery, /// Block violated consensus rules. #[error(transparent)] - Consensus(ConsensusError), + Consensus(#[from] ConsensusError), /// Block execution failed. #[error(transparent)] - Execution(BlockExecutionError), + Execution(#[from] BlockExecutionError), /// Block violated tree invariants. #[error(transparent)] Tree(#[from] BlockchainTreeError), /// An internal error occurred, like interacting with the database. - #[error("Internal error")] - Internal(Box), + #[error(transparent)] + Internal(#[from] Box), /// Canonical error. #[error(transparent)] - Canonical(CanonicalError), + Canonical(#[from] CanonicalError), /// BlockchainTree error. #[error(transparent)] BlockchainTree(BlockchainTreeError), @@ -330,7 +330,6 @@ impl From for InsertBlockErrorKind { RethError::Network(err) => InsertBlockErrorKind::Internal(Box::new(err)), RethError::Custom(err) => InsertBlockErrorKind::Internal(err.into()), RethError::Canonical(err) => InsertBlockErrorKind::Canonical(err), - RethError::BlockchainTree(err) => InsertBlockErrorKind::BlockchainTree(err), } } } diff --git a/crates/interfaces/src/blockchain_tree/mod.rs b/crates/interfaces/src/blockchain_tree/mod.rs index 3ad73c69d2bd..8a365361bd88 100644 --- a/crates/interfaces/src/blockchain_tree/mod.rs +++ b/crates/interfaces/src/blockchain_tree/mod.rs @@ -22,9 +22,10 @@ pub trait BlockchainTreeEngine: BlockchainTreeViewer + Send + Sync { fn insert_block_without_senders( &self, block: SealedBlock, + validation_kind: BlockValidationKind, ) -> Result { match block.try_seal_with_senders() { - Ok(block) => self.insert_block(block), + Ok(block) => self.insert_block(block, validation_kind), Err(block) => Err(InsertBlockError::sender_recovery_error(block)), } } @@ -43,10 +44,17 @@ pub trait BlockchainTreeEngine: BlockchainTreeViewer + Send + Sync { /// Buffer block with senders fn buffer_block(&self, block: SealedBlockWithSenders) -> Result<(), InsertBlockError>; - /// Insert block with senders + /// Inserts block with senders + /// + /// The `validation_kind` parameter controls which validation checks are performed. + /// + /// Caution: If the block was received from the consensus layer, this should always be called + /// with [BlockValidationKind::Exhaustive] to validate the state root, if possible to adhere to + /// the engine API spec. fn insert_block( &self, block: SealedBlockWithSenders, + validation_kind: BlockValidationKind, ) -> Result; /// Finalize blocks up until and including `finalized_block`, and remove them from the tree. @@ -92,6 +100,48 @@ pub trait BlockchainTreeEngine: BlockchainTreeViewer + Send + Sync { fn unwind(&self, unwind_to: BlockNumber) -> RethResult<()>; } +/// Represents the kind of validation that should be performed when inserting a block. +/// +/// The motivation for this is that the engine API spec requires that block's state root is +/// validated when received from the CL. +/// +/// This step is very expensive due to how changesets are stored in the database, so we want to +/// avoid doing it if not necessary. Blocks can also originate from the network where this step is +/// not required. +#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)] +pub enum BlockValidationKind { + /// All validation checks that can be performed. + /// + /// This includes validating the state root, if possible. + /// + /// Note: This should always be used when inserting blocks that originate from the consensus + /// layer. + #[default] + Exhaustive, + /// Perform all validation checks except for state root validation. + SkipStateRootValidation, +} + +impl BlockValidationKind { + /// Returns true if the state root should be validated if possible. + pub fn is_exhaustive(&self) -> bool { + matches!(self, BlockValidationKind::Exhaustive) + } +} + +impl std::fmt::Display for BlockValidationKind { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + BlockValidationKind::Exhaustive => { + write!(f, "Exhaustive") + } + BlockValidationKind::SkipStateRootValidation => { + write!(f, "SkipStateRootValidation") + } + } + } +} + /// All possible outcomes of a canonicalization attempt of [BlockchainTreeEngine::make_canonical]. #[derive(Debug, Clone, PartialEq, Eq)] pub enum CanonicalOutcome { diff --git a/crates/interfaces/src/consensus.rs b/crates/interfaces/src/consensus.rs index 4e8c1d8e5e3f..0a68d139ec14 100644 --- a/crates/interfaces/src/consensus.rs +++ b/crates/interfaces/src/consensus.rs @@ -82,7 +82,7 @@ pub trait Consensus: Debug + Send + Sync { #[derive(thiserror::Error, Debug, PartialEq, Eq, Clone)] pub enum ConsensusError { /// Error when the gas used in the header exceeds the gas limit. - #[error("Block used gas ({gas_used}) is greater than gas limit ({gas_limit}).")] + #[error("block used gas ({gas_used}) is greater than gas limit ({gas_limit})")] HeaderGasUsedExceedsGasLimit { /// The gas used in the block header. gas_used: u64, @@ -91,7 +91,7 @@ pub enum ConsensusError { }, /// Error when the hash of block ommer is different from the expected hash. - #[error("Block ommer hash ({got:?}) is different from expected: ({expected:?})")] + #[error("block ommer hash ({got}) is different from expected ({expected})")] BodyOmmersHashDiff { /// The actual ommer hash. got: B256, @@ -100,7 +100,7 @@ pub enum ConsensusError { }, /// Error when the state root in the block is different from the expected state root. - #[error("Block state root ({got:?}) is different from expected: ({expected:?})")] + #[error("block state root ({got}) is different from expected ({expected})")] BodyStateRootDiff { /// The actual state root. got: B256, @@ -110,7 +110,7 @@ pub enum ConsensusError { /// Error when the transaction root in the block is different from the expected transaction /// root. - #[error("Block transaction root ({got:?}) is different from expected ({expected:?})")] + #[error("block transaction root ({got}) is different from expected ({expected})")] BodyTransactionRootDiff { /// The actual transaction root. got: B256, @@ -120,7 +120,7 @@ pub enum ConsensusError { /// Error when the withdrawals root in the block is different from the expected withdrawals /// root. - #[error("Block withdrawals root ({got:?}) is different from expected ({expected:?})")] + #[error("block withdrawals root ({got}) is different from expected ({expected})")] BodyWithdrawalsRootDiff { /// The actual withdrawals root. got: B256, @@ -129,7 +129,7 @@ pub enum ConsensusError { }, /// Error when a block with a specific hash and number is already known. - #[error("Block with [hash:{hash:?},number: {number}] is already known.")] + #[error("block with [hash={hash}, number={number}] is already known")] BlockKnown { /// The hash of the known block. hash: BlockHash, @@ -138,7 +138,7 @@ pub enum ConsensusError { }, /// Error when the parent hash of a block is not known. - #[error("Block parent [hash:{hash:?}] is not known.")] + #[error("block parent [hash={hash}] is not known")] ParentUnknown { /// The hash of the unknown parent block. hash: BlockHash, @@ -146,7 +146,7 @@ pub enum ConsensusError { /// Error when the block number does not match the parent block number. #[error( - "Block number {block_number} does not match parent block number {parent_block_number}" + "block number {block_number} does not match parent block number {parent_block_number}" )] ParentBlockNumberMismatch { /// The parent block number. @@ -156,9 +156,7 @@ pub enum ConsensusError { }, /// Error when the parent hash does not match the expected parent hash. - #[error( - "Parent hash {got_parent_hash:?} does not match the expected {expected_parent_hash:?}" - )] + #[error("parent hash {got_parent_hash} does not match the expected {expected_parent_hash}")] ParentHashMismatch { /// The expected parent hash. expected_parent_hash: B256, @@ -167,7 +165,7 @@ pub enum ConsensusError { }, /// Error when the block timestamp is in the past compared to the parent timestamp. - #[error("Block timestamp {timestamp} is in the past compared to the parent timestamp {parent_timestamp}.")] + #[error("block timestamp {timestamp} is in the past compared to the parent timestamp {parent_timestamp}")] TimestampIsInPast { /// The parent block's timestamp. parent_timestamp: u64, @@ -176,7 +174,7 @@ pub enum ConsensusError { }, /// Error when the block timestamp is in the future compared to our clock time. - #[error("Block timestamp {timestamp} is in the future compared to our clock time {present_timestamp}.")] + #[error("block timestamp {timestamp} is in the future compared to our clock time {present_timestamp}")] TimestampIsInFuture { /// The block's timestamp. timestamp: u64, @@ -185,7 +183,7 @@ pub enum ConsensusError { }, /// Error when the child gas limit exceeds the maximum allowed increase. - #[error("Child gas_limit {child_gas_limit} max increase is {parent_gas_limit}/1024.")] + #[error("child gas_limit {child_gas_limit} max increase is {parent_gas_limit}/1024")] GasLimitInvalidIncrease { /// The parent gas limit. parent_gas_limit: u64, @@ -194,7 +192,7 @@ pub enum ConsensusError { }, /// Error when the child gas limit exceeds the maximum allowed decrease. - #[error("Child gas_limit {child_gas_limit} max decrease is {parent_gas_limit}/1024.")] + #[error("child gas_limit {child_gas_limit} max decrease is {parent_gas_limit}/1024")] GasLimitInvalidDecrease { /// The parent gas limit. parent_gas_limit: u64, @@ -203,11 +201,11 @@ pub enum ConsensusError { }, /// Error when the base fee is missing. - #[error("Base fee missing.")] + #[error("base fee missing")] BaseFeeMissing, /// Error when the block's base fee is different from the expected base fee. - #[error("Block base fee ({got}) is different than expected: ({expected}).")] + #[error("block base fee ({got}) is different than expected: ({expected})")] BaseFeeDiff { /// The expected base fee. expected: u64, @@ -216,66 +214,66 @@ pub enum ConsensusError { }, /// Error when there is a transaction signer recovery error. - #[error("Transaction signer recovery error.")] + #[error("transaction signer recovery error")] TransactionSignerRecoveryError, /// Error when the extra data length exceeds the maximum allowed. - #[error("Extra data {len} exceeds max length.")] + #[error("extra data {len} exceeds max length")] ExtraDataExceedsMax { /// The length of the extra data. len: usize, }, /// Error when the difficulty after a merge is not zero. - #[error("Difficulty after merge is not zero")] + #[error("difficulty after merge is not zero")] TheMergeDifficultyIsNotZero, /// Error when the nonce after a merge is not zero. - #[error("Nonce after merge is not zero")] + #[error("nonce after merge is not zero")] TheMergeNonceIsNotZero, /// Error when the ommer root after a merge is not empty. - #[error("Ommer root after merge is not empty")] + #[error("ommer root after merge is not empty")] TheMergeOmmerRootIsNotEmpty, /// Error when the withdrawals root is missing. - #[error("Missing withdrawals root")] + #[error("missing withdrawals root")] WithdrawalsRootMissing, /// Error when an unexpected withdrawals root is encountered. - #[error("Unexpected withdrawals root")] + #[error("unexpected withdrawals root")] WithdrawalsRootUnexpected, /// Error when withdrawals are missing. - #[error("Missing withdrawals")] + #[error("missing withdrawals")] BodyWithdrawalsMissing, /// Error when blob gas used is missing. - #[error("Missing blob gas used")] + #[error("missing blob gas used")] BlobGasUsedMissing, /// Error when unexpected blob gas used is encountered. - #[error("Unexpected blob gas used")] + #[error("unexpected blob gas used")] BlobGasUsedUnexpected, /// Error when excess blob gas is missing. - #[error("Missing excess blob gas")] + #[error("missing excess blob gas")] ExcessBlobGasMissing, /// Error when unexpected excess blob gas is encountered. - #[error("Unexpected excess blob gas")] + #[error("unexpected excess blob gas")] ExcessBlobGasUnexpected, /// Error when the parent beacon block root is missing. - #[error("Missing parent beacon block root")] + #[error("missing parent beacon block root")] ParentBeaconBlockRootMissing, /// Error when an unexpected parent beacon block root is encountered. - #[error("Unexpected parent beacon block root")] + #[error("unexpected parent beacon block root")] ParentBeaconBlockRootUnexpected, /// Error when blob gas used exceeds the maximum allowed. - #[error("Blob gas used {blob_gas_used} exceeds maximum allowance {max_blob_gas_per_block}")] + #[error("blob gas used {blob_gas_used} exceeds maximum allowance {max_blob_gas_per_block}")] BlobGasUsedExceedsMaxBlobGasPerBlock { /// The actual blob gas used. blob_gas_used: u64, @@ -285,7 +283,7 @@ pub enum ConsensusError { /// Error when blob gas used is not a multiple of blob gas per blob. #[error( - "Blob gas used {blob_gas_used} is not a multiple of blob gas per blob {blob_gas_per_blob}" + "blob gas used {blob_gas_used} is not a multiple of blob gas per blob {blob_gas_per_blob}" )] BlobGasUsedNotMultipleOfBlobGasPerBlob { /// The actual blob gas used. @@ -295,7 +293,10 @@ pub enum ConsensusError { }, /// Error when the blob gas used in the header does not match the expected blob gas used. - #[error("Blob gas used in the header {header_blob_gas_used} does not match the expected blob gas used {expected_blob_gas_used}")] + #[error( + "blob gas used in the header {header_blob_gas_used} \ + does not match the expected blob gas used {expected_blob_gas_used}" + )] BlobGasUsedDiff { /// The blob gas used in the header. header_blob_gas_used: u64, @@ -304,7 +305,10 @@ pub enum ConsensusError { }, /// Error when there is an invalid excess blob gas. - #[error("Invalid excess blob gas. Expected: {expected}, got: {got}. Parent excess blob gas: {parent_excess_blob_gas}, parent blob gas used: {parent_blob_gas_used}.")] + #[error( + "invalid excess blob gas. Expected: {expected}, got: {got}. \ + Parent excess blob gas: {parent_excess_blob_gas}, parent blob gas used: {parent_blob_gas_used}" + )] ExcessBlobGasDiff { /// The expected excess blob gas. expected: u64, diff --git a/crates/interfaces/src/db.rs b/crates/interfaces/src/db.rs index 7606e859ffab..014b92e2799a 100644 --- a/crates/interfaces/src/db.rs +++ b/crates/interfaces/src/db.rs @@ -1,14 +1,17 @@ -/// Database error type. It uses i32 to represent an error code. +/// Database error type. #[derive(Debug, thiserror::Error, PartialEq, Eq, Clone)] pub enum DatabaseError { - /// Failed to open database. - #[error("Failed to open database: {0:?}")] - FailedToOpen(i32), - /// Failed to create a table in database. - #[error("Table Creating error code: {0:?}")] - TableCreation(i32), + /// Failed to open the database. + #[error("failed to open the database ({0})")] + Open(i32), + /// Failed to create a table in the database. + #[error("failed to create a table ({0})")] + CreateTable(i32), /// Failed to write a value into a table. - #[error("Database write operation \"{operation:?}\" for key \"{key:?}\" in table \"{table_name}\" ended with error code: {code:?}")] + #[error( + "write operation {operation:?} failed for key \"{key}\" in table {table_name:?} ({code})", + key = reth_primitives::hex::encode(key), + )] Write { /// Database error code code: i32, @@ -20,32 +23,32 @@ pub enum DatabaseError { key: Box<[u8]>, }, /// Failed to read a value from a table. - #[error("Database read error code: {0:?}")] + #[error("failed to read a value from a database table ({0})")] Read(i32), /// Failed to delete a `(key, value)` pair from a table. - #[error("Database delete error code: {0:?}")] + #[error("database delete error code ({0})")] Delete(i32), /// Failed to commit transaction changes into the database. - #[error("Database commit error code: {0:?}")] + #[error("failed to commit transaction changes ({0})")] Commit(i32), /// Failed to initiate a transaction. - #[error("Initialization of transaction errored with code: {0:?}")] - InitTransaction(i32), - /// Failed to initiate a cursor. - #[error("Initialization of cursor errored with code: {0:?}")] + #[error("failed to initialize a transaction ({0})")] + InitTx(i32), + /// Failed to initialize a cursor. + #[error("failed to initialize a cursor ({0})")] InitCursor(i32), /// Failed to decode a key from a table. - #[error("Error decoding value.")] - DecodeError, + #[error("failed to decode a key from a table")] + Decode, /// Failed to get database stats. - #[error("Database stats error code: {0:?}")] + #[error("failed to get stats ({0})")] Stats(i32), /// Failed to use the specified log level, as it's not available. - #[error("Log level is not available: {0:?}")] + #[error("log level {0:?} is not available")] LogLevelUnavailable(LogLevel), } -/// Database write operation type +/// Database write operation type. #[derive(Clone, Copy, Debug, PartialEq, Eq)] #[allow(missing_docs)] pub enum DatabaseWriteOperation { @@ -56,9 +59,9 @@ pub enum DatabaseWriteOperation { Put, } +/// Database log level. #[derive(Debug, PartialEq, Eq, Clone, Copy)] #[cfg_attr(feature = "clap", derive(clap::ValueEnum))] -/// Database log level. pub enum LogLevel { /// Enables logging for critical conditions, i.e. assertion failures. Fatal, diff --git a/crates/interfaces/src/error.rs b/crates/interfaces/src/error.rs index 85d0cdca6fb9..47057a56ad7c 100644 --- a/crates/interfaces/src/error.rs +++ b/crates/interfaces/src/error.rs @@ -23,13 +23,16 @@ pub enum RethError { #[error(transparent)] Canonical(#[from] crate::blockchain_tree::error::CanonicalError), - #[error(transparent)] - BlockchainTree(#[from] crate::blockchain_tree::error::BlockchainTreeError), - #[error("{0}")] Custom(String), } +impl From for RethError { + fn from(error: crate::blockchain_tree::error::BlockchainTreeError) -> Self { + RethError::Canonical(error.into()) + } +} + impl From for RethError { fn from(err: reth_nippy_jar::NippyJarError) -> Self { RethError::Custom(err.to_string()) diff --git a/crates/interfaces/src/executor.rs b/crates/interfaces/src/executor.rs index 4b6b1c462002..c3b62165cca6 100644 --- a/crates/interfaces/src/executor.rs +++ b/crates/interfaces/src/executor.rs @@ -1,34 +1,36 @@ +use crate::RethError; use reth_primitives::{BlockNumHash, Bloom, PruneSegmentError, B256}; +use revm_primitives::EVMError; use thiserror::Error; /// Transaction validation errors -#[allow(missing_docs)] #[derive(Error, Debug, Clone, PartialEq, Eq)] pub enum BlockValidationError { /// EVM error with transaction hash and message - #[error("EVM reported invalid transaction ({hash:?}): {message}")] + #[error("EVM reported invalid transaction ({hash}): {error}")] EVM { /// The hash of the transaction hash: B256, - /// Error message - message: String, + /// The EVM error. + #[source] + error: Box>, }, /// Error when recovering the sender for a transaction - #[error("Failed to recover sender for transaction")] + #[error("failed to recover sender for transaction")] SenderRecoveryError, /// Error when incrementing balance in post execution - #[error("Incrementing balance in post execution failed")] + #[error("incrementing balance in post execution failed")] IncrementBalanceFailed, /// Error when receipt root doesn't match expected value - #[error("Receipt root {got:?} is different than expected {expected:?}.")] + #[error("receipt root {got} is different than expected {expected}")] ReceiptRootDiff { /// The actual receipt root - got: B256, + got: Box, /// The expected receipt root - expected: B256, + expected: Box, }, /// Error when header bloom filter doesn't match expected value - #[error("Header bloom filter {got:?} is different than expected {expected:?}.")] + #[error("header bloom filter {got} is different than expected {expected}")] BloomLogDiff { /// The actual bloom filter got: Box, @@ -36,7 +38,7 @@ pub enum BlockValidationError { expected: Box, }, /// Error when transaction gas limit exceeds available block gas - #[error("Transaction gas limit {transaction_gas_limit} is more than blocks available gas {block_available_gas}")] + #[error("transaction gas limit {transaction_gas_limit} is more than blocks available gas {block_available_gas}")] TransactionGasLimitMoreThanAvailableBlockGas { /// The transaction's gas limit transaction_gas_limit: u64, @@ -44,7 +46,10 @@ pub enum BlockValidationError { block_available_gas: u64, }, /// Error when block gas used doesn't match expected value - #[error("Block gas used {got} is different from expected gas used {expected}.\nGas spent by each transaction: {gas_spent_by_tx:?}\n")] + #[error( + "block gas used {got} is different from expected gas used {expected}.\n\ + Gas spent by each transaction: {gas_spent_by_tx:?}" + )] BlockGasUsed { /// The actual gas used got: u64, @@ -54,23 +59,37 @@ pub enum BlockValidationError { gas_spent_by_tx: Vec<(u64, u64)>, }, /// Error for pre-merge block - #[error("Block {hash:?} is pre merge")] + #[error("block {hash} is pre merge")] BlockPreMerge { /// The hash of the block hash: B256, }, - #[error("Missing total difficulty for block {hash:?}")] - MissingTotalDifficulty { hash: B256 }, + /// Error for missing total difficulty + #[error("missing total difficulty for block {hash}")] + MissingTotalDifficulty { + /// The hash of the block + hash: B256, + }, /// Error for EIP-4788 when parent beacon block root is missing - #[error("EIP-4788 Parent beacon block root missing for active Cancun block")] + #[error("EIP-4788 parent beacon block root missing for active Cancun block")] MissingParentBeaconBlockRoot, /// Error for Cancun genesis block when parent beacon block root is not zero - #[error("The parent beacon block root is not zero for Cancun genesis block")] - CancunGenesisParentBeaconBlockRootNotZero, + #[error("the parent beacon block root is not zero for Cancun genesis block: {parent_beacon_block_root}")] + CancunGenesisParentBeaconBlockRootNotZero { + /// The beacon block root + parent_beacon_block_root: B256, + }, + /// EVM error during beacon root contract call + #[error("failed to apply beacon root contract call at {parent_beacon_block_root}: {message}")] + BeaconRootContractCall { + /// The beacon block root + parent_beacon_block_root: Box, + /// The error message. + message: String, + }, } /// BlockExecutor Errors -#[allow(missing_docs)] #[derive(Error, Debug, Clone, PartialEq, Eq)] pub enum BlockExecutionError { /// Validation error, transparently wrapping `BlockValidationError` @@ -80,23 +99,23 @@ pub enum BlockExecutionError { #[error(transparent)] Pruning(#[from] PruneSegmentError), /// Error representing a provider error - #[error("Provider error")] + #[error("provider error")] ProviderError, /// Transaction error on revert with inner details - #[error("Transaction error on revert: {inner:?}")] + #[error("transaction error on revert: {inner}")] CanonicalRevert { /// The inner error message inner: String, }, /// Transaction error on commit with inner details - #[error("Transaction error on commit: {inner:?}")] + #[error("transaction error on commit: {inner}")] CanonicalCommit { /// The inner error message inner: String, }, /// Error when appending chain on fork is not possible #[error( - "Appending chain on fork (other_chain_fork:?) is not possible as the tip is {chain_tip:?}" + "appending chain on fork (other_chain_fork:?) is not possible as the tip is {chain_tip:?}" )] AppendChainDoesntConnect { /// The tip of the current chain @@ -107,7 +126,7 @@ pub enum BlockExecutionError { /// Only used for TestExecutor /// /// Note: this is not feature gated for convenience. - #[error("Execution unavailable for tests")] + #[error("execution unavailable for tests")] UnavailableForTest, } diff --git a/crates/interfaces/src/p2p/error.rs b/crates/interfaces/src/p2p/error.rs index 89257e200a6e..06259f551288 100644 --- a/crates/interfaces/src/p2p/error.rs +++ b/crates/interfaces/src/p2p/error.rs @@ -73,15 +73,15 @@ impl EthResponseValidator for RequestResult> { #[derive(Clone, Debug, Error, Eq, PartialEq)] #[allow(missing_docs)] pub enum RequestError { - #[error("Closed channel to the peer.")] + #[error("closed channel to the peer")] ChannelClosed, - #[error("Connection to a peer dropped while handling the request.")] + #[error("connection to a peer dropped while handling the request")] ConnectionDropped, - #[error("Capability Message is not supported by remote peer.")] + #[error("capability message is not supported by remote peer")] UnsupportedCapability, - #[error("Request timed out while awaiting response.")] + #[error("request timed out while awaiting response")] Timeout, - #[error("Received bad response.")] + #[error("received bad response")] BadResponse, } @@ -119,7 +119,7 @@ pub type DownloadResult = Result; pub enum DownloadError { /* ==================== HEADER ERRORS ==================== */ /// Header validation failed - #[error("Failed to validate header {hash}. Details: {error}.")] + #[error("failed to validate header {hash}: {error}")] HeaderValidation { /// Hash of header failing validation hash: B256, @@ -128,7 +128,7 @@ pub enum DownloadError { error: consensus::ConsensusError, }, /// Received an invalid tip - #[error("Received invalid tip: {received:?}. Expected {expected:?}.")] + #[error("received invalid tip: {received}. Expected {expected}")] InvalidTip { /// The hash of the received tip received: B256, @@ -136,7 +136,7 @@ pub enum DownloadError { expected: B256, }, /// Received a tip with an invalid tip number - #[error("Received invalid tip number: {received:?}. Expected {expected:?}.")] + #[error("received invalid tip number: {received}. Expected {expected}")] InvalidTipNumber { /// The block number of the received tip received: u64, @@ -144,7 +144,7 @@ pub enum DownloadError { expected: u64, }, /// Received a response to a request with unexpected start block - #[error("Headers response starts at unexpected block: {received:?}. Expected {expected:?}.")] + #[error("headers response starts at unexpected block: {received}. Expected {expected}")] HeadersResponseStartBlockMismatch { /// The block number of the received tip received: u64, @@ -152,7 +152,7 @@ pub enum DownloadError { expected: u64, }, /// Received headers with less than expected items. - #[error("Received less headers than expected: {received:?}. Expected {expected:?}.")] + #[error("received less headers than expected: {received}. Expected {expected}")] HeadersResponseTooShort { /// How many headers we received. received: u64, @@ -161,7 +161,7 @@ pub enum DownloadError { }, /* ==================== BODIES ERRORS ==================== */ /// Block validation failed - #[error("Failed to validate body for header {hash}. Details: {error}.")] + #[error("failed to validate body for header {hash}: {error}")] BodyValidation { /// Hash of header failing validation hash: B256, @@ -170,7 +170,7 @@ pub enum DownloadError { error: consensus::ConsensusError, }, /// Received more bodies than requested. - #[error("Received more bodies than requested. Expected: {expected}. Received: {received}")] + #[error("received more bodies than requested. Expected: {expected}. Received: {received}")] TooManyBodies { /// How many bodies we received. received: usize, @@ -178,23 +178,23 @@ pub enum DownloadError { expected: usize, }, /// Headers missing from the database. - #[error("Header missing from the database: {block_number}")] + #[error("header missing from the database: {block_number}")] MissingHeader { /// Missing header block number. block_number: BlockNumber, }, /// Body range invalid - #[error("Requested body range is invalid: {range:?}.")] + #[error("requested body range is invalid: {range:?}")] InvalidBodyRange { /// Invalid block number range. range: RangeInclusive, }, /* ==================== COMMON ERRORS ==================== */ /// Timed out while waiting for request id response. - #[error("Timed out while waiting for response.")] + #[error("timed out while waiting for response")] Timeout, /// Received empty response while expecting non empty - #[error("Received empty response.")] + #[error("received empty response")] EmptyResponse, /// Error while executing the request. #[error(transparent)] diff --git a/crates/interfaces/src/p2p/headers/error.rs b/crates/interfaces/src/p2p/headers/error.rs index 483abc7d2ef0..ce4f6c46b66d 100644 --- a/crates/interfaces/src/p2p/headers/error.rs +++ b/crates/interfaces/src/p2p/headers/error.rs @@ -10,7 +10,7 @@ pub type HeadersDownloaderResult = Result; pub enum HeadersDownloaderError { /// The downloaded header cannot be attached to the local head, /// but is valid otherwise. - #[error("Valid downloaded header cannot be attached to the local head. Details: {error}.")] + #[error("valid downloaded header cannot be attached to the local head: {error}")] DetachedHead { /// The local head we attempted to attach to. local_head: SealedHeader, diff --git a/crates/interfaces/src/provider.rs b/crates/interfaces/src/provider.rs index 68439c0cbb49..b9d8bd43b4a6 100644 --- a/crates/interfaces/src/provider.rs +++ b/crates/interfaces/src/provider.rs @@ -1,89 +1,103 @@ -use reth_primitives::{Address, BlockHash, BlockHashOrNumber, BlockNumber, TxNumber, B256}; +use reth_primitives::{ + Address, BlockHash, BlockHashOrNumber, BlockNumber, TxHashOrNumber, TxNumber, B256, +}; /// Bundled errors variants thrown by various providers. -#[allow(missing_docs)] #[derive(Debug, thiserror::Error, PartialEq, Eq, Clone)] pub enum ProviderError { + /// Database error. #[error(transparent)] Database(#[from] crate::db::DatabaseError), /// The header number was not found for the given block hash. - #[error("Block hash {0:?} does not exist in Headers table")] + #[error("block hash {0:?} does not exist in Headers table")] BlockHashNotFound(BlockHash), /// A block body is missing. - #[error("Block meta not found for block #{0}")] + #[error("block meta not found for block #{0}")] BlockBodyIndicesNotFound(BlockNumber), /// The transition id was found for the given address and storage key, but the changeset was /// not found. - #[error("Storage ChangeSet address: ({address:?} key: {storage_key:?}) for block:#{block_number} does not exist")] + #[error("storage ChangeSet address: ({address:?} key: {storage_key:?}) for block:#{block_number} does not exist")] StorageChangesetNotFound { - /// The block number found for the address and storage key + /// The block number found for the address and storage key. block_number: BlockNumber, - /// The account address + /// The account address. address: Address, - /// The storage key + /// The storage key. storage_key: B256, }, /// The block number was found for the given address, but the changeset was not found. - #[error("Account {address:?} ChangeSet for block #{block_number} does not exist")] + #[error("account {address:?} ChangeSet for block #{block_number} does not exist")] AccountChangesetNotFound { - /// Block number found for the address + /// Block number found for the address. block_number: BlockNumber, - /// The account address + /// The account address. address: Address, }, /// The total difficulty for a block is missing. - #[error("Total difficulty not found for block #{number}")] - TotalDifficultyNotFound { number: BlockNumber }, - /// Thrown when required header related data was not found but was required. - #[error("No header found for {0:?}")] + #[error("total difficulty not found for block #{block_number}")] + TotalDifficultyNotFound { + /// The block number. + block_number: BlockNumber, + }, + /// when required header related data was not found but was required. + #[error("no header found for {0:?}")] HeaderNotFound(BlockHashOrNumber), - /// Thrown we were unable to find a specific block - #[error("Block does not exist {0:?}")] + /// The specific transaction is missing. + #[error("no transaction found for {0:?}")] + TransactionNotFound(TxHashOrNumber), + /// The specific receipt is missing + #[error("no receipt found for {0:?}")] + ReceiptNotFound(TxHashOrNumber), + /// Unable to find a specific block. + #[error("block does not exist {0:?}")] BlockNotFound(BlockHashOrNumber), - /// Thrown we were unable to find the best block - #[error("Best block does not exist")] + /// Unable to find the best block. + #[error("best block does not exist")] BestBlockNotFound, - /// Thrown we were unable to find the finalized block - #[error("Finalized block does not exist")] + /// Unable to find the finalized block. + #[error("finalized block does not exist")] FinalizedBlockNotFound, - /// Thrown we were unable to find the safe block - #[error("Safe block does not exist")] + /// Unable to find the safe block. + #[error("safe block does not exist")] SafeBlockNotFound, - /// Mismatch of sender and transaction - #[error("Mismatch of sender and transaction id {tx_id}")] - MismatchOfTransactionAndSenderId { tx_id: TxNumber }, - /// Block body wrong transaction count - #[error("Stored block indices does not match transaction count")] + /// Mismatch of sender and transaction. + #[error("mismatch of sender and transaction id {tx_id}")] + MismatchOfTransactionAndSenderId { + /// The transaction ID. + tx_id: TxNumber, + }, + /// Block body wrong transaction count. + #[error("stored block indices does not match transaction count")] BlockBodyTransactionCount, - /// Thrown when the cache service task dropped + /// Thrown when the cache service task dropped. #[error("cache service task stopped")] CacheServiceUnavailable, - /// Thrown when we failed to lookup a block for the pending state - #[error("Unknown block hash: {0:}")] + /// Thrown when we failed to lookup a block for the pending state. + #[error("unknown block {0}")] UnknownBlockHash(B256), - /// Thrown when we were unable to find a state for a block hash - #[error("No State found for block hash: {0:}")] + /// Thrown when we were unable to find a state for a block hash. + #[error("no state found for block {0}")] StateForHashNotFound(B256), - /// Unable to compute state root on top of historical block - #[error("Unable to compute state root on top of historical block")] + /// Unable to compute state root on top of historical block. + #[error("unable to compute state root on top of historical block")] StateRootNotAvailableForHistoricalBlock, - /// Unable to find the block number for a given transaction index - #[error("Unable to find the block number for a given transaction index")] + /// Unable to find the block number for a given transaction index. + #[error("unable to find the block number for a given transaction index")] BlockNumberForTransactionIndexNotFound, - /// Root mismatch - #[error("Merkle trie root mismatch at #{block_number} ({block_hash:?}). Got: {got:?}. Expected: {expected:?}")] + /// Root mismatch. + #[error("merkle trie root mismatch at #{block_number} ({block_hash}): got {got}, expected {expected}")] StateRootMismatch { - /// Expected root + /// The expected root. expected: B256, - /// Calculated root + /// The calculated root. got: B256, - /// Block number + /// The block number. block_number: BlockNumber, - /// Block hash + /// The block hash. block_hash: BlockHash, }, /// Root mismatch during unwind - #[error("Unwind merkle trie root mismatch at #{block_number} ({block_hash:?}). Got: {got:?}. Expected: {expected:?}")] + #[error("unwind merkle trie root mismatch at #{block_number} ({block_hash}): got {got}, expected {expected}")] UnwindStateRootMismatch { /// Expected root expected: B256, @@ -94,6 +108,10 @@ pub enum ProviderError { /// Block hash block_hash: BlockHash, }, - #[error("State at block #{0} is pruned")] + /// State is not available for the given block number because it is pruned. + #[error("state at block #{0} is pruned")] StateAtBlockPruned(BlockNumber), + /// Provider does not support this particular request. + #[error("this provider does not support this request")] + UnsupportedProvider, } diff --git a/crates/net/discv4/src/error.rs b/crates/net/discv4/src/error.rs index 580f0e23d860..19ab703cbc7f 100644 --- a/crates/net/discv4/src/error.rs +++ b/crates/net/discv4/src/error.rs @@ -6,15 +6,15 @@ use tokio::sync::{mpsc::error::SendError, oneshot::error::RecvError}; #[derive(Debug, thiserror::Error)] #[allow(missing_docs)] pub enum DecodePacketError { - #[error("Failed to rlp decode: {0:?}")] + #[error("failed to rlp decode: {0}")] Rlp(#[from] alloy_rlp::Error), - #[error("Received packet len too short.")] + #[error("received packet length is too short")] PacketTooShort, - #[error("Hash of the header not equals to the hash of the data.")] + #[error("header/data hash mismatch")] HashMismatch, - #[error("Message id {0} is not supported.")] + #[error("message ID {0} is not supported")] UnknownMessage(u8), - #[error("Failed to recover public key: {0:?}")] + #[error("failed to recover public key: {0}")] Secp256k1(#[from] secp256k1::Error), } @@ -22,7 +22,7 @@ pub enum DecodePacketError { #[derive(Debug, thiserror::Error)] pub enum Discv4Error { /// Failed to send a command over the channel - #[error("Failed to send on a closed channel")] + #[error("failed to send on a closed channel")] Send, /// Failed to receive a command response #[error(transparent)] diff --git a/crates/net/discv4/src/lib.rs b/crates/net/discv4/src/lib.rs index d889b900cf04..823adedfbcef 100644 --- a/crates/net/discv4/src/lib.rs +++ b/crates/net/discv4/src/lib.rs @@ -236,7 +236,7 @@ impl Discv4 { let socket = UdpSocket::bind(local_address).await?; let local_addr = socket.local_addr()?; local_node_record.udp_port = local_addr.port(); - trace!( target : "discv4", ?local_addr,"opened UDP socket"); + trace!(target: "discv4", ?local_addr,"opened UDP socket"); let service = Discv4Service::new(socket, local_addr, local_node_record, secret_key, config); let discv4 = service.handle(); @@ -376,7 +376,7 @@ impl Discv4 { fn send_to_service(&self, cmd: Discv4Command) { let _ = self.to_service.send(cmd).map_err(|err| { debug!( - target : "discv4", + target: "discv4", %err, "channel capacity reached, dropping command", ) @@ -592,12 +592,12 @@ impl Discv4Service { /// discovery pub fn set_external_ip_addr(&mut self, external_ip: IpAddr) { if self.local_node_record.address != external_ip { - debug!(target : "discv4", ?external_ip, "Updating external ip"); + debug!(target: "discv4", ?external_ip, "Updating external ip"); self.local_node_record.address = external_ip; let _ = self.local_eip_868_enr.set_ip(external_ip, &self.secret_key); let mut lock = self.shared_node_record.lock(); *lock = self.local_node_record; - debug!(target : "discv4", enr=?self.local_eip_868_enr, "Updated local ENR"); + debug!(target: "discv4", enr=?self.local_eip_868_enr, "Updated local ENR"); } } @@ -646,7 +646,7 @@ impl Discv4Service { /// **Note:** This is a noop if there are no bootnodes. pub fn bootstrap(&mut self) { for record in self.config.bootstrap_nodes.clone() { - debug!(target : "discv4", ?record, "pinging boot node"); + debug!(target: "discv4", ?record, "pinging boot node"); let key = kad_key(record.id); let entry = NodeEntry::new(record); @@ -675,9 +675,9 @@ impl Discv4Service { self.bootstrap(); while let Some(event) = self.next().await { - trace!(target : "discv4", ?event, "processed"); + trace!(target: "discv4", ?event, "processed"); } - trace!(target : "discv4", "service terminated"); + trace!(target: "discv4", "service terminated"); }) } @@ -715,7 +715,7 @@ impl Discv4Service { /// This takes an optional Sender through which all successfully discovered nodes are sent once /// the request has finished. fn lookup_with(&mut self, target: PeerId, tx: Option) { - trace!(target : "discv4", ?target, "Starting lookup"); + trace!(target: "discv4", ?target, "Starting lookup"); let target_key = kad_key(target); // Start a lookup context with the 16 (MAX_NODES_PER_BUCKET) closest nodes @@ -744,7 +744,7 @@ impl Discv4Service { return } - trace!(target : "discv4", ?target, num = closest.len(), "Start lookup closest nodes"); + trace!(target: "discv4", ?target, num = closest.len(), "Start lookup closest nodes"); for node in closest { self.find_node(&node, ctx.clone()); @@ -755,7 +755,7 @@ impl Discv4Service { /// /// CAUTION: This expects there's a valid Endpoint proof to the given `node`. fn find_node(&mut self, node: &NodeRecord, ctx: LookupContext) { - trace!(target : "discv4", ?node, lookup=?ctx.target(), "Sending FindNode"); + trace!(target: "discv4", ?node, lookup=?ctx.target(), "Sending FindNode"); ctx.mark_queried(node.id); let id = ctx.target(); let msg = Message::FindNode(FindNode { id, expire: self.find_node_expiration() }); @@ -886,7 +886,7 @@ impl Discv4Service { if !old_status.is_connected() { let _ = entry.update(ConnectionState::Connected, Some(old_status.direction)); - debug!(target : "discv4", ?record, "added after successful endpoint proof"); + debug!(target: "discv4", ?record, "added after successful endpoint proof"); self.notify(DiscoveryUpdate::Added(record)); if has_enr_seq { @@ -903,7 +903,7 @@ impl Discv4Service { if !status.is_connected() { status.state = ConnectionState::Connected; let _ = entry.update(status); - debug!(target : "discv4", ?record, "added after successful endpoint proof"); + debug!(target: "discv4", ?record, "added after successful endpoint proof"); self.notify(DiscoveryUpdate::Added(record)); if has_enr_seq { @@ -943,7 +943,7 @@ impl Discv4Service { }, ) { BucketInsertResult::Inserted | BucketInsertResult::Pending { .. } => { - debug!(target : "discv4", ?record, "inserted new record"); + debug!(target: "discv4", ?record, "inserted new record"); } _ => return false, } @@ -957,10 +957,10 @@ impl Discv4Service { /// Encodes the packet, sends it and returns the hash. pub(crate) fn send_packet(&mut self, msg: Message, to: SocketAddr) -> B256 { let (payload, hash) = msg.encode(&self.secret_key); - trace!(target : "discv4", r#type=?msg.msg_type(), ?to, ?hash, "sending packet"); + trace!(target: "discv4", r#type=?msg.msg_type(), ?to, ?hash, "sending packet"); let _ = self.egress.try_send((payload, to)).map_err(|err| { debug!( - target : "discv4", + target: "discv4", %err, "dropped outgoing packet", ); @@ -1025,7 +1025,7 @@ impl Discv4Service { // we received a ping but the corresponding bucket for the peer is already // full, we can't add any additional peers to that bucket, but we still want // to emit an event that we discovered the node - debug!(target : "discv4", ?record, "discovered new record but bucket is full"); + trace!(target: "discv4", ?record, "discovered new record but bucket is full"); self.notify(DiscoveryUpdate::DiscoveredAtCapacity(record)); needs_bond = true; } @@ -1122,7 +1122,7 @@ impl Discv4Service { expire: self.ping_expiration(), enr_sq: self.enr_seq(), }; - trace!(target : "discv4", ?ping, "sending ping"); + trace!(target: "discv4", ?ping, "sending ping"); let echo_hash = self.send_packet(Message::Ping(ping), remote_addr); self.pending_pings @@ -1140,7 +1140,7 @@ impl Discv4Service { let remote_addr = node.udp_addr(); let enr_request = EnrRequest { expire: self.enr_request_expiration() }; - trace!(target : "discv4", ?enr_request, "sending enr request"); + trace!(target: "discv4", ?enr_request, "sending enr request"); let echo_hash = self.send_packet(Message::EnrRequest(enr_request), remote_addr); self.pending_enr_requests @@ -1158,7 +1158,7 @@ impl Discv4Service { { let request = entry.get(); if request.echo_hash != pong.echo { - debug!( target : "discv4", from=?remote_addr, expected=?request.echo_hash, echo_hash=?pong.echo,"Got unexpected Pong"); + trace!(target: "discv4", from=?remote_addr, expected=?request.echo_hash, echo_hash=?pong.echo,"Got unexpected Pong"); return } } @@ -1209,7 +1209,7 @@ impl Discv4Service { /// Handler for incoming `EnrResponse` message fn on_enr_response(&mut self, msg: EnrResponse, remote_addr: SocketAddr, id: PeerId) { - trace!(target : "discv4", ?remote_addr, ?msg, "received ENR response"); + trace!(target: "discv4", ?remote_addr, ?msg, "received ENR response"); if let Some(resp) = self.pending_enr_requests.remove(&id) { if resp.echo_hash == msg.request_hash { let key = kad_key(id); @@ -1281,7 +1281,7 @@ impl Discv4Service { if total <= MAX_NODES_PER_BUCKET { request.response_count = total; } else { - debug!(target : "discv4", total, from=?remote_addr, "Received neighbors packet entries exceeds max nodes per bucket"); + trace!(target: "discv4", total, from=?remote_addr, "Received neighbors packet entries exceeds max nodes per bucket"); return } }; @@ -1297,7 +1297,7 @@ impl Discv4Service { } Entry::Vacant(_) => { // received neighbours response without requesting it - debug!( target : "discv4", from=?remote_addr, "Received unsolicited Neighbours"); + trace!(target: "discv4", from=?remote_addr, "Received unsolicited Neighbours"); return } }; @@ -1363,7 +1363,7 @@ impl Discv4Service { for nodes in all_nodes.chunks(SAFE_MAX_DATAGRAM_NEIGHBOUR_RECORDS) { let nodes = nodes.iter().map(|node| node.value.record).collect::>(); - trace!( target : "discv4", len = nodes.len(), to=?to,"Sent neighbours packet"); + trace!(target: "discv4", len = nodes.len(), to=?to,"Sent neighbours packet"); let msg = Message::Neighbours(Neighbours { nodes, expire }); self.send_packet(msg, to); } @@ -1614,10 +1614,10 @@ impl Discv4Service { match event { IngressEvent::RecvError(_) => {} IngressEvent::BadPacket(from, err, data) => { - debug!(target : "discv4", ?from, ?err, packet=?hex::encode(&data), "bad packet"); + debug!(target: "discv4", ?from, ?err, packet=?hex::encode(&data), "bad packet"); } IngressEvent::Packet(remote_addr, Packet { msg, node_id, hash }) => { - trace!( target : "discv4", r#type=?msg.msg_type(), from=?remote_addr,"received packet"); + trace!(target: "discv4", r#type=?msg.msg_type(), from=?remote_addr,"received packet"); let event = match msg { Message::Ping(ping) => { self.on_ping(ping, remote_addr, node_id, hash); @@ -1712,10 +1712,10 @@ pub(crate) async fn send_loop(udp: Arc, rx: EgressReceiver) { while let Some((payload, to)) = stream.next().await { match udp.send_to(&payload, to).await { Ok(size) => { - trace!( target : "discv4", ?to, ?size,"sent payload"); + trace!(target: "discv4", ?to, ?size,"sent payload"); } Err(err) => { - debug!( target : "discv4", ?to, ?err,"Failed to send datagram."); + debug!(target: "discv4", ?to, ?err,"Failed to send datagram."); } } } @@ -1726,7 +1726,7 @@ pub(crate) async fn receive_loop(udp: Arc, tx: IngressSender, local_i let send = |event: IngressEvent| async { let _ = tx.send(event).await.map_err(|err| { debug!( - target : "discv4", + target: "discv4", %err, "failed send incoming packet", ) @@ -1738,7 +1738,7 @@ pub(crate) async fn receive_loop(udp: Arc, tx: IngressSender, local_i let res = udp.recv_from(&mut buf).await; match res { Err(err) => { - debug!(target : "discv4", ?err, "Failed to read datagram."); + debug!(target: "discv4", ?err, "Failed to read datagram."); send(IngressEvent::RecvError(err)).await; } Ok((read, remote_addr)) => { @@ -1747,13 +1747,13 @@ pub(crate) async fn receive_loop(udp: Arc, tx: IngressSender, local_i Ok(packet) => { if packet.node_id == local_id { // received our own message - debug!(target : "discv4", ?remote_addr, "Received own packet."); + debug!(target: "discv4", ?remote_addr, "Received own packet."); continue } send(IngressEvent::Packet(remote_addr, packet)).await; } Err(err) => { - debug!( target : "discv4", ?err,"Failed to decode packet"); + debug!(target: "discv4", ?err,"Failed to decode packet"); send(IngressEvent::BadPacket(remote_addr, err, packet.to_vec())).await } } diff --git a/crates/net/discv4/src/proto.rs b/crates/net/discv4/src/proto.rs index 998ddd8697e3..0c4816d259db 100644 --- a/crates/net/discv4/src/proto.rs +++ b/crates/net/discv4/src/proto.rs @@ -256,26 +256,30 @@ where } } +fn to_alloy_rlp_error(e: rlp::DecoderError) -> RlpError { + match e { + rlp::DecoderError::RlpIsTooShort => RlpError::InputTooShort, + rlp::DecoderError::RlpInvalidLength => RlpError::Overflow, + rlp::DecoderError::RlpExpectedToBeList => RlpError::UnexpectedString, + rlp::DecoderError::RlpExpectedToBeData => RlpError::UnexpectedList, + rlp::DecoderError::RlpDataLenWithZeroPrefix | + rlp::DecoderError::RlpListLenWithZeroPrefix => RlpError::LeadingZero, + rlp::DecoderError::RlpInvalidIndirection => RlpError::NonCanonicalSize, + rlp::DecoderError::RlpIncorrectListLen => { + RlpError::Custom("incorrect list length when decoding rlp") + } + rlp::DecoderError::RlpIsTooBig => RlpError::Custom("rlp is too big"), + rlp::DecoderError::RlpInconsistentLengthAndData => { + RlpError::Custom("inconsistent length and data when decoding rlp") + } + rlp::DecoderError::Custom(s) => RlpError::Custom(s), + } +} + impl Decodable for EnrWrapper { fn decode(buf: &mut &[u8]) -> alloy_rlp::Result { let enr = as rlp::Decodable>::decode(&rlp::Rlp::new(buf)) - .map_err(|e| match e { - rlp::DecoderError::RlpIsTooShort => RlpError::InputTooShort, - rlp::DecoderError::RlpInvalidLength => RlpError::Overflow, - rlp::DecoderError::RlpExpectedToBeList => RlpError::UnexpectedString, - rlp::DecoderError::RlpExpectedToBeData => RlpError::UnexpectedList, - rlp::DecoderError::RlpDataLenWithZeroPrefix | - rlp::DecoderError::RlpListLenWithZeroPrefix => RlpError::LeadingZero, - rlp::DecoderError::RlpInvalidIndirection => RlpError::NonCanonicalSize, - rlp::DecoderError::RlpIncorrectListLen => { - RlpError::Custom("incorrect list length when decoding rlp") - } - rlp::DecoderError::RlpIsTooBig => RlpError::Custom("rlp is too big"), - rlp::DecoderError::RlpInconsistentLengthAndData => { - RlpError::Custom("inconsistent length and data when decoding rlp") - } - rlp::DecoderError::Custom(s) => RlpError::Custom(s), - }) + .map_err(to_alloy_rlp_error) .map(EnrWrapper::new); if enr.is_ok() { // Decode was successful, advance buffer diff --git a/crates/net/discv4/src/test_utils.rs b/crates/net/discv4/src/test_utils.rs index 7e7b27d45c8e..893b8abfec4c 100644 --- a/crates/net/discv4/src/test_utils.rs +++ b/crates/net/discv4/src/test_utils.rs @@ -146,7 +146,7 @@ impl Stream for MockDiscovery { match event { IngressEvent::RecvError(_) => {} IngressEvent::BadPacket(from, err, data) => { - debug!( target : "discv4", ?from, ?err, packet=?hex::encode(&data), "bad packet"); + debug!(target: "discv4", ?from, ?err, packet=?hex::encode(&data), "bad packet"); } IngressEvent::Packet(remote_addr, Packet { msg, node_id, hash }) => match msg { Message::Ping(ping) => { diff --git a/crates/net/dns/src/error.rs b/crates/net/dns/src/error.rs index a4469801e2a6..d24c83ab9def 100644 --- a/crates/net/dns/src/error.rs +++ b/crates/net/dns/src/error.rs @@ -9,17 +9,17 @@ pub(crate) type LookupResult = Result; #[derive(thiserror::Error, Debug)] #[allow(missing_docs)] pub enum ParseDnsEntryError { - #[error("Unknown entry: {0}")] + #[error("unknown entry: {0}")] UnknownEntry(String), - #[error("Field {0} not found.")] + #[error("field {0} not found")] FieldNotFound(&'static str), - #[error("Base64 decoding failed: {0}")] + #[error("base64 decoding failed: {0}")] Base64DecodeError(String), - #[error("Base32 decoding failed: {0}")] + #[error("base32 decoding failed: {0}")] Base32DecodeError(String), #[error("{0}")] RlpDecodeError(String), - #[error("Invalid child hash in branch: {0}")] + #[error("invalid child hash in branch: {0}")] InvalidChildHash(String), #[error("{0}")] Other(String), @@ -31,10 +31,10 @@ pub enum ParseDnsEntryError { pub(crate) enum LookupError { #[error(transparent)] Parse(#[from] ParseDnsEntryError), - #[error("Failed to verify root {0}")] + #[error("failed to verify root {0}")] InvalidRoot(TreeRootEntry), - #[error("Request timed out")] + #[error("request timed out")] RequestTimedOut, - #[error("Entry not found")] + #[error("entry not found")] EntryNotFound, } diff --git a/crates/net/dns/src/lib.rs b/crates/net/dns/src/lib.rs index 439e652986b8..195bf47553cd 100644 --- a/crates/net/dns/src/lib.rs +++ b/crates/net/dns/src/lib.rs @@ -156,7 +156,7 @@ impl DnsDiscoveryService { self.bootstrap(); while let Some(event) = self.next().await { - trace!(target : "disc::dns", ?event, "processed"); + trace!(target: "disc::dns", ?event, "processed"); } }) } diff --git a/crates/net/downloaders/src/bodies/bodies.rs b/crates/net/downloaders/src/bodies/bodies.rs index e50bb5307638..a1451bb5b159 100644 --- a/crates/net/downloaders/src/bodies/bodies.rs +++ b/crates/net/downloaders/src/bodies/bodies.rs @@ -518,7 +518,7 @@ impl Default for BodiesDownloaderBuilder { fn default() -> Self { Self { request_limit: 200, - stream_batch_size: 10_000, + stream_batch_size: 1_000, max_buffered_blocks_size_bytes: 2 * 1024 * 1024 * 1024, // ~2GB concurrent_requests_range: 5..=100, } @@ -616,7 +616,7 @@ mod tests { let db = create_test_rw_db(); let (headers, mut bodies) = generate_bodies(0..=19); - insert_headers(&db, &headers); + insert_headers(db.db(), &headers); let client = Arc::new( TestBodiesClient::default().with_bodies(bodies.clone()).with_should_delay(true), @@ -655,7 +655,7 @@ mod tests { }) .collect::>(); - insert_headers(&db, &headers); + insert_headers(db.db(), &headers); let request_limit = 10; let client = Arc::new(TestBodiesClient::default().with_bodies(bodies.clone())); @@ -676,7 +676,7 @@ mod tests { let db = create_test_rw_db(); let (headers, mut bodies) = generate_bodies(0..=99); - insert_headers(&db, &headers); + insert_headers(db.db(), &headers); let stream_batch_size = 20; let request_limit = 10; @@ -709,7 +709,7 @@ mod tests { let db = create_test_rw_db(); let (headers, mut bodies) = generate_bodies(0..=199); - insert_headers(&db, &headers); + insert_headers(db.db(), &headers); let client = Arc::new(TestBodiesClient::default().with_bodies(bodies.clone())); let mut downloader = BodiesDownloaderBuilder::default().with_stream_batch_size(100).build( @@ -735,4 +735,57 @@ mod tests { Some(Ok(res)) => assert_eq!(res, zip_blocks(headers.iter().skip(100), &mut bodies)) ); } + + // Check that the downloader continues after the size limit is reached. + #[tokio::test] + async fn can_download_after_exceeding_limit() { + // Generate some random blocks + let db = create_test_rw_db(); + let (headers, mut bodies) = generate_bodies(0..=199); + + insert_headers(db.db(), &headers); + + let client = Arc::new(TestBodiesClient::default().with_bodies(bodies.clone())); + // Set the max buffered block size to 1 byte, to make sure that every response exceeds the + // limit + let mut downloader = BodiesDownloaderBuilder::default() + .with_stream_batch_size(10) + .with_request_limit(1) + .with_max_buffered_blocks_size_bytes(1) + .build(client.clone(), Arc::new(TestConsensus::default()), db); + + // Set and download the entire range + downloader.set_download_range(0..=199).expect("failed to set download range"); + let mut header = 0; + while let Some(Ok(resp)) = downloader.next().await { + assert_eq!(resp, zip_blocks(headers.iter().skip(header).take(resp.len()), &mut bodies)); + header += resp.len(); + } + } + + // Check that the downloader can tolerate a few completely empty responses + #[tokio::test] + async fn can_tolerate_empty_responses() { + // Generate some random blocks + let db = create_test_rw_db(); + let (headers, mut bodies) = generate_bodies(0..=99); + + insert_headers(db.db(), &headers); + + // respond with empty bodies for every other request. + let client = Arc::new( + TestBodiesClient::default().with_bodies(bodies.clone()).with_empty_responses(2), + ); + let mut downloader = BodiesDownloaderBuilder::default() + .with_request_limit(3) + .with_stream_batch_size(100) + .build(client.clone(), Arc::new(TestConsensus::default()), db); + + // Download the requested range + downloader.set_download_range(0..=99).expect("failed to set download range"); + assert_matches!( + downloader.next().await, + Some(Ok(res)) => assert_eq!(res, zip_blocks(headers.iter().take(100), &mut bodies)) + ); + } } diff --git a/crates/net/downloaders/src/bodies/task.rs b/crates/net/downloaders/src/bodies/task.rs index 456f8a637cc4..354bd8e3f504 100644 --- a/crates/net/downloaders/src/bodies/task.rs +++ b/crates/net/downloaders/src/bodies/task.rs @@ -181,7 +181,7 @@ mod tests { let db = create_test_rw_db(); let (headers, mut bodies) = generate_bodies(0..=19); - insert_headers(&db, &headers); + insert_headers(db.db(), &headers); let client = Arc::new( TestBodiesClient::default().with_bodies(bodies.clone()).with_should_delay(true), diff --git a/crates/net/downloaders/src/test_utils/bodies_client.rs b/crates/net/downloaders/src/test_utils/bodies_client.rs index e2968fc8d1c9..2f3cf2f293fb 100644 --- a/crates/net/downloaders/src/test_utils/bodies_client.rs +++ b/crates/net/downloaders/src/test_utils/bodies_client.rs @@ -22,6 +22,7 @@ pub struct TestBodiesClient { should_delay: bool, max_batch_size: Option, times_requested: AtomicU64, + empty_response_mod: Option, } impl TestBodiesClient { @@ -35,6 +36,13 @@ impl TestBodiesClient { self } + /// Instructs the client to respond with empty responses some portion of the time. Every + /// `empty_mod` responses, the client will respond with an empty response. + pub(crate) fn with_empty_responses(mut self, empty_mod: u64) -> Self { + self.empty_response_mod = Some(empty_mod); + self + } + pub(crate) fn with_max_batch_size(mut self, max_batch_size: usize) -> Self { self.max_batch_size = Some(max_batch_size); self @@ -43,6 +51,18 @@ impl TestBodiesClient { pub(crate) fn times_requested(&self) -> u64 { self.times_requested.load(Ordering::Relaxed) } + + /// Returns whether or not the client should respond with an empty response. + /// + /// This will only return true if `empty_response_mod` is `Some`, and `times_requested % + /// empty_response_mod == 0`. + pub(crate) fn should_respond_empty(&self) -> bool { + if let Some(empty_response_mod) = self.empty_response_mod { + self.times_requested.load(Ordering::Relaxed) % empty_response_mod == 0 + } else { + false + } + } } impl DownloadClient for TestBodiesClient { @@ -68,8 +88,13 @@ impl BodiesClient for TestBodiesClient { let max_batch_size = self.max_batch_size; self.times_requested.fetch_add(1, Ordering::Relaxed); + let should_respond_empty = self.should_respond_empty(); Box::pin(async move { + if should_respond_empty { + return Ok((PeerId::default(), vec![]).into()) + } + if should_delay { tokio::time::sleep(Duration::from_millis((hashes[0][0] % 100) as u64)).await; } diff --git a/crates/net/downloaders/src/test_utils/file_client.rs b/crates/net/downloaders/src/test_utils/file_client.rs index 29902d946f8c..45df474e1e90 100644 --- a/crates/net/downloaders/src/test_utils/file_client.rs +++ b/crates/net/downloaders/src/test_utils/file_client.rs @@ -168,7 +168,7 @@ impl HeadersClient for FileClient { ) -> Self::Output { // this just searches the buffer, and fails if it can't find the header let mut headers = Vec::new(); - trace!(target : "downloaders::file", request=?request, "Getting headers"); + trace!(target: "downloaders::file", request=?request, "Getting headers"); let start_num = match request.start { BlockHashOrNumber::Hash(hash) => match self.hash_to_number.get(&hash) { @@ -192,7 +192,7 @@ impl HeadersClient for FileClient { } }; - trace!(target : "downloaders::file", range=?range, "Getting headers with range"); + trace!(target: "downloaders::file", range=?range, "Getting headers with range"); for block_number in range { match self.headers.get(&block_number).cloned() { @@ -281,7 +281,7 @@ mod tests { let db = create_test_rw_db(); let (headers, mut bodies) = generate_bodies(0..=19); - insert_headers(&db, &headers); + insert_headers(db.db(), &headers); // create an empty file let file = tempfile::tempfile().unwrap(); @@ -368,7 +368,7 @@ mod tests { let client = Arc::new(FileClient::from_file(file).await.unwrap()); // insert headers in db for the bodies downloader - insert_headers(&db, &headers); + insert_headers(db.db(), &headers); let mut downloader = BodiesDownloaderBuilder::default().build( client.clone(), diff --git a/crates/net/ecies/src/error.rs b/crates/net/ecies/src/error.rs index 1a2a738c4b05..ddeb5d2b5f53 100644 --- a/crates/net/ecies/src/error.rs +++ b/crates/net/ecies/src/error.rs @@ -7,8 +7,6 @@ pub struct ECIESError { inner: Box, } -// === impl === - impl ECIESError { /// Consumes the type and returns the error enum pub fn into_inner(self) -> ECIESErrorImpl { @@ -38,7 +36,7 @@ impl std::error::Error for ECIESError { #[derive(Debug, Error)] pub enum ECIESErrorImpl { /// Error during IO - #[error("IO error")] + #[error(transparent)] IO(std::io::Error), /// Error when checking the HMAC tag against the tag on the message being decrypted #[error("tag check failure in read_header")] @@ -89,7 +87,7 @@ pub enum ECIESErrorImpl { /// [`Framed`](tokio_util::codec::Framed) is closed by the peer, See /// [ConnectionReset](std::io::ErrorKind::ConnectionReset) and the ecies codec fails to decode /// a message from the (partially filled) buffer. - #[error("Stream closed due to not being readable.")] + #[error("stream closed due to not being readable")] UnreadableStream, } diff --git a/crates/net/ecies/src/stream.rs b/crates/net/ecies/src/stream.rs index 11136870905b..f3330c4a2b5d 100644 --- a/crates/net/ecies/src/stream.rs +++ b/crates/net/ecies/src/stream.rs @@ -18,7 +18,7 @@ use std::{ use tokio::io::{AsyncRead, AsyncWrite}; use tokio_stream::{Stream, StreamExt}; use tokio_util::codec::{Decoder, Framed}; -use tracing::{debug, instrument, trace}; +use tracing::{instrument, trace}; /// `ECIES` stream over TCP exchanging raw bytes #[derive(Debug)] @@ -74,11 +74,11 @@ where pub async fn incoming(transport: Io, secret_key: SecretKey) -> Result { let ecies = ECIESCodec::new_server(secret_key)?; - debug!("incoming ecies stream ..."); + trace!("incoming ecies stream"); let mut transport = ecies.framed(transport); let msg = transport.try_next().await?; - debug!("receiving ecies auth"); + trace!("receiving ecies auth"); let remote_id = match &msg { Some(IngressECIESValue::AuthReceive(remote_id)) => *remote_id, _ => { @@ -90,7 +90,7 @@ where } }; - debug!("sending ecies ack ..."); + trace!("sending ecies ack"); transport.send(EgressECIESValue::Ack).await?; Ok(Self { stream: transport, remote_id }) diff --git a/crates/net/eth-wire/src/disconnect.rs b/crates/net/eth-wire/src/disconnect.rs index 8e51cfe4f49d..aa3c6d220ee1 100644 --- a/crates/net/eth-wire/src/disconnect.rs +++ b/crates/net/eth-wire/src/disconnect.rs @@ -50,28 +50,27 @@ pub enum DisconnectReason { impl Display for DisconnectReason { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { let message = match self { - DisconnectReason::DisconnectRequested => "Disconnect requested", + DisconnectReason::DisconnectRequested => "disconnect requested", DisconnectReason::TcpSubsystemError => "TCP sub-system error", DisconnectReason::ProtocolBreach => { - "Breach of protocol, e.g. a malformed message, bad RLP, ..." + "breach of protocol, e.g. a malformed message, bad RLP, etc." } - DisconnectReason::UselessPeer => "Useless peer", - DisconnectReason::TooManyPeers => "Too many peers", - DisconnectReason::AlreadyConnected => "Already connected", - DisconnectReason::IncompatibleP2PProtocolVersion => "Incompatible P2P protocol version", + DisconnectReason::UselessPeer => "useless peer", + DisconnectReason::TooManyPeers => "too many peers", + DisconnectReason::AlreadyConnected => "already connected", + DisconnectReason::IncompatibleP2PProtocolVersion => "incompatible P2P protocol version", DisconnectReason::NullNodeIdentity => { - "Null node identity received - this is automatically invalid" + "null node identity received - this is automatically invalid" } - DisconnectReason::ClientQuitting => "Client quitting", - DisconnectReason::UnexpectedHandshakeIdentity => "Unexpected identity in handshake", + DisconnectReason::ClientQuitting => "client quitting", + DisconnectReason::UnexpectedHandshakeIdentity => "unexpected identity in handshake", DisconnectReason::ConnectedToSelf => { - "Identity is the same as this node (i.e. connected to itself)" + "identity is the same as this node (i.e. connected to itself)" } - DisconnectReason::PingTimeout => "Ping timeout", - DisconnectReason::SubprotocolSpecific => "Some other reason specific to a subprotocol", + DisconnectReason::PingTimeout => "ping timeout", + DisconnectReason::SubprotocolSpecific => "some other reason specific to a subprotocol", }; - - write!(f, "{message}") + f.write_str(message) } } diff --git a/crates/net/eth-wire/src/errors/eth.rs b/crates/net/eth-wire/src/errors/eth.rs index e120c61ee85e..49c6f494135b 100644 --- a/crates/net/eth-wire/src/errors/eth.rs +++ b/crates/net/eth-wire/src/errors/eth.rs @@ -15,7 +15,7 @@ pub enum EthStreamError { ParseVersionError(#[from] ParseVersionError), #[error(transparent)] EthHandshakeError(#[from] EthHandshakeError), - #[error("For {0:?} version, message id({1:?}) is invalid")] + #[error("message id {1:?} is invalid for version {0:?}")] EthInvalidMessageError(EthVersion, EthMessageID), #[error("message size ({0}) exceeds max length (10MB)")] MessageTooBig(usize), @@ -68,12 +68,12 @@ pub enum EthHandshakeError { NoResponse, #[error(transparent)] InvalidFork(#[from] ValidationError), - #[error("mismatched genesis in Status message. expected: {expected:?}, got: {got:?}")] + #[error("mismatched genesis in status message: got {got}, expected {expected}")] MismatchedGenesis { expected: B256, got: B256 }, - #[error("mismatched protocol version in Status message. expected: {expected:?}, got: {got:?}")] + #[error("mismatched protocol version in status message: got {got}, expected {expected}")] MismatchedProtocolVersion { expected: u8, got: u8 }, - #[error("mismatched chain in Status message. expected: {expected:?}, got: {got:?}")] + #[error("mismatched chain in status message: got {got}, expected {expected}")] MismatchedChain { expected: Chain, got: Chain }, - #[error("total difficulty bitlen is too large. maximum: {maximum:?}, got: {got:?}")] + #[error("total difficulty bitlen is too large: got {got}, maximum {maximum}")] TotalDifficultyBitLenTooLarge { maximum: usize, got: usize }, } diff --git a/crates/net/eth-wire/src/errors/p2p.rs b/crates/net/eth-wire/src/errors/p2p.rs index f323a47c1cd2..b10d3d347551 100644 --- a/crates/net/eth-wire/src/errors/p2p.rs +++ b/crates/net/eth-wire/src/errors/p2p.rs @@ -70,7 +70,7 @@ pub enum P2PHandshakeError { NoResponse, #[error("handshake timed out")] Timeout, - #[error("Disconnected by peer: {0}")] + #[error("disconnected by peer: {0}")] Disconnected(DisconnectReason), #[error("error decoding a message during handshake: {0}")] DecodeError(#[from] alloy_rlp::Error), diff --git a/crates/net/eth-wire/src/p2pstream.rs b/crates/net/eth-wire/src/p2pstream.rs index 205eaddaeefc..c956f00f766f 100644 --- a/crates/net/eth-wire/src/p2pstream.rs +++ b/crates/net/eth-wire/src/p2pstream.rs @@ -26,6 +26,7 @@ use tokio_stream::Stream; #[cfg(feature = "serde")] use serde::{Deserialize, Serialize}; +use tracing::{debug, trace}; /// [`MAX_PAYLOAD_SIZE`] is the maximum size of an uncompressed message payload. /// This is defined in [EIP-706](https://eips.ethereum.org/EIPS/eip-706). @@ -93,7 +94,7 @@ where mut self, hello: HelloMessage, ) -> Result<(P2PStream, HelloMessage), P2PStreamError> { - tracing::trace!(?hello, "sending p2p hello to peer"); + trace!(?hello, "sending p2p hello to peer"); // send our hello message with the Sink let mut raw_hello_bytes = BytesMut::new(); @@ -123,21 +124,26 @@ where let their_hello = match P2PMessage::decode(&mut &first_message_bytes[..]) { Ok(P2PMessage::Hello(hello)) => Ok(hello), Ok(P2PMessage::Disconnect(reason)) => { - tracing::debug!("Disconnected by peer during handshake: {}", reason); + if matches!(reason, DisconnectReason::TooManyPeers) { + // Too many peers is a very common disconnect reason that spams the DEBUG logs + trace!(%reason, "Disconnected by peer during handshake"); + } else { + debug!(%reason, "Disconnected by peer during handshake"); + }; counter!("p2pstream.disconnected_errors", 1); Err(P2PStreamError::HandshakeError(P2PHandshakeError::Disconnected(reason))) } Err(err) => { - tracing::debug!(?err, msg=%hex::encode(&first_message_bytes), "Failed to decode first message from peer"); + debug!(?err, msg=%hex::encode(&first_message_bytes), "Failed to decode first message from peer"); Err(P2PStreamError::HandshakeError(err.into())) } Ok(msg) => { - tracing::debug!("expected hello message but received: {:?}", msg); + debug!(?msg, "expected hello message but received another message"); Err(P2PStreamError::HandshakeError(P2PHandshakeError::NonHelloMessageInHandshake)) } }?; - tracing::trace!( + trace!( hello=?their_hello, "validating incoming p2p hello from peer" ); @@ -181,7 +187,7 @@ where ) -> Result<(), P2PStreamError> { let mut buf = BytesMut::new(); P2PMessage::Disconnect(reason).encode(&mut buf); - tracing::trace!( + trace!( %reason, "Sending disconnect message during the handshake", ); @@ -311,7 +317,7 @@ impl P2PStream { let mut compressed = BytesMut::zeroed(1 + snap::raw::max_compress_len(buf.len() - 1)); let compressed_size = self.encoder.compress(&buf[1..], &mut compressed[1..]).map_err(|err| { - tracing::debug!( + debug!( ?err, msg=%hex::encode(&buf[1..]), "error compressing disconnect" @@ -389,7 +395,7 @@ where // each message following a successful handshake is compressed with snappy, so we need // to decompress the message before we can decode it. this.decoder.decompress(&bytes[1..], &mut decompress_buf[1..]).map_err(|err| { - tracing::debug!( + debug!( ?err, msg=%hex::encode(&bytes[1..]), "error decompressing p2p message" @@ -400,7 +406,7 @@ where let id = *bytes.first().ok_or(P2PStreamError::EmptyProtocolMessage)?; match id { _ if id == P2PMessageID::Ping as u8 => { - tracing::trace!("Received Ping, Sending Pong"); + trace!("Received Ping, Sending Pong"); this.send_pong(); // This is required because the `Sink` may not be polled externally, and if // that happens, the pong will never be sent. @@ -408,7 +414,7 @@ where } _ if id == P2PMessageID::Disconnect as u8 => { let reason = DisconnectReason::decode(&mut &decompress_buf[1..]).map_err(|err| { - tracing::debug!( + debug!( ?err, msg=%hex::encode(&decompress_buf[1..]), "Failed to decode disconnect message from peer" ); err @@ -519,7 +525,7 @@ where let mut compressed = BytesMut::zeroed(1 + snap::raw::max_compress_len(item.len() - 1)); let compressed_size = this.encoder.compress(&item[1..], &mut compressed[1..]).map_err(|err| { - tracing::debug!( + debug!( ?err, msg=%hex::encode(&item[1..]), "error compressing p2p message" @@ -633,7 +639,7 @@ pub fn set_capability_offsets( match shared_capability { SharedCapability::UnknownCapability { .. } => { // Capabilities which are not shared are ignored - tracing::debug!("unknown capability: name={:?}, version={}", name, version,); + debug!("unknown capability: name={:?}, version={}", name, version,); } SharedCapability::Eth { .. } => { // increment the offset if the capability is known diff --git a/crates/net/eth-wire/src/types/transactions.rs b/crates/net/eth-wire/src/types/transactions.rs index 46fc30865e3f..18054a5ef0ef 100644 --- a/crates/net/eth-wire/src/types/transactions.rs +++ b/crates/net/eth-wire/src/types/transactions.rs @@ -39,6 +39,13 @@ pub struct PooledTransactions( pub Vec, ); +impl PooledTransactions { + /// Returns an iterator over the transaction hashes in this response. + pub fn hashes(&self) -> impl Iterator + '_ { + self.0.iter().map(|tx| tx.hash()) + } +} + impl From> for PooledTransactions { fn from(txs: Vec) -> Self { PooledTransactions(txs.into_iter().map(Into::into).collect()) diff --git a/crates/net/eth-wire/tests/pooled_transactions.rs b/crates/net/eth-wire/tests/pooled_transactions.rs index a5f20b62f538..e1f6c1696b9f 100644 --- a/crates/net/eth-wire/tests/pooled_transactions.rs +++ b/crates/net/eth-wire/tests/pooled_transactions.rs @@ -3,21 +3,26 @@ use alloy_rlp::{Decodable, Encodable}; use reth_eth_wire::{EthVersion, PooledTransactions, ProtocolMessage}; use reth_primitives::{hex, Bytes, PooledTransactionsElement}; use std::{fs, path::PathBuf}; +use test_fuzz::test_fuzz; -#[test] -fn decode_pooled_transactions_data() { - let network_data_path = - PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("testdata/pooled_transactions_with_blob"); - let data = fs::read_to_string(network_data_path).expect("Unable to read file"); - let hex_data = hex::decode(data.trim()).unwrap(); - let txs = PooledTransactions::decode(&mut &hex_data[..]).unwrap(); +/// Helper function to ensure encode-decode roundtrip works for [`PooledTransactions`]. +#[test_fuzz] +fn roundtrip_pooled_transactions(hex_data: Vec) -> Result<(), alloy_rlp::Error> { + let input_rlp = &mut &hex_data[..]; + let txs = match PooledTransactions::decode(input_rlp) { + Ok(txs) => txs, + Err(e) => return Err(e), + }; + + // get the amount of bytes decoded in `decode` by subtracting the length of the original buf, + // from the length of the remaining bytes + let decoded_len = hex_data.len() - input_rlp.len(); + let expected_encoding = hex_data[..decoded_len].to_vec(); // do a roundtrip test let mut buf = Vec::new(); txs.encode(&mut buf); - if hex_data != buf { - panic!("mixed pooled transaction roundtrip failed"); - } + assert_eq!(expected_encoding, buf); // now do another decoding, on what we encoded - this should succeed let txs2 = PooledTransactions::decode(&mut &buf[..]).unwrap(); @@ -27,6 +32,17 @@ fn decode_pooled_transactions_data() { // ensure that the length is equal to the length of the encoded data assert_eq!(txs.length(), buf.len()); + + Ok(()) +} + +#[test] +fn decode_pooled_transactions_data() { + let network_data_path = + PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("testdata/pooled_transactions_with_blob"); + let data = fs::read_to_string(network_data_path).expect("Unable to read file"); + let hex_data = hex::decode(data.trim()).expect("Unable to decode hex"); + assert!(roundtrip_pooled_transactions(hex_data).is_ok()); } #[test] diff --git a/crates/net/network-api/src/error.rs b/crates/net/network-api/src/error.rs index 71038cf4b0b9..66e1fd0b0766 100644 --- a/crates/net/network-api/src/error.rs +++ b/crates/net/network-api/src/error.rs @@ -5,7 +5,7 @@ use tokio::sync::{mpsc, oneshot}; #[allow(missing_docs)] #[derive(Error, Debug, Clone, PartialEq, Eq)] pub enum NetworkError { - #[error("Sender has been dropped")] + #[error("sender has been dropped")] ChannelClosed, } diff --git a/crates/net/network/src/error.rs b/crates/net/network/src/error.rs index 7362f7094181..73a85376292c 100644 --- a/crates/net/network/src/error.rs +++ b/crates/net/network/src/error.rs @@ -33,7 +33,7 @@ pub enum NetworkError { #[error(transparent)] Io(#[from] io::Error), /// Error when an address is already in use. - #[error("Address {kind} is already in use (os error 98)")] + #[error("address {kind} is already in use (os error 98)")] AddressAlreadyInUse { /// Service kind. kind: ServiceKind, @@ -41,12 +41,12 @@ pub enum NetworkError { error: io::Error, }, /// IO error when creating the discovery service - #[error("Failed to launch discovery service: {0}")] + #[error("failed to launch discovery service: {0}")] Discovery(io::Error), /// Error when setting up the DNS resolver failed /// /// See also [DnsResolver](reth_dns_discovery::DnsResolver::from_system_conf) - #[error("Failed to configure DNS resolver: {0}")] + #[error("failed to configure DNS resolver: {0}")] DnsResolver(#[from] ResolveError), } diff --git a/crates/net/network/src/listener.rs b/crates/net/network/src/listener.rs index f99c520bf68c..1575b3933b46 100644 --- a/crates/net/network/src/listener.rs +++ b/crates/net/network/src/listener.rs @@ -43,7 +43,7 @@ impl ConnectionListener { match ready!(this.incoming.poll_next(cx)) { Some(Ok((stream, remote_addr))) => { if let Err(err) = stream.set_nodelay(true) { - tracing::warn!(target : "net", "set nodelay failed: {:?}", err); + tracing::warn!(target: "net", "set nodelay failed: {:?}", err); } Poll::Ready(ListenerEvent::Incoming { stream, remote_addr }) } diff --git a/crates/net/network/src/manager.rs b/crates/net/network/src/manager.rs index c8387623bcee..91e90d6226b7 100644 --- a/crates/net/network/src/manager.rs +++ b/crates/net/network/src/manager.rs @@ -360,7 +360,7 @@ where _capabilities: Arc, _message: CapabilityMessage, ) { - trace!(target : "net", ?peer_id, "received unexpected message"); + trace!(target: "net", ?peer_id, "received unexpected message"); self.swarm .state_mut() .peers_mut() @@ -506,7 +506,7 @@ where unreachable!("Not emitted by session") } PeerMessage::Other(other) => { - debug!(target : "net", message_id=%other.id, "Ignoring unsupported message"); + debug!(target: "net", message_id=%other.id, "Ignoring unsupported message"); } } } @@ -646,20 +646,20 @@ where this.metrics.invalid_messages_received.increment(1); } SwarmEvent::TcpListenerClosed { remote_addr } => { - trace!(target : "net", ?remote_addr, "TCP listener closed."); + trace!(target: "net", ?remote_addr, "TCP listener closed."); } SwarmEvent::TcpListenerError(err) => { - trace!(target : "net", ?err, "TCP connection error."); + trace!(target: "net", ?err, "TCP connection error."); } SwarmEvent::IncomingTcpConnection { remote_addr, session_id } => { - trace!(target : "net", ?session_id, ?remote_addr, "Incoming connection"); + trace!(target: "net", ?session_id, ?remote_addr, "Incoming connection"); this.metrics.total_incoming_connections.increment(1); this.metrics .incoming_connections .set(this.swarm.state().peers().num_inbound_connections() as f64); } SwarmEvent::OutgoingTcpConnection { remote_addr, peer_id } => { - trace!(target : "net", ?remote_addr, ?peer_id, "Starting outbound connection."); + trace!(target: "net", ?remote_addr, ?peer_id, "Starting outbound connection."); this.metrics.total_outgoing_connections.increment(1); this.metrics .outgoing_connections @@ -678,7 +678,7 @@ where let total_active = this.num_active_peers.fetch_add(1, Ordering::Relaxed) + 1; this.metrics.connected_peers.set(total_active as f64); - debug!( + trace!( target: "net", ?remote_addr, %client_version, @@ -724,7 +724,7 @@ where this.num_active_peers.fetch_sub(1, Ordering::Relaxed) - 1; this.metrics.connected_peers.set(total_active as f64); trace!( - target : "net", + target: "net", ?remote_addr, ?peer_id, ?total_active, @@ -768,8 +768,8 @@ where .notify(NetworkEvent::SessionClosed { peer_id, reason }); } SwarmEvent::IncomingPendingSessionClosed { remote_addr, error } => { - debug!( - target : "net", + trace!( + target: "net", ?remote_addr, ?error, "Incoming pending session failed" @@ -805,7 +805,7 @@ where error, } => { trace!( - target : "net", + target: "net", ?remote_addr, ?peer_id, ?error, @@ -839,7 +839,7 @@ where } SwarmEvent::OutgoingConnectionError { remote_addr, peer_id, error } => { trace!( - target : "net", + target: "net", ?remote_addr, ?peer_id, ?error, diff --git a/crates/net/network/src/message.rs b/crates/net/network/src/message.rs index 79ef8737e7f4..3e9ba3c4df75 100644 --- a/crates/net/network/src/message.rs +++ b/crates/net/network/src/message.rs @@ -146,6 +146,14 @@ impl PeerRequest { } } } + + /// Consumes the type and returns the inner [`GetPooledTransactions`] variant. + pub fn into_get_pooled_transactions(self) -> Option { + match self { + PeerRequest::GetPooledTransactions { request, .. } => Some(request), + _ => None, + } + } } /// Corresponding variant for [`PeerRequest`]. diff --git a/crates/net/network/src/peers/manager.rs b/crates/net/network/src/peers/manager.rs index 3dc69012f4a2..540e688ec2ff 100644 --- a/crates/net/network/src/peers/manager.rs +++ b/crates/net/network/src/peers/manager.rs @@ -27,7 +27,7 @@ use tokio::{ time::{Instant, Interval}, }; use tokio_stream::wrappers::UnboundedReceiverStream; -use tracing::{debug, info, trace}; +use tracing::{info, trace}; /// A communication channel to the [`PeersManager`] to apply manual changes to the peer set. #[derive(Clone, Debug)] @@ -540,7 +540,7 @@ impl PeersManager { /// protocol pub(crate) fn set_discovered_fork_id(&mut self, peer_id: PeerId, fork_id: ForkId) { if let Some(peer) = self.peers.get_mut(&peer_id) { - trace!(target : "net::peers", ?peer_id, ?fork_id, "set discovered fork id"); + trace!(target: "net::peers", ?peer_id, ?fork_id, "set discovered fork id"); peer.fork_id = Some(fork_id); } } @@ -589,7 +589,7 @@ impl PeersManager { } } Entry::Vacant(entry) => { - trace!(target : "net::peers", ?peer_id, ?addr, "discovered new node"); + trace!(target: "net::peers", ?peer_id, ?addr, "discovered new node"); let mut peer = Peer::with_kind(addr, kind); peer.fork_id = fork_id; entry.insert(peer); @@ -606,11 +606,11 @@ impl PeersManager { } let mut peer = entry.remove(); - trace!(target : "net::peers", ?peer_id, "remove discovered node"); + trace!(target: "net::peers", ?peer_id, "remove discovered node"); self.queued_actions.push_back(PeerAction::PeerRemoved(peer_id)); if peer.state.is_connected() { - debug!(target : "net::peers", ?peer_id, "disconnecting on remove from discovery"); + trace!(target: "net::peers", ?peer_id, "disconnecting on remove from discovery"); // we terminate the active session here, but only remove the peer after the session // was disconnected, this prevents the case where the session is scheduled for // disconnect but the node is immediately rediscovered, See also @@ -697,7 +697,7 @@ impl PeersManager { break } - trace!(target : "net::peers", ?peer_id, addr=?peer.addr, "schedule outbound connection"); + trace!(target: "net::peers", ?peer_id, addr=?peer.addr, "schedule outbound connection"); peer.state = PeerConnectionState::Out; PeerAction::Connect { peer_id, remote_addr: peer.addr } diff --git a/crates/net/network/src/session/active.rs b/crates/net/network/src/session/active.rs index 91eaf8bce226..8583adb33866 100644 --- a/crates/net/network/src/session/active.rs +++ b/crates/net/network/src/session/active.rs @@ -274,7 +274,7 @@ impl ActiveSession { unreachable!("Not emitted by network") } PeerMessage::Other(other) => { - debug!(target : "net::session", message_id=%other.id, "Ignoring unsupported message"); + debug!(target: "net::session", message_id=%other.id, "Ignoring unsupported message"); } } } @@ -294,7 +294,7 @@ impl ActiveSession { self.queued_outgoing.push_back(msg.into()); } Err(err) => { - debug!(target : "net", ?err, "Failed to respond to received request"); + debug!(target: "net", ?err, "Failed to respond to received request"); } } } @@ -312,7 +312,7 @@ impl ActiveSession { Ok(_) => Ok(()), Err(err) => { trace!( - target : "net", + target: "net", %err, "no capacity for incoming broadcast", ); @@ -338,7 +338,7 @@ impl ActiveSession { Ok(_) => Ok(()), Err(err) => { trace!( - target : "net", + target: "net", %err, "no capacity for incoming request", ); diff --git a/crates/net/network/src/session/mod.rs b/crates/net/network/src/session/mod.rs index 3dad28b70bfe..4b154a5cd1ce 100644 --- a/crates/net/network/src/session/mod.rs +++ b/crates/net/network/src/session/mod.rs @@ -202,7 +202,7 @@ impl SessionManager { let session_id = self.next_id(); trace!( - target : "net::session", + target: "net::session", ?remote_addr, ?session_id, "new pending incoming session" @@ -347,7 +347,7 @@ impl SessionManager { return match event { ActiveSessionMessage::Disconnected { peer_id, remote_addr } => { trace!( - target : "net::session", + target: "net::session", ?peer_id, "gracefully disconnected active session." ); @@ -359,7 +359,7 @@ impl SessionManager { remote_addr, error, } => { - trace!(target : "net::session", ?peer_id, ?error,"closed session."); + trace!(target: "net::session", ?peer_id, ?error,"closed session."); self.remove_active_session(&peer_id); Poll::Ready(SessionEvent::SessionClosedOnConnectionError { remote_addr, @@ -407,7 +407,7 @@ impl SessionManager { // If there's already a session to the peer then we disconnect right away if self.active_sessions.contains_key(&peer_id) { trace!( - target : "net::session", + target: "net::session", ?session_id, ?remote_addr, ?peer_id, @@ -501,7 +501,7 @@ impl SessionManager { } PendingSessionEvent::Disconnected { remote_addr, session_id, direction, error } => { trace!( - target : "net::session", + target: "net::session", ?session_id, ?remote_addr, ?error, @@ -531,7 +531,7 @@ impl SessionManager { error, } => { trace!( - target : "net::session", + target: "net::session", ?error, ?session_id, ?remote_addr, @@ -544,7 +544,7 @@ impl SessionManager { PendingSessionEvent::EciesAuthError { remote_addr, session_id, error, direction } => { self.remove_pending_session(&session_id); trace!( - target : "net::session", + target: "net::session", ?error, ?session_id, ?remote_addr, @@ -710,7 +710,7 @@ impl PendingSessionHandshakeError { /// The error thrown when the max configured limit has been reached and no more connections are /// accepted. #[derive(Debug, Clone, thiserror::Error)] -#[error("Session limit reached {0}")] +#[error("session limit reached {0}")] pub struct ExceedsSessionLimit(pub(crate) u32); /// Starts the authentication process for a connection initiated by a remote peer. @@ -761,7 +761,7 @@ async fn start_pending_outbound_session( let stream = match TcpStream::connect(remote_addr).await { Ok(stream) => { if let Err(err) = stream.set_nodelay(true) { - tracing::warn!(target : "net::session", "set nodelay failed: {:?}", err); + tracing::warn!(target: "net::session", "set nodelay failed: {:?}", err); } MeteredStream::new_with_meter(stream, bandwidth_meter) } diff --git a/crates/net/network/src/state.rs b/crates/net/network/src/state.rs index d2b94f49a67b..389f6b57dff0 100644 --- a/crates/net/network/src/state.rs +++ b/crates/net/network/src/state.rs @@ -29,7 +29,7 @@ use std::{ task::{Context, Poll}, }; use tokio::sync::oneshot; -use tracing::debug; +use tracing::{debug, trace}; /// Cache limit of blocks to keep track of for a single peer. const PEER_BLOCK_CACHE_LIMIT: usize = 512; @@ -259,13 +259,13 @@ where /// Bans the [`IpAddr`] in the discovery service. pub(crate) fn ban_ip_discovery(&self, ip: IpAddr) { - debug!(target: "net", ?ip, "Banning discovery"); + trace!(target: "net", ?ip, "Banning discovery"); self.discovery.ban_ip(ip) } /// Bans the [`PeerId`] and [`IpAddr`] in the discovery service. pub(crate) fn ban_discovery(&self, peer_id: PeerId, ip: IpAddr) { - debug!(target: "net", ?peer_id, ?ip, "Banning discovery"); + trace!(target: "net", ?peer_id, ?ip, "Banning discovery"); self.discovery.ban(peer_id, ip) } @@ -420,7 +420,7 @@ where // check if the error is due to a closed channel to the session if res.err().map(|err| err.is_channel_closed()).unwrap_or_default() { debug!( - target : "net", + target: "net", ?id, "Request canceled, response channel from session closed." ); diff --git a/crates/net/network/src/swarm.rs b/crates/net/network/src/swarm.rs index ab92b3aa0590..76e5dfc036fd 100644 --- a/crates/net/network/src/swarm.rs +++ b/crates/net/network/src/swarm.rs @@ -20,7 +20,7 @@ use std::{ sync::Arc, task::{Context, Poll}, }; -use tracing::{debug, trace}; +use tracing::trace; /// Contains the connectivity related state of the network. /// @@ -226,7 +226,7 @@ where return Some(SwarmEvent::IncomingTcpConnection { session_id, remote_addr }) } Err(err) => { - debug!(target: "net", ?err, "Incoming connection rejected, capacity already reached."); + trace!(target: "net", ?err, "Incoming connection rejected, capacity already reached."); self.state_mut() .peers_mut() .on_incoming_pending_session_rejected_internally(); diff --git a/crates/net/network/src/transactions.rs b/crates/net/network/src/transactions.rs index cfeebebfe0e5..a67405b6d871 100644 --- a/crates/net/network/src/transactions.rs +++ b/crates/net/network/src/transactions.rs @@ -19,8 +19,8 @@ use reth_interfaces::{ use reth_metrics::common::mpsc::UnboundedMeteredReceiver; use reth_network_api::{Peers, ReputationChangeKind}; use reth_primitives::{ - FromRecoveredPooledTransaction, IntoRecoveredTransaction, PeerId, PooledTransactionsElement, - TransactionSigned, TxHash, B256, + FromRecoveredPooledTransaction, PeerId, PooledTransactionsElement, TransactionSigned, TxHash, + B256, }; use reth_transaction_pool::{ error::PoolResult, GetPooledTransactionLimit, PoolTransaction, PropagateKind, @@ -33,9 +33,9 @@ use std::{ sync::Arc, task::{Context, Poll}, }; -use tokio::sync::{mpsc, oneshot, oneshot::error::RecvError}; +use tokio::sync::{mpsc, mpsc::error::TrySendError, oneshot, oneshot::error::RecvError}; use tokio_stream::wrappers::{ReceiverStream, UnboundedReceiverStream}; -use tracing::{debug, trace}; +use tracing::trace; /// Cache limit of transactions to keep track of for a single peer. const PEER_TRANSACTION_CACHE_LIMIT: usize = 1024 * 10; @@ -55,6 +55,9 @@ const GET_POOLED_TRANSACTION_SOFT_LIMIT_NUM_HASHES: usize = 256; const GET_POOLED_TRANSACTION_SOFT_LIMIT_SIZE: GetPooledTransactionLimit = GetPooledTransactionLimit::SizeSoftLimit(2 * 1024 * 1024); +/// How many peers we keep track of for each missing transaction. +const MAX_ALTERNATIVE_PEERS_PER_TX: usize = 3; + /// The future for inserting a function into the pool pub type PoolImportFuture = Pin> + Send + 'static>>; @@ -149,8 +152,8 @@ pub struct TransactionsManager { /// /// From which we get all new incoming transaction related messages. network_events: UnboundedReceiverStream, - /// All currently active requests for pooled transactions. - inflight_requests: FuturesUnordered, + /// Transaction fetcher to handle inflight and missing transaction requests. + transaction_fetcher: TransactionFetcher, /// All currently pending transactions grouped by peers. /// /// This way we can track incoming transactions and prevent multiple pool imports for the same @@ -192,7 +195,7 @@ impl TransactionsManager { pool, network, network_events, - inflight_requests: Default::default(), + transaction_fetcher: Default::default(), transactions_by_peers: Default::default(), pool_imports: Default::default(), peers: Default::default(), @@ -231,7 +234,9 @@ where #[inline] fn update_request_metrics(&self) { - self.metrics.inflight_transaction_requests.set(self.inflight_requests.len() as f64); + self.metrics + .inflight_transaction_requests + .set(self.transaction_fetcher.inflight_requests.len() as f64); } /// Request handler for an incoming request for transactions @@ -503,23 +508,16 @@ where hashes.truncate(GET_POOLED_TRANSACTION_SOFT_LIMIT_NUM_HASHES); // request the missing transactions - let (response, rx) = oneshot::channel(); - let req = PeerRequest::GetPooledTransactions { - request: GetPooledTransactions(hashes), - response, - }; - - if peer.request_tx.try_send(req).is_ok() { - self.inflight_requests.push(GetPooledTxRequestFut::new(peer_id, rx)) - } else { - // peer channel is saturated, drop the request + let request_sent = + self.transaction_fetcher.request_transactions_from_peer(hashes, peer); + if !request_sent { self.metrics.egress_peer_channel_full.increment(1); return } if num_already_seen > 0 { self.metrics.messages_with_already_seen_hashes.increment(1); - debug!(target: "net::tx", num_hashes=%num_already_seen, ?peer_id, client=?peer.client_version, "Peer sent already seen hashes"); + trace!(target: "net::tx", num_hashes=%num_already_seen, ?peer_id, client=?peer.client_version, "Peer sent already seen hashes"); } } @@ -542,7 +540,12 @@ where .into_iter() .map(PooledTransactionsElement::try_from_broadcast) .filter_map(Result::ok) - .collect(); + .collect::>(); + + // mark the transactions as received + self.transaction_fetcher.on_received_full_transactions_broadcast( + non_blob_txs.iter().map(|tx| tx.hash()), + ); self.import_transactions(peer_id, non_blob_txs, TransactionSource::Broadcast); @@ -698,7 +701,7 @@ where if num_already_seen > 0 { self.metrics.messages_with_already_seen_transactions.increment(1); - debug!(target: "net::tx", num_txs=%num_already_seen, ?peer_id, client=?peer.client_version, "Peer sent already seen transactions"); + trace!(target: "net::tx", num_txs=%num_already_seen, ?peer_id, client=?peer.client_version, "Peer sent already seen transactions"); } } @@ -752,7 +755,6 @@ where impl Future for TransactionsManager where Pool: TransactionPool + Unpin + 'static, - ::Transaction: IntoRecoveredTransaction, { type Output = (); @@ -776,22 +778,19 @@ where this.update_request_metrics(); - // Advance all requests. - while let Poll::Ready(Some(GetPooledTxResponse { peer_id, result })) = - this.inflight_requests.poll_next_unpin(cx) - { - match result { - Ok(Ok(txs)) => { - this.import_transactions(peer_id, txs.0, TransactionSource::Response) - } - Ok(Err(req_err)) => { - this.on_request_error(peer_id, req_err); - } - Err(_) => { - // request channel closed/dropped - this.on_request_error(peer_id, RequestError::ChannelClosed) + let fetch_event = this.transaction_fetcher.poll(cx); + match fetch_event { + Poll::Ready(FetchEvent::TransactionsFetched { peer_id, transactions }) => { + if let Some(txns) = transactions { + this.import_transactions(peer_id, txns, TransactionSource::Response); } } + Poll::Ready(FetchEvent::FetchError { peer_id, error }) => { + this.on_request_error(peer_id, error); + } + Poll::Pending => { + // No event ready at the moment, nothing to do here. + } } this.update_request_metrics(); @@ -811,10 +810,10 @@ where // rules) if err.is_bad_transaction() && !this.network.is_syncing() { trace!(target: "net::tx", ?err, "Bad transaction import"); - this.on_bad_import(*err.hash()); + this.on_bad_import(err.hash); continue } - this.on_good_import(*err.hash()); + this.on_good_import(err.hash); } } } @@ -966,6 +965,8 @@ struct GetPooledTxRequest { struct GetPooledTxResponse { peer_id: PeerId, + /// Transaction hashes that were requested, for cleanup purposes + requested_hashes: Vec, result: Result, RecvError>, } @@ -992,7 +993,18 @@ impl Future for GetPooledTxRequestFut { let mut req = self.as_mut().project().inner.take().expect("polled after completion"); match req.response.poll_unpin(cx) { Poll::Ready(result) => { - Poll::Ready(GetPooledTxResponse { peer_id: req.peer_id, result }) + let request_hashes: Vec = match &result { + Ok(Ok(pooled_txs)) => { + pooled_txs.0.iter().map(|tx_elem| *tx_elem.hash()).collect() + } + _ => Vec::new(), + }; + + Poll::Ready(GetPooledTxResponse { + peer_id: req.peer_id, + requested_hashes: request_hashes, + result, + }) } Poll::Pending => { self.project().inner.set(Some(req)); @@ -1016,6 +1028,166 @@ struct Peer { client_version: Arc, } +/// The type responsible for fetching missing transactions from peers. +/// +/// This will keep track of unique transaction hashes that are currently being fetched and submits +/// new requests on announced hashes. +#[derive(Debug, Default)] +struct TransactionFetcher { + /// All currently active requests for pooled transactions. + inflight_requests: FuturesUnordered, + /// Set that tracks all hashes that are currently being fetched. + inflight_hash_to_fallback_peers: HashMap>, +} + +// === impl TransactionFetcher === + +impl TransactionFetcher { + /// Removes the specified hashes from inflight tracking. + #[inline] + fn remove_inflight_hashes<'a, I>(&mut self, hashes: I) + where + I: IntoIterator, + { + for &hash in hashes { + self.inflight_hash_to_fallback_peers.remove(&hash); + } + } + + /// Advances all inflight requests and returns the next event. + fn poll(&mut self, cx: &mut Context<'_>) -> Poll { + if let Poll::Ready(Some(GetPooledTxResponse { peer_id, requested_hashes, result })) = + self.inflight_requests.poll_next_unpin(cx) + { + return match result { + Ok(Ok(txs)) => { + // clear received hashes + self.remove_inflight_hashes(txs.hashes()); + + // TODO: re-request missing hashes, for now clear all of them + self.remove_inflight_hashes(requested_hashes.iter()); + + Poll::Ready(FetchEvent::TransactionsFetched { + peer_id, + transactions: Some(txs.0), + }) + } + Ok(Err(req_err)) => { + // TODO: re-request missing hashes + self.remove_inflight_hashes(&requested_hashes); + Poll::Ready(FetchEvent::FetchError { peer_id, error: req_err }) + } + Err(_) => { + // TODO: re-request missing hashes + self.remove_inflight_hashes(&requested_hashes); + // request channel closed/dropped + Poll::Ready(FetchEvent::FetchError { + peer_id, + error: RequestError::ChannelClosed, + }) + } + } + } + Poll::Pending + } + + /// Removes the provided transaction hashes from the inflight requests set. + /// + /// This is called when we receive full transactions that are currently scheduled for fetching. + #[inline] + fn on_received_full_transactions_broadcast<'a>( + &mut self, + hashes: impl IntoIterator, + ) { + self.remove_inflight_hashes(hashes) + } + + /// Requests the missing transactions from the announced hashes of the peer + /// + /// This filters all announced hashes that are already in flight, and requests the missing, + /// while marking the given peer as an alternative peer for the hashes that are already in + /// flight. + fn request_transactions_from_peer( + &mut self, + mut announced_hashes: Vec, + peer: &Peer, + ) -> bool { + let peer_id: PeerId = peer.request_tx.peer_id; + // 1. filter out inflight hashes, and register the peer as fallback for all inflight hashes + announced_hashes.retain(|&hash| { + match self.inflight_hash_to_fallback_peers.entry(hash) { + Entry::Vacant(entry) => { + // the hash is not in inflight hashes, insert it and retain in the vector + entry.insert(vec![peer_id]); + true + } + Entry::Occupied(mut entry) => { + // the hash is already in inflight, add this peer as a backup if not more than 3 + // backups already + let backups = entry.get_mut(); + if backups.len() < MAX_ALTERNATIVE_PEERS_PER_TX { + backups.push(peer_id); + } + false + } + } + }); + + // 2. request all missing from peer + if announced_hashes.is_empty() { + // nothing to request + return false + } + + let (response, rx) = oneshot::channel(); + let req: PeerRequest = PeerRequest::GetPooledTransactions { + request: GetPooledTransactions(announced_hashes), + response, + }; + + // try to send the request to the peer + if let Err(err) = peer.request_tx.try_send(req) { + // peer channel is full + match err { + TrySendError::Full(req) | TrySendError::Closed(req) => { + // need to do some cleanup so + let req = req.into_get_pooled_transactions().expect("is get pooled tx"); + + // we know that the peer is the only entry in the map, so we can remove all + for hash in req.0.into_iter() { + self.inflight_hash_to_fallback_peers.remove(&hash); + } + } + } + return false + } else { + //create a new request for it, from that peer + self.inflight_requests.push(GetPooledTxRequestFut::new(peer_id, rx)) + } + + true + } +} + +/// Represents possible events from fetching transactions. +#[derive(Debug)] +enum FetchEvent { + /// Triggered when transactions are successfully fetched. + TransactionsFetched { + /// The ID of the peer from which transactions were fetched. + peer_id: PeerId, + /// The transactions that were fetched, if available. + transactions: Option>, + }, + /// Triggered when there is an error in fetching transactions. + FetchError { + /// The ID of the peer from which an attempt to fetch transactions resulted in an error. + peer_id: PeerId, + /// The specific error that occurred while fetching. + error: RequestError, + }, +} + /// Commands to send to the [`TransactionsManager`] #[derive(Debug)] enum TransactionsCommand { diff --git a/crates/payload/basic/src/lib.rs b/crates/payload/basic/src/lib.rs index ef015266f806..3ee26b584f89 100644 --- a/crates/payload/basic/src/lib.rs +++ b/crates/payload/basic/src/lib.rs @@ -43,7 +43,6 @@ use revm::{ Database, DatabaseCommit, State, }; use std::{ - fmt::Debug, future::Future, pin::Pin, sync::{atomic::AtomicBool, Arc}, @@ -803,8 +802,9 @@ where })); // update add to total fees - let miner_fee = - tx.effective_tip_per_gas(base_fee).expect("fee is always valid; execution succeeded"); + let miner_fee = tx + .effective_tip_per_gas(Some(base_fee)) + .expect("fee is always valid; execution succeeded"); total_fees += U256::from(miner_fee) * U256::from(gas_used); // append transaction to the list of executed transactions @@ -1042,7 +1042,7 @@ fn commit_withdrawals>( /// /// This uses [apply_beacon_root_contract_call] to ultimately apply the beacon root contract state /// change. -fn pre_block_beacon_root_contract_call( +fn pre_block_beacon_root_contract_call( db: &mut DB, chain_spec: &ChainSpec, block_number: u64, @@ -1051,8 +1051,7 @@ fn pre_block_beacon_root_contract_call( attributes: &PayloadBuilderAttributes, ) -> Result<(), PayloadBuilderError> where - DB: Database + DatabaseCommit, - ::Error: Debug, + DB::Error: std::fmt::Display, { // Configure the environment for the block. let env = Env { diff --git a/crates/payload/builder/src/error.rs b/crates/payload/builder/src/error.rs index bbaf2856f557..aaa37d5ac8f6 100644 --- a/crates/payload/builder/src/error.rs +++ b/crates/payload/builder/src/error.rs @@ -10,7 +10,7 @@ use tokio::sync::oneshot; #[derive(Debug, thiserror::Error)] pub enum PayloadBuilderError { /// Thrown whe the parent block is missing. - #[error("missing parent block {0:?}")] + #[error("missing parent block {0}")] MissingParentBlock(B256), /// An oneshot channels has been closed. #[error("sender has been dropped")] @@ -22,7 +22,7 @@ pub enum PayloadBuilderError { #[error(transparent)] Internal(#[from] RethError), /// Unrecoverable error during evm execution. - #[error("evm execution error: {0:?}")] + #[error("evm execution error: {0}")] EvmExecutionError(EVMError), /// Thrown if the payload requests withdrawals before Shanghai activation. #[error("withdrawals set before Shanghai activation")] diff --git a/crates/payload/builder/src/lib.rs b/crates/payload/builder/src/lib.rs index a743553b9979..0d5bdec9dae7 100644 --- a/crates/payload/builder/src/lib.rs +++ b/crates/payload/builder/src/lib.rs @@ -108,6 +108,8 @@ mod payload; mod service; mod traits; +pub mod noop; + #[cfg(any(test, feature = "test-utils"))] pub mod test_utils; diff --git a/crates/payload/builder/src/noop.rs b/crates/payload/builder/src/noop.rs new file mode 100644 index 000000000000..805244f2f736 --- /dev/null +++ b/crates/payload/builder/src/noop.rs @@ -0,0 +1,49 @@ +//! A payload builder service task that does nothing. + +use crate::{service::PayloadServiceCommand, PayloadBuilderHandle}; +use futures_util::{ready, StreamExt}; +use std::{ + future::Future, + pin::Pin, + task::{Context, Poll}, +}; +use tokio::sync::mpsc; +use tokio_stream::wrappers::UnboundedReceiverStream; + +/// A service task that does not build any payloads. +#[derive(Debug)] +pub struct NoopPayloadBuilderService { + /// Receiver half of the command channel. + command_rx: UnboundedReceiverStream, +} + +impl NoopPayloadBuilderService { + /// Creates a new [NoopPayloadBuilderService]. + pub fn new() -> (Self, PayloadBuilderHandle) { + let (service_tx, command_rx) = mpsc::unbounded_channel(); + let handle = PayloadBuilderHandle::new(service_tx); + (Self { command_rx: UnboundedReceiverStream::new(command_rx) }, handle) + } +} + +impl Future for NoopPayloadBuilderService { + type Output = (); + + fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll { + let this = self.get_mut(); + loop { + let Some(cmd) = ready!(this.command_rx.poll_next_unpin(cx)) else { + return Poll::Ready(()) + }; + match cmd { + PayloadServiceCommand::BuildNewPayload(attr, tx) => { + let id = attr.payload_id(); + tx.send(Ok(id)).ok() + } + PayloadServiceCommand::BestPayload(_, tx) => tx.send(None).ok(), + PayloadServiceCommand::PayloadAttributes(_, tx) => tx.send(None).ok(), + PayloadServiceCommand::Resolve(_, tx) => tx.send(None).ok(), + }; + } + } +} diff --git a/crates/payload/builder/src/payload.rs b/crates/payload/builder/src/payload.rs index f3d0f1f99c73..e0142091a9de 100644 --- a/crates/payload/builder/src/payload.rs +++ b/crates/payload/builder/src/payload.rs @@ -11,7 +11,7 @@ use reth_rpc_types::engine::{ }; use reth_rpc_types_compat::engine::payload::{ block_to_payload_v3, convert_block_to_payload_field_v2, - convert_standalone_withdraw_to_withdrawal, try_block_to_payload_v1, + convert_standalone_withdraw_to_withdrawal, from_primitive_sidecar, try_block_to_payload_v1, }; use revm_primitives::{BlobExcessGasAndPrice, BlockEnv, CfgEnv, SpecId}; /// Contains the built payload. @@ -111,7 +111,11 @@ impl From for ExecutionPayloadEnvelopeV3 { // Spec: // should_override_builder: false, - blobs_bundle: sidecars.into(), + blobs_bundle: sidecars + .into_iter() + .map(from_primitive_sidecar) + .collect::>() + .into(), } } } diff --git a/crates/payload/builder/src/service.rs b/crates/payload/builder/src/service.rs index 6f99bf69e9eb..0750fc009779 100644 --- a/crates/payload/builder/src/service.rs +++ b/crates/payload/builder/src/service.rs @@ -18,7 +18,7 @@ use std::{ }; use tokio::sync::{mpsc, oneshot}; use tokio_stream::wrappers::UnboundedReceiverStream; -use tracing::{trace, warn}; +use tracing::{debug, info, trace, warn}; /// A communication channel to the [PayloadBuilderService] that can retrieve payloads. #[derive(Debug, Clone)] @@ -75,10 +75,13 @@ pub struct PayloadBuilderHandle { /// Sender half of the message channel to the [PayloadBuilderService]. to_service: mpsc::UnboundedSender, } - // === impl PayloadBuilderHandle === impl PayloadBuilderHandle { + pub(crate) fn new(to_service: mpsc::UnboundedSender) -> Self { + Self { to_service } + } + /// Resolves the payload job and returns the best payload that has been built so far. /// /// Note: depending on the installed [PayloadJobGenerator], this may or may not terminate the @@ -162,7 +165,7 @@ where /// All active payload jobs. payload_jobs: Vec<(Gen::Job, PayloadId)>, /// Copy of the sender half, so new [`PayloadBuilderHandle`] can be created on demand. - _service_tx: mpsc::UnboundedSender, + service_tx: mpsc::UnboundedSender, /// Receiver half of the command channel. command_rx: UnboundedReceiverStream, /// Metrics for the payload builder service @@ -175,20 +178,26 @@ impl PayloadBuilderService where Gen: PayloadJobGenerator, { - /// Creates a new payload builder service. + /// Creates a new payload builder service and returns the [PayloadBuilderHandle] to interact + /// with it. pub fn new(generator: Gen) -> (Self, PayloadBuilderHandle) { let (service_tx, command_rx) = mpsc::unbounded_channel(); let service = Self { generator, payload_jobs: Vec::new(), - _service_tx: service_tx.clone(), + service_tx, command_rx: UnboundedReceiverStream::new(command_rx), metrics: Default::default(), }; - let handle = PayloadBuilderHandle { to_service: service_tx }; + let handle = service.handle(); (service, handle) } + /// Returns a handle to the service. + pub fn handle(&self) -> PayloadBuilderHandle { + PayloadBuilderHandle::new(self.service_tx.clone()) + } + /// Returns true if the given payload is currently being built. fn contains_payload(&self, id: PayloadId) -> bool { self.payload_jobs.iter().any(|(_, job_id)| *job_id == id) @@ -274,11 +283,13 @@ where let mut res = Ok(id); if this.contains_payload(id) { - warn!(%id, parent = ?attr.parent, "Payload job already in progress, ignoring."); + debug!(%id, parent = %attr.parent, "Payload job already in progress, ignoring."); } else { // no job for this payload yet, create one + let parent = attr.parent; match this.generator.new_payload_job(attr) { Ok(job) => { + info!(%id, %parent, "New payload job created"); this.metrics.inc_initiated_jobs(); new_job = true; this.payload_jobs.push((job, id)); @@ -317,7 +328,7 @@ type PayloadFuture = Pin, PayloadBuilderError>> + Send + Sync>>; /// Message type for the [PayloadBuilderService]. -enum PayloadServiceCommand { +pub(crate) enum PayloadServiceCommand { /// Start building a new payload. BuildNewPayload( PayloadBuilderAttributes, diff --git a/crates/primitives/Cargo.toml b/crates/primitives/Cargo.toml index 2f290cefdb7a..f5b5926daa82 100644 --- a/crates/primitives/Cargo.toml +++ b/crates/primitives/Cargo.toml @@ -11,19 +11,19 @@ description = "Commonly used types in reth." [dependencies] # reth reth-codecs = { path = "../storage/codecs" } +reth-rpc-types.workspace = true revm-primitives = { workspace = true, features = ["serde"] } # ethereum alloy-primitives = { workspace = true, features = ["rand", "rlp"] } alloy-rlp = { workspace = true, features = ["arrayvec"] } -alloy-sol-types.workspace = true ethers-core = { workspace = true, default-features = false, optional = true } # crypto secp256k1 = { workspace = true, features = ["global-context", "recovery"] } # for eip-4844 -c-kzg = { workspace = true, features = ["serde"] } +c-kzg = { workspace = true, features = ["serde"], optional = true } # used for forkid crc = "3" @@ -88,8 +88,9 @@ criterion = "0.5" pprof = { version = "0.12", features = ["flamegraph", "frame-pointer", "criterion"] } [features] -default = [] -arbitrary = ["revm-primitives/arbitrary", "dep:arbitrary", "dep:proptest", "dep:proptest-derive"] +default = ["c-kzg"] +arbitrary = ["revm-primitives/arbitrary", "reth-rpc-types/arbitrary", "dep:arbitrary", "dep:proptest", "dep:proptest-derive"] +c-kzg = ["revm-primitives/c-kzg", "dep:c-kzg"] test-utils = ["dep:plain_hasher", "dep:hash-db", "dep:ethers-core"] # value-256 controls whether transaction Value fields are DB-encoded as 256 bits instead of the # default of 128 bits. diff --git a/crates/primitives/res/eip4844/trusted_setup.txt b/crates/primitives/res/eip4844/trusted_setup.txt deleted file mode 100644 index e4db7d1dd981..000000000000 --- a/crates/primitives/res/eip4844/trusted_setup.txt +++ /dev/null @@ -1,4163 +0,0 @@ -4096 -65 -a0413c0dcafec6dbc9f47d66785cf1e8c981044f7d13cfe3e4fcbb71b5408dfde6312493cb3c1d30516cb3ca88c03654 -8b997fb25730d661918371bb41f2a6e899cac23f04fc5365800b75433c0a953250e15e7a98fb5ca5cc56a8cd34c20c57 -83302852db89424d5699f3f157e79e91dc1380f8d5895c5a772bb4ea3a5928e7c26c07db6775203ce33e62a114adaa99 -a759c48b7e4a685e735c01e5aa6ef9c248705001f470f9ad856cd87806983e917a8742a3bd5ee27db8d76080269b7c83 -967f8dc45ebc3be14c8705f43249a30ff48e96205fb02ae28daeab47b72eb3f45df0625928582aa1eb4368381c33e127 -a418eb1e9fb84cb32b370610f56f3cb470706a40ac5a47c411c464299c45c91f25b63ae3fcd623172aa0f273c0526c13 -8f44e3f0387293bc7931e978165abbaed08f53acd72a0a23ac85f6da0091196b886233bcee5b4a194db02f3d5a9b3f78 -97173434b336be73c89412a6d70d416e170ea355bf1956c32d464090b107c090ef2d4e1a467a5632fbc332eeb679bf2d -a24052ad8d55ad04bc5d951f78e14213435681594110fd18173482609d5019105b8045182d53ffce4fc29fc8810516c1 -b950768136b260277590b5bec3f56bbc2f7a8bc383d44ce8600e85bf8cf19f479898bcc999d96dfbd2001ede01d94949 -92ab8077871037bd3b57b95cbb9fb10eb11efde9191690dcac655356986fd02841d8fdb25396faa0feadfe3f50baf56d -a79b096dff98038ac30f91112dd14b78f8ad428268af36d20c292e2b3b6d9ed4fb28480bb04e465071cc67d05786b6d1 -b9ff71461328f370ce68bf591aa7fb13027044f42a575517f3319e2be4aa4843fa281e756d0aa5645428d6dfa857cef2 -8d765808c00b3543ff182e2d159c38ae174b12d1314da88ea08e13bd9d1c37184cb515e6bf6420531b5d41767987d7ce -b8c9a837d20c3b53e6f578e4a257bb7ef8fc43178614ec2a154915b267ad2be135981d01ed2ee1b5fbd9d9bb27f0800a -a9773d92cf23f65f98ef68f6cf95c72b53d0683af2f9bf886bb9036e4a38184b1131b26fd24397910b494fbef856f3aa -b41ebe38962d112da4a01bf101cb248d808fbd50aaf749fc7c151cf332032eb3e3bdbd716db899724b734d392f26c412 -90fbb030167fb47dcc13d604a726c0339418567c1d287d1d87423fa0cb92eec3455fbb46bcbe2e697144a2d3972142e4 -b11d298bd167464b35fb923520d14832bd9ed50ed841bf6d7618424fd6f3699190af21759e351b89142d355952149da1 -8bc36066f69dc89f7c4d1e58d67497675050c6aa002244cebd9fc957ec5e364c46bab4735ea3db02b73b3ca43c96e019 -ab7ab92c5d4d773068e485aa5831941ebd63db7118674ca38089635f3b4186833af2455a6fb9ed2b745df53b3ce96727 -af191ca3089892cb943cd97cf11a51f38e38bd9be50844a4e8da99f27e305e876f9ed4ab0628e8ae3939066b7d34a15f -a3204c1747feabc2c11339a542195e7cb6628fd3964f846e71e2e3f2d6bb379a5e51700682ea1844eba12756adb13216 -903a29883846b7c50c15968b20e30c471aeac07b872c40a4d19eb1a42da18b649d5bbfde4b4cf6225d215a461b0deb6d -8e6e9c15ffbf1e16e5865a5fef7ed751dc81957a9757b535cb38b649e1098cda25d42381dc4f776778573cdf90c3e6e0 -a8f6dd26100b512a8c96c52e00715c4b2cb9ac457f17aed8ffe1cf1ea524068fe5a1ddf218149845fc1417b789ecfc98 -a5b0ffc819451ea639cfd1c18cbc9365cc79368d3b2e736c0ae54eba2f0801e6eb0ee14a5f373f4a70ca463bdb696c09 -879f91ccd56a1b9736fbfd20d8747354da743fb121f0e308a0d298ff0d9344431890e41da66b5009af3f442c636b4f43 -81bf3a2d9755e206b515a508ac4d1109bf933c282a46a4ae4a1b4cb4a94e1d23642fad6bd452428845afa155742ade7e -8de778d4742f945df40004964e165592f9c6b1946263adcdd5a88b00244bda46c7bb49098c8eb6b3d97a0dd46148a8ca -b7a57b21d13121907ee28c5c1f80ee2e3e83a3135a8101e933cf57171209a96173ff5037f5af606e9fd6d066de6ed693 -b0877d1963fd9200414a38753dffd9f23a10eb3198912790d7eddbc9f6b477019d52ddd4ebdcb9f60818db076938a5a9 -88da2d7a6611bc16adc55fc1c377480c828aba4496c645e3efe0e1a67f333c05a0307f7f1d2df8ac013602c655c6e209 -95719eb02e8a9dede1a888c656a778b1c69b7716fbe3d1538fe8afd4a1bc972183c7d32aa7d6073376f7701df80116d8 -8e8a1ca971f2444b35af3376e85dccda3abb8e8e11d095d0a4c37628dfe5d3e043a377c3de68289ef142e4308e9941a0 -b720caaff02f6d798ac84c4f527203e823ff685869e3943c979e388e1c34c3f77f5c242c6daa7e3b30e511aab917b866 -86040d55809afeec10e315d1ad950d269d37cfee8c144cd8dd4126459e3b15a53b3e68df5981df3c2346d23c7b4baaf4 -82d8cabf13ab853db0377504f0aec00dba3a5cd3119787e8ad378ddf2c40b022ecfc67c642b7acc8c1e3dd03ab50993e -b8d873927936719d2484cd03a6687d65697e17dcf4f0d5aed6f5e4750f52ef2133d4645894e7ebfc4ef6ce6788d404c8 -b1235594dbb15b674a419ff2b2deb644ad2a93791ca05af402823f87114483d6aa1689b7a9bea0f547ad12fe270e4344 -a53fda86571b0651f5affb74312551a082fffc0385cfd24c1d779985b72a5b1cf7c78b42b4f7e51e77055f8e5e915b00 -b579adcfd9c6ef916a5a999e77a0cb21d378c4ea67e13b7c58709d5da23a56c2e54218691fc4ac39a4a3d74f88cc31f7 -ab79e584011713e8a2f583e483a91a0c2a40771b77d91475825b5acbea82db4262132901cb3e4a108c46d7c9ee217a4e -a0fe58ea9eb982d7654c8aaf9366230578fc1362f6faae0594f8b9e659bcb405dff4aac0c7888bbe07f614ecf0d800a6 -867e50e74281f28ecd4925560e2e7a6f8911b135557b688254623acce0dbc41e23ac3e706a184a45d54c586edc416eb0 -89f81b61adda20ea9d0b387a36d0ab073dc7c7cbff518501962038be19867042f11fcc7ff78096e5d3b68c6d8dc04d9b -a58ee91bb556d43cf01f1398c5811f76dc0f11efdd569eed9ef178b3b0715e122060ec8f945b4dbf6eebfa2b90af6fa6 -ac460be540f4c840def2eef19fc754a9af34608d107cbadb53334cf194cc91138d53b9538fcd0ec970b5d4aa455b224a -b09b91f929de52c09d48ca0893be6eb44e2f5210a6c394689dc1f7729d4be4e11d0474b178e80cea8c2ac0d081f0e811 -8d37a442a76b06a02a4e64c2504aea72c8b9b020ab7bcc94580fe2b9603c7c50d7b1e9d70d2a7daea19c68667e8f8c31 -a9838d4c4e3f3a0075a952cf7dd623307ec633fcc81a7cf9e52e66c31780de33dbb3d74c320dc7f0a4b72f7a49949515 -a44766b6251af458fe4f5f9ed1e02950f35703520b8656f09fc42d9a2d38a700c11a7c8a0436ac2e5e9f053d0bb8ff91 -ad78d9481c840f5202546bea0d13c776826feb8b1b7c72e83d99a947622f0bf38a4208551c4c41beb1270d7792075457 -b619ffa8733b470039451e224b777845021e8dc1125f247a4ff2476cc774657d0ff9c5279da841fc1236047de9d81c60 -af760b0a30a1d6af3bc5cd6686f396bd41779aeeb6e0d70a09349bd5da17ca2e7965afc5c8ec22744198fbe3f02fb331 -a0cc209abdb768b589fcb7b376b6e1cac07743288c95a1cf1a0354b47f0cf91fca78a75c1fcafa6f5926d6c379116608 -864add673c89c41c754eeb3cd8dcff5cdde1d739fce65c30e474a082bb5d813cba6412e61154ce88fdb6c12c5d9be35b -b091443b0ce279327dc37cb484e9a5b69b257a714ce21895d67539172f95ffa326903747b64a3649e99aea7bb10d03f7 -a8c452b8c4ca8e0a61942a8e08e28f17fb0ef4c5b018b4e6d1a64038280afa2bf1169202f05f14af24a06ca72f448ccd -a23c24721d18bc48d5dcf70effcbef89a7ae24e67158d70ae1d8169ee75d9a051d34b14e9cf06488bac324fe58549f26 -92a730e30eb5f3231feb85f6720489dbb1afd42c43f05a1610c6b3c67bb949ec8fde507e924498f4ffc646f7b07d9123 -8dbe5abf4031ec9ba6bb06d1a47dd1121fb9e03b652804069250967fd5e9577d0039e233441b7f837a7c9d67ba18c28e -aa456bcfef6a21bb88181482b279df260297b3778e84594ebddbdf337e85d9e3d46ca1d0b516622fb0b103df8ec519b7 -a3b31ae621bd210a2b767e0e6f22eb28fe3c4943498a7e91753225426168b9a26da0e02f1dc5264da53a5ad240d9f51b -aa8d66857127e6e71874ce2202923385a7d2818b84cb73a6c42d71afe70972a70c6bdd2aad1a6e8c5e4ca728382a8ea8 -ac7e8e7a82f439127a5e40558d90d17990f8229852d21c13d753c2e97facf077cf59582b603984c3dd3faebd80aff4f5 -93a8bcf4159f455d1baa73d2ef2450dcd4100420de84169bbe28b8b7a5d1746273f870091a87a057e834f754f34204b1 -89d0ebb287c3613cdcae7f5acc43f17f09c0213fc40c074660120b755d664109ffb9902ed981ede79e018ddb0c845698 -a87ccbfad431406aadbee878d9cf7d91b13649d5f7e19938b7dfd32645a43b114eef64ff3a13201398bd9b0337832e5a -833c51d0d0048f70c3eefb4e70e4ff66d0809c41838e8d2c21c288dd3ae9d9dfaf26d1742bf4976dab83a2b381677011 -8bcd6b1c3b02fffead432e8b1680bad0a1ac5a712d4225e220690ee18df3e7406e2769e1f309e2e803b850bc96f0e768 -b61e3dbd88aaf4ff1401521781e2eea9ef8b66d1fac5387c83b1da9e65c2aa2a56c262dea9eceeb4ad86c90211672db0 -866d3090db944ecf190dd0651abf67659caafd31ae861bab9992c1e3915cb0952da7c561cc7e203560a610f48fae633b -a5e8971543c14274a8dc892b0be188c1b4fbc75c692ed29f166e0ea80874bc5520c2791342b7c1d2fb5dd454b03b8a5b -8f2f9fc50471bae9ea87487ebd1bc8576ef844cc42d606af5c4c0969670fdf2189afd643e4de3145864e7773d215f37f -b1bb0f2527db6d51f42b9224383c0f96048bbc03d469bf01fe1383173ef8b1cc9455d9dd8ba04d46057f46949bfc92b5 -aa7c99d906b4d7922296cfe2520473fc50137c03d68b7865c5bfb8adbc316b1034310ec4b5670c47295f4a80fb8d61e9 -a5d1da4d6aba555919df44cbaa8ff79378a1c9e2cfdfbf9d39c63a4a00f284c5a5724e28ecbc2d9dba27fe4ee5018bd5 -a8db53224f70af4d991b9aae4ffe92d2aa5b618ad9137784b55843e9f16cefbfd25ada355d308e9bbf55f6d2f7976fb3 -b6536c4232bb20e22af1a8bb12de76d5fec2ad9a3b48af1f38fa67e0f8504ef60f305a73d19385095bb6a9603fe29889 -87f7e371a1817a63d6838a8cf4ab3a8473d19ce0d4f40fd013c03d5ddd5f4985df2956531cc9f187928ef54c68f4f9a9 -ae13530b1dbc5e4dced9d909ea61286ec09e25c12f37a1ed2f309b0eb99863d236c3b25ed3484acc8c076ad2fa8cd430 -98928d850247c6f7606190e687d5c94a627550198dbdbea0161ef9515eacdb1a0f195cae3bb293112179082daccf8b35 -918528bb8e6a055ad4db6230d3a405e9e55866da15c4721f5ddd1f1f37962d4904aad7a419218fe6d906fe191a991806 -b71e31a06afe065773dd3f4a6e9ef81c3292e27a3b7fdfdd452d03e05af3b6dd654c355f7516b2a93553360c6681a73a -8870b83ab78a98820866f91ac643af9f3ff792a2b7fda34185a9456a63abdce42bfe8ad4dc67f08a6392f250d4062df4 -91eea1b668e52f7a7a5087fabf1cab803b0316f78d9fff469fbfde2162f660c250e4336a9eea4cb0450bd30ac067bc8b -8b74990946de7b72a92147ceac1bd9d55999a8b576e8df68639e40ed5dc2062cfcd727903133de482b6dca19d0aaed82 -8ebad537fece090ebbab662bdf2618e21ca30cf6329c50935e8346d1217dcbe3c1fe1ea28efca369c6003ce0a94703c1 -a8640479556fb59ebd1c40c5f368fbd960932fdbb782665e4a0e24e2bdb598fc0164ce8c0726d7759cfc59e60a62e182 -a9a52a6bf98ee4d749f6d38be2c60a6d54b64d5cbe4e67266633dc096cf28c97fe998596707d31968cbe2064b72256bf -847953c48a4ce6032780e9b39d0ed4384e0be202c2bbe2dfda3910f5d87aa5cd3c2ffbfcfae4dddce16d6ab657599b95 -b6f6e1485d3ec2a06abaecd23028b200b2e4a0096c16144d07403e1720ff8f9ba9d919016b5eb8dc5103880a7a77a1d3 -98dfc2065b1622f596dbe27131ea60bef7a193b12922cecb27f8c571404f483014f8014572e86ae2e341ab738e4887ef -acb0d205566bacc87bbe2e25d10793f63f7a1f27fd9e58f4f653ceae3ffeba511eaf658e068fad289eeb28f9edbeb35b -ae4411ed5b263673cee894c11fe4abc72a4bf642d94022a5c0f3369380fcdfc1c21e277f2902972252503f91ada3029a -ac4a7a27ba390a75d0a247d93d4a8ef1f0485f8d373a4af4e1139369ec274b91b3464d9738eeaceb19cd6f509e2f8262 -87379c3bf231fdafcf6472a79e9e55a938d851d4dd662ab6e0d95fd47a478ed99e2ad1e6e39be3c0fc4f6d996a7dd833 -81316904b035a8bcc2041199a789a2e6879486ba9fddcba0a82c745cc8dd8374a39e523b91792170cd30be7aa3005b85 -b8206809c6cd027ed019f472581b45f7e12288f89047928ba32b4856b6560ad30395830d71e5e30c556f6f182b1fe690 -88d76c028f534a62e019b4a52967bb8642ede6becfa3807be68fdd36d366fc84a4ac8dc176e80a68bc59eb62caf5dff9 -8c3b8be685b0f8aad131ee7544d0e12f223f08a6f8edaf464b385ac644e0ddc9eff7cc7cb5c1b50ab5d71ea0f41d2213 -8d91410e004f76c50fdc05784157b4d839cb5090022c629c7c97a5e0c3536eeafee17a527b54b1165c3cd81774bb54ce -b25c2863bc28ec5281ce800ddf91a7e1a53f4c6d5da1e6c86ef4616e93bcf55ed49e297216d01379f5c6e7b3c1e46728 -865f7b09ac3ca03f20be90c48f6975dd2588838c2536c7a3532a6aa5187ed0b709cd03d91ff4048061c10d0aa72b69ce -b3f7477c90c11596eb4f8bbf34adbcb832638c4ff3cdd090d4d477ee50472ac9ddaf5be9ad7eca3f148960d362bbd098 -8db35fd53fca04faecd1c76a8227160b3ab46ac1af070f2492445a19d8ff7c25bbaef6c9fa0c8c088444561e9f7e4eb2 -a478b6e9d058a2e01d2fc053b739092e113c23a6a2770a16afbef044a3709a9e32f425ace9ba7981325f02667c3f9609 -98caa6bd38916c08cf221722a675a4f7577f33452623de801d2b3429595f988090907a7e99960fff7c076d6d8e877b31 -b79aaaacefc49c3038a14d2ac468cfec8c2161e88bdae91798d63552cdbe39e0e02f9225717436b9b8a40a022c633c6e -845a31006c680ee6a0cc41d3dc6c0c95d833fcf426f2e7c573fa15b2c4c641fbd6fe5ebb0e23720cc3467d6ee1d80dc4 -a1bc287e272cf8b74dbf6405b3a5190883195806aa351f1dc8e525aa342283f0a35ff687e3b434324dedee74946dd185 -a4fd2dc8db75d3783a020856e2b3aa266dc6926e84f5c491ef739a3bddd46dc8e9e0fc1177937839ef1b18d062ffbb9e -acbf0d3c697f57c202bb8c5dc4f3fc341b8fc509a455d44bd86acc67cad2a04495d5537bcd3e98680185e8aa286f2587 -a5caf423a917352e1b8e844f5968a6da4fdeae467d10c6f4bbd82b5eea46a660b82d2f5440d3641c717b2c3c9ed0be52 -8a39d763c08b926599ab1233219c49c825368fad14d9afc7c0c039224d37c00d8743293fd21645bf0b91eaf579a99867 -b2b53a496def0ba06e80b28f36530fbe0fb5d70a601a2f10722e59abee529369c1ae8fd0f2db9184dd4a2519bb832d94 -a73980fcef053f1b60ebbb5d78ba6332a475e0b96a0c724741a3abf3b59dd344772527f07203cf4c9cb5155ebed81fa0 -a070d20acce42518ece322c9db096f16aed620303a39d8d5735a0df6e70fbeceb940e8d9f5cc38f3314b2240394ec47b -a50cf591f522f19ca337b73089557f75929d9f645f3e57d4f241e14cdd1ea3fb48d84bcf05e4f0377afbb789fbdb5d20 -82a5ffce451096aca8eeb0cd2ae9d83db3ed76da3f531a80d9a70a346359bf05d74863ce6a7c848522b526156a5e20cd -88e0e84d358cbb93755a906f329db1537c3894845f32b9b0b691c29cbb455373d9452fadd1e77e20a623f6eaf624de6f -aa07ac7b84a6d6838826e0b9e350d8ec75e398a52e9824e6b0da6ae4010e5943fec4f00239e96433f291fef9d1d1e609 -ac8887bf39366034bc63f6cc5db0c26fd27307cbc3d6cce47894a8a019c22dd51322fb5096edc018227edfafc053a8f6 -b7d26c26c5b33f77422191dca94977588ab1d4b9ce7d0e19c4a3b4cd1c25211b78c328dbf81e755e78cd7d1d622ad23e -99a676d5af49f0ba44047009298d8474cabf2d5bca1a76ba21eff7ee3c4691a102fdefea27bc948ccad8894a658abd02 -b0d09a91909ab3620c183bdf1d53d43d39eb750dc7a722c661c3de3a1a5d383ad221f71bae374f8a71867505958a3f76 -84681a883de8e4b93d68ac10e91899c2bbb815ce2de74bb48a11a6113b2a3f4df8aceabda1f5f67bc5aacac8c9da7221 -9470259957780fa9b43521fab3644f555f5343281c72582b56d2efd11991d897b3b481cafa48681c5aeb80c9663b68f7 -ab1b29f7ece686e6fa968a4815da1d64f3579fed3bc92e1f3e51cd13a3c076b6cf695ed269d373300a62463dc98a4234 -8ab415bfcd5f1061f7687597024c96dd9c7cb4942b5989379a7a3b5742f7d394337886317659cbeacaf030234a24f972 -b9b524aad924f9acc63d002d617488f31b0016e0f0548f050cada285ce7491b74a125621638f19e9c96eabb091d945be -8c4c373e79415061837dd0def4f28a2d5d74d21cb13a76c9049ad678ca40228405ab0c3941df49249847ecdefc1a5b78 -a8edf4710b5ab2929d3db6c1c0e3e242261bbaa8bcec56908ddadd7d2dad2dca9d6eb9de630b960b122ebeea41040421 -8d66bb3b50b9df8f373163629f9221b3d4b6980a05ea81dc3741bfe9519cf3ebba7ab98e98390bae475e8ede5821bd5c -8d3c21bae7f0cfb97c56952bb22084b58e7bb718890935b73103f33adf5e4d99cd262f929c6eeab96209814f0dbae50a -a5c66cfab3d9ebf733c4af24bebc97070e7989fe3c73e79ac85fb0e4d40ae44fb571e0fad4ad72560e13ed453900d14f -9362e6b50b43dbefbc3254471372297b5dcce809cd3b60bf74a1268ab68bdb50e46e462cbd78f0d6c056330e982846af -854630d08e3f0243d570cc2e856234cb4c1a158d9c1883bf028a76525aaa34be897fe918d5f6da9764a3735fa9ebd24a -8c7d246985469ff252c3f4df6c7c9196fc79f05c1c66a609d84725c78001d0837c7a7049394ba5cf7e863e2d58af8417 -ae050271e01b528925302e71903f785b782f7bf4e4e7a7f537140219bc352dc7540c657ed03d3a297ad36798ecdb98cd -8d2ae9179fcf2b0c69850554580b52c1f4a5bd865af5f3028f222f4acad9c1ad69a8ef6c7dc7b03715ee5c506b74325e -b8ef8de6ce6369a8851cd36db0ccf00a85077e816c14c4e601f533330af9e3acf0743a95d28962ed8bfcfc2520ef3cfe -a6ecad6fdfb851b40356a8b1060f38235407a0f2706e7b8bb4a13465ca3f81d4f5b99466ac2565c60af15f022d26732e -819ff14cdea3ab89d98e133cd2d0379361e2e2c67ad94eeddcdb9232efd509f51d12f4f03ebd4dd953bd262a886281f7 -8561cd0f7a6dbcddd83fcd7f472d7dbcba95b2d4fb98276f48fccf69f76d284e626d7e41314b633352df8e6333fd52a1 -b42557ccce32d9a894d538c48712cb3e212d06ac05cd5e0527ccd2db1078ee6ae399bf6a601ffdab1f5913d35fc0b20c -89b4008d767aad3c6f93c349d3b956e28307311a5b1cec237e8d74bb0dee7e972c24f347fd56afd915a2342bd7bc32f0 -877487384b207e53f5492f4e36c832c2227f92d1bb60542cfeb35e025a4a7afc2b885fae2528b33b40ab09510398f83e -8c411050b63c9053dd0cd81dacb48753c3d7f162028098e024d17cd6348482703a69df31ad6256e3d25a8bbf7783de39 -a8506b54a88d17ac10fb1b0d1fe4aa40eae7553a064863d7f6b52ccc4236dd4b82d01dca6ba87da9a239e3069ba879fb -b1a24caef9df64750c1350789bb8d8a0db0f39474a1c74ea9ba064b1516db6923f00af8d57c632d58844fb8786c3d47a -959d6e255f212b0708c58a2f75cb1fe932248c9d93424612c1b8d1e640149656059737e4db2139afd5556bcdacf3eda2 -84525af21a8d78748680b6535bbc9dc2f0cf9a1d1740d12f382f6ecb2e73811d6c1da2ad9956070b1a617c61fcff9fe5 -b74417d84597a485d0a8e1be07bf78f17ebb2e7b3521b748f73935b9afbbd82f34b710fb7749e7d4ab55b0c7f9de127d -a4a9aecb19a6bab167af96d8b9d9aa5308eab19e6bfb78f5a580f9bf89bdf250a7b52a09b75f715d651cb73febd08e84 -9777b30be2c5ffe7d29cc2803a562a32fb43b59d8c3f05a707ab60ec05b28293716230a7d264d7cd9dd358fc031cc13e -95dce7a3d4f23ac0050c510999f5fbf8042f771e8f8f94192e17bcbfa213470802ebdbe33a876cb621cf42e275cbfc8b -b0b963ebcbbee847ab8ae740478544350b3ac7e86887e4dfb2299ee5096247cd2b03c1de74c774d9bde94ae2ee2dcd59 -a4ab20bafa316030264e13f7ef5891a2c3b29ab62e1668fcb5881f50a9acac6adbe3d706c07e62f2539715db768f6c43 -901478a297669d608e406fe4989be75264b6c8be12169aa9e0ad5234f459ca377f78484ffd2099a2fe2db5e457826427 -88c76e5c250810c057004a03408b85cd918e0c8903dc55a0dd8bb9b4fc2b25c87f9b8cf5943eb19fbbe99d36490050c5 -91607322bbad4a4f03fc0012d0821eff5f8c516fda45d1ec1133bface6f858bf04b25547be24159cab931a7aa08344d4 -843203e07fce3c6c81f84bc6dc5fb5e9d1c50c8811ace522dc66e8658433a0ef9784c947e6a62c11bf705307ef05212e -91dd8813a5d6dddcda7b0f87f672b83198cd0959d8311b2b26fb1fae745185c01f796fbd03aad9db9b58482483fdadd8 -8d15911aacf76c8bcd7136e958febd6963104addcd751ce5c06b6c37213f9c4fb0ffd4e0d12c8e40c36d658999724bfd -8a36c5732d3f1b497ebe9250610605ee62a78eaa9e1a45f329d09aaa1061131cf1d9df00f3a7d0fe8ad614a1ff9caaae -a407d06affae03660881ce20dab5e2d2d6cddc23cd09b95502a9181c465e57597841144cb34d22889902aff23a76d049 -b5fd856d0578620a7e25674d9503be7d97a2222900e1b4738c1d81ff6483b144e19e46802e91161e246271f90270e6cf -91b7708869cdb5a7317f88c0312d103f8ce90be14fb4f219c2e074045a2a83636fdc3e69e862049fc7c1ef000e832541 -b64719cc5480709d1dae958f1d3082b32a43376da446c8f9f64cb02a301effc9c34d9102051733315a8179aed94d53cc -94347a9542ff9d18f7d9eaa2f4d9b832d0e535fe49d52aa2de08aa8192400eddabdb6444a2a78883e27c779eed7fdf5a -840ef44a733ff1376466698cd26f82cf56bb44811e196340467f932efa3ae1ef9958a0701b3b032f50fd9c1d2aed9ab5 -90ab3f6f67688888a31ffc2a882bb37adab32d1a4b278951a21646f90d03385fc976715fc639a785d015751171016f10 -b56f35d164c24b557dbcbc8a4bfa681ec916f8741ffcb27fb389c164f4e3ed2be325210ef5bdaeae7a172ca9599ab442 -a7921a5a80d7cf6ae81ba9ee05e0579b18c20cd2852762c89d6496aa4c8ca9d1ca2434a67b2c16d333ea8e382cdab1e3 -a506bcfbd7e7e5a92f68a1bd87d07ad5fe3b97aeee40af2bf2cae4efcd77fff03f872732c5b7883aa6584bee65d6f8cb -a8c46cff58931a1ce9cbe1501e1da90b174cddd6d50f3dfdfb759d1d4ad4673c0a8feed6c1f24c7af32865a7d6c984e5 -b45686265a83bff69e312c5149db7bb70ac3ec790dc92e392b54d9c85a656e2bf58596ce269f014a906eafc97461aa5f -8d4009a75ccb2f29f54a5f16684b93202c570d7a56ec1a8b20173269c5f7115894f210c26b41e8d54d4072de2d1c75d0 -aef8810af4fc676bf84a0d57b189760ddc3375c64e982539107422e3de2580b89bd27aa6da44e827b56db1b5555e4ee8 -888f0e1e4a34f48eb9a18ef4de334c27564d72f2cf8073e3d46d881853ac1424d79e88d8ddb251914890588937c8f711 -b64b0aa7b3a8f6e0d4b3499fe54e751b8c3e946377c0d5a6dbb677be23736b86a7e8a6be022411601dd75012012c3555 -8d57776f519f0dd912ea14f79fbab53a30624e102f9575c0bad08d2dc754e6be54f39b11278c290977d9b9c7c0e1e0ad -a018fc00d532ceb2e4de908a15606db9b6e0665dd77190e2338da7c87a1713e6b9b61554e7c1462f0f6d4934b960b15c -8c932be83ace46f65c78e145b384f58e41546dc0395270c1397874d88626fdeda395c8a289d602b4c312fe98c1311856 -89174838e21639d6bdd91a0621f04dc056907b88e305dd66e46a08f6d65f731dea72ae87ca5e3042d609e8de8de9aa26 -b7b7f508bb74f7a827ac8189daa855598ff1d96fa3a02394891fd105d8f0816224cd50ac4bf2ed1cf469ace516c48184 -b31877ad682583283baadd68dc1bebd83f5748b165aadd7fe9ef61a343773b88bcd3a022f36d6c92f339b7bfd72820a9 -b79d77260b25daf9126dab7a193df2d7d30542786fa1733ffaf6261734770275d3ca8bae1d9915d1181a78510b3439db -91894fb94cd4c1dd2ceaf9c53a7020c5799ba1217cf2d251ea5bc91ed26e1159dd758e98282ebe35a0395ef9f1ed15a0 -ab59895cdafd33934ceedfc3f0d5d89880482cba6c99a6db93245f9e41987efd76e0640e80aef31782c9a8c7a83fccec -aa22ea63654315e033e09d4d4432331904a6fc5fb1732557987846e3c564668ca67c60a324b4af01663a23af11a9ce4b -b53ba3ef342601467e1f71aa280e100fbabbd38518fa0193e0099505036ee517c1ac78e96e9baeb549bb6879bb698fb0 -943fd69fd656f37487cca3605dc7e5a215fddd811caf228595ec428751fc1de484a0cb84c667fe4d7c35599bfa0e5e34 -9353128b5ebe0dddc555093cf3e5942754f938173541033e8788d7331fafc56f68d9f97b4131e37963ab7f1c8946f5f1 -a76cd3c566691f65cfb86453b5b31dbaf3cab8f84fe1f795dd1e570784b9b01bdd5f0b3c1e233942b1b5838290e00598 -983d84b2e53ffa4ae7f3ba29ef2345247ea2377686b74a10479a0ef105ecf90427bf53b74c96dfa346d0f842b6ffb25b -92e0fe9063306894a2c6970c001781cff416c87e87cb5fbac927a3192655c3da4063e6fa93539f6ff58efac6adcc5514 -b00a81f03c2b8703acd4e2e4c21e06973aba696415d0ea1a648ace2b0ea19b242fede10e4f9d7dcd61c546ab878bc8f9 -b0d08d880f3b456a10bf65cff983f754f545c840c413aea90ce7101a66eb0a0b9b1549d6c4d57725315828607963f15a -90cb64d03534f913b411375cce88a9e8b1329ce67a9f89ca5df8a22b8c1c97707fec727dbcbb9737f20c4cf751359277 -8327c2d42590dfcdb78477fc18dcf71608686ad66c49bce64d7ee874668be7e1c17cc1042a754bbc77c9daf50b2dae07 -8532171ea13aa7e37178e51a6c775da469d2e26ec854eb16e60f3307db4acec110d2155832c202e9ba525fc99174e3b0 -83ca44b15393d021de2a511fa5511c5bd4e0ac7d67259dce5a5328f38a3cce9c3a269405959a2486016bc27bb140f9ff -b1d36e8ca812be545505c8214943b36cabee48112cf0de369957afa796d37f86bf7249d9f36e8e990f26f1076f292b13 -9803abf45be5271e2f3164c328d449efc4b8fc92dfc1225d38e09630909fe92e90a5c77618daa5f592d23fc3ad667094 -b268ad68c7bf432a01039cd889afae815c3e120f57930d463aece10af4fd330b5bd7d8869ef1bcf6b2e78e4229922edc -a4c91a0d6f16b1553264592b4cbbbf3ca5da32ab053ffbdd3dbb1aed1afb650fb6e0dc5274f71a51d7160856477228db -ad89d043c2f0f17806277ffdf3ecf007448e93968663f8a0b674254f36170447b7527d5906035e5e56f4146b89b5af56 -8b6964f757a72a22a642e4d69102951897e20c21449184e44717bd0681d75f7c5bfa5ee5397f6e53febf85a1810d6ed1 -b08f5cdaabec910856920cd6e836c830b863eb578423edf0b32529488f71fe8257d90aed4a127448204df498b6815d79 -af26bb3358be9d280d39b21d831bb53145c4527a642446073fee5a86215c4c89ff49a3877a7a549486262f6f57a0f476 -b4010b37ec4d7c2af20800e272539200a6b623ae4636ecbd0e619484f4ab9240d02bc5541ace3a3fb955dc0a3d774212 -82752ab52bdcc3cc2fc405cb05a2e694d3df4a3a68f2179ec0652536d067b43660b96f85f573f26fbd664a9ef899f650 -96d392dde067473a81faf2d1fea55b6429126b88b160e39b4210d31d0a82833ffd3a80e07d24d495aea2d96be7251547 -a76d8236d6671204d440c33ac5b8deb71fa389f6563d80e73be8b043ec77d4c9b06f9a586117c7f957f4af0331cbc871 -b6c90961f68b5e385d85c9830ec765d22a425f506904c4d506b87d8944c2b2c09615e740ed351df0f9321a7b93979cae -a6ec5ea80c7558403485b3b1869cdc63bde239bafdf936d9b62a37031628402a36a2cfa5cfbb8e26ac922cb0a209b3ba -8c3195bbdbf9bc0fc95fa7e3d7f739353c947f7767d1e3cb24d8c8602d8ea0a1790ac30b815be2a2ba26caa5227891e2 -a7f8a63d809f1155722c57f375ea00412b00147776ae4444f342550279ef4415450d6f400000a326bf11fea6c77bf941 -97fa404df48433a00c85793440e89bb1af44c7267588ae937a1f5d53e01e1c4d4fc8e4a6d517f3978bfdd6c2dfde012f -a984a0a3836de3d8d909c4629a2636aacb85393f6f214a2ef68860081e9db05ad608024762db0dc35e895dc00e2d4cdd -9526cf088ab90335add1db4d3a4ac631b58cbfbe88fa0845a877d33247d1cfeb85994522e1eb8f8874651bfb1df03e2a -ac83443fd0afe99ad49de9bf8230158c118e2814c9c89db5ac951c240d6c2ce45e7677221279d9e97848ec466b99aafe -aeeefdbaba612e971697798ceaf63b247949dc823a0ad771ae5b988a5e882b338a98d3d0796230f49d533ec5ba411b39 -ae3f248b5a7b0f92b7820a6c5ae21e5bd8f4265d4f6e21a22512079b8ee9be06393fd3133ce8ebac0faf23f4f8517e36 -a64a831b908eee784b8388b45447d2885ec0551b26b0c2b15e5f417d0a12c79e867fb7bd3d008d0af98b44336f8ec1ad -b242238cd8362b6e440ba21806905714dd55172db25ec7195f3fc4937b2aba146d5cbf3cf691a1384b4752dc3b54d627 -819f97f337eea1ffb2a678cc25f556f1aab751c6b048993a1d430fe1a3ddd8bb411c152e12ca60ec6e057c190cd1db9a -b9d7d187407380df54ee9fef224c54eec1bfabf17dc8abf60765b7951f538f59aa26fffd5846cfe05546c35f59b573f4 -aa6e3c14efa6a5962812e3f94f8ce673a433f4a82d07a67577285ea0eaa07f8be7115853122d12d6d4e1fdf64c504be1 -82268bee9c1662d3ddb5fb785abfae6fb8b774190f30267f1d47091d2cd4b3874db4372625aa36c32f27b0eee986269b -b236459565b7b966166c4a35b2fa71030b40321821b8e96879d95f0e83a0baf33fa25721f30af4a631df209e25b96061 -8708d752632d2435d2d5b1db4ad1fa2558d776a013655f88e9a3556d86b71976e7dfe5b8834fdec97682cd94560d0d0d -ae1424a68ae2dbfb0f01211f11773732a50510b5585c1fb005cb892b2c6a58f4a55490b5c5b4483c6fce40e9d3236a52 -b3f5f722af9dddb07293c871ce97abbccba0093ca98c8d74b1318fa21396fc1b45b69c15084f63d728f9908442024506 -9606f3ce5e63886853ca476dc0949e7f1051889d529365c0cb0296fdc02abd088f0f0318ecd2cf36740a3634132d36f6 -b11a833a49fa138db46b25ff8cdda665295226595bc212c0931b4931d0a55c99da972c12b4ef753f7e37c6332356e350 -afede34e7dab0a9e074bc19a7daddb27df65735581ca24ad70c891c98b1349fcebbcf3ba6b32c2617fe06a5818dabc2d -97993d456e459e66322d01f8eb13918979761c3e8590910453944bdff90b24091bb018ac6499792515c9923be289f99f -977e3e967eff19290a192cd11df3667d511b398fb3ac9a5114a0f3707e25a0edcb56105648b1b85a8b7519fc529fc6f6 -b873a7c88bf58731fe1bf61ff6828bf114cf5228f254083304a4570e854e83748fc98683ddba62d978fff7909f2c5c47 -ad4b2691f6f19da1d123aaa23cca3e876247ed9a4ab23c599afdbc0d3aa49776442a7ceaa996ac550d0313d9b9a36cee -b9210713c78e19685608c6475bfa974b57ac276808a443f8b280945c5d5f9c39da43effa294bfb1a6c6f7b6b9f85bf6c -a65152f376113e61a0e468759de38d742caa260291b4753391ee408dea55927af08a4d4a9918600a3bdf1df462dffe76 -8bf8c27ad5140dde7f3d2280fd4cc6b29ab76537e8d7aa7011a9d2796ee3e56e9a60c27b5c2da6c5e14fc866301dc195 -92fde8effc9f61393a2771155812b863cff2a0c5423d7d40aa04d621d396b44af94ddd376c28e7d2f53c930aea947484 -97a01d1dd9ee30553ce676011aea97fa93d55038ada95f0057d2362ae9437f3ed13de8290e2ff21e3167dd7ba10b9c3f -89affffaa63cb2df3490f76f0d1e1d6ca35c221dd34057176ba739fa18d492355e6d2a5a5ad93a136d3b1fed0bb8aa19 -928b8e255a77e1f0495c86d3c63b83677b4561a5fcbbe5d3210f1e0fc947496e426d6bf3b49394a5df796c9f25673fc4 -842a0af91799c9b533e79ee081efe2a634cac6c584c2f054fb7d1db67dde90ae36de36cbf712ec9cd1a0c7ee79e151ea -a65b946cf637e090baf2107c9a42f354b390e7316beb8913638130dbc67c918926eb87bec3b1fe92ef72bc77a170fa3b -aafc0f19bfd71ab5ae4a8510c7861458b70ad062a44107b1b1dbacbfa44ba3217028c2824bd7058e2fa32455f624040b -95269dc787653814e0be899c95dba8cfa384f575a25e671c0806fd80816ad6797dc819d30ae06e1d0ed9cb01c3950d47 -a1e760f7fa5775a1b2964b719ff961a92083c5c617f637fc46e0c9c20ab233f8686f7f38c3cb27d825c54dd95e93a59b -ac3b8a7c2317ea967f229eddc3e23e279427f665c4705c7532ed33443f1243d33453c1088f57088d2ab1e3df690a9cc9 -b787beeddfbfe36dd51ec4efd9cf83e59e84d354c3353cc9c447be53ae53d366ed1c59b686e52a92f002142c8652bfe0 -b7a64198300cb6716aa7ac6b25621f8bdec46ad5c07a27e165b3f774cdf65bcfdbf31e9bae0c16b44de4b00ada7a4244 -b8ae9f1452909e0c412c7a7fe075027691ea8df1347f65a5507bc8848f1d2c833d69748076db1129e5b4fb912f65c86c -9682e41872456b9fa67def89e71f06d362d6c8ca85c9c48536615bc401442711e1c9803f10ab7f8ab5feaec0f9df20a6 -88889ff4e271dc1c7e21989cc39f73cde2f0475acd98078281591ff6c944fadeb9954e72334319050205d745d4df73df -8f79b5b8159e7fd0d93b0645f3c416464f39aec353b57d99ecf24f96272df8a068ad67a6c90c78d82c63b40bb73989bb -838c01a009a3d8558a3f0bdd5e22de21af71ca1aefc8423c91dc577d50920e9516880e87dce3e6d086e11cd45c9052d9 -b97f1c6eee8a78f137c840667cc288256e39294268a3009419298a04a1d0087c9c9077b33c917c65caf76637702dda8a -972284ce72f96a61c899260203dfa06fc3268981732bef74060641c1a5068ead723e3399431c247ca034b0dae861e8df -945a8d52d6d3db6663dbd3110c6587f9e9c44132045eeffba15621576d178315cb52870fa5861669f84f0bee646183fe -a0a547b5f0967b1c3e5ec6c6a9a99f0578521489180dfdfbb5561f4d166baac43a2f06f950f645ce991664e167537eed -a0592cda5cdddf1340033a745fd13a6eff2021f2e26587116c61c60edead067e0f217bc2bef4172a3c9839b0b978ab35 -b9c223b65a3281587fa44ec829e609154b32f801fd1de6950e01eafb07a8324243b960d5735288d0f89f0078b2c42b5b -99ebfc3b8f9f98249f4d37a0023149ed85edd7a5abe062c8fb30c8c84555258b998bdcdd1d400bc0fa2a4aaa8b224466 -955b68526e6cb3937b26843270f4e60f9c6c8ece2fa9308fe3e23afa433309c068c66a4bc16ee2cf04220f095e9afce4 -b766caeafcc00378135ae53397f8a67ed586f5e30795462c4a35853de6681b1f17401a1c40958de32b197c083b7279c1 -921bf87cad947c2c33fa596d819423c10337a76fe5a63813c0a9dc78a728207ae7b339407a402fc4d0f7cba3af6da6fc -a74ba1f3bc3e6c025db411308f49b347ec91da1c916bda9da61e510ec8d71d25e0ac0f124811b7860e5204f93099af27 -a29b4d144e0bf17a7e8353f2824cef0ce85621396babe8a0b873ca1e8a5f8d508b87866cf86da348470649fceefd735c -a8040e12ffc3480dd83a349d06741d1572ef91932c46f5cf03aee8454254156ee95786fd013d5654725e674c920cec32 -8c4cf34ca60afd33923f219ffed054f90cd3f253ffeb2204a3b61b0183417e366c16c07fae860e362b0f2bfe3e1a1d35 -8195eede4ddb1c950459df6c396b2e99d83059f282b420acc34220cadeed16ab65c856f2c52568d86d3c682818ed7b37 -91fff19e54c15932260aa990c7fcb3c3c3da94845cc5aa8740ef56cf9f58d19b4c3c55596f8d6c877f9f4d22921d93aa -a3e0bf7e5d02a80b75cf75f2db7e66cb625250c45436e3c136d86297d652590ec97c2311bafe407ad357c79ab29d107b -81917ff87e5ed2ae4656b481a63ced9e6e5ff653b8aa6b7986911b8bc1ee5b8ef4f4d7882c3f250f2238e141b227e510 -915fdbe5e7de09c66c0416ae14a8750db9412e11dc576cf6158755fdcaf67abdbf0fa79b554cac4fe91c4ec245be073f -8df27eafb5c3996ba4dc5773c1a45ca77e626b52e454dc1c4058aa94c2067c18332280630cc3d364821ee53bf2b8c130 -934f8a17c5cbb827d7868f5c8ca00cb027728a841000a16a3428ab16aa28733f16b52f58c9c4fbf75ccc45df72d9c4df -b83f4da811f9183c25de8958bc73b504cf790e0f357cbe74ef696efa7aca97ad3b7ead1faf76e9f982c65b6a4d888fc2 -87188213c8b5c268dc2b6da413f0501c95749e953791b727450af3e43714149c115b596b33b63a2f006a1a271b87efd0 -83e9e888ab9c3e30761de635d9aabd31248cdd92f7675fc43e4b21fd96a03ec1dc4ad2ec94fec857ffb52683ac98e360 -b4b9a1823fe2d983dc4ec4e3aaea297e581c3fc5ab4b4af5fa1370caa37af2d1cc7fc6bfc5e7da60ad8fdce27dfe4b24 -856388bc78aef465dbcdd1f559252e028c9e9a2225c37d645c138e78f008f764124522705822a61326a6d1c79781e189 -a6431b36db93c3b47353ba22e7c9592c9cdfb9cbdd052ecf2cc3793f5b60c1e89bc96e6bae117bfd047f2308da00dd2f -b619972d48e7e4291542dcde08f7a9cdc883c892986ded2f23ccb216e245cd8d9ad1d285347b0f9d7611d63bf4cee2bc -8845cca6ff8595955f37440232f8e61d5351500bd016dfadd182b9d39544db77a62f4e0102ff74dd4173ae2c181d24ef -b2f5f7fa26dcd3b6550879520172db2d64ee6aaa213cbef1a12befbce03f0973a22eb4e5d7b977f466ac2bf8323dcedd -858b7f7e2d44bdf5235841164aa8b4f3d33934e8cb122794d90e0c1cac726417b220529e4f896d7b77902ab0ccd35b3a -80b0408a092dae2b287a5e32ea1ad52b78b10e9c12f49282976cd738f5d834e03d1ad59b09c5ccaccc39818b87d06092 -b996b0a9c6a2d14d984edcd6ab56bc941674102980d65b3ad9733455f49473d3f587c8cbf661228a7e125ddbe07e3198 -90224fcebb36865293bd63af786e0c5ade6b67c4938d77eb0cbae730d514fdd0fe2d6632788e858afd29d46310cf86df -b71351fdfff7168b0a5ec48397ecc27ac36657a8033d9981e97002dcca0303e3715ce6dd3f39423bc8ef286fa2e9e669 -ae2a3f078b89fb753ce4ed87e0c1a58bb19b4f0cfb6586dedb9fcab99d097d659a489fb40e14651741e1375cfc4b6c5f -8ef476b118e0b868caed297c161f4231bbeb863cdfa5e2eaa0fc6b6669425ce7af50dc374abceac154c287de50c22307 -92e46ab472c56cfc6458955270d3c72b7bde563bb32f7d4ab4d959db6f885764a3d864e1aa19802fefaa5e16b0cb0b54 -96a3f68323d1c94e73d5938a18a377af31b782f56212de3f489d22bc289cf24793a95b37f1d6776edf88114b5c1fa695 -962cc068cfce6faaa27213c4e43e44eeff0dfbb6d25b814e82c7da981fb81d7d91868fa2344f05fb552362f98cfd4a72 -895d4e4c4ad670abf66d43d59675b1add7afad7438ada8f42a0360c704cee2060f9ac15b4d27e9b9d0996bb801276fe3 -b3ad18d7ece71f89f2ef749b853c45dc56bf1c796250024b39a1e91ed11ca32713864049c9aaaea60cde309b47486bbf -8f05404e0c0258fdbae50e97ccb9b72ee17e0bd2400d9102c0dad981dac8c4c71585f03e9b5d50086d0a2d3334cb55d1 -8bd877e9d4591d02c63c6f9fc9976c109de2d0d2df2bfa5f6a3232bab5b0b8b46e255679520480c2d7a318545efa1245 -8d4c16b5d98957c9da13d3f36c46f176e64e5be879f22be3179a2c0e624fe4758a82bf8c8027410002f973a3b84cd55a -86e2a8dea86427b424fa8eada881bdff896907084a495546e66556cbdf070b78ba312bf441eb1be6a80006d25d5097a3 -8608b0c117fd8652fdab0495b08fadbeba95d9c37068e570de6fddfef1ba4a1773b42ac2be212836141d1bdcdef11a17 -a13d6febf5fb993ae76cae08423ca28da8b818d6ef0fde32976a4db57839cd45b085026b28ee5795f10a9a8e3098c683 -8e261967fa6de96f00bc94a199d7f72896a6ad8a7bbb1d6187cca8fad824e522880e20f766620f4f7e191c53321d70f9 -8b8e8972ac0218d7e3d922c734302803878ad508ca19f5f012bc047babd8a5c5a53deb5fe7c15a4c00fd6d1cb9b1dbd0 -b5616b233fb3574a2717d125a434a2682ff68546dccf116dd8a3b750a096982f185614b9fb6c7678107ff40a451f56fa -aa6adf9b0c3334b0d0663f583a4914523b2ac2e7adffdb026ab9109295ff6af003ef8357026dbcf789896d2afded8d73 -acb72df56a0b65496cd534448ed4f62950bb1e11e50873b6ed349c088ee364441821294ce0f7c61bd7d38105bea3b442 -abae12df83e01ec947249fedd0115dc501d2b03ff7232092979eda531dbbca29ace1d46923427c7dde4c17bdf3fd7708 -820b4fc2b63a9fda7964acf5caf19a2fc4965007cb6d6b511fcafcb1f71c3f673a1c0791d3f86e3a9a1eb6955b191cc0 -af277259d78c6b0f4f030a10c53577555df5e83319ddbad91afbd7c30bc58e7671c56d00d66ec3ab5ef56470cd910cee -ad4a861c59f1f5ca1beedd488fb3d131dea924fffd8e038741a1a7371fad7370ca5cf80dc01f177fbb9576713bb9a5b3 -b67a5162982ce6a55ccfb2f177b1ec26b110043cf18abd6a6c451cf140b5af2d634591eb4f28ad92177d8c7e5cd0a5e8 -96176d0a83816330187798072d449cbfccff682561e668faf6b1220c9a6535b32a6e4f852e8abb00f79abb87493df16b -b0afe6e7cb672e18f0206e4423f51f8bd0017bf464c4b186d46332c5a5847647f89ff7fa4801a41c1b0b42f6135bcc92 -8fc5e7a95ef20c1278c645892811f6fe3f15c431ebc998a32ec0da44e7213ea934ed2be65239f3f49b8ec471e9914160 -b7793e41adda6c82ba1f2a31f656f6205f65bf8a3d50d836ee631bc7ce77c153345a2d0fc5c60edf8b37457c3729c4ec -a504dd7e4d6b2f4379f22cc867c65535079c75ccc575955f961677fa63ecb9f74026fa2f60c9fb6323c1699259e5e9c8 -ab899d00ae693649cc1afdf30fb80d728973d2177c006e428bf61c7be01e183866614e05410041bc82cb14a33330e69c -8a3bd8b0b1be570b65c4432a0f6dc42f48a2000e30ab089cf781d38f4090467b54f79c0d472fcbf18ef6a00df69cc6f3 -b4d7028f7f76a96a3d7803fca7f507ae11a77c5346e9cdfccb120a833a59bda1f4264e425aa588e7a16f8e7638061d84 -b9c7511a76ea5fb105de905d44b02edb17008335766ee357ed386b7b3cf19640a98b38785cb14603c1192bee5886c9b6 -8563afb12e53aed71ac7103ab8602bfa8371ae095207cb0d59e8fd389b6ad1aff0641147e53cb6a7ca16c7f37c9c5e6b -8e108be614604e09974a9ed90960c28c4ea330a3d9a0cb4af6dd6f193f84ab282b243ecdf549b3131036bebc8905690c -b794d127fbedb9c5b58e31822361706ffac55ce023fbfe55716c3c48c2fd2f2c7660a67346864dfe588812d369cb50b6 -b797a3442fc3b44f41baefd30346f9ac7f96e770d010d53c146ce74ce424c10fb62758b7e108b8abfdc5fafd89d745cb -993bb71e031e8096442e6205625e1bfddfe6dd6a83a81f3e2f84fafa9e5082ab4cad80a099f21eff2e81c83457c725c3 -8711ab833fc03e37acf2e1e74cfd9133b101ff4144fe30260654398ae48912ab46549d552eb9d15d2ea57760d35ac62e -b21321fd2a12083863a1576c5930e1aecb330391ef83326d9d92e1f6f0d066d1394519284ddab55b2cb77417d4b0292f -877d98f731ffe3ee94b0b5b72d127630fa8a96f6ca4f913d2aa581f67732df6709493693053b3e22b0181632ac6c1e3b -ae391c12e0eb8c145103c62ea64f41345973311c3bf7281fa6bf9b7faafac87bcf0998e5649b9ef81e288c369c827e07 -b83a2842f36998890492ab1cd5a088d9423d192681b9a3a90ec518d4c541bce63e6c5f4df0f734f31fbfdd87785a2463 -a21b6a790011396e1569ec5b2a423857b9bec16f543e63af28024e116c1ea24a3b96e8e4c75c6537c3e4611fd265e896 -b4251a9c4aab3a495da7a42e684ba4860dbcf940ad1da4b6d5ec46050cbe8dab0ab9ae6b63b5879de97b905723a41576 -8222f70aebfe6ac037f8543a08498f4cadb3edaac00336fc00437eb09f2cba758f6c38e887cc634b4d5b7112b6334836 -86f05038e060594c46b5d94621a1d9620aa8ba59a6995baf448734e21f58e23c1ea2993d3002ad5250d6edd5ba59b34f -a7c0c749baef811ab31b973c39ceb1d94750e2bc559c90dc5eeb20d8bb6b78586a2b363c599ba2107d6be65cd435f24e -861d46a5d70b38d6c1cd72817a2813803d9f34c00320c8b62f8b9deb67f5b5687bc0b37c16d28fd017367b92e05da9ca -b3365d3dab639bffbe38e35383686a435c8c88b397b717cd4aeced2772ea1053ceb670f811f883f4e02975e5f1c4ac58 -a5750285f61ab8f64cd771f6466e2c0395e01b692fd878f2ef2d5c78bdd8212a73a3b1dfa5e4c8d9e1afda7c84857d3b -835a10809ccf939bc46cf950a33b36d71be418774f51861f1cd98a016ade30f289114a88225a2c11e771b8b346cbe6ef -a4f59473a037077181a0a62f1856ec271028546ca9452b45cedfcb229d0f4d1aabfc13062b07e536cc8a0d4b113156a2 -95cd14802180b224d44a73cc1ed599d6c4ca62ddcaa503513ccdc80aaa8be050cc98bd4b4f3b639549beb4587ac6caf9 -973b731992a3e69996253d7f36dd7a0af1982b5ed21624b77a7965d69e9a377b010d6dabf88a8a97eec2a476259859cc -af8a1655d6f9c78c8eb9a95051aa3baaf9c811adf0ae8c944a8d3fcba87b15f61021f3baf6996fa0aa51c81b3cb69de1 -835aad5c56872d2a2d6c252507b85dd742bf9b8c211ccb6b25b52d15c07245b6d89b2a40f722aeb5083a47cca159c947 -abf4e970b02bef8a102df983e22e97e2541dd3650b46e26be9ee394a3ea8b577019331857241d3d12b41d4eacd29a3ac -a13c32449dbedf158721c13db9539ae076a6ce5aeaf68491e90e6ad4e20e20d1cdcc4a89ed9fd49cb8c0dd50c17633c1 -8c8f78f88b7e22dd7e9150ab1c000f10c28e696e21d85d6469a6fe315254740f32e73d81ab1f3c1cf8f544c86df506e8 -b4b77f2acfe945abf81f2605f906c10b88fb4d28628487fb4feb3a09f17f28e9780445dfcee4878349d4c6387a9d17d4 -8d255c235f3812c6ecc646f855fa3832be5cb4dbb9c9e544989fafdf3f69f05bfd370732eaf954012f0044aa013fc9c6 -b982efd3f34b47df37c910148ac56a84e8116647bea24145a49e34e0a6c0176e3284d838dae6230cb40d0be91c078b85 -983f365aa09bd85df2a6a2ad8e4318996b1e27d02090755391d4486144e40d80b1fbfe1c798d626db92f52e33aa634da -95fd1981271f3ea3a41d654cf497e6696730d9ff7369f26bc4d7d15c7adb4823dd0c42e4a005a810af12d234065e5390 -a9f5219bd4b913c186ef30c02f995a08f0f6f1462614ea5f236964e02bdaa33db9d9b816c4aee5829947840a9a07ba60 -9210e6ceb05c09b46fd09d036287ca33c45124ab86315e5d6911ff89054f1101faaa3e83d123b7805056d388bcec6664 -8ed9cbf69c6ff3a5c62dd9fe0d7264578c0f826a29e614bc2fb4d621d90c8c9992438accdd7a614b1dca5d1bb73dc315 -85cf2a8cca93e00da459e3cecd22c342d697eee13c74d5851634844fc215f60053cf84b0e03c327cb395f48d1c71a8a4 -8818a18e9a2ec90a271b784400c1903089ffb0e0b40bc5abbbe12fbebe0f731f91959d98c5519ef1694543e31e2016d4 -8dabc130f296fa7a82870bf9a8405aaf542b222ed9276bba9bd3c3555a0f473acb97d655ee7280baff766a827a8993f0 -ac7952b84b0dc60c4d858f034093b4d322c35959605a3dad2b806af9813a4680cb038c6d7f4485b4d6b2ff502aaeca25 -ad65cb6d57b48a2602568d2ec8010baed0eb440eec7638c5ec8f02687d764e9de5b5d42ad5582934e592b48471c22d26 -a02ab8bd4c3d114ea23aebdd880952f9495912817da8c0c08eabc4e6755439899d635034413d51134c72a6320f807f1c -8319567764b8295402ec1ebef4c2930a138480b37e6d7d01c8b4c9cd1f2fc3f6e9a44ae6e380a0c469b25b06db23305f -afec53b2301dc0caa8034cd9daef78c48905e6068d692ca23d589b84a6fa9ddc2ed24a39480597e19cb3e83eec213b3f -ac0b4ffdb5ae08e586a9cdb98f9fe56f4712af3a97065e89e274feacfb52b53c839565aee93c4cfaaccfe51432c4fab0 -8972cbf07a738549205b1094c5987818124144bf187bc0a85287c94fdb22ce038c0f11df1aa16ec5992e91b44d1af793 -b7267aa6f9e3de864179b7da30319f1d4cb2a3560f2ea980254775963f1523b44c680f917095879bebfa3dc2b603efcf -80f68f4bfc337952e29504ee5149f15093824ea7ab02507efd1317a670f6cbc3611201848560312e3e52e9d9af72eccf -8897fee93ce8fc1e1122e46b6d640bba309384dbd92e46e185e6364aa8210ebf5f9ee7e5e604b6ffba99aa80a10dd7d0 -b58ea6c02f2360be60595223d692e82ee64874fda41a9f75930f7d28586f89be34b1083e03bbc1575bbfdda2d30db1ea -85a523a33d903280d70ac5938770453a58293480170c84926457ac2df45c10d5ff34322ab130ef4a38c916e70d81af53 -a2cbf045e1bed38937492c1f2f93a5ba41875f1f262291914bc1fc40c60bd0740fb3fea428faf6da38b7c180fe8ac109 -8c09328770ed8eb17afc6ac7ddd87bb476de18ed63cab80027234a605806895959990c47bd10d259d7f3e2ecb50074c9 -b4b9e19edb4a33bde8b7289956568a5b6b6557404e0a34584b5721fe6f564821091013fbb158e2858c6d398293bb4b59 -8a47377df61733a2aa5a0e945fce00267f8e950f37e109d4487d92d878fb8b573317bb382d902de515b544e9e233458d -b5804c9d97efeff5ca94f3689b8088c62422d92a1506fd1d8d3b1b30e8a866ad0d6dad4abfa051dfc4471250cac4c5d9 -9084a6ee8ec22d4881e9dcc8a9eb3c2513523d8bc141942370fd191ad2601bf9537a0b1e84316f3209b3d8a54368051e -85447eea2fa26656a649f8519fa67279183044791d61cf8563d0783d46d747d96af31d0a93507bbb2242666aa87d3720 -97566a84481027b60116c751aec552adfff2d9038e68d48c4db9811fb0cbfdb3f1d91fc176a0b0d988a765f8a020bce1 -ae87e5c1b9e86c49a23dceda4ecfd1dcf08567f1db8e5b6ec752ebd45433c11e7da4988573cdaebbb6f4135814fc059e -abee05cf9abdbc52897ac1ce9ed157f5466ed6c383d6497de28616238d60409e5e92619e528af8b62cc552bf09970dc2 -ae6d31cd7bf9599e5ee0828bab00ceb4856d829bba967278a73706b5f388465367aa8a6c7da24b5e5f1fdd3256ef8e63 -ac33e7b1ee47e1ee4af472e37ab9e9175260e506a4e5ce449788075da1b53c44cb035f3792d1eea2aa24b1f688cc6ed3 -80f65b205666b0e089bb62152251c48c380a831e5f277f11f3ef4f0d52533f0851c1b612267042802f019ec900dc0e8f -858520ad7aa1c9fed738e3b583c84168f2927837ad0e1d326afe9935c26e9b473d7f8c382e82ef1fe37d2b39bb40a1ee -b842dd4af8befe00a97c2d0f0c33c93974761e2cb9e5ab8331b25170318ddd5e4bdbc02d8f90cbfdd5f348f4f371c1f7 -8bf2cb79bc783cb57088aae7363320cbeaabd078ffdec9d41bc74ff49e0043d0dad0086a30e5112b689fd2f5a606365d -982eb03bbe563e8850847cd37e6a3306d298ab08c4d63ab6334e6b8c1fa13fce80cf2693b09714c7621d74261a0ff306 -b143edb113dec9f1e5105d4a93fbe502b859e587640d3db2f628c09a17060e6aec9e900e2c8c411cda99bc301ff96625 -af472d9befa750dcebc5428fe1a024f18ec1c07bca0f95643ce6b5f4189892a910285afb03fd7ed7068fbe614e80d33c -a97e3bc57ede73ecd1bbf02de8f51b4e7c1a067da68a3cd719f4ba26a0156cbf1cef2169fd35a18c5a4cced50d475998 -a862253c937cf3d75d7183e5f5be6a4385d526aeda5171c1c60a8381fea79f88f5f52a4fab244ecc70765d5765e6dfd5 -90cb776f8e5a108f1719df4a355bebb04bf023349356382cae55991b31720f0fd03206b895fa10c56c98f52453be8778 -a7614e8d0769dccd520ea4b46f7646e12489951efaef5176bc889e9eb65f6e31758df136b5bf1e9107e68472fa9b46ec -ac3a9b80a3254c42e5ed3a090a0dd7aee2352f480de96ad187027a3bb6c791eddfc3074b6ffd74eea825188f107cda4d -82a01d0168238ef04180d4b6e0a0e39024c02c2d75b065017c2928039e154d093e1af4503f4d1f3d8a948917abb5d09f -8fab000a2b0eef851a483aec8d2dd85fe60504794411a2f73ed82e116960547ac58766cb73df71aea71079302630258d -872451a35c6db61c63e9b8bb9f16b217f985c20be4451c14282c814adb29d7fb13f201367c664435c7f1d4d9375d7a58 -887d9ff54cc96b35d562df4a537ff972d7c4b3fd91ab06354969a4cfede0b9fc68bbffb61d0dbf1a58948dc701e54f5a -8cb5c2a6bd956875d88f41ae24574434f1308514d44057b55c9c70f13a3366ed054150eed0955a38fda3f757be73d55f -89ad0163cad93e24129d63f8e38422b7674632a8d0a9016ee8636184cab177659a676c4ee7efba3abe1a68807c656d60 -b9ec01c7cab6d00359b5a0b4a1573467d09476e05ca51a9227cd16b589a9943d161eef62dcc73f0de2ec504d81f4d252 -8031d17635d39dfe9705c485d2c94830b6fc9bc67b91300d9d2591b51e36a782e77ab5904662effa9382d9cca201f525 -8be5a5f6bc8d680e5092d6f9a6585acbaaaa2ddc671da560dcf5cfa4472f4f184b9597b5b539438accd40dda885687cc -b1fc0f052fae038a2e3de3b3a96b0a1024b009de8457b8b3adb2d315ae68a89af905720108a30038e5ab8d0d97087785 -8b8bdc77bd3a6bc7ca5492b6f8c614852c39a70d6c8a74916eaca0aeb4533b11898b8820a4c2620a97bf35e275480029 -af35f4dc538d4ad5cdf710caa38fd1eb496c3fa890a047b6a659619c5ad3054158371d1e88e0894428282eed9f47f76b -8166454a7089cc07758ad78724654f4e7a1a13e305bbf88ddb86f1a4b2904c4fc8ab872d7da364cdd6a6c0365239e2ad -ab287c7d3addce74ce40491871c768abe01daaa0833481276ff2e56926b38a7c6d2681ffe837d2cc323045ad1a4414f9 -b90317f4505793094d89365beb35537f55a6b5618904236258dd04ca61f21476837624a2f45fef8168acf732cab65579 -98ae5ea27448e236b6657ab5ef7b1cccb5372f92ab25f5fa651fbac97d08353a1dae1b280b1cd42b17d2c6a70a63ab9d -adcf54e752d32cbaa6cb98fbca48d8cd087b1db1d131d465705a0d8042c8393c8f4d26b59006eb50129b21e6240f0c06 -b591a3e4db18a7345fa935a8dd7994bbac5cc270b8ebd84c8304c44484c7a74afb45471fdbe4ab22156a30fae1149b40 -806b53ac049a42f1dcc1d6335505371da0bf27c614f441b03bbf2e356be7b2fb4eed7117eabcce9e427a542eaa2bf7d8 -800482e7a772d49210b81c4a907f5ce97f270b959e745621ee293cf8c71e8989363d61f66a98f2d16914439544ca84c7 -99de9eafdad3617445312341644f2bb888680ff01ce95ca9276b1d2e5ef83fa02dab5e948ebf66c17df0752f1bd37b70 -961ee30810aa4c93ae157fbe9009b8e443c082192bd36a73a6764ff9b2ad8b0948fe9a73344556e01399dd77badb4257 -ae0a361067c52efbe56c8adf982c00432cd478929459fc7f74052c8ee9531cd031fe1335418fde53f7c2ef34254eb7ac -a3503d16b6b27eb20c1b177bcf90d13706169220523a6271b85b2ce35a9a2b9c5bed088540031c0a4ebfdae3a4c6ab04 -909420122c3e723289ca4e7b81c2df5aff312972a2203f4c45821b176e7c862bf9cac7f7df3adf1d59278f02694d06e7 -989f42380ae904b982f85d0c6186c1aef5d6bcba29bcfbb658e811b587eb2749c65c6e4a8cc6409c229a107499a4f5d7 -8037a6337195c8e26a27ea4ef218c6e7d79a9720aaab43932d343192abc2320fe72955f5e431c109093bda074103330a -b312e168663842099b88445e940249cc508f080ab0c94331f672e7760258dbd86be5267e4cf25ea25facb80bff82a7e9 -aaa3ff8639496864fcdbfdda1ac97edc4f08e3c9288b768f6c8073038c9fbbf7e1c4bea169b4d45c31935cdf0680d45e -97dbd3df37f0b481a311dfc5f40e59227720f367912200d71908ef6650f32cc985cb05b981e3eea38958f7e48d10a15d -a89d49d1e267bb452d6cb621b9a90826fe55e9b489c0427b94442d02a16f390eed758e209991687f73f6b5a032321f42 -9530dea4e0e19d6496f536f2e75cf7d814d65fde567055eb20db48fd8d20d501cd2a22fb506db566b94c9ee10f413d43 -81a7009b9e67f1965fa7da6a57591c307de91bf0cd35ab4348dc4a98a4961e096d004d7e7ad318000011dc4342c1b809 -83440a9402b766045d7aca61a58bba2aa29cac1cf718199e472ba086f5d48093d9dda4d135292ba51d049a23964eceae -a06c9ce5e802df14f6b064a3d1a0735d429b452f0e2e276042800b0a4f16df988fd94cf3945921d5dd3802ab2636f867 -b1359e358b89936dee9e678a187aad3e9ab14ac40e96a0a68f70ee2583cdcf467ae03bef4215e92893f4e12f902adec8 -835304f8619188b4d14674d803103d5a3fa594d48e96d9699e653115dd05fdc2dda6ba3641cf7ad53994d448da155f02 -8327cba5a9ff0d3f5cd0ae55e77167448926d5fcf76550c0ad978092a14122723090c51c415e88e42a2b62eb07cc3981 -b373dcdaea85f85ce9978b1426a7ef4945f65f2d3467a9f1cc551a99766aac95df4a09e2251d3f89ca8c9d1a7cfd7b0e -ab1422dc41af2a227b973a6fd124dfcb2367e2a11a21faa1d381d404f51b7257e5bc82e9cf20cd7fe37d7ae761a2ab37 -a93774a03519d2f20fdf2ef46547b0a5b77c137d6a3434b48d56a2cbef9e77120d1b85d0092cf8842909213826699477 -8eb967a495a38130ea28711580b7e61bcd1d051cd9e4f2dbf62f1380bd86e0d60e978d72f6f31e909eb97b3b9a2b867c -ae8213378da1287ba1fe4242e1acaec19b877b6fe872400013c6eac1084b8d03156792fa3020201725b08228a1e80f49 -b143daf6893d674d607772b3b02d8ac48f294237e2f2c87963c0d4e26d9227d94a2a13512457c3d5883544bbc259f0ef -b343bd2aca8973888e42542218924e2dda2e938fd1150d06878af76f777546213912b7c7a34a0f94186817d80ffa185c -b188ebc6a8c3007001aa347ae72cc0b15d09bc6c19a80e386ee4b334734ec0cc2fe8b493c2422f38d1e6d133cc3db6fe -b795f6a8b9b826aaeee18ccd6baf6c5adeeec85f95eb5b6d19450085ec7217e95a2d9e221d77f583b297d0872073ba0e -b1c7dbd998ad32ae57bfa95deafa147024afd57389e98992c36b6e52df915d3d5a39db585141ec2423173e85d212fed8 -812bcdeb9fe5f12d0e1df9964798056e1f1c3de3b17b6bd2919b6356c4b86d8e763c01933efbe0224c86a96d5198a4be -b19ebeda61c23d255cbf472ef0b8a441f4c55b70f0d8ed47078c248b1d3c7c62e076b43b95c00a958ec8b16d5a7cb0d7 -b02adc9aaa20e0368a989c2af14ff48b67233d28ebee44ff3418bb0473592e6b681af1cc45450bd4b175df9051df63d9 -8d87f0714acee522eb58cec00360e762adc411901dba46adc9227124fa70ee679f9a47e91a6306d6030dd4eb8de2f3c1 -8be54cec21e74bcc71de29dc621444263737db15f16d0bb13670f64e42f818154e04b484593d19ef95f2ee17e4b3fe21 -ab8e20546c1db38d31493b5d5f535758afb17e459645c1b70813b1cf7d242fd5d1f4354a7c929e8f7259f6a25302e351 -89f035a1ed8a1e302ac893349ba8ddf967580fcb6e73d44af09e3929cde445e97ff60c87dafe489e2c0ab9c9986cfa00 -8b2b0851a795c19191a692af55f7e72ad2474efdc5401bc3733cfdd910e34c918aaebe69d5ea951bdddf3c01cabbfc67 -a4edb52c2b51495ccd1ee6450fc14b7b3ede8b3d106808929d02fb31475bacb403e112ba9c818d2857651e508b3a7dd1 -9569341fded45d19f00bcf3cbf3f20eb2b4d82ef92aba3c8abd95866398438a2387437e580d8b646f17cf6fde8c5af23 -aa4b671c6d20f72f2f18a939a6ff21cc37e0084b44b4a717f1be859a80b39fb1be026b3205adec2a66a608ec2bcd578f -94902e980de23c4de394ad8aec91b46f888d18f045753541492bfbb92c59d3daa8de37ae755a6853744af8472ba7b72b -af651ef1b2a0d30a7884557edfad95b6b5d445a7561caebdc46a485aedd25932c62c0798465c340a76f6feaa196dd712 -b7b669b8e5a763452128846dd46b530dca4893ace5cc5881c7ddcd3d45969d7e73fbebdb0e78aa81686e5f7b22ec5759 -82507fd4ebe9fa656a7f2e084d64a1fa6777a2b0bc106d686e2d9d2edafc58997e58cb6bfd0453b2bf415704aa82ae62 -b40bce2b42b88678400ecd52955bbdadd15f8b9e1b3751a1a3375dc0efb5ca3ee258cf201e1140b3c09ad41217d1d49e -b0210d0cbb3fbf3b8cdb39e862f036b0ff941cd838e7aaf3a8354e24246e64778d22f3de34572e6b2a580614fb6425be -876693cba4301b251523c7d034108831df3ce133d8be5a514e7a2ca494c268ca0556fa2ad8310a1d92a16b55bcd99ea9 -8660281406d22a4950f5ef050bf71dd3090edb16eff27fa29ef600cdea628315e2054211ed2cc6eaf8f2a1771ef689fd -a610e7e41e41ab66955b809ba4ade0330b8e9057d8efc9144753caed81995edeb1a42a53f93ce93540feca1fae708dac -a49e2c176a350251daef1218efaccc07a1e06203386ede59c136699d25ca5cb2ac1b800c25b28dd05678f14e78e51891 -83e0915aa2b09359604566080d411874af8c993beba97d4547782fdbe1a68e59324b800ff1f07b8db30c71adcbd102a8 -a19e84e3541fb6498e9bb8a099c495cbfcad113330e0262a7e4c6544495bb8a754b2208d0c2d895c93463558013a5a32 -87f2bd49859a364912023aca7b19a592c60214b8d6239e2be887ae80b69ebdeb59742bdebcfa73a586ab23b2c945586c -b8e8fdddae934a14b57bc274b8dcd0d45ebb95ddbaabef4454e0f6ce7d3a5a61c86181929546b3d60c447a15134d08e1 -87e0c31dcb736ea4604727e92dc1d9a3cf00adcff79df3546e02108355260f3dd171531c3c0f57be78d8b28058fcc8c0 -9617d74e8f808a4165a8ac2e30878c349e1c3d40972006f0787b31ea62d248c2d9f3fc3da83181c6e57e95feedfd0e8c -8949e2cee582a2f8db86e89785a6e46bc1565c2d8627d5b6bf43ba71ffadfab7e3c5710f88dcb5fb2fc6edf6f4fae216 -ad3fa7b0edceb83118972a2935a09f409d09a8db3869f30be3a76f67aa9fb379cabb3a3aff805ba023a331cad7d7eb64 -8c95718a4112512c4efbd496be38bf3ca6cdcaad8a0d128f32a3f9aae57f3a57bdf295a3b372a8c549fda8f4707cffed -88f3261d1e28a58b2dee3fcc799777ad1c0eb68b3560f9b4410d134672d9533532a91ea7be28a041784872632d3c9d80 -b47472a41d72dd2e8b72f5c4f8ad626737dde3717f63d6bc776639ab299e564cbad0a2ad5452a07f02ff49a359c437e5 -9896d21dc2e8aad87b76d6df1654f10cd7bceed4884159d50a818bea391f8e473e01e14684814c7780235f28e69dca6e -82d47c332bbd31bbe83b5eb44a23da76d4a7a06c45d7f80f395035822bc27f62f59281d5174e6f8e77cc9b5c3193d6f0 -95c74cd46206e7f70c9766117c34c0ec45c2b0f927a15ea167901a160e1530d8522943c29b61e03568aa0f9c55926c53 -a89d7757825ae73a6e81829ff788ea7b3d7409857b378ebccd7df73fdbe62c8d9073741cf038314971b39af6c29c9030 -8c1cd212d0b010905d560688cfc036ae6535bc334fa8b812519d810b7e7dcf1bb7c5f43deaa40f097158358987324a7f -b86993c383c015ed8d847c6b795164114dd3e9efd25143f509da318bfba89389ea72a420699e339423afd68b6512fafb -8d06bd379c6d87c6ed841d8c6e9d2d0de21653a073725ff74be1934301cc3a79b81ef6dd0aad4e7a9dc6eac9b73019bc -81af4d2d87219985b9b1202d724fe39ef988f14fef07dfe3c3b11714e90ffba2a97250838e8535eb63f107abfe645e96 -8c5e0af6330a8becb787e4b502f34f528ef5756e298a77dc0c7467433454347f3a2e0bd2641fbc2a45b95e231c6e1c02 -8e2a8f0f04562820dc8e7da681d5cad9fe2e85dd11c785fb6fba6786c57a857e0b3bd838fb849b0376c34ce1665e4837 -a39be8269449bfdfc61b1f62077033649f18dae9bef7c6163b9314ca8923691fb832f42776f0160b9e8abd4d143aa4e1 -8c154e665706355e1cc98e0a4cabf294ab019545ba9c4c399d666e6ec5c869ca9e1faf8fb06cd9c0a5c2f51a7d51b70a -a046a7d4de879d3ebd4284f08f24398e9e3bf006cd4e25b5c67273ade248689c69affff92ae810c07941e4904296a563 -afd94c1cb48758e5917804df03fb38a6da0e48cd9b6262413ea13b26973f9e266690a1b7d9d24bbaf7e82718e0e594b0 -859e21080310c8d6a38e12e2ac9f90a156578cdeb4bb2e324700e97d9a5511cd6045dc39d1d0de3f94aeed043a24119d -a219fb0303c379d0ab50893264919f598e753aac9065e1f23ef2949abc992577ab43c636a1d2c089203ec9ddb941e27d -b0fdb639d449588a2ca730afcba59334e7c387342d56defdfb7ef79c493f7fd0e5277eff18e7203e756c7bdda5803047 -87f9c3b7ed01f54368aca6dbcf2f6e06bff96e183c4b2c65f8baa23b377988863a0a125d5cdd41a072da8462ced4c070 -99ef7a5d5ac2f1c567160e1f8c95f2f38d41881850f30c461a205f7b1b9fb181277311333839b13fb3ae203447e17727 -aeaca9b1c2afd24e443326cc68de67b4d9cedb22ad7b501a799d30d39c85bb2ea910d4672673e39e154d699e12d9b3dc -a11675a1721a4ba24dd3d0e4c3c33a6edf4cd1b9f6b471070b4386c61f77452266eae6e3f566a40cfc885eada9a29f23 -b228334445e37b9b49cb4f2cc56b454575e92173ddb01370a553bba665adadd52df353ad74470d512561c2c3473c7bb9 -a18177087c996572d76f81178d18ed1ceebc8362a396348ce289f1d8bd708b9e99539be6fccd4acb1112381cfc5749b4 -8e7b8bf460f0d3c99abb19803b9e43422e91507a1c0c22b29ee8b2c52d1a384da4b87c292e28eff040db5be7b1f8641f -b03d038d813e29688b6e6f444eb56fec3abba64c3d6f890a6bcf2e916507091cdb2b9d2c7484617be6b26552ed1c56cb -a1c88ccd30e934adfc5494b72655f8afe1865a84196abfb376968f22ddc07761210b6a9fb7638f1413d1b4073d430290 -961b714faebf172ad2dbc11902461e286e4f24a99a939152a53406117767682a571057044decbeb3d3feef81f4488497 -a03dc4059b46effdd786a0a03cc17cfee8585683faa35bb07936ded3fa3f3a097f518c0b8e2db92fd700149db1937789 -adf60180c99ca574191cbcc23e8d025b2f931f98ca7dfcebfc380226239b6329347100fcb8b0fcb12db108c6ad101c07 -805d4f5ef24d46911cbf942f62cb84b0346e5e712284f82b0db223db26d51aabf43204755eb19519b00e665c7719fcaa -8dea7243e9c139662a7fe3526c6c601eee72fd8847c54c8e1f2ad93ef7f9e1826b170afe58817dac212427164a88e87f -a2ba42356606d651b077983de1ad643650997bb2babb188c9a3b27245bb65d2036e46667c37d4ce02cb1be5ae8547abe -af2ae50b392bdc013db2d12ce2544883472d72424fc767d3f5cb0ca2d973fc7d1f425880101e61970e1a988d0670c81b -98e6bec0568d3939b31d00eb1040e9b8b2a35db46ddf4369bdaee41bbb63cc84423d29ee510a170fb5b0e2df434ba589 -822ff3cd12fbef4f508f3ca813c04a2e0b9b799c99848e5ad3563265979e753ee61a48f6adc2984a850f1b46c1a43d35 -891e8b8b92a394f36653d55725ef514bd2e2a46840a0a2975c76c2a935577f85289026aaa74384da0afe26775cbddfb9 -b2a3131a5d2fe7c8967047aa66e4524babae941d90552171cc109527f345f42aa0df06dcbb2fa01b33d0043917bbed69 -80c869469900431f3eeefafdbe07b8afd8cee7739e659e6d0109b397cacff85a88247698f87dc4e2fe39a592f250ac64 -9091594f488b38f9d2bb5df49fd8b4f8829d9c2f11a197dd1431ed5abbc5c954bbde3387088f9ee3a5a834beb7619bce -b472e241e6956146cca57b97a8a204668d050423b4e76f857bad5b47f43b203a04c8391ba9d9c3e95093c071f9d376a1 -b7dd2de0284844392f7dfb56fe7ca3ede41e27519753ffc579a0a8d2d65ceb8108d06b6b0d4c3c1a2588951297bd1a1e -902116ce70d0a079ac190321c1f48701318c05f8e69ee09694754885d33a835a849cafe56f499a2f49f6cda413ddf9a7 -b18105cc736787fafaf7c3c11c448bce9466e683159dff52723b7951dff429565e466e4841d982e3aaa9ee2066838666 -97ab9911f3f659691762d568ae0b7faa1047b0aed1009c319fa79d15d0db8db9f808fc385dc9a68fa388c10224985379 -b2a2cba65f5b927e64d2904ba412e2bac1cf18c9c3eda9c72fb70262497ecf505b640827e2afebecf10eebbcf48ccd3e -b36a3fd677baa0d3ef0dac4f1548ff50a1730286b8c99d276a0a45d576e17b39b3cbadd2fe55e003796d370d4be43ce3 -a5dfec96ca3c272566e89dc453a458909247e3895d3e44831528130bc47cc9d0a0dac78dd3cad680a4351d399d241967 -8029382113909af6340959c3e61db27392531d62d90f92370a432aec3eb1e4c36ae1d4ef2ba8ec6edb4d7320c7a453f6 -971d85121ea108e6769d54f9c51299b0381ece8b51d46d49c89f65bedc123bab4d5a8bc14d6f67f4f680077529cbae4c -98ff6afc01d0bec80a278f25912e1b1ebff80117adae72e31d5b9fa4d9624db4ba2065b444df49b489b0607c45e26c4c -8fa29be10fb3ab30ce25920fec0187e6e91e458947009dabb869aade7136c8ba23602682b71e390c251f3743164cbdaa -b3345c89eb1653418fe3940cf3e56a9a9c66526389b98f45ca02dd62bfb37baa69a4baaa7132d7320695f8ea6ad1fd94 -b72c7f5541c9ac6b60a7ec9f5415e7fb14da03f7164ea529952a29399f3a071576608dbbcc0d45994f21f92ddbeb1e19 -aa3450bb155a5f9043d0ef95f546a2e6ade167280bfb75c9f09c6f9cdb1fffb7ce8181436161a538433afa3681c7a141 -92a18fecaded7854b349f441e7102b638ababa75b1b0281dd0bded6541abe7aa37d96693595be0b01fe0a2e2133d50f9 -980756ddf9d2253cfe6c94960b516c94889d09e612810935150892627d2ecee9a2517e04968eea295d0106850c04ca44 -ae68c6ccc454318cdd92f32b11d89116a3b8350207a36d22a0f626718cad671d960090e054c0c77ac3162ae180ecfd4b -99f31f66eaaa551749ad91d48a0d4e3ff4d82ef0e8b28f3184c54e852422ba1bdafd53b1e753f3a070f3b55f3c23b6a2 -a44eaeaa6589206069e9c0a45ff9fc51c68da38d4edff1d15529b7932e6f403d12b9387019c44a1488a5d5f27782a51f -b80b5d54d4b344840e45b79e621bd77a3f83fb4ce6d8796b7d6915107b3f3c34d2e7d95bdafd120f285669e5acf2437a -b36c069ec085a612b5908314d6b84c00a83031780261d1c77a0384c406867c9847d5b0845deddfa512cc04a8df2046fb -b09dbe501583220f640d201acea7ee3e39bf9eda8b91aa07b5c50b7641d86d71acb619b38d27835ce97c3759787f08e9 -87403d46a2bf63170fff0b857acacf42ee801afe9ccba8e5b4aea967b68eac73a499a65ca46906c2eb4c8f27bc739faa -82b93669f42a0a2aa5e250ffe6097269da06a9c02fcd1801abbad415a7729a64f830754bafc702e64600ba47671c2208 -8e3a3029be7edb8dd3ab1f8216664c8dc50d395f603736061d802cef77627db7b859ef287ed850382c13b4d22d6a2d80 -968e9ec7194ff424409d182ce0259acd950c384c163c04463bc8700a40b79beba6146d22b7fa7016875a249b7b31c602 -8b42c984bbe4996e0c20862059167c6bdc5164b1ffcd928f29512664459212d263e89f0f0e30eed4e672ffa5ed0b01b5 -96bac54062110dada905363211133f1f15dc7e4fd80a4c6e4a83bc9a0bcbbaba11cd2c7a13debcf0985e1a954c1da66b -a16dc8a653d67a7cd7ae90b2fffac0bf1ca587005430fe5ba9403edd70ca33e38ba5661d2ed6e9d2864400d997626a62 -a68ab11a570a27853c8d67e491591dcba746bfbee08a2e75ae0790399130d027ed387f41ef1d7de8df38b472df309161 -92532b74886874447c0300d07eda9bbe4b41ed25349a3da2e072a93fe32c89d280f740d8ff70d5816793d7f2b97373cc -88e35711b471e89218fd5f4d0eadea8a29405af1cd81974427bc4a5fb26ed60798daaf94f726c96e779b403a2cd82820 -b5c72aa4147c19f8c4f3a0a62d32315b0f4606e0a7025edc5445571eaf4daff64f4b7a585464821574dd50dbe1b49d08 -9305d9b4095258e79744338683fd93f9e657367b3ab32d78080e51d54eec331edbc224fad5093ebf8ee4bd4286757eb8 -b2a17abb3f6a05bcb14dc7b98321fa8b46d299626c73d7c6eb12140bf4c3f8e1795250870947af817834f033c88a59d6 -b3477004837dbd8ba594e4296f960fc91ab3f13551458445e6c232eb04b326da803c4d93e2e8dcd268b4413305ff84da -924b4b2ebaafdcfdfedb2829a8bf46cd32e1407d8d725a5bd28bdc821f1bafb3614f030ea4352c671076a63494275a3f -8b81b9ef6125c82a9bece6fdcb9888a767ac16e70527753428cc87c56a1236e437da8be4f7ecfe57b9296dc3ae7ba807 -906e19ec8b8edd58bdf9ae05610a86e4ea2282b1bbc1e8b00b7021d093194e0837d74cf27ac9916bdb8ec308b00da3da -b41c5185869071760ac786078a57a2ab4e2af60a890037ac0c0c28d6826f15c2cf028fddd42a9b6de632c3d550bfbc14 -a646e5dec1b713ae9dfdf7bdc6cd474d5731a320403c7dfcfd666ffc9ae0cff4b5a79530e8df3f4aa9cb80568cb138e9 -b0efad22827e562bd3c3e925acbd0d9425d19057868608d78c2209a531cccd0f2c43dc5673acf9822247428ffa2bb821 -a94c19468d14b6f99002fc52ac06bbe59e5c472e4a0cdb225144a62f8870b3f10593749df7a2de0bd3c9476ce682e148 -803864a91162f0273d49271dafaab632d93d494d1af935aefa522768af058fce52165018512e8d6774976d52bd797e22 -a08711c2f7d45c68fb340ac23597332e1bcaec9198f72967b9921204b9d48a7843561ff318f87908c05a44fc35e3cc9d -91c3cad94a11a3197ae4f9461faab91a669e0dddb0371d3cab3ed9aeb1267badc797d8375181130e461eadd05099b2a2 -81bdaaf48aae4f7b480fc13f1e7f4dd3023a41439ba231760409ce9292c11128ab2b0bdbbf28b98af4f97b3551f363af -8d60f9df9fd303f625af90e8272c4ecb95bb94e6efc5da17b8ab663ee3b3f673e9f6420d890ccc94acf4d2cae7a860d8 -a7b75901520c06e9495ab983f70b61483504c7ff2a0980c51115d11e0744683ce022d76e3e09f4e99e698cbd21432a0d -82956072df0586562fda7e7738226f694e1c73518dd86e0799d2e820d7f79233667192c9236dcb27637e4c65ef19d493 -a586beb9b6ffd06ad200957490803a7cd8c9bf76e782734e0f55e04a3dc38949de75dc607822ec405736c576cf83bca3 -a179a30d00def9b34a7e85607a447eea0401e32ab5abeee1a281f2acd1cf6ec81a178020666f641d9492b1bdf66f05a3 -83e129705c538787ed8e0fdc1275e6466a3f4ee21a1e6abedd239393b1df72244723b92f9d9d9339a0cab6ebf28f5a16 -811bd8d1e3722b64cd2f5b431167e7f91456e8bba2cc669d3fbbce7d553e29c3c19f629fcedd2498bc26d33a24891d17 -a243c030c858f1f60cccd26b45b024698cc6d9d9e6198c1ed4964a235d9f8d0baf9cde10c8e63dfaa47f8e74e51a6e85 -ab839eb82e23ca52663281f863b55b0a3d6d4425c33ffb4eeb1d7979488ab068bf99e2a60e82cea4dc42c56c26cbfebe -8b896f9bb21d49343e67aec6ad175b58c0c81a3ca73d44d113ae4354a0065d98eb1a5cafedaf232a2bb9cdc62152f309 -af6230340cc0b66f5bf845540ed4fc3e7d6077f361d60762e488d57834c3e7eb7eacc1b0ed73a7d134f174a01410e50c -88975e1b1af678d1b5179f72300a30900736af580dd748fd9461ef7afccc91ccd9bed33f9da55c8711a7635b800e831f -a97486bb9047391661718a54b8dd5a5e363964e495eae6c692730264478c927cf3e66dd3602413189a3699fbeae26e15 -a5973c161ab38732885d1d2785fd74bf156ba34881980cba27fe239caef06b24a533ffe6dbbbeca5e6566682cc00300a -a24776e9a840afda0003fa73b415d5bd6ecd9b5c2cc842b643ee51b8c6087f4eead4d0bfbd987eb174c489a7b952ff2a -a8a6ee06e3af053b705a12b59777267c546f33ba8a0f49493af8e6df4e15cf8dd2d4fb4daf7e84c6b5d3a7363118ff03 -a28e59ce6ad02c2ce725067c0123117e12ac5a52c8f5af13eec75f4a9efc4f696777db18a374fa33bcae82e0734ebd16 -86dfc3b78e841c708aff677baa8ee654c808e5d257158715097c1025d46ece94993efe12c9d188252ad98a1e0e331fec -a88d0275510f242eab11fdb0410ff6e1b9d7a3cbd3658333539815f1b450a84816e6613d15aa8a8eb15d87cdad4b27a2 -8440acea2931118a5b481268ff9f180ee4ede85d14a52c026adc882410825b8275caa44aff0b50c2b88d39f21b1a0696 -a7c3182eab25bd6785bacf12079d0afb0a9b165d6ed327814e2177148539f249eb9b5b2554538f54f3c882d37c0a8abe -85291fbe10538d7da38efdd55a7acebf03b1848428a2f664c3ce55367aece60039f4f320b1771c9c89a35941797f717c -a2c6414eeb1234728ab0de94aa98fc06433a58efa646ca3fcbd97dbfb8d98ae59f7ce6d528f669c8149e1e13266f69c9 -840c8462785591ee93aee2538d9f1ec44ba2ca61a569ab51d335ac873f5d48099ae8d7a7efa0725d9ff8f9475bfa4f56 -a7065a9d02fb3673acf7702a488fbc01aa69580964932f6f40b6c2d1c386b19e50b0e104fcac24ea26c4e723611d0238 -b72db6d141267438279e032c95e6106c2ccb3164b842ba857a2018f3a35f4b040da92680881eb17cd61d0920d5b8f006 -a8005d6c5960e090374747307ef0be2871a7a43fa4e76a16c35d2baab808e9777b496e9f57a4218b23390887c33a0b55 -8e152cea1e00a451ca47c20a1e8875873419700af15a5f38ee2268d3fbc974d4bd5f4be38008fa6f404dbdedd6e6e710 -a3391aed1fcd68761f06a7d1008ec62a09b1cb3d0203cd04e300a0c91adfed1812d8bc1e4a3fd7976dc0aae0e99f52f1 -967eb57bf2aa503ee0c6e67438098149eac305089c155f1762cf5e84e31f0fbf27c34a9af05621e34645c1ec96afaec8 -88af97ddc4937a95ec0dcd25e4173127260f91c8db2f6eac84afb789b363705fb3196235af631c70cafd09411d233589 -a32df75b3f2c921b8767638fd289bcfc61e08597170186637a7128ffedd52c798c434485ac2c7de07014f9e895c2c3d8 -b0a783832153650aa0d766a3a73ec208b6ce5caeb40b87177ffc035ab03c7705ecdd1090b6456a29f5fb7e90e2fa8930 -b59c8e803b4c3486777d15fc2311b97f9ded1602fa570c7b0200bada36a49ee9ef4d4c1474265af8e1c38a93eb66b18b -982f2c85f83e852022998ff91bafbb6ff093ef22cf9d5063e083a48b29175ccbd51b9c6557151409e439096300981a6c -939e3b5989fefebb9d272a954659a4eb125b98c9da6953f5e628d26266bd0525ec38304b8d56f08d65abc4d6da4a8dbb -8898212fe05bc8de7d18503cb84a1c1337cc2c09d1eeef2b475aa79185b7322bf1f8e065f1bf871c0c927dd19faf1f6d -94b0393a41cd00f724aee2d4bc72103d626a5aecb4b5486dd1ef8ac27528398edf56df9db5c3d238d8579af368afeb09 -96ac564450d998e7445dd2ea8e3fc7974d575508fa19e1c60c308d83b645864c029f2f6b7396d4ff4c1b24e92e3bac37 -8adf6638e18aff3eb3b47617da696eb6c4bdfbecbbc3c45d3d0ab0b12cbad00e462fdfbe0c35780d21aa973fc150285e -b53f94612f818571b5565bbb295e74bada9b5f9794b3b91125915e44d6ddcc4da25510eab718e251a09c99534d6042d9 -8b96462508d77ee083c376cd90807aebad8de96bca43983c84a4a6f196d5faf6619a2351f43bfeec101864c3bf255519 -aeadf34657083fc71df33bd44af73bf5281c9ca6d906b9c745536e1819ea90b56107c55e2178ebad08f3ba75b3f81c86 -9784ba29b2f0057b5af1d3ab2796d439b8753f1f749c73e791037461bdfc3f7097394283105b8ab01788ea5255a96710 -8756241bda159d4a33bf74faba0d4594d963c370fb6a18431f279b4a865b070b0547a6d1613cf45b8cfb5f9236bbf831 -b03ebfd6b71421dfd49a30460f9f57063eebfe31b9ceaa2a05c37c61522b35bdc09d7db3ad75c76c253c00ba282d3cd2 -b34e7e6341fa9d854b2d3153bdda0c4ae2b2f442ab7af6f99a0975d45725aa48e36ae5f7011edd249862e91f499687d4 -b462ee09dc3963a14354244313e3444de5cc37ea5ccfbf14cd9aca8027b59c4cb2a949bc30474497cab8123e768460e6 -aea753290e51e2f6a21a9a0ee67d3a2713f95c2a5c17fe41116c87d3aa77b1683761264d704df1ac34f8b873bc88ef7b -98430592afd414394f98ddfff9f280fcb1c322dbe3510f45e1e9c4bb8ee306b3e0cf0282c0ee73ebb8ba087d4d9e0858 -b95d3b5aaf54ffca11f4be8d57f76e14afdb20afc859dc7c7471e0b42031e8f3d461b726ecb979bdb2f353498dfe95ea -984d17f9b11a683132e0b5a9ee5945e3ff7054c2d5c716be73b29078db1d36f54c6e652fd2f52a19da313112e97ade07 -ab232f756b3fff3262be418a1af61a7e0c95ceebbc775389622a8e10610508cd6784ab7960441917a83cc191c58829ea -a28f41678d6e60de76b0e36ab10e4516e53e02e9c77d2b5af3cfeee3ce94cfa30c5797bd1daab20c98e1cad83ad0f633 -b55395fca84dd3ccc05dd480cb9b430bf8631ff06e24cb51d54519703d667268c2f8afcde4ba4ed16bece8cc7bc8c6e0 -8a8a5392a0e2ea3c7a8c51328fab11156004e84a9c63483b64e8f8ebf18a58b6ffa8fe8b9d95af0a2f655f601d096396 -ab480000fe194d23f08a7a9ec1c392334e9c687e06851f083845121ce502c06b54dda8c43092bcc1035df45cc752fe9b -b265644c29f628d1c7e8e25a5e845cabb21799371814730a41a363e1bda8a7be50fee7c3996a365b7fcba4642add10db -b8a915a3c685c2d4728f6931c4d29487cad764c5ce23c25e64b1a3259ac27235e41b23bfe7ae982921b4cb84463097df -8efa7338442a4b6318145a5440fc213b97869647eeae41b9aa3c0a27ee51285b73e3ae3b4a9423df255e6add58864aa9 -9106d65444f74d217f4187dfc8fcf3810b916d1e4275f94f6a86d1c4f3565b131fd6cde1fa708bc05fe183c49f14941a -948252dac8026bbbdb0a06b3c9d66ec4cf9532163bab68076fda1bd2357b69e4b514729c15aaa83b5618b1977bbc60c4 -ae6596ccfdf5cbbc5782efe3bb0b101bb132dbe1d568854ca24cacc0b2e0e9fabcb2ca7ab42aecec412efd15cf8cb7a2 -84a0b6c198ff64fd7958dfd1b40eac9638e8e0b2c4cd8cf5d8cdf80419baee76a05184bce6c5b635f6bf2d30055476a7 -8893118be4a055c2b3da593dbca51b1ae2ea2469911acfb27ee42faf3e6c3ad0693d3914c508c0b05b36a88c8b312b76 -b097479e967504deb6734785db7e60d1d8034d6ca5ba9552887e937f5e17bb413fccac2c1d1082154ed76609127860ad -a0294e6b9958f244d29943debf24b00b538b3da1116269b6e452bb12dc742226712fd1a15b9c88195afeb5d2415f505c -b3cc15f635080bc038f61b615f62b5b5c6f2870586191f59476e8368a73641d6ac2f7d0c1f54621982defdb318020230 -99856f49b9fe1604d917c94d09cc0ed753d13d015d30587a94e6631ffd964b214e607deb8a69a8b5e349a7edf4309206 -a8571e113ea22b4b4fce41a094da8c70de37830ae32e62c65c2fa5ad06a9bc29e884b945e73d448c72b176d6ecebfb58 -a9e9c6e52beb0013273c29844956b3ce291023678107cdc785f7b44eff5003462841ad8780761b86aefc6b734adde7cf -80a784b0b27edb51ef2bad3aee80e51778dcaa0f3f5d3dcb5dc5d4f4b2cf7ae35b08de6680ea9dac53f8438b92eb09ef -827b543e609ea328e97e373f70ad72d4915a2d1daae0c60d44ac637231070e164c43a2a58db80a64df1c624a042b38f9 -b449c65e8195202efdcb9bdb4e869a437313b118fef8b510cbbf8b79a4e99376adb749b37e9c20b51b31ed3310169e27 -8ea3028f4548a79a94c717e1ed28ad4d8725b8d6ab18b021063ce46f665c79da3c49440c6577319dab2d036b7e08f387 -897798431cfb17fe39f08f5f854005dc37b1c1ec1edba6c24bc8acb3b88838d0534a75475325a5ea98b326ad47dbad75 -89cf232e6303b0751561960fd4dea5754a28c594daf930326b4541274ffb03c7dd75938e411eb9a375006a70ce38097f -9727c6ae7f0840f0b6c8bfb3a1a5582ceee705e0b5c59b97def7a7a2283edd4d3f47b7971e902a3a2079e40b53ff69b8 -b76ed72b122c48679d221072efc0eeea063cb205cbf5f9ef0101fd10cb1075b8628166c83577cced654e1c001c7882f7 -ae908c42d208759da5ee9b405df85a6532ea35c6f0f6a1288d22870f59d98edc896841b8ac890a538e6c8d1e8b02d359 -809d12fe4039a0ec80dc9be6a89acaab7797e5f7f9b163378f52f9a75a1d73b2e9ae6e3dd49e32ced439783c1cabbef5 -a4149530b7f85d1098ba534d69548c6c612c416e8d35992fc1f64f4deeb41e09e49c6cf7aadbed7e846b91299358fe2d -a49342eacd1ec1148b8df1e253b1c015f603c39de11fa0a364ccb86ea32d69c34fd7aa6980a1fadcd8e785a57fa46f60 -87d43eff5a006dc4dddcf76cc96c656a1f3a68f19f124181feab86c6cc9a52cb9189cdbb423414defdd9bb0ca8ff1ddc -861367e87a9aa2f0f68296ba50aa5dbc5713008d260cc2c7e62d407c2063064749324c4e8156dc21b749656cfebce26b -b5303c2f72e84e170e66ae1b0fbd51b8c7a6f27476eaf5694b64e8737d5c84b51fe90100b256465a4c4156dd873cddb0 -b62849a4f891415d74f434cdc1d23c4a69074487659ca96e1762466b2b7a5d8525b056b891d0feea6fe6845cba8bc7fb -923dd9e0d6590a9307e8c4c23f13bae3306b580e297a937711a8b13e8de85e41a61462f25b7d352b682e8437bf2b4ab3 -9147379860cd713cd46c94b8cdf75125d36c37517fbecf81ace9680b98ce6291cd1c3e472f84249cc3b2b445e314b1b6 -a808a4f17ac21e3fb5cfef404e61fae3693ca3e688d375f99b6116779696059a146c27b06de3ac36da349b0649befd56 -87787e9322e1b75e66c1f0d9ea0915722a232770930c2d2a95e9478c4b950d15ab767e30cea128f9ed65893bfc2d0743 -9036a6ee2577223be105defe1081c48ea7319e112fff9110eb9f61110c319da25a6cea0464ce65e858635b079691ef1f -af5548c7c24e1088c23b57ee14d26c12a83484c9fd9296edf1012d8dcf88243f20039b43c8c548c265ef9a1ffe9c1c88 -a0fff520045e14065965fb8accd17e878d3fcaf9e0af2962c8954e50be6683d31fa0bf4816ab68f08630dbac6bfce52a -b4c1b249e079f6ae1781af1d97a60b15855f49864c50496c09c91fe1946266915b799f0406084d7783f5b1039116dd8b -8b0ffa5e7c498cb3879dddca34743b41eee8e2dea3d4317a6e961b58adb699ef0c92400c068d5228881a2b08121226bf -852ae8b19a1d80aa8ae5382e7ee5c8e7670ceb16640871c56b20b96b66b3b60e00015a3dde039446972e57b49a999ddd -a49942f04234a7d8492169da232cfff8051df86e8e1ba3db46aede02422c689c87dc1d99699c25f96cb763f5ca0983e5 -b04b597b7760cf5dcf411ef896d1661e6d5b0db3257ac2cf64b20b60c6cc18fa10523bb958a48d010b55bac7b02ab3b1 -a494591b51ea8285daecc194b5e5bd45ae35767d0246ac94fae204d674ee180c8e97ff15f71f28b7aeb175b8aea59710 -97d2624919e78406e7460730680dea8e71c8571cf988e11441aeea54512b95bd820e78562c99372d535d96f7e200d20d -ac693ddb00e48f76e667243b9b6a7008424043fb779e4f2252330285232c3fccac4da25cbd6d95fe9ad959ff305a91f6 -8d20ca0a71a64a3f702a0825bb46bd810d03bebfb227683680d474a52f965716ff99e19a165ebaf6567987f4f9ee3c94 -a5c516a438f916d1d68ca76996404792e0a66e97b7f18fc54c917bf10cf3211b62387932756e39e67e47b0bd6e88385a -b089614d830abc0afa435034cec7f851f2f095d479cacf1a3fb57272da826c499a52e7dcbc0eb85f4166fb94778e18e9 -a8dacc943765d930848288192f4c69e2461c4b9bc6e79e30eeef9a543318cf9ae9569d6986c65c5668a89d49993f8e07 -ab5a9361fa339eec8c621bdad0a58078983abd8942d4282b22835d7a3a47e132d42414b7c359694986f7db39386c2e19 -94230517fb57bd8eb26c6f64129b8b2abd0282323bf7b94b8bac7fab27b4ecc2c4290c294275e1a759de19f2216134f3 -b8f158ea5006bc3b90b285246625faaa6ac9b5f5030dc69701b12f3b79a53ec7e92eeb5a63bbd1f9509a0a3469ff3ffc -8b6944fd8cb8540957a91a142fdcda827762aa777a31e8810ca6d026e50370ee1636fc351724767e817ca38804ebe005 -82d1ee40fe1569c29644f79fa6c4033b7ed45cd2c3b343881f6eb0de2e79548fded4787fae19bed6ee76ed76ff9f2f11 -a8924c7035e99eaed244ca165607e7e568b6c8085510dcdbaf6ebdbed405af2e6c14ee27d94ffef10d30aa52a60bf66d -956f82a6c2ae044635e85812581e4866c5fa2f427b01942047d81f6d79a14192f66fbbe77c9ffeaef4e6147097fdd2b5 -b1100255a1bcf5e05b6aff1dfeb6e1d55b5d68d43a7457ba10cc76b61885f67f4d0d5179abda786e037ae95deb8eea45 -99510799025e3e5e8fbf06dedb14c060c6548ba2bda824f687d3999dc395e794b1fb6514b9013f3892b6cf65cb0d65aa -8f9091cebf5e9c809aab415942172258f894e66e625d7388a05289183f01b8d994d52e05a8e69f784fba41db9ea357f0 -a13d2eeb0776bdee9820ecb6693536720232848c51936bb4ef4fe65588d3f920d08a21907e1fdb881c1ad70b3725e726 -a68b8f18922d550284c5e5dc2dda771f24c21965a6a4d5e7a71678178f46df4d8a421497aad8fcb4c7e241aba26378a0 -8b7601f0a3c6ad27f03f2d23e785c81c1460d60100f91ea9d1cab978aa03b523150206c6d52ce7c7769c71d2c8228e9e -a8e02926430813caa851bb2b46de7f0420f0a64eb5f6b805401c11c9091d3b6d67d841b5674fa2b1dce0867714124cd8 -b7968ecba568b8193b3058400af02c183f0a6df995a744450b3f7e0af7a772454677c3857f99c140bbdb2a09e832e8e0 -8f20b1e9ba87d0a3f35309b985f3c18d2e8800f1ca7f0c52cadef773f1496b6070c936eea48c4a1cae83fd2524e9d233 -88aef260042db0d641a51f40639dbeeefa9e9811df30bee695f3791f88a2f84d318f04e8926b7f47bf25956cb9e3754f -9725345893b647e9ba4e6a29e12f96751f1ae25fcaec2173e9a259921a1a7edb7a47159b3c8767e44d9e2689f5aa0f72 -8c281e6f72752cb11e239e4df9341c45106eb7993c160e54423c2bffe10bc39d42624b45a1f673936ef2e1a02fc92f1a -90aba2f68bddb2fcce6c51430dacdfeec43ea8dc379660c99095df11017691ccf5faa27665cf4b9f0eea7728ae53c327 -b7022695c16521c5704f49b7ddbdbec9b5f57ce0ceebe537bc0ebb0906d8196cc855a9afeb8950a1710f6a654464d93f -8fe1b9dd3c6a258116415d36e08374e094b22f0afb104385a5da48be17123e86fb8327baacc4f0d9ebae923d55d99bb5 -817e85d8e3d19a4cbc1dec31597142c2daa4871bda89c2177fa719c00eda3344eb08b82eb92d4aa91a9eaacb3fc09783 -b59053e1081d2603f1ca0ba553804d6fa696e1fd996631db8f62087b26a40dfef02098b0326bb75f99ec83b9267ca738 -990a173d857d3ba81ff3789b931bfc9f5609cde0169b7f055fa3cb56451748d593d62d46ba33f80f9cafffe02b68dd14 -b0c538dbba4954b809ab26f9f94a3cf1dcb77ce289eaec1d19f556c0ae4be1fa03af4a9b7057837541c3cc0a80538736 -ac3ba42f5f44f9e1fc453ce49c4ab79d0e1d5c42d3b30b1e098f3ab3f414c4c262fa12fb2be249f52d4aaf3c5224beb9 -af47467eb152e59870e21f0d4da2f43e093daf40180ab01438030684b114d025326928eaab12c41b81a066d94fce8436 -98d1b58ba22e7289b1c45c79a24624f19b1d89e00f778eef327ec4856a9a897278e6f1a9a7e673844b31dde949153000 -97ccb15dfadc7c59dca08cfe0d22df2e52c684cf97de1d94bc00d7ba24e020025130b0a39c0f4d46e4fc872771ee7875 -b699e4ed9a000ff96ca296b2f09dce278832bc8ac96851ff3cff99ed3f6f752cfc0fea8571be28cd9b5a7ec36f1a08ee -b9f49f0edb7941cc296435ff0a912e3ad16848ee8765ab5f60a050b280d6ea585e5b34051b15f6b8934ef01ceb85f648 -ac3893df7b4ceab23c6b9054e48e8ba40d6e5beda8fbe90b814f992f52494186969b35d8c4cdc3c99890a222c9c09008 -a41293ad22fae81dea94467bc1488c3707f3d4765059173980be93995fa4fcc3c9340796e3eed0beeb0ba0d9bb4fa3aa -a0543e77acd2aeecde13d18d258aeb2c7397b77f17c35a1992e8666ea7abcd8a38ec6c2741bd929abba2f766138618cc -92e79b22bc40e69f6527c969500ca543899105837b6b1075fa1796755c723462059b3d1b028e0b3df2559fa440e09175 -a1fa1eac8f41a5197a6fb4aa1eae1a031c89f9c13ff9448338b222780cf9022e0b0925d930c37501a0ef7b2b00fdaf83 -b3cb29ff73229f0637335f28a08ad8c5f166066f27c6c175164d0f26766a927f843b987ee9b309ed71cbf0a65d483831 -84d4ab787f0ac00f104f4a734dc693d62d48c2aeb03913153da62c2ae2c27d11b1110dcef8980368dd84682ea2c1a308 -ab6a8e4bbc78d4a7b291ad3e9a8fe2d65f640524ba3181123b09d2d18a9e300e2509ccf7000fe47e75b65f3e992a2e7e -b7805ebe4f1a4df414003dc10bca805f2ab86ca75820012653e8f9b79c405196b0e2cab099f2ab953d67f0d60d31a0f9 -b12c582454148338ea605d22bd00a754109063e22617f1f8ac8ddf5502c22a181c50c216c3617b9852aa5f26af56b323 -86333ad9f898947e31ce747728dc8c887479e18d36ff3013f69ebef807d82c6981543b5c3788af93c4d912ba084d3cba -b514efa310dc4ad1258add138891e540d8c87142a881b5f46563cc58ecd1488e6d3a2fca54c0b72a929f3364ca8c333e -aa0a30f92843cf2f484066a783a1d75a7aa6f41f00b421d4baf20a6ac7886c468d0eea7ca8b17dd22f4f74631b62b640 -b3b7dc63baec9a752e8433c0cdee4d0f9bc41f66f2b8d132faf925eef9cf89aae756fc132c45910f057122462605dc10 -b9b8190dac5bfdeb59fd44f4da41a57e7f1e7d2c21faba9da91fa45cbeca06dcf299c9ae22f0c89ece11ac46352d619f -89f8cf36501ad8bdfeab863752a9090e3bfda57cf8fdeca2944864dc05925f501e252c048221bcc57136ab09a64b64b2 -b0cbfaf317f05f97be47fc9d69eda2dd82500e00d42612f271a1fe24626408c28881f171e855bd5bd67409f9847502b4 -a7c21a8fcede581bfd9847b6835eda62ba250bea81f1bb17372c800a19c732abe03064e64a2f865d974fb636cab4b859 -95f9df524ba7a4667351696c4176b505d8ea3659f5ff2701173064acc624af69a0fad4970963736383b979830cb32260 -856a74fe8b37a2e3afeac858c8632200485d438422a16ae3b29f359e470e8244995c63ad79c7e007ed063f178d0306fd -b37faa4d78fdc0bb9d403674dbea0176c2014a171c7be8527b54f7d1a32a76883d3422a3e7a5f5fcc5e9b31b57822eeb -8d37234d8594ec3fe75670b5c9cc1ec3537564d4739b2682a75b18b08401869a4264c0f264354219d8d896cded715db4 -b5289ee5737f0e0bde485d32096d23387d68dab8f01f47821ab4f06cc79a967afe7355e72dc0c751d96b2747b26f6255 -9085e1fdf9f813e9c3b8232d3c8863cd84ab30d45e8e0d3d6a0abd9ebc6fd70cdf749ff4d04390000e14c7d8c6655fc7 -93a388c83630331eca4da37ea4a97b3b453238af474817cc0a0727fd3138dcb4a22de38c04783ec829c22cb459cb4e8e -a5377116027c5d061dbe24c240b891c08cdd8cd3f0899e848d682c873aff5b8132c1e7cfe76d2e5ed97ee0eb1d42cb68 -a274c84b04338ed28d74683e2a7519c2591a3ce37c294d6f6e678f7d628be2db8eff253ede21823e2df7183e6552f622 -8bc201147a842453a50bec3ac97671397bc086d6dfc9377fa38c2124cdc286abda69b7324f47d64da094ae011d98d9d9 -9842d0c066c524592b76fbec5132bc628e5e1d21c424bec4555efca8619cc1fd8ea3161febcb8b9e8ab54702f4e815e2 -a19191b713a07efe85c266f839d14e25660ee74452e6c691cd9997d85ae4f732052d802d3deb018bdd847caa298a894b -a24f71fc0db504da4e287dd118a4a74301cbcd16033937ba2abc8417956fcb4ae19b8e63b931795544a978137eff51cb -a90eec4a6a3a4b8f9a5b93d978b5026fcf812fe65585b008d7e08c4aaf21195a1d0699f12fc16f79b6a18a369af45771 -8b551cf89737d7d06d9b3b9c4c1c73b41f2ea0af4540999c70b82dabff8580797cf0a3caf34c86c59a7069eb2e38f087 -b8d312e6c635e7a216a1cda075ae77ba3e1d2fd501dc31e83496e6e81ed5d9c7799f8e578869c2e0e256fb29f5de10a7 -8d144bdb8cae0b2cdb5b33d44bbc96984a5925202506a8cc65eb67ac904b466f5a7fe3e1cbf04aa785bbb7348c4bb73c -a101b3d58b7a98659244b88de0b478b3fb87dc5fc6031f6e689b99edf498abd43e151fd32bd4bbd240e0b3e59c440359 -907453abca7d8e7151a05cc3d506c988007692fe7401395dc93177d0d07d114ab6cca0cc658eb94c0223fe8658295cad -825329ffbe2147ddb68f63a0a67f32d7f309657b8e5d9ab5bb34b3730bfa2c77a23eaaadb05def7d9f94a9e08fdc1e96 -88ee923c95c1dac99ae7ed6067906d734d793c5dc5d26339c1bb3314abe201c5dccb33b9007351885eb2754e9a8ea06c -98bc9798543f5f1adc9f2cfcfa72331989420e9c3f6598c45269f0dc9b7c8607bbeaf03faa0aea2ddde2b8f17fdceff5 -8ee87877702a79aef923ab970db6fa81561b3c07d5bf1a072af0a7bad765b4cbaec910afe1a91703feacc7822fa38a94 -8060b9584aa294fe8adc2b22f67e988bc6da768eae91e429dcc43ddc53cfcc5d6753fdc1b420b268c7eb2fb50736a970 -b344a5524d80a2f051870c7001f74fcf348a70fcf78dbd20c6ff9ca85d81567d2318c8b8089f2c4f195d6aec9fc15fa6 -8f5a5d893e1936ed062149d20eb73d98b62b7f50ab5d93a6429c03656b36688d1c80cb5010e4977491e51fa0d7dd35d5 -86fa32ebbf97328c5f5f15564e1238297e289ec3219b9a741724e9f3ae8d5c15277008f555863a478b247ba5dc601d44 -9557e55377e279f4b6b5e0ffe01eca037cc13aac242d67dfcd0374a1e775c5ed5cb30c25fe21143fee54e3302d34a3ea -8cb6bcbc39372d23464a416ea7039f57ba8413cf3f00d9a7a5b356ab20dcb8ed11b3561f7bce372b8534d2870c7ee270 -b5d59075cb5abde5391f64b6c3b8b50adc6e1f654e2a580b6d6d6eff3f4fbdd8fffc92e06809c393f5c8eab37f774c4b -afcfb6903ef13e493a1f7308675582f15af0403b6553e8c37afb8b2808ad21b88b347dc139464367dc260df075fea1ad -810fbbe808375735dd22d5bc7fc3828dc49fdd22cc2d7661604e7ac9c4535c1df578780affb3b895a0831640a945bcad -8056b0c678803b416f924e09a6299a33cf9ad7da6fe1ad7accefe95c179e0077da36815fde3716711c394e2c5ea7127f -8b67403702d06979be19f1d6dc3ec73cc2e81254d6b7d0cc49cd4fdda8cd51ab0835c1d2d26fc0ecab5df90585c2f351 -87f97f9e6d4be07e8db250e5dd2bffdf1390665bc5709f2b631a6fa69a7fca958f19bd7cc617183da1f50ee63e9352b5 -ae151310985940471e6803fcf37600d7fa98830613e381e00dab943aec32c14162d51c4598e8847148148000d6e5af5c -81eb537b35b7602c45441cfc61b27fa9a30d3998fad35a064e05bc9479e9f10b62eba2b234b348219eea3cadcaac64bb -8a441434934180ab6f5bc541f86ebd06eadbee01f438836d797e930fa803a51510e005c9248cecc231a775b74d12b5e9 -81f3c250a27ba14d8496a5092b145629eb2c2e6a5298438670375363f57e2798207832c8027c3e9238ad94ecdadfc4df -a6217c311f2f3db02ceaa5b6096849fe92b6f4b6f1491535ef8525f6ccee6130bed2809e625073ecbaddd4a3eb3df186 -82d1c396f0388b942cf22b119d7ef1ad03d3dad49a74d9d01649ee284f377c8daddd095d596871669e16160299a210db -a40ddf7043c5d72a7246bd727b07f7fff1549f0e443d611de6f9976c37448b21664c5089c57f20105102d935ab82f27b -b6c03c1c97adf0c4bf4447ec71366c6c1bff401ba46236cd4a33d39291e7a1f0bb34bd078ba3a18d15c98993b153a279 -8a94f5f632068399c359c4b3a3653cb6df2b207379b3d0cdace51afdf70d6d5cce6b89a2b0fee66744eba86c98fb21c2 -b2f19e78ee85073f680c3bba1f07fd31b057c00b97040357d97855b54a0b5accb0d3b05b2a294568fcd6a4be6f266950 -a74632d13bbe2d64b51d7a9c3ae0a5a971c19f51cf7596a807cea053e6a0f3719700976d4e394b356c0329a2dced9aa2 -afef616d341a9bc94393b8dfba68ff0581436aa3a3adb7c26a1bbf2cf19fa877066191681f71f17f3cd6f9cf6bf70b5a -8ce96d93ae217408acf7eb0f9cbb9563363e5c7002e19bbe1e80760bc9d449daee2118f3878b955163ed664516b97294 -8414f79b496176bc8b8e25f8e4cfee28f4f1c2ddab099d63d2aca1b6403d26a571152fc3edb97794767a7c4686ad557c -b6c61d01fd8ce087ef9f079bf25bf10090db483dd4f88c4a786d31c1bdf52065651c1f5523f20c21e75cea17df69ab73 -a5790fd629be70545093631efadddc136661f63b65ec682609c38ef7d3d7fa4e56bdf94f06e263bc055b90cb1c6bcefe -b515a767e95704fb7597bca9e46f1753abacdc0e56e867ee3c6f4cd382643c2a28e65312c05ad040eaa3a8cbe7217a65 -8135806a02ead6aa92e9adb6fefb91349837ab73105aaa7be488ef966aa8dfaafdfa64bbae30fcbfa55dd135a036a863 -8f22435702716d76b1369750694540742d909d5e72b54d0878245fab7c269953b1c6f2b29c66f08d5e0263ca3a731771 -8e0f8a8e8753e077dac95848212aeffd51c23d9b6d611df8b102f654089401954413ecbedc6367561ca599512ae5dda7 -815a9084e3e2345f24c5fa559deec21ee1352fb60f4025c0779be65057f2d528a3d91593bd30d3a185f5ec53a9950676 -967e6555ccba395b2cc1605f8484c5112c7b263f41ce8439a99fd1c71c5ed14ad02684d6f636364199ca48afbbde13be -8cd0ccf17682950b34c796a41e2ea7dd5367aba5e80a907e01f4cdc611e4a411918215e5aebf4292f8b24765d73314a6 -a58bf1bbb377e4b3915df6f058a0f53b8fb8130fdec8c391f6bc82065694d0be59bb67ffb540e6c42cc8b380c6e36359 -92af3151d9e6bfb3383d85433e953c0160859f759b0988431ec5893542ba40288f65db43c78a904325ef8d324988f09d -8011bbb05705167afb47d4425065630f54cb86cd462095e83b81dfebf348f846e4d8fbcf1c13208f5de1931f81da40b9 -81c743c104fc3cb047885c9fa0fb9705c3a83ee24f690f539f4985509c3dafd507af3f6a2128276f45d5939ef70c167f -a2c9679b151c041aaf5efeac5a737a8f70d1631d931609fca16be1905682f35e291292874cb3b03f14994f98573c6f44 -a4949b86c4e5b1d5c82a337e5ce6b2718b1f7c215148c8bfb7e7c44ec86c5c9476048fc5c01f57cb0920876478c41ad6 -86c2495088bd1772152e527a1da0ef473f924ea9ab0e5b8077df859c28078f73c4e22e3a906b507fdf217c3c80808b5c -892e0a910dcf162bcea379763c3e2349349e4cda9402949255ac4a78dd5a47e0bf42f5bd0913951576b1d206dc1e536a -a7009b2c6b396138afe4754b7cc10dee557c51c7f1a357a11486b3253818531f781ea8107360c8d4c3b1cd96282353c0 -911763ef439c086065cc7b4e57484ed6d693ea44acee4b18c9fd998116da55fbe7dcb8d2a0f0f9b32132fca82d73dff6 -a722000b95a4a2d40bed81870793f15ba2af633f9892df507f2842e52452e02b5ea8dea6a043c2b2611d82376e33742a -9387ac49477bd719c2f92240d0bdfcf9767aad247ca93dc51e56106463206bc343a8ec855eb803471629a66fffb565d6 -92819a1fa48ab4902939bb72a0a4e6143c058ea42b42f9bc6cea5df45f49724e2530daf3fc4f097cceefa2a8b9db0076 -98eac7b04537653bc0f4941aae732e4b1f84bd276c992c64a219b8715eb1fb829b5cbd997d57feb15c7694c468f95f70 -b275e7ba848ce21bf7996e12dbeb8dadb5d0e4f1cb5a0248a4f8f9c9fe6c74e3c93f4b61edbcb0a51af5a141e1c14bc7 -97243189285aba4d49c53770c242f2faf5fd3914451da4931472e3290164f7663c726cf86020f8f181e568c72fd172d1 -839b0b3c25dd412bee3dc24653b873cc65454f8f16186bb707bcd58259c0b6765fa4c195403209179192a4455c95f3b8 -8689d1a870514568a074a38232e2ceb4d7df30fabeb76cff0aed5b42bf7f02baea12c5fadf69f4713464dbd52aafa55f -8958ae7b290f0b00d17c3e9fdb4dbf168432b457c7676829299dd428984aba892de1966fc106cfc58a772862ecce3976 -a422bc6bd68b8870cfa5bc4ce71781fd7f4368b564d7f1e0917f6013c8bbb5b240a257f89ecfdbecb40fe0f3aa31d310 -aa61f78130cebe09bc9a2c0a37f0dd57ed2d702962e37d38b1df7f17dc554b1d4b7a39a44182a452ce4c5eb31fa4cfcc -b7918bd114f37869bf1a459023386825821bfadce545201929d13ac3256d92a431e34f690a55d944f77d0b652cefeffc -819bba35fb6ace1510920d4dcff30aa682a3c9af9022e287751a6a6649b00c5402f14b6309f0aeef8fce312a0402915e -8b7c9ad446c6f63c11e1c24e24014bd570862b65d53684e107ba9ad381e81a2eaa96731b4b33536efd55e0f055071274 -8fe79b53f06d33386c0ec7d6d521183c13199498594a46d44a8a716932c3ec480c60be398650bbfa044fa791c4e99b65 -9558e10fb81250b9844c99648cf38fa05ec1e65d0ccbb18aa17f2d1f503144baf59d802c25be8cc0879fff82ed5034ad -b538a7b97fbd702ba84645ca0a63725be1e2891c784b1d599e54e3480e4670d0025526674ef5cf2f87dddf2290ba09f0 -92eafe2e869a3dd8519bbbceb630585c6eb21712b2f31e1b63067c0acb5f9bdbbcbdb612db4ea7f9cc4e7be83d31973f -b40d21390bb813ab7b70a010dff64c57178418c62685761784e37d327ba3cb9ef62df87ecb84277c325a637fe3709732 -b349e6fbf778c4af35fbed33130bd8a7216ed3ba0a79163ebb556e8eb8e1a7dad3456ddd700dad9d08d202491c51b939 -a8fdaedecb251f892b66c669e34137f2650509ade5d38fbe8a05d9b9184bb3b2d416186a3640429bd1f3e4b903c159dd -ac6167ebfee1dbab338eff7642f5e785fc21ef0b4ddd6660333fe398068cbd6c42585f62e81e4edbb72161ce852a1a4f -874b1fbf2ebe140c683bd7e4e0ab017afa5d4ad38055aaa83ee6bbef77dbc88a6ce8eb0dcc48f0155244af6f86f34c2d -903c58e57ddd9c446afab8256a6bb6c911121e6ccfb4f9b4ed3e2ed922a0e500a5cb7fa379d5285bc16e11dac90d1fda -8dae7a0cffa2fd166859cd1bf10ff82dd1932e488af377366b7efc0d5dec85f85fe5e8150ff86a79a39cefc29631733a -aa047857a47cc4dfc08585f28640420fcf105b881fd59a6cf7890a36516af0644d143b73f3515ab48faaa621168f8c31 -864508f7077c266cc0cb3f7f001cb6e27125ebfe79ab57a123a8195f2e27d3799ff98413e8483c533b46a816a3557f1f -8bcd45ab1f9cbab36937a27e724af819838f66dfeb15923f8113654ff877bd8667c54f6307aaf0c35027ca11b6229bfd -b21aa34da9ab0a48fcfdd291df224697ce0c1ebc0e9b022fdee8750a1a4b5ba421c419541ed5c98b461eecf363047471 -a9a18a2ab2fae14542dc336269fe612e9c1af6cf0c9ac933679a2f2cb77d3c304114f4d219ca66fe288adde30716775b -b5205989b92c58bdda71817f9a897e84100b5c4e708de1fced5c286f7a6f01ae96b1c8d845f3a320d77c8e2703c0e8b1 -a364059412bbcc17b8907d43ac8e5df90bc87fd1724b5f99832d0d24559fae6fa76a74cff1d1eac8cbac6ec80b44af20 -ae709f2c339886b31450834cf29a38b26eb3b0779bd77c9ac269a8a925d1d78ea3837876c654b61a8fe834b3b6940808 -8802581bba66e1952ac4dab36af371f66778958f4612901d95e5cac17f59165e6064371d02de8fb6fccf89c6dc8bd118 -a313252df653e29c672cbcfd2d4f775089cb77be1077381cf4dc9533790e88af6cedc8a119158e7da5bf6806ad9b91a1 -992a065b4152c7ef11515cd54ba9d191fda44032a01aed954acff3443377ee16680c7248d530b746b8c6dee2d634e68c -b627b683ee2b32c1ab4ccd27b9f6cce2fe097d96386fa0e5c182ad997c4c422ab8dfc03870cd830b8c774feb66537282 -b823cf8a9aee03dadd013eb9efe40a201b4b57ef67efaae9f99683005f5d1bf55e950bf4af0774f50859d743642d3fea -b8a7449ffac0a3f206677097baf7ce00ca07a4d2bd9b5356fbcb83f3649b0fda07cfebad220c1066afba89e5a52abf4b -b2dd1a2f986395bb4e3e960fbbe823dbb154f823284ebc9068502c19a7609790ec0073d08bfa63f71e30c7161b6ef966 -98e5236de4281245234f5d40a25b503505af140b503a035fc25a26159a9074ec81512b28f324c56ea2c9a5aa7ce90805 -89070847dc8bbf5bc4ed073aa2e2a1f699cf0c2ca226f185a0671cecc54e7d3e14cd475c7752314a7a8e7476829da4bc -a9402dc9117fdb39c4734c0688254f23aed3dce94f5f53f5b7ef2b4bf1b71a67f85ab1a38ec224a59691f3bee050aeb3 -957288f9866a4bf56a4204218ccc583f717d7ce45c01ea27142a7e245ad04a07f289cc044f8cf1f21d35e67e39299e9c -b2fb31ccb4e69113763d7247d0fc8edaae69b550c5c56aecacfd780c7217dc672f9fb7496edf4aba65dacf3361268e5b -b44a4526b2f1d6eb2aa8dba23bfa385ff7634572ab2afddd0546c3beb630fbfe85a32f42dd287a7fec069041411537f7 -8db5a6660c3ac7fd7a093573940f068ee79a82bc17312af900b51c8c439336bc86ca646c6b7ab13aaaa008a24ca508ab -8f9899a6d7e8eb4367beb5c060a1f8e94d8a21099033ae582118477265155ba9e72176a67f7f25d7bad75a152b56e21a -a67de0e91ade8d69a0e00c9ff33ee2909b8a609357095fa12319e6158570c232e5b6f4647522efb7345ce0052aa9d489 -82eb2414898e9c3023d57907a2b17de8e7eea5269029d05a94bfd7bf5685ac4a799110fbb375eb5e0e2bd16acf6458ae -94451fc7fea3c5a89ba701004a9693bab555cb622caf0896b678faba040409fdfd14a978979038b2a81e8f0abc4994d2 -ac879a5bb433998e289809a4a966bd02b4bf6a9c1cc276454e39c886efcf4fc68baebed575826bde577ab5aa71d735a9 -880c0f8f49c875dfd62b4ddedde0f5c8b19f5687e693717f7e5c031bc580e58e13ab497d48b4874130a18743c59fdce3 -b582af8d8ff0bf76f0a3934775e0b54c0e8fed893245d7d89cae65b03c8125b7237edc29dc45b4fe1a3fe6db45d280ee -89f337882ed3ae060aaee98efa20d79b6822bde9708c1c5fcee365d0ec9297f694cae37d38fd8e3d49717c1e86f078e7 -826d2c1faea54061848b484e288a5f4de0d221258178cf87f72e14baaa4acc21322f8c9eab5dde612ef497f2d2e1d60b -a5333d4f227543e9cd741ccf3b81db79f2f03ca9e649e40d6a6e8ff9073e06da83683566d3b3c8d7b258c62970fb24d1 -a28f08c473db06aaf4c043a2fae82b3c8cfaa160bce793a4c208e4e168fb1c65115ff8139dea06453c5963d95e922b94 -8162546135cc5e124e9683bdfaa45833c18553ff06a0861c887dc84a5b12ae8cd4697f6794c7ef6230492c32faba7014 -b23f0d05b74c08d6a7df1760792be83a761b36e3f8ae360f3c363fb196e2a9dd2de2e492e49d36561366e14daa77155c -b6f70d6c546722d3907c708d630dbe289771d2c8bf059c2e32b77f224696d750b4dda9b3a014debda38e7d02c9a77585 -83bf4c4a9f3ca022c631017e7a30ea205ba97f7f5927cba8fc8489a4646eac6712cb821c5668c9ffe94d69d524374a27 -b0371475425a8076d0dd5f733f55aabbe42d20a7c8ea7da352e736d4d35a327b2beb370dfcb05284e22cfd69c5f6c4cc -a0031ba7522c79211416c2cca3aa5450f96f8fee711552a30889910970ba13608646538781a2c08b834b140aadd7166f -99d273c80c7f2dc6045d4ed355d9fc6f74e93549d961f4a3b73cd38683f905934d359058cd1fc4da8083c7d75070487f -b0e4b0efa3237793e9dcce86d75aafe9879c5fa23f0d628649aef2130454dcf72578f9bf227b9d2b9e05617468e82588 -a5ab076fa2e1c5c51f3ae101afdd596ad9d106bba7882b359c43d8548b64f528af19afa76cd6f40da1e6c5fca4def3fa -8ce2299e570331d60f6a6eff1b271097cd5f1c0e1113fc69b89c6a0f685dabea3e5bc2ac6bd789aa492ab189f89be494 -91b829068874d911a310a5f9dee001021f97471307b5a3de9ec336870ec597413e1d92010ce320b619f38bed7c4f7910 -b14fe91f4b07bf33b046e9285b66cb07927f3a8da0af548ac2569b4c4fb1309d3ced76d733051a20814e90dd5b75ffd1 -abaab92ea6152d40f82940277c725aa768a631ee0b37f5961667f82fb990fc11e6d3a6a2752b0c6f94563ed9bb28265c -b7fe28543eca2a716859a76ab9092f135337e28109544f6bd2727728d0a7650428af5713171ea60bfc273d1c821d992c -8a4917b2ab749fc7343fc64bdf51b6c0698ff15d740cc7baf248c030475c097097d5a473bcc00d8c25817563fe0447b4 -aa96156d1379553256350a0a3250166add75948fb9cde62aa555a0a9dc0a9cb7f2f7b8428aff66097bf6bfedaf14bbe2 -ae4ffeb9bdc76830d3eca2b705f30c1bdede6412fa064260a21562c8850c7fb611ec62bc68479fe48f692833e6f66d8d -b96543caaba9d051600a14997765d49e4ab10b07c7a92cccf0c90b309e6da334fdd6d18c96806cbb67a7801024fbd3c7 -97b2b9ad76f19f500fcc94ca8e434176249f542ac66e5881a3dccd07354bdab6a2157018b19f8459437a68d8b86ba8e0 -a8d206f6c5a14c80005849474fde44b1e7bcf0b2d52068f5f97504c3c035b09e65e56d1cf4b5322791ae2c2fdbd61859 -936bad397ad577a70cf99bf9056584a61bd7f02d2d5a6cf219c05d770ae30a5cd902ba38366ce636067fc1dd10108d31 -a77e30195ee402b84f3882e2286bf5380c0ed374a112dbd11e16cef6b6b61ab209d4635e6f35cdaaa72c1a1981d5dabe -a46ba4d3947188590a43c180757886a453a0503f79cc435322d92490446f37419c7b999fdf868a023601078070e03346 -80d8d4c5542f223d48240b445d4d8cf6a75d120b060bc08c45e99a13028b809d910b534d2ac47fb7068930c54efd8da9 -803be9c68c91b42b68e1f55e58917a477a9a6265e679ca44ee30d3eb92453f8c89c64eafc04c970d6831edd33d066902 -b14b2b3d0dfe2bb57cee4cd72765b60ac33c1056580950be005790176543826c1d4fbd737f6cfeada6c735543244ab57 -a9e480188bba1b8fb7105ff12215706665fd35bf1117bacfb6ab6985f4dbc181229873b82e5e18323c2b8f5de03258e0 -a66a0f0779436a9a3999996d1e6d3000f22c2cac8e0b29cddef9636393c7f1457fb188a293b6c875b05d68d138a7cc4a -848397366300ab40c52d0dbbdafbafef6cd3dadf1503bb14b430f52bb9724188928ac26f6292a2412bc7d7aa620763c8 -95466cc1a78c9f33a9aaa3829a4c8a690af074916b56f43ae46a67a12bb537a5ac6dbe61590344a25b44e8512355a4a7 -8b5f7a959f818e3baf0887f140f4575cac093d0aece27e23b823cf421f34d6e4ff4bb8384426e33e8ec7b5eed51f6b5c -8d5e1368ec7e3c65640d216bcc5d076f3d9845924c734a34f3558ac0f16e40597c1a775a25bf38b187213fbdba17c93b -b4647c1b823516880f60d20c5cc38c7f80b363c19d191e8992226799718ee26b522a12ecb66556ed3d483aa4824f3326 -ac3abaea9cd283eb347efda4ed9086ea3acf495043e08d0d19945876329e8675224b685612a6badf8fd72fb6274902b1 -8eae1ce292d317aaa71bcf6e77e654914edd5090e2e1ebab78b18bb41b9b1bc2e697439f54a44c0c8aa0d436ebe6e1a9 -94dc7d1aec2c28eb43d93b111fa59aaa0d77d5a09501220bd411768c3e52208806abf973c6a452fd8292ff6490e0c9e2 -8fd8967f8e506fef27d17b435d6b86b232ec71c1036351f12e6fb8a2e12daf01d0ee04451fb944d0f1bf7fd20e714d02 -824e6865be55d43032f0fec65b3480ea89b0a2bf860872237a19a54bc186a85d2f8f9989cc837fbb325b7c72d9babe2c -8bd361f5adb27fd6f4e3f5de866e2befda6a8454efeb704aacc606f528c03f0faae888f60310e49440496abd84083ce2 -b098a3c49f2aaa28b6b3e85bc40ce6a9cdd02134ee522ae73771e667ad7629c8d82c393fba9f27f5416986af4c261438 -b385f5ca285ff2cfe64dcaa32dcde869c28996ed091542600a0b46f65f3f5a38428cca46029ede72b6cf43e12279e3d3 -8196b03d011e5be5288196ef7d47137d6f9237a635ab913acdf9c595fa521d9e2df722090ec7eb0203544ee88178fc5f -8ed1270211ef928db18e502271b7edf24d0bbd11d97f2786aee772d70c2029e28095cf8f650b0328cc8a4c38d045316d -a52ab60e28d69b333d597a445884d44fd2a7e1923dd60f763951e1e45f83e27a4dac745f3b9eff75977b3280e132c15d -91e9fe78cdac578f4a4687f71b800b35da54b824b1886dafec073a3c977ce7a25038a2f3a5b1e35c2c8c9d1a7312417c -a42832173f9d9491c7bd93b21497fbfa4121687cd4d2ab572e80753d7edcbb42cfa49f460026fbde52f420786751a138 -97b947126d84dcc70c97be3c04b3de3f239b1c4914342fa643b1a4bb8c4fe45c0fcb585700d13a7ed50784790c54bef9 -860e407d353eac070e2418ef6cb80b96fc5f6661d6333e634f6f306779651588037be4c2419562c89c61f9aa2c4947f5 -b2c9d93c3ba4e511b0560b55d3501bf28a510745fd666b3cb532db051e6a8617841ea2f071dda6c9f15619c7bfd2737f -8596f4d239aeeac78311207904d1bd863ef68e769629cc379db60e019aaf05a9d5cd31dc8e630b31e106a3a93e47cbc5 -8b26e14e2e136b65c5e9e5c2022cee8c255834ea427552f780a6ca130a6446102f2a6f334c3f9a0308c53df09e3dba7e -b54724354eb515a3c8bed0d0677ff1db94ac0a07043459b4358cb90e3e1aa38ac23f2caa3072cf9647275d7cd61d0e80 -b7ce9fe0e515e7a6b2d7ddcb92bc0196416ff04199326aea57996eef8c5b1548bd8569012210da317f7c0074691d01b7 -a1a13549c82c877253ddefa36a29ea6a23695ee401fdd48e65f6f61e5ebd956d5e0edeff99484e9075cb35071fec41e2 -838ba0c1e5bd1a6da05611ff1822b8622457ebd019cb065ece36a2d176bd2d889511328120b8a357e44569e7f640c1e6 -b916eccff2a95519400bbf76b5f576cbe53cf200410370a19d77734dc04c05b585cfe382e8864e67142d548cd3c4c2f4 -a610447cb7ca6eea53a6ff1f5fe562377dcb7f4aaa7300f755a4f5e8eba61e863c51dc2aa9a29b35525b550fbc32a0fe -9620e8f0f0ee9a4719aa9685eeb1049c5c77659ba6149ec4c158f999cfd09514794b23388879931fe26fea03fa471fd3 -a9dcf8b679e276583cf5b9360702a185470d09aea463dc474ee9c8aee91ef089dacb073e334e47fbc78ec5417c90465c -8c9adee8410bdd99e5b285744cee61e2593b6300ff31a8a83b0ec28da59475a5c6fb9346fe43aadea2e6c3dad2a8e30a -97d5afe9b3897d7b8bb628b7220cf02d8ee4e9d0b78f5000d500aaf4c1df9251aaaabfd1601626519f9d66f00a821d4e -8a382418157b601ce4c3501d3b8409ca98136a4ef6abcbf62885e16e215b76b035c94d149cc41ff92e42ccd7c43b9b3d -b64b8d11fb3b01abb2646ac99fdb9c02b804ce15d98f9fe0fbf1c9df8440c71417487feb6cdf51e3e81d37104b19e012 -849d7d044f9d8f0aab346a9374f0b3a5d14a9d1faa83dbacccbdc629ad1ef903a990940255564770537f8567521d17f0 -829dbb0c76b996c2a91b4cbbe93ba455ca0d5729755e5f0c92aaee37dff7f36fcdc06f33aca41f1b609c784127b67d88 -85a7c0069047b978422d264d831ab816435f63938015d2e977222b6b5746066c0071b7f89267027f8a975206ed25c1b0 -84b9fbc1cfb302df1acdcf3dc5d66fd1edfe7839f7a3b2fb3a0d5548656249dd556104d7c32b73967bccf0f5bdcf9e3b -972220ac5b807f53eac37dccfc2ad355d8b21ea6a9c9b011c09fe440ddcdf7513e0b43d7692c09ded80d7040e26aa28f -855885ed0b21350baeca890811f344c553cf9c21024649c722453138ba29193c6b02c4b4994cd414035486f923472e28 -841874783ae6d9d0e59daea03e96a01cbbe4ecaced91ae4f2c8386e0d87b3128e6d893c98d17c59e4de1098e1ad519dd -827e50fc9ce56f97a4c3f2f4cbaf0b22f1c3ce6f844ff0ef93a9c57a09b8bf91ebfbd2ba9c7f83c442920bffdaf288cc -a441f9136c7aa4c08d5b3534921b730e41ee91ab506313e1ba5f7c6f19fd2d2e1594e88c219834e92e6fb95356385aa7 -97d75b144471bf580099dd6842b823ec0e6c1fb86dd0da0db195e65524129ea8b6fd4a7a9bbf37146269e938a6956596 -a4b6fa87f09d5a29252efb2b3aaab6b3b6ea9fab343132a651630206254a25378e3e9d6c96c3d14c150d01817d375a8e -a31a671876d5d1e95fe2b8858dc69967231190880529d57d3cab7f9f4a2b9b458ac9ee5bdaa3289158141bf18f559efb -90bee6fff4338ba825974021b3b2a84e36d617e53857321f13d2b3d4a28954e6de3b3c0e629d61823d18a9763313b3bf -96b622a63153f393bb419bfcf88272ea8b3560dbd46b0aa07ada3a6223990d0abdd6c2adb356ef4be5641688c8d83941 -84c202adeaff9293698022bc0381adba2cd959f9a35a4e8472288fd68f96f6de8be9da314c526d88e291c96b1f3d6db9 -8ca01a143b8d13809e5a8024d03e6bc9492e22226073ef6e327edf1328ef4aff82d0bcccee92cb8e212831fa35fe1204 -b2f970dbad15bfbefb38903c9bcc043d1367055c55dc1100a850f5eb816a4252c8c194b3132c929105511e14ea10a67d -a5e36556472a95ad57eb90c3b6623671b03eafd842238f01a081997ffc6e2401f76e781d049bb4aa94d899313577a9cf -8d1057071051772f7c8bedce53a862af6fd530dd56ae6321eaf2b9fc6a68beff5ed745e1c429ad09d5a118650bfd420a -8aadc4f70ace4fcb8d93a78610779748dcffc36182d45b932c226dc90e48238ea5daa91f137c65ed532352c4c4d57416 -a2ea05ae37e673b4343232ae685ee14e6b88b867aef6dfac35db3589cbcd76f99540fed5c2641d5bb5a4a9f808e9bf0d -947f1abad982d65648ae4978e094332b4ecb90f482c9be5741d5d1cf5a28acf4680f1977bf6e49dd2174c37f11e01296 -a27b144f1565e4047ba0e3f4840ef19b5095d1e281eaa463c5358f932114cbd018aa6dcf97546465cf2946d014d8e6d6 -8574e1fc3acade47cd4539df578ce9205e745e161b91e59e4d088711a7ab5aa3b410d517d7304b92109924d9e2af8895 -a48ee6b86b88015d6f0d282c1ae01d2a5b9e8c7aa3d0c18b35943dceb1af580d08a65f54dc6903cde82fd0d73ce94722 -8875650cec543a7bf02ea4f2848a61d167a66c91ffaefe31a9e38dc8511c6a25bde431007eefe27a62af3655aca208dc -999b0a6e040372e61937bf0d68374e230346b654b5a0f591a59d33a4f95bdb2f3581db7c7ccb420cd7699ed709c50713 -878c9e56c7100c5e47bbe77dc8da5c5fe706cec94d37fa729633bca63cace7c40102eee780fcdabb655f5fa47a99600e -865006fb5b475ada5e935f27b96f9425fc2d5449a3c106aa366e55ebed3b4ee42adc3c3f0ac19fd129b40bc7d6bc4f63 -b7a7da847f1202e7bc1672553e68904715e84fd897d529243e3ecda59faa4e17ba99c649a802d53f6b8dfdd51f01fb74 -8b2fb4432c05653303d8c8436473682933a5cb604da10c118ecfcd2c8a0e3132e125afef562bdbcc3df936164e5ce4f2 -808d95762d33ddfa5d0ee3d7d9f327de21a994d681a5f372e2e3632963ea974da7f1f9e5bac8ccce24293509d1f54d27 -932946532e3c397990a1df0e94c90e1e45133e347a39b6714c695be21aeb2d309504cb6b1dde7228ff6f6353f73e1ca2 -9705e7c93f0cdfaa3fa96821f830fe53402ad0806036cd1b48adc2f022d8e781c1fbdab60215ce85c653203d98426da3 -aa180819531c3ec1feb829d789cb2092964c069974ae4faad60e04a6afcce5c3a59aec9f11291e6d110a788d22532bc6 -88f755097f7e25cb7dd3c449520c89b83ae9e119778efabb54fbd5c5714b6f37c5f9e0346c58c6ab09c1aef2483f895d -99fc03ab7810e94104c494f7e40b900f475fde65bdec853e60807ffd3f531d74de43335c3b2646b5b8c26804a7448898 -af2dea9683086bed1a179110efb227c9c00e76cd00a2015b089ccbcee46d1134aa18bda5d6cab6f82ae4c5cd2461ac21 -a500f87ba9744787fdbb8e750702a3fd229de6b8817594348dec9a723b3c4240ddfa066262d002844b9e38240ce55658 -924d0e45c780f5bc1c1f35d15dfc3da28036bdb59e4c5440606750ecc991b85be18bc9a240b6c983bc5430baa4c68287 -865b11e0157b8bf4c5f336024b016a0162fc093069d44ac494723f56648bc4ded13dfb3896e924959ea11c96321afefc -93672d8607d4143a8f7894f1dcca83fb84906dc8d6dd7dd063bb0049cfc20c1efd933e06ca7bd03ea4cb5a5037990bfe -826891efbdff0360446825a61cd1fa04326dd90dae8c33dfb1ed97b045e165766dd070bd7105560994d0b2044bdea418 -93c4a4a8bcbc8b190485cc3bc04175b7c0ed002c28c98a540919effd6ed908e540e6594f6db95cd65823017258fb3b1c -aeb2a0af2d2239fda9aa6b8234b019708e8f792834ff0dd9c487fa09d29800ddceddd6d7929faa9a3edcb9e1b3aa0d6b -87f11de7236d387863ec660d2b04db9ac08143a9a2c4dfff87727c95b4b1477e3bc473a91e5797313c58754905079643 -80dc1db20067a844fe8baceca77f80db171a5ca967acb24e2d480eae9ceb91a3343c31ad1c95b721f390829084f0eae6 -9825c31f1c18da0de3fa84399c8b40f8002c3cae211fb6a0623c76b097b4d39f5c50058f57a16362f7a575909d0a44a2 -a99fc8de0c38dbf7b9e946de83943a6b46a762167bafe2a603fb9b86f094da30d6de7ed55d639aafc91936923ee414b3 -ad594678b407db5d6ea2e90528121f84f2b96a4113a252a30d359a721429857c204c1c1c4ff71d8bb5768c833f82e80e -b33d985e847b54510b9b007e31053732c8a495e43be158bd2ffcea25c6765bcbc7ca815f7c60b36ad088b955dd6e9350 -815f8dfc6f90b3342ca3fbd968c67f324dae8f74245cbf8bc3bef10e9440c65d3a2151f951e8d18959ba01c1b50b0ec1 -94c608a362dd732a1abc56e338637c900d59013db8668e49398b3c7a0cae3f7e2f1d1bf94c0299eeafe6af7f76c88618 -8ebd8446b23e5adfcc393adc5c52fe172f030a73e63cd2d515245ca0dd02782ceed5bcdd9ccd9c1b4c5953dfac9c340c -820437f3f6f9ad0f5d7502815b221b83755eb8dc56cd92c29e9535eb0b48fb8d08c9e4fcc26945f9c8cca60d89c44710 -8910e4e8a56bf4be9cc3bbf0bf6b1182a2f48837a2ed3c2aaec7099bfd7f0c83e14e608876b17893a98021ff4ab2f20d -9633918fde348573eec15ce0ad53ac7e1823aac86429710a376ad661002ae6d049ded879383faaa139435122f64047c6 -a1f5e3fa558a9e89318ca87978492f0fb4f6e54a9735c1b8d2ecfb1d1c57194ded6e0dd82d077b2d54251f3bee1279e1 -b208e22d04896abfd515a95c429ff318e87ff81a5d534c8ac2c33c052d6ffb73ef1dccd39c0bbe0734b596c384014766 -986d5d7d2b5bde6d16336f378bd13d0e671ad23a8ec8a10b3fc09036faeeb069f60662138d7a6df3dfb8e0d36180f770 -a2d4e6c5f5569e9cef1cddb569515d4b6ace38c8aed594f06da7434ba6b24477392cc67ba867c2b079545ca0c625c457 -b5ac32b1d231957d91c8b7fc43115ce3c5c0d8c13ca633374402fa8000b6d9fb19499f9181844f0c10b47357f3f757ce -96b8bf2504b4d28fa34a4ec378e0e0b684890c5f44b7a6bb6e19d7b3db2ab27b1e2686389d1de9fbd981962833a313ea -953bfd7f6c3a0469ad432072b9679a25486f5f4828092401eff494cfb46656c958641a4e6d0d97d400bc59d92dba0030 -876ab3cea7484bbfd0db621ec085b9ac885d94ab55c4bb671168d82b92e609754b86aaf472c55df3d81421d768fd108a -885ff4e67d9ece646d02dd425aa5a087e485c3f280c3471b77532b0db6145b69b0fbefb18aa2e3fa5b64928b43a94e57 -b91931d93f806d0b0e6cc62a53c718c099526140f50f45d94b8bbb57d71e78647e06ee7b42aa5714aed9a5c05ac8533f -a0313eeadd39c720c9c27b3d671215331ab8d0a794e71e7e690f06bcd87722b531d6525060c358f35f5705dbb7109ccb -874c0944b7fedc6701e53344100612ddcb495351e29305c00ec40a7276ea5455465ffb7bded898886c1853139dfb1fc7 -8dc31701a01ee8137059ca1874a015130d3024823c0576aa9243e6942ec99d377e7715ed1444cd9b750a64b85dcaa3e5 -836d2a757405e922ec9a2dfdcf489a58bd48b5f9683dd46bf6047688f778c8dee9bc456de806f70464df0b25f3f3d238 -b30b0a1e454a503ea3e2efdec7483eaf20b0a5c3cefc42069e891952b35d4b2c955cf615f3066285ed8fafd9fcfbb8f6 -8e6d4044b55ab747e83ec8762ea86845f1785cc7be0279c075dadf08aca3ccc5a096c015bb3c3f738f647a4eadea3ba5 -ad7735d16ab03cbe09c029610aa625133a6daecfc990b297205b6da98eda8c136a7c50db90f426d35069708510d5ae9c -8d62d858bbb59ec3c8cc9acda002e08addab4d3ad143b3812098f3d9087a1b4a1bb255dcb1635da2402487d8d0249161 -805beec33238b832e8530645a3254aeef957e8f7ea24bcfc1054f8b9c69421145ebb8f9d893237e8a001c857fedfc77e -b1005644be4b085e3f5775aa9bd3e09a283e87ddada3082c04e7a62d303dcef3b8cf8f92944c200c7ae6bb6bdf63f832 -b4ba0e0790dc29063e577474ffe3b61f5ea2508169f5adc1e394934ebb473e356239413a17962bc3e5d3762d72cce8c2 -a157ba9169c9e3e6748d9f1dd67fbe08b9114ade4c5d8fc475f87a764fb7e6f1d21f66d7905cd730f28a1c2d8378682a -913e52b5c93989b5d15e0d91aa0f19f78d592bc28bcfdfddc885a9980c732b1f4debb8166a7c4083c42aeda93a702898 -90fbfc1567e7cd4e096a38433704d3f96a2de2f6ed3371515ccc30bc4dd0721a704487d25a97f3c3d7e4344472702d8d -89646043028ffee4b69d346907586fd12c2c0730f024acb1481abea478e61031966e72072ff1d5e65cb8c64a69ad4eb1 -b125a45e86117ee11d2fb42f680ab4a7894edd67ff927ae2c808920c66c3e55f6a9d4588eee906f33a05d592e5ec3c04 -aad47f5b41eae9be55fb4f67674ff1e4ae2482897676f964a4d2dcb6982252ee4ff56aac49578b23f72d1fced707525e -b9ddff8986145e33851b4de54d3e81faa3352e8385895f357734085a1616ef61c692d925fe62a5ed3be8ca49f5d66306 -b3cb0963387ed28c0c0adf7fe645f02606e6e1780a24d6cecef5b7c642499109974c81a7c2a198b19862eedcea2c2d8c -ac9c53c885457aaf5cb36c717a6f4077af701e0098eebd7aa600f5e4b14e6c1067255b3a0bc40e4a552025231be7de60 -8e1a8d823c4603f6648ec21d064101094f2a762a4ed37dd2f0a2d9aa97b2d850ce1e76f4a4b8cae58819b058180f7031 -b268b73bf7a179b6d22bd37e5e8cb514e9f5f8968c78e14e4f6d5700ca0d0ca5081d0344bb73b028970eebde3cb4124e -a7f57d71940f0edbd29ed8473d0149cae71d921dd15d1ff589774003e816b54b24de2620871108cec1ab9fa956ad6ce6 -8053e6416c8b120e2b999cc2fc420a6a55094c61ac7f2a6c6f0a2c108a320890e389af96cbe378936132363c0d551277 -b3823f4511125e5aa0f4269e991b435a0d6ceb523ebd91c04d7add5534e3df5fc951c504b4fd412a309fd3726b7f940b -ae6eb04674d04e982ca9a6add30370ab90e303c71486f43ed3efbe431af1b0e43e9d06c11c3412651f304c473e7dbf39 -96ab55e641ed2e677591f7379a3cd126449614181fce403e93e89b1645d82c4af524381ff986cae7f9cebe676878646d -b52423b4a8c37d3c3e2eca8f0ddbf7abe0938855f33a0af50f117fab26415fb0a3da5405908ec5fdc22a2c1f2ca64892 -82a69ce1ee92a09cc709d0e3cd22116c9f69d28ea507fe5901f5676000b5179b9abe4c1875d052b0dd42d39925e186bb -a84c8cb84b9d5cfb69a5414f0a5283a5f2e90739e9362a1e8c784b96381b59ac6c18723a4aa45988ee8ef5c1f45cc97d -afd7efce6b36813082eb98257aae22a4c1ae97d51cac7ea9c852d4a66d05ef2732116137d8432e3f117119725a817d24 -a0f5fe25af3ce021b706fcff05f3d825384a272284d04735574ce5fb256bf27100fad0b1f1ba0e54ae9dcbb9570ecad3 -8751786cb80e2e1ff819fc7fa31c2833d25086534eb12b373d31f826382430acfd87023d2a688c65b5e983927e146336 -8cf5c4b17fa4f3d35c78ce41e1dc86988fd1135cd5e6b2bb0c108ee13538d0d09ae7102609c6070f39f937b439b31e33 -a9108967a2fedd7c322711eca8159c533dd561bedcb181b646de98bf5c3079449478eab579731bee8d215ae8852c7e21 -b54c5171704f42a6f0f4e70767cdb3d96ffc4888c842eece343a01557da405961d53ffdc34d2f902ea25d3e1ed867cad -ae8d4b764a7a25330ba205bf77e9f46182cd60f94a336bbd96773cf8064e3d39caf04c310680943dc89ed1fbad2c6e0d -aa5150e911a8e1346868e1b71c5a01e2a4bb8632c195861fb6c3038a0e9b85f0e09b3822e9283654a4d7bb17db2fc5f4 -9685d3756ce9069bf8bb716cf7d5063ebfafe37e15b137fc8c3159633c4e006ff4887ddd0ae90360767a25c3f90cba7f -82155fd70f107ab3c8e414eadf226c797e07b65911508c76c554445422325e71af8c9a8e77fd52d94412a6fc29417cd3 -abfae52f53a4b6e00760468d973a267f29321997c3dbb5aee36dc1f20619551229c0c45b9d9749f410e7f531b73378e8 -81a76d921f8ef88e774fd985e786a4a330d779b93fad7def718c014685ca0247379e2e2a007ad63ee7f729cd9ed6ce1b -81947c84bc5e28e26e2e533af5ae8fe10407a7b77436dbf8f1d5b0bbe86fc659eae10f974659dc7c826c6dabd03e3a4b -92b8c07050d635b8dd4fd09df9054efe4edae6b86a63c292e73cc819a12a21dd7d104ce51fa56af6539dedf6dbe6f7b6 -b44c579e3881f32b32d20c82c207307eca08e44995dd2aac3b2692d2c8eb2a325626c80ac81c26eeb38c4137ff95add5 -97efab8941c90c30860926dea69a841f2dcd02980bf5413b9fd78d85904588bf0c1021798dbc16c8bbb32cce66c82621 -913363012528b50698e904de0588bf55c8ec5cf6f0367cfd42095c4468fcc64954fbf784508073e542fee242d0743867 -8ed203cf215148296454012bd10fddaf119203db1919a7b3d2cdc9f80e66729464fdfae42f1f2fc5af1ed53a42b40024 -ab84312db7b87d711e9a60824f4fe50e7a6190bf92e1628688dfcb38930fe87b2d53f9e14dd4de509b2216856d8d9188 -880726def069c160278b12d2258eac8fa63f729cd351a710d28b7e601c6712903c3ac1e7bbd0d21e4a15f13ca49db5aa -980699cd51bac6283959765f5174e543ed1e5f5584b5127980cbc2ef18d984ecabba45042c6773b447b8e694db066028 -aeb019cb80dc4cb4207430d0f2cd24c9888998b6f21d9bf286cc638449668d2eec0018a4cf3fe6448673cd6729335e2b -b29852f6aa6c60effdffe96ae88590c88abae732561d35cc19e82d3a51e26cb35ea00986193e07f90060756240f5346e -a0fa855adc5ba469f35800c48414b8921455950a5c0a49945d1ef6e8f2a1881f2e2dfae47de6417270a6bf49deeb091d -b6c7332e3b14813641e7272d4f69ecc7e09081df0037d6dab97ce13a9e58510f5c930d300633f208181d9205c5534001 -85a6c050f42fce560b5a8d54a11c3bbb8407abbadd859647a7b0c21c4b579ec65671098b74f10a16245dc779dff7838e -8f3eb34bb68759d53c6677de4de78a6c24dd32c8962a7fb355ed362572ef8253733e6b52bc21c9f92ecd875020a9b8de -a17dd44181e5dab4dbc128e1af93ec22624b57a448ca65d2d9e246797e4af7d079e09c6e0dfb62db3a9957ce92f098d5 -a56a1b854c3183082543a8685bb34cae1289f86cfa8123a579049dbd059e77982886bfeb61bf6e05b4b1fe4e620932e7 -aedae3033cb2fb7628cb4803435bdd7757370a86f808ae4cecb9a268ad0e875f308c048c80cbcac523de16b609683887 -9344905376aa3982b1179497fac5a1d74b14b7038fd15e3b002db4c11c8bfc7c39430db492cdaf58b9c47996c9901f28 -a3bfafdae011a19f030c749c3b071f83580dee97dd6f949e790366f95618ca9f828f1daaeabad6dcd664fcef81b6556d -81c03d8429129e7e04434dee2c529194ddb01b414feda3adee2271eb680f6c85ec872a55c9fa9d2096f517e13ed5abcc -98205ef3a72dff54c5a9c82d293c3e45d908946fa74bb749c3aabe1ab994ea93c269bcce1a266d2fe67a8f02133c5985 -85a70aeed09fda24412fadbafbbbf5ba1e00ac92885df329e147bfafa97b57629a3582115b780d8549d07d19b7867715 -b0fbe81c719f89a57d9ea3397705f898175808c5f75f8eb81c2193a0b555869ba7bd2e6bc54ee8a60cea11735e21c68c -b03a0bd160495ee626ff3a5c7d95bc79d7da7e5a96f6d10116600c8fa20bedd1132f5170f25a22371a34a2d763f2d6d0 -a90ab04091fbca9f433b885e6c1d60ab45f6f1daf4b35ec22b09909d493a6aab65ce41a6f30c98239cbca27022f61a8b -b66f92aa3bf2549f9b60b86f99a0bd19cbdd97036d4ae71ca4b83d669607f275260a497208f6476cde1931d9712c2402 -b08e1fdf20e6a9b0b4942f14fa339551c3175c1ffc5d0ab5b226b6e6a322e9eb0ba96adc5c8d59ca4259e2bdd04a7eb0 -a2812231e92c1ce74d4f5ac3ab6698520288db6a38398bb38a914ac9326519580af17ae3e27cde26607e698294022c81 -abfcbbcf1d3b9e84c02499003e490a1d5d9a2841a9e50c7babbef0b2dd20d7483371d4dc629ba07faf46db659459d296 -b0fe9f98c3da70927c23f2975a9dc4789194d81932d2ad0f3b00843dd9cbd7fb60747a1da8fe5a79f136a601becf279d -b130a6dba7645165348cb90f023713bed0eefbd90a976b313521c60a36d34f02032e69a2bdcf5361e343ed46911297ec -862f0cffe3020cea7a5fd4703353aa1eb1be335e3b712b29d079ff9f7090d1d8b12013011e1bdcbaa80c44641fd37c9f -8c6f11123b26633e1abb9ed857e0bce845b2b3df91cc7b013b2fc77b477eee445da0285fc6fc793e29d5912977f40916 -91381846126ea819d40f84d3005e9fb233dc80071d1f9bb07f102bf015f813f61e5884ffffb4f5cd333c1b1e38a05a58 -8add7d908de6e1775adbd39c29a391f06692b936518db1f8fde74eb4f533fc510673a59afb86e3a9b52ade96e3004c57 -8780e086a244a092206edcde625cafb87c9ab1f89cc3e0d378bc9ee776313836160960a82ec397bc3800c0a0ec3da283 -a6cb4cd9481e22870fdd757fae0785edf4635e7aacb18072fe8dc5876d0bab53fb99ce40964a7d3e8bcfff6f0ab1332f -af30ff47ecc5b543efba1ba4706921066ca8bb625f40e530fb668aea0551c7647a9d126e8aba282fbcce168c3e7e0130 -91b0bcf408ce3c11555dcb80c4410b5bc2386d3c05caec0b653352377efdcb6bab4827f2018671fc8e4a0e90d772acc1 -a9430b975ef138b6b2944c7baded8fe102d31da4cfe3bd3d8778bda79189c99d38176a19c848a19e2d1ee0bddd9a13c1 -aa5a4eef849d7c9d2f4b018bd01271c1dd83f771de860c4261f385d3bdcc130218495860a1de298f14b703ec32fa235f -b0ce79e7f9ae57abe4ff366146c3b9bfb38b0dee09c28c28f5981a5d234c6810ad4d582751948affb480d6ae1c8c31c4 -b75122748560f73d15c01a8907d36d06dc068e82ce22b84b322ac1f727034493572f7907dec34ebc3ddcc976f2f89ed7 -b0fc7836369a3e4411d34792d6bd5617c14f61d9bba023dda64e89dc5fb0f423244e9b48ee64869258931daa9753a56f -8956d7455ae9009d70c6e4a0bcd7610e55f37494cf9897a8f9e1b904cc8febc3fd2d642ebd09025cfff4609ad7e3bc52 -ad741efe9e472026aa49ae3d9914cb9c1a6f37a54f1a6fe6419bebd8c7d68dca105a751c7859f4389505ede40a0de786 -b52f418797d719f0d0d0ffb0846788b5cba5d0454a69a2925de4b0b80fa4dd7e8c445e5eac40afd92897ed28ca650566 -a0ab65fb9d42dd966cd93b1de01d7c822694669dd2b7a0c04d99cd0f3c3de795f387b9c92da11353412f33af5c950e9a -a0052f44a31e5741a331f7cac515a08b3325666d388880162d9a7b97598fde8b61f9ff35ff220df224eb5c4e40ef0567 -a0101cfdc94e42b2b976c0d89612a720e55d145a5ef6ef6f1f78cf6de084a49973d9b5d45915349c34ce712512191e3c -a0dd99fcf3f5cead5aaf08e82212df3a8bb543c407a4d6fab88dc5130c1769df3f147e934a46f291d6c1a55d92b86917 -a5939153f0d1931bbda5cf6bdf20562519ea55fbfa978d6dbc6828d298260c0da7a50c37c34f386e59431301a96c2232 -9568269f3f5257200f9ca44afe1174a5d3cf92950a7f553e50e279c239e156a9faaa2a67f288e3d5100b4142efe64856 -b746b0832866c23288e07f24991bbf687cad794e7b794d3d3b79367566ca617d38af586cdc8d6f4a85a34835be41d54f -a871ce28e39ab467706e32fec1669fda5a4abba2f8c209c6745df9f7a0fa36bbf1919cf14cb89ea26fa214c4c907ae03 -a08dacdd758e523cb8484f6bd070642c0c20e184abdf8e2a601f61507e93952d5b8b0c723c34fcbdd70a8485eec29db2 -85bdb78d501382bb95f1166b8d032941005661aefd17a5ac32df9a3a18e9df2fc5dc2c1f07075f9641af10353cecc0c9 -98d730c28f6fa692a389e97e368b58f4d95382fad8f0baa58e71a3d7baaea1988ead47b13742ce587456f083636fa98e -a557198c6f3d5382be9fb363feb02e2e243b0c3c61337b3f1801c4a0943f18e38ce1a1c36b5c289c8fa2aa9d58742bab -89174f79201742220ac689c403fc7b243eed4f8e3f2f8aba0bf183e6f5d4907cb55ade3e238e3623d9885f03155c4d2b -b891d600132a86709e06f3381158db300975f73ea4c1f7c100358e14e98c5fbe792a9af666b85c4e402707c3f2db321e -b9e5b2529ef1043278c939373fc0dbafe446def52ddd0a8edecd3e4b736de87e63e187df853c54c28d865de18a358bb6 -8589b2e9770340c64679062c5badb7bbef68f55476289b19511a158a9a721f197da03ece3309e059fc4468b15ac33aa3 -aad8c6cd01d785a881b446f06f1e9cd71bca74ba98674c2dcddc8af01c40aa7a6d469037498b5602e76e9c91a58d3dbd -abaccb1bd918a8465f1bf8dbe2c9ad4775c620b055550b949a399f30cf0d9eb909f3851f5b55e38f9e461e762f88f499 -ae62339d26db46e85f157c0151bd29916d5cc619bd4b832814b3fd2f00af8f38e7f0f09932ffe5bba692005dab2d9a74 -93a6ff30a5c0edf8058c89aba8c3259e0f1b1be1b80e67682de651e5346f7e1b4b4ac3d87cbaebf198cf779524aff6bf -8980a2b1d8f574af45b459193c952400b10a86122b71fca2acb75ee0dbd492e7e1ef5b959baf609a5172115e371f3177 -8c2f49f3666faee6940c75e8c7f6f8edc3f704cca7a858bbb7ee5e96bba3b0cf0993996f781ba6be3b0821ef4cb75039 -b14b9e348215b278696018330f63c38db100b0542cfc5be11dc33046e3bca6a13034c4ae40d9cef9ea8b34fef0910c4e -b59bc3d0a30d66c16e6a411cb641f348cb1135186d5f69fda8b0a0934a5a2e7f6199095ba319ec87d3fe8f1ec4a06368 -8874aca2a3767aa198e4c3fec2d9c62d496bc41ff71ce242e9e082b7f38cdf356089295f80a301a3cf1182bde5308c97 -b1820ebd61376d91232423fc20bf008b2ba37e761199f4ef0648ea2bd70282766799b4de814846d2f4d516d525c8daa7 -a6b202e5dedc16a4073e04a11af3a8509b23dfe5a1952f899adeb240e75c3f5bde0c424f811a81ea48d343591faffe46 -a69becee9c93734805523b92150a59a62eed4934f66056b645728740d42223f2925a1ad38359ba644da24d9414f4cdda -ad72f0f1305e37c7e6b48c272323ee883320994cb2e0d850905d6655fafc9f361389bcb9c66b3ff8d2051dbb58c8aa96 -b563600bd56fad7c8853af21c6a02a16ed9d8a8bbeea2c31731d63b976d83cb05b9779372d898233e8fd597a75424797 -b0abb78ce465bf7051f563c62e8be9c57a2cc997f47c82819300f36e301fefd908894bb2053a9d27ce2d0f8c46d88b5b -a071a85fb8274bac2202e0cb8e0e2028a5e138a82d6e0374d39ca1884a549c7c401312f00071b91f455c3a2afcfe0cda -b931c271513a0f267b9f41444a5650b1918100b8f1a64959c552aff4e2193cc1b9927906c6fa7b8a8c68ef13d79aaa52 -a6a1bb9c7d32cb0ca44d8b75af7e40479fbce67d216b48a2bb680d3f3a772003a49d3cd675fc64e9e0f8fabeb86d6d61 -b98d609858671543e1c3b8564162ad828808bb50ded261a9f8690ded5b665ed8368c58f947365ed6e84e5a12e27b423d -b3dca58cd69ec855e2701a1d66cad86717ff103ef862c490399c771ad28f675680f9500cb97be48de34bcdc1e4503ffd -b34867c6735d3c49865e246ddf6c3b33baf8e6f164db3406a64ebce4768cb46b0309635e11be985fee09ab7a31d81402 -acb966c554188c5b266624208f31fab250b3aa197adbdd14aee5ab27d7fb886eb4350985c553b20fdf66d5d332bfd3fe -943c36a18223d6c870d54c3b051ef08d802b85e9dd6de37a51c932f90191890656c06adfa883c87b906557ae32d09da0 -81bca7954d0b9b6c3d4528aadf83e4bc2ef9ea143d6209bc45ae9e7ae9787dbcd8333c41f12c0b6deee8dcb6805e826a -aba176b92256efb68f574e543479e5cf0376889fb48e3db4ebfb7cba91e4d9bcf19dcfec444c6622d9398f06de29e2b9 -b9f743691448053216f6ece7cd699871fff4217a1409ceb8ab7bdf3312d11696d62c74b0664ba0a631b1e0237a8a0361 -a383c2b6276fa9af346b21609326b53fb14fdf6f61676683076e80f375b603645f2051985706d0401e6fbed7eb0666b6 -a9ef2f63ec6d9beb8f3d04e36807d84bda87bdd6b351a3e4a9bf7edcb5618c46c1f58cfbf89e64b40f550915c6988447 -a141b2d7a82f5005eaea7ae7d112c6788b9b95121e5b70b7168d971812f3381de8b0082ac1f0a82c7d365922ebd2d26a -b1b76ef8120e66e1535c17038b75255a07849935d3128e3e99e56567b842fb1e8d56ef932d508d2fb18b82f7868fe1a9 -8e2e234684c81f21099f5c54f6bbe2dd01e3b172623836c77668a0c49ce1fe218786c3827e4d9ae2ea25c50a8924fb3c -a5caf5ff948bfd3c4ca3ffbdfcd91eec83214a6c6017235f309a0bbf7061d3b0b466307c00b44a1009cf575163898b43 -986415a82ca16ebb107b4c50b0c023c28714281db0bcdab589f6cb13d80e473a3034b7081b3c358e725833f6d845cb14 -b94836bf406ac2cbacb10e6df5bcdfcc9d9124ae1062767ca4e322d287fd5e353fdcebd0e52407cb3cd68571258a8900 -83c6d70a640b33087454a4788dfd9ef3ed00272da084a8d36be817296f71c086b23b576f98178ab8ca6a74f04524b46b -ad4115182ad784cfe11bcfc5ce21fd56229cc2ce77ac82746e91a2f0aa53ca6593a22efd2dc4ed8d00f84542643d9c58 -ab1434c5e5065da826d10c2a2dba0facccab0e52b506ce0ce42fbe47ced5a741797151d9ecc99dc7d6373cfa1779bbf6 -8a8b591d82358d55e6938f67ea87a89097ab5f5496f7260adb9f649abb289da12b498c5b2539c2f9614fb4e21b1f66b0 -964f355d603264bc1f44c64d6d64debca66f37dff39c971d9fc924f2bc68e6c187b48564a6dc82660a98b035f8addb5d -b66235eaaf47456bc1dc4bde454a028e2ce494ece6b713a94cd6bf27cf18c717fd0c57a5681caaa2ad73a473593cdd7a -9103e3bb74304186fa4e3e355a02da77da4aca9b7e702982fc2082af67127ebb23a455098313c88465bc9b7d26820dd5 -b6a42ff407c9dd132670cdb83cbad4b20871716e44133b59a932cd1c3f97c7ac8ff7f61acfaf8628372508d8dc8cad7c -883a9c21c16a167a4171b0f084565c13b6f28ba7c4977a0de69f0a25911f64099e7bbb4da8858f2e93068f4155d04e18 -8dbb3220abc6a43220adf0331e3903d3bfd1d5213aadfbd8dfcdf4b2864ce2e96a71f35ecfb7a07c3bbabf0372b50271 -b4ad08aee48e176bda390b7d9acf2f8d5eb008f30d20994707b757dc6a3974b2902d29cd9b4d85e032810ad25ac49e97 -865bb0f33f7636ec501bb634e5b65751c8a230ae1fa807a961a8289bbf9c7fe8c59e01fbc4c04f8d59b7f539cf79ddd5 -86a54d4c12ad1e3605b9f93d4a37082fd26e888d2329847d89afa7802e815f33f38185c5b7292293d788ad7d7da1df97 -b26c8615c5e47691c9ff3deca3021714662d236c4d8401c5d27b50152ce7e566266b9d512d14eb63e65bc1d38a16f914 -827639d5ce7db43ba40152c8a0eaad443af21dc92636cc8cc2b35f10647da7d475a1e408901cd220552fddad79db74df -a2b79a582191a85dbe22dc384c9ca3de345e69f6aa370aa6d3ff1e1c3de513e30b72df9555b15a46586bd27ea2854d9d -ae0d74644aba9a49521d3e9553813bcb9e18f0b43515e4c74366e503c52f47236be92dfbd99c7285b3248c267b1de5a0 -80fb0c116e0fd6822a04b9c25f456bdca704e2be7bdc5d141dbf5d1c5eeb0a2c4f5d80db583b03ef3e47517e4f9a1b10 -ac3a1fa3b4a2f30ea7e0a114cdc479eb51773573804c2a158d603ad9902ae8e39ffe95df09c0d871725a5d7f9ba71a57 -b56b2b0d601cba7f817fa76102c68c2e518c6f20ff693aad3ff2e07d6c4c76203753f7f91686b1801e8c4659e4d45c48 -89d50c1fc56e656fb9d3915964ebce703cb723fe411ab3c9eaa88ccc5d2b155a9b2e515363d9c600d3c0cee782c43f41 -b24207e61462f6230f3cd8ccf6828357d03e725769f7d1de35099ef9ee4dca57dbce699bb49ed994462bee17059d25ce -b886f17fcbcbfcd08ac07f04bb9543ef58510189decaccea4b4158c9174a067cb67d14b6be3c934e6e2a18c77efa9c9c -b9c050ad9cafd41c6e2e192b70d080076eed59ed38ea19a12bd92fa17b5d8947d58d5546aaf5e8e27e1d3b5481a6ce51 -aaf7a34d3267e3b1ddbc54c641e3922e89303f7c86ebebc7347ebca4cffad5b76117dac0cbae1a133053492799cd936f -a9ee604ada50adef82e29e893070649d2d4b7136cc24fa20e281ce1a07bd736bf0de7c420369676bcbcecff26fb6e900 -9855315a12a4b4cf80ab90b8bd13003223ba25206e52fd4fe6a409232fbed938f30120a3db23eab9c53f308bd8b9db81 -8cd488dd7a24f548a3cf03c54dec7ff61d0685cb0f6e5c46c2d728e3500d8c7bd6bba0156f4bf600466fda53e5b20444 -890ad4942ebac8f5b16c777701ab80c68f56fa542002b0786f8fea0fb073154369920ac3dbfc07ea598b82f4985b8ced -8de0cf9ddc84c9b92c59b9b044387597799246b30b9f4d7626fc12c51f6e423e08ee4cbfe9289984983c1f9521c3e19d -b474dfb5b5f4231d7775b3c3a8744956b3f0c7a871d835d7e4fd9cc895222c7b868d6c6ce250de568a65851151fac860 -86433b6135d9ed9b5ee8cb7a6c40e5c9d30a68774cec04988117302b8a02a11a71a1e03fd8e0264ef6611d219f103007 -80b9ed4adbe9538fb1ef69dd44ec0ec5b57cbfea820054d8d445b4261962624b4c70ac330480594bc5168184378379c3 -8b2e83562ccd23b7ad2d17f55b1ab7ef5fbef64b3a284e6725b800f3222b8bdf49937f4a873917ada9c4ddfb090938c2 -abe78cebc0f5a45d754140d1f685e387489acbfa46d297a8592aaa0d676a470654f417a4f7d666fc0b2508fab37d908e -a9c5f8ff1f8568e252b06d10e1558326db9901840e6b3c26bbd0cd5e850cb5fb3af3f117dbb0f282740276f6fd84126f -975f8dc4fb55032a5df3b42b96c8c0ffecb75456f01d4aef66f973cb7270d4eff32c71520ceefc1adcf38d77b6b80c67 -b043306ed2c3d8a5b9a056565afd8b5e354c8c4569fda66b0d797a50a3ce2c08cffbae9bbe292da69f39e89d5dc7911e -8d2afc36b1e44386ba350c14a6c1bb31ff6ea77128a0c5287584ac3584282d18516901ce402b4644a53db1ed8e7fa581 -8c294058bed53d7290325c363fe243f6ec4f4ea2343692f4bac8f0cb86f115c069ccb8334b53d2e42c067691ad110dba -b92157b926751aaf7ef82c1aa8c654907dccab6376187ee8b3e8c0c82811eae01242832de953faa13ebaff7da8698b3e -a780c4bdd9e4ba57254b09d745075cecab87feda78c88ffee489625c5a3cf96aa6b3c9503a374a37927d9b78de9bd22b -811f548ef3a2e6a654f7dcb28ac9378de9515ed61e5a428515d9594a83e80b35c60f96a5cf743e6fab0d3cb526149f49 -85a4dccf6d90ee8e094731eec53bd00b3887aec6bd81a0740efddf812fd35e3e4fe4f983afb49a8588691c202dabf942 -b152c2da6f2e01c8913079ae2b40a09b1f361a80f5408a0237a8131b429677c3157295e11b365b1b1841924b9efb922e -849b9efee8742502ffd981c4517c88ed33e4dd518a330802caff168abae3cd09956a5ee5eda15900243bc2e829016b74 -955a933f3c18ec0f1c0e38fa931e4427a5372c46a3906ebe95082bcf878c35246523c23f0266644ace1fa590ffa6d119 -911989e9f43e580c886656377c6f856cdd4ff1bd001b6db3bbd86e590a821d34a5c6688a29b8d90f28680e9fdf03ba69 -b73b8b4f1fd6049fb68d47cd96a18fcba3f716e0a1061aa5a2596302795354e0c39dea04d91d232aec86b0bf2ba10522 -90f87456d9156e6a1f029a833bf3c7dbed98ca2f2f147a8564922c25ae197a55f7ea9b2ee1f81bf7383197c4bad2e20c -903cba8b1e088574cb04a05ca1899ab00d8960580c884bd3c8a4c98d680c2ad11410f2b75739d6050f91d7208cac33a5 -9329987d42529c261bd15ecedd360be0ea8966e7838f32896522c965adfc4febf187db392bd441fb43bbd10c38fdf68b -8178ee93acf5353baa349285067b20e9bb41aa32d77b5aeb7384fe5220c1fe64a2461bd7a83142694fe673e8bbf61b7c -a06a8e53abcff271b1394bcc647440f81fb1c1a5f29c27a226e08f961c3353f4891620f2d59b9d1902bf2f5cc07a4553 -aaf5fe493b337810889e777980e6bbea6cac39ac66bc0875c680c4208807ac866e9fda9b5952aa1d04539b9f4a4bec57 -aa058abb1953eceac14ccfa7c0cc482a146e1232905dcecc86dd27f75575285f06bbae16a8c9fe8e35d8713717f5f19f -8f15dd732799c879ca46d2763453b359ff483ca33adb1d0e0a57262352e0476c235987dc3a8a243c74bc768f93d3014c -a61cc8263e9bc03cce985f1663b8a72928a607121005a301b28a278e9654727fd1b22bc8a949af73929c56d9d3d4a273 -98d6dc78502d19eb9f921225475a6ebcc7b44f01a2df6f55ccf6908d65b27af1891be2a37735f0315b6e0f1576c1f8d8 -8bd258b883f3b3793ec5be9472ad1ff3dc4b51bc5a58e9f944acfb927349ead8231a523cc2175c1f98e7e1e2b9f363b8 -aeacc2ecb6e807ad09bedd99654b097a6f39840e932873ace02eabd64ccfbb475abdcb62939a698abf17572d2034c51e -b8ccf78c08ccd8df59fd6eda2e01de328bc6d8a65824d6f1fc0537654e9bc6bf6f89c422dd3a295cce628749da85c864 -8f91fd8cb253ba2e71cc6f13da5e05f62c2c3b485c24f5d68397d04665673167fce1fc1aec6085c69e87e66ec555d3fd -a254baa10cb26d04136886073bb4c159af8a8532e3fd36b1e9c3a2e41b5b2b6a86c4ebc14dbe624ee07b7ccdaf59f9ab -94e3286fe5cd68c4c7b9a7d33ae3d714a7f265cf77cd0e9bc19fc51015b1d1c34ad7e3a5221c459e89f5a043ee84e3a9 -a279da8878af8d449a9539bec4b17cea94f0242911f66fab275b5143ab040825f78c89cb32a793930609415cfa3a1078 -ac846ceb89c9e5d43a2991c8443079dc32298cd63e370e64149cec98cf48a6351c09c856f2632fd2f2b3d685a18bbf8b -a847b27995c8a2e2454aaeb983879fb5d3a23105c33175839f7300b7e1e8ec3efd6450e9fa3f10323609dee7b98c6fd5 -a2f432d147d904d185ff4b2de8c6b82fbea278a2956bc406855b44c18041854c4f0ecccd472d1d0dff1d8aa8e281cb1d -94a48ad40326f95bd63dff4755f863a1b79e1df771a1173b17937f9baba57b39e651e7695be9f66a472f098b339364fc -a12a0ccd8f96e96e1bc6494341f7ebce959899341b3a084aa1aa87d1c0d489ac908552b7770b887bb47e7b8cbc3d8e66 -81a1f1681bda923bd274bfe0fbb9181d6d164fe738e54e25e8d4849193d311e2c4253614ed673c98af2c798f19a93468 -abf71106a05d501e84cc54610d349d7d5eae21a70bd0250f1bebbf412a130414d1c8dbe673ffdb80208fd72f1defa4d4 -96266dc2e0df18d8136d79f5b59e489978eee0e6b04926687fe389d4293c14f36f055c550657a8e27be4118b64254901 -8df5dcbefbfb4810ae3a413ca6b4bf08619ca53cd50eb1dde2a1c035efffc7b7ac7dff18d403253fd80104bd83dc029e -9610b87ff02e391a43324a7122736876d5b3af2a137d749c52f75d07b17f19900b151b7f439d564f4529e77aa057ad12 -a90a5572198b40fe2fcf47c422274ff36c9624df7db7a89c0eb47eb48a73a03c985f4ac5016161c76ca317f64339bce1 -98e5e61a6ab6462ba692124dba7794b6c6bde4249ab4fcc98c9edd631592d5bc2fb5e38466691a0970a38e48d87c2e43 -918cefb8f292f78d4db81462c633daf73b395e772f47b3a7d2cea598025b1d8c3ec0cbff46cdb23597e74929981cde40 -a98918a5dc7cf610fe55f725e4fd24ce581d594cb957bb9b4e888672e9c0137003e1041f83e3f1d7b9caab06462c87d4 -b92b74ac015262ca66c33f2d950221e19d940ba3bf4cf17845f961dc1729ae227aa9e1f2017829f2135b489064565c29 -a053ee339f359665feb178b4e7ee30a85df37debd17cacc5a27d6b3369d170b0114e67ad1712ed26d828f1df641bcd99 -8c3c8bad510b35da5ce5bd84b35c958797fbea024ad1c97091d2ff71d9b962e9222f65a9b776e5b3cc29c36e1063d2ee -af99dc7330fe7c37e850283eb47cc3257888e7c197cb0d102edf94439e1e02267b6a56306d246c326c4c79f9dc8c6986 -afecb2dc34d57a725efbd7eb93d61eb29dbe8409b668ab9ea040791f5b796d9be6d4fc10d7f627bf693452f330cf0435 -93334fedf19a3727a81a6b6f2459db859186227b96fe7a391263f69f1a0884e4235de64d29edebc7b99c44d19e7c7d7a -89579c51ac405ad7e9df13c904061670ce4b38372492764170e4d3d667ed52e5d15c7cd5c5991bbfa3a5e4e3fa16363e -9778f3e8639030f7ef1c344014f124e375acb8045bd13d8e97a92c5265c52de9d1ffebaa5bc3e1ad2719da0083222991 -88f77f34ee92b3d36791bdf3326532524a67d544297dcf1a47ff00b47c1b8219ff11e34034eab7d23b507caa2fd3c6b9 -a699c1e654e7c484431d81d90657892efeb4adcf72c43618e71ca7bd7c7a7ebbb1db7e06e75b75dc4c74efd306b5df3f -81d13153baebb2ef672b5bdb069d3cd669ce0be96b742c94e04038f689ff92a61376341366b286eee6bf3ae85156f694 -81efb17de94400fdacc1deec2550cbe3eecb27c7af99d8207e2f9be397e26be24a40446d2a09536bb5172c28959318d9 -989b21ebe9ceab02488992673dc071d4d5edec24bff0e17a4306c8cb4b3c83df53a2063d1827edd8ed16d6e837f0d222 -8d6005d6536825661b13c5fdce177cb37c04e8b109b7eb2b6d82ea1cb70efecf6a0022b64f84d753d165edc2bba784a3 -a32607360a71d5e34af2271211652d73d7756d393161f4cf0da000c2d66a84c6826e09e759bd787d4fd0305e2439d342 -aaad8d6f6e260db45d51b2da723be6fa832e76f5fbcb77a9a31e7f090dd38446d3b631b96230d78208cae408c288ac4e -abcfe425255fd3c5cffd3a818af7650190c957b6b07b632443f9e33e970a8a4c3bf79ac9b71f4d45f238a04d1c049857 -aeabf026d4c783adc4414b5923dbd0be4b039cc7201219f7260d321f55e9a5b166d7b5875af6129c034d0108fdc5d666 -af49e740c752d7b6f17048014851f437ffd17413c59797e5078eaaa36f73f0017c3e7da020310cfe7d3c85f94a99f203 -8854ca600d842566e3090040cd66bb0b3c46dae6962a13946f0024c4a8aca447e2ccf6f240045f1ceee799a88cb9210c -b6c03b93b1ab1b88ded8edfa1b487a1ed8bdce8535244dddb558ffb78f89b1c74058f80f4db2320ad060d0c2a9c351cc -b5bd7d17372faff4898a7517009b61a7c8f6f0e7ed4192c555db264618e3f6e57fb30a472d169fea01bf2bf0362a19a8 -96eb1d38319dc74afe7e7eb076fcd230d19983f645abd14a71e6103545c01301b31c47ae931e025f3ecc01fb3d2f31fa -b55a8d30d4403067def9b65e16f867299f8f64c9b391d0846d4780bc196569622e7e5b64ce799b5aefac8f965b2a7a7b -8356d199a991e5cbbff608752b6291731b6b6771aed292f8948b1f41c6543e4ab1bedc82dd26d10206c907c03508df06 -97f4137445c2d98b0d1d478049de952610ad698c91c9d0f0e7227d2aae690e9935e914ec4a2ea1fbf3fc1dddfeeacebb -af5621707e0938320b15ddfc87584ab325fbdfd85c30efea36f8f9bd0707d7ec12c344eff3ec21761189518d192df035 -8ac7817e71ea0825b292687928e349da7140285d035e1e1abff0c3704fa8453faaae343a441b7143a74ec56539687cc4 -8a5e0a9e4758449489df10f3386029ada828d1762e4fb0a8ffe6b79e5b6d5d713cb64ed95960e126398b0cdb89002bc9 -81324be4a71208bbb9bca74b77177f8f1abb9d3d5d9db195d1854651f2cf333cd618d35400da0f060f3e1b025124e4b2 -849971d9d095ae067525b3cbc4a7dfae81f739537ade6d6cec1b42fb692d923176197a8770907c58069754b8882822d6 -89f830825416802477cc81fdf11084885865ee6607aa15aa4eb28e351c569c49b8a1b9b5e95ddc04fa0ebafe20071313 -9240aeeaff37a91af55f860b9badd466e8243af9e8c96a7aa8cf348cd270685ab6301bc135b246dca9eda696f8b0e350 -acf74db78cc33138273127599eba35b0fb4e7b9a69fe02dae18fc6692d748ca332bd00b22afa8e654ed587aab11833f3 -b091e6d37b157b50d76bd297ad752220cd5c9390fac16dc838f8557aed6d9833fc920b61519df21265406216315e883f -a6446c429ebf1c7793c622250e23594c836b2fbcaf6c5b3d0995e1595a37f50ea643f3e549b0be8bbdadd69044d72ab9 -93e675353bd60e996bf1c914d5267eeaa8a52fc3077987ccc796710ef9becc6b7a00e3d82671a6bdfb8145ee3c80245a -a2f731e43251d04ed3364aa2f072d05355f299626f2d71a8a38b6f76cf08c544133f7d72dd0ab4162814b674b9fc7fa6 -97a8b791a5a8f6e1d0de192d78615d73d0c38f1e557e4e15d15adc663d649e655bc8da3bcc499ef70112eafe7fb45c7a -98cd624cbbd6c53a94469be4643c13130916b91143425bcb7d7028adbbfede38eff7a21092af43b12d4fab703c116359 -995783ce38fd5f6f9433027f122d4cf1e1ff3caf2d196ce591877f4a544ce9113ead60de2de1827eaff4dd31a20d79a8 -8cf251d6f5229183b7f3fe2f607a90b4e4b6f020fb4ba2459d28eb8872426e7be8761a93d5413640a661d73e34a5b81f -b9232d99620652a3aa7880cad0876f153ff881c4ed4c0c2e7b4ea81d5d42b70daf1a56b869d752c3743c6d4c947e6641 -849716f938f9d37250cccb1bf77f5f9fde53096cdfc6f2a25536a6187029a8f1331cdbed08909184b201f8d9f04b792f -80c7c4de098cbf9c6d17b14eba1805e433b5bc905f6096f8f63d34b94734f2e4ebf4bce8a177efd1186842a61204a062 -b790f410cf06b9b8daadceeb4fd5ff40a2deda820c8df2537e0a7554613ae3948e149504e3e79aa84889df50c8678eeb -813aab8bd000299cd37485b73cd7cba06e205f8efb87f1efc0bae8b70f6db2bc7702eb39510ad734854fb65515fe9d0f -94f0ab7388ac71cdb67f6b85dfd5945748afb2e5abb622f0b5ad104be1d4d0062b651f134ba22385c9e32c2dfdcccce1 -ab6223dca8bd6a4f969e21ccd9f8106fc5251d321f9e90cc42cea2424b3a9c4e5060a47eeef6b23c7976109b548498e8 -859c56b71343fce4d5c5b87814c47bf55d581c50fd1871a17e77b5e1742f5af639d0e94d19d909ec7dfe27919e954e0c -aae0d632b6191b8ad71b027791735f1578e1b89890b6c22e37de0e4a6074886126988fe8319ae228ac9ef3b3bcccb730 -8ca9f32a27a024c3d595ecfaf96b0461de57befa3b331ab71dc110ec3be5824fed783d9516597537683e77a11d334338 -a061df379fb3f4b24816c9f6cd8a94ecb89b4c6dc6cd81e4b8096fa9784b7f97ab3540259d1de9c02eb91d9945af4823 -998603102ac63001d63eb7347a4bb2bf4cf33b28079bb48a169076a65c20d511ccd3ef696d159e54cc8e772fb5d65d50 -94444d96d39450872ac69e44088c252c71f46be8333a608a475147752dbb99db0e36acfc5198f158509401959c12b709 -ac1b51b6c09fe055c1d7c9176eea9adc33f710818c83a1fbfa073c8dc3a7eb3513cbdd3f5960b7845e31e3e83181e6ba -803d530523fc9e1e0f11040d2412d02baef3f07eeb9b177fa9bfa396af42eea898a4276d56e1db998dc96ae47b644cb2 -85a3c9fc7638f5bf2c3e15ba8c2fa1ae87eb1ceb44c6598c67a2948667a9dfa41e61f66d535b4e7fda62f013a5a8b885 -a961cf5654c46a1a22c29baf7a4e77837a26b7f138f410e9d1883480ed5fa42411d522aba32040b577046c11f007388e -ad1154142344f494e3061ef45a34fab1aaacf5fdf7d1b26adbb5fbc3d795655fa743444e39d9a4119b4a4f82a6f30441 -b1d6c30771130c77806e7ab893b73d4deb590b2ff8f2f8b5e54c2040c1f3e060e2bd99afc668cf706a2df666a508bbf6 -a00361fd440f9decabd98d96c575cd251dc94c60611025095d1201ef2dedde51cb4de7c2ece47732e5ed9b3526c2012c -a85c5ab4d17d328bda5e6d839a9a6adcc92ff844ec25f84981e4f44a0e8419247c081530f8d9aa629c7eb4ca21affba6 -a4ddd3eab4527a2672cf9463db38bc29f61460e2a162f426b7852b7a7645fbd62084fd39a8e4d60e1958cce436dd8f57 -811648140080fe55b8618f4cf17f3c5a250adb0cd53d885f2ddba835d2b4433188e41fc0661faac88e4ff910b16278c0 -b85c7f1cfb0ed29addccf7546023a79249e8f15ac2d14a20accbfef4dd9dc11355d599815fa09d2b6b4e966e6ea8cff1 -a10b5d8c260b159043b020d5dd62b3467df2671afea6d480ca9087b7e60ed170c82b121819d088315902842d66c8fb45 -917e191df1bcf3f5715419c1e2191da6b8680543b1ba41fe84ed07ef570376e072c081beb67b375fca3565a2565bcabb -881fd967407390bfd7badc9ab494e8a287559a01eb07861f527207c127eadea626e9bcc5aa9cca2c5112fbac3b3f0e9c -959fd71149af82cc733619e0e5bf71760ca2650448c82984b3db74030d0e10f8ab1ce1609a6de6f470fe8b5bd90df5b3 -a3370898a1c5f33d15adb4238df9a6c945f18b9ada4ce2624fc32a844f9ece4c916a64e9442225b6592afa06d2e015f2 -817efb8a791435e4236f7d7b278181a5fa34587578c629dbc14fbf9a5c26772290611395eecd20222a4c58649fc256d8 -a04c9876acf2cfdc8ef96de4879742709270fa1d03fe4c8511fbef2d59eb0aaf0336fa2c7dfe41a651157377fa217813 -81e15875d7ea7f123e418edf14099f2e109d4f3a6ce0eb65f67fe9fb10d2f809a864a29f60ad3fc949f89e2596b21783 -b49f529975c09e436e6bc202fdc16e3fdcbe056db45178016ad6fdece9faad4446343e83aed096209690b21a6910724f -879e8eda589e1a279f7f49f6dd0580788c040d973748ec4942dbe51ea8fbd05983cc919b78f0c6b92ef3292ae29db875 -81a2b74b2118923f34139a102f3d95e7eee11c4c2929c2576dee200a5abfd364606158535a6c9e4178a6a83dbb65f3c4 -8913f281d8927f2b45fc815d0f7104631cb7f5f7278a316f1327d670d15868daadd2a64e3eb98e1f53fe7e300338cc80 -a6f815fba7ef9af7fbf45f93bc952e8b351f5de6568a27c7c47a00cb39a254c6b31753794f67940fc7d2e9cc581529f4 -b3722a15c66a0014ce4d082de118def8d39190c15678a472b846225585f3a83756ae1b255b2e3f86a26168878e4773b2 -817ae61ab3d0dd5b6e24846b5a5364b1a7dc2e77432d9fed587727520ae2f307264ea0948c91ad29f0aea3a11ff38624 -b3db467464415fcad36dc1de2d6ba7686772a577cc2619242ac040d6734881a45d3b40ed4588db124e4289cfeec4bbf6 -ad66a14f5a54ac69603b16e5f1529851183da77d3cc60867f10aea41339dd5e06a5257982e9e90a352cdd32750f42ee4 -adafa3681ef45d685555601a25a55cf23358319a17f61e2179e704f63df83a73bdd298d12cf6cef86db89bd17119e11d -a379dc44cb6dd3b9d378c07b2ec654fec7ca2f272de6ba895e3d00d20c9e4c5550498a843c8ac67e4221db2115bedc1c -b7bf81c267a78efc6b9e5a904574445a6487678d7ef70054e3e93ea6a23f966c2b68787f9164918e3b16d2175459ed92 -b41d66a13a4afafd5760062b77f79de7e6ab8ccacde9c6c5116a6d886912fb491dc027af435b1b44aacc6af7b3c887f2 -9904d23a7c1c1d2e4bab85d69f283eb0a8e26d46e8b7b30224438015c936729b2f0af7c7c54c03509bb0500acb42d8a4 -ae30d65e9e20c3bfd603994ae2b175ff691d51f3e24b2d058b3b8556d12ca4c75087809062dddd4aaac81c94d15d8a17 -9245162fab42ac01527424f6013310c3eb462982518debef6c127f46ba8a06c705d7dc9f0a41e796ba8d35d60ae6cc64 -87fab853638d7a29a20f3ba2b1a7919d023e9415bfa78ebb27973d8cbc7626f584dc5665d2e7ad71f1d760eba9700d88 -85aac46ecd330608e5272430970e6081ff02a571e8ea444f1e11785ea798769634a22a142d0237f67b75369d3c484a8a -938c85ab14894cc5dfce3d80456f189a2e98eddbc8828f4ff6b1df1dcb7b42b17ca2ff40226a8a1390a95d63dca698dd -a18ce1f846e3e3c4d846822f60271eecf0f5d7d9f986385ac53c5ace9589dc7c0188910448c19b91341a1ef556652fa9 -8611608a9d844f0e9d7584ad6ccf62a5087a64f764caf108db648a776b5390feb51e5120f0ef0e9e11301af3987dd7dc -8106333ba4b4de8d1ae43bc9735d3fea047392e88efd6a2fa6f7b924a18a7a265ca6123c3edc0f36307dd7fb7fe89257 -a91426fa500951ff1b051a248c050b7139ca30dde8768690432d597d2b3c4357b11a577be6b455a1c5d145264dcf81fc -b7f9f90e0e450f37b081297f7f651bad0496a8b9afd2a4cf4120a2671aaaa8536dce1af301258bfbfdb122afa44c5048 -84126da6435699b0c09fa4032dec73d1fca21d2d19f5214e8b0bea43267e9a8dd1fc44f8132d8315e734c8e2e04d7291 -aff064708103884cb4f1a3c1718b3fc40a238d35cf0a7dc24bdf9823693b407c70da50df585bf5bc4e9c07d1c2d203e8 -a8b40fc6533752983a5329c31d376c7a5c13ce6879cc7faee648200075d9cd273537001fb4c86e8576350eaac6ba60c2 -a02db682bdc117a84dcb9312eb28fcbde12d49f4ce915cc92c610bb6965ec3cc38290f8c5b5ec70afe153956692cda95 -86decd22b25d300508472c9ce75d3e465b737e7ce13bc0fcce32835e54646fe12322ba5bc457be18bfd926a1a6ca4a38 -a18666ef65b8c2904fd598791f5627207165315a85ee01d5fb0e6b2e10bdd9b00babc447da5bd63445e3337de33b9b89 -89bb0c06effadefdaf34ffe4b123e1678a90d4451ee856c863df1e752eef41fd984689ded8f0f878bf8916d5dd8e8024 -97cfcba08ebec05d0073992a66b1d7d6fb9d95871f2cdc36db301f78bf8069294d1c259efef5c93d20dc937eedae3a1a -ac2643b14ece79dcb2e289c96776a47e2bebd40dd6dc74fd035df5bb727b5596f40e3dd2d2202141e69b0993717ede09 -a5e6fd88a2f9174d9bd4c6a55d9c30974be414992f22aa852f552c7648f722ed8077acf5aba030abd47939bb451b2c60 -8ad40a612824a7994487731a40b311b7349038c841145865539c6ada75c56de6ac547a1c23df190e0caaafecddd80ccc -953a7cea1d857e09202c438c6108060961f195f88c32f0e012236d7a4b39d840c61b162ec86436e8c38567328bea0246 -80d8b47a46dae1868a7b8ccfe7029445bbe1009dad4a6c31f9ef081be32e8e1ac1178c3c8fb68d3e536c84990cc035b1 -81ecd99f22b3766ce0aca08a0a9191793f68c754fdec78b82a4c3bdc2db122bbb9ebfd02fc2dcc6e1567a7d42d0cc16a -b1dd0446bccc25846fb95d08c1c9cc52fb51c72c4c5d169ffde56ecfe800f108dc1106d65d5c5bd1087c656de3940b63 -b87547f0931e164e96de5c550ca5aa81273648fe34f6e193cd9d69cf729cb432e17aa02e25b1c27a8a0d20a3b795e94e -820a94e69a927e077082aae66f6b292cfbe4589d932edf9e68e268c9bd3d71ef76cf7d169dd445b93967c25db11f58f1 -b0d07ddf2595270c39adfa0c8cf2ab1322979b0546aa4d918f641be53cd97f36c879bb75d205e457c011aca3bbd9f731 -8700b876b35b4b10a8a9372c5230acecd39539c1bb87515640293ad4464a9e02929d7d6a6a11112e8a29564815ac0de4 -a61a601c5bb27dcb97e37c8e2b9ce479c6b192a5e04d9ed5e065833c5a1017ee5f237b77d1a17be5d48f8e7cc0bcacf6 -92fb88fe774c1ba1d4a08cae3c0e05467ad610e7a3f1d2423fd47751759235fe0a3036db4095bd6404716aa03820f484 -b274f140d77a3ce0796f5e09094b516537ccaf27ae1907099bff172e6368ba85e7c3ef8ea2a07457cac48ae334da95b3 -b2292d9181f16581a9a9142490b2bdcdfb218ca6315d1effc8592100d792eb89d5356996c890441f04f2b4a95763503e -8897e73f576d86bc354baa3bd96e553107c48cf5889dcc23c5ba68ab8bcd4e81f27767be2233fdfa13d39f885087e668 -a29eac6f0829791c728d71abc49569df95a4446ecbfc534b39f24f56c88fe70301838dfc1c19751e7f3c5c1b8c6af6a0 -9346dc3720adc5df500a8df27fd9c75ef38dc5c8f4e8ed66983304750e66d502c3c59b8e955be781b670a0afc70a2167 -9566d534e0e30a5c5f1428665590617e95fd05d45f573715f58157854ad596ece3a3cfec61356aee342308d623e029d5 -a464fb8bffe6bd65f71938c1715c6e296cc6d0311a83858e4e7eb5873b7f2cf0c584d2101e3407b85b64ca78b2ac93ce -b54088f7217987c87e9498a747569ac5b2f8afd5348f9c45bf3fd9fbf713a20f495f49c8572d087efe778ac7313ad6d3 -91fa9f5f8000fe050f5b224d90b59fcce13c77e903cbf98ded752e5b3db16adb2bc1f8c94be48b69f65f1f1ad81d6264 -92d04a5b0ac5d8c8e313709b432c9434ecd3e73231f01e9b4e7952b87df60cbfa97b5dedd2200bd033b4b9ea8ba45cc1 -a94b90ad3c3d6c4bbe169f8661a790c40645b40f0a9d1c7220f01cf7fc176e04d80bab0ced9323fcafb93643f12b2760 -94d86149b9c8443b46196f7e5a3738206dd6f3be7762df488bcbb9f9ee285a64c997ed875b7b16b26604fa59020a8199 -82efe4ae2c50a2d7645240c173a047f238536598c04a2c0b69c96e96bd18e075a99110f1206bc213f39edca42ba00cc1 -ab8667685f831bc14d4610f84a5da27b4ea5b133b4d991741a9e64dceb22cb64a3ce8f1b6e101d52af6296df7127c9ad -83ba433661c05dcc5d562f4a9a261c8110dac44b8d833ae1514b1fc60d8b4ee395b18804baea04cb10adb428faf713c3 -b5748f6f660cc5277f1211d2b8649493ed8a11085b871cd33a5aea630abd960a740f08c08be5f9c21574600ac9bf5737 -a5c8dd12af48fb710642ad65ebb97ca489e8206741807f7acfc334f8035d3c80593b1ff2090c9bb7bd138f0c48714ca8 -a2b382fd5744e3babf454b1d806cc8783efeb4761bc42b6914ea48a46a2eae835efbe0a18262b6bc034379e03cf1262b -b3145ffaf603f69f15a64936d32e3219eea5ed49fdfd2f5bf40ea0dfd974b36fb6ff12164d4c2282d892db4cf3ff3ce1 -87a316fb213f4c5e30c5e3face049db66be4f28821bd96034714ec23d3e97849d7b301930f90a4323c7ccf53de23050c -b9de09a919455070fed6220fc179c8b7a4c753062bcd27acf28f5b9947a659c0b364298daf7c85c4ca6fca7f945add1f -806fbd98d411b76979464c40ad88bc07a151628a27fcc1012ba1dfbaf5b5cc9d962fb9b3386008978a12515edce934bc -a15268877fae0d21610ae6a31061ed7c20814723385955fac09fdc9693a94c33dea11db98bb89fdfe68f933490f5c381 -8d633fb0c4da86b2e0b37d8fad5972d62bff2ac663c5ec815d095cd4b7e1fe66ebef2a2590995b57eaf941983c7ad7a4 -8139e5dd9cf405e8ef65f11164f0440827d98389ce1b418b0c9628be983a9ddd6cf4863036ccb1483b40b8a527acd9ed -88b15fa94a08eac291d2b94a2b30eb851ff24addf2cc30b678e72e32cfcb3424cf4b33aa395d741803f3e578ddf524de -b5eaf0c8506e101f1646bcf049ee38d99ea1c60169730da893fd6020fd00a289eb2f415947e44677af49e43454a7b1be -8489822ad0647a7e06aa2aa5595960811858ddd4542acca419dd2308a8c5477648f4dd969a6740bb78aa26db9bfcc555 -b1e9a7b9f3423c220330d45f69e45fa03d7671897cf077f913c252e3e99c7b1b1cf6d30caad65e4228d5d7b80eb86e5e -b28fe9629592b9e6a55a1406903be76250b1c50c65296c10c5e48c64b539fb08fe11f68cf462a6edcbba71b0cee3feb2 -a41acf96a02c96cd8744ff6577c244fc923810d17ade133587e4c223beb7b4d99fa56eae311a500d7151979267d0895c -880798938fe4ba70721be90e666dfb62fcab4f3556fdb7b0dc8ec5bc34f6b4513df965eae78527136eb391889fe2caf9 -98d4d89d358e0fb7e212498c73447d94a83c1b66e98fc81427ab13acddb17a20f52308983f3a5a8e0aaacec432359604 -81430b6d2998fc78ba937a1639c6020199c52da499f68109da227882dc26d005b73d54c5bdcac1a04e8356a8ca0f7017 -a8d906a4786455eb74613aba4ce1c963c60095ffb8658d368df9266fdd01e30269ce10bf984e7465f34b4fd83beba26a -af54167ac1f954d10131d44a8e0045df00d581dd9e93596a28d157543fbe5fb25d213806ed7fb3cba6b8f5b5423562db -8511e373a978a12d81266b9afbd55035d7bc736835cfa921903a92969eeba3624437d1346b55382e61415726ab84a448 -8cf43eea93508ae586fa9a0f1354a1e16af659782479c2040874a46317f9e8d572a23238efa318fdfb87cc63932602b7 -b0bdd3bacff077173d302e3a9678d1d37936188c7ecc34950185af6b462b7c679815176f3cce5db19aac8b282f2d60ad -a355e9b87f2f2672052f5d4d65b8c1c827d24d89b0d8594641fccfb69aef1b94009105f3242058bb31c8bf51caae5a41 -b8baa9e4b950b72ff6b88a6509e8ed1304bc6fd955748b2e59a523a1e0c5e99f52aec3da7fa9ff407a7adf259652466c -840bc3dbb300ea6f27d1d6dd861f15680bd098be5174f45d6b75b094d0635aced539fa03ddbccb453879de77fb5d1fe9 -b4bc7e7e30686303856472bae07e581a0c0bfc815657c479f9f5931cff208d5c12930d2fd1ff413ebd8424bcd7a9b571 -89b5d514155d7999408334a50822508b9d689add55d44a240ff2bdde2eee419d117031f85e924e2a2c1ca77db9b91eea -a8604b6196f87a04e1350302e8aa745bba8dc162115d22657b37a1d1a98cb14876ddf7f65840b5dbd77e80cd22b4256c -83cb7acdb9e03247515bb2ce0227486ccf803426717a14510f0d59d45e998b245797d356f10abca94f7a14e1a2f0d552 -aeb3266a9f16649210ab2df0e1908ac259f34ce1f01162c22b56cf1019096ee4ea5854c36e30bb2feb06c21a71e8a45c -89e72e86edf2aa032a0fc9acf4d876a40865fbb2c8f87cb7e4d88856295c4ac14583e874142fd0c314a49aba68c0aa3c -8c3576eba0583c2a7884976b4ed11fe1fda4f6c32f6385d96c47b0e776afa287503b397fa516a455b4b8c3afeedc76db -a31e5b633bda9ffa174654fee98b5d5930a691c3c42fcf55673d927dbc8d91c58c4e42e615353145431baa646e8bbb30 -89f2f3f7a8da1544f24682f41c68114a8f78c86bd36b066e27da13acb70f18d9f548773a16bd8e24789420e17183f137 -ada27fa4e90a086240c9164544d2528621a415a5497badb79f8019dc3dce4d12eb6b599597e47ec6ac39c81efda43520 -90dc1eb21bf21c0187f359566fc4bf5386abea52799306a0e5a1151c0817c5f5bc60c86e76b1929c092c0f3ff48cedd2 -b702a53ebcc17ae35d2e735a347d2c700e9cbef8eadbece33cac83df483b2054c126593e1f462cfc00a3ce9d737e2af5 -9891b06455ec925a6f8eafffba05af6a38cc5e193acaaf74ffbf199df912c5197106c5e06d72942bbb032ce277b6417f -8c0ee71eb01197b019275bcf96cae94e81d2cdc3115dbf2d8e3080074260318bc9303597e8f72b18f965ad601d31ec43 -8aaf580aaf75c1b7a5f99ccf60503506e62058ef43b28b02f79b8536a96be3f019c9f71caf327b4e6730134730d1bef5 -ae6f9fc21dd7dfa672b25a87eb0a41644f7609fab5026d5cedb6e43a06dbbfd6d6e30322a2598c8dedde88c52eaed626 -8159b953ffece5693edadb2e906ebf76ff080ee1ad22698950d2d3bfc36ac5ea78f58284b2ca180664452d55bd54716c -ab7647c32ca5e9856ac283a2f86768d68de75ceeba9e58b74c5324f8298319e52183739aba4340be901699d66ac9eb3f -a4d85a5701d89bcfaf1572db83258d86a1a0717603d6f24ac2963ffcf80f1265e5ab376a4529ca504f4396498791253c -816080c0cdbfe61b4d726c305747a9eb58ac26d9a35f501dd32ba43c098082d20faf3ccd41aad24600aa73bfa453dfac -84f3afac024f576b0fd9acc6f2349c2fcefc3f77dbe5a2d4964d14b861b88e9b1810334b908cf3427d9b67a8aee74b18 -94b390655557b1a09110018e9b5a14490681ade275bdc83510b6465a1218465260d9a7e2a6e4ec700f58c31dc3659962 -a8c66826b1c04a2dd4c682543242e7a57acae37278bd09888a3d17747c5b5fec43548101e6f46d703638337e2fd3277b -86e6f4608a00007fa533c36a5b054c5768ccafe41ad52521d772dcae4c8a4bcaff8f7609be30d8fab62c5988cbbb6830 -837da4cf09ae8aa0bceb16f8b3bfcc3b3367aecac9eed6b4b56d7b65f55981ef066490764fb4c108792623ecf8cad383 -941ff3011462f9b5bf97d8cbdb0b6f5d37a1b1295b622f5485b7d69f2cb2bcabc83630dae427f0259d0d9539a77d8424 -b99e5d6d82aa9cf7d5970e7f710f4039ac32c2077530e4c2779250c6b9b373bc380adb0a03b892b652f649720672fc8c -a791c78464b2d65a15440b699e1e30ebd08501d6f2720adbc8255d989a82fcded2f79819b5f8f201bed84a255211b141 -84af7ad4a0e31fcbb3276ab1ad6171429cf39adcf78dc03750dc5deaa46536d15591e26d53e953dfb31e1622bc0743ab -a833e62fe97e1086fae1d4917fbaf09c345feb6bf1975b5cb863d8b66e8d621c7989ab3dbecda36bc9eaffc5eaa6fa66 -b4ef79a46a2126f53e2ebe62770feb57fd94600be29459d70a77c5e9cc260fa892be06cd60f886bf48459e48eb50d063 -b43b8f61919ea380bf151c294e54d3a3ff98e20d1ee5efbfe38aa2b66fafbc6a49739793bd5cb1c809f8b30466277c3a -ab37735af2412d2550e62df9d8b3b5e6f467f20de3890bf56faf1abf2bf3bd1d98dc3fa0ad5e7ab3fce0fa20409eb392 -82416b74b1551d484250d85bb151fabb67e29cce93d516125533df585bc80779ab057ea6992801a3d7d5c6dcff87a018 -8145d0787f0e3b5325190ae10c1d6bee713e6765fb6a0e9214132c6f78f4582bb2771aaeae40d3dad4bafb56bf7e36d8 -b6935886349ecbdd5774e12196f4275c97ec8279fdf28ccf940f6a022ebb6de8e97d6d2173c3fe402cbe9643bed3883b -87ef9b4d3dc71ac86369f8ed17e0dd3b91d16d14ae694bc21a35b5ae37211b043d0e36d8ff07dcc513fb9e6481a1f37f -ae1d0ded32f7e6f1dc8fef495879c1d9e01826f449f903c1e5034aeeabc5479a9e323b162b688317d46d35a42d570d86 -a40d16497004db4104c6794e2f4428d75bdf70352685944f3fbe17526df333e46a4ca6de55a4a48c02ecf0bde8ba03c0 -8d45121efba8cc308a498e8ee39ea6fa5cae9fb2e4aab1c2ff9d448aa8494ccbec9a078f978a86fcd97b5d5e7be7522a -a8173865c64634ba4ac2fa432740f5c05056a9deaf6427cb9b4b8da94ca5ddbc8c0c5d3185a89b8b28878194de9cdfcd -b6ec06a74d690f6545f0f0efba236e63d1fdfba54639ca2617408e185177ece28901c457d02b849fd00f1a53ae319d0a -b69a12df293c014a40070e3e760169b6f3c627caf9e50b35a93f11ecf8df98b2bc481b410eecb7ab210bf213bbe944de -97e7dc121795a533d4224803e591eef3e9008bab16f12472210b73aaf77890cf6e3877e0139403a0d3003c12c8f45636 -acdfa6fdd4a5acb7738cc8768f7cba84dbb95c639399b291ae8e4e63df37d2d4096900a84d2f0606bf534a9ccaa4993f -86ee253f3a9446a33e4d1169719b7d513c6b50730988415382faaf751988c10a421020609f7bcdef91be136704b906e2 -aac9438382a856caf84c5a8a234282f71b5fc5f65219103b147e7e6cf565522285fbfd7417b513bdad8277a00f652ca1 -83f3799d8e5772527930f5dc071a2e0a65471618993ec8990a96ccdeee65270e490bda9d26bb877612475268711ffd80 -93f28a81ac8c0ec9450b9d762fae9c7f8feaace87a6ee6bd141ef1d2d0697ef1bbd159fe6e1de640dbdab2b0361fca8a -a0825c95ba69999b90eac3a31a3fd830ea4f4b2b7409bde5f202b61d741d6326852ce790f41de5cb0eccec7af4db30c1 -83924b0e66233edd603c3b813d698daa05751fc34367120e3cf384ea7432e256ccee4d4daf13858950549d75a377107d -956fd9fa58345277e06ba2ec72f49ed230b8d3d4ff658555c52d6cddeb84dd4e36f1a614f5242d5ca0192e8daf0543c2 -944869912476baae0b114cced4ff65c0e4c90136f73ece5656460626599051b78802df67d7201c55d52725a97f5f29fe -865cb25b64b4531fb6fe4814d7c8cd26b017a6c6b72232ff53defc18a80fe3b39511b23f9e4c6c7249d06e03b2282ed2 -81e09ff55214960775e1e7f2758b9a6c4e4cd39edf7ec1adfaad51c52141182b79fe2176b23ddc7df9fd153e5f82d668 -b31006896f02bc90641121083f43c3172b1039334501fbaf1672f7bf5d174ddd185f945adf1a9c6cf77be34c5501483d -88b92f6f42ae45e9f05b16e52852826e933efd0c68b0f2418ac90957fd018df661bc47c8d43c2a7d7bfcf669dab98c3c -92fc68f595853ee8683930751789b799f397135d002eda244fe63ecef2754e15849edde3ba2f0cc8b865c9777230b712 -99ca06a49c5cd0bb097c447793fcdd809869b216a34c66c78c7e41e8c22f05d09168d46b8b1f3390db9452d91bc96dea -b48b9490a5d65296802431852d548d81047bbefc74fa7dc1d4e2a2878faacdfcb365ae59209cb0ade01901a283cbd15d -aff0fdbef7c188b120a02bc9085d7b808e88f73973773fef54707bf2cd772cd066740b1b6f4127b5c349f657bd97e738 -966fd4463b4f43dd8ccba7ad50baa42292f9f8b2e70da23bb6780e14155d9346e275ef03ddaf79e47020dcf43f3738bd -9330c3e1fadd9e08ac85f4839121ae20bbeb0a5103d84fa5aadbd1213805bdcda67bf2fb75fc301349cbc851b5559d20 -993bb99867bd9041a71a55ad5d397755cfa7ab6a4618fc526179bfc10b7dc8b26e4372fe9a9b4a15d64f2b63c1052dda -a29b59bcfab51f9b3c490a3b96f0bf1934265c315349b236012adbd64a56d7f6941b2c8cc272b412044bc7731f71e1dc -a65c9cefe1fc35d089fe8580c2e7671ebefdb43014ac291528ff4deefd4883fd4df274af83711dad610dad0d615f9d65 -944c78c56fb227ae632805d448ca3884cd3d2a89181cead3d2b7835e63297e6d740aa79a112edb1d4727824991636df5 -a73d782da1db7e4e65d7b26717a76e16dd9fab4df65063310b8e917dc0bc24e0d6755df5546c58504d04d9e68c3b474a -af80f0b87811ae3124f68108b4ca1937009403f87928bbc53480e7c5408d072053ace5eeaf5a5aba814dab8a45502085 -88aaf1acfc6e2e19b8387c97da707cb171c69812fefdd4650468e9b2c627bd5ccfb459f4d8e56bdfd84b09ddf87e128f -92c97276ff6f72bab6e9423d02ad6dc127962dbce15a0dd1e4a393b4510c555df6aa27be0f697c0d847033a9ca8b8dfd -a0e07d43d96e2d85b6276b3c60aadb48f0aedf2de8c415756dc597249ea64d2093731d8735231dadc961e5682ac59479 -adc9e6718a8f9298957d1da3842a7751c5399bbdf56f8de6c1c4bc39428f4aee6f1ba6613d37bf46b9403345e9d6fc81 -951da434da4b20d949b509ceeba02e24da7ed2da964c2fcdf426ec787779c696b385822c7dbea4df3e4a35921f1e912c -a04cbce0d2b2e87bbf038c798a12ec828423ca6aca08dc8d481cf6466e3c9c73d4d4a7fa47df9a7e2e15aae9e9f67208 -8f855cca2e440d248121c0469de1f94c2a71b8ee2682bbad3a78243a9e03da31d1925e6760dbc48a1957e040fae9abe8 -b642e5b17c1df4a4e101772d73851180b3a92e9e8b26c918050f51e6dd3592f102d20b0a1e96f0e25752c292f4c903ff -a92454c300781f8ae1766dbbb50a96192da7d48ef4cbdd72dd8cbb44c6eb5913c112cc38e9144615fdc03684deb99420 -8b74f7e6c2304f8e780df4649ef8221795dfe85fdbdaa477a1542d135b75c8be45bf89adbbb6f3ddf54ca40f02e733e9 -85cf66292cbb30cec5fd835ab10c9fcb3aea95e093aebf123e9a83c26f322d76ebc89c4e914524f6c5f6ee7d74fc917d -ae0bfe0cdc97c09542a7431820015f2d16067b30dca56288013876025e81daa8c519e5e347268e19aa1a85fa1dc28793 -921322fc6a47dc091afa0ad6df18ed14cde38e48c6e71550aa513918b056044983aee402de21051235eecf4ce8040fbe -96c030381e97050a45a318d307dcb3c8377b79b4dd5daf6337cded114de26eb725c14171b9b8e1b3c08fe1f5ea6b49e0 -90c23b86b6111818c8baaf53a13eaee1c89203b50e7f9a994bf0edf851919b48edbac7ceef14ac9414cf70c486174a77 -8bf6c301240d2d1c8d84c71d33a6dfc6d9e8f1cfae66d4d0f7a256d98ae12b0bcebfa94a667735ee89f810bcd7170cff -a41a4ffbbea0e36874d65c009ee4c3feffff322f6fc0e30d26ee4dbc1f46040d05e25d9d0ecb378cef0d24a7c2c4b850 -a8d4cdd423986bb392a0a92c12a8bd4da3437eec6ef6af34cf5310944899287452a2eb92eb5386086d5063381189d10e -a81dd26ec057c4032a4ed7ad54d926165273ed51d09a1267b2e477535cf6966835a257c209e4e92d165d74fa75695fa3 -8d7f708c3ee8449515d94fc26b547303b53d8dd55f177bc3b25d3da2768accd9bc8e9f09546090ebb7f15c66e6c9c723 -839ba65cffcd24cfffa7ab3b21faabe3c66d4c06324f07b2729c92f15cad34e474b0f0ddb16cd652870b26a756b731d3 -87f1a3968afec354d92d77e2726b702847c6afcabb8438634f9c6f7766de4c1504317dc4fa9a4a735acdbf985e119564 -91a8a7fd6542f3e0673f07f510d850864b34ac087eb7eef8845a1d14b2b1b651cbdc27fa4049bdbf3fea54221c5c8549 -aef3cf5f5e3a2385ead115728d7059e622146c3457d266c612e778324b6e06fbfb8f98e076624d2f3ce1035d65389a07 -819915d6232e95ccd7693fdd78d00492299b1983bc8f96a08dcb50f9c0a813ed93ae53c0238345d5bea0beda2855a913 -8e9ba68ded0e94935131b392b28218315a185f63bf5e3c1a9a9dd470944509ca0ba8f6122265f8da851b5cc2abce68f1 -b28468e9b04ee9d69003399a3cf4457c9bf9d59f36ab6ceeb8e964672433d06b58beeea198fedc7edbaa1948577e9fa2 -a633005e2c9f2fd94c8bce2dd5bb708fe946b25f1ec561ae65e54e15cdd88dc339f1a083e01f0d39610c8fe24151aaf0 -841d0031e22723f9328dd993805abd13e0c99b0f59435d2426246996b08d00ce73ab906f66c4eab423473b409e972ce0 -85758d1b084263992070ec8943f33073a2d9b86a8606672550c17545507a5b3c88d87382b41916a87ee96ff55a7aa535 -8581b06b0fc41466ef94a76a1d9fb8ae0edca6d018063acf6a8ca5f4b02d76021902feba58972415691b4bdbc33ae3b4 -83539597ff5e327357ee62bc6bf8c0bcaec2f227c55c7c385a4806f0d37fb461f1690bad5066b8a5370950af32fafbef -aee3557290d2dc10827e4791d00e0259006911f3f3fce4179ed3c514b779160613eca70f720bff7804752715a1266ffa -b48d2f0c4e90fc307d5995464e3f611a9b0ef5fe426a289071f4168ed5cc4f8770c9332960c2ca5c8c427f40e6bb389f -847af8973b4e300bb06be69b71b96183fd1a0b9d51b91701bef6fcfde465068f1eb2b1503b07afda380f18d69de5c9e1 -a70a6a80ce407f07804c0051ac21dc24d794b387be94eb24e1db94b58a78e1bcfb48cd0006db8fc1f9bedaece7a44fbe -b40e942b8fa5336910ff0098347df716bff9d1fa236a1950c16eeb966b3bc1a50b8f7b0980469d42e75ae13ced53cead -b208fabaa742d7db3148515330eb7a3577487845abdb7bd9ed169d0e081db0a5816595c33d375e56aeac5b51e60e49d3 -b7c8194b30d3d6ef5ab66ec88ad7ebbc732a3b8a41731b153e6f63759a93f3f4a537eab9ad369705bd730184bdbbdc34 -9280096445fe7394d04aa1bc4620c8f9296e991cc4d6c131bd703cb1cc317510e6e5855ac763f4d958c5edfe7eebeed7 -abc2aa4616a521400af1a12440dc544e3c821313d0ab936c86af28468ef8bbe534837e364598396a81cf8d06274ed5a6 -b18ca8a3325adb0c8c18a666d4859535397a1c3fe08f95eebfac916a7a99bbd40b3c37b919e8a8ae91da38bc00fa56c0 -8a40c33109ecea2a8b3558565877082f79121a432c45ec2c5a5e0ec4d1c203a6788e6b69cb37f1fd5b8c9a661bc5476d -88c47301dd30998e903c84e0b0f2c9af2e1ce6b9f187dab03528d44f834dc991e4c86d0c474a2c63468cf4020a1e24a0 -920c832853e6ab4c851eecfa9c11d3acc7da37c823be7aa1ab15e14dfd8beb5d0b91d62a30cec94763bd8e4594b66600 -98e1addbe2a6b8edc7f12ecb9be81c3250aeeca54a1c6a7225772ca66549827c15f3950d01b8eb44aecb56fe0fff901a -8cfb0fa1068be0ec088402f5950c4679a2eb9218c729da67050b0d1b2d7079f3ddf4bf0f57d95fe2a8db04bc6bcdb20c -b70f381aafe336b024120453813aeab70baac85b9c4c0f86918797b6aee206e6ed93244a49950f3d8ec9f81f4ac15808 -a4c8edf4aa33b709a91e1062939512419711c1757084e46f8f4b7ed64f8e682f4e78b7135920c12f0eb0422fe9f87a6a -b4817e85fd0752d7ebb662d3a51a03367a84bac74ebddfba0e5af5e636a979500f72b148052d333b3dedf9edd2b4031b -a87430169c6195f5d3e314ff2d1c2f050e766fd5d2de88f5207d72dba4a7745bb86d0baca6e9ae156582d0d89e5838c7 -991b00f8b104566b63a12af4826b61ce7aa40f4e5b8fff3085e7a99815bdb4471b6214da1e480214fac83f86a0b93cc5 -b39966e3076482079de0678477df98578377a094054960ee518ef99504d6851f8bcd3203e8da5e1d4f6f96776e1fe6eb -a448846d9dc2ab7a0995fa44b8527e27f6b3b74c6e03e95edb64e6baa4f1b866103f0addb97c84bef1d72487b2e21796 -894bec21a453ae84b592286e696c35bc30e820e9c2fd3e63dd4fbe629e07df16439c891056070faa490155f255bf7187 -a9ec652a491b11f6a692064e955f3f3287e7d2764527e58938571469a1e29b5225b9415bd602a45074dfbfe9c131d6ca -b39d37822e6cbe28244b5f42ce467c65a23765bd16eb6447c5b3e942278069793763483dafd8c4dd864f8917aad357fe -88dba51133f2019cb266641c56101e3e5987d3b77647a2e608b5ff9113dfc5f85e2b7c365118723131fbc0c9ca833c9c -b566579d904b54ecf798018efcb824dccbebfc6753a0fd2128ac3b4bd3b038c2284a7c782b5ca6f310eb7ea4d26a3f0a -a97a55c0a492e53c047e7d6f9d5f3e86fb96f3dddc68389c0561515343b66b4bc02a9c0d5722dff1e3445308240b27f7 -a044028ab4bcb9e1a2b9b4ca4efbf04c5da9e4bf2fff0e8bd57aa1fc12a71e897999c25d9117413faf2f45395dee0f13 -a78dc461decbeaeed8ebd0909369b491a5e764d6a5645a7dac61d3140d7dc0062526f777b0eb866bff27608429ebbdde -b2c2a8991f94c39ca35fea59f01a92cb3393e0eccb2476dfbf57261d406a68bd34a6cff33ed80209991688c183609ef4 -84189eefb521aff730a4fd3fd5b10ddfd29f0d365664caef63bb015d07e689989e54c33c2141dd64427805d37a7e546e -85ac80bd734a52235da288ff042dea9a62e085928954e8eacd2c751013f61904ed110e5b3afe1ab770a7e6485efb7b5e -9183a560393dcb22d0d5063e71182020d0fbabb39e32493eeffeb808df084aa243eb397027f150b55a247d1ed0c8513e -81c940944df7ecc58d3c43c34996852c3c7915ed185d7654627f7af62abae7e0048dd444a6c09961756455000bd96d09 -aa8c34e164019743fd8284b84f06c3b449aae7996e892f419ee55d82ad548cb300fd651de329da0384243954c0ef6a60 -89a7b7bdfc7e300d06a14d463e573d6296d8e66197491900cc9ae49504c4809ff6e61b758579e9091c61085ba1237b83 -878d21809ba540f50bd11f4c4d9590fb6f3ab9de5692606e6e2ef4ed9d18520119e385be5e1f4b3f2e2b09c319f0e8fc -8eb248390193189cf0355365e630b782cd15751e672dc478b39d75dc681234dcd9309df0d11f4610dbb249c1e6be7ef9 -a1d7fb3aecb896df3a52d6bd0943838b13f1bd039c936d76d03de2044c371d48865694b6f532393b27fd10a4cf642061 -a34bca58a24979be442238cbb5ece5bee51ae8c0794dd3efb3983d4db713bc6f28a96e976ac3bd9a551d3ed9ba6b3e22 -817c608fc8cacdd178665320b5a7587ca21df8bdd761833c3018b967575d25e3951cf3d498a63619a3cd2ad4406f5f28 -86c95707db0495689afd0c2e39e97f445f7ca0edffad5c8b4cacd1421f2f3cc55049dfd504f728f91534e20383955582 -99c3b0bb15942c301137765d4e19502f65806f3b126dc01a5b7820c87e8979bce6a37289a8f6a4c1e4637227ad5bf3bf -8aa1518a80ea8b074505a9b3f96829f5d4afa55a30efe7b4de4e5dbf666897fdd2cf31728ca45921e21a78a80f0e0f10 -8d74f46361c79e15128ac399e958a91067ef4cec8983408775a87eca1eed5b7dcbf0ddf30e66f51780457413496c7f07 -a41cde4a786b55387458a1db95171aca4fd146507b81c4da1e6d6e495527c3ec83fc42fad1dfe3d92744084a664fd431 -8c352852c906fae99413a84ad11701f93f292fbf7bd14738814f4c4ceab32db02feb5eb70bc73898b0bc724a39d5d017 -a5993046e8f23b71ba87b7caa7ace2d9023fb48ce4c51838813174880d918e9b4d2b0dc21a2b9c6f612338c31a289df8 -83576d3324bf2d8afbfb6eaecdc5d767c8e22e7d25160414924f0645491df60541948a05e1f4202e612368e78675de8a -b43749b8df4b15bc9a3697e0f1c518e6b04114171739ef1a0c9c65185d8ec18e40e6954d125cbc14ebc652cf41ad3109 -b4eebd5d80a7327a040cafb9ccdb12b2dfe1aa86e6bc6d3ac8a57fadfb95a5b1a7332c66318ff72ba459f525668af056 -9198be7f1d413c5029b0e1c617bcbc082d21abe2c60ec8ce9b54ca1a85d3dba637b72fda39dae0c0ae40d047eab9f55a -8d96a0232832e24d45092653e781e7a9c9520766c3989e67bbe86b3a820c4bf621ea911e7cd5270a4bfea78b618411f6 -8d7160d0ea98161a2d14d46ef01dff72d566c330cd4fabd27654d300e1bc7644c68dc8eabf2a20a59bfe7ba276545f9b -abb60fce29dec7ba37e3056e412e0ec3e05538a1fc0e2c68877378c867605966108bc5742585ab6a405ce0c962b285b6 -8fabffa3ed792f05e414f5839386f6449fd9f7b41a47595c5d71074bd1bb3784cc7a1a7e1ad6b041b455035957e5b2dc -90ff017b4804c2d0533b72461436b10603ab13a55f86fd4ec11b06a70ef8166f958c110519ca1b4cc7beba440729fe2d -b340cfd120f6a4623e3a74cf8c32bfd7cd61a280b59dfd17b15ca8fae4d82f64a6f15fbde4c02f424debc72b7db5fe67 -871311c9c7220c932e738d59f0ecc67a34356d1429fe570ca503d340c9996cb5ee2cd188fad0e3bd16e4c468ec1dbebd -a772470262186e7b94239ba921b29f2412c148d6f97c4412e96d21e55f3be73f992f1ad53c71008f0558ec3f84e2b5a7 -b2a897dcb7ffd6257f3f2947ec966f2077d57d5191a88840b1d4f67effebe8c436641be85524d0a21be734c63ab5965d -a044f6eacc48a4a061fa149500d96b48cbf14853469aa4d045faf3dca973be1bd4b4ce01646d83e2f24f7c486d03205d -981af5dc2daa73f7fa9eae35a93d81eb6edba4a7f673b55d41f6ecd87a37685d31bb40ef4f1c469b3d72f2f18b925a17 -912d2597a07864de9020ac77083eff2f15ceb07600f15755aba61251e8ce3c905a758453b417f04d9c38db040954eb65 -9642b7f6f09394ba5e0805734ef6702c3eddf9eea187ba98c676d5bbaec0e360e3e51dc58433aaa1e2da6060c8659cb7 -8ab3836e0a8ac492d5e707d056310c4c8e0489ca85eb771bff35ba1d658360084e836a6f51bb990f9e3d2d9aeb18fbb5 -879e058e72b73bb1f4642c21ffdb90544b846868139c6511f299aafe59c2d0f0b944dffc7990491b7c4edcd6a9889250 -b9e60b737023f61479a4a8fd253ed0d2a944ea6ba0439bbc0a0d3abf09b0ad1f18d75555e4a50405470ae4990626f390 -b9c2535d362796dcd673640a9fa2ebdaec274e6f8b850b023153b0a7a30fffc87f96e0b72696f647ebe7ab63099a6963 -94aeff145386a087b0e91e68a84a5ede01f978f9dd9fe7bebca78941938469495dc30a96bba9508c0d017873aeea9610 -98b179f8a3d9f0d0a983c30682dd425a2ddc7803be59bd626c623c8951a5179117d1d2a68254c95c9952989877d0ee55 -889ecf5f0ee56938273f74eb3e9ecfb5617f04fb58e83fe4c0e4aef51615cf345bc56f3f61b17f6eed3249d4afd54451 -a0f2b2c39bcea4b50883e2587d16559e246248a66ecb4a4b7d9ab3b51fb39fe98d83765e087eee37a0f86b0ba4144c02 -b2a61e247ed595e8a3830f7973b07079cbda510f28ad8c78c220b26cb6acde4fbb5ee90c14a665f329168ee951b08cf0 -95bd0fcfb42f0d6d8a8e73d7458498a85bcddd2fb132fd7989265648d82ac2707d6d203fac045504977af4f0a2aca4b7 -843e5a537c298666e6cf50fcc044f13506499ef83c802e719ff2c90e85003c132024e04711be7234c04d4b0125512d5d -a46d1797c5959dcd3a5cfc857488f4d96f74277c3d13b98b133620192f79944abcb3a361d939a100187f1b0856eae875 -a1c7786736d6707a48515c38660615fcec67eb8a2598f46657855215f804fd72ab122d17f94fcffad8893f3be658dca7 -b23dc9e610abc7d8bd21d147e22509a0fa49db5be6ea7057b51aae38e31654b3aa044df05b94b718153361371ba2f622 -b00cc8f257d659c22d30e6d641f79166b1e752ea8606f558e4cad6fc01532e8319ea4ee12265ba4140ac45aa4613c004 -ac7019af65221b0cc736287b32d7f1a3561405715ba9a6a122342e04e51637ba911c41573de53e4781f2230fdcb2475f -81a630bc41b3da8b3eb4bf56cba10cd9f93153c3667f009dc332287baeb707d505fb537e6233c8e53d299ec0f013290c -a6b7aea5c545bb76df0f230548539db92bc26642572cb7dd3d5a30edca2b4c386f44fc8466f056b42de2a452b81aff5b -8271624ff736b7b238e43943c81de80a1612207d32036d820c11fc830c737972ccc9c60d3c2359922b06652311e3c994 -8a684106458cb6f4db478170b9ad595d4b54c18bf63b9058f095a2fa1b928c15101472c70c648873d5887880059ed402 -a5cc3c35228122f410184e4326cf61a37637206e589fcd245cb5d0cec91031f8f7586b80503070840fdfd8ce75d3c88b -9443fc631aed8866a7ed220890911057a1f56b0afe0ba15f0a0e295ab97f604b134b1ed9a4245e46ee5f9a93aa74f731 -984b6f7d79835dffde9558c6bb912d992ca1180a2361757bdba4a7b69dc74b056e303adc69fe67414495dd9c2dd91e64 -b15a5c8cba5de080224c274d31c68ed72d2a7126d347796569aef0c4e97ed084afe3da4d4b590b9dda1a07f0c2ff3dfb -991708fe9650a1f9a4e43938b91d45dc68c230e05ee999c95dbff3bf79b1c1b2bb0e7977de454237c355a73b8438b1d9 -b4f7edc7468b176a4a7c0273700c444fa95c726af6697028bed4f77eee887e3400f9c42ee15b782c0ca861c4c3b8c98a -8c60dcc16c51087eb477c13e837031d6c6a3dc2b8bf8cb43c23f48006bc7173151807e866ead2234b460c2de93b31956 -83ad63e9c910d1fc44bc114accfb0d4d333b7ebe032f73f62d25d3e172c029d5e34a1c9d547273bf6c0fead5c8801007 -85de73213cc236f00777560756bdbf2b16841ba4b55902cf2cad9742ecaf5d28209b012ceb41f337456dfeca93010cd7 -a7561f8827ccd75b6686ba5398bb8fc3083351c55a589b18984e186820af7e275af04bcd4c28e1dc11be1e8617a0610b -88c0a4febd4068850557f497ea888035c7fc9f404f6cc7794e7cc8722f048ad2f249e7dc62743e7a339eb7473ad3b0cd -932b22b1d3e6d5a6409c34980d176feb85ada1bf94332ef5c9fc4d42b907dabea608ceef9b5595ef3feee195151f18d8 -a2867bb3f5ab88fbdae3a16c9143ab8a8f4f476a2643c505bb9f37e5b1fd34d216cab2204c9a017a5a67b7ad2dda10e8 -b573d5f38e4e9e8a3a6fd82f0880dc049efa492a946d00283019bf1d5e5516464cf87039e80aef667cb86fdea5075904 -b948f1b5ab755f3f5f36af27d94f503b070696d793b1240c1bdfd2e8e56890d69e6904688b5f8ff5a4bdf5a6abfe195f -917eae95ebc4109a2e99ddd8fec7881d2f7aaa0e25fda44dec7ce37458c2ee832f1829db7d2dcfa4ca0f06381c7fe91d -95751d17ed00a3030bce909333799bb7f4ab641acf585807f355b51d6976dceee410798026a1a004ef4dcdff7ec0f5b8 -b9b7bd266f449a79bbfe075e429613e76c5a42ac61f01c8f0bbbd34669650682efe01ff9dbbc400a1e995616af6aa278 -ac1722d097ce9cd7617161f8ec8c23d68f1fb1c9ca533e2a8b4f78516c2fd8fb38f23f834e2b9a03bb06a9d655693ca9 -a7ad9e96ffd98db2ecdb6340c5d592614f3c159abfd832fe27ee9293519d213a578e6246aae51672ee353e3296858873 -989b8814d5de7937c4acafd000eec2b4cd58ba395d7b25f98cafd021e8efa37029b29ad8303a1f6867923f5852a220eb -a5bfe6282c771bc9e453e964042d44eff4098decacb89aecd3be662ea5b74506e1357ab26f3527110ba377711f3c9f41 -8900a7470b656639721d2abbb7b06af0ac4222ab85a1976386e2a62eb4b88bfb5b72cf7921ddb3cf3a395d7eeb192a2e -95a71b55cd1f35a438cf5e75f8ff11c5ec6a2ebf2e4dba172f50bfad7d6d5dca5de1b1afc541662c81c858f7604c1163 -82b5d62fea8db8d85c5bc3a76d68dedd25794cf14d4a7bc368938ffca9e09f7e598fdad2a5aac614e0e52f8112ae62b9 -997173f07c729202afcde3028fa7f52cefc90fda2d0c8ac2b58154a5073140683e54c49ed1f254481070d119ce0ce02a -aeffb91ccc7a72bbd6ffe0f9b99c9e66e67d59cec2e02440465e9636a613ab3017278cfa72ea8bc4aba9a8dc728cb367 -952743b06e8645894aeb6440fc7a5f62dd3acf96dab70a51e20176762c9751ea5f2ba0b9497ccf0114dc4892dc606031 -874c63baeddc56fbbca2ff6031f8634b745f6e34ea6791d7c439201aee8f08ef5ee75f7778700a647f3b21068513fce6 -85128fec9c750c1071edfb15586435cc2f317e3e9a175bb8a9697bcda1eb9375478cf25d01e7fed113483b28f625122d -85522c9576fd9763e32af8495ae3928ed7116fb70d4378448926bc9790e8a8d08f98cf47648d7da1b6e40d6a210c7924 -97d0f37a13cfb723b848099ca1c14d83e9aaf2f7aeb71829180e664b7968632a08f6a85f557d74b55afe6242f2a36e7c -abaa472d6ad61a5fccd1a57c01aa1bc081253f95abbcba7f73923f1f11c4e79b904263890eeb66926de3e2652f5d1c70 -b3c04945ba727a141e5e8aec2bf9aa3772b64d8fd0e2a2b07f3a91106a95cbcb249adcd074cbe498caf76fffac20d4ef -82c46781a3d730d9931bcabd7434a9171372dde57171b6180e5516d4e68db8b23495c8ac3ab96994c17ddb1cf249b9fb -a202d8b65613c42d01738ccd68ed8c2dbc021631f602d53f751966e04182743ebc8e0747d600b8a8676b1da9ae7f11ab -ae73e7256e9459db04667a899e0d3ea5255211fb486d084e6550b6dd64ca44af6c6b2d59d7aa152de9f96ce9b58d940d -b67d87b176a9722945ec7593777ee461809861c6cfd1b945dde9ee4ff009ca4f19cf88f4bbb5c80c9cbab2fe25b23ac8 -8f0b7a317a076758b0dac79959ee4a06c08b07d0f10538a4b53d3da2eda16e2af26922feb32c090330dc4d969cf69bd3 -90b36bf56adbd8c4b6cb32febc3a8d5f714370c2ac3305c10fa6d168dffb2a026804517215f9a2d4ec8310cdb6bb459b -aa80c19b0682ead69934bf18cf476291a0beddd8ef4ed75975d0a472e2ab5c70f119722a8574ae4973aceb733d312e57 -a3fc9abb12574e5c28dcb51750b4339b794b8e558675eef7d26126edf1de920c35e992333bcbffcbf6a5f5c0d383ce62 -a1573ff23ab972acdcd08818853b111fc757fdd35aa070186d3e11e56b172fb49d840bf297ac0dd222e072fc09f26a81 -98306f2be4caa92c2b4392212d0cbf430b409b19ff7d5b899986613bd0e762c909fc01999aa94be3bd529d67f0113d7f -8c1fc42482a0819074241746d17dc89c0304a2acdae8ed91b5009e9e3e70ff725ba063b4a3e68fdce05b74f5180c545e -a6c6113ebf72d8cf3163b2b8d7f3fa24303b13f55752522c660a98cd834d85d8c79214d900fa649499365e2e7641f77a -ab95eea424f8a2cfd9fb1c78bb724e5b1d71a0d0d1e4217c5d0f98b0d8bbd3f8400a2002abc0a0e4576d1f93f46fefad -823c5a4fd8cf4a75fdc71d5f2dd511b6c0f189b82affeacd2b7cfcad8ad1a5551227dcc9bfdb2e34b2097eaa00efbb51 -b97314dfff36d80c46b53d87a61b0e124dc94018a0bb680c32765b9a2d457f833a7c42bbc90b3b1520c33a182580398d -b17566ee3dcc6bb3b004afe4c0136dfe7dd27df9045ae896dca49fb36987501ae069eb745af81ba3fc19ff037e7b1406 -b0bdc0f55cfd98d331e3a0c4fbb776a131936c3c47c6bffdc3aaf7d8c9fa6803fbc122c2fefbb532e634228687d52174 -aa5d9e60cc9f0598559c28bb9bdd52aa46605ab4ffe3d192ba982398e72cec9a2a44c0d0d938ce69935693cabc0887ea -802b6459d2354fa1d56c592ac1346c428dadea6b6c0a87bf7d309bab55c94e1cf31dd98a7a86bd92a840dd51f218b91b -a526914efdc190381bf1a73dd33f392ecf01350b9d3f4ae96b1b1c3d1d064721c7d6eec5788162c933245a3943f5ee51 -b3b8fcf637d8d6628620a1a99dbe619eabb3e5c7ce930d6efd2197e261bf394b74d4e5c26b96c4b8009c7e523ccfd082 -8f7510c732502a93e095aba744535f3928f893f188adc5b16008385fb9e80f695d0435bfc5b91cdad4537e87e9d2551c -97b90beaa56aa936c3ca45698f79273a68dd3ccd0076eab48d2a4db01782665e63f33c25751c1f2e070f4d1a8525bf96 -b9fb798324b1d1283fdc3e48288e3861a5449b2ab5e884b34ebb8f740225324af86e4711da6b5cc8361c1db15466602f -b6d52b53cea98f1d1d4c9a759c25bf9d8a50b604b144e4912acbdbdc32aab8b9dbb10d64a29aa33a4f502121a6fb481c -9174ffff0f2930fc228f0e539f5cfd82c9368d26b074467f39c07a774367ff6cccb5039ac63f107677d77706cd431680 -a33b6250d4ac9e66ec51c063d1a6a31f253eb29bbaed12a0d67e2eccfffb0f3a52750fbf52a1c2aaba8c7692346426e7 -a97025fd5cbcebe8ef865afc39cd3ea707b89d4e765ec817fd021d6438e02fa51e3544b1fd45470c58007a08efac6edd -b32a78480edd9ff6ba2f1eec4088db5d6ceb2d62d7e59e904ecaef7bb4a2e983a4588e51692b3be76e6ffbc0b5f911a5 -b5ab590ef0bb77191f00495b33d11c53c65a819f7d0c1f9dc4a2caa147a69c77a4fff7366a602d743ee1f395ce934c1e -b3fb0842f9441fb1d0ee0293b6efbc70a8f58d12d6f769b12872db726b19e16f0f65efbc891cf27a28a248b0ef9c7e75 -9372ad12856fefb928ccb0d34e198df99e2f8973b07e9d417a3134d5f69e12e79ff572c4e03ccd65415d70639bc7c73e -aa8d6e83d09ce216bfe2009a6b07d0110d98cf305364d5529c170a23e693aabb768b2016befb5ada8dabdd92b4d012bb -a954a75791eeb0ce41c85200c3763a508ed8214b5945a42c79bfdcfb1ec4f86ad1dd7b2862474a368d4ac31911a2b718 -8e2081cfd1d062fe3ab4dab01f68062bac802795545fede9a188f6c9f802cb5f884e60dbe866710baadbf55dc77c11a4 -a2f06003b9713e7dd5929501ed485436b49d43de80ea5b15170763fd6346badf8da6de8261828913ee0dacd8ff23c0e1 -98eecc34b838e6ffd1931ca65eec27bcdb2fdcb61f33e7e5673a93028c5865e0d1bf6d3bec040c5e96f9bd08089a53a4 -88cc16019741b341060b95498747db4377100d2a5bf0a5f516f7dec71b62bcb6e779de2c269c946d39040e03b3ae12b7 -ad1135ccbc3019d5b2faf59a688eef2500697642be8cfbdf211a1ab59abcc1f24483e50d653b55ff1834675ac7b4978f -a946f05ed9972f71dfde0020bbb086020fa35b482cce8a4cc36dd94355b2d10497d7f2580541bb3e81b71ac8bba3c49f -a83aeed488f9a19d8cfd743aa9aa1982ab3723560b1cd337fc2f91ad82f07afa412b3993afb845f68d47e91ba4869840 -95eebe006bfc316810cb71da919e5d62c2cebb4ac99d8e8ef67be420302320465f8b69873470982de13a7c2e23516be9 -a55f8961295a11e91d1e5deadc0c06c15dacbfc67f04ccba1d069cba89d72aa3b3d64045579c3ea8991b150ac29366ae -b321991d12f6ac07a5de3c492841d1a27b0d3446082fbce93e7e1f9e8d8fe3b45d41253556261c21b70f5e189e1a7a6f -a0b0822f15f652ce7962a4f130104b97bf9529797c13d6bd8e24701c213cc37f18157bd07f3d0f3eae6b7cd1cb40401f -96e2fa4da378aa782cc2d5e6e465fc9e49b5c805ed01d560e9b98abb5c0de8b74a2e7bec3aa5e2887d25cccb12c66f0c -97e4ab610d414f9210ed6f35300285eb3ccff5b0b6a95ed33425100d7725e159708ea78704497624ca0a2dcabce3a2f9 -960a375b17bdb325761e01e88a3ea57026b2393e1d887b34b8fa5d2532928079ce88dc9fd06a728b26d2bb41b12b9032 -8328a1647398e832aadc05bd717487a2b6fcdaa0d4850d2c4da230c6a2ed44c3e78ec4837b6094f3813f1ee99414713f -aa283834ebd18e6c99229ce4b401eda83f01d904f250fedd4e24f1006f8fa0712a6a89a7296a9bf2ce8de30e28d1408e -b29e097f2caadae3e0f0ae3473c072b0cd0206cf6d2e9b22c1a5ad3e07d433e32bd09ed1f4e4276a2da4268633357b7f -9539c5cbba14538b2fe077ecf67694ef240da5249950baaabea0340718b882a966f66d97f08556b08a4320ceb2cc2629 -b4529f25e9b42ae8cf8338d2eface6ba5cd4b4d8da73af502d081388135c654c0b3afb3aa779ffc80b8c4c8f4425dd2b -95be0739c4330619fbe7ee2249c133c91d6c07eab846c18c5d6c85fc21ac5528c5d56dcb0145af68ed0c6a79f68f2ccd -ac0c83ea802227bfc23814a24655c9ff13f729619bcffdb487ccbbf029b8eaee709f8bddb98232ef33cd70e30e45ca47 -b503becb90acc93b1901e939059f93e671900ca52c6f64ae701d11ac891d3a050b505d89324ce267bc43ab8275da6ffe -98e3811b55b1bacb70aa409100abb1b870f67e6d059475d9f278c751b6e1e2e2d6f2e586c81a9fb6597fda06e7923274 -b0b0f61a44053fa6c715dbb0731e35d48dba257d134f851ee1b81fd49a5c51a90ebf5459ec6e489fce25da4f184fbdb1 -b1d2117fe811720bb997c7c93fe9e4260dc50fca8881b245b5e34f724aaf37ed970cdad4e8fcb68e05ac8cf55a274a53 -a10f502051968f14b02895393271776dee7a06db9de14effa0b3471825ba94c3f805302bdddac4d397d08456f620999d -a3dbad2ef060ae0bb7b02eaa4a13594f3f900450faa1854fc09620b01ac94ab896321dfb1157cf2374c27e5718e8026a -b550fdec503195ecb9e079dcdf0cad559d64d3c30818ef369b4907e813e689da316a74ad2422e391b4a8c2a2bef25fc0 -a25ba865e2ac8f28186cea497294c8649a201732ecb4620c4e77b8e887403119910423df061117e5f03fc5ba39042db1 -b3f88174e03fdb443dd6addd01303cf88a4369352520187c739fc5ae6b22fa99629c63c985b4383219dab6acc5f6f532 -97a7503248e31e81b10eb621ba8f5210c537ad11b539c96dfb7cf72b846c7fe81bd7532c5136095652a9618000b7f8d3 -a8bcdc1ce5aa8bfa683a2fc65c1e79de8ff5446695dcb8620f7350c26d2972a23da22889f9e2b1cacb3f688c6a2953dc -8458c111df2a37f5dd91a9bee6c6f4b79f4f161c93fe78075b24a35f9817da8dde71763218d627917a9f1f0c4709c1ed -ac5f061a0541152b876cbc10640f26f1cc923c9d4ae1b6621e4bb3bf2cec59bbf87363a4eb72fb0e5b6d4e1c269b52d5 -a9a25ca87006e8a9203cbb78a93f50a36694aa4aad468b8d80d3feff9194455ca559fcc63838128a0ab75ad78c07c13a -a450b85f5dfffa8b34dfd8bc985f921318efacf8857cf7948f93884ba09fb831482ee90a44224b1a41e859e19b74962f -8ed91e7f92f5c6d7a71708b6132f157ac226ecaf8662af7d7468a4fa25627302efe31e4620ad28719318923e3a59bf82 -ab524165fd4c71b1fd395467a14272bd2b568592deafa039d8492e9ef36c6d3f96927c95c72d410a768dc0b6d1fbbc9b -b662144505aa8432c75ffb8d10318526b6d5777ac7af9ebfad87d9b0866c364f7905a6352743bd8fd79ffd9d5dd4f3e6 -a48f1677550a5cd40663bb3ba8f84caaf8454f332d0ceb1d94dbea52d0412fe69c94997f7749929712fd3995298572f7 -8391cd6e2f6b0c242de1117a612be99776c3dc95cb800b187685ea5bf7e2722275eddb79fd7dfc8be8e389c4524cdf70 -875d3acb9af47833b72900bc0a2448999d638f153c5e97e8a14ec02d0c76f6264353a7e275e1f1a5855daced523d243b -91f1823657d30b59b2f627880a9a9cb530f5aca28a9fd217fe6f2f5133690dfe7ad5a897872e400512db2e788b3f7628 -ad3564332aa56cea84123fc7ca79ea70bb4fef2009fa131cb44e4b15e8613bd11ca1d83b9d9bf456e4b7fee9f2e8b017 -8c530b84001936d5ab366c84c0b105241a26d1fb163669f17c8f2e94776895c2870edf3e1bc8ccd04d5e65531471f695 -932d01fa174fdb0c366f1230cffde2571cc47485f37f23ba5a1825532190cc3b722aeb1f15aed62cf83ccae9403ba713 -88b28c20585aca50d10752e84b901b5c2d58efef5131479fbbe53de7bce2029e1423a494c0298e1497669bd55be97a5d -b914148ca717721144ebb3d3bf3fcea2cd44c30c5f7051b89d8001502f3856fef30ec167174d5b76265b55d70f8716b5 -81d0173821c6ddd2a068d70766d9103d1ee961c475156e0cbd67d54e668a796310474ef698c7ab55abe6f2cf76c14679 -8f28e8d78e2fe7fa66340c53718e0db4b84823c8cfb159c76eac032a62fb53da0a5d7e24ca656cf9d2a890cb2a216542 -8a26360335c73d1ab51cec3166c3cf23b9ea51e44a0ad631b0b0329ef55aaae555420348a544e18d5760969281759b61 -94f326a32ed287545b0515be9e08149eb0a565025074796d72387cc3a237e87979776410d78339e23ef3172ca43b2544 -a785d2961a2fa5e70bffa137858a92c48fe749fee91b02599a252b0cd50d311991a08efd7fa5e96b78d07e6e66ffe746 -94af9030b5ac792dd1ce517eaadcec1482206848bea4e09e55cc7f40fd64d4c2b3e9197027c5636b70d6122c51d2235d -9722869f7d1a3992850fe7be405ec93aa17dc4d35e9e257d2e469f46d2c5a59dbd504056c85ab83d541ad8c13e8bcd54 -b13c4088b61a06e2c03ac9813a75ff1f68ffdfee9df6a8f65095179a475e29cc49119cad2ce05862c3b1ac217f3aace9 -8c64d51774753623666b10ca1b0fe63ae42f82ed6aa26b81dc1d48c86937c5772eb1402624c52a154b86031854e1fb9f -b47e4df18002b7dac3fee945bf9c0503159e1b8aafcce2138818e140753011b6d09ef1b20894e08ba3006b093559061b -93cb5970076522c5a0483693f6a35ffd4ea2aa7aaf3730c4eccd6af6d1bebfc1122fc4c67d53898ae13eb6db647be7e2 -a68873ef80986795ea5ed1a597d1cd99ed978ec25e0abb57fdcc96e89ef0f50aeb779ff46e3dce21dc83ada3157a8498 -8cab67f50949cc8eee6710e27358aea373aae3c92849f8f0b5531c080a6300cdf2c2094fe6fecfef6148de0d28446919 -993e932bcb616dbaa7ad18a4439e0565211d31071ef1b85a0627db74a05d978c60d507695eaeea5c7bd9868a21d06923 -acdadff26e3132d9478a818ef770e9fa0d2b56c6f5f48bd3bd674436ccce9bdfc34db884a73a30c04c5f5e9764cb2218 -a0d3e64c9c71f84c0eef9d7a9cb4fa184224b969db5514d678e93e00f98b41595588ca802643ea225512a4a272f5f534 -91c9140c9e1ba6e330cb08f6b2ce4809cd0d5a0f0516f70032bf30e912b0ed684d07b413b326ab531ee7e5b4668c799b -87bc2ee7a0c21ba8334cd098e35cb703f9af57f35e091b8151b9b63c3a5b0f89bd7701dbd44f644ea475901fa6d9ef08 -9325ccbf64bf5d71b303e31ee85d486298f9802c5e55b2c3d75427097bf8f60fa2ab4fcaffa9b60bf922c3e24fbd4b19 -95d0506e898318f3dc8d28d16dfd9f0038b54798838b3c9be2a2ae3c2bf204eb496166353fc042220b0bd4f6673b9285 -811de529416331fe9c416726d45df9434c29dcd7e949045eb15740f47e97dde8f31489242200e19922cac2a8b7c6fd1f -ade632d04a4c8bbab6ca7df370b2213cb9225023e7973f0e29f4f5e52e8aeaabc65171306bbdd12a67b195dfbb96d48f -88b7f029e079b6ae956042c0ea75d53088c5d0efd750dd018adaeacf46be21bf990897c58578c491f41afd3978d08073 -91f477802de507ffd2be3f4319903119225b277ad24f74eb50f28b66c14d32fae53c7edb8c7590704741af7f7f3e3654 -809838b32bb4f4d0237e98108320d4b079ee16ed80c567e7548bd37e4d7915b1192880f4812ac0e00476d246aec1dbc8 -84183b5fc4a7997a8ae5afedb4d21dce69c480d5966b5cbdafd6dd10d29a9a6377f3b90ce44da0eb8b176ac3af0253bb -8508abbf6d3739a16b9165caf0f95afb3b3ac1b8c38d6d374cf0c91296e2c1809a99772492b539cda184510bce8a0271 -8722054e59bab2062e6419a6e45fc803af77fde912ef2cd23055ad0484963de65a816a2debe1693d93c18218d2b8e81a -8e895f80e485a7c4f56827bf53d34b956281cdc74856c21eb3b51f6288c01cc3d08565a11cc6f3e2604775885490e8c5 -afc92714771b7aa6e60f3aee12efd9c2595e9659797452f0c1e99519f67c8bc3ac567119c1ddfe82a3e961ee9defea9a -818ff0fd9cefd32db87b259e5fa32967201016fc02ef44116cdca3c63ce5e637756f60477a408709928444a8ad69c471 -8251e29af4c61ae806fc5d032347fb332a94d472038149225298389495139ce5678fae739d02dfe53a231598a992e728 -a0ea39574b26643f6f1f48f99f276a8a64b5481989cfb2936f9432a3f8ef5075abfe5c067dc5512143ce8bf933984097 -af67a73911b372bf04e57e21f289fc6c3dfac366c6a01409b6e76fea4769bdb07a6940e52e8d7d3078f235c6d2f632c6 -b5291484ef336024dd2b9b4cf4d3a6b751133a40656d0a0825bcc6d41c21b1c79cb50b0e8f4693f90c29c8f4358641f9 -8bc0d9754d70f2cb9c63f991902165a87c6535a763d5eece43143b5064ae0bcdce7c7a8f398f2c1c29167b2d5a3e6867 -8d7faff53579ec8f6c92f661c399614cc35276971752ce0623270f88be937c414eddcb0997e14724a783905a026c8883 -9310b5f6e675fdf60796f814dbaa5a6e7e9029a61c395761e330d9348a7efab992e4e115c8be3a43d08e90d21290c892 -b5eb4f3eb646038ad2a020f0a42202532d4932e766da82b2c1002bf9c9c2e5336b54c8c0ffcc0e02d19dde2e6a35b6cc -91dabfd30a66710f1f37a891136c9be1e23af4abf8cb751f512a40c022a35f8e0a4fb05b17ec36d4208de02d56f0d53a -b3ded14e82d62ac7a5a036122a62f00ff8308498f3feae57d861babaff5a6628d43f0a0c5fc903f10936bcf4e2758ceb -a88e8348fed2b26acca6784d19ef27c75963450d99651d11a950ea81d4b93acd2c43e0ecce100eaf7e78508263d5baf3 -b1f5bbf7c4756877b87bb42163ac570e08c6667c4528bf68b5976680e19beeff7c5effd17009b0718797077e2955457a -ad2e7b516243f915d4d1415326e98b1a7390ae88897d0b03b66c2d9bd8c3fba283d7e8fe44ed3333296a736454cef6d8 -8f82eae096d5b11f995de6724a9af895f5e1c58d593845ad16ce8fcae8507e0d8e2b2348a0f50a1f66a17fd6fac51a5c -890e4404d0657c6c1ee14e1aac132ecf7a568bb3e04137b85ac0f84f1d333bd94993e8750f88eee033a33fb00f85dcc7 -82ac7d3385e035115f1d39a99fc73e5919de44f5e6424579776d118d711c8120b8e5916372c6f27bed4cc64cac170b6c -85ee16d8901c272cfbbe966e724b7a891c1bd5e68efd5d863043ad8520fc409080af61fd726adc680b3f1186fe0ac8b8 -86dc564c9b545567483b43a38f24c41c6551a49cabeebb58ce86404662a12dbfafd0778d30d26e1c93ce222e547e3898 -a29f5b4522db26d88f5f95f18d459f8feefab02e380c2edb65aa0617a82a3c1a89474727a951cef5f15050bcf7b380fb -a1ce039c8f6cac53352899edb0e3a72c76da143564ad1a44858bd7ee88552e2fe6858d1593bbd74aeee5a6f8034b9b9d -97f10d77983f088286bd7ef3e7fdd8fa275a56bec19919adf33cf939a90c8f2967d2b1b6fc51195cb45ad561202a3ed7 -a25e2772e8c911aaf8712bdac1dd40ee061c84d3d224c466cfaae8e5c99604053f940cde259bd1c3b8b69595781dbfec -b31bb95a0388595149409c48781174c340960d59032ab2b47689911d03c68f77a2273576fbe0c2bf4553e330656058c7 -b8b2e9287ad803fb185a13f0d7456b397d4e3c8ad5078f57f49e8beb2e85f661356a3392dbd7bcf6a900baa5582b86a1 -a3d0893923455eb6e96cc414341cac33d2dbc88fba821ac672708cce131761d85a0e08286663a32828244febfcae6451 -82310cb42f647d99a136014a9f881eb0b9791efd2e01fc1841907ad3fc8a9654d3d1dab6689c3607214b4dc2aca01cee -874022d99c16f60c22de1b094532a0bc6d4de700ad01a31798fac1d5088b9a42ad02bef8a7339af7ed9c0d4f16b186ee -94981369e120265aed40910eebc37eded481e90f4596b8d57c3bec790ab7f929784bd33ddd05b7870aad6c02e869603b -a4f1f50e1e2a73f07095e0dd31cb45154f24968dae967e38962341c1241bcd473102fff1ff668b20c6547e9732d11701 -ae2328f3b0ad79fcda807e69a1b5278145225083f150f67511dafc97e079f860c3392675f1752ae7e864c056e592205b -875d8c971e593ca79552c43d55c8c73b17cd20c81ff2c2fed1eb19b1b91e4a3a83d32df150dbfd5db1092d0aebde1e1f -add2e80aa46aae95da73a11f130f4bda339db028e24c9b11e5316e75ba5e63bc991d2a1da172c7c8e8fee038baae3433 -b46dbe1cb3424002aa7de51e82f600852248e251465c440695d52538d3f36828ff46c90ed77fc1d11534fe3c487df8ef -a5e5045d28b4e83d0055863c30c056628c58d4657e6176fd0536f5933f723d60e851bb726d5bf3c546b8ce4ac4a57ef8 -91fec01e86dd1537e498fff7536ea3ca012058b145f29d9ada49370cd7b7193ac380e116989515df1b94b74a55c45df3 -a7428176d6918cd916a310bdc75483c72de660df48cac4e6e7478eef03205f1827ea55afc0df5d5fa7567d14bbea7fc9 -851d89bef45d9761fe5fdb62972209335193610015e16a675149519f9911373bac0919add226ef118d9f3669cfdf4734 -b74acf5c149d0042021cb2422ea022be4c4f72a77855f42393e71ffd12ebb3eec16bdf16f812159b67b79a9706e7156d -99f35dce64ec99aa595e7894b55ce7b5a435851b396e79036ffb249c28206087db4c85379df666c4d95857db02e21ff9 -b6b9a384f70db9e298415b8ab394ee625dafff04be2886476e59df8d052ca832d11ac68a9b93fba7ab055b7bc36948a4 -898ee4aefa923ffec9e79f2219c7389663eb11eb5b49014e04ed4a336399f6ea1691051d86991f4c46ca65bcd4fdf359 -b0f948217b0d65df7599a0ba4654a5e43c84db477936276e6f11c8981efc6eaf14c90d3650107ed4c09af4cc8ec11137 -aa6286e27ac54f73e63dbf6f41865dd94d24bc0cf732262fcaff67319d162bb43af909f6f8ee27b1971939cfbba08141 -8bca7cdf730cf56c7b2c8a2c4879d61361a6e1dba5a3681a1a16c17a56e168ace0e99cf0d15826a1f5e67e6b8a8a049a -a746d876e8b1ce225fcafca603b099b36504846961526589af977a88c60d31ba2cc56e66a3dec8a77b3f3531bf7524c9 -a11e2e1927e6704cdb8874c75e4f1842cef84d7d43d7a38e339e61dc8ba90e61bbb20dd3c12e0b11d2471d58eed245be -a36395e22bc1d1ba8b0459a235203177737397da5643ce54ded3459d0869ff6d8d89f50c73cb62394bf66a959cde9b90 -8b49f12ba2fdf9aca7e5f81d45c07d47f9302a2655610e7634d1e4bd16048381a45ef2c95a8dd5b0715e4b7cf42273af -91cffa2a17e64eb7f76bccbe4e87280ee1dd244e04a3c9eac12e15d2d04845d876eb24fe2ec6d6d266cce9efb281077f -a6b8afabf65f2dee01788114e33a2f3ce25376fb47a50b74da7c3c25ff1fdc8aa9f41307534abbf48acb6f7466068f69 -8d13db896ccfea403bd6441191995c1a65365cab7d0b97fbe9526da3f45a877bd1f4ef2edef160e8a56838cd1586330e -98c717de9e01bef8842c162a5e757fe8552d53269c84862f4d451e7c656ae6f2ae473767b04290b134773f63be6fdb9d -8c2036ace1920bd13cf018e82848c49eb511fad65fd0ff51f4e4b50cf3bfc294afb63cba682c16f52fb595a98fa84970 -a3520fdff05dbad9e12551b0896922e375f9e5589368bcb2cc303bde252743b74460cb5caf99629325d3620f13adc796 -8d4f83a5bfec05caf5910e0ce538ee9816ee18d0bd44c1d0da2a87715a23cd2733ad4d47552c6dc0eb397687d611dd19 -a7b39a0a6a02823452d376533f39d35029867b3c9a6ad6bca181f18c54132d675613a700f9db2440fb1b4fa13c8bf18a -80bcb114b2544b80f404a200fc36860ed5e1ad31fe551acd4661d09730c452831751baa9b19d7d311600d267086a70bc -90dcce03c6f88fc2b08f2b42771eedde90cc5330fe0336e46c1a7d1b5a6c1641e5fcc4e7b3d5db00bd8afca9ec66ed81 -aec15f40805065c98e2965b1ae12a6c9020cfdb094c2d0549acfc7ea2401a5fb48d3ea7d41133cf37c4e096e7ff53eb9 -80e129b735dba49fa627a615d6c273119acec8e219b2f2c4373a332b5f98d66cbbdd688dfbe72a8f8bfefaccc02c50c1 -a9b596da3bdfe23e6799ece5f7975bf7a1979a75f4f546deeaf8b34dfe3e0d623217cb4cf4ccd504cfa3625b88cd53f1 -abcbbb70b16f6e517c0ab4363ab76b46e4ff58576b5f8340e5c0e8cc0e02621b6e23d742d73b015822a238b17cfd7665 -a046937cc6ea6a2e1adae543353a9fe929c1ae4ad655be1cc051378482cf88b041e28b1e9a577e6ccff2d3570f55e200 -831279437282f315e65a60184ef158f0a3dddc15a648dc552bdc88b3e6fe8288d3cfe9f0031846d81350f5e7874b4b33 -993d7916fa213c6d66e7c4cafafc1eaec9a2a86981f91c31eb8a69c5df076c789cbf498a24c84e0ee77af95b42145026 -823907a3b6719f8d49b3a4b7c181bd9bb29fcf842d7c70660c4f351852a1e197ca46cf5e879b47fa55f616fa2b87ce5e -8d228244e26132b234930ee14c75d88df0943cdb9c276a8faf167d259b7efc1beec2a87c112a6c608ad1600a239e9aae -ab6e55766e5bfb0cf0764ed909a8473ab5047d3388b4f46faeba2d1425c4754c55c6daf6ad4751e634c618b53e549529 -ab0cab6860e55a84c5ad2948a7e0989e2b4b1fd637605634b118361497332df32d9549cb854b2327ca54f2bcb85eed8f -b086b349ae03ef34f4b25a57bcaa5d1b29bd94f9ebf87e22be475adfe475c51a1230c1ebe13506cb72c4186192451658 -8a0b49d8a254ca6d91500f449cbbfbb69bb516c6948ac06808c65595e46773e346f97a5ce0ef7e5a5e0de278af22709c -ac49de11edaaf04302c73c578cc0824bdd165c0d6321be1c421c1950e68e4f3589aa3995448c9699e93c6ebae8803e27 -884f02d841cb5d8f4c60d1402469216b114ab4e93550b5bc1431756e365c4f870a9853449285384a6fa49e12ce6dc654 -b75f3a28fa2cc8d36b49130cb7448a23d73a7311d0185ba803ad55c8219741d451c110f48b786e96c728bc525903a54f -80ae04dbd41f4a35e33f9de413b6ad518af0919e5a30cb0fa1b061b260420780bb674f828d37fd3b52b5a31673cbd803 -b9a8011eb5fcea766907029bf743b45262db3e49d24f84503687e838651ed11cb64c66281e20a0ae9f6aa51acc552263 -90bfdd75e2dc9cf013e22a5d55d2d2b8a754c96103a17524488e01206e67f8b6d52b1be8c4e3d5307d4fe06d0e51f54c -b4af353a19b06203a815ec43e79a88578cc678c46f5a954b85bc5c53b84059dddba731f3d463c23bfd5273885c7c56a4 -aa125e96d4553b64f7140e5453ff5d2330318b69d74d37d283e84c26ad672fa00e3f71e530eb7e28be1e94afb9c4612e -a18e060aee3d49cde2389b10888696436bb7949a79ca7d728be6456a356ea5541b55492b2138da90108bd1ce0e6f5524 -93e55f92bdbccc2de655d14b1526836ea2e52dba65eb3f87823dd458a4cb5079bf22ce6ef625cb6d6bfdd0995ab9a874 -89f5a683526b90c1c3ceebbb8dc824b21cff851ce3531b164f6626e326d98b27d3e1d50982e507d84a99b1e04e86a915 -83d1c38800361633a3f742b1cb2bfc528129496e80232611682ddbe403e92c2ac5373aea0bca93ecb5128b0b2b7a719e -8ecba560ac94905e19ce8d9c7af217bf0a145d8c8bd38e2db82f5e94cc3f2f26f55819176376b51f154b4aab22056059 -a7e2a4a002b60291924850642e703232994acb4cfb90f07c94d1e0ecd2257bb583443283c20fc6017c37e6bfe85b7366 -93ed7316fa50b528f1636fc6507683a672f4f4403e55e94663f91221cc198199595bd02eef43d609f451acc9d9b36a24 -a1220a8ebc5c50ceed76a74bc3b7e0aa77f6884c71b64b67c4310ac29ce5526cb8992d6abc13ef6c8413ce62486a6795 -b2f6eac5c869ad7f4a25161d3347093e2f70e66cd925032747e901189355022fab3038bca4d610d2f68feb7e719c110b -b703fa11a4d511ca01c7462979a94acb40b5d933759199af42670eb48f83df202fa0c943f6ab3b4e1cc54673ea3aab1e -b5422912afbfcb901f84791b04f1ddb3c3fbdc76d961ee2a00c5c320e06d3cc5b5909c3bb805df66c5f10c47a292b13d -ad0934368da823302e1ac08e3ede74b05dfdbfffca203e97ffb0282c226814b65c142e6e15ec1e754518f221f01b30f7 -a1dd302a02e37df15bf2f1147efe0e3c06933a5a767d2d030e1132f5c3ce6b98e216b6145eb39e1e2f74e76a83165b8d -a346aab07564432f802ae44738049a36f7ca4056df2d8f110dbe7fef4a3e047684dea609b2d03dc6bf917c9c2a47608f -b96c5f682a5f5d02123568e50f5d0d186e4b2c4c9b956ec7aabac1b3e4a766d78d19bd111adb5176b898e916e49be2aa -8a96676d56876fc85538db2e806e1cba20fd01aeb9fa3cb43ca6ca94a2c102639f65660db330e5d74a029bb72d6a0b39 -ab0048336bd5c3def1a4064eadd49e66480c1f2abb4df46e03afbd8a3342c2c9d74ee35d79f08f4768c1646681440984 -888427bdf76caec90814c57ee1c3210a97d107dd88f7256f14f883ad0f392334b82be11e36dd8bfec2b37935177c7831 -b622b282becf0094a1916fa658429a5292ba30fb48a4c8066ce1ddcefb71037948262a01c95bab6929ed3a76ba5db9fe -b5b9e005c1f456b6a368a3097634fb455723abe95433a186e8278dceb79d4ca2fbe21f8002e80027b3c531e5bf494629 -a3c6707117a1e48697ed41062897f55d8119403eea6c2ee88f60180f6526f45172664bfee96bf61d6ec0b7fbae6aa058 -b02a9567386a4fbbdb772d8a27057b0be210447348efe6feb935ceec81f361ed2c0c211e54787dc617cdffed6b4a6652 -a9b8364e40ef15c3b5902e5534998997b8493064fa2bea99600def58279bb0f64574c09ba11e9f6f669a8354dd79dc85 -9998a2e553a9aa9a206518fae2bc8b90329ee59ab23005b10972712389f2ec0ee746033c733092ffe43d73d33abbb8ef -843a4b34d9039bf79df96d79f2d15e8d755affb4d83d61872daf540b68c0a3888cf8fc00d5b8b247b38524bcb3b5a856 -84f7128920c1b0bb40eee95701d30e6fc3a83b7bb3709f16d97e72acbb6057004ee7ac8e8f575936ca9dcb7866ab45f7 -918d3e2222e10e05edb34728162a899ad5ada0aaa491aeb7c81572a9c0d506e31d5390e1803a91ff3bd8e2bb15d47f31 -9442d18e2489613a7d47bb1cb803c8d6f3259d088cd079460976d87f7905ee07dea8f371b2537f6e1d792d36d7e42723 -b491976970fe091995b2ed86d629126523ccf3e9daf8145302faca71b5a71a5da92e0e05b62d7139d3efac5c4e367584 -aa628006235dc77c14cef4c04a308d66b07ac92d377df3de1a2e6ecfe3144f2219ad6d7795e671e1cb37a3641910b940 -99d386adaea5d4981d7306feecac9a555b74ffdc218c907c5aa7ac04abaead0ec2a8237300d42a3fbc464673e417ceed -8f78e8b1556f9d739648ea3cab9606f8328b52877fe72f9305545a73b74d49884044ba9c1f1c6db7d9b7c7b7c661caba -8fb357ae49932d0babdf74fc7aa7464a65d3b6a2b3acf4f550b99601d3c0215900cfd67f2b6651ef94cfc323bac79fae -9906f2fa25c0290775aa001fb6198113d53804262454ae8b83ef371b5271bde189c0460a645829cb6c59f9ee3a55ce4d -8f4379b3ebb50e052325b27655ca6a82e6f00b87bf0d2b680d205dd2c7afdc9ff32a9047ae71a1cdf0d0ce6b9474d878 -a85534e88c2bd43c043792eaa75e50914b21741a566635e0e107ae857aed0412035f7576cf04488ade16fd3f35fdbb87 -b4ce93199966d3c23251ca7f28ec5af7efea1763d376b0385352ffb2e0a462ef95c69940950278cf0e3dafd638b7bd36 -b10cb3d0317dd570aa73129f4acf63c256816f007607c19b423fb42f65133ce21f2f517e0afb41a5378cccf893ae14d0 -a9b231c9f739f7f914e5d943ed9bff7eba9e2c333fbd7c34eb1648a362ee01a01af6e2f7c35c9fe962b11152cddf35de -99ff6a899e156732937fb81c0cced80ae13d2d44c40ba99ac183aa246103b31ec084594b1b7feb96da58f4be2dd5c0ed -8748d15d18b75ff2596f50d6a9c4ce82f61ecbcee123a6ceae0e43cab3012a29b6f83cf67b48c22f6f9d757c6caf76b2 -b88ab05e4248b7fb634cf640a4e6a945d13e331237410f7217d3d17e3e384ddd48897e7a91e4516f1b9cbd30f35f238b -8d826deaeeb84a3b2d2c04c2300ca592501f992810582d6ae993e0d52f6283a839dba66c6c72278cff5871802b71173b -b36fed027c2f05a5ef625ca00b0364b930901e9e4420975b111858d0941f60e205546474bb25d6bfa6928d37305ae95f -af2fcfc6b87967567e8b8a13a4ed914478185705724e56ce68fb2df6d1576a0cf34a61e880997a0d35dc2c3276ff7501 -ac351b919cd1fbf106feb8af2c67692bfcddc84762d18cea681cfa7470a5644839caace27efee5f38c87d3df306f4211 -8d6665fb1d4d8d1fa23bd9b8a86e043b8555663519caac214d1e3e3effbc6bee7f2bcf21e645f77de0ced279d69a8a8b -a9fc1c2061756b2a1a169c1b149f212ff7f0d2488acd1c5a0197eba793cffa593fc6d1d1b40718aa75ca3ec77eff10e1 -aff64f0fa009c7a6cf0b8d7a22ddb2c8170c3cb3eec082e60d5aadb00b0040443be8936d728d99581e33c22178c41c87 -82e0b181adc5e3b1c87ff8598447260e839d53debfae941ebea38265575546c3a74a14b4325a030833a62ff6c52d9365 -b7ad43cbb22f6f892c2a1548a41dc120ab1f4e1b8dea0cb6272dd9cb02054c542ecabc582f7e16de709d48f5166cae86 -985e0c61094281532c4afb788ecb2dfcba998e974b5d4257a22040a161883908cdd068fe80f8eb49b8953cfd11acf43a -ae46895c6d67ea6d469b6c9c07b9e5d295d9ae73b22e30da4ba2c973ba83a130d7eef39717ec9d0f36e81d56bf742671 -8600177ea1f7e7ef90514b38b219a37dedfc39cb83297e4c7a5b479817ef56479d48cf6314820960c751183f6edf8b0e -b9208ec1c1d7a1e99b59c62d3e4e61dfb706b0e940d09d3abfc3454c19749083260614d89cfd7e822596c3cdbcc6bb95 -a1e94042c796c2b48bc724352d2e9f3a22291d9a34705993357ddb6adabd76da6fc25dac200a8cb0b5bbd99ecddb7af6 -b29c3adedd0bcad8a930625bc4dfdc3552a9afd5ca6dd9c0d758f978068c7982b50b711aa0eb5b97f2b84ee784637835 -af0632a238bb1f413c7ea8e9b4c3d68f2827bd2e38cd56024391fba6446ac5d19a780d0cfd4a78fe497d537b766a591a -aaf6e7f7d54f8ef5e2e45dd59774ecbeecf8683aa70483b2a75be6a6071b5981bbaf1627512a65d212817acdfab2e428 -8c751496065da2e927cf492aa5ca9013b24f861d5e6c24b30bbf52ec5aaf1905f40f9a28175faef283dd4ed4f2182a09 -8952377d8e80a85cf67d6b45499f3bad5fd452ea7bcd99efc1b066c4720d8e5bff1214cea90fd1f972a7f0baac3d29be -a1946ee543d1a6e21f380453be4d446e4130950c5fc3d075794eb8260f6f52d0a795c1ff91d028a648dc1ce7d9ab6b47 -89f3fefe37af31e0c17533d2ca1ce0884cc1dc97c15cbfab9c331b8debd94781c9396abef4bb2f163d09277a08d6adf0 -a2753f1e6e1a154fb117100a5bd9052137add85961f8158830ac20541ab12227d83887d10acf7fd36dcaf7c2596d8d23 -814955b4198933ee11c3883863b06ff98c7eceb21fc3e09df5f916107827ccf3323141983e74b025f46ae00284c9513b -8cc5c6bb429073bfef47cae7b3bfccb0ffa076514d91a1862c6bda4d581e0df87db53cc6c130bf8a7826304960f5a34e -909f22c1f1cdc87f7be7439c831a73484a49acbf8f23d47087d7cf867c64ef61da3bde85dc57d705682b4c3fc710d36e -8048fee7f276fcd504aed91284f28e73693615e0eb3858fa44bcf79d7285a9001c373b3ef71d9a3054817ba293ebe28c -94400e5cf5d2700ca608c5fe35ce14623f71cc24959f2bc27ca3684092850f76b67fb1f07ca9e5b2ca3062cf8ad17bd4 -81c2ae7d4d1b17f8b6de6a0430acc0d58260993980fe48dc2129c4948269cdc74f9dbfbf9c26b19360823fd913083d48 -8c41fe765128e63f6889d6a979f6a4342300327c8b245a8cfe3ecfbcac1e09c3da30e2a1045b24b78efc6d6d50c8c6ac -a5dd4ae51ae48c8be4b218c312ade226cffce671cf121cb77810f6c0990768d6dd767badecb5c69921d5574d5e8433d3 -b7642e325f4ba97ae2a39c1c9d97b35aafd49d53dba36aed3f3cb0ca816480b3394079f46a48252d46596559c90f4d58 -ae87375b40f35519e7bd4b1b2f73cd0b329b0c2cb9d616629342a71c6c304338445eda069b78ea0fbe44087f3de91e09 -b08918cb6f736855e11d3daca1ddfbdd61c9589b203b5493143227bf48e2c77c2e8c94b0d1aa2fab2226e0eae83f2681 -ac36b84a4ac2ebd4d6591923a449c564e3be8a664c46092c09e875c2998eba16b5d32bfd0882fd3851762868e669f0b1 -a44800a3bb192066fa17a3f29029a23697240467053b5aa49b9839fb9b9b8b12bcdcbfc557f024b61f4f51a9aacdefcb -9064c688fec23441a274cdf2075e5a449caf5c7363cc5e8a5dc9747183d2e00a0c69f2e6b3f6a7057079c46014c93b3b -aa367b021469af9f5b764a79bb3afbe2d87fe1e51862221672d1a66f954b165778b7c27a705e0f93841fab4c8468344d -a1a8bfc593d4ab71f91640bc824de5c1380ab2591cfdafcbc78a14b32de3c0e15f9d1b461d85c504baa3d4232c16bb53 -97df48da1799430f528184d30b6baa90c2a2f88f34cdfb342d715339c5ebd6d019aa693cea7c4993daafc9849063a3aa -abd923831fbb427e06e0dd335253178a9e5791395c84d0ab1433c07c53c1209161097e9582fb8736f8a60bde62d8693e -84cd1a43f1a438b43dc60ffc775f646937c4f6871438163905a3cebf1115f814ccd38a6ccb134130bff226306e412f32 -91426065996b0743c5f689eb3ca68a9f7b9e4d01f6c5a2652b57fa9a03d8dc7cd4bdbdab0ca5a891fee1e97a7f00cf02 -a4bee50249db3df7fd75162b28f04e57c678ba142ce4d3def2bc17bcb29e4670284a45f218dad3969af466c62a903757 -83141ebcc94d4681404e8b67a12a46374fded6df92b506aff3490d875919631408b369823a08b271d006d5b93136f317 -a0ea1c8883d58d5a784da3d8c8a880061adea796d7505c1f903d07c287c5467f71e4563fc0faafbc15b5a5538b0a7559 -89d9d480574f201a87269d26fb114278ed2c446328df431dc3556e3500e80e4cd01fcac196a2459d8646361ebda840df -8bf302978973632dd464bec819bdb91304712a3ec859be071e662040620422c6e75eba6f864f764cffa2799272efec39 -922f666bc0fd58b6d7d815c0ae4f66d193d32fc8382c631037f59eeaeae9a8ca6c72d08e72944cf9e800b8d639094e77 -81ad8714f491cdff7fe4399f2eb20e32650cff2999dd45b9b3d996d54a4aba24cc6c451212e78c9e5550368a1a38fb3f -b58fcf4659d73edb73175bd9139d18254e94c3e32031b5d4b026f2ed37aa19dca17ec2eb54c14340231615277a9d347e -b365ac9c2bfe409b710928c646ea2fb15b28557e0f089d39878e365589b9d1c34baf5566d20bb28b33bb60fa133f6eff -8fcae1d75b53ab470be805f39630d204853ca1629a14158bac2f52632277d77458dec204ff84b7b2d77e641c2045be65 -a03efa6bebe84f4f958a56e2d76b5ba4f95dd9ed7eb479edc7cc5e646c8d4792e5b0dfc66cc86aa4b4afe2f7a4850760 -af1c823930a3638975fb0cc5c59651771b2719119c3cd08404fbd4ce77a74d708cefbe3c56ea08c48f5f10e6907f338f -8260c8299b17898032c761c325ac9cabb4c5b7e735de81eacf244f647a45fb385012f4f8df743128888c29aefcaaad16 -ab2f37a573c82e96a8d46198691cd694dfa860615625f477e41f91b879bc58a745784fccd8ffa13065834ffd150d881d -986c746c9b4249352d8e5c629e8d7d05e716b3c7aab5e529ca969dd1e984a14b5be41528baef4c85d2369a42d7209216 -b25e32da1a8adddf2a6080725818b75bc67240728ad1853d90738485d8924ea1e202df0a3034a60ffae6f965ec55cf63 -a266e627afcebcefea6b6b44cbc50f5c508f7187e87d047b0450871c2a030042c9e376f3ede0afcf9d1952f089582f71 -86c3bbca4c0300606071c0a80dbdec21ce1dd4d8d4309648151c420854032dff1241a1677d1cd5de4e4de4385efda986 -b9a21a1fe2d1f3273a8e4a9185abf2ff86448cc98bfa435e3d68306a2b8b4a6a3ea33a155be3cb62a2170a86f77679a5 -b117b1ea381adce87d8b342cba3a15d492ff2d644afa28f22424cb9cbc820d4f7693dfc1a4d1b3697046c300e1c9b4c8 -9004c425a2e68870d6c69b658c344e3aa3a86a8914ee08d72b2f95c2e2d8a4c7bb0c6e7e271460c0e637cec11117bf8e -86a18aa4783b9ebd9131580c8b17994825f27f4ac427b0929a1e0236907732a1c8139e98112c605488ee95f48bbefbfc -84042243b955286482ab6f0b5df4c2d73571ada00716d2f737ca05a0d2e88c6349e8ee9e67934cfee4a1775dbf7f4800 -92c2153a4733a62e4e1d5b60369f3c26777c7d01cd3c8679212660d572bd3bac9b8a8a64e1f10f7dbf5eaa7579c4e423 -918454b6bb8e44a2afa144695ba8d48ae08d0cdfef4ad078f67709eddf3bb31191e8b006f04e82ea45a54715ef4d5817 -acf0b54f6bf34cf6ed6c2b39cf43194a40d68de6bcf1e4b82c34c15a1343e9ac3737885e1a30b78d01fa3a5125463db8 -a7d60dbe4b6a7b054f7afe9ee5cbbfeca0d05dc619e6041fa2296b549322529faddb8a11e949562309aecefb842ac380 -91ffb53e6d7e5f11159eaf13e783d6dbdfdb1698ed1e6dbf3413c6ea23492bbb9e0932230a9e2caac8fe899a17682795 -b6e8d7be5076ee3565d5765a710c5ecf17921dd3cf555c375d01e958a365ae087d4a88da492a5fb81838b7b92bf01143 -a8c6b763de2d4b2ed42102ef64eccfef31e2fb2a8a2776241c82912fa50fc9f77f175b6d109a97ede331307c016a4b1a -99839f86cb700c297c58bc33e28d46b92931961548deac29ba8df91d3e11721b10ea956c8e16984f9e4acf1298a79b37 -8c2e2c338f25ea5c25756b7131cde0d9a2b35abf5d90781180a00fe4b8e64e62590dc63fe10a57fba3a31c76d784eb01 -9687d7df2f41319ca5469d91978fed0565a5f11f829ebadaa83db92b221755f76c6eacd7700735e75c91e257087512e3 -8795fdfb7ff8439c58b9bf58ed53873d2780d3939b902b9ddaaa4c99447224ced9206c3039a23c2c44bcc461e2bb637f -a803697b744d2d087f4e2307218d48fa88620cf25529db9ce71e2e3bbcc65bac5e8bb9be04777ef7bfb5ed1a5b8e6170 -80f3d3efbbb9346ddd413f0a8e36b269eb5d7ff6809d5525ff9a47c4bcab2c01b70018b117f6fe05253775612ff70c6b -9050e0e45bcc83930d4c505af35e5e4d7ca01cd8681cba92eb55821aececcebe32bb692ebe1a4daac4e7472975671067 -8d206812aac42742dbaf233e0c080b3d1b30943b54b60283515da005de05ea5caa90f91fedcfcba72e922f64d7040189 -a2d44faaeb2eff7915c83f32b13ca6f31a6847b1c1ce114ea240bac3595eded89f09b2313b7915ad882292e2b586d5b4 -961776c8576030c39f214ea6e0a3e8b3d32f023d2600958c098c95c8a4e374deeb2b9dc522adfbd6bda5949bdc09e2a2 -993fa7d8447407af0fbcd9e6d77f815fa5233ab00674efbcf74a1f51c37481445ae291cc7b76db7c178f9cb0e570e0fc -abd5b1c78e05f9d7c8cc99bdaef8b0b6a57f2daf0f02bf492bec48ea4a27a8f1e38b5854da96efff11973326ff980f92 -8f15af4764bc275e6ccb892b3a4362cacb4e175b1526a9a99944e692fe6ccb1b4fc19abf312bb2a089cb1f344d91a779 -a09b27ccd71855512aba1d0c30a79ffbe7f6707a55978f3ced50e674b511a79a446dbc6d7946add421ce111135a460af -94b2f98ce86a9271fbd4153e1fc37de48421fe3490fb3840c00f2d5a4d0ba8810c6a32880b002f6374b59e0a7952518b -8650ac644f93bbcb88a6a0f49fee2663297fd4bc6fd47b6a89b9d8038d32370438ab3a4775ec9b58cb10aea8a95ef7b6 -95e5c2f2e84eed88c6980bbba5a1c0bb375d5a628bff006f7516d45bb7d723da676add4fdd45956f312e7bab0f052644 -b3278a3fa377ac93af7cfc9453f8cb594aae04269bbc99d2e0e45472ff4b6a2f97a26c4c57bf675b9d86f5e77a5d55d1 -b4bcbe6eb666a206e2ea2f877912c1d3b5bdbd08a989fc4490eb06013e1a69ad1ba08bcdac048bf29192312be399077b -a76d70b78c99fffcbf9bb9886eab40f1ea4f99a309710b660b64cbf86057cbcb644d243f6e341711bb7ef0fedf0435a7 -b2093c1ee945dca7ac76ad5aed08eae23af31dd5a77c903fd7b6f051f4ab84425d33a03c3d45bf2907bc93c02d1f3ad8 -904b1f7534e053a265b22d20be859912b9c9ccb303af9a8d6f1d8f6ccdc5c53eb4a45a1762b880d8444d9be0cd55e7f9 -8f664a965d65bc730c9ef1ec7467be984d4b8eb46bd9b0d64e38e48f94e6e55dda19aeac82cbcf4e1473440e64c4ca18 -8bcee65c4cc7a7799353d07b114c718a2aae0cd10a3f22b7eead5185d159dafd64852cb63924bf87627d176228878bce -8c78f2e3675096fef7ebaa898d2615cd50d39ca3d8f02b9bdfb07e67da648ae4be3da64838dffc5935fd72962c4b96c7 -8c40afd3701629421fec1df1aac4e849384ef2e80472c0e28d36cb1327acdf2826f99b357f3d7afdbc58a6347fc40b3c -a197813b1c65a8ea5754ef782522a57d63433ef752215ecda1e7da76b0412ee619f58d904abd2e07e0c097048b6ae1dd -a670542629e4333884ad7410f9ea3bd6f988df4a8f8a424ca74b9add2312586900cf9ae8bd50411f9146e82626b4af56 -a19875cc07ab84e569d98b8b67fb1dbbdfb59093c7b748fae008c8904a6fd931a63ca8d03ab5fea9bc8d263568125a9b -b57e7f68e4eb1bd04aafa917b1db1bdab759a02aa8a9cdb1cba34ba8852b5890f655645c9b4e15d5f19bf37e9f2ffe9f -8abe4e2a4f6462b6c64b3f10e45db2a53c2b0d3c5d5443d3f00a453e193df771eda635b098b6c8604ace3557514027af -8459e4fb378189b22b870a6ef20183deb816cefbf66eca1dc7e86d36a2e011537db893729f500dc154f14ce24633ba47 -930851df4bc7913c0d8c0f7bd3b071a83668987ed7c397d3d042fdc0d9765945a39a3bae83da9c88cb6b686ed8aeeb26 -8078c9e5cd05e1a8c932f8a1d835f61a248b6e7133fcbb3de406bf4ffc0e584f6f9f95062740ba6008d98348886cf76b -addff62bb29430983fe578e3709b0949cdc0d47a13a29bc3f50371a2cb5c822ce53e2448cfaa01bcb6e0aa850d5a380e -9433add687b5a1e12066721789b1db2edf9b6558c3bdc0f452ba33b1da67426abe326e9a34d207bfb1c491c18811bde1 -822beda3389963428cccc4a2918fa9a8a51cf0919640350293af70821967108cded5997adae86b33cb917780b097f1ca -a7a9f52bda45e4148ed56dd176df7bd672e9b5ed18888ccdb405f47920fdb0844355f8565cefb17010b38324edd8315f -b35c3a872e18e607b2555c51f9696a17fa18da1f924d503b163b4ec9fe22ed0c110925275cb6c93ce2d013e88f173d6a -adf34b002b2b26ab84fc1bf94e05bd8616a1d06664799ab149363c56a6e0c807fdc473327d25632416e952ea327fcd95 -ae4a6b9d22a4a3183fac29e2551e1124a8ce4a561a9a2afa9b23032b58d444e6155bb2b48f85c7b6d70393274e230db7 -a2ea3be4fc17e9b7ce3110284038d46a09e88a247b6971167a7878d9dcf36925d613c382b400cfa4f37a3ebea3699897 -8e5863786b641ce3140fbfe37124d7ad3925472e924f814ebfc45959aaf3f61dc554a597610b5defaecc85b59a99b50f -aefde3193d0f700d0f515ab2aaa43e2ef1d7831c4f7859f48e52693d57f97fa9e520090f3ed700e1c966f4b76048e57f -841a50f772956622798e5cd208dc7534d4e39eddee30d8ce133383d66e5f267e389254a0cdae01b770ecd0a9ca421929 -8fbc2bfd28238c7d47d4c03b1b910946c0d94274a199575e5b23242619b1de3497784e646a92aa03e3e24123ae4fcaba -926999579c8eec1cc47d7330112586bdca20b4149c8b2d066f527c8b9f609e61ce27feb69db67eea382649c6905efcf9 -b09f31f305efcc65589adf5d3690a76cf339efd67cd43a4e3ced7b839507466e4be72dd91f04e89e4bbef629d46e68c0 -b917361f6b95f759642638e0b1d2b3a29c3bdef0b94faa30de562e6078c7e2d25976159df3edbacbf43614635c2640b4 -8e7e8a1253bbda0e134d62bfe003a2669d471b47bd2b5cde0ff60d385d8e62279d54022f5ac12053b1e2d3aaa6910b4c -b69671a3c64e0a99d90b0ed108ce1912ff8ed983e4bddd75a370e9babde25ee1f5efb59ec707edddd46793207a8b1fe7 -910b2f4ebd37b7ae94108922b233d0920b4aba0bd94202c70f1314418b548d11d8e9caa91f2cd95aff51b9432d122b7f -82f645c90dfb52d195c1020346287c43a80233d3538954548604d09fbab7421241cde8593dbc4acc4986e0ea39a27dd9 -8fee895f0a140d88104ce442fed3966f58ff9d275e7373483f6b4249d64a25fb5374bbdc6bce6b5ab0270c2847066f83 -84f5bd7aab27b2509397aeb86510dd5ac0a53f2c8f73799bf720f2f87a52277f8d6b0f77f17bc80739c6a7119b7eb062 -9903ceced81099d7e146e661bcf01cbaccab5ba54366b85e2177f07e2d8621e19d9c9c3eee14b9266de6b3f9b6ea75ae -b9c16ea2a07afa32dd6c7c06df0dec39bca2067a9339e45475c98917f47e2320f6f235da353fd5e15b477de97ddc68dd -9820a9bbf8b826bec61ebf886de2c4f404c1ebdc8bab82ee1fea816d9de29127ce1852448ff717a3fe8bbfe9e92012e5 -817224d9359f5da6f2158c2c7bf9165501424f063e67ba9859a07ab72ee2ee62eb00ca6da821cfa19065c3282ca72c74 -94b95c465e6cb00da400558a3c60cfec4b79b27e602ca67cbc91aead08de4b6872d8ea096b0dc06dca4525c8992b8547 -a2b539a5bccd43fa347ba9c15f249b417997c6a38c63517ca38394976baa08e20be384a360969ff54e7e721db536b3e5 -96caf707e34f62811ee8d32ccf28d8d6ec579bc33e424d0473529af5315c456fd026aa910c1fed70c91982d51df7d3ca -8a77b73e890b644c6a142bdbac59b22d6a676f3b63ddafb52d914bb9d395b8bf5aedcbcc90429337df431ebd758a07a6 -8857830a7351025617a08bc44caec28d2fae07ebf5ffc9f01d979ce2a53839a670e61ae2783e138313929129790a51a1 -aa3e420321ed6f0aa326d28d1a10f13facec6f605b6218a6eb9cbc074801f3467bf013a456d1415a5536f12599efa3d3 -824aed0951957b00ea2f3d423e30328a3527bf6714cf9abbae84cf27e58e5c35452ba89ccc011de7c68c75d6e021d8f1 -a2e87cc06bf202e953fb1081933d8b4445527dde20e38ed1a4f440144fd8fa464a2b73e068b140562e9045e0f4bd3144 -ae3b8f06ad97d7ae3a5e5ca839efff3e4824dc238c0c03fc1a8d2fc8aa546cdfd165b784a31bb4dec7c77e9305b99a4b -b30c3e12395b1fb8b776f3ec9f87c70e35763a7b2ddc68f0f60a4982a84017f27c891a98561c830038deb033698ed7fc -874e507757cd1177d0dff0b0c62ce90130324442a33da3b2c8ee09dbca5d543e3ecfe707e9f1361e7c7db641c72794bb -b53012dd10b5e7460b57c092eaa06d6502720df9edbbe3e3f61a9998a272bf5baaac4a5a732ad4efe35d6fac6feca744 -85e6509d711515534d394e6cacbed6c81da710074d16ef3f4950bf2f578d662a494d835674f79c4d6315bced4defc5f0 -b6132b2a34b0905dcadc6119fd215419a7971fe545e52f48b768006944b4a9d7db1a74b149e2951ea48c083b752d0804 -989867da6415036d19b4bacc926ce6f4df7a556f50a1ba5f3c48eea9cefbb1c09da81481c8009331ee83f0859185e164 -960a6c36542876174d3fbc1505413e29f053ed87b8d38fef3af180491c7eff25200b45dd5fe5d4d8e63c7e8c9c00f4c8 -9040b59bd739d9cc2e8f6e894683429e4e876a8106238689ff4c22770ae5fdae1f32d962b30301fa0634ee163b524f35 -af3fcd0a45fe9e8fe256dc7eab242ef7f582dd832d147444483c62787ac820fafc6ca55d639a73f76bfa5e7f5462ab8f -b934c799d0736953a73d91e761767fdb78454355c4b15c680ce08accb57ccf941b13a1236980001f9e6195801cffd692 -8871e8e741157c2c326b22cf09551e78da3c1ec0fc0543136f581f1550f8bab03b0a7b80525c1e99812cdbf3a9698f96 -a8a977f51473a91d178ee8cfa45ffef8d6fd93ab1d6e428f96a3c79816d9c6a93cd70f94d4deda0125fd6816e30f3bea -a7688b3b0a4fc1dd16e8ba6dc758d3cfe1b7cf401c31739484c7fa253cce0967df1b290769bcefc9d23d3e0cb19e6218 -8ae84322662a57c6d729e6ff9d2737698cc2da2daeb1f39e506618750ed23442a6740955f299e4a15dda6db3e534d2c6 -a04a961cdccfa4b7ef83ced17ab221d6a043b2c718a0d6cc8e6f798507a31f10bf70361f70a049bc8058303fa7f96864 -b463e39732a7d9daec8a456fb58e54b30a6e160aa522a18b9a9e836488cce3342bcbb2e1deab0f5e6ec0a8796d77197d -b1434a11c6750f14018a2d3bcf94390e2948f4f187e93bb22070ca3e5393d339dc328cbfc3e48815f51929465ffe7d81 -84ff81d73f3828340623d7e3345553610aa22a5432217ef0ebd193cbf4a24234b190c65ca0873c22d10ea7b63bd1fbed -b6fe2723f0c47757932c2ddde7a4f8434f665612f7b87b4009c2635d56b6e16b200859a8ade49276de0ef27a2b6c970a -9742884ed7cd52b4a4a068a43d3faa02551a424136c85a9313f7cb58ea54c04aa83b0728fd741d1fe39621e931e88f8f -b7d2d65ea4d1ad07a5dee39e40d6c03a61264a56b1585b4d76fc5b2a68d80a93a42a0181d432528582bf08d144c2d6a9 -88c0f66bada89f8a43e5a6ead2915088173d106c76f724f4a97b0f6758aed6ae5c37c373c6b92cdd4aea8f6261f3a374 -81f9c43582cb42db3900747eb49ec94edb2284999a499d1527f03315fd330e5a509afa3bff659853570e9886aab5b28b -821f9d27d6beb416abf9aa5c79afb65a50ed276dbda6060103bc808bcd34426b82da5f23e38e88a55e172f5c294b4d40 -8ba307b9e7cb63a6c4f3851b321aebfdb6af34a5a4c3bd949ff7d96603e59b27ff4dc4970715d35f7758260ff942c9e9 -b142eb6c5f846de33227d0bda61d445a7c33c98f0a8365fe6ab4c1fabdc130849be597ef734305894a424ea715372d08 -a732730ae4512e86a741c8e4c87fee8a05ee840fec0e23b2e037d58dba8dde8d10a9bc5191d34d00598941becbbe467f -adce6f7c30fd221f6b10a0413cc76435c4bb36c2d60bca821e5c67409fe9dbb2f4c36ef85eb3d734695e4be4827e9fd3 -a74f00e0f9b23aff7b2527ce69852f8906dab9d6abe62ecd497498ab21e57542e12af9918d4fd610bb09e10b0929c510 -a593b6b0ef26448ce4eb3ab07e84238fc020b3cb10d542ff4b16d4e2be1bcde3797e45c9cf753b8dc3b0ffdb63984232 -aed3913afccf1aa1ac0eb4980eb8426d0baccebd836d44651fd72af00d09fac488a870223c42aca3ceb39752070405ae -b2c44c66a5ea7fde626548ba4cef8c8710191343d3dadfd3bb653ce715c0e03056a5303a581d47dde66e70ea5a2d2779 -8e5029b2ccf5128a12327b5103f7532db599846e422531869560ceaff392236434d87159f597937dbf4054f810c114f4 -82beed1a2c4477e5eb39fc5b0e773b30cfec77ef2b1bf17eadaf60eb35b6d0dd9d8cf06315c48d3546badb3f21cd0cca -90077bd6cc0e4be5fff08e5d07a5a158d36cebd1d1363125bc4fae0866ffe825b26f933d4ee5427ba5cd0c33c19a7b06 -a7ec0d8f079970e8e34f0ef3a53d3e0e45428ddcef9cc776ead5e542ef06f3c86981644f61c5a637e4faf001fb8c6b3e -ae6d4add6d1a6f90b22792bc9d40723ee6850c27d0b97eefafd5b7fd98e424aa97868b5287cc41b4fbd7023bca6a322c -831aa917533d077da07c01417feaa1408846363ba2b8d22c6116bb858a95801547dd88b7d7fa1d2e3f0a02bdeb2e103d -96511b860b07c8a5ed773f36d4aa9d02fb5e7882753bf56303595bcb57e37ccc60288887eb83bef08c657ec261a021a2 -921d2a3e7e9790f74068623de327443666b634c8443aba80120a45bba450df920b2374d96df1ce3fb1b06dd06f8cf6e3 -aa74451d51fe82b4581ead8e506ec6cd881010f7e7dd51fc388eb9a557db5d3c6721f81c151d08ebd9c2591689fbc13e -a972bfbcf4033d5742d08716c927c442119bdae336bf5dff914523b285ccf31953da2733759aacaa246a9af9f698342c -ad1fcd0cae0e76840194ce4150cb8a56ebed728ec9272035f52a799d480dfc85840a4d52d994a18b6edb31e79be6e8ad -a2c69fe1d36f235215432dad48d75887a44c99dfa0d78149acc74087da215a44bdb5f04e6eef88ff7eff80a5a7decc77 -a94ab2af2b6ee1bc6e0d4e689ca45380d9fbd3c5a65b9bd249d266a4d4c07bf5d5f7ef2ae6000623aee64027892bf8fe -881ec1fc514e926cdc66480ac59e139148ff8a2a7895a49f0dff45910c90cdda97b66441a25f357d6dd2471cddd99bb3 -884e6d3b894a914c8cef946a76d5a0c8351843b2bffa2d1e56c6b5b99c84104381dd1320c451d551c0b966f4086e60f9 -817c6c10ce2677b9fc5223500322e2b880583254d0bb0d247d728f8716f5e05c9ff39f135854342a1afecd9fbdcf7c46 -aaf4a9cb686a14619aa1fc1ac285dd3843ac3dd99f2b2331c711ec87b03491c02f49101046f3c5c538dc9f8dba2a0ac2 -97ecea5ce53ca720b5d845227ae61d70269a2f53540089305c86af35f0898bfd57356e74a8a5e083fa6e1ea70080bd31 -a22d811e1a20a75feac0157c418a4bfe745ccb5d29466ffa854dca03e395b6c3504a734341746b2846d76583a780b32e -940cbaa0d2b2db94ae96b6b9cf2deefbfd059e3e5745de9aec4a25f0991b9721e5cd37ef71c631575d1a0c280b01cd5b -ae33cb4951191258a11044682de861bf8d92d90ce751b354932dd9f3913f542b6a0f8a4dc228b3cd9244ac32c4582832 -a580df5e58c4274fe0f52ac2da1837e32f5c9db92be16c170187db4c358f43e5cfdda7c5911dcc79d77a5764e32325f5 -81798178cb9d8affa424f8d3be67576ba94d108a28ccc01d330c51d5a63ca45bb8ca63a2f569b5c5fe1303cecd2d777f -89975b91b94c25c9c3660e4af4047a8bacf964783010820dbc91ff8281509379cb3b24c25080d5a01174dd9a049118d5 -a7327fcb3710ed3273b048650bde40a32732ef40a7e58cf7f2f400979c177944c8bc54117ba6c80d5d4260801dddab79 -92b475dc8cb5be4b90c482f122a51bcb3b6c70593817e7e2459c28ea54a7845c50272af38119406eaadb9bcb993368d0 -9645173e9ecefc4f2eae8363504f7c0b81d85f8949a9f8a6c01f2d49e0a0764f4eacecf3e94016dd407fc14494fce9f9 -9215fd8983d7de6ae94d35e6698226fc1454977ae58d42d294be9aad13ac821562ad37d5e7ee5cdfe6e87031d45cd197 -810360a1c9b88a9e36f520ab5a1eb8bed93f52deefbe1312a69225c0a08edb10f87cc43b794aced9c74220cefcc57e7d -ad7e810efd61ed4684aeda9ed8bb02fb9ae4b4b63fda8217d37012b94ff1b91c0087043bfa4e376f961fff030c729f3b -8b07c95c6a06db8738d10bb03ec11b89375c08e77f0cab7e672ce70b2685667ca19c7e1c8b092821d31108ea18dfd4c7 -968825d025ded899ff7c57245250535c732836f7565eab1ae23ee7e513201d413c16e1ba3f5166e7ac6cf74de8ceef4f -908243370c5788200703ade8164943ad5f8c458219186432e74dbc9904a701ea307fd9b94976c866e6c58595fd891c4b -959969d16680bc535cdc6339e6186355d0d6c0d53d7bbfb411641b9bf4b770fd5f575beef5deec5c4fa4d192d455c350 -ad177f4f826a961adeac76da40e2d930748effff731756c797eddc4e5aa23c91f070fb69b19221748130b0961e68a6bb -82f8462bcc25448ef7e0739425378e9bb8a05e283ce54aae9dbebaf7a3469f57833c9171672ad43a79778366c72a5e37 -a28fb275b1845706c2814d9638573e9bc32ff552ebaed761fe96fdbce70395891ca41c400ae438369264e31a2713b15f -8a9c613996b5e51dadb587a787253d6081ea446bf5c71096980bf6bd3c4b69905062a8e8a3792de2d2ece3b177a71089 -8d5aefef9f60cb27c1db2c649221204dda48bb9bf8bf48f965741da051340e8e4cab88b9d15c69f3f84f4c854709f48a -93ebf2ca6ad85ab6deace6de1a458706285b31877b1b4d7dcb9d126b63047efaf8c06d580115ec9acee30c8a7212fa55 -b3ee46ce189956ca298057fa8223b7fd1128cf52f39159a58bca03c71dd25161ac13f1472301f72aef3e1993fe1ab269 -a24d7a8d066504fc3f5027ccb13120e2f22896860e02c45b5eba1dbd512d6a17c28f39155ea581619f9d33db43a96f92 -ae9ceacbfe12137db2c1a271e1b34b8f92e4816bad1b3b9b6feecc34df0f8b3b0f7ed0133acdf59c537d43d33fc8d429 -83967e69bf2b361f86361bd705dce0e1ad26df06da6c52b48176fe8dfcbeb03c462c1a4c9e649eff8c654b18c876fdef -9148e6b814a7d779c19c31e33a068e97b597de1f8100513db3c581190513edc4d544801ce3dd2cf6b19e0cd6daedd28a -94ccdafc84920d320ed22de1e754adea072935d3c5f8c2d1378ebe53d140ea29853f056fb3fb1e375846061a038cc9bc -afb43348498c38b0fa5f971b8cdd3a62c844f0eb52bc33daf2f67850af0880fce84ecfb96201b308d9e6168a0d443ae3 -86d5736520a83538d4cd058cc4b4e84213ed00ebd6e7af79ae787adc17a92ba5359e28ba6c91936d967b4b28d24c3070 -b5210c1ff212c5b1e9ef9126e08fe120a41e386bb12c22266f7538c6d69c7fd8774f11c02b81fd4e88f9137b020801fe -b78cfd19f94d24e529d0f52e18ce6185cb238edc6bd43086270fd51dd99f664f43dd4c7d2fe506762fbd859028e13fcf -a6e7220598c554abdcc3fdc587b988617b32c7bb0f82c06205467dbedb58276cc07cae317a190f19d19078773f4c2bbb -b88862809487ee430368dccd85a5d72fa4d163ca4aad15c78800e19c1a95be2192719801e315d86cff7795e0544a77e4 -87ecb13a03921296f8c42ceb252d04716f10e09c93962239fcaa0a7fef93f19ab3f2680bc406170108bc583e9ff2e721 -a810cd473832b6581c36ec4cb403f2849357ba2d0b54df98ef3004b8a530c078032922a81d40158f5fb0043d56477f6e -a247b45dd85ca7fbb718b328f30a03f03c84aef2c583fbdc9fcc9eb8b52b34529e8c8f535505c10598b1b4dac3d7c647 -96ee0b91313c68bac4aa9e065ce9e1d77e51ca4cff31d6a438718c58264dee87674bd97fc5c6b8008be709521e4fd008 -837567ad073e42266951a9a54750919280a2ac835a73c158407c3a2b1904cf0d17b7195a393c71a18ad029cbd9cf79ee -a6a469c44b67ebf02196213e7a63ad0423aab9a6e54acc6fcbdbb915bc043586993454dc3cd9e4be8f27d67c1050879b -8712d380a843b08b7b294f1f06e2f11f4ad6bcc655fdde86a4d8bc739c23916f6fad2b902fe47d6212f03607907e9f0e -920adfb644b534789943cdae1bdd6e42828dda1696a440af2f54e6b97f4f97470a1c6ea9fa6a2705d8f04911d055acd1 -a161c73adf584a0061e963b062f59d90faac65c9b3a936b837a10d817f02fcabfa748824607be45a183dd40f991fe83f -874f4ecd408c76e625ea50bc59c53c2d930ee25baf4b4eca2440bfbffb3b8bc294db579caa7c68629f4d9ec24187c1ba -8bff18087f112be7f4aa654e85c71fef70eee8ae480f61d0383ff6f5ab1a0508f966183bb3fc4d6f29cb7ca234aa50d3 -b03b46a3ca3bc743a173cbc008f92ab1aedd7466b35a6d1ca11e894b9482ea9dc75f8d6db2ddd1add99bfbe7657518b7 -8b4f3691403c3a8ad9e097f02d130769628feddfa8c2b3dfe8cff64e2bed7d6e5d192c1e2ba0ac348b8585e94acd5fa1 -a0d9ca4a212301f97591bf65d5ef2b2664766b427c9dd342e23cb468426e6a56be66b1cb41fea1889ac5d11a8e3c50a5 -8c93ed74188ca23b3df29e5396974b9cc135c91fdefdea6c0df694c8116410e93509559af55533a3776ac11b228d69b1 -82dd331fb3f9e344ebdeeb557769b86a2cc8cc38f6c298d7572a33aea87c261afa9dbd898989139b9fc16bc1e880a099 -a65faedf326bcfd8ef98a51410c78b021d39206704e8291cd1f09e096a66b9b0486be65ff185ca224c45918ac337ddeb -a188b37d363ac072a766fd5d6fa27df07363feff1342217b19e3c37385e42ffde55e4be8355aceaa2f267b6d66b4ac41 -810fa3ba3e96d843e3bafd3f2995727f223d3567c8ba77d684c993ba1773c66551eb5009897c51b3fe9b37196984f5ec -87631537541852da323b4353af45a164f68b304d24c01183bf271782e11687f3fcf528394e1566c2a26cb527b3148e64 -b721cb2b37b3c477a48e3cc0044167d51ff568a5fd2fb606e5aec7a267000f1ddc07d3db919926ae12761a8e017c767c -904dfad4ba2cc1f6e60d1b708438a70b1743b400164cd981f13c064b8328d5973987d4fb9cf894068f29d3deaf624dfb -a70491538893552c20939fae6be2f07bfa84d97e2534a6bbcc0f1729246b831103505e9f60e97a8fa7d2e6c1c2384579 -8726cf1b26b41f443ff7485adcfddc39ace2e62f4d65dd0bb927d933e262b66f1a9b367ded5fbdd6f3b0932553ac1735 -ae8a11cfdf7aa54c08f80cb645e3339187ab3886babe9fae5239ba507bb3dd1c0d161ca474a2df081dcd3d63e8fe445e -92328719e97ce60e56110f30a00ac5d9c7a2baaf5f8d22355d53c1c77941e3a1fec7d1405e6fbf8959665fe2ba7a8cad -8d9d6255b65798d0018a8cccb0b6343efd41dc14ff2058d3eed9451ceaad681e4a0fa6af67b0a04318aa628024e5553d -b70209090055459296006742d946a513f0cba6d83a05249ee8e7a51052b29c0ca9722dc4af5f9816a1b7938a5dac7f79 -aab7b766b9bf91786dfa801fcef6d575dc6f12b77ecc662eb4498f0312e54d0de9ea820e61508fc8aeee5ab5db529349 -a8104b462337748b7f086a135d0c3f87f8e51b7165ca6611264b8fb639d9a2f519926cb311fa2055b5fadf03da70c678 -b0d2460747d5d8b30fc6c6bd0a87cb343ddb05d90a51b465e8f67d499cfc5e3a9e365da05ae233bbee792cdf90ec67d5 -aa55f5bf3815266b4a149f85ed18e451c93de9163575e3ec75dd610381cc0805bb0a4d7c4af5b1f94d10231255436d2c -8d4c6a1944ff94426151909eb5b99cfd92167b967dabe2bf3aa66bb3c26c449c13097de881b2cfc1bf052862c1ef7b03 -8862296162451b9b6b77f03bf32e6df71325e8d7485cf3335d66fd48b74c2a8334c241db8263033724f26269ad95b395 -901aa96deb26cda5d9321190ae6624d357a41729d72ef1abfd71bebf6139af6d690798daba53b7bc5923462115ff748a -96c195ec4992728a1eb38cdde42d89a7bce150db43adbc9e61e279ea839e538deec71326b618dd39c50d589f78fc0614 -b6ff8b8aa0837b99a1a8b46fb37f20ad4aecc6a98381b1308697829a59b8442ffc748637a88cb30c9b1f0f28a926c4f6 -8d807e3dca9e7bef277db1d2cfb372408dd587364e8048b304eff00eacde2c723bfc84be9b98553f83cba5c7b3cba248 -8800c96adb0195c4fc5b24511450dee503c32bf47044f5e2e25bd6651f514d79a2dd9b01cd8c09f3c9d3859338490f57 -89fe366096097e38ec28dd1148887112efa5306cc0c3da09562aafa56f4eb000bf46ff79bf0bdd270cbde6bf0e1c8957 -af409a90c2776e1e7e3760b2042507b8709e943424606e31e791d42f17873a2710797f5baaab4cc4a19998ef648556b0 -8d761863c9b6edbd232d35ab853d944f5c950c2b643f84a1a1327ebb947290800710ff01dcfa26dc8e9828481240e8b1 -90b95e9be1e55c463ed857c4e0617d6dc3674e99b6aa62ed33c8e79d6dfcf7d122f4f4cc2ee3e7c5a49170cb617d2e2e -b3ff381efefabc4db38cc4727432e0301949ae4f16f8d1dea9b4f4de611cf5a36d84290a0bef160dac4e1955e516b3b0 -a8a84564b56a9003adcadb3565dc512239fc79572762cda7b5901a255bc82656bb9c01212ad33d6bef4fbbce18dacc87 -90a081890364b222eef54bf0075417f85e340d2fec8b7375995f598aeb33f26b44143ebf56fca7d8b4ebb36b5747b0eb -ade6ee49e1293224ddf2d8ab7f14bb5be6bc6284f60fd5b3a1e0cf147b73cff57cf19763b8a36c5083badc79c606b103 -b2fa99806dd2fa3de09320b615a2570c416c9bcdb052e592b0aead748bbe407ec9475a3d932ae48b71c2627eb81986a6 -91f3b7b73c8ccc9392542711c45fe6f236057e6efad587d661ad5cb4d6e88265f86b807bb1151736b1009ab74fd7acb4 -8800e2a46af96696dfbdcbf2ca2918b3dcf28ad970170d2d1783b52b8d945a9167d052beeb55f56c126da7ffa7059baa -9862267a1311c385956b977c9aa08548c28d758d7ba82d43dbc3d0a0fd1b7a221d39e8399997fea9014ac509ff510ac4 -b7d24f78886fd3e2d283e18d9ad5a25c1a904e7d9b9104bf47da469d74f34162e27e531380dbbe0a9d051e6ffd51d6e7 -b0f445f9d143e28b9df36b0f2c052da87ee2ca374d9d0fbe2eff66ca6fe5fe0d2c1951b428d58f7314b7e74e45d445ea -b63fc4083eabb8437dafeb6a904120691dcb53ce2938b820bb553da0e1eecd476f72495aacb72600cf9cad18698fd3db -b9ffd8108eaebd582d665f8690fe8bb207fd85185e6dd9f0b355a09bac1bbff26e0fdb172bc0498df025414e88fe2eda -967ed453e1f1a4c5b7b6834cc9f75c13f6889edc0cc91dc445727e9f408487bbf05c337103f61397a10011dfbe25d61d -98ceb673aff36e1987d5521a3984a07079c3c6155974bb8b413e8ae1ce84095fe4f7862fba7aefa14753eb26f2a5805f -85f01d28603a8fdf6ce6a50cb5c44f8a36b95b91302e3f4cd95c108ce8f4d212e73aec1b8d936520d9226802a2bd9136 -88118e9703200ca07910345fbb789e7a8f92bd80bbc79f0a9e040e8767d33df39f6eded403a9b636eabf9101e588482a -90833a51eef1b10ed74e8f9bbd6197e29c5292e469c854eed10b0da663e2bceb92539710b1858bbb21887bd538d28d89 -b513b905ec19191167c6193067b5cfdf5a3d3828375360df1c7e2ced5815437dfd37f0c4c8f009d7fb29ff3c8793f560 -b1b6d405d2d18f9554b8a358cc7e2d78a3b34269737d561992c8de83392ac9a2857be4bf15de5a6c74e0c9d0f31f393c -b828bd3e452b797323b798186607849f85d1fb20c616833c0619360dfd6b3e3aa000fd09dafe4b62d74abc41072ff1a9 -8efde67d0cca56bb2c464731879c9ac46a52e75bac702a63200a5e192b4f81c641f855ca6747752b84fe469cb7113b6c -b2762ba1c89ac3c9a983c242e4d1c2610ff0528585ed5c0dfc8a2c0253551142af9b59f43158e8915a1da7cc26b9df67 -8a3f1157fb820d1497ef6b25cd70b7e16bb8b961b0063ad340d82a79ee76eb2359ca9e15e6d42987ed7f154f5eeaa2da -a75e29f29d38f09c879f971c11beb5368affa084313474a5ecafa2896180b9e47ea1995c2733ec46f421e395a1d9cffe -8e8c3dd3e7196ef0b4996b531ec79e4a1f211db5d5635e48ceb80ff7568b2ff587e845f97ee703bb23a60945ad64314a -8e7f32f4a3e3c584af5e3d406924a0aa34024c42eca74ef6cc2a358fd3c9efaf25f1c03aa1e66bb94b023a2ee2a1cace -ab7dce05d59c10a84feb524fcb62478906b3fa045135b23afbede3bb32e0c678d8ebe59feabccb5c8f3550ea76cae44b -b38bb4b44d827f6fd3bd34e31f9186c59e312dbfadd4a7a88e588da10146a78b1f8716c91ad8b806beb8da65cab80c4c -9490ce9442bbbd05438c7f5c4dea789f74a7e92b1886a730544b55ba377840740a3ae4f2f146ee73f47c9278b0e233bc -83c003fab22a7178eed1a668e0f65d4fe38ef3900044e9ec63070c23f2827d36a1e73e5c2b883ec6a2afe2450171b3b3 -9982f02405978ddc4fca9063ebbdb152f524c84e79398955e66fe51bc7c1660ec1afc3a86ec49f58d7b7dde03505731c -ab337bd83ccdd2322088ffa8d005f450ced6b35790f37ab4534313315ee84312adc25e99cce052863a8bedee991729ed -8312ce4bec94366d88f16127a17419ef64285cd5bf9e5eda010319b48085966ed1252ed2f5a9fd3e0259b91bb65f1827 -a60d5a6327c4041b0c00a1aa2f0af056520f83c9ce9d9ccd03a0bd4d9e6a1511f26a422ea86bd858a1f77438adf07e6c -b84a0a0b030bdad83cf5202aa9afe58c9820e52483ab41f835f8c582c129ee3f34aa096d11c1cd922eda02ea1196a882 -8077d105317f4a8a8f1aadeb05e0722bb55f11abcb490c36c0904401107eb3372875b0ac233144829e734f0c538d8c1d -9202503bd29a6ec198823a1e4e098f9cfe359ed51eb5174d1ca41368821bfeebcbd49debfd02952c41359d1c7c06d2b1 -abc28c155e09365cb77ffead8dc8f602335ef93b2f44e4ef767ce8fc8ef9dd707400f3a722e92776c2e0b40192c06354 -b0f6d1442533ca45c9399e0a63a11f85ff288d242cea6cb3b68c02e77bd7d158047cae2d25b3bcd9606f8f66d9b32855 -b01c3d56a0db84dc94575f4b6ee2de4beca3230e86bed63e2066beb22768b0a8efb08ebaf8ac3dedb5fe46708b084807 -8c8634b0432159f66feaabb165842d1c8ac378f79565b1b90c381aa8450eb4231c3dad11ec9317b9fc2b155c3a771e32 -8e67f623d69ecd430c9ee0888520b6038f13a2b6140525b056dc0951f0cfed2822e62cf11d952a483107c5c5acac4826 -9590bb1cba816dd6acd5ac5fba5142c0a19d53573e422c74005e0bcf34993a8138c83124cad35a3df65879dba6134edd -801cd96cde0749021a253027118d3ea135f3fcdbe895db08a6c145641f95ebd368dd6a1568d995e1d0084146aebe224a -848b5d196427f6fc1f762ee3d36e832b64a76ec1033cfedc8b985dea93932a7892b8ef1035c653fb9dcd9ab2d9a44ac8 -a1017eb83d5c4e2477e7bd2241b2b98c4951a3b391081cae7d75965cadc1acaec755cf350f1f3d29741b0828e36fedea -8d6d2785e30f3c29aad17bd677914a752f831e96d46caf54446d967cb2432be2c849e26f0d193a60bee161ea5c6fe90a -935c0ba4290d4595428e034b5c8001cbd400040d89ab00861108e8f8f4af4258e41f34a7e6b93b04bc253d3b9ffc13bf -aac02257146246998477921cef2e9892228590d323b839f3e64ea893b991b463bc2f47e1e5092ddb47e70b2f5bce7622 -b921fde9412970a5d4c9a908ae8ce65861d06c7679af577cf0ad0d5344c421166986bee471fd6a6cecb7d591f06ec985 -8ef4c37487b139d6756003060600bb6ebac7ea810b9c4364fc978e842f13ac196d1264fbe5af60d76ff6d9203d8e7d3f -94b65e14022b5cf6a9b95f94be5ace2711957c96f4211c3f7bb36206bd39cfbd0ea82186cab5ad0577a23214a5c86e9e -a31c166d2a2ca1d5a75a5920fef7532681f62191a50d8555fdaa63ba4581c3391cc94a536fc09aac89f64eafceec3f90 -919a8cc128de01e9e10f5d83b08b52293fdd41bde2b5ae070f3d95842d4a16e5331cf2f3d61c765570c8022403610fa4 -b23d6f8331eef100152d60483cfa14232a85ee712c8538c9b6417a5a7c5b353c2ac401390c6c215cb101f5cee6b5f43e -ab357160c08a18319510a571eafff154298ce1020de8e1dc6138a09fcb0fcbcdd8359f7e9386bda00b7b9cdea745ffdc -ab55079aea34afa5c0bd1124b9cdfe01f325b402fdfa017301bf87812eaa811ea5798c3aaf818074d420d1c782b10ada -ade616010dc5009e7fc4f8d8b00dc716686a5fa0a7816ad9e503e15839d3b909b69d9dd929b7575376434ffec0d2bea8 -863997b97ed46898a8a014599508fa3079f414b1f4a0c4fdc6d74ae8b444afa350f327f8bfc2a85d27f9e2d049c50135 -8d602ff596334efd4925549ed95f2aa762b0629189f0df6dbb162581657cf3ea6863cd2287b4d9c8ad52813d87fcd235 -b70f68c596dcdeed92ad5c6c348578b26862a51eb5364237b1221e840c47a8702f0fbc56eb520a22c0eed99795d3903e -9628088f8e0853cefadee305a8bf47fa990c50fa96a82511bbe6e5dc81ef4b794e7918a109070f92fc8384d77ace226f -97e26a46e068b605ce96007197ecd943c9a23881862f4797a12a3e96ba2b8d07806ad9e2a0646796b1889c6b7d75188c -b1edf467c068cc163e2d6413cc22b16751e78b3312fe47b7ea82b08a1206d64415b2c8f2a677fa89171e82cc49797150 -a44d15ef18745b251429703e3cab188420e2d974de07251501799b016617f9630643fcd06f895634d8ecdd579e1bf000 -abd126df3917ba48c618ee4dbdf87df506193462f792874439043fa1b844466f6f4e0ff2e42516e63b5b23c0892b2695 -a2a67f57c4aa3c2aa1eeddbfd5009a89c26c2ce8fa3c96a64626aba19514beb125f27df8559506f737de3eae0f1fc18f -a633e0132197e6038197304b296ab171f1d8e0d0f34dcf66fe9146ac385b0239232a8470b9205a4802ab432389f4836d -a914b3a28509a906c3821463b936455d58ff45dcbe158922f9efb2037f2eb0ce8e92532d29b5d5a3fcd0d23fa773f272 -a0e1412ce4505daf1a2e59ce4f0fc0e0023e335b50d2b204422f57cd65744cc7a8ed35d5ef131a42c70b27111d3115b7 -a2339e2f2b6072e88816224fdd612c04d64e7967a492b9f8829db15367f565745325d361fd0607b0def1be384d010d9e -a7309fc41203cb99382e8193a1dcf03ac190a7ce04835304eb7e341d78634e83ea47cb15b885601956736d04cdfcaa01 -81f3ccd6c7f5b39e4e873365f8c37b214e8ab122d04a606fbb7339dc3298c427e922ec7418002561d4106505b5c399ee -92c121cf914ca549130e352eb297872a63200e99b148d88fbc9506ad882bec9d0203d65f280fb5b0ba92e336b7f932e8 -a4b330cf3f064f5b131578626ad7043ce2a433b6f175feb0b52d36134a454ca219373fd30d5e5796410e005b69082e47 -86fe5774112403ad83f9c55d58317eeb17ad8e1176d9f2f69c2afb7ed83bc718ed4e0245ceab4b377f5f062dcd4c00e7 -809d152a7e2654c7fd175b57f7928365a521be92e1ed06c05188a95864ddb25f7cab4c71db7d61bbf4cae46f3a1d96ce -b82d663e55c2a5ada7e169e9b1a87bc1c0177baf1ec1c96559b4cb1c5214ce1ddf2ab8d345014cab6402f3774235cf5a -86580af86df1bd2c385adb8f9a079e925981b7184db66fc5fe5b14cddb82e7d836b06eaeef14924ac529487b23dae111 -b5f5f4c5c94944ecc804df6ab8687d64e27d988cbfeae1ba7394e0f6adbf778c5881ead7cd8082dd7d68542b9bb4ecd5 -a6016916146c2685c46e8fdd24186394e2d5496e77e08c0c6a709d4cd7dfa97f1efcef94922b89196819076a91ad37b5 -b778e7367ded3b6eab53d5fc257f7a87e8faf74a593900f2f517220add2125be3f6142022660d8181df8d164ad9441ce -8581b2d36abe6f553add4d24be761bec1b8efaa2929519114346615380b3c55b59e6ad86990e312f7e234d0203bdf59b -9917e74fd45c3f71a829ff5498a7f6b5599b48c098dda2339bf04352bfc7f368ccf1a407f5835901240e76452ae807d7 -afd196ce6f9335069138fd2e3d133134da253978b4ce373152c0f26affe77a336505787594022e610f8feb722f7cc1fb -a477491a1562e329764645e8f24d8e228e5ef28c9f74c6b5b3abc4b6a562c15ffb0f680d372aed04d9e1bf944dece7be -9767440d58c57d3077319d3a330e5322b9ba16981ec74a5a14d53462eab59ae7fd2b14025bfc63b268862094acb444e6 -80986d921be3513ef69264423f351a61cb48390c1be8673aee0f089076086aaebea7ebe268fd0aa7182695606116f679 -a9554c5c921c07b450ee04e34ec58e054ac1541b26ce2ce5a393367a97348ba0089f53db6660ad76b60278b66fd12e3e -95097e7d2999b3e84bf052c775581cf361325325f4a50192521d8f4693c830bed667d88f482dc1e3f833aa2bd22d2cbf -9014c91d0f85aefd28436b5228c12f6353c055a9326c7efbf5e071e089e2ee7c070fcbc84c5fafc336cbb8fa6fec1ca1 -90f57ba36ee1066b55d37384942d8b57ae00f3cf9a3c1d6a3dfee1d1af42d4b5fa9baeb0cd7e46687d1d6d090ddb931d -8e4b1db12fd760a17214c9e47f1fce6e43c0dbb4589a827a13ac61aaae93759345697bb438a00edab92e0b7b62414683 -8022a959a513cdc0e9c705e0fc04eafd05ff37c867ae0f31f6d01cddd5df86138a426cab2ff0ac8ff03a62e20f7e8f51 -914e9a38829834c7360443b8ed86137e6f936389488eccf05b4b4db7c9425611705076ecb3f27105d24b85c852be7511 -957fb10783e2bd0db1ba66b18e794df710bc3b2b05776be146fa5863c15b1ebdd39747b1a95d9564e1772cdfc4f37b8a -b6307028444daed8ed785ac9d0de76bc3fe23ff2cc7e48102553613bbfb5afe0ebe45e4212a27021c8eb870721e62a1f -8f76143597777d940b15a01b39c5e1b045464d146d9a30a6abe8b5d3907250e6c7f858ff2308f8591e8b0a7b3f3c568a -96163138ac0ce5fd00ae9a289648fd9300a0ca0f63a88481d703ecd281c06a52a3b5178e849e331f9c85ca4ba398f4cc -a63ef47c3e18245b0482596a09f488a716df3cbd0f9e5cfabed0d742843e65db8961c556f45f49762f3a6ac8b627b3ef -8cb595466552e7c4d42909f232d4063e0a663a8ef6f6c9b7ce3a0542b2459cde04e0e54c7623d404acb5b82775ac04f6 -b47fe69960eb45f399368807cff16d941a5a4ebad1f5ec46e3dc8a2e4d598a7e6114d8f0ca791e9720fd786070524e2b -89eb5ff83eea9df490e5beca1a1fbbbbcf7184a37e2c8c91ede7a1e654c81e8cd41eceece4042ea7918a4f4646b67fd6 -a84f5d155ed08b9054eecb15f689ba81e44589e6e7207a99790c598962837ca99ec12344105b16641ca91165672f7153 -a6cc8f25c2d5b2d2f220ec359e6a37a52b95fa6af6e173c65e7cd55299eff4aa9e6d9e6f2769e6459313f1f2aecb0fab -afcde944411f017a9f7979755294981e941cc41f03df5e10522ef7c7505e5f1babdd67b3bf5258e8623150062eb41d9b -8fab39f39c0f40182fcd996ade2012643fe7731808afbc53f9b26900b4d4d1f0f5312d9d40b3df8baa4739970a49c732 -ae193af9726da0ebe7df1f9ee1c4846a5b2a7621403baf8e66c66b60f523e719c30c6b4f897bb14b27d3ff3da8392eeb -8ac5adb82d852eba255764029f42e6da92dcdd0e224d387d1ef94174038db9709ac558d90d7e7c57ad4ce7f89bbfc38c -a2066b3458fdf678ee487a55dd5bfb74fde03b54620cb0e25412a89ee28ad0d685e309a51e3e4694be2fa6f1593a344c -88d031745dd0ae07d61a15b594be5d4b2e2a29e715d081649ad63605e3404b0c3a5353f0fd9fad9c05c18e93ce674fa1 -8283cfb0ef743a043f2b77ecaeba3005e2ca50435585b5dd24777ee6bce12332f85e21b446b536da38508807f0f07563 -b376de22d5f6b0af0b59f7d9764561f4244cf8ffe22890ecd3dcf2ff1832130c9b821e068c9d8773136f4796721e5963 -ae3afc50c764f406353965363840bf28ee85e7064eb9d5f0bb3c31c64ab10f48c853e942ee2c9b51bae59651eaa08c2f -948b204d103917461a01a6c57a88f2d66b476eae5b00be20ec8c747650e864bc8a83aee0aff59cb7584b7a3387e0ee48 -81ab098a082b07f896c5ffd1e4446cb7fb44804cbbf38d125208b233fc82f8ec9a6a8d8dd1c9a1162dc28ffeec0dde50 -a149c6f1312821ced2969268789a3151bdda213451760b397139a028da609c4134ac083169feb0ee423a0acafd10eceb -b0ac9e27a5dadaf523010f730b28f0ebac01f460d3bbbe277dc9d44218abb5686f4fac89ae462682fef9edbba663520a -8d0e0073cca273daaaa61b6fc54bfe5a009bc3e20ae820f6c93ba77b19eca517d457e948a2de5e77678e4241807157cb -ad61d3a2edf7c7533a04964b97499503fd8374ca64286dba80465e68fe932e96749b476f458c6fc57cb1a7ca85764d11 -90eb5e121ae46bc01a30881eaa556f46bd8457a4e80787cf634aab355082de34ac57d7f497446468225f7721e68e2a47 -8cdac557de7c42d1f3780e33dec1b81889f6352279be81c65566cdd4952d4c15d79e656cbd46035ab090b385e90245ef -82b67e61b88b84f4f4d4f65df37b3e3dcf8ec91ea1b5c008fdccd52da643adbe6468a1cfdb999e87d195afe2883a3b46 -8503b467e8f5d6048a4a9b78496c58493a462852cab54a70594ae3fd064cfd0deb4b8f336a262155d9fedcaa67d2f6fd -8db56c5ac763a57b6ce6832930c57117058e3e5a81532b7d19346346205e2ec614eb1a2ee836ef621de50a7bc9b7f040 -ad344699198f3c6e8c0a3470f92aaffc805b76266734414c298e10b5b3797ca53578de7ccb2f458f5e0448203f55282b -80602032c43c9e2a09154cc88b83238343b7a139f566d64cb482d87436b288a98f1ea244fd3bff8da3c398686a900c14 -a6385bd50ecd548cfb37174cdbb89e10025b5cadaf3cff164c95d7aef5a33e3d6a9bf0c681b9e11db9ef54ebeee2a0c1 -abf2d95f4aa34b0581eb9257a0cc8462b2213941a5deb8ba014283293e8b36613951b61261cc67bbd09526a54cbbff76 -a3d5de52f48df72c289ff713e445991f142390798cd42bd9d9dbefaee4af4f5faf09042d126b975cf6b98711c3072553 -8e627302ff3d686cff8872a1b7c2a57b35f45bf2fc9aa42b049d8b4d6996a662b8e7cbac6597f0cb79b0cc4e29fbf133 -8510702e101b39a1efbf4e504e6123540c34b5689645e70d0bac1ecc1baf47d86c05cef6c4317a4e99b4edaeb53f2d00 -aa173f0ecbcc6088f878f8726d317748c81ebf501bba461f163b55d66099b191ec7c55f7702f351a9c8eb42cfa3280e2 -b560a697eafab695bcef1416648a0a664a71e311ecbe5823ae903bd0ed2057b9d7574b9a86d3fe22aa3e6ddce38ea513 -8df6304a3d9cf40100f3f687575419c998cd77e5cc27d579cf4f8e98642de3609af384a0337d145dd7c5635172d26a71 -8105c7f3e4d30a29151849673853b457c1885c186c132d0a98e63096c3774bc9deb956cf957367e633d0913680bda307 -95373fc22c0917c3c2044ac688c4f29a63ed858a45c0d6d2d0fe97afd6f532dcb648670594290c1c89010ecc69259bef -8c2fae9bcadab341f49b55230310df93cac46be42d4caa0d42e45104148a91e527af1b4209c0d972448162aed28fab64 -b05a77baab70683f76209626eaefdda2d36a0b66c780a20142d23c55bd479ddd4ad95b24579384b6cf62c8eb4c92d021 -8e6bc6a7ea2755b4aaa19c1c1dee93811fcde514f03485fdc3252f0ab7f032c315614f6336e57cea25dcfb8fb6084eeb -b656a27d06aade55eadae2ad2a1059198918ea6cc3fd22c0ed881294d34d5ac7b5e4700cc24350e27d76646263b223aa -a296469f24f6f56da92d713afcd4dd606e7da1f79dc4e434593c53695847eefc81c7c446486c4b3b8c8d00c90c166f14 -87a326f57713ac2c9dffeb3af44b9f3c613a8f952676fc46343299122b47ee0f8d792abaa4b5db6451ced5dd153aabd0 -b689e554ba9293b9c1f6344a3c8fcb6951d9f9eac4a2e2df13de021aade7c186be27500e81388e5b8bcab4c80f220a31 -87ae0aa0aa48eac53d1ca5a7b93917de12db9e40ceabf8fdb40884ae771cfdf095411deef7c9f821af0b7070454a2608 -a71ffa7eae8ace94e6c3581d4cb2ad25d48cbd27edc9ec45baa2c8eb932a4773c3272b2ffaf077b40f76942a1f3af7f2 -94c218c91a9b73da6b7a495b3728f3028df8ad9133312fc0c03e8c5253b7ccb83ed14688fd4602e2fd41f29a0bc698bd -ae1e77b90ca33728af07a4c03fb2ef71cd92e2618e7bf8ed4d785ce90097fc4866c29999eb84a6cf1819d75285a03af2 -b7a5945b277dab9993cf761e838b0ac6eaa903d7111fca79f9fde3d4285af7a89bf6634a71909d095d7619d913972c9c -8c43b37be02f39b22029b20aca31bff661abce4471dca88aa3bddefd9c92304a088b2dfc8c4795acc301ca3160656af2 -b32e5d0fba024554bd5fe8a793ebe8003335ddd7f585876df2048dcf759a01285fecb53daae4950ba57f3a282a4d8495 -85ea7fd5e10c7b659df5289b2978b2c89e244f269e061b9a15fcab7983fc1962b63546e82d5731c97ec74b6804be63ef -96b89f39181141a7e32986ac02d7586088c5a9662cec39843f397f3178714d02f929af70630c12cbaba0268f8ba2d4fa -929ab1a2a009b1eb37a2817c89696a06426529ebe3f306c586ab717bd34c35a53eca2d7ddcdef36117872db660024af9 -a696dccf439e9ca41511e16bf3042d7ec0e2f86c099e4fc8879d778a5ea79e33aa7ce96b23dc4332b7ba26859d8e674d -a8fe69a678f9a194b8670a41e941f0460f6e2dbc60470ab4d6ae2679cc9c6ce2c3a39df2303bee486dbfde6844e6b31a -95f58f5c82de2f2a927ca99bf63c9fc02e9030c7e46d0bf6b67fe83a448d0ae1c99541b59caf0e1ccab8326231af09a5 -a57badb2c56ca2c45953bd569caf22968f76ed46b9bac389163d6fe22a715c83d5e94ae8759b0e6e8c2f27bff7748f3f -868726fd49963b24acb5333364dffea147e98f33aa19c7919dc9aca0fd26661cfaded74ede7418a5fadbe7f5ae67b67b -a8d8550dcc64d9f1dd7bcdab236c4122f2b65ea404bb483256d712c7518f08bb028ff8801f1da6aed6cbfc5c7062e33b -97e25a87dae23155809476232178538d4bc05d4ff0882916eb29ae515f2a62bfce73083466cc0010ca956aca200aeacc -b4ea26be3f4bd04aa82d7c4b0913b97bcdf5e88b76c57eb1a336cbd0a3eb29de751e1bc47c0e8258adec3f17426d0c71 -99ee555a4d9b3cf2eb420b2af8e3bc99046880536116d0ce7193464ac40685ef14e0e3c442f604e32f8338cb0ef92558 -8c64efa1da63cd08f319103c5c7a761221080e74227bbc58b8fb35d08aa42078810d7af3e60446cbaff160c319535648 -8d9fd88040076c28420e3395cbdfea402e4077a3808a97b7939d49ecbcf1418fe50a0460e1c1b22ac3f6e7771d65169a -ae3c19882d7a9875d439265a0c7003c8d410367627d21575a864b9cb4918de7dbdb58a364af40c5e045f3df40f95d337 -b4f7bfacab7b2cafe393f1322d6dcc6f21ffe69cd31edc8db18c06f1a2b512c27bd0618091fd207ba8df1808e9d45914 -94f134acd0007c623fb7934bcb65ef853313eb283a889a3ffa79a37a5c8f3665f3d5b4876bc66223610c21dc9b919d37 -aa15f74051171daacdc1f1093d3f8e2d13da2833624b80a934afec86fc02208b8f55d24b7d66076444e7633f46375c6a -a32d6bb47ef9c836d9d2371807bafbbbbb1ae719530c19d6013f1d1f813c49a60e4fa51d83693586cba3a840b23c0404 -b61b3599145ea8680011aa2366dc511a358b7d67672d5b0c5be6db03b0efb8ca5a8294cf220ea7409621f1664e00e631 -859cafc3ee90b7ececa1ed8ef2b2fc17567126ff10ca712d5ffdd16aa411a5a7d8d32c9cab1fbf63e87dce1c6e2f5f53 -a2fef1b0b2874387010e9ae425f3a9676d01a095d017493648bcdf3b31304b087ccddb5cf76abc4e1548b88919663b6b -939e18c73befc1ba2932a65ede34c70e4b91e74cc2129d57ace43ed2b3af2a9cc22a40fbf50d79a63681b6d98852866d -b3b4259d37b1b14aee5b676c9a0dd2d7f679ab95c120cb5f09f9fbf10b0a920cb613655ddb7b9e2ba5af4a221f31303c -997255fe51aaca6e5a9cb3359bcbf25b2bb9e30649bbd53a8a7c556df07e441c4e27328b38934f09c09d9500b5fabf66 -abb91be2a2d860fd662ed4f1c6edeefd4da8dc10e79251cf87f06029906e7f0be9b486462718f0525d5e049472692cb7 -b2398e593bf340a15f7801e1d1fbda69d93f2a32a889ec7c6ae5e8a37567ac3e5227213c1392ee86cfb3b56ec2787839 -8ddf10ccdd72922bed36829a36073a460c2118fc7a56ff9c1ac72581c799b15c762cb56cb78e3d118bb9f6a7e56cb25e -93e6bc0a4708d16387cacd44cf59363b994dc67d7ada7b6d6dbd831c606d975247541b42b2a309f814c1bfe205681fc6 -b93fc35c05998cffda2978e12e75812122831523041f10d52f810d34ff71944979054b04de0117e81ddf5b0b4b3e13c0 -92221631c44d60d68c6bc7b287509f37ee44cbe5fdb6935cee36b58b17c7325098f98f7910d2c3ca5dc885ad1d6dabc7 -a230124424a57fad3b1671f404a94d7c05f4c67b7a8fbacfccea28887b78d7c1ed40b92a58348e4d61328891cd2f6cee -a6a230edb8518a0f49d7231bc3e0bceb5c2ac427f045819f8584ba6f3ae3d63ed107a9a62aad543d7e1fcf1f20605706 -845be1fe94223c7f1f97d74c49d682472585d8f772762baad8a9d341d9c3015534cc83d102113c51a9dea2ab10d8d27b -b44262515e34f2db597c8128c7614d33858740310a49cdbdf9c8677c5343884b42c1292759f55b8b4abc4c86e4728033 -805592e4a3cd07c1844bc23783408310accfdb769cca882ad4d07d608e590a288b7370c2cb327f5336e72b7083a0e30f -95153e8b1140df34ee864f4ca601cb873cdd3efa634af0c4093fbaede36f51b55571ab271e6a133020cd34db8411241f -82878c1285cfa5ea1d32175c9401f3cc99f6bb224d622d3fd98cc7b0a27372f13f7ab463ce3a33ec96f9be38dbe2dfe3 -b7588748f55783077c27fc47d33e20c5c0f5a53fc0ac10194c003aa09b9f055d08ec971effa4b7f760553997a56967b3 -b36b4de6d1883b6951f59cfae381581f9c6352fcfcf1524fccdab1571a20f80441d9152dc6b48bcbbf00371337ca0bd5 -89c5523f2574e1c340a955cbed9c2f7b5fbceb260cb1133160dabb7d41c2f613ec3f6e74bbfab3c4a0a6f0626dbe068f -a52f58cc39f968a9813b1a8ddc4e83f4219e4dd82c7aa1dd083bea7edf967151d635aa9597457f879771759b876774e4 -8300a67c2e2e123f89704abfde095463045dbd97e20d4c1157bab35e9e1d3d18f1f4aaba9cbe6aa2d544e92578eaa1b6 -ac6a7f2918768eb6a43df9d3a8a04f8f72ee52f2e91c064c1c7d75cad1a3e83e5aba9fe55bb94f818099ac91ccf2e961 -8d64a2b0991cf164e29835c8ddef6069993a71ec2a7de8157bbfa2e00f6367be646ed74cbaf524f0e9fe13fb09fa15fd -8b2ffe5a545f9f680b49d0a9797a4a11700a2e2e348c34a7a985fc278f0f12def6e06710f40f9d48e4b7fbb71e072229 -8ab8f71cd337fa19178924e961958653abf7a598e3f022138b55c228440a2bac4176cea3aea393549c03cd38a13eb3fc -8419d28318c19ea4a179b7abb43669fe96347426ef3ac06b158d79c0acf777a09e8e770c2fb10e14b3a0421705990b23 -8bacdac310e1e49660359d0a7a17fe3d334eb820e61ae25e84cb52f863a2f74cbe89c2e9fc3283745d93a99b79132354 -b57ace3fa2b9f6b2db60c0d861ace7d7e657c5d35d992588aeed588c6ce3a80b6f0d49f8a26607f0b17167ab21b675e4 -83e265cde477f2ecc164f49ddc7fb255bb05ff6adc347408353b7336dc3a14fdedc86d5a7fb23f36b8423248a7a67ed1 -a60ada971f9f2d79d436de5d3d045f5ab05308cae3098acaf5521115134b2a40d664828bb89895840db7f7fb499edbc5 -a63eea12efd89b62d3952bf0542a73890b104dd1d7ff360d4755ebfa148fd62de668edac9eeb20507967ea37fb220202 -a0275767a270289adc991cc4571eff205b58ad6d3e93778ddbf95b75146d82517e8921bd0d0564e5b75fa0ccdab8e624 -b9b03fd3bf07201ba3a039176a965d736b4ef7912dd9e9bf69fe1b57c330a6aa170e5521fe8be62505f3af81b41d7806 -a95f640e26fb1106ced1729d6053e41a16e4896acac54992279ff873e5a969aad1dcfa10311e28b8f409ac1dab7f03bb -b144778921742418053cb3c70516c63162c187f00db2062193bb2c14031075dbe055d020cde761b26e8c58d0ea6df2c1 -8432fbb799e0435ef428d4fefc309a05dd589bce74d7a87faf659823e8c9ed51d3e42603d878e80f439a38be4321c2fa -b08ddef14e42d4fd5d8bf39feb7485848f0060d43b51ed5bdda39c05fe154fb111d29719ee61a23c392141358c0cfcff -8ae3c5329a5e025b86b5370e06f5e61177df4bda075856fade20a17bfef79c92f54ed495f310130021ba94fb7c33632b -92b6d3c9444100b4d7391febfc1dddaa224651677c3695c47a289a40d7a96d200b83b64e6d9df51f534564f272a2c6c6 -b432bc2a3f93d28b5e506d68527f1efeb2e2570f6be0794576e2a6ef9138926fdad8dd2eabfa979b79ab7266370e86bc -8bc315eacedbcfc462ece66a29662ca3dcd451f83de5c7626ef8712c196208fb3d8a0faf80b2e80384f0dd9772f61a23 -a72375b797283f0f4266dec188678e2b2c060dfed5880fc6bb0c996b06e91a5343ea2b695adaab0a6fd183b040b46b56 -a43445036fbaa414621918d6a897d3692fdae7b2961d87e2a03741360e45ebb19fcb1703d23f1e15bb1e2babcafc56ac -b9636b2ffe305e63a1a84bd44fb402442b1799bd5272638287aa87ca548649b23ce8ce7f67be077caed6aa2dbc454b78 -99a30bf0921d854c282b83d438a79f615424f28c2f99d26a05201c93d10378ab2cd94a792b571ddae5d4e0c0013f4006 -8648e3c2f93d70b392443be116b48a863e4b75991bab5db656a4ef3c1e7f645e8d536771dfe4e8d1ceda3be8d32978b0 -ab50dc9e6924c1d2e9d2e335b2d679fc7d1a7632e84964d3bac0c9fe57e85aa5906ec2e7b0399d98ddd022e9b19b5904 -ab729328d98d295f8f3272afaf5d8345ff54d58ff9884da14f17ecbdb7371857fdf2f3ef58080054e9874cc919b46224 -83fa5da7592bd451cad3ad7702b4006332b3aae23beab4c4cb887fa6348317d234bf62a359e665b28818e5410c278a09 -8bdbff566ae9d368f114858ef1f009439b3e9f4649f73efa946e678d6c781d52c69af195df0a68170f5f191b2eac286b -91245e59b4425fd4edb2a61d0d47c1ccc83d3ced8180de34887b9655b5dcda033d48cde0bdc3b7de846d246c053a02e8 -a2cb00721e68f1cad8933947456f07144dc69653f96ceed845bd577d599521ba99cdc02421118971d56d7603ed118cbf -af8cd66d303e808b22ec57860dd909ca64c27ec2c60e26ffecfdc1179d8762ffd2739d87b43959496e9fee4108df71df -9954136812dffcd5d3f167a500e7ab339c15cfc9b3398d83f64b0daa3dd5b9a851204f424a3493b4e326d3de81e50a62 -93252254d12511955f1aa464883ad0da793f84d900fea83e1df8bca0f2f4cf5b5f9acbaec06a24160d33f908ab5fea38 -997cb55c26996586ba436a95566bd535e9c22452ca5d2a0ded2bd175376557fa895f9f4def4519241ff386a063f2e526 -a12c78ad451e0ac911260ade2927a768b50cb4125343025d43474e7f465cdc446e9f52a84609c5e7e87ae6c9b3f56cda -a789d4ca55cbba327086563831b34487d63d0980ba8cf55197c016702ed6da9b102b1f0709ce3da3c53ff925793a3d73 -a5d76acbb76741ce85be0e655b99baa04f7f587347947c0a30d27f8a49ae78cce06e1cde770a8b618d3db402be1c0c4b -873c0366668c8faddb0eb7c86f485718d65f8c4734020f1a18efd5fa123d3ea8a990977fe13592cd01d17e60809cb5ff -b659b71fe70f37573ff7c5970cc095a1dc0da3973979778f80a71a347ef25ad5746b2b9608bad4ab9a4a53a4d7df42d7 -a34cbe05888e5e5f024a2db14cb6dcdc401a9cbd13d73d3c37b348f68688f87c24ca790030b8f84fef9e74b4eab5e412 -94ce8010f85875c045b0f014db93ef5ab9f1f6842e9a5743dce9e4cb872c94affd9e77c1f1d1ab8b8660b52345d9acb9 -adefa9b27a62edc0c5b019ddd3ebf45e4de846165256cf6329331def2e088c5232456d3de470fdce3fa758bfdd387512 -a6b83821ba7c1f83cc9e4529cf4903adb93b26108e3d1f20a753070db072ad5a3689643144bdd9c5ea06bb9a7a515cd0 -a3a9ddedc2a1b183eb1d52de26718151744db6050f86f3580790c51d09226bf05f15111691926151ecdbef683baa992c -a64bac89e7686932cdc5670d07f0b50830e69bfb8c93791c87c7ffa4913f8da881a9d8a8ce8c1a9ce5b6079358c54136 -a77b5a63452cb1320b61ab6c7c2ef9cfbcade5fd4727583751fb2bf3ea330b5ca67757ec1f517bf4d503ec924fe32fbd -8746fd8d8eb99639d8cd0ca34c0d9c3230ed5a312aab1d3d925953a17973ee5aeb66e68667e93caf9cb817c868ea8f3d -88a2462a26558fc1fbd6e31aa8abdc706190a17c27fdc4217ffd2297d1b1f3321016e5c4b2384c5454d5717dc732ed03 -b78893a97e93d730c8201af2e0d3b31cb923d38dc594ffa98a714e627c473d42ea82e0c4d2eeb06862ee22a9b2c54588 -920cc8b5f1297cf215a43f6fc843e379146b4229411c44c0231f6749793d40f07b9af7699fd5d21fd69400b97febe027 -a0f0eafce1e098a6b58c7ad8945e297cd93aaf10bc55e32e2e32503f02e59fc1d5776936577d77c0b1162cb93b88518b -98480ba0064e97a2e7a6c4769b4d8c2a322cfc9a3b2ca2e67e9317e2ce04c6e1108169a20bd97692e1cb1f1423b14908 -83dbbb2fda7e287288011764a00b8357753a6a44794cc8245a2275237f11affdc38977214e463ad67aec032f3dfa37e9 -86442fff37598ce2b12015ff19b01bb8a780b40ad353d143a0f30a06f6d23afd5c2b0a1253716c855dbf445cc5dd6865 -b8a4c60c5171189414887847b9ed9501bff4e4c107240f063e2d254820d2906b69ef70406c585918c4d24f1dd052142b -919f33a98e84015b2034b57b5ffe9340220926b2c6e45f86fd79ec879dbe06a148ae68b77b73bf7d01bd638a81165617 -95c13e78d89474a47fbc0664f6f806744b75dede95a479bbf844db4a7f4c3ae410ec721cb6ffcd9fa9c323da5740d5ae -ab7151acc41fffd8ec6e90387700bcd7e1cde291ea669567295bea1b9dd3f1df2e0f31f3588cd1a1c08af8120aca4921 -80e74c5c47414bd6eeef24b6793fb1fa2d8fb397467045fcff887c52476741d5bc4ff8b6d3387cb53ad285485630537f -a296ad23995268276aa351a7764d36df3a5a3cffd7dbeddbcea6b1f77adc112629fdeffa0918b3242b3ccd5e7587e946 -813d2506a28a2b01cb60f49d6bd5e63c9b056aa56946faf2f33bd4f28a8d947569cfead3ae53166fc65285740b210f86 -924b265385e1646287d8c09f6c855b094daaee74b9e64a0dddcf9ad88c6979f8280ba30c8597b911ef58ddb6c67e9fe3 -8d531513c70c2d3566039f7ca47cd2352fd2d55b25675a65250bdb8b06c3843db7b2d29c626eed6391c238fc651cf350 -82b338181b62fdc81ceb558a6843df767b6a6e3ceedc5485664b4ea2f555904b1a45fbb35f6cf5d96f27da10df82a325 -92e62faaedea83a37f314e1d3cb4faaa200178371d917938e59ac35090be1db4b4f4e0edb78b9c991de202efe4f313d8 -99d645e1b642c2dc065bac9aaa0621bc648c9a8351efb6891559c3a41ba737bd155fb32d7731950514e3ecf4d75980e4 -b34a13968b9e414172fb5d5ece9a39cf2eb656128c3f2f6cc7a9f0c69c6bae34f555ecc8f8837dc34b5e470e29055c78 -a2a0bb7f3a0b23a2cbc6585d59f87cd7e56b2bbcb0ae48f828685edd9f7af0f5edb4c8e9718a0aaf6ef04553ba71f3b7 -8e1a94bec053ed378e524b6685152d2b52d428266f2b6eadd4bcb7c4e162ed21ab3e1364879673442ee2162635b7a4d8 -9944adaff14a85eab81c73f38f386701713b52513c4d4b838d58d4ffa1d17260a6d056b02334850ea9a31677c4b078bd -a450067c7eceb0854b3eca3db6cf38669d72cb7143c3a68787833cbca44f02c0be9bfbe082896f8a57debb13deb2afb1 -8be4ad3ac9ef02f7df09254d569939757101ee2eda8586fefcd8c847adc1efe5bdcb963a0cafa17651befaafb376a531 -90f6de91ea50255f148ac435e08cf2ac00c772a466e38155bd7e8acf9197af55662c7b5227f88589b71abe9dcf7ba343 -86e5a24f0748b106dee2d4d54e14a3b0af45a96cbee69cac811a4196403ebbee17fd24946d7e7e1b962ac7f66dbaf610 -afdd96fbcda7aa73bf9eeb2292e036c25753d249caee3b9c013009cc22e10d3ec29e2aa6ddbb21c4e949b0c0bccaa7f4 -b5a4e7436d5473647c002120a2cb436b9b28e27ad4ebdd7c5f122b91597c507d256d0cbd889d65b3a908531936e53053 -b632414c3da704d80ac2f3e5e0e9f18a3637cdc2ebeb613c29300745582427138819c4e7b0bec3099c1b8739dac1807b -a28df1464d3372ce9f37ef1db33cc010f752156afae6f76949d98cd799c0cf225c20228ae86a4da592d65f0cffe3951b -898b93d0a31f7d3f11f253cb7a102db54b669fd150da302d8354d8e02b1739a47cb9bd88015f3baf12b00b879442464e -96fb88d89a12049091070cb0048a381902965e67a8493e3991eaabe5d3b7ff7eecd5c94493a93b174df3d9b2c9511755 -b899cb2176f59a5cfba3e3d346813da7a82b03417cad6342f19cc8f12f28985b03bf031e856a4743fd7ebe16324805b0 -a60e2d31bc48e0c0579db15516718a03b73f5138f15037491f4dae336c904e312eda82d50862f4debd1622bb0e56d866 -979fc8b987b5cef7d4f4b58b53a2c278bd25a5c0ea6f41c715142ea5ff224c707de38451b0ad3aa5e749aa219256650a -b2a75bff18e1a6b9cf2a4079572e41205741979f57e7631654a3c0fcec57c876c6df44733c9da3d863db8dff392b44a3 -b7a0f0e811222c91e3df98ff7f286b750bc3b20d2083966d713a84a2281744199e664879401e77470d44e5a90f3e5181 -82b74ba21c9d147fbc338730e8f1f8a6e7fc847c3110944eb17a48bea5e06eecded84595d485506d15a3e675fd0e5e62 -a7f44eef817d5556f0d1abcf420301217d23c69dd2988f44d91ea1f1a16c322263cbacd0f190b9ba22b0f141b9267b4f -aadb68164ede84fc1cb3334b3194d84ba868d5a88e4c9a27519eef4923bc4abf81aab8114449496c073c2a6a0eb24114 -b5378605fabe9a8c12a5dc55ef2b1de7f51aedb61960735c08767a565793cea1922a603a6983dc25f7cea738d0f7c40d -a97a4a5cd8d51302e5e670aee78fe6b5723f6cc892902bbb4f131e82ca1dfd5de820731e7e3367fb0c4c1922a02196e3 -8bdfeb15c29244d4a28896f2b2cb211243cd6a1984a3f5e3b0ebe5341c419beeab3304b390a009ffb47588018034b0ea -a9af3022727f2aa2fca3b096968e97edad3f08edcbd0dbca107b892ae8f746a9c0485e0d6eb5f267999b23a845923ed0 -8e7594034feef412f055590fbb15b6322dc4c6ab7a4baef4685bd13d71a83f7d682b5781bdfa0d1c659489ce9c2b8000 -84977ca6c865ebee021c58106c1a4ad0c745949ecc5332948002fd09bd9b890524878d0c29da96fd11207621136421fe -8687551a79158e56b2375a271136756313122132a6670fa51f99a1b5c229ed8eea1655a734abae13228b3ebfd2a825dd -a0227d6708979d99edfc10f7d9d3719fd3fc68b0d815a7185b60307e4c9146ad2f9be2b8b4f242e320d4288ceeb9504c -89f75583a16735f9dd8b7782a130437805b34280ccea8dac6ecaee4b83fe96947e7b53598b06fecfffdf57ffc12cc445 -a0056c3353227f6dd9cfc8e3399aa5a8f1d71edf25d3d64c982910f50786b1e395c508d3e3727ac360e3e040c64b5298 -b070e61a6d813626144b312ded1788a6d0c7cec650a762b2f8df6e4743941dd82a2511cd956a3f141fc81e15f4e092da -b4e6db232e028a1f989bb5fc13416711f42d389f63564d60851f009dcffac01acfd54efa307aa6d4c0f932892d4e62b0 -89b5991a67db90024ddd844e5e1a03ef9b943ad54194ae0a97df775dde1addf31561874f4e40fbc37a896630f3bbda58 -ad0e8442cb8c77d891df49cdb9efcf2b0d15ac93ec9be1ad5c3b3cca1f4647b675e79c075335c1f681d56f14dc250d76 -b5d55a6ae65bb34dd8306806cb49b5ccb1c83a282ee47085cf26c4e648e19a52d9c422f65c1cd7e03ca63e926c5e92ea -b749501347e5ec07e13a79f0cb112f1b6534393458b3678a77f02ca89dca973fa7b30e55f0b25d8b92b97f6cb0120056 -94144b4a3ffc5eec6ba35ce9c245c148b39372d19a928e236a60e27d7bc227d18a8cac9983851071935d8ffb64b3a34f -92bb4f9f85bc8c028a3391306603151c6896673135f8a7aefedd27acb322c04ef5dac982fc47b455d6740023e0dd3ea3 -b9633a4a101461a782fc2aa092e9dbe4e2ad00987578f18cd7cf0021a909951d60fe79654eb7897806795f93c8ff4d1c -809f0196753024821b48a016eca5dbb449a7c55750f25981bb7a4b4c0e0846c09b8f6128137905055fc43a3f0deb4a74 -a27dc9cdd1e78737a443570194a03d89285576d3d7f3a3cf15cc55b3013e42635d4723e2e8fe1d0b274428604b630db9 -861f60f0462e04cd84924c36a28163def63e777318d00884ab8cb64c8df1df0bce5900342163edb60449296484a6c5bf -b7bc23fb4e14af4c4704a944253e760adefeca8caee0882b6bbd572c84434042236f39ae07a8f21a560f486b15d82819 -b9a6eb492d6dd448654214bd01d6dc5ff12067a11537ab82023fc16167507ee25eed2c91693912f4155d1c07ed9650b3 -97678af29c68f9a5e213bf0fb85c265303714482cfc4c2c00b4a1e8a76ed08834ee6af52357b143a1ca590fb0265ea5a -8a15b499e9eca5b6cac3070b5409e8296778222018ad8b53a5d1f6b70ad9bb10c68a015d105c941ed657bf3499299e33 -b487fefede2e8091f2c7bfe85770db2edff1db83d4effe7f7d87bff5ab1ace35e9b823a71adfec6737fede8d67b3c467 -8b51b916402aa2c437fce3bcad6dad3be8301a1a7eab9d163085b322ffb6c62abf28637636fe6114573950117fc92898 -b06a2106d031a45a494adec0881cb2f82275dff9dcdd2bc16807e76f3bec28a6734edd3d54f0be8199799a78cd6228ad -af0a185391bbe2315eb97feac98ad6dd2e5d931d012c621abd6e404a31cc188b286fef14871762190acf086482b2b5e2 -8e78ee8206506dd06eb7729e32fceda3bebd8924a64e4d8621c72e36758fda3d0001af42443851d6c0aea58562870b43 -a1ba52a569f0461aaf90b49b92be976c0e73ec4a2c884752ee52ffb62dd137770c985123d405dfb5de70692db454b54a -8d51b692fa1543c51f6b62b9acb8625ed94b746ef96c944ca02859a4133a5629da2e2ce84e111a7af8d9a5b836401c64 -a7a20d45044cf6492e0531d0b8b26ffbae6232fa05a96ed7f06bdb64c2b0f5ca7ec59d5477038096a02579e633c7a3ff -84df867b98c53c1fcd4620fef133ee18849c78d3809d6aca0fb6f50ff993a053a455993f216c42ab6090fa5356b8d564 -a7227c439f14c48e2577d5713c97a5205feb69acb0b449152842e278fa71e8046adfab468089c8b2288af1fc51fa945b -855189b3a105670779997690876dfaa512b4a25a24931a912c2f0f1936971d2882fb4d9f0b3d9daba77eaf660e9d05d5 -b5696bd6706de51c502f40385f87f43040a5abf99df705d6aac74d88c913b8ecf7a99a63d7a37d9bdf3a941b9e432ff5 -ab997beb0d6df9c98d5b49864ef0b41a2a2f407e1687dfd6089959757ba30ed02228940b0e841afe6911990c74d536c4 -b36b65f85546ebfdbe98823d5555144f96b4ab39279facd19c0de3b8919f105ba0315a0784dce4344b1bc62d8bb4a5a3 -b8371f0e4450788720ac5e0f6cd3ecc5413d33895083b2c168d961ec2b5c3de411a4cc0712481cbe8df8c2fa1a7af006 -98325d8026b810a8b7a114171ae59a57e8bbc9848e7c3df992efc523621729fd8c9f52114ce01d7730541a1ada6f1df1 -8d0e76dbd37806259486cd9a31bc8b2306c2b95452dc395546a1042d1d17863ef7a74c636b782e214d3aa0e8d717f94a -a4e15ead76da0214d702c859fb4a8accdcdad75ed08b865842bd203391ec4cba2dcc916455e685f662923b96ee0c023f -8618190972086ebb0c4c1b4a6c94421a13f378bc961cc8267a301de7390c5e73c3333864b3b7696d81148f9d4843fd02 -85369d6cc7342e1aa15b59141517d8db8baaaeb7ab9670f3ba3905353948d575923d283b7e5a05b13a30e7baf1208a86 -87c51ef42233c24a6da901f28c9a075d9ba3c625687c387ad6757b72ca6b5a8885e6902a3082da7281611728b1e45f26 -aa6348a4f71927a3106ad0ea8b02fc8d8c65531e4ab0bd0a17243e66f35afe252e40ab8eef9f13ae55a72566ffdaff5c -96a3bc976e9d03765cc3fee275fa05b4a84c94fed6b767e23ca689394501e96f56f7a97cffddc579a6abff632bf153be -97dbf96c6176379fdb2b888be4e757b2bca54e74124bd068d3fa1dbd82a011bbeb75079da38e0cd22a761fe208ecad9b -b70cf0a1d14089a4129ec4e295313863a59da8c7e26bf74cc0e704ed7f0ee4d7760090d0ddf7728180f1bf2c5ac64955 -882d664714cc0ffe53cbc9bef21f23f3649824f423c4dbad1f893d22c4687ab29583688699efc4d5101aa08b0c3e267a -80ecb7cc963e677ccaddbe3320831dd6ee41209acf4ed41b16dc4817121a3d86a1aac9c4db3d8c08a55d28257088af32 -a25ba667d832b145f9ce18c3f9b1bd00737aa36db020e1b99752c8ef7d27c6c448982bd8d352e1b6df266b8d8358a8d5 -83734841c13dee12759d40bdd209b277e743b0d08cc0dd1e0b7afd2d65bfa640400eefcf6be4a52e463e5b3d885eeac6 -848d16505b04804afc773aebabb51b36fd8aacfbb0e09b36c0d5d57df3c0a3b92f33e7d5ad0a7006ec46ebb91df42b8c -909a8d793f599e33bb9f1dc4792a507a97169c87cd5c087310bc05f30afcd247470b4b56dec59894c0fb1d48d39bb54e -8e558a8559df84a1ba8b244ece667f858095c50bb33a5381e60fcc6ba586b69693566d8819b4246a27287f16846c1dfa -84d6b69729f5aaa000cd710c2352087592cfbdf20d5e1166977e195818e593fa1a50d1e04566be23163a2523dc1612f1 -9536d262b7a42125d89f4f32b407d737ba8d9242acfc99d965913ab3e043dcac9f7072a43708553562cac4cba841df30 -9598548923ca119d6a15fd10861596601dd1dedbcccca97bb208cdc1153cf82991ea8cc17686fbaa867921065265970c -b87f2d4af6d026e4d2836bc3d390a4a18e98a6e386282ce96744603bab74974272e97ac2da281afa21885e2cbb3a8001 -991ece62bf07d1a348dd22191868372904b9f8cf065ae7aa4e44fd24a53faf6d851842e35fb472895963aa1992894918 -a8c53dea4c665b30e51d22ca6bc1bc78aaf172b0a48e64a1d4b93439b053877ec26cb5221c55efd64fa841bbf7d5aff4 -93487ec939ed8e740f15335b58617c3f917f72d07b7a369befd479ae2554d04deb240d4a14394b26192efae4d2f4f35d -a44793ab4035443f8f2968a40e043b4555960193ffa3358d22112093aadfe2c136587e4139ffd46d91ed4107f61ea5e0 -b13fe033da5f0d227c75927d3dacb06dbaf3e1322f9d5c7c009de75cdcba5e308232838785ab69a70f0bedea755e003f -970a29b075faccd0700fe60d1f726bdebf82d2cc8252f4a84543ebd3b16f91be42a75c9719a39c4096139f0f31393d58 -a4c3eb1f7160f8216fc176fb244df53008ff32f2892363d85254002e66e2de21ccfe1f3b1047589abee50f29b9d507e3 -8c552885eab04ba40922a8f0c3c38c96089c95ff1405258d3f1efe8d179e39e1295cbf67677894c607ae986e4e6b1fb0 -b3671746fa7f848c4e2ae6946894defadd815230b906b419143523cc0597bc1d6c0a4c1e09d49b66b4a2c11cde3a4de3 -937a249a95813a5e2ef428e355efd202e15a37d73e56cfb7e57ea9f943f2ce5ca8026f2f1fd25bf164ba89d07077d858 -83646bdf6053a04aa9e2f112499769e5bd5d0d10f2e13db3ca89bd45c0b3b7a2d752b7d137fb3909f9c62b78166c9339 -b4eac4b91e763666696811b7ed45e97fd78310377ebea1674b58a2250973f80492ac35110ed1240cd9bb2d17493d708c -82db43a99bc6573e9d92a3fd6635dbbb249ac66ba53099c3c0c8c8080b121dd8243cd5c6e36ba0a4d2525bae57f5c89c -a64d6a264a681b49d134c655d5fc7756127f1ee7c93d328820f32bca68869f53115c0d27fef35fe71f7bc4fdaed97348 -8739b7a9e2b4bc1831e7f04517771bc7cde683a5e74e052542517f8375a2f64e53e0d5ac925ef722327e7bb195b4d1d9 -8f337cdd29918a2493515ebb5cf702bbe8ecb23b53c6d18920cc22f519e276ca9b991d3313e2d38ae17ae8bdfa4f8b7e -b0edeab9850e193a61f138ef2739fc42ceec98f25e7e8403bfd5fa34a7bc956b9d0898250d18a69fa4625a9b3d6129da -a9920f26fe0a6d51044e623665d998745c9eca5bce12051198b88a77d728c8238f97d4196f26e43b24f8841500b998d0 -86e655d61502b979eeeeb6f9a7e1d0074f936451d0a1b0d2fa4fb3225b439a3770767b649256fe481361f481a8dbc276 -84d3b32fa62096831cc3bf013488a9f3f481dfe293ae209ed19585a03f7db8d961a7a9dd0db82bd7f62d612707575d9c -81c827826ec9346995ffccf62a241e3b2d32f7357acd1b1f8f7a7dbc97022d3eb51b8a1230e23ce0b401d2e535e8cd78 -94a1e40c151191c5b055b21e86f32e69cbc751dcbdf759a48580951834b96a1eed75914c0d19a38aefd21fb6c8d43d0c -ab890222b44bc21b71f7c75e15b6c6e16bb03371acce4f8d4353ff3b8fcd42a14026589c5ed19555a3e15e4d18bfc3a3 -accb0be851e93c6c8cc64724cdb86887eea284194b10e7a43c90528ed97e9ec71ca69c6fac13899530593756dd49eab2 -b630220aa9e1829c233331413ee28c5efe94ea8ea08d0c6bfd781955078b43a4f92915257187d8526873e6c919c6a1de -add389a4d358c585f1274b73f6c3c45b58ef8df11f9d11221f620e241bf3579fba07427b288c0c682885a700cc1fa28d -a9fe6ca8bf2961a3386e8b8dcecc29c0567b5c0b3bcf3b0f9169f88e372b80151af883871fc5229815f94f43a6f5b2b0 -ad839ae003b92b37ea431fa35998b46a0afc3f9c0dd54c3b3bf7a262467b13ff3c323ada1c1ae02ac7716528bdf39e3e -9356d3fd0edcbbb65713c0f2a214394f831b26f792124b08c5f26e7f734b8711a87b7c4623408da6a091c9aef1f6af3c -896b25b083c35ac67f0af3784a6a82435b0e27433d4d74cd6d1eafe11e6827827799490fb1c77c11de25f0d75f14e047 -8bfa019391c9627e8e5f05c213db625f0f1e51ec68816455f876c7e55b8f17a4f13e5aae9e3fb9e1cf920b1402ee2b40 -8ba3a6faa6a860a8f3ce1e884aa8769ceded86380a86520ab177ab83043d380a4f535fe13884346c5e51bee68da6ab41 -a8292d0844084e4e3bb7af92b1989f841a46640288c5b220fecfad063ee94e86e13d3d08038ec2ac82f41c96a3bfe14d -8229bb030b2fc566e11fd33c7eab7a1bb7b49fed872ea1f815004f7398cb03b85ea14e310ec19e1f23e0bdaf60f8f76c -8cfbf869ade3ec551562ff7f63c2745cc3a1f4d4dc853a0cd42dd5f6fe54228f86195ea8fe217643b32e9f513f34a545 -ac52a3c8d3270ddfe1b5630159da9290a5ccf9ccbdef43b58fc0a191a6c03b8a5974cf6e2bbc7bd98d4a40a3581482d7 -ab13decb9e2669e33a7049b8eca3ca327c40dea15ad6e0e7fa63ed506db1d258bc36ac88b35f65cae0984e937eb6575d -b5e748eb1a7a1e274ff0cc56311c198f2c076fe4b7e73e5f80396fe85358549df906584e6bb2c8195b3e2be7736850a5 -b5cb911325d8f963c41f691a60c37831c7d3bbd92736efa33d1f77a22b3fde7f283127256c2f47e197571e6fe0b46149 -8a01dc6ed1b55f26427a014faa347130738b191a06b800e32042a46c13f60b49534520214359d68eb2e170c31e2b8672 -a72fa874866e19b2efb8e069328362bf7921ec375e3bcd6b1619384c3f7ee980f6cf686f3544e9374ff54b4d17a1629c -8db21092f7c5f110fba63650b119e82f4b42a997095d65f08f8237b02dd66fdf959f788df2c35124db1dbd330a235671 -8c65d50433d9954fe28a09fa7ba91a70a590fe7ba6b3060f5e4be0f6cef860b9897fa935fb4ebc42133524eb071dd169 -b4614058e8fa21138fc5e4592623e78b8982ed72aa35ee4391b164f00c68d277fa9f9eba2eeefc890b4e86eba5124591 -ab2ad3a1bce2fbd55ca6b7c23786171fe1440a97d99d6df4d80d07dd56ac2d7203c294b32fc9e10a6c259381a73f24a1 -812ae3315fdc18774a8da3713a4679e8ed10b9405edc548c00cacbe25a587d32040566676f135e4723c5dc25df5a22e9 -a464b75f95d01e5655b54730334f443c8ff27c3cb79ec7af4b2f9da3c2039c609908cd128572e1fd0552eb597e8cef8d -a0db3172e93ca5138fe419e1c49a1925140999f6eff7c593e5681951ee0ec1c7e454c851782cbd2b8c9bc90d466e90e0 -806db23ba7d00b87d544eed926b3443f5f9c60da6b41b1c489fba8f73593b6e3b46ebfcab671ee009396cd77d5e68aa1 -8bfdf2c0044cc80260994e1c0374588b6653947b178e8b312be5c2a05e05767e98ea15077278506aee7df4fee1aaf89e -827f6558c16841b5592ff089c9c31e31eb03097623524394813a2e4093ad2d3f8f845504e2af92195aaa8a1679d8d692 -925c4f8eab2531135cd71a4ec88e7035b5eea34ba9d799c5898856080256b4a15ed1a746e002552e2a86c9c157e22e83 -a9f9a368f0e0b24d00a35b325964c85b69533013f9c2cfad9708be5fb87ff455210f8cb8d2ce3ba58ca3f27495552899 -8ac0d3bebc1cae534024187e7c71f8927ba8fcc6a1926cb61c2b6c8f26bb7831019e635a376146c29872a506784a4aaa -97c577be2cbbfdb37ad754fae9df2ada5fc5889869efc7e18a13f8e502fbf3f4067a509efbd46fd990ab47ce9a70f5a8 -935e7d82bca19f16614aa43b4a3474e4d20d064e4bfdf1cea2909e5c9ab72cfe3e54dc50030e41ee84f3588cebc524e9 -941aafc08f7c0d94cebfbb1f0aad5202c02e6e37f2c12614f57e727efa275f3926348f567107ee6d8914dd71e6060271 -af0fbc1ba05b4b5b63399686df3619968be5d40073de0313cbf5f913d3d4b518d4c249cdd2176468ccaa36040a484f58 -a0c414f23f46ca6d69ce74c6f8a00c036cb0edd098af0c1a7d39c802b52cfb2d5dbdf93fb0295453d4646e2af7954d45 -909cf39e11b3875bb63b39687ae1b5d1f5a15445e39bf164a0b14691b4ddb39a8e4363f584ef42213616abc4785b5d66 -a92bac085d1194fbd1c88299f07a061d0bdd3f980b663e81e6254dbb288bf11478c0ee880e28e01560f12c5ccb3c0103 -841705cd5cd76b943e2b7c5e845b9dd3c8defe8ef67e93078d6d5e67ade33ad4b0fd413bc196f93b0a4073c855cd97d4 -8e7eb8364f384a9161e81d3f1d52ceca9b65536ae49cc35b48c3e2236322ba4ae9973e0840802d9fa4f4d82ea833544f -aed3ab927548bc8bec31467ba80689c71a168e34f50dcb6892f19a33a099f5aa6b3f9cb79f5c0699e837b9a8c7f27efe -b8fbf7696210a36e20edabd77839f4dfdf50d6d015cdf81d587f90284a9bcef7d2a1ff520728d7cc69a4843d6c20dedd -a9d533769ce6830211c884ae50a82a7bf259b44ac71f9fb11f0296fdb3981e6b4c1753fe744647b247ebc433a5a61436 -8b4bdf90d33360b7f428c71cde0a49fb733badba8c726876945f58c620ce7768ae0e98fc8c31fa59d8955a4823336bb1 -808d42238e440e6571c59e52a35ae32547d502dc24fd1759d8ea70a7231a95859baf30b490a4ba55fa2f3aaa11204597 -85594701f1d2fee6dc1956bc44c7b31db93bdeec2f3a7d622c1a08b26994760773e3d57521a44cfd7e407ac3fd430429 -a66de045ce7173043a6825e9dc440ac957e2efb6df0a337f4f8003eb0c719d873a52e6eba3cb0d69d977ca37d9187674 -87a1c6a1fdff993fa51efa5c3ba034c079c0928a7d599b906336af7c2dcab9721ceaf3108c646490af9dff9a754f54b3 -926424223e462ceb75aed7c22ade8a7911a903b7e5dd4bc49746ddce8657f4616325cd12667d4393ac52cdd866396d0e -b5dc96106593b42b30f06f0b0a1e0c1aafc70432e31807252d3674f0b1ea5e58eac8424879d655c9488d85a879a3e572 -997ca0987735cc716507cb0124b1d266d218b40c9d8e0ecbf26a1d65719c82a637ce7e8be4b4815d307df717bde7c72a -92994d3f57a569b7760324bb5ae4e8e14e1633d175dab06aa57b8e391540e05f662fdc08b8830f489a063f59b689a688 -a8087fcc6aa4642cb998bea11facfe87eb33b90a9aa428ab86a4124ad032fc7d2e57795311a54ec9f55cc120ebe42df1 -a9bd7d1de6c0706052ca0b362e2e70e8c8f70f1f026ea189b4f87a08ce810297ebfe781cc8004430776c54c1a05ae90c -856d33282e8a8e33a3d237fb0a0cbabaf77ba9edf2fa35a831fdafcadf620561846aa6cbb6bdc5e681118e1245834165 -9524a7aa8e97a31a6958439c5f3339b19370f03e86b89b1d02d87e4887309dbbe9a3a8d2befd3b7ed5143c8da7e0a8ad -824fdf433e090f8acbd258ac7429b21f36f9f3b337c6d0b71d1416a5c88a767883e255b2888b7c906dd2e9560c4af24c -88c7fee662ca7844f42ed5527996b35723abffd0d22d4ca203b9452c639a5066031207a5ae763dbc0865b3299d19b1ec -919dca5c5595082c221d5ab3a5bc230f45da7f6dec4eb389371e142c1b9c6a2c919074842479c2844b72c0d806170c0c -b939be8175715e55a684578d8be3ceff3087f60fa875fff48e52a6e6e9979c955efef8ff67cfa2b79499ea23778e33b0 -873b6db725e7397d11bc9bed9ac4468e36619135be686790a79bc6ed4249058f1387c9a802ea86499f692cf635851066 -aeae06db3ec47e9e5647323fa02fac44e06e59b885ad8506bf71b184ab3895510c82f78b6b22a5d978e8218e7f761e9f -b99c0a8359c72ab88448bae45d4bf98797a26bca48b0d4460cd6cf65a4e8c3dd823970ac3eb774ae5d0cea4e7fadf33e -8f10c8ec41cdfb986a1647463076a533e6b0eec08520c1562401b36bb063ac972aa6b28a0b6ce717254e35940b900e3c -a106d9be199636d7add43b942290269351578500d8245d4aae4c083954e4f27f64740a3138a66230391f2d0e6043a8de -a469997908244578e8909ff57cffc070f1dbd86f0098df3cfeb46b7a085cfecc93dc69ee7cad90ff1dc5a34d50fe580c -a4ef087bea9c20eb0afc0ee4caba7a9d29dfa872137828c721391273e402fb6714afc80c40e98bbd8276d3836bffa080 -b07a013f73cd5b98dae0d0f9c1c0f35bff8a9f019975c4e1499e9bee736ca6fcd504f9bc32df1655ff333062382cff04 -b0a77188673e87cc83348c4cc5db1eecf6b5184e236220c8eeed7585e4b928db849944a76ec60ef7708ef6dac02d5592 -b1284b37e59b529f0084c0dacf0af6c0b91fc0f387bf649a8c74819debf606f7b07fc3e572500016fb145ec2b24e9f17 -97b20b5b4d6b9129da185adfbf0d3d0b0faeba5b9715f10299e48ea0521709a8296a9264ce77c275a59c012b50b6519a -b9d37e946fae5e4d65c1fbfacc8a62e445a1c9d0f882e60cca649125af303b3b23af53c81d7bac544fb7fcfc7a314665 -8e5acaac379f4bb0127efbef26180f91ff60e4c525bc9b798fc50dfaf4fe8a5aa84f18f3d3cfb8baead7d1e0499af753 -b0c0b8ab1235bf1cda43d4152e71efc1a06c548edb964eb4afceb201c8af24240bf8ab5cae30a08604e77432b0a5faf0 -8cc28d75d5c8d062d649cbc218e31c4d327e067e6dbd737ec0a35c91db44fbbd0d40ec424f5ed79814add16947417572 -95ae6219e9fd47efaa9cb088753df06bc101405ba50a179d7c9f7c85679e182d3033f35b00dbba71fdcd186cd775c52e -b5d28fa09f186ebc5aa37453c9b4d9474a7997b8ae92748ecb940c14868792292ac7d10ade01e2f8069242b308cf97e5 -8c922a0faa14cc6b7221f302df3342f38fc8521ec6c653f2587890192732c6da289777a6cd310747ea7b7d104af95995 -b9ad5f660b65230de54de535d4c0fcae5bc6b59db21dea5500fdc12eea4470fb8ea003690fdd16d052523418d5e01e8c -a39a9dd41a0ff78c82979483731f1cd68d3921c3e9965869662c22e02dde3877802e180ba93f06e7346f96d9fa9261d2 -8b32875977ec372c583b24234c27ed73aef00cdff61eb3c3776e073afbdeade548de9497c32ec6d703ff8ad0a5cb7fe4 -9644cbe755a5642fe9d26cfecf170d3164f1848c2c2e271d5b6574a01755f3980b3fc870b98cf8528fef6ecef4210c16 -81ea9d1fdd9dd66d60f40ce0712764b99da9448ae0b300f8324e1c52f154e472a086dda840cb2e0b9813dc8ce8afd4b5 -906aaa4a7a7cdf01909c5cfbc7ded2abc4b869213cbf7c922d4171a4f2e637e56f17020b852ad339d83b8ac92f111666 -939b5f11acbdeff998f2a080393033c9b9d8d5c70912ea651c53815c572d36ee822a98d6dfffb2e339f29201264f2cf4 -aba4898bf1ccea9b9e2df1ff19001e05891581659c1cbbde7ee76c349c7fc7857261d9785823c9463a8aea3f40e86b38 -83ca1a56b8a0be4820bdb5a9346357c68f9772e43f0b887729a50d2eb2a326bbcede676c8bf2e51d7c89bbd8fdb778a6 -94e86e9fe6addfe2c3ee3a547267ed921f4230d877a85bb4442c2d9350c2fa9a9c54e6fe662de82d1a2407e4ab1691c2 -a0cc3bdef671a59d77c6984338b023fa2b431b32e9ed2abe80484d73edc6540979d6f10812ecc06d4d0c5d4eaca7183c -b5343413c1b5776b55ea3c7cdd1f3af1f6bd802ea95effe3f2b91a523817719d2ecc3f8d5f3cc2623ace7e35f99ca967 -92085d1ed0ed28d8cabe3e7ff1905ed52c7ceb1eac5503760c52fb5ee3a726aba7c90b483c032acc3f166b083d7ec370 -8ec679520455275cd957fca8122724d287db5df7d29f1702a322879b127bff215e5b71d9c191901465d19c86c8d8d404 -b65eb2c63d8a30332eb24ee8a0c70156fc89325ebbb38bacac7cf3f8636ad8a472d81ccca80423772abc00192d886d8a -a9fe1c060b974bee4d590f2873b28635b61bfcf614e61ff88b1be3eee4320f4874e21e8d666d8ac8c9aba672efc6ecae -b3fe2a9a389c006a831dea7e777062df84b5c2803f9574d7fbe10b7e1c125817986af8b6454d6be9d931a5ac94cfe963 -95418ad13b734b6f0d33822d9912c4c49b558f68d08c1b34a0127fcfa666bcae8e6fda8832d2c75bb9170794a20e4d7c -a9a7df761e7f18b79494bf429572140c8c6e9d456c4d4e336184f3f51525a65eb9582bea1e601bdb6ef8150b7ca736a5 -a0de03b1e75edf7998c8c1ac69b4a1544a6fa675a1941950297917366682e5644a4bda9cdeedfaf9473d7fccd9080b0c -a61838af8d95c95edf32663a68f007d95167bf6e41b0c784a30b22d8300cfdd5703bd6d16e86396638f6db6ae7e42a85 -8866d62084d905c145ff2d41025299d8b702ac1814a7dec4e277412c161bc9a62fed735536789cb43c88693c6b423882 -91da22c378c81497fe363e7f695c0268443abee50f8a6625b8a41e865638a643f07b157ee566de09ba09846934b4e2d7 -941d21dd57c9496aa68f0c0c05507405fdd413acb59bc668ce7e92e1936c68ec4b065c3c30123319884149e88228f0b2 -a77af9b094bc26966ddf2bf9e1520c898194a5ccb694915950dadc204facbe3066d3d89f50972642d76b14884cfbaa21 -8e76162932346869f4618bde744647f7ab52ab498ad654bdf2a4feeb986ac6e51370841e5acbb589e38b6e7142bb3049 -b60979ace17d6937ece72e4f015da4657a443dd01cebc7143ef11c09e42d4aa8855999a65a79e2ea0067f31c9fc2ab0f -b3e2ffdd5ee6fd110b982fd4fad4b93d0fca65478f986d086eeccb0804960bfaa1919afa743c2239973ea65091fe57d2 -8ce0ce05e7d7160d44574011da687454dbd3c8b8290aa671731b066e2c82f8cf2d63cb8e932d78c6122ec610e44660e6 -ab005dd8d297045c39e2f72fb1c48edb501ccf3575d3d04b9817b3afee3f0bb0f3f53f64bda37d1d9cde545aae999bae -95bd7edb4c4cd60e3cb8a72558845a3cce6bb7032ccdf33d5a49ebb6ddf203bc3c79e7b7e550735d2d75b04c8b2441e8 -889953ee256206284094e4735dbbb17975bafc7c3cb94c9fbfee4c3e653857bfd49e818f64a47567f721b98411a3b454 -b188423e707640ab0e75a061e0b62830cde8afab8e1ad3dae30db69ffae4e2fc005bababbdcbd7213b918ed4f70e0c14 -a97e0fafe011abd70d4f99a0b36638b3d6e7354284588f17a88970ed48f348f88392779e9a038c6cbc9208d998485072 -87db11014a91cb9b63e8dfaa82cdebca98272d89eb445ee1e3ff9dbaf2b3fad1a03b888cffc128e4fe208ed0dddece0f -aad2e40364edd905d66ea4ac9d51f9640d6fda9a54957d26ba233809851529b32c85660fa401dbee3679ec54fa6dd966 -863e99336ca6edf03a5a259e59a2d0f308206e8a2fb320cfc0be06057366df8e0f94b33a28f574092736b3c5ada84270 -b34bcc56a057589f34939a1adc51de4ff6a9f4fee9c7fa9aa131e28d0cf0759a0c871b640162acdfbf91f3f1b59a3703 -935dd28f2896092995c5eff1618e5b6efe7a40178888d7826da9b0503c2d6e68a28e7fac1a334e166d0205f0695ef614 -b842cd5f8f5de5ca6c68cb4a5c1d7b451984930eb4cc18fd0934d52fdc9c3d2d451b1c395594d73bc3451432bfba653f -9014537885ce2debad736bc1926b25fdab9f69b216bf024f589c49dc7e6478c71d595c3647c9f65ff980b14f4bb2283b -8e827ccca1dd4cd21707140d10703177d722be0bbe5cac578db26f1ef8ad2909103af3c601a53795435b27bf95d0c9ed -8a0b8ad4d466c09d4f1e9167410dbe2edc6e0e6229d4b3036d30f85eb6a333a18b1c968f6ca6d6889bb08fecde017ef4 -9241ee66c0191b06266332dc9161dede384c4bb4e116dbd0890f3c3790ec5566da4568243665c4725b718ac0f6b5c179 -aeb4d5fad81d2b505d47958a08262b6f1b1de9373c2c9ba6362594194dea3e002ab03b8cbb43f867be83065d3d370f19 -8781bc83bb73f7760628629fe19e4714b494dbed444c4e4e4729b7f6a8d12ee347841a199888794c2234f51fa26fc2b9 -b58864f0acd1c2afa29367e637cbde1968d18589245d9936c9a489c6c495f54f0113ecdcbe4680ac085dd3c397c4d0c3 -94a24284afaeead61e70f3e30f87248d76e9726759445ca18cdb9360586c60cc9f0ec1c397f9675083e0b56459784e2e -aed358853f2b54dcbddf865e1816c2e89be12e940e1abfa661e2ee63ffc24a8c8096be2072fa83556482c0d89e975124 -b95374e6b4fc0765708e370bc881e271abf2e35c08b056a03b847e089831ef4fe3124b9c5849d9c276eb2e35b3daf264 -b834cdbcfb24c8f84bfa4c552e7fadc0028a140952fd69ed13a516e1314a4cd35d4b954a77d51a1b93e1f5d657d0315d -8fb6d09d23bfa90e7443753d45a918d91d75d8e12ec7d016c0dfe94e5c592ba6aaf483d2f16108d190822d955ad9cdc3 -aa315cd3c60247a6ad4b04f26c5404c2713b95972843e4b87b5a36a89f201667d70f0adf20757ebe1de1b29ae27dda50 -a116862dca409db8beff5b1ccd6301cdd0c92ca29a3d6d20eb8b87f25965f42699ca66974dd1a355200157476b998f3b -b4c2f5fe173c4dc8311b60d04a65ce1be87f070ac42e13cd19c6559a2931c6ee104859cc2520edebbc66a13dc7d30693 -8d4a02bf99b2260c334e7d81775c5cf582b00b0c982ce7745e5a90624919028278f5e9b098573bad5515ce7fa92a80c8 -8543493bf564ce6d97bd23be9bff1aba08bd5821ca834f311a26c9139c92a48f0c2d9dfe645afa95fec07d675d1fd53b -9344239d13fde08f98cb48f1f87d34cf6abe8faecd0b682955382a975e6eed64e863fa19043290c0736261622e00045c -aa49d0518f343005ca72b9e6c7dcaa97225ce6bb8b908ebbe7b1a22884ff8bfb090890364e325a0d414ad180b8f161d1 -907d7fd3e009355ab326847c4a2431f688627faa698c13c03ffdd476ecf988678407f029b8543a475dcb3dafdf2e7a9c -845f1f10c6c5dad2adc7935f5cd2e2b32f169a99091d4f1b05babe7317b9b1cdce29b5e62f947dc621b9acbfe517a258 -8f3be8e3b380ea6cdf9e9c237f5e88fd5a357e5ded80ea1fc2019810814de82501273b4da38916881125b6fa0cfd4459 -b9c7f487c089bf1d20c822e579628db91ed9c82d6ca652983aa16d98b4270c4da19757f216a71b9c13ddee3e6e43705f -8ba2d8c88ad2b872db104ea8ddbb006ec2f3749fd0e19298a804bb3a5d94de19285cc7fb19fee58a66f7851d1a66c39f -9375ecd3ed16786fe161af5d5c908f56eeb467a144d3bbddfc767e90065b7c94fc53431adebecba2b6c9b5821184d36e -a49e069bfadb1e2e8bff6a4286872e2a9765d62f0eaa4fcb0e5af4bbbed8be3510fb19849125a40a8a81d1e33e81c3eb -9522cc66757b386aa6b88619525c8ce47a5c346d590bb3647d12f991e6c65c3ab3c0cfc28f0726b6756c892eae1672be -a9a0f1f51ff877406fa83a807aeb17b92a283879f447b8a2159653db577848cc451cbadd01f70441e351e9ed433c18bc -8ff7533dcff6be8714df573e33f82cf8e9f2bcaaa43e939c4759d52b754e502717950de4b4252fb904560fc31dce94a4 -959724671e265a28d67c29d95210e97b894b360da55e4cf16e6682e7912491ed8ca14bfaa4dce9c25a25b16af580494f -92566730c3002f4046c737032487d0833c971e775de59fe02d9835c9858e2e3bc37f157424a69764596c625c482a2219 -a84b47ceff13ed9c3e5e9cdf6739a66d3e7c2bd8a6ba318fefb1a9aecf653bb2981da6733ddb33c4b0a4523acc429d23 -b4ddf571317e44f859386d6140828a42cf94994e2f1dcbcc9777f4eebbfc64fc1e160b49379acc27c4672b8e41835c5d -8ab95c94072b853d1603fdd0a43b30db617d13c1d1255b99075198e1947bfa5f59aed2b1147548a1b5e986cd9173d15c -89511f2eab33894fd4b3753d24249f410ff7263052c1fef6166fc63a79816656b0d24c529e45ccce6be28de6e375d916 -a0866160ca63d4f2be1b4ea050dac6b59db554e2ebb4e5b592859d8df339b46fd7cb89aaed0951c3ee540aee982c238a -8fcc5cbba1b94970f5ff2eb1922322f5b0aa7d918d4b380c9e7abfd57afd8b247c346bff7b87af82efbce3052511cd1b -99aeb2a5e846b0a2874cca02c66ed40d5569eb65ab2495bc3f964a092e91e1517941f2688e79f8cca49cd3674c4e06dc -b7a096dc3bad5ca49bee94efd884aa3ff5615cf3825cf95fbe0ce132e35f46581d6482fa82666c7ef5f1643eaee8f1ca -94393b1da6eaac2ffd186b7725eca582f1ddc8cdd916004657f8a564a7c588175cb443fc6943b39029f5bbe0add3fad8 -884b85fe012ccbcd849cb68c3ad832d83b3ef1c40c3954ffdc97f103b1ed582c801e1a41d9950f6bddc1d11f19d5ec76 -b00061c00131eded8305a7ce76362163deb33596569afb46fe499a7c9d7a0734c084d336b38d168024c2bb42b58e7660 -a439153ac8e6ca037381e3240e7ba08d056c83d7090f16ed538df25901835e09e27de2073646e7d7f3c65056af6e4ce7 -830fc9ca099097d1f38b90e6843dc86f702be9d20bdacc3e52cae659dc41df5b8d2c970effa6f83a5229b0244a86fe22 -b81ea2ffaaff2bb00dd59a9ab825ba5eed4db0d8ac9c8ed1a632ce8f086328a1cddd045fbe1ace289083c1325881b7e7 -b51ea03c58daf2db32c99b9c4789b183365168cb5019c72c4cc91ac30b5fb7311d3db76e6fa41b7cd4a8c81e2f6cdc94 -a4170b2c6d09ca5beb08318730419b6f19215ce6c631c854116f904be3bc30dd85a80c946a8ab054d3e307afaa3f8fbc -897cc42ff28971ff54d2a55dd6b35cfb8610ac902f3c06e3a5cea0e0a257e870c471236a8e84709211c742a09c5601a6 -a18f2e98d389dace36641621488664ecbb422088ab03b74e67009b8b8acacaaa24fdcf42093935f355207d934adc52a8 -92adcfb678cc2ba19c866f3f2b988fdcb4610567f3ab436cc0cb9acaf5a88414848d71133ebdbec1983e38e6190f1b5f -a86d43c2ce01b366330d3b36b3ca85f000c3548b8297e48478da1ee7d70d8576d4650cba7852ed125c0d7cb6109aa7f3 -8ed31ceed9445437d7732dce78a762d72ff32a7636bfb3fd7974b7ae15db414d8184a1766915244355deb354fbc5803b -9268f70032584f416e92225d65af9ea18c466ebc7ae30952d56a4e36fd9ea811dde0a126da9220ba3c596ec54d8a335e -9433b99ee94f2d3fbdd63b163a2bdf440379334c52308bd24537f7defd807145a062ff255a50d119a7f29f4b85d250e3 -90ce664f5e4628a02278f5cf5060d1a34f123854634b1870906e5723ac9afd044d48289be283b267d45fcbf3f4656aaf -aaf21c4d59378bb835d42ae5c5e5ab7a3c8c36a59e75997989313197752b79a472d866a23683b329ea69b048b87fa13e -b83c0589b304cec9ede549fde54f8a7c2a468c6657da8c02169a6351605261202610b2055c639b9ed2d5b8c401fb8f56 -9370f326ea0f170c2c05fe2c5a49189f20aec93b6b18a5572a818cd4c2a6adb359e68975557b349fb54f065d572f4c92 -ac3232fa5ce6f03fca238bef1ce902432a90b8afce1c85457a6bee5571c033d4bceefafc863af04d4e85ac72a4d94d51 -80d9ea168ff821b22c30e93e4c7960ce3ad3c1e6deeebedd342a36d01bd942419b187e2f382dbfd8caa34cca08d06a48 -a387a3c61676fb3381eefa2a45d82625635a666e999aba30e3b037ec9e040f414f9e1ad9652abd3bcad63f95d85038db -a1b229fe32121e0b391b0f6e0180670b9dc89d79f7337de4c77ea7ad0073e9593846f06797c20e923092a08263204416 -92164a9d841a2b828cedf2511213268b698520f8d1285852186644e9a0c97512cafa4bfbe29af892c929ebccd102e998 -82ee2fa56308a67c7db4fd7ef539b5a9f26a1c2cc36da8c3206ba4b08258fbb3cec6fe5cdbd111433fb1ba2a1e275927 -8c77bfe9e191f190a49d46f05600603fa42345592539b82923388d72392404e0b29a493a15e75e8b068dddcd444c2928 -80b927f93ccf79dcf5c5b20bcf5a7d91d7a17bc0401bb7cc9b53a6797feac31026eb114257621f5a64a52876e4474cc1 -b6b68b6501c37804d4833d5a063dd108a46310b1400549074e3cac84acc6d88f73948b7ad48d686de89c1ec043ae8c1a -ab3da00f9bdc13e3f77624f58a3a18fc3728956f84b5b549d62f1033ae4b300538e53896e2d943f160618e05af265117 -b6830e87233b8eace65327fdc764159645b75d2fd4024bf8f313b2dd5f45617d7ecfb4a0b53ccafb5429815a9a1adde6 -b9251cfe32a6dc0440615aadcd98b6b1b46e3f4e44324e8f5142912b597ee3526bea2431e2b0282bb58f71be5b63f65e -af8d70711e81cdddfb39e67a1b76643292652584c1ce7ce4feb1641431ad596e75c9120e85f1a341e7a4da920a9cdd94 -98cd4e996594e89495c078bfd52a4586b932c50a449a7c8dfdd16043ca4cda94dafbaa8ad1b44249c99bbcc52152506e -b9fc6d1c24f48404a4a64fbe3e43342738797905db46e4132aee5f086aaa4c704918ad508aaefa455cfe1b36572e6242 -a365e871d30ba9291cedaba1be7b04e968905d003e9e1af7e3b55c5eb048818ae5b913514fb08b24fb4fbdccbb35d0b8 -93bf99510971ea9af9f1e364f1234c898380677c8e8de9b0dd24432760164e46c787bc9ec42a7ad450500706cf247b2d -b872f825a5b6e7b9c7a9ddfeded3516f0b1449acc9b4fd29fc6eba162051c17416a31e5be6d3563f424d28e65bab8b8f -b06b780e5a5e8eb4f4c9dc040f749cf9709c8a4c9ef15e925f442b696e41e5095db0778a6c73bcd329b265f2c6955c8b -848f1a981f5fc6cd9180cdddb8d032ad32cdfa614fc750d690dbae36cc0cd355cbf1574af9b3ffc8b878f1b2fafb9544 -a03f48cbff3e9e8a3a655578051a5ae37567433093ac500ed0021c6250a51b767afac9bdb194ee1e3eac38a08c0eaf45 -b5be78ce638ff8c4aa84352b536628231d3f7558c5be3bf010b28feac3022e64691fa672f358c8b663904aebe24a54ed -a9d4da70ff676fa55d1728ba6ab03b471fa38b08854d99e985d88c2d050102d8ccffbe1c90249a5607fa7520b15fe791 -8fe9f7092ffb0b69862c8e972fb1ecf54308c96d41354ed0569638bb0364f1749838d6d32051fff1599112978c6e229c -ae6083e95f37770ecae0df1e010456f165d96cfe9a7278c85c15cffd61034081ce5723e25e2bede719dc9341ec8ed481 -a260891891103089a7afbd9081ea116cfd596fd1015f5b65e10b0961eb37fab7d09c69b7ce4be8bf35e4131848fb3fe4 -8d729fa32f6eb9fd2f6a140bef34e8299a2f3111bffd0fe463aa8622c9d98bfd31a1df3f3e87cd5abc52a595f96b970e -a30ec6047ae4bc7da4daa7f4c28c93aedb1112cfe240e681d07e1a183782c9ff6783ac077c155af23c69643b712a533f -ac830726544bfe7b5467339e5114c1a75f2a2a8d89453ce86115e6a789387e23551cd64620ead6283dfa4538eb313d86 -8445c135b7a48068d8ed3e011c6d818cfe462b445095e2fbf940301e50ded23f272d799eea47683fc027430ce14613ef -95785411715c9ae9d8293ce16a693a2aa83e3cb1b4aa9f76333d0da2bf00c55f65e21e42e50e6c5772ce213dd7b4f7a0 -b273b024fa18b7568c0d1c4d2f0c4e79ec509dafac8c5951f14192d63ddbcf2d8a7512c1c1b615cc38fa3e336618e0c5 -a78b9d3ea4b6a90572eb27956f411f1d105fdb577ee2ffeec9f221da9b45db84bfe866af1f29597220c75e0c37a628d8 -a4be2bf058c36699c41513c4d667681ce161a437c09d81383244fc55e1c44e8b1363439d0cce90a3e44581fb31d49493 -b6eef13040f17dd4eba22aaf284d2f988a4a0c4605db44b8d2f4bf9567ac794550b543cc513c5f3e2820242dd704152e -87eb00489071fa95d008c5244b88e317a3454652dcb1c441213aa16b28cd3ecaa9b22fec0bdd483c1df71c37119100b1 -92d388acdcb49793afca329cd06e645544d2269234e8b0b27d2818c809c21726bc9cf725651b951e358a63c83dedee24 -ae27e219277a73030da27ab5603c72c8bd81b6224b7e488d7193806a41343dff2456132274991a4722fdb0ef265d04cd -97583e08ecb82bbc27c0c8476d710389fa9ffbead5c43001bd36c1b018f29faa98de778644883e51870b69c5ffb558b5 -90a799a8ce73387599babf6b7da12767c0591cadd36c20a7990e7c05ea1aa2b9645654ec65308ee008816623a2757a6a -a1b47841a0a2b06efd9ab8c111309cc5fc9e1d5896b3e42ed531f6057e5ade8977c29831ce08dbda40348386b1dcc06d -b92b8ef59bbddb50c9457691bc023d63dfcc54e0fd88bd5d27a09e0d98ac290fc90e6a8f6b88492043bf7c87fac8f3e4 -a9d6240b07d62e22ec8ab9b1f6007c975a77b7320f02504fc7c468b4ee9cfcfd945456ff0128bc0ef2174d9e09333f8d -8e96534c94693226dc32bca79a595ca6de503af635f802e86442c67e77564829756961d9b701187fe91318da515bf0e6 -b6ba290623cd8dd5c2f50931c0045d1cfb0c30877bc8fe58cbc3ff61ee8da100045a39153916efa1936f4aee0892b473 -b43baa7717fac02d4294f5b3bb5e58a65b3557747e3188b482410388daac7a9c177f762d943fd5dcf871273921213da8 -b9cf00f8fb5e2ef2b836659fece15e735060b2ea39b8e901d3dcbdcf612be8bf82d013833718c04cd46ffaa70b85f42e -8017d0c57419e414cbba504368723e751ef990cc6f05dad7b3c2de6360adc774ad95512875ab8337d110bf39a42026fa -ae7401048b838c0dcd4b26bb6c56d79d51964a0daba780970b6c97daee4ea45854ea0ac0e4139b3fe60dac189f84df65 -887b237b0cd0f816b749b21db0b40072f9145f7896c36916296973f9e6990ede110f14e5976c906d08987c9836cca57f -a88c3d5770148aee59930561ca1223aceb2c832fb5417e188dca935905301fc4c6c2c9270bc1dff7add490a125eb81c6 -b6cf9b02c0cd91895ad209e38c54039523f137b5848b9d3ad33ae43af6c20c98434952db375fe378de7866f2d0e8b18a -84ef3d322ff580c8ad584b1fe4fe346c60866eb6a56e982ba2cf3b021ecb1fdb75ecc6c29747adda86d9264430b3f816 -a0561c27224baf0927ad144cb71e31e54a064c598373fcf0d66aebf98ab7af1d8e2f343f77baefff69a6da750a219e11 -aa5cc43f5b8162b016f5e1b61214c0c9d15b1078911c650b75e6cdfb49b85ee04c6739f5b1687d15908444f691f732de -ad4ac099b935589c7b8fdfdf3db332b7b82bb948e13a5beb121ebd7db81a87d278024a1434bcf0115c54ca5109585c3d -8a00466abf3f109a1dcd19e643b603d3af23d42794ef8ca2514dd507ecea44a031ac6dbc18bd02f99701168b25c1791e -b00b5900dfad79645f8bee4e5adc7b84eb22e5b1e67df77ccb505b7fc044a6c08a8ea5faca662414eb945f874f884cea -950e204e5f17112250b22ea6bb8423baf522fc0af494366f18fe0f949f51d6e6812074a80875cf1ed9c8e7420058d541 -91e5cbf8bb1a1d50c81608c9727b414d0dd2fb467ebc92f100882a3772e54f94979cfdf8e373fdef7c7fcdd60fec9e00 -a093f6a857b8caaff80599c2e89c962b415ecbaa70d8fd973155fa976a284c6b29a855f5f7a3521134d00d2972755188 -b4d55a3551b00da54cc010f80d99ddd2544bde9219a3173dfaadf3848edc7e4056ab532fb75ac26f5f7141e724267663 -a03ea050fc9b011d1b04041b5765d6f6453a93a1819cd9bd6328637d0b428f08526466912895dcc2e3008ee58822e9a7 -99b12b3665e473d01bc6985844f8994fb65cb15745024fb7af518398c4a37ff215da8f054e8fdf3286984ae36a73ca5e -9972c7e7a7fb12e15f78d55abcaf322c11249cd44a08f62c95288f34f66b51f146302bce750ff4d591707075d9123bd2 -a64b4a6d72354e596d87cda213c4fc2814009461570ccb27d455bbe131f8d948421a71925425b546d8cf63d5458cd64b -91c215c73b195795ede2228b7ed1f6e37892e0c6b0f4a0b5a16c57aa1100c84df9239054a173b6110d6c2b7f4bf1ce52 -88807198910ec1303480f76a3683870246a995e36adaeadc29c22f0bdba8152fe705bd070b75de657b04934f7d0ccf80 -b37c0026c7b32eb02cacac5b55cb5fe784b8e48b2945c64d3037af83ece556a117f0ff053a5968c2f5fa230e291c1238 -94c768384ce212bc2387e91ce8b45e4ff120987e42472888a317abc9dcdf3563b62e7a61c8e98d7cdcbe272167d91fc6 -a10c2564936e967a390cb14ef6e8f8b04ea9ece5214a38837eda09e79e0c7970b1f83adf017c10efd6faa8b7ffa2c567 -a5085eed3a95f9d4b1269182ea1e0d719b7809bf5009096557a0674bde4201b0ddc1f0f16a908fc468846b3721748ce3 -87468eb620b79a0a455a259a6b4dfbc297d0d53336537b771254dd956b145dc816b195b7002647ea218552e345818a3f -ace2b77ffb87366af0a9cb5d27d6fc4a14323dbbf1643f5f3c4559306330d86461bb008894054394cbfaefeaa0bc2745 -b27f56e840a54fbd793f0b7a7631aa4cee64b5947e4382b2dfb5eb1790270288884c2a19afebe5dc0c6ef335d4531c1c -876e438633931f7f895062ee16c4b9d10428875f7bc79a8e156a64d379a77a2c45bf5430c5ab94330f03da352f1e9006 -a2512a252587d200d2092b44c914df54e04ff8bcef36bf631f84bde0cf5a732e3dc7f00f662842cfd74b0b0f7f24180e -827f1bc8f54a35b7a4bd8154f79bcc055e45faed2e74adf7cf21cca95df44d96899e847bd70ead6bb27b9c0ed97bbd8b -a0c92cf5a9ed843714f3aea9fe7b880f622d0b4a3bf66de291d1b745279accf6ba35097849691370f41732ba64b5966b -a63f5c1e222775658421c487b1256b52626c6f79cb55a9b7deb2352622cedffb08502042d622eb3b02c97f9c09f9c957 -8cc093d52651e65fb390e186db6cc4de559176af4624d1c44cb9b0e836832419dacac7b8db0627b96288977b738d785d -aa7b6a17dfcec146134562d32a12f7bd7fe9522e300859202a02939e69dbd345ed7ff164a184296268f9984f9312e8fc -8ac76721f0d2b679f023d06cbd28c85ae5f4b43c614867ccee88651d4101d4fd352dbdb65bf36bfc3ebc0109e4b0c6f9 -8d350f7c05fc0dcd9a1170748846fb1f5d39453e4cb31e6d1457bed287d96fc393b2ecc53793ca729906a33e59c6834a -b9913510dfc5056d7ec5309f0b631d1ec53e3a776412ada9aefdaf033c90da9a49fdde6719e7c76340e86599b1f0eec2 -94955626bf4ce87612c5cfffcf73bf1c46a4c11a736602b9ba066328dc52ad6d51e6d4f53453d4ed55a51e0aad810271 -b0fcab384fd4016b2f1e53f1aafd160ae3b1a8865cd6c155d7073ecc1664e05b1d8bca1def39c158c7086c4e1103345e -827de3f03edfbde08570b72de6662c8bfa499b066a0a27ebad9b481c273097d17a5a0a67f01553da5392ec3f149b2a78 -ab7940384c25e9027c55c40df20bd2a0d479a165ced9b1046958353cd69015eeb1e44ed2fd64e407805ba42df10fc7bf -8ad456f6ff8cd58bd57567d931f923d0c99141978511b17e03cab7390a72b9f62498b2893e1b05c7c22dd274e9a31919 -ac75399e999effe564672db426faa17a839e57c5ef735985c70cd559a377adec23928382767b55ed5a52f7b11b54b756 -b17f975a00b817299ac7af5f2024ea820351805df58b43724393bfb3920a8cd747a3bbd4b8286e795521489db3657168 -a2bed800a6d95501674d9ee866e7314063407231491d794f8cf57d5be020452729c1c7cefd8c50dc1540181f5caab248 -9743f5473171271ffdd3cc59a3ae50545901a7b45cd4bc3570db487865f3b73c0595bebabbfe79268809ee1862e86e4a -b7eab77c2d4687b60d9d7b04e842b3880c7940140012583898d39fcc22d9b9b0a9be2c2e3788b3e6f30319b39c338f09 -8e2b8f797a436a1b661140e9569dcf3e1eea0a77c7ff2bc4ff0f3e49af04ed2de95e255df8765f1d0927fb456a9926b1 -8aefea201d4a1f4ff98ffce94e540bb313f2d4dfe7e9db484a41f13fc316ed02b282e1acc9bc6f56cad2dc2e393a44c9 -b950c17c0e5ca6607d182144aa7556bb0efe24c68f06d79d6413a973b493bfdf04fd147a4f1ab03033a32004cc3ea66f -b7b8dcbb179a07165f2dc6aa829fad09f582a71b05c3e3ea0396bf9e6fe73076f47035c031c2101e8e38e0d597eadd30 -a9d77ed89c77ec1bf8335d08d41c3c94dcca9fd1c54f22837b4e54506b212aa38d7440126c80648ab7723ff18e65ed72 -a819d6dfd4aef70e52b8402fe5d135f8082d40eb7d3bb5c4d7997395b621e2bb10682a1bad2c9caa33dd818550fc3ec6 -8f6ee34128fac8bbf13ce2d68b2bb363eb4fd65b297075f88e1446ddeac242500eeb4ef0735e105882ff5ba8c44c139b -b4440e48255c1644bcecf3a1e9958f1ec4901cb5b1122ee5b56ffd02cad1c29c4266999dbb85aa2605c1b125490074d4 -a43304a067bede5f347775d5811cf65a6380a8d552a652a0063580b5c5ef12a0867a39c7912fa219e184f4538eba1251 -a891ad67a790089ffc9f6d53e6a3d63d3556f5f693e0cd8a7d0131db06fd4520e719cfcc3934f0a8f62a95f90840f1d4 -aea6df8e9bb871081aa0fc5a9bafb00be7d54012c5baf653791907d5042a326aeee966fd9012a582cc16695f5baf7042 -8ffa2660dc52ed1cd4eff67d6a84a8404f358a5f713d04328922269bee1e75e9d49afeec0c8ad751620f22352a438e25 -87ec6108e2d63b06abed350f8b363b7489d642486f879a6c3aa90e5b0f335efc2ff2834eef9353951a42136f8e6a1b32 -865619436076c2760d9e87ddc905023c6de0a8d56eef12c98a98c87837f2ca3f27fd26a2ad752252dbcbe2b9f1d5a032 -980437dce55964293cb315c650c5586ffd97e7a944a83f6618af31c9d92c37b53ca7a21bb5bc557c151b9a9e217e7098 -95d128fc369df4ad8316b72aea0ca363cbc7b0620d6d7bb18f7076a8717a6a46956ff140948b0cc4f6d2ce33b5c10054 -8c7212d4a67b9ec70ebbca04358ad2d36494618d2859609163526d7b3acc2fc935ca98519380f55e6550f70a9bc76862 -893a2968819401bf355e85eee0f0ed0406a6d4a7d7f172d0017420f71e00bb0ba984f6020999a3cdf874d3cd8ebcd371 -9103c1af82dece25d87274e89ea0acd7e68c2921c4af3d8d7c82ab0ed9990a5811231b5b06113e7fa43a6bd492b4564f -99cfd87a94eab7d35466caa4ed7d7bb45e5c932b2ec094258fb14bf205659f83c209b83b2f2c9ccb175974b2a33e7746 -874b6b93e4ee61be3f00c32dd84c897ccd6855c4b6251eb0953b4023634490ed17753cd3223472873cbc6095b2945075 -84a32c0dc4ea60d33aac3e03e70d6d639cc9c4cc435c539eff915017be3b7bdaba33349562a87746291ebe9bc5671f24 -a7057b24208928ad67914e653f5ac1792c417f413d9176ba635502c3f9c688f7e2ee81800d7e3dc0a340c464da2fd9c5 -a03fb9ed8286aacfa69fbd5d953bec591c2ae4153400983d5dbb6cd9ea37fff46ca9e5cceb9d117f73e9992a6c055ad2 -863b2de04e89936c9a4a2b40380f42f20aefbae18d03750fd816c658aee9c4a03df7b12121f795c85d01f415baaeaa59 -8526eb9bd31790fe8292360d7a4c3eed23be23dd6b8b8f01d2309dbfdc0cfd33ad1568ddd7f8a610f3f85a9dfafc6a92 -b46ab8c5091a493d6d4d60490c40aa27950574a338ea5bbc045be3a114af87bdcb160a8c80435a9b7ad815f3cb56a3f3 -aeadc47b41a8d8b4176629557646202f868b1d728b2dda58a347d937e7ffc8303f20d26d6c00b34c851b8aeec547885d -aebb19fc424d72c1f1822aa7adc744cd0ef7e55727186f8df8771c784925058c248406ebeeaf3c1a9ee005a26e9a10c6 -8ff96e81c1a4a2ab1b4476c21018fae0a67e92129ee36120cae8699f2d7e57e891f5c624902cb1b845b944926a605cc3 -8251b8d2c43fadcaa049a9e7aff838dae4fb32884018d58d46403ac5f3beb5c518bfd45f03b8abb710369186075eb71c -a8b2a64f865f51a5e5e86a66455c093407933d9d255d6b61e1fd81ffafc9538d73caaf342338a66ba8ee166372a3d105 -aad915f31c6ba7fdc04e2aaac62e84ef434b7ee76a325f07dc430d12c84081999720181067b87d792efd0117d7ee1eab -a13db3bb60389883fd41d565c54fb5180d9c47ce2fe7a169ae96e01d17495f7f4fa928d7e556e7c74319c4c25d653eb2 -a4491b0198459b3f552855d680a59214eb74e6a4d6c5fa3b309887dc50ebea2ecf6d26c040550f7dc478b452481466fb -8f017f13d4b1e3f0c087843582b52d5f8d13240912254d826dd11f8703a99a2f3166dfbdfdffd9a3492979d77524276b -96c3d5dcd032660d50d7cd9db2914f117240a63439966162b10c8f1f3cf74bc83b0f15451a43b31dbd85e4a7ce0e4bb1 -b479ec4bb79573d32e0ec93b92bdd7ec8c26ddb5a2d3865e7d4209d119fd3499eaac527615ffac78c440e60ef3867ae0 -b2c49c4a33aa94b52b6410b599e81ff15490aafa7e43c8031c865a84e4676354a9c81eb4e7b8be6825fdcefd1e317d44 -906dc51d6a90c089b6704b47592805578a6eed106608eeb276832f127e1b8e858b72e448edcbefb497d152447e0e68ff -b0e81c63b764d7dfbe3f3fddc9905aef50f3633e5d6a4af6b340495124abedcff5700dfd1577bbbed7b6bf97d02719cb -9304c64701e3b4ed6d146e48a881f7d83a17f58357cca0c073b2bb593afd2d94f6e2a7a1ec511d0a67ad6ff4c3be5937 -b6fdbd12ba05aa598d80b83f70a15ef90e5cba7e6e75fa038540ee741b644cd1f408a6cecfd2a891ef8d902de586c6b5 -b80557871a6521b1b3c74a1ba083ae055b575df607f1f7b04c867ba8c8c181ea68f8d90be6031f4d25002cca27c44da2 -aa7285b8e9712e06b091f64163f1266926a36607f9d624af9996856ed2aaf03a580cb22ce407d1ade436c28b44ca173f -8148d72b975238b51e6ea389e5486940d22641b48637d7dfadfa603a605bfc6d74a016480023945d0b85935e396aea5d -8a014933a6aea2684b5762af43dcf4bdbb633cd0428d42d71167a2b6fc563ece5e618bff22f1db2ddb69b845b9a2db19 -990d91740041db770d0e0eb9d9d97d826f09fd354b91c41e0716c29f8420e0e8aac0d575231efba12fe831091ec38d5a -9454d0d32e7e308ddec57cf2522fb1b67a2706e33fb3895e9e1f18284129ab4f4c0b7e51af25681d248d7832c05eb698 -a5bd434e75bac105cb3e329665a35bce6a12f71dd90c15165777d64d4c13a82bceedb9b48e762bd24034e0fc9fbe45f4 -b09e3b95e41800d4dc29c6ffdaab2cd611a0050347f6414f154a47ee20ee59bf8cf7181454169d479ebce1eb5c777c46 -b193e341d6a047d15eea33766d656d807b89393665a783a316e9ba10518e5515c8e0ade3d6e15641d917a8a172a5a635 -ade435ec0671b3621dde69e07ead596014f6e1daa1152707a8c18877a8b067bde2895dd47444ffa69db2bbef1f1d8816 -a7fd3d6d87522dfc56fb47aef9ce781a1597c56a8bbfd796baba907afdc872f753d732bfda1d3402aee6c4e0c189f52d -a298cb4f4218d0464b2fab393e512bbc477c3225aa449743299b2c3572f065bc3a42d07e29546167ed9e1b6b3b3a3af3 -a9ee57540e1fd9c27f4f0430d194b91401d0c642456c18527127d1f95e2dba41c2c86d1990432eb38a692fda058fafde -81d6c1a5f93c04e6d8e5a7e0678c1fc89a1c47a5c920bcd36180125c49fcf7c114866b90e90a165823560b19898a7c16 -a4b7a1ec9e93c899b9fd9aaf264c50e42c36c0788d68296a471f7a3447af4dbc81e4fa96070139941564083ec5b5b5a1 -b3364e327d381f46940c0e11e29f9d994efc6978bf37a32586636c0070b03e4e23d00650c1440f448809e1018ef9f6d8 -8056e0913a60155348300e3a62e28b5e30629a90f7dd4fe11289097076708110a1d70f7855601782a3cdc5bdb1ca9626 -b4980fd3ea17bac0ba9ee1c470b17e575bb52e83ebdd7d40c93f4f87bebeaff1c8a679f9d3d09d635f068d37d5bd28bd -905a9299e7e1853648e398901dfcd437aa575c826551f83520df62984f5679cb5f0ea86aa45ed3e18b67ddc0dfafe809 -ab99553bf31a84f2e0264eb34a08e13d8d15e2484aa9352354becf9a15999c76cc568d68274b70a65e49703fc23540d0 -a43681597bc574d2dae8964c9a8dc1a07613d7a1272bdcb818d98c85d44e16d744250c33f3b5e4d552d97396b55e601f -a54e5a31716fccb50245898c99865644405b8dc920ded7a11f3d19bdc255996054b268e16f2e40273f11480e7145f41e -8134f3ad5ef2ad4ba12a8a4e4d8508d91394d2bcdc38b7c8c8c0b0a820357ac9f79d286c65220f471eb1adca1d98fc68 -94e2f755e60471578ab2c1adb9e9cea28d4eec9b0e92e0140770bca7002c365fcabfe1e5fb4fe6cfe79a0413712aa3ef -ad48f8d0ce7eb3cc6e2a3086ad96f562e5bed98a360721492ae2e74dc158586e77ec8c35d5fd5927376301b7741bad2b -8614f0630bdd7fbad3a31f55afd9789f1c605dc85e7dc67e2edfd77f5105f878bb79beded6e9f0b109e38ea7da67e8d5 -9804c284c4c5e77dabb73f655b12181534ca877c3e1e134aa3f47c23b7ec92277db34d2b0a5d38d2b69e5d1c3008a3e3 -a51b99c3088e473afdaa9e0a9f7e75a373530d3b04e44e1148da0726b95e9f5f0c7e571b2da000310817c36f84b19f7f -ac4ff909933b3b76c726b0a382157cdc74ab851a1ac6cef76953c6444441804cc43abb883363f416592e8f6cfbc4550b -ae7d915eb9fc928b65a29d6edbc75682d08584d0014f7bcf17d59118421ae07d26a02137d1e4de6938bcd1ab8ef48fad -852f7e453b1af89b754df6d11a40d5d41ea057376e8ecacd705aacd2f917457f4a093d6b9a8801837fa0f62986ad7149 -92c6bf5ada5d0c3d4dd8058483de36c215fa98edab9d75242f3eff9db07c734ad67337da6f0eefe23a487bf75a600dee -a2b42c09d0db615853763552a48d2e704542bbd786aae016eb58acbf6c0226c844f5fb31e428cb6450b9db855f8f2a6f -880cc07968266dbfdcfbc21815cd69e0eddfee239167ac693fb0413912d816f2578a74f7716eecd6deefa68c6eccd394 -b885b3ace736cd373e8098bf75ba66fa1c6943ca1bc4408cd98ac7074775c4478594f91154b8a743d9c697e1b29f5840 -a51ce78de512bd87bfa0835de819941dffbf18bec23221b61d8096fc9436af64e0693c335b54e7bfc763f287bdca2db6 -a3c76166a3bdb9b06ef696e57603b58871bc72883ee9d45171a30fe6e1d50e30bc9c51b4a0f5a7270e19a77b89733850 -acefc5c6f8a1e7c24d7b41e0fc7f6f3dc0ede6cf3115ffb9a6e54b1d954cbca9bda8ad7a084be9be245a1b8e9770d141 -b420ed079941842510e31cfad117fa11fb6b4f97dfbc6298cb840f27ebaceba23eeaf3f513bcffbf5e4aae946310182d -95c3bb5ef26c5ed2f035aa5d389c6b3c15a6705b9818a3fefaed28922158b35642b2e8e5a1a620fdad07e75ad4b43af4 -825149f9081ecf07a2a4e3e8b5d21bade86c1a882475d51c55ee909330b70c5a2ac63771c8600c6f38df716af61a3ea1 -873b935aae16d9f08adbc25353cee18af2f1b8d5f26dec6538d6bbddc515f2217ed7d235dcfea59ae61b428798b28637 -9294150843a2bedcedb3bb74c43eb28e759cf9499582c5430bccefb574a8ddd4f11f9929257ff4c153990f9970a2558f -b619563a811cc531da07f4f04e5c4c6423010ff9f8ed7e6ec9449162e3d501b269fb1c564c09c0429431879b0f45df02 -91b509b87eb09f007d839627514658c7341bc76d468920fe8a740a8cb96a7e7e631e0ea584a7e3dc1172266f641d0f5c -8b8aceace9a7b9b4317f1f01308c3904d7663856946afbcea141a1c615e21ccad06b71217413e832166e9dd915fbe098 -87b3b36e725833ea0b0f54753c3728c0dbc87c52d44d705ffc709f2d2394414c652d3283bab28dcce09799504996cee0 -b2670aad5691cbf308e4a6a77a075c4422e6cbe86fdba24e9f84a313e90b0696afb6a067eebb42ba2d10340d6a2f6e51 -876784a9aff3d54faa89b2bacd3ff5862f70195d0b2edc58e8d1068b3c9074c0da1cfa23671fe12f35e33b8a329c0ccd -8b48b9e758e8a8eae182f5cbec96f67d20cca6d3eee80a2d09208eb1d5d872e09ef23d0df8ebbb9b01c7449d0e3e3650 -b79303453100654c04a487bdcadc9e3578bc80930c489a7069a52e8ca1dba36c492c8c899ce025f8364599899baa287d -961b35a6111da54ece6494f24dacd5ea46181f55775b5f03df0e370c34a5046ac2b4082925855325bb42bc2a2c98381d -a31feb1be3f5a0247a1f7d487987eb622e34fca817832904c6ee3ee60277e5847945a6f6ea1ac24542c72e47bdf647df -a12a2aa3e7327e457e1aae30e9612715dd2cfed32892c1cd6dcda4e9a18203af8a44afb46d03b2eed89f6b9c5a2c0c23 -a08265a838e69a2ca2f80fead6ccf16f6366415b920c0b22ee359bcd8d4464ecf156f400a16a7918d52e6d733dd64211 -b723d6344e938d801cca1a00032af200e541d4471fd6cbd38fb9130daa83f6a1dffbbe7e67fc20f9577f884acd7594b2 -a6733d83ec78ba98e72ddd1e7ff79b7adb0e559e256760d0c590a986e742445e8cdf560d44b29439c26d87edd0b07c8c -a61c2c27d3f7b9ff4695a17afedf63818d4bfba390507e1f4d0d806ce8778d9418784430ce3d4199fd3bdbc2504d2af3 -8332f3b63a6dc985376e8b1b25eeae68be6160fbe40053ba7bcf6f073204f682da72321786e422d3482fd60c9e5aa034 -a280f44877583fbb6b860d500b1a3f572e3ee833ec8f06476b3d8002058e25964062feaa1e5bec1536d734a5cfa09145 -a4026a52d277fcea512440d2204f53047718ebfcae7b48ac57ea7f6bfbc5de9d7304db9a9a6cbb273612281049ddaec5 -95cdf69c831ab2fad6c2535ede9c07e663d2ddccc936b64e0843d2df2a7b1c31f1759c3c20f1e7a57b1c8f0dbb21b540 -95c96cec88806469c277ab567863c5209027cecc06c7012358e5f555689c0d9a5ffb219a464f086b45817e8536b86d2f -afe38d4684132a0f03d806a4c8df556bf589b25271fbc6fe2e1ed16de7962b341c5003755da758d0959d2e6499b06c68 -a9b77784fda64987f97c3a23c5e8f61b918be0f7c59ba285084116d60465c4a2aaafc8857eb16823282cc83143eb9126 -a830f05881ad3ce532a55685877f529d32a5dbe56cea57ffad52c4128ee0fad0eeaf0da4362b55075e77eda7babe70e5 -992b3ad190d6578033c13ed5abfee4ef49cbc492babb90061e3c51ee4b5790cdd4c8fc1abff1fa2c00183b6b64f0bbbe -b1015424d9364aeff75de191652dc66484fdbec3e98199a9eb9671ec57bec6a13ff4b38446e28e4d8aedb58dd619cd90 -a745304604075d60c9db36cada4063ac7558e7ec2835d7da8485e58d8422e817457b8da069f56511b02601289fbb8981 -a5ba4330bc5cb3dbe0486ddf995632a7260a46180a08f42ae51a2e47778142132463cc9f10021a9ad36986108fefa1a9 -b419e9fd4babcaf8180d5479db188bb3da232ae77a1c4ed65687c306e6262f8083070a9ac32220cddb3af2ec73114092 -a49e23dc5f3468f3bf3a0bb7e4a114a788b951ff6f23a3396ae9e12cbff0abd1240878a3d1892105413dbc38818e807c -b7ecc7b4831f650202987e85b86bc0053f40d983f252e9832ef503aea81c51221ce93279da4aa7466c026b2d2070e55d -96a8c35cb87f84fa84dcd6399cc2a0fd79cc9158ef4bdde4bae31a129616c8a9f2576cd19baa3f497ca34060979aed7d -8681b2c00aa62c2b519f664a95dcb8faef601a3b961bb4ce5d85a75030f40965e2983871d41ea394aee934e859581548 -85c229a07efa54a713d0790963a392400f55fbb1a43995a535dc6c929f20d6a65cf4efb434e0ad1cb61f689b8011a3bc -90856f7f3444e5ad44651c28e24cc085a5db4d2ffe79aa53228c26718cf53a6e44615f3c5cda5aa752d5f762c4623c66 -978999b7d8aa3f28a04076f74d11c41ef9c89fdfe514936c4238e0f13c38ec97e51a5c078ebc6409e517bfe7ccb42630 -a099914dd7ed934d8e0d363a648e9038eb7c1ec03fa04dbcaa40f7721c618c3ef947afef7a16b4d7ac8c12aa46637f03 -ab2a104fed3c83d16f2cda06878fa5f30c8c9411de71bfb67fd2fc9aa454dcbcf3d299d72f8cc12e919466a50fcf7426 -a4471d111db4418f56915689482f6144efc4664cfb0311727f36c864648d35734351becc48875df96f4abd3cfcf820f9 -83be11727cd30ea94ccc8fa31b09b81c9d6a9a5d3a4686af9da99587332fe78c1f94282f9755854bafd6033549afec91 -88020ff971dc1a01a9e993cd50a5d2131ffdcbb990c1a6aaa54b20d8f23f9546a70918ea57a21530dcc440c1509c24ad -ae24547623465e87905eaffa1fa5d52bb7c453a8dbd89614fa8819a2abcedaf455c2345099b7324ae36eb0ad7c8ef977 -b59b0c60997de1ee00b7c388bc7101d136c9803bf5437b1d589ba57c213f4f835a3e4125b54738e78abbc21b000f2016 -a584c434dfe194546526691b68fa968c831c31da42303a1d735d960901c74011d522246f37f299555416b8cf25c5a548 -80408ce3724f4837d4d52376d255e10f69eb8558399ae5ca6c11b78b98fe67d4b93157d2b9b639f1b5b64198bfe87713 -abb941e8d406c2606e0ddc35c113604fdd9d249eacc51cb64e2991e551b8639ce44d288cc92afa7a1e7fc599cfc84b22 -b223173f560cacb1c21dba0f1713839e348ad02cbfdef0626748604c86f89e0f4c919ed40b583343795bdd519ba952c8 -af1c70512ec3a19d98b8a1fc3ff7f7f5048a27d17d438d43f561974bbdd116fcd5d5c21040f3447af3f0266848d47a15 -8a44809568ebe50405bede19b4d2607199159b26a1b33e03d180e6840c5cf59d991a4fb150d111443235d75ecad085b7 -b06207cdca46b125a27b3221b5b50cf27af4c527dd7c80e2dbcebbb09778a96df3af67e50f07725239ce3583dad60660 -993352d9278814ec89b26a11c4a7c4941bf8f0e6781ae79559d14749ee5def672259792db4587f85f0100c7bb812f933 -9180b8a718b971fd27bc82c8582d19c4b4f012453e8c0ffeeeffe745581fc6c07875ab28be3af3fa3896d19f0c89ac5b -8b8e1263eb48d0fe304032dd5ea1f30e73f0121265f7458ba9054d3626894e8a5fef665340abd2ede9653045c2665938 -99a2beee4a10b7941c24b2092192faf52b819afd033e4a2de050fd6c7f56d364d0cf5f99764c3357cf32399e60fc5d74 -946a4aad7f8647ea60bee2c5fcdeb6f9a58fb2cfca70c4d10e458027a04846e13798c66506151be3df9454b1e417893f -a672a88847652d260b5472d6908d1d57e200f1e492d30dd1cecc441cdfc9b76e016d9bab560efd4d7f3c30801de884a9 -9414e1959c156cde1eb24e628395744db75fc24b9df4595350aaad0bc38e0246c9b4148f6443ef68b8e253a4a6bcf11c -9316e9e4ec5fab4f80d6540df0e3a4774db52f1d759d2e5b5bcd3d7b53597bb007eb1887cb7dc61f62497d51ffc8d996 -902d6d77bb49492c7a00bc4b70277bc28c8bf9888f4307bb017ac75a962decdedf3a4e2cf6c1ea9f9ba551f4610cbbd7 -b07025a18b0e32dd5e12ec6a85781aa3554329ea12c4cd0d3b2c22e43d777ef6f89876dd90a9c8fb097ddf61cf18adc5 -b355a849ad3227caa4476759137e813505ec523cbc2d4105bc7148a4630f9e81918d110479a2d5f5e4cd9ccec9d9d3e3 -b49532cfdf02ee760109881ad030b89c48ee3bb7f219ccafc13c93aead754d29bdafe345be54c482e9d5672bd4505080 -9477802410e263e4f938d57fa8f2a6cac7754c5d38505b73ee35ea3f057aad958cb9722ba6b7b3cfc4524e9ca93f9cdc -9148ea83b4436339580f3dbc9ba51509e9ab13c03063587a57e125432dd0915f5d2a8f456a68f8fff57d5f08c8f34d6e -b00b6b5392b1930b54352c02b1b3b4f6186d20bf21698689bbfc7d13e86538a4397b90e9d5c93fd2054640c4dbe52a4f -926a9702500441243cd446e7cbf15dde16400259726794694b1d9a40263a9fc9e12f7bcbf12a27cb9aaba9e2d5848ddc -a0c6155f42686cbe7684a1dc327100962e13bafcf3db97971fc116d9f5c0c8355377e3d70979cdbd58fd3ea52440901c -a277f899f99edb8791889d0817ea6a96c24a61acfda3ad8c3379e7c62b9d4facc4b965020b588651672fd261a77f1bfc -8f528cebb866b501f91afa50e995234bef5bf20bff13005de99cb51eaac7b4f0bf38580cfd0470de40f577ead5d9ba0f -963fc03a44e9d502cc1d23250efef44d299befd03b898d07ce63ca607bb474b5cf7c965a7b9b0f32198b04a8393821f7 -ab087438d0a51078c378bf4a93bd48ef933ff0f1fa68d02d4460820df564e6642a663b5e50a5fe509527d55cb510ae04 -b0592e1f2c54746bb076be0fa480e1c4bebc4225e1236bcda3b299aa3853e3afb401233bdbcfc4a007b0523a720fbf62 -851613517966de76c1c55a94dc4595f299398a9808f2d2f0a84330ba657ab1f357701d0895f658c18a44cb00547f6f57 -a2fe9a1dd251e72b0fe4db27be508bb55208f8f1616b13d8be288363ec722826b1a1fd729fc561c3369bf13950bf1fd6 -b896cb2bc2d0c77739853bc59b0f89b2e008ba1f701c9cbe3bef035f499e1baee8f0ff1e794854a48c320586a2dfc81a -a1b60f98e5e5106785a9b81a85423452ee9ef980fa7fa8464f4366e73f89c50435a0c37b2906052b8e58e212ebd366cf -a853b0ebd9609656636df2e6acd5d8839c0fda56f7bf9288a943b06f0b67901a32b95e016ca8bc99bd7b5eab31347e72 -b290fa4c1346963bd5225235e6bdf7c542174dab4c908ab483d1745b9b3a6015525e398e1761c90e4b49968d05e30eea -b0f65a33ad18f154f1351f07879a183ad62e5144ad9f3241c2d06533dad09cbb2253949daff1bb02d24d16a3569f7ef0 -a00db59b8d4218faf5aeafcd39231027324408f208ec1f54d55a1c41228b463b88304d909d16b718cfc784213917b71e -b8d695dd33dc2c3bc73d98248c535b2770ad7fa31aa726f0aa4b3299efb0295ba9b4a51c71d314a4a1bd5872307534d1 -b848057cca2ca837ee49c42b88422303e58ea7d2fc76535260eb5bd609255e430514e927cc188324faa8e657396d63ec -92677836061364685c2aaf0313fa32322746074ed5666fd5f142a7e8f87135f45cd10e78a17557a4067a51dfde890371 -a854b22c9056a3a24ab164a53e5c5cf388616c33e67d8ebb4590cb16b2e7d88b54b1393c93760d154208b5ca822dc68f -86fff174920388bfab841118fb076b2b0cdec3fdb6c3d9a476262f82689fb0ed3f1897f7be9dbf0932bb14d346815c63 -99661cf4c94a74e182752bcc4b98a8c2218a8f2765642025048e12e88ba776f14f7be73a2d79bd21a61def757f47f904 -8a8893144d771dca28760cba0f950a5d634195fd401ec8cf1145146286caffb0b1a6ba0c4c1828d0a5480ce49073c64c -938a59ae761359ee2688571e7b7d54692848eb5dde57ffc572b473001ea199786886f8c6346a226209484afb61d2e526 -923f68a6aa6616714cf077cf548aeb845bfdd78f2f6851d8148cba9e33a374017f2f3da186c39b82d14785a093313222 -ac923a93d7da7013e73ce8b4a2b14b8fd0cc93dc29d5de941a70285bdd19be4740fedfe0c56b046689252a3696e9c5bc -b49b32c76d4ec1a2c68d4989285a920a805993bc6fcce6dacd3d2ddae73373050a5c44ba8422a3781050682fa0ef6ba2 -8a367941c07c3bdca5712524a1411bad7945c7c48ffc7103b1d4dff2c25751b0624219d1ccde8c3f70c465f954be5445 -b838f029df455efb6c530d0e370bbbf7d87d61a9aea3d2fe5474c5fe0a39cf235ceecf9693c5c6c5820b1ba8f820bd31 -a8983b7c715eaac7f13a001d2abc462dfc1559dab4a6b554119c271aa8fe00ffcf6b6949a1121f324d6d26cb877bcbae -a2afb24ad95a6f14a6796315fbe0d8d7700d08f0cfaf7a2abe841f5f18d4fecf094406cbd54da7232a159f9c5b6e805e -87e8e95ad2d62f947b2766ff405a23f7a8afba14e7f718a691d95369c79955cdebe24c54662553c60a3f55e6322c0f6f -87c2cbcecb754e0cc96128e707e5c5005c9de07ffd899efa3437cadc23362f5a1d3fcdd30a1f5bdc72af3fb594398c2a -91afd6ee04f0496dc633db88b9370d41c428b04fd991002502da2e9a0ef051bcd7b760e860829a44fbe5539fa65f8525 -8c50e5d1a24515a9dd624fe08b12223a75ca55196f769f24748686315329b337efadca1c63f88bee0ac292dd0a587440 -8a07e8f912a38d94309f317c32068e87f68f51bdfa082d96026f5f5f8a2211621f8a3856dda8069386bf15fb2d28c18f -94ad1dbe341c44eeaf4dc133eed47d8dbfe752575e836c075745770a6679ff1f0e7883b6aa917462993a7f469d74cab5 -8745f8bd86c2bb30efa7efb7725489f2654f3e1ac4ea95bd7ad0f3cfa223055d06c187a16192d9d7bdaea7b050c6a324 -900d149c8d79418cda5955974c450a70845e02e5a4ecbcc584a3ca64d237df73987c303e3eeb79da1af83bf62d9e579f -8f652ab565f677fb1a7ba03b08004e3cda06b86c6f1b0b9ab932e0834acf1370abb2914c15b0d08327b5504e5990681c -9103097d088be1f75ab9d3da879106c2f597e2cc91ec31e73430647bdd5c33bcfd771530d5521e7e14df6acda44f38a6 -b0fec7791cfb0f96e60601e1aeced9a92446b61fedab832539d1d1037558612d78419efa87ff5f6b7aab8fd697d4d9de -b9d2945bdb188b98958854ba287eb0480ef614199c4235ce5f15fc670b8c5ffe8eeb120c09c53ea8a543a022e6a321ac -a9461bb7d5490973ebaa51afc0bb4a5e42acdccb80e2f939e88b77ac28a98870e103e1042899750f8667a8cc9123bae9 -a37fdf11d4bcb2aed74b9f460a30aa34afea93386fa4cdb690f0a71bc58f0b8df60bec56e7a24f225978b862626fa00e -a214420e183e03d531cf91661466ea2187d84b6e814b8b20b3730a9400a7d25cf23181bb85589ebc982cec414f5c2923 -ad09a45a698a6beb3e0915f540ef16e9af7087f53328972532d6b5dfe98ce4020555ece65c6cbad8bd6be8a4dfefe6fd -ab6742800b02728c92d806976764cb027413d6f86edd08ad8bb5922a2969ee9836878cd39db70db0bd9a2646862acc4f -974ca9305bd5ea1dc1755dff3b63e8bfe9f744321046c1395659bcea2a987b528e64d5aa96ac7b015650b2253b37888d -84eee9d6bce039c52c2ebc4fccc0ad70e20c82f47c558098da4be2f386a493cbc76adc795b5488c8d11b6518c2c4fab8 -875d7bda46efcb63944e1ccf760a20144df3b00d53282b781e95f12bfc8f8316dfe6492c2efbf796f1150e36e436e9df -b68a2208e0c587b5c31b5f6cb32d3e6058a9642e2d9855da4f85566e1412db528475892060bb932c55b3a80877ad7b4a -ba006368ecab5febb6ab348644d9b63de202293085ed468df8bc24d992ae8ce468470aa37f36a73630c789fb9c819b30 -90a196035150846cd2b482c7b17027471372a8ce7d914c4d82b6ea7fa705d8ed5817bd42d63886242585baf7d1397a1c -a223b4c85e0daa8434b015fd9170b5561fe676664b67064974a1e9325066ecf88fc81f97ab5011c59fad28cedd04b240 -82e8ec43139cf15c6bbeed484b62e06cded8a39b5ce0389e4cbe9c9e9c02f2f0275d8d8d4e8dfec8f69a191bef220408 -81a3fc07a7b68d92c6ee4b6d28f5653ee9ec85f7e2ee1c51c075c1b130a8c5097dc661cf10c5aff1c7114b1a6a19f11a -8ed2ef8331546d98819a5dd0e6c9f8cb2630d0847671314a28f277faf68da080b53891dd75c82cbcf7788b255490785d -acecabf84a6f9bbed6b2fc2e7e4b48f02ef2f15e597538a73aea8f98addc6badda15e4695a67ecdb505c1554e8f345ec -b8f51019b2aa575f8476e03dcadf86cc8391f007e5f922c2a36b2daa63f5a503646a468990cd5c65148d323942193051 -aaa595a84b403ec65729bc1c8055a94f874bf9adddc6c507b3e1f24f79d3ad359595a672b93aab3394db4e2d4a7d8970 -895144c55fcbd0f64d7dd69e6855cfb956e02b5658eadf0f026a70703f3643037268fdd673b0d21b288578a83c6338dd -a2e92ae6d0d237d1274259a8f99d4ea4912a299816350b876fba5ebc60b714490e198a916e1c38c6e020a792496fa23c -a45795fda3b5bb0ad1d3c628f6add5b2a4473a1414c1a232e80e70d1cfffd7f8a8d9861f8df2946999d7dbb56bf60113 -b6659bf7f6f2fef61c39923e8c23b8c70e9c903028d8f62516d16755cd3fba2fe41c285aa9432dc75ab08f8a1d8a81fc -a735609a6bc5bfd85e58234fc439ff1f58f1ff1dd966c5921d8b649e21f006bf2b8642ad8a75063c159aaf6935789293 -a3c622eb387c9d15e7bda2e3e84d007cb13a6d50d655c3f2f289758e49d3b37b9a35e4535d3cc53d8efd51f407281f19 -8afe147b53ad99220f5ef9d763bfc91f9c20caecbcf823564236fb0e6ede49414c57d71eec4772c8715cc65a81af0047 -b5f0203233cf71913951e9c9c4e10d9243e3e4a1f2cb235bf3f42009120ba96e04aa414c9938ea8873b63148478927e8 -93c52493361b458d196172d7ba982a90a4f79f03aa8008edc322950de3ce6acf4c3977807a2ffa9e924047e02072b229 -b9e72b805c8ac56503f4a86c82720afbd5c73654408a22a2ac0b2e5caccdfb0e20b59807433a6233bc97ae58cf14c70a -af0475779b5cee278cca14c82da2a9f9c8ef222eb885e8c50cca2315fea420de6e04146590ed0dd5a29c0e0812964df5 -b430ccab85690db02c2d0eb610f3197884ca12bc5f23c51e282bf3a6aa7e4a79222c3d8761454caf55d6c01a327595f9 -830032937418b26ee6da9b5206f3e24dc76acd98589e37937e963a8333e5430abd6ce3dd93ef4b8997bd41440eed75d6 -8820a6d73180f3fe255199f3f175c5eb770461ad5cfdde2fb11508041ed19b8c4ce66ad6ecebf7d7e836cc2318df47ca -aef1393e7d97278e77bbf52ef6e1c1d5db721ccf75fe753cf47a881fa034ca61eaa5098ee5a344c156d2b14ff9e284ad -8a4a26c07218948c1196c45d927ef4d2c42ade5e29fe7a91eaebe34a29900072ce5194cf28d51f746f4c4c649daf4396 -84011dc150b7177abdcb715efbd8c201f9cb39c36e6069af5c50a096021768ba40cef45b659c70915af209f904ede3b6 -b1bd90675411389bb66910b21a4bbb50edce5330850c5ab0b682393950124252766fc81f5ecfc72fb7184387238c402e -8dfdcd30583b696d2c7744655f79809f451a60c9ad5bf1226dc078b19f4585d7b3ef7fa9d54e1ac09520d95cbfd20928 -b351b4dc6d98f75b8e5a48eb7c6f6e4b78451991c9ba630e5a1b9874c15ac450cd409c1a024713bf2cf82dc400e025ef -a462b8bc97ac668b97b28b3ae24b9f5de60e098d7b23ecb600d2194cd35827fb79f77c3e50d358f5bd72ee83fef18fa0 -a183753265c5f7890270821880cce5f9b2965b115ba783c6dba9769536f57a04465d7da5049c7cf8b3fcf48146173c18 -a8a771b81ed0d09e0da4d79f990e58eabcd2be3a2680419502dd592783fe52f657fe55125b385c41d0ba3b9b9cf54a83 -a71ec577db46011689d073245e3b1c3222a9b1fe6aa5b83629adec5733dd48617ebea91346f0dd0e6cdaa86e4931b168 -a334b8b244f0d598a02da6ae0f918a7857a54dce928376c4c85df15f3b0f2ba3ac321296b8b7c9dd47d770daf16c8f8c -a29037f8ef925c417c90c4df4f9fb27fb977d04e2b3dd5e8547d33e92ab72e7a00f5461de21e28835319eae5db145eb7 -b91054108ae78b00e3298d667b913ebc44d8f26e531eae78a8fe26fdfb60271c97efb2dee5f47ef5a3c15c8228138927 -926c13efbe90604f6244be9315a34f72a1f8d1aab7572df431998949c378cddbf2fe393502c930fff614ff06ae98a0ce -995c758fd5600e6537089b1baa4fbe0376ab274ff3e82a17768b40df6f91c2e443411de9cafa1e65ea88fb8b87d504f4 -9245ba307a7a90847da75fca8d77ec03fdfc812c871e7a2529c56a0a79a6de16084258e7a9ac4ae8a3756f394336e21c -99e0cfa2bb57a7e624231317044c15e52196ecce020db567c8e8cb960354a0be9862ee0c128c60b44777e65ac315e59f -ad4f6b3d27bbbb744126601053c3dc98c07ff0eb0b38a898bd80dce778372846d67e5ab8fb34fb3ad0ef3f235d77ba7f -a0f12cae3722bbbca2e539eb9cc7614632a2aefe51410430070a12b5bc5314ecec5857b7ff8f41e9980cac23064f7c56 -b487f1bc59485848c98222fd3bc36c8c9bb3d2912e2911f4ceca32c840a7921477f9b1fe00877e05c96c75d3eecae061 -a6033db53925654e18ecb3ce715715c36165d7035db9397087ac3a0585e587998a53973d011ac6d48af439493029cee6 -a6b4d09cd01c70a3311fd131d3710ccf97bde3e7b80efd5a8c0eaeffeb48cca0f951ced905290267b115b06d46f2693b -a9dff1df0a8f4f218a98b6f818a693fb0d611fed0fc3143537cbd6578d479af13a653a8155e535548a2a0628ae24fa58 -a58e469f65d366b519f9a394cacb7edaddac214463b7b6d62c2dbc1316e11c6c5184ce45c16de2d77f990dcdd8b55430 -989e71734f8119103586dc9a3c5f5033ddc815a21018b34c1f876cdfc112efa868d5751bf6419323e4e59fa6a03ece1c -a2da00e05036c884369e04cf55f3de7d659cd5fa3f849092b2519dd263694efe0f051953d9d94b7e121f0aee8b6174d7 -968f3c029f57ee31c4e1adea89a7f92e28483af9a74f30fbdb995dc2d40e8e657dff8f8d340d4a92bf65f54440f2859f -932778df6f60ac1639c1453ef0cbd2bf67592759dcccb3e96dcc743ff01679e4c7dd0ef2b0833dda548d32cb4eba49e2 -a805a31139f8e0d6dae1ac87d454b23a3dc9fc653d4ca18d4f8ebab30fc189c16e73981c2cb7dd6f8c30454a5208109d -a9ba0991296caa2aaa4a1ceacfb205544c2a2ec97088eace1d84ee5e2767656a172f75d2f0c4e16a3640a0e0dec316e0 -b1e49055c968dced47ec95ae934cf45023836d180702e20e2df57e0f62fb85d7ac60d657ba3ae13b8560b67210449459 -a94e1da570a38809c71e37571066acabff7bf5632737c9ab6e4a32856924bf6211139ab3cedbf083850ff2d0e0c0fcfc -88ef1bb322000c5a5515b310c838c9af4c1cdbb32eab1c83ac3b2283191cd40e9573747d663763a28dad0d64adc13840 -a987ce205f923100df0fbd5a85f22c9b99b9b9cbe6ddfa8dfda1b8fe95b4f71ff01d6c5b64ca02eb24edb2b255a14ef0 -84fe8221a9e95d9178359918a108de4763ebfa7a6487facb9c963406882a08a9a93f492f8e77cf9e7ea41ae079c45993 -aa1cf3dc7c5dcfa15bbbc811a4bb6dbac4fba4f97fb1ed344ab60264d7051f6eef19ea9773441d89929ee942ed089319 -8f6a7d610d59d9f54689bbe6a41f92d9f6096cde919c1ab94c3c7fcecf0851423bc191e5612349e10f855121c0570f56 -b5af1fa7894428a53ea520f260f3dc3726da245026b6d5d240625380bfb9c7c186df0204bb604efac5e613a70af5106e -a5bce6055ff812e72ce105f147147c7d48d7a2313884dd1f488b1240ee320f13e8a33f5441953a8e7a3209f65b673ce1 -b9b55b4a1422677d95821e1d042ab81bbf0bf087496504021ec2e17e238c2ca6b44fb3b635a5c9eac0871a724b8d47c3 -941c38e533ce4a673a3830845b56786585e5fe49c427f2e5c279fc6db08530c8f91db3e6c7822ec6bb4f956940052d18 -a38e191d66c625f975313c7007bbe7431b5a06ed2da1290a7d5d0f2ec73770d476efd07b8e632de64597d47df175cbb0 -94ba76b667abf055621db4c4145d18743a368d951565632ed4e743dd50dd3333507c0c34f286a5c5fdbf38191a2255cd -a5ca38c60be5602f2bfa6e00c687ac96ac36d517145018ddbee6f12eb0faa63dd57909b9eeed26085fe5ac44e55d10ab -b00fea3b825e60c1ed1c5deb4b551aa65a340e5af36b17d5262c9cd2c508711e4dc50dc2521a2c16c7c901902266e64a -971b86fc4033485e235ccb0997a236206ba25c6859075edbcdf3c943116a5030b7f75ebca9753d863a522ba21a215a90 -b3b31f52370de246ee215400975b674f6da39b2f32514fe6bd54e747752eedca22bb840493b44a67df42a3639c5f901f -affbbfac9c1ba7cbfa1839d2ae271dd6149869b75790bf103230637da41857fc326ef3552ff31c15bda0694080198143 -a95d42aa7ef1962520845aa3688f2752d291926f7b0d73ea2ee24f0612c03b43f2b0fe3c9a9a99620ffc8d487b981bc2 -914a266065caf64985e8c5b1cb2e3f4e3fe94d7d085a1881b1fefa435afef4e1b39a98551d096a62e4f5cc1a7f0fdc2e -81a0b4a96e2b75bc1bf2dbd165d58d55cfd259000a35504d1ffb18bc346a3e6f07602c683723864ffb980f840836fd8d -91c1556631cddd4c00b65b67962b39e4a33429029d311c8acf73a18600e362304fb68bccb56fde40f49e95b7829e0b87 -8befbacc19e57f7c885d1b7a6028359eb3d80792fe13b92a8400df21ce48deb0bb60f2ddb50e3d74f39f85d7eab23adc -92f9458d674df6e990789690ec9ca73dacb67fc9255b58c417c555a8cc1208ace56e8e538f86ba0f3615573a0fbac00d -b4b1b3062512d6ae7417850c08c13f707d5838e43d48eb98dd4621baf62eee9e82348f80fe9b888a12874bfa538771f8 -a13c4a3ac642ede37d9c883f5319e748d2b938f708c9d779714108a449b343f7b71a6e3ef4080fee125b416762920273 -af44983d5fc8cceee0551ef934e6e653f2d3efa385e5c8a27a272463a6f333e290378cc307c2b664eb923c78994e706e -a389fd6c59fe2b4031cc244e22d3991e541bd203dd5b5e73a6159e72df1ab41d49994961500dcde7989e945213184778 -8d2141e4a17836c548de9598d7b298b03f0e6c73b7364979a411c464e0628e21cff6ac3d6decdba5d1c4909eff479761 -980b22ef53b7bdf188a3f14bc51b0dbfdf9c758826daa3cbc1e3986022406a8aa9a6a79e400567120b88c67faa35ce5f -a28882f0a055f96df3711de5d0aa69473e71245f4f3e9aa944e9d1fb166e02caa50832e46da6d3a03b4801735fd01b29 -8db106a37d7b88f5d995c126abb563934dd8de516af48e85695d02b1aea07f79217e3cdd03c6f5ca57421830186c772b -b5a7e50da0559a675c472f7dfaee456caab6695ab7870541b2be8c2b118c63752427184aad81f0e1afc61aef1f28c46f -9962118780e20fe291d10b64f28d09442a8e1b5cffd0f3dd68d980d0614050a626c616b44e9807fbee7accecae00686a -b38ddf33745e8d2ad6a991aefaf656a33c5f8cbe5d5b6b6fd03bd962153d8fd0e01b5f8f96d80ae53ab28d593ab1d4e7 -857dc12c0544ff2c0c703761d901aba636415dee45618aba2e3454ff9cbc634a85c8b05565e88520ff9be2d097c8b2b1 -a80d465c3f8cc63af6d74a6a5086b626c1cb4a8c0fee425964c3bd203d9d7094e299f81ce96d58afc20c8c9a029d9dae -89e1c8fbde8563763be483123a3ed702efac189c6d8ab4d16c85e74bbaf856048cc42d5d6e138633a38572ba5ec3f594 -893a594cf495535f6d216508f8d03c317dcf03446668cba688da90f52d0111ac83d76ad09bf5ea47056846585ee5c791 -aadbd8be0ae452f7f9450c7d2957598a20cbf10139a4023a78b4438172d62b18b0de39754dd2f8862dbd50a3a0815e53 -ae7d39670ecca3eb6db2095da2517a581b0e8853bdfef619b1fad9aacd443e7e6a40f18209fadd44038a55085c5fe8b2 -866ef241520eacb6331593cfcb206f7409d2f33d04542e6e52cba5447934e02d44c471f6c9a45963f9307e9809ab91d9 -b1a09911ad3864678f7be79a9c3c3eb5c84a0a45f8dcb52c67148f43439aeaaa9fd3ed3471276b7e588b49d6ebe3033a -add07b7f0dbb34049cd8feeb3c18da5944bf706871cfd9f14ff72f6c59ad217ebb1f0258b13b167851929387e4e34cfe -ae048892d5c328eefbdd4fba67d95901e3c14d974bfc0a1fc68155ca9f0d59e61d7ba17c6c9948b120cf35fd26e6fee9 -9185b4f3b7da0ddb4e0d0f09b8a9e0d6943a4611e43f13c3e2a767ed8592d31e0ba3ebe1914026a3627680274291f6e5 -a9c022d4e37b0802284ce3b7ee9258628ab4044f0db4de53d1c3efba9de19d15d65cc5e608dbe149c21c2af47d0b07b5 -b24dbd5852f8f24921a4e27013b6c3fa8885b973266cb839b9c388efad95821d5d746348179dcc07542bd0d0aefad1ce -b5fb4f279300876a539a27a441348764908bc0051ebd66dc51739807305e73db3d2f6f0f294ffb91b508ab150eaf8527 -ace50841e718265b290c3483ed4b0fdd1175338c5f1f7530ae9a0e75d5f80216f4de37536adcbc8d8c95982e88808cd0 -b19cadcde0f63bd1a9c24bd9c2806f53c14c0b9735bf351601498408ba503ddbd2037c891041cbba47f58b8c483f3b21 -b6061e63558d312eb891b97b39aa552fa218568d79ee26fe6dd5b864aea9e3216d8f2e2f3b093503be274766dac41426 -89730fdb2876ab6f0fe780d695f6e12090259027e789b819956d786e977518057e5d1d7f5ab24a3ae3d5d4c97773bd2b -b6fa841e81f9f2cad0163a02a63ae96dc341f7ae803b616efc6e1da2fbea551c1b96b11ad02c4afbdf6d0cc9f23da172 -8fb66187182629c861ddb6896d7ed3caf2ad050c3dba8ab8eb0d7a2c924c3d44c48d1a148f9e33fb1f061b86972f8d21 -86022ac339c1f84a7fa9e05358c1a5b316b4fc0b83dbe9c8c7225dc514f709d66490b539359b084ce776e301024345fa -b50b9c321468da950f01480bb62b6edafd42f83c0001d6e97f2bd523a1c49a0e8574fb66380ea28d23a7c4d54784f9f0 -a31c05f7032f30d1dac06678be64d0250a071fd655e557400e4a7f4c152be4d5c7aa32529baf3e5be7c4bd49820054f6 -b95ac0848cd322684772119f5b682d90a66bbf9dac411d9d86d2c34844bbd944dbaf8e47aa41380455abd51687931a78 -ae4a6a5ce9553b65a05f7935e61e496a4a0f6fd8203367a2c627394c9ce1e280750297b74cdc48fd1d9a31e93f97bef4 -a22daf35f6e9b05e52e0b07f7bd1dbbebd2c263033fb0e1b2c804e2d964e2f11bc0ece6aca6af079dd3a9939c9c80674 -902150e0cb1f16b9b59690db35281e28998ce275acb313900da8b2d8dfd29fa1795f8ca3ff820c31d0697de29df347c1 -b17b5104a5dc665cdd7d47e476153d715eb78c6e5199303e4b5445c21a7fa7cf85fe7cfd08d7570f4e84e579b005428c -a03f49b81c15433f121680aa02d734bb9e363af2156654a62bcb5b2ba2218398ccb0ff61104ea5d7df5b16ea18623b1e -802101abd5d3c88876e75a27ffc2f9ddcce75e6b24f23dba03e5201281a7bd5cc7530b6a003be92d225093ca17d3c3bb -a4d183f63c1b4521a6b52226fc19106158fc8ea402461a5cccdaa35fee93669df6a8661f45c1750cd01308149b7bf08e -8d17c22e0c8403b69736364d460b3014775c591032604413d20a5096a94d4030d7c50b9fe3240e31d0311efcf9816a47 -947225acfcce5992eab96276f668c3cbe5f298b90a59f2bb213be9997d8850919e8f496f182689b5cbd54084a7332482 -8df6f4ed216fc8d1905e06163ba1c90d336ab991a18564b0169623eb39b84e627fa267397da15d3ed754d1f3423bff07 -83480007a88f1a36dea464c32b849a3a999316044f12281e2e1c25f07d495f9b1710b4ba0d88e9560e72433addd50bc2 -b3019d6e591cf5b33eb972e49e06c6d0a82a73a75d78d383dd6f6a4269838289e6e07c245f54fed67f5c9bb0fd5e1c5f -92e8ce05e94927a9fb02debadb99cf30a26172b2705003a2c0c47b3d8002bf1060edb0f6a5750aad827c98a656b19199 -ac2aff801448dbbfc13cca7d603fd9c69e82100d997faf11f465323b97255504f10c0c77401e4d1890339d8b224f5803 -b0453d9903d08f508ee27e577445dc098baed6cde0ac984b42e0f0efed62760bd58d5816cf1e109d204607b7b175e30c -ae68dc4ba5067e825d46d2c7c67f1009ceb49d68e8d3e4c57f4bcd299eb2de3575d42ea45e8722f8f28497a6e14a1cfe -b22486c2f5b51d72335ce819bbafb7fa25eb1c28a378a658f13f9fc79cd20083a7e573248d911231b45a5cf23b561ca7 -89d1201d1dbd6921867341471488b4d2fd0fc773ae1d4d074c78ae2eb779a59b64c00452c2a0255826fca6b3d03be2b1 -a2998977c91c7a53dc6104f5bc0a5b675e5350f835e2f0af69825db8af4aeb68435bdbcc795f3dd1f55e1dd50bc0507f -b0be4937a925b3c05056ed621910d535ccabf5ab99fd3b9335080b0e51d9607d0fd36cb5781ff340018f6acfca4a9736 -aea145a0f6e0ba9df8e52e84bb9c9de2c2dc822f70d2724029b153eb68ee9c17de7d35063dcd6a39c37c59fdd12138f7 -91cb4545d7165ee8ffbc74c874baceca11fdebbc7387908d1a25877ca3c57f2c5def424dab24148826832f1e880bede0 -b3b579cb77573f19c571ad5eeeb21f65548d7dff9d298b8d7418c11f3e8cd3727c5b467f013cb87d6861cfaceee0d2e3 -b98a1eeec2b19fecc8378c876d73645aa52fb99e4819903735b2c7a885b242787a30d1269a04bfb8573d72d9bbc5f0f0 -940c1f01ed362bd588b950c27f8cc1d52276c71bb153d47f07ec85b038c11d9a8424b7904f424423e714454d5e80d1cd -aa343a8ecf09ce11599b8cf22f7279cf80f06dbf9f6d62cb05308dbbb39c46fd0a4a1240b032665fbb488a767379b91b -87c3ac72084aca5974599d3232e11d416348719e08443acaba2b328923af945031f86432e170dcdd103774ec92e988c9 -91d6486eb5e61d2b9a9e742c20ec974a47627c6096b3da56209c2b4e4757f007e793ebb63b2b246857c9839b64dc0233 -aebcd3257d295747dd6fc4ff910d839dd80c51c173ae59b8b2ec937747c2072fa85e3017f9060aa509af88dfc7529481 -b3075ba6668ca04eff19efbfa3356b92f0ab12632dcda99cf8c655f35b7928c304218e0f9799d68ef9f809a1492ff7db -93ba7468bb325639ec2abd4d55179c69fd04eaaf39fc5340709227bbaa4ad0a54ea8b480a1a3c8d44684e3be0f8d1980 -a6aef86c8c0d92839f38544d91b767c582568b391071228ff5a5a6b859c87bf4f81a7d926094a4ada1993ddbd677a920 -91dcd6d14207aa569194aa224d1e5037b999b69ade52843315ca61ba26abe9a76412c9e88259bc5cf5d7b95b97d9c3bc -b3b483d31c88f78d49bd065893bc1e3d2aa637e27dedb46d9a7d60be7660ce7a10aaaa7deead362284a52e6d14021178 -8e5730070acf8371461ef301cc4523e8e672aa0e3d945d438a0e0aa6bdf8cb9c685dcf38df429037b0c8aff3955c6f5b -b8c6d769890a8ee18dc4f9e917993315877c97549549b34785a92543cbeec96a08ae3a28d6e809c4aacd69de356c0012 -95ca86cd384eaceaa7c077c5615736ca31f36824bd6451a16142a1edc129fa42b50724aeed7c738f08d7b157f78b569e -94df609c6d71e8eee7ab74226e371ccc77e01738fe0ef1a6424435b4570fe1e5d15797b66ed0f64eb88d4a3a37631f0e -89057b9783212add6a0690d6bb99097b182738deff2bd9e147d7fd7d6c8eacb4c219923633e6309ad993c24572289901 -83a0f9f5f265c5a0e54defa87128240235e24498f20965009fef664f505a360b6fb4020f2742565dfc7746eb185bcec0 -91170da5306128931349bc3ed50d7df0e48a68b8cc8420975170723ac79d8773e4fa13c5f14dc6e3fafcad78379050b1 -b7178484d1b55f7e56a4cc250b6b2ec6040437d96bdfddfa7b35ed27435860f3855c2eb86c636f2911b012eb83b00db8 -ac0b00c4322d1e4208e09cd977b4e54d221133ff09551f75b32b0b55d0e2be80941dda26257b0e288c162e63c7e9cf68 -9690ed9e7e53ed37ff362930e4096b878b12234c332fd19d5d064824084245952eda9f979e0098110d6963e468cf513e -b6fa547bb0bb83e5c5be0ed462a8783fba119041c136a250045c09d0d2af330c604331e7de960df976ff76d67f8000cd -814603907c21463bcf4e59cfb43066dfe1a50344ae04ef03c87c0f61b30836c3f4dea0851d6fa358c620045b7f9214c8 -9495639e3939fad2a3df00a88603a5a180f3c3a0fe4d424c35060e2043e0921788003689887b1ed5be424d9a89bb18bb -aba4c02d8d57f2c92d5bc765885849e9ff8393d6554f5e5f3e907e5bfac041193a0d8716d7861104a4295d5a03c36b03 -8ead0b56c1ca49723f94a998ba113b9058059321da72d9e395a667e6a63d5a9dac0f5717cec343f021695e8ced1f72af -b43037f7e3852c34ed918c5854cd74e9d5799eeddfe457d4f93bb494801a064735e326a76e1f5e50a339844a2f4a8ec9 -99db8422bb7302199eb0ff3c3d08821f8c32f53a600c5b6fb43e41205d96adae72be5b460773d1280ad1acb806af9be8 -8a9be08eae0086c0f020838925984df345c5512ff32e37120b644512b1d9d4fecf0fd30639ca90fc6cf334a86770d536 -81b43614f1c28aa3713a309a88a782fb2bdfc4261dd52ddc204687791a40cf5fd6a263a8179388596582cccf0162efc2 -a9f3a8b76912deb61d966c75daf5ddb868702ebec91bd4033471c8e533183df548742a81a2671de5be63a502d827437d -902e2415077f063e638207dc7e14109652e42ab47caccd6204e2870115791c9defac5425fd360b37ac0f7bd8fe7011f8 -aa18e4fdc1381b59c18503ae6f6f2d6943445bd00dd7d4a2ad7e5adad7027f2263832690be30d456e6d772ad76f22350 -a348b40ba3ba7d81c5d4631f038186ebd5e5f314f1ea737259151b07c3cc8cf0c6ed4201e71bcc1c22fefda81a20cde6 -aa1306f7ac1acbfc47dc6f7a0cb6d03786cec8c8dc8060388ccda777bca24bdc634d03e53512c23dba79709ff64f8620 -818ccfe46e700567b7f3eb400e5a35f6a5e39b3db3aa8bc07f58ace35d9ae5a242faf8dbccd08d9a9175bbce15612155 -b7e3da2282b65dc8333592bb345a473f03bd6df69170055fec60222de9897184536bf22b9388b08160321144d0940279 -a4d976be0f0568f4e57de1460a1729129252b44c552a69fceec44e5b97c96c711763360d11f9e5bf6d86b4976bf40d69 -85d185f0397c24c2b875b09b6328a23b87982b84ee880f2677a22ff4c9a1ba9f0fea000bb3f7f66375a00d98ebafce17 -b4ccbb8c3a2606bd9b87ce022704663af71d418351575f3b350d294f4efc68c26f9a2ce49ff81e6ff29c3b63d746294e -93ffd3265fddb63724dfde261d1f9e22f15ecf39df28e4d89e9fea03221e8e88b5dd9b77628bacaa783c6f91802d47cc -b1fd0f8d7a01378e693da98d03a2d2fda6b099d03454b6f2b1fa6472ff6bb092751ce6290059826b74ac0361eab00e1e -a89f440c71c561641589796994dd2769616b9088766e983c873fae0716b95c386c8483ab8a4f367b6a68b72b7456dd32 -af4fe92b01d42d03dd5d1e7fa55e96d4bbcb7bf7d4c8c197acd16b3e0f3455807199f683dcd263d74547ef9c244b35cc -a8227f6e0a344dfe76bfbe7a1861be32c4f4bed587ccce09f9ce2cf481b2dda8ae4f566154bc663d15f962f2d41761bd -a7b361663f7495939ed7f518ba45ea9ff576c4e628995b7aea026480c17a71d63fc2c922319f0502eb7ef8f14a406882 -8ddcf382a9f39f75777160967c07012cfa89e67b19714a7191f0c68eaf263935e5504e1104aaabd0899348c972a8d3c6 -98c95b9f6f5c91f805fb185eedd06c6fc4457d37dd248d0be45a6a168a70031715165ea20606245cbdf8815dc0ac697f -805b44f96e001e5909834f70c09be3efcd3b43632bcac5b6b66b6d227a03a758e4b1768ce2a723045681a1d34562aaeb -b0e81b07cdc45b3dca60882676d9badb99f25c461b7efe56e3043b80100bb62d29e1873ae25eb83087273160ece72a55 -b0c53f0abe78ee86c7b78c82ae1f7c070bb0b9c45c563a8b3baa2c515d482d7507bb80771e60b38ac13f78b8af92b4a9 -a7838ef6696a9e4d2e5dfd581f6c8d6a700467e8fd4e85adabb5f7a56f514785dd4ab64f6f1b48366f7d94728359441b -88c76f7700a1d23c30366a1d8612a796da57b2500f97f88fdf2d76b045a9d24e7426a8ffa2f4e86d3046937a841dad58 -ad8964baf98c1f02e088d1d9fcb3af6b1dfa44cdfe0ed2eae684e7187c33d3a3c28c38e8f4e015f9c04d451ed6f85ff6 -90e9d00a098317ececaa9574da91fc149eda5b772dedb3e5a39636da6603aa007804fa86358550cfeff9be5a2cb7845e -a56ff4ddd73d9a6f5ab23bb77efa25977917df63571b269f6a999e1ad6681a88387fcc4ca3b26d57badf91b236503a29 -97ad839a6302c410a47e245df84c01fb9c4dfef86751af3f9340e86ff8fc3cd52fa5ff0b9a0bd1d9f453e02ca80658a6 -a4c8c44cbffa804129e123474854645107d1f0f463c45c30fd168848ebea94880f7c0c5a45183e9eb837f346270bdb35 -a72e53d0a1586d736e86427a93569f52edd2f42b01e78aee7e1961c2b63522423877ae3ac1227a2cf1e69f8e1ff15bc3 -8559f88a7ef13b4f09ac82ae458bbae6ab25671cfbf52dae7eac7280d6565dd3f0c3286aec1a56a8a16dc3b61d78ce47 -8221503f4cdbed550876c5dc118a3f2f17800c04e8be000266633c83777b039a432d576f3a36c8a01e8fd18289ebc10b -99bfbe5f3e46d4d898a578ba86ed26de7ed23914bd3bcdf3c791c0bcd49398a52419077354a5ab75cea63b6c871c6e96 -aa134416d8ff46f2acd866c1074af67566cfcf4e8be8d97329dfa0f603e1ff208488831ce5948ac8d75bfcba058ddcaa -b02609d65ebfe1fe8e52f21224a022ea4b5ea8c1bd6e7b9792eed8975fc387cdf9e3b419b8dd5bcce80703ab3a12a45f -a4f14798508698fa3852e5cac42a9db9797ecee7672a54988aa74037d334819aa7b2ac7b14efea6b81c509134a6b7ad2 -884f01afecbcb987cb3e7c489c43155c416ed41340f61ecb651d8cba884fb9274f6d9e7e4a46dd220253ae561614e44c -a05523c9e71dce1fe5307cc71bd721feb3e1a0f57a7d17c7d1c9fb080d44527b7dbaa1f817b1af1c0b4322e37bc4bb1e -8560aec176a4242b39f39433dd5a02d554248c9e49d3179530815f5031fee78ba9c71a35ceeb2b9d1f04c3617c13d8f0 -996aefd402748d8472477cae76d5a2b92e3f092fc834d5222ae50194dd884c9fb8b6ed8e5ccf8f6ed483ddbb4e80c747 -8fd09900320000cbabc40e16893e2fcf08815d288ec19345ad7b6bb22f7d78a52b6575a3ca1ca2f8bc252d2eafc928ec -939e51f73022bc5dc6862a0adf8fb8a3246b7bfb9943cbb4b27c73743926cc20f615a036c7e5b90c80840e7f1bfee0e7 -a0a6258700cadbb9e241f50766573bf9bdb7ad380b1079dc3afb4054363d838e177b869cad000314186936e40359b1f2 -972699a4131c8ed27a2d0e2104d54a65a7ff1c450ad9da3a325c662ab26869c21b0a84d0700b98c8b5f6ce3b746873d7 -a454c7fe870cb8aa6491eafbfb5f7872d6e696033f92e4991d057b59d70671f2acdabef533e229878b60c7fff8f748b1 -a167969477214201f09c79027b10221e4707662e0c0fde81a0f628249f2f8a859ce3d30a7dcc03b8ecca8f7828ad85c7 -8ff6b7265175beb8a63e1dbf18c9153fb2578c207c781282374f51b40d57a84fd2ef2ea2b9c6df4a54646788a62fd17f -a3d7ebeccde69d73d8b3e76af0da1a30884bb59729503ff0fb0c3bccf9221651b974a6e72ea33b7956fc3ae758226495 -b71ef144c9a98ce5935620cb86c1590bd4f48e5a2815d25c0cdb008fde628cf628c31450d3d4f67abbfeb16178a74cfd -b5e0a16d115134f4e2503990e3f2035ed66b9ccf767063fe6747870d97d73b10bc76ed668550cb82eedc9a2ca6f75524 -b30ffaaf94ee8cbc42aa2c413175b68afdb207dbf351fb20be3852cb7961b635c22838da97eaf43b103aff37e9e725cc -98aa7d52284f6c1f22e272fbddd8c8698cf8f5fbb702d5de96452141fafb559622815981e50b87a72c2b1190f59a7deb -81fbacda3905cfaf7780bb4850730c44166ed26a7c8d07197a5d4dcd969c09e94a0461638431476c16397dd7bdc449f9 -95e47021c1726eac2e5853f570d6225332c6e48e04c9738690d53e07c6b979283ebae31e2af1fc9c9b3e59f87e5195b1 -ac024a661ba568426bb8fce21780406537f518075c066276197300841e811860696f7588188bc01d90bace7bc73d56e3 -a4ebcaf668a888dd404988ab978594dee193dad2d0aec5cdc0ccaf4ec9a7a8228aa663db1da8ddc52ec8472178e40c32 -a20421b8eaf2199d93b083f2aff37fb662670bd18689d046ae976d1db1fedd2c2ff897985ecc6277b396db7da68bcb27 -8bc33d4b40197fd4d49d1de47489d10b90d9b346828f53a82256f3e9212b0cbc6930b895e879da9cec9fedf026aadb3e -aaafdd1bec8b757f55a0433eddc0a39f818591954fd4e982003437fcceb317423ad7ee74dbf17a2960380e7067a6b4e2 -aad34277ebaed81a6ec154d16736866f95832803af28aa5625bf0461a71d02b1faba02d9d9e002be51c8356425a56867 -976e9c8b150d08706079945bd0e84ab09a648ecc6f64ded9eb5329e57213149ae409ae93e8fbd8eda5b5c69f5212b883 -8097fae1653247d2aed4111533bc378171d6b2c6d09cbc7baa9b52f188d150d645941f46d19f7f5e27b7f073c1ebd079 -83905f93b250d3184eaba8ea7d727c4464b6bdb027e5cbe4f597d8b9dc741dcbea709630bd4fd59ce24023bec32fc0f3 -8095030b7045cff28f34271386e4752f9a9a0312f8df75de4f424366d78534be2b8e1720a19cb1f9a2d21105d790a225 -a7b7b73a6ae2ed1009c49960374b0790f93c74ee03b917642f33420498c188a169724945a975e5adec0a1e83e07fb1b2 -856a41c54df393b6660b7f6354572a4e71c8bfca9cabaffb3d4ef2632c015e7ee2bc10056f3eccb3dbed1ad17d939178 -a8f7a55cf04b38cd4e330394ee6589da3a07dc9673f74804fdf67b364e0b233f14aec42e783200a2e4666f7c5ff62490 -82c529f4e543c6bca60016dc93232c115b359eaee2798a9cf669a654b800aafe6ab4ba58ea8b9cdda2b371c8d62fa845 -8caab020c1baddce77a6794113ef1dfeafc5f5000f48e97f4351b588bf02f1f208101745463c480d37f588d5887e6d8c -8fa91b3cc400f48b77b6fd77f3b3fbfb3f10cdff408e1fd22d38f77e087b7683adad258804409ba099f1235b4b4d6fea -8aa02787663d6be9a35677d9d8188b725d5fcd770e61b11b64e3def8808ea5c71c0a9afd7f6630c48634546088fcd8e2 -b5635b7b972e195cab878b97dea62237c7f77eb57298538582a330b1082f6207a359f2923864630136d8b1f27c41b9aa -8257bb14583551a65975946980c714ecd6e5b629672bb950b9caacd886fbd22704bc9e3ba7d30778adab65dc74f0203a -ab5fe1cd12634bfa4e5c60d946e2005cbd38f1063ec9a5668994a2463c02449a0a185ef331bd86b68b6e23a8780cb3ba -a7d3487da56cda93570cc70215d438204f6a2709bfb5fda6c5df1e77e2efc80f4235c787e57fbf2c74aaff8cbb510a14 -b61cff7b4c49d010e133319fb828eb900f8a7e55114fc86b39c261a339c74f630e1a7d7e1350244ada566a0ff3d46c4b -8d4d1d55d321d278db7a85522ccceca09510374ca81d4d73e3bb5249ace7674b73900c35a531ec4fa6448fabf7ad00dc -966492248aee24f0f56c8cfca3c8ec6ba3b19abb69ae642041d4c3be8523d22c65c4dafcab4c58989ccc4e0bd2f77919 -b20c320a90cb220b86e1af651cdc1e21315cd215da69f6787e28157172f93fc8285dcd59b039c626ed8ca4633cba1a47 -aae9e6b22f018ceb5c0950210bb8182cb8cb61014b7e14581a09d36ebd1bbfebdb2b82afb7fdb0cf75e58a293d9c456d -875547fb67951ad37b02466b79f0c9b985ccbc500cfb431b17823457dc79fb9597ec42cd9f198e15523fcd88652e63a4 -92afce49773cb2e20fb21e4f86f18e0959ebb9c33361547ddb30454ee8e36b1e234019cbdca0e964cb292f7f77df6b90 -8af85343dfe1821464c76ba11c216cbef697b5afc69c4d821342e55afdac047081ec2e3f7b09fc14b518d9a23b78c003 -b7de4a1648fd63f3a918096ea669502af5357438e69dac77cb8102b6e6c15c76e033cfaa80dafc806e535ede5c1a20aa -ac80e9b545e8bd762951d96c9ce87f629d01ffcde07efc2ef7879ca011f1d0d8a745abf26c9d452541008871304fac00 -a4cf0f7ed724e481368016c38ea5816698a5f68eb21af4d3c422d2ba55f96a33e427c2aa40de1b56a7cfac7f7cf43ab0 -899b0a678bb2db2cae1b44e75a661284844ebcdd87abf308fedeb2e4dbe5c5920c07db4db7284a7af806a2382e8b111a -af0588a2a4afce2b1b13c1230816f59e8264177e774e4a341b289a101dcf6af813638fed14fb4d09cb45f35d5d032609 -a4b8df79e2be76e9f5fc5845f06fe745a724cf37c82fcdb72719b77bdebea3c0e763f37909373e3a94480cc5e875cba0 -83e42c46d88930c8f386b19fd999288f142d325e2ebc86a74907d6d77112cb0d449bc511c95422cc810574031a8cbba9 -b5e39534070de1e5f6e27efbdd3dc917d966c2a9b8cf2d893f964256e95e954330f2442027dc148c776d63a95bcde955 -958607569dc28c075e658cd4ae3927055c6bc456eef6212a6fea8205e48ed8777a8064f584cda38fe5639c371e2e7fba -812adf409fa63575113662966f5078a903212ffb65c9b0bbe62da0f13a133443a7062cb8fd70f5e5dd5559a32c26d2c8 -a679f673e5ce6a3cce7fa31f22ee3785e96bcb55e5a776e2dd3467bef7440e3555d1a9b87cb215e86ee9ed13a090344b -afedbb34508b159eb25eb2248d7fe328f86ef8c7d84c62d5b5607d74aae27cc2cc45ee148eb22153b09898a835c58df4 -b75505d4f6b67d31e665cfaf5e4acdb5838ae069166b7fbcd48937c0608a59e40a25302fcc1873d2e81c1782808c70f0 -b62515d539ec21a155d94fc00ea3c6b7e5f6636937bce18ed5b618c12257fb82571886287fd5d1da495296c663ebc512 -ab8e1a9446bbdd588d1690243b1549d230e6149c28f59662b66a8391a138d37ab594df38e7720fae53217e5c3573b5be -b31e8abf4212e03c3287bb2c0a153065a7290a16764a0bac8f112a72e632185a654bb4e88fdd6053e6c7515d9719fadb -b55165477fe15b6abd2d0f4fddaa9c411710dcc4dd712daba3d30e303c9a3ee5415c256f9dc917ecf18c725b4dbab059 -a0939d4f57cacaae549b78e87cc234de4ff6a35dc0d9cd5d7410abc30ebcd34c135e008651c756e5a9d2ca79c40ef42b -8cf10e50769f3443340844aad4d56ec790850fed5a41fcbd739abac4c3015f0a085a038fbe7fae9f5ad899cce5069f6b -924055e804d82a99ea4bb160041ea4dc14b568abf379010bc1922fde5d664718c31d103b8b807e3a1ae809390e708c73 -8ec0f9d26f71b0f2e60a179e4fd1778452e2ffb129d50815e5d7c7cb9415fa69ae5890578086e8ef6bfde35ad2a74661 -98c7f12b15ec4426b59f737f73bf5faea4572340f4550b7590dfb7f7ffedb2372e3e555977c63946d579544c53210ad0 -8a935f7a955c78f69d66f18eee0092e5e833fa621781c9581058e219af4d7ceee48b84e472e159dda6199715fb2f9acf -b78d4219f95a2dbfaa7d0c8a610c57c358754f4f43c2af312ab0fe8f10a5f0177e475332fb8fd23604e474fc2abeb051 -8d086a14803392b7318c28f1039a17e3cfdcece8abcaca3657ec3d0ac330842098a85c0212f889fabb296dfb133ce9aa -a53249f417aac82f2c2a50c244ce21d3e08a5e5a8bd33bec2a5ab0d6cd17793e34a17edfa3690899244ce201e2fb9986 -8619b0264f9182867a1425be514dc4f1ababc1093138a728a28bd7e4ecc99b9faaff68c23792264bc6e4dce5f52a5c52 -8c171edbbbde551ec19e31b2091eb6956107dd9b1f853e1df23bff3c10a3469ac77a58335eee2b79112502e8e163f3de -a9d19ec40f0ca07c238e9337c6d6a319190bdba2db76fb63902f3fb459aeeb50a1ac30db5b25ee1b4201f3ca7164a7f4 -b9c6ec14b1581a03520b8d2c1fbbc31fb8ceaef2c0f1a0d0080b6b96e18442f1734bea7ef7b635d787c691de4765d469 -8cb437beb4cfa013096f40ccc169a713dc17afee6daa229a398e45fd5c0645a9ad2795c3f0cd439531a7151945d7064d -a6e8740cc509126e146775157c2eb278003e5bb6c48465c160ed27888ca803fa12eee1f6a8dd7f444f571664ed87fdc1 -b75c1fecc85b2732e96b3f23aefb491dbd0206a21d682aee0225838dc057d7ed3b576176353e8e90ae55663f79e986e4 -ad8d249b0aea9597b08358bce6c77c1fd552ef3fbc197d6a1cfe44e5e6f89b628b12a6fb04d5dcfcbacc51f46e4ae7bb -b998b2269932cbd58d04b8e898d373ac4bb1a62e8567484f4f83e224061bc0f212459f1daae95abdbc63816ae6486a55 -827988ef6c1101cddc96b98f4a30365ff08eea2471dd949d2c0a9b35c3bbfa8c07054ad1f4c88c8fbf829b20bb5a9a4f -8692e638dd60babf7d9f2f2d2ce58e0ac689e1326d88311416357298c6a2bffbfebf55d5253563e7b3fbbf5072264146 -a685d75b91aea04dbc14ab3c1b1588e6de96dae414c8e37b8388766029631b28dd860688079b12d09cd27f2c5af11adf -b57eced93eec3371c56679c259b34ac0992286be4f4ff9489d81cf9712403509932e47404ddd86f89d7c1c3b6391b28c -a1c8b4e42ebcbd8927669a97f1b72e236fb19249325659e72be7ddaaa1d9e81ca2abb643295d41a8c04a2c01f9c0efd7 -877c33de20d4ed31674a671ba3e8f01a316581e32503136a70c9c15bf0b7cb7b1cba6cd4eb641fad165fb3c3c6c235fd -a2a469d84ec478da40838f775d11ad38f6596eb41caa139cc190d6a10b5108c09febae34ffdafac92271d2e73c143693 -972f817caedb254055d52e963ed28c206848b6c4cfdb69dbc961c891f8458eaf582a6d4403ce1177d87bc2ea410ef60a -accbd739e138007422f28536381decc54bb6bd71d93edf3890e54f9ef339f83d2821697d1a4ac1f5a98175f9a9ecb9b5 -8940f8772e05389f823b62b3adc3ed541f91647f0318d7a0d3f293aeeb421013de0d0a3664ea53dd24e5fbe02d7efef6 -8ecce20f3ef6212edef07ec4d6183fda8e0e8cad2c6ccd0b325e75c425ee1faba00b5c26b4d95204238931598d78f49d -97cc72c36335bd008afbed34a3b0c7225933faba87f7916d0a6d2161e6f82e0cdcda7959573a366f638ca75d30e9dab1 -9105f5de8699b5bdb6bd3bb6cc1992d1eac23929c29837985f83b22efdda92af64d9c574aa9640475087201bbbe5fd73 -8ffb33c4f6d05c413b9647eb6933526a350ed2e4278ca2ecc06b0e8026d8dbe829c476a40e45a6df63a633090a3f82ef -8bfc6421fdc9c2d2aaa68d2a69b1a2728c25b84944cc3e6a57ff0c94bfd210d1cbf4ff3f06702d2a8257024d8be7de63 -a80e1dc1dddfb41a70220939b96dc6935e00b32fb8be5dff4eed1f1c650002ff95e4af481c43292e3827363b7ec4768a -96f714ebd54617198bd636ba7f7a7f8995a61db20962f2165078d9ed8ee764d5946ef3cbdc7ebf8435bb8d5dd4c1deac -8cdb0890e33144d66391d2ae73f5c71f5a861f72bc93bff6cc399fc25dd1f9e17d8772592b44593429718784802ac377 -8ccf9a7f80800ee770b92add734ed45a73ecc31e2af0e04364eefc6056a8223834c7c0dc9dfc52495bdec6e74ce69994 -aa0875f423bd68b5f10ba978ddb79d3b96ec093bfbac9ff366323193e339ed7c4578760fb60f60e93598bdf1e5cc4995 -a9214f523957b59c7a4cb61a40251ad72aba0b57573163b0dc0f33e41d2df483fb9a1b85a5e7c080e9376c866790f8cb -b6224b605028c6673a536cc8ff9aeb94e7a22e686fda82cf16068d326469172f511219b68b2b3affb7933af0c1f80d07 -b6d58968d8a017c6a34e24c2c09852f736515a2c50f37232ac6b43a38f8faa7572cc31dade543b594b61b5761c4781d0 -8a97cefe5120020c38deeb861d394404e6c993c6cbd5989b6c9ebffe24f46ad11b4ba6348e2991cbf3949c28cfc3c99d -95bf046f8c3a9c0ce2634be4de3713024daec3fc4083e808903b25ce3ac971145af90686b451efcc72f6b22df0216667 -a6a4e2f71b8fa28801f553231eff2794c0f10d12e7e414276995e21195abc9c2983a8997e41af41e78d19ff6fbb2680b -8e5e62a7ca9c2f58ebaab63db2ff1fb1ff0877ae94b7f5e2897f273f684ae639dff44cc65718f78a9c894787602ab26a -8542784383eec4f565fcb8b9fc2ad8d7a644267d8d7612a0f476fc8df3aff458897a38003d506d24142ad18f93554f2b -b7db68ba4616ea072b37925ec4fb39096358c2832cc6d35169e032326b2d6614479f765ae98913c267105b84afcb9bf2 -8b31dbb9457d23d416c47542c786e07a489af35c4a87dadb8ee91bea5ac4a5315e65625d78dad2cf8f9561af31b45390 -a8545a1d91ac17257732033d89e6b7111db8242e9c6ebb0213a88906d5ef407a2c6fdb444e29504b06368b6efb4f4839 -b1bd85d29ebb28ccfb05779aad8674906b267c2bf8cdb1f9a0591dd621b53a4ee9f2942687ee3476740c0b4a7621a3ae -a2b54534e152e46c50d91fff03ae9cd019ff7cd9f4168b2fe7ac08ef8c3bbc134cadd3f9d6bd33d20ae476c2a8596c8a -b19b571ff4ae3e9f5d95acda133c455e72c9ea9973cae360732859836c0341c4c29ab039224dc5bc3deb824e031675d8 -940b5f80478648bac025a30f3efeb47023ce20ee98be833948a248bca6979f206bb28fc0f17b90acf3bb4abd3d14d731 -8f106b40588586ac11629b96d57808ad2808915d89539409c97414aded90b4ff23286a692608230a52bff696055ba5d6 -ae6bda03aa10da3d2abbc66d764ca6c8d0993e7304a1bdd413eb9622f3ca1913baa6da1e9f4f9e6cf847f14f44d6924d -a18e7796054a340ef826c4d6b5a117b80927afaf2ebd547794c400204ae2caf277692e2eabb55bc2f620763c9e9da66d -8d2d25180dc2c65a4844d3e66819ccfcf48858f0cc89e1c77553b463ec0f7feb9a4002ce26bc618d1142549b9850f232 -863f413a394de42cc8166c1c75d513b91d545fff1de6b359037a742c70b008d34bf8e587afa2d62c844d0c6f0ea753e7 -83cd0cf62d63475e7fcad18a2e74108499cdbf28af2113cfe005e3b5887794422da450b1944d0a986eb7e1f4c3b18f25 -b4f8b350a6d88fea5ab2e44715a292efb12eb52df738c9b2393da3f1ddee68d0a75b476733ccf93642154bceb208f2b8 -b3f52aaa4cd4221cb9fc45936cc67fd3864bf6d26bf3dd86aa85aa55ecfc05f5e392ecce5e7cf9406b4b1c4fce0398c8 -b33137084422fb643123f40a6df2b498065e65230fc65dc31791c330e898c51c3a65ff738930f32c63d78f3c9315f85b -91452bfa75019363976bb7337fe3a73f1c10f01637428c135536b0cdc7da5ce558dae3dfc792aa55022292600814a8ef -ad6ba94c787cd4361ca642c20793ea44f1f127d4de0bb4a77c7fbfebae0fcadbf28e2cb6f0c12c12a07324ec8c19761d -890aa6248b17f1501b0f869c556be7bf2b1d31a176f9978bb97ab7a6bd4138eed32467951c5ef1871944b7f620542f43 -82111db2052194ee7dd22ff1eafffac0443cf969d3762cceae046c9a11561c0fdce9c0711f88ac01d1bed165f8a7cee3 -b1527b71df2b42b55832f72e772a466e0fa05743aacc7814f4414e4bcc8d42a4010c9e0fd940e6f254cafedff3cd6543 -922370fa49903679fc565f09c16a5917f8125e72acfeb060fcdbadbd1644eb9f4016229756019c93c6d609cda5d5d174 -aa4c7d98a96cab138d2a53d4aee8ebff6ef903e3b629a92519608d88b3bbd94de5522291a1097e6acf830270e64c8ee1 -b3dc21608a389a72d3a752883a382baaafc61ecc44083b832610a237f6a2363f24195acce529eb4aed4ef0e27a12b66e -94619f5de05e07b32291e1d7ab1d8b7337a2235e49d4fb5f3055f090a65e932e829efa95db886b32b153bdd05a53ec8c -ade1e92722c2ffa85865d2426fb3d1654a16477d3abf580cfc45ea4b92d5668afc9d09275d3b79283e13e6b39e47424d -b7201589de7bed094911dd62fcd25c459a8e327ac447b69f541cdba30233063e5ddffad0b67e9c3e34adcffedfd0e13d -809d325310f862d6549e7cb40f7e5fc9b7544bd751dd28c4f363c724a0378c0e2adcb5e42ec8f912f5f49f18f3365c07 -a79c20aa533de7a5d671c99eb9eb454803ba54dd4f2efa3c8fec1a38f8308e9905c71e9282955225f686146388506ff6 -a85eeacb5e8fc9f3ed06a3fe2dc3108ab9f8c5877b148c73cf26e4e979bf5795edbe2e63a8d452565fd1176ed40402b2 -97ef55662f8a1ec0842b22ee21391227540adf7708f491436044f3a2eb18c471525e78e1e14fa292507c99d74d7437c6 -93110d64ed5886f3d16ce83b11425576a3a7a9bb831cd0de3f9a0b0f2270a730d68136b4ef7ff035ede004358f419b5c -ac9ed0a071517f0ae4f61ce95916a90ba9a77a3f84b0ec50ef7298acdcd44d1b94525d191c39d6bd1bb68f4471428760 -98abd6a02c7690f5a339adf292b8c9368dfc12e0f8069cf26a5e0ce54b4441638f5c66ea735142f3c28e00a0024267e6 -b51efb73ba6d44146f047d69b19c0722227a7748b0e8f644d0fc9551324cf034c041a2378c56ce8b58d06038fb8a78de -8f115af274ef75c1662b588b0896b97d71f8d67986ae846792702c4742ab855952865ce236b27e2321967ce36ff93357 -b3c4548f14d58b3ab03c222da09e4381a0afe47a72d18d50a94e0008797f78e39e99990e5b4757be62310d400746e35a -a9b1883bd5f31f909b8b1b6dcb48c1c60ed20aa7374b3ffa7f5b2ed036599b5bef33289d23c80a5e6420d191723b92f7 -85d38dffd99487ae5bb41ab4a44d80a46157bbbe8ef9497e68f061721f74e4da513ccc3422936b059575975f6787c936 -adf870fcb96e972c033ab7a35d28ae79ee795f82bc49c3bd69138f0e338103118d5529c53f2d72a9c0d947bf7d312af2 -ab4c7a44e2d9446c6ff303eb49aef0e367a58b22cc3bb27b4e69b55d1d9ee639c9234148d2ee95f9ca8079b1457d5a75 -a386420b738aba2d7145eb4cba6d643d96bda3f2ca55bb11980b318d43b289d55a108f4bc23a9606fb0bccdeb3b3bb30 -847020e0a440d9c4109773ecca5d8268b44d523389993b1f5e60e541187f7c597d79ebd6e318871815e26c96b4a4dbb1 -a530aa7e5ca86fcd1bec4b072b55cc793781f38a666c2033b510a69e110eeabb54c7d8cbcb9c61fee531a6f635ffa972 -87364a5ea1d270632a44269d686b2402da737948dac27f51b7a97af80b66728b0256547a5103d2227005541ca4b7ed04 -8816fc6e16ea277de93a6d793d0eb5c15e9e93eb958c5ef30adaf8241805adeb4da8ce19c3c2167f971f61e0b361077d -8836a72d301c42510367181bb091e4be377777aed57b73c29ef2ce1d475feedd7e0f31676284d9a94f6db01cc4de81a2 -b0d9d8b7116156d9dde138d28aa05a33e61f8a85839c1e9071ccd517b46a5b4b53acb32c2edd7150c15bc1b4bd8db9e3 -ae931b6eaeda790ba7f1cd674e53dc87f6306ff44951fa0df88d506316a5da240df9794ccbd7215a6470e6b31c5ea193 -8c6d5bdf87bd7f645419d7c6444e244fe054d437ed1ba0c122fde7800603a5fadc061e5b836cb22a6cfb2b466f20f013 -90d530c6d0cb654999fa771b8d11d723f54b8a8233d1052dc1e839ea6e314fbed3697084601f3e9bbb71d2b4eaa596df -b0d341a1422588c983f767b1ed36c18b141774f67ef6a43cff8e18b73a009da10fc12120938b8bba27f225bdfd3138f9 -a131b56f9537f460d304e9a1dd75702ace8abd68cb45419695cb8dee76998139058336c87b7afd6239dc20d7f8f940cc -aa6c51fa28975f709329adee1bbd35d49c6b878041841a94465e8218338e4371f5cb6c17f44a63ac93644bf28f15d20f -88440fb584a99ebd7f9ea04aaf622f6e44e2b43bbb49fb5de548d24a238dc8f26c8da2ccf03dd43102bda9f16623f609 -9777b8695b790e702159a4a750d5e7ff865425b95fa0a3c15495af385b91c90c00a6bd01d1b77bffe8c47d01baae846f -8b9d764ece7799079e63c7f01690c8eff00896a26a0d095773dea7a35967a8c40db7a6a74692f0118bf0460c26739af4 -85808c65c485520609c9e61fa1bb67b28f4611d3608a9f7a5030ee61c3aa3c7e7dc17fff48af76b4aecee2cb0dbd22ac -ad2783a76f5b3db008ef5f7e67391fda4e7e36abde6b3b089fc4835b5c339370287935af6bd53998bed4e399eda1136d -96f18ec03ae47c205cc4242ca58e2eff185c9dca86d5158817e2e5dc2207ab84aadda78725f8dc080a231efdc093b940 -97de1ab6c6cc646ae60cf7b86df73b9cf56cc0cd1f31b966951ebf79fc153531af55ca643b20b773daa7cab784b832f7 -870ba266a9bfa86ef644b1ef025a0f1b7609a60de170fe9508de8fd53170c0b48adb37f19397ee8019b041ce29a16576 -ad990e888d279ac4e8db90619d663d5ae027f994a3992c2fbc7d262b5990ae8a243e19157f3565671d1cb0de17fe6e55 -8d9d5adcdd94c5ba3be4d9a7428133b42e485f040a28d16ee2384758e87d35528f7f9868de9bd23d1a42a594ce50a567 -85a33ed75d514ece6ad78440e42f7fcdb59b6f4cff821188236d20edae9050b3a042ce9bc7d2054296e133d033e45022 -92afd2f49a124aaba90de59be85ff269457f982b54c91b06650c1b8055f9b4b0640fd378df02a00e4fc91f7d226ab980 -8c0ee09ec64bd831e544785e3d65418fe83ed9c920d9bb4d0bf6dd162c1264eb9d6652d2def0722e223915615931581c -8369bedfa17b24e9ad48ebd9c5afea4b66b3296d5770e09b00446c5b0a8a373d39d300780c01dcc1c6752792bccf5fd0 -8b9e960782576a59b2eb2250d346030daa50bbbec114e95cdb9e4b1ba18c3d34525ae388f859708131984976ca439d94 -b682bface862008fea2b5a07812ca6a28a58fd151a1d54c708fc2f8572916e0d678a9cb8dc1c10c0470025c8a605249e -a38d5e189bea540a824b36815fc41e3750760a52be0862c4cac68214febdc1a754fb194a7415a8fb7f96f6836196d82a -b9e7fbda650f18c7eb8b40e42cc42273a7298e65e8be524292369581861075c55299ce69309710e5b843cb884de171bd -b6657e5e31b3193874a1bace08f42faccbd3c502fb73ad87d15d18a1b6c2a146f1baa929e6f517db390a5a47b66c0acf -ae15487312f84ed6265e4c28327d24a8a0f4d2d17d4a5b7c29b974139cf93223435aaebe3af918f5b4bb20911799715f -8bb4608beb06bc394e1a70739b872ce5a2a3ffc98c7547bf2698c893ca399d6c13686f6663f483894bccaabc3b9c56ad -b58ac36bc6847077584308d952c5f3663e3001af5ecf2e19cb162e1c58bd6c49510205d453cffc876ca1dc6b8e04a578 -924f65ced61266a79a671ffb49b300f0ea44c50a0b4e3b02064faa99fcc3e4f6061ea8f38168ab118c5d47bd7804590e -8d67d43b8a06b0ff4fafd7f0483fa9ed1a9e3e658a03fb49d9d9b74e2e24858dc1bed065c12392037b467f255d4e5643 -b4d4f87813125a6b355e4519a81657fa97c43a6115817b819a6caf4823f1d6a1169683fd68f8d025cdfa40ebf3069acb -a7fd4d2c8e7b59b8eed3d4332ae94b77a89a2616347402f880bc81bde072220131e6dbec8a605be3a1c760b775375879 -8d4a7d8fa6f55a30df37bcf74952e2fa4fd6676a2e4606185cf154bdd84643fd01619f8fb8813a564f72e3f574f8ce30 -8086fb88e6260e9a9c42e9560fde76315ff5e5680ec7140f2a18438f15bc2cc7d7d43bfb5880b180b738c20a834e6134 -916c4c54721de03934fee6f43de50bb04c81f6f8dd4f6781e159e71c40c60408aa54251d457369d133d4ba3ed7c12cb4 -902e5bf468f11ed9954e2a4a595c27e34abe512f1d6dc08bbca1c2441063f9af3dc5a8075ab910a10ff6c05c1c644a35 -a1302953015e164bf4c15f7d4d35e3633425a78294406b861675667eec77765ff88472306531e5d3a4ec0a2ff0dd6a9e -87874461df3c9aa6c0fa91325576c0590f367075f2f0ecfeb34afe162c04c14f8ce9d608c37ac1adc8b9985bc036e366 -84b50a8a61d3cc609bfb0417348133e698fe09a6d37357ce3358de189efcf35773d78c57635c2d26c3542b13cc371752 -acaed2cff8633d12c1d12bb7270c54d65b0b0733ab084fd47f81d0a6e1e9b6f300e615e79538239e6160c566d8bb8d29 -889e6a0e136372ca4bac90d1ab220d4e1cad425a710e8cdd48b400b73bb8137291ceb36a39440fa84305783b1d42c72f -90952e5becec45b2b73719c228429a2c364991cf1d5a9d6845ae5b38018c2626f4308daa322cab1c72e0f6c621bb2b35 -8f5a97a801b6e9dcd66ccb80d337562c96f7914e7169e8ff0fda71534054c64bf2a9493bb830623d612cfe998789be65 -84f3df8b9847dcf1d63ca470dc623154898f83c25a6983e9b78c6d2d90a97bf5e622445be835f32c1e55e6a0a562ea78 -91d12095cd7a88e7f57f254f02fdb1a1ab18984871dead2f107404bcf8069fe68258c4e6f6ebd2477bddf738135400bb -b771a28bc04baef68604d4723791d3712f82b5e4fe316d7adc2fc01b935d8e644c06d59b83bcb542afc40ebafbee0683 -872f6341476e387604a7e93ae6d6117e72d164e38ebc2b825bc6df4fcce815004d7516423c190c1575946b5de438c08d -90d6b4aa7d40a020cdcd04e8b016d041795961a8e532a0e1f4041252131089114a251791bf57794cadb7d636342f5d1c -899023ba6096a181448d927fed7a0fe858be4eac4082a42e30b3050ee065278d72fa9b9d5ce3bc1372d4cbd30a2f2976 -a28f176571e1a9124f95973f414d5bdbf5794d41c3839d8b917100902ac4e2171eb940431236cec93928a60a77ede793 -838dbe5bcd29c4e465d02350270fa0036cd46f8730b13d91e77afb7f5ed16525d0021d3b2ae173a76c378516a903e0cb -8e105d012dd3f5d20f0f1c4a7e7f09f0fdd74ce554c3032e48da8cce0a77260d7d47a454851387770f5c256fa29bcb88 -8f4df0f9feeb7a487e1d138d13ea961459a6402fd8f8cabb226a92249a0d04ded5971f3242b9f90d08da5ff66da28af6 -ad1cfda4f2122a20935aa32fb17c536a3653a18617a65c6836700b5537122af5a8206befe9eaea781c1244c43778e7f1 -832c6f01d6571964ea383292efc8c8fa11e61c0634a25fa180737cc7ab57bc77f25e614aac9a2a03d98f27b3c1c29de2 -903f89cc13ec6685ac7728521898781fecb300e9094ef913d530bf875c18bcc3ceed7ed51e7b482d45619ab4b025c2e9 -a03c474bb915aad94f171e8d96f46abb2a19c9470601f4c915512ec8b9e743c3938450a2a5b077b4618b9df8809e1dc1 -83536c8456f306045a5f38ae4be2e350878fa7e164ea408d467f8c3bc4c2ee396bd5868008c089183868e4dfad7aa50b -88f26b4ea1b236cb326cd7ad7e2517ec8c4919598691474fe15d09cabcfc37a8d8b1b818f4d112432ee3a716b0f37871 -a44324e3fe96e9c12b40ded4f0f3397c8c7ee8ff5e96441118d8a6bfad712d3ac990b2a6a23231a8f691491ac1fd480f -b0de4693b4b9f932191a21ee88629964878680152a82996c0019ffc39f8d9369bbe2fe5844b68d6d9589ace54af947e4 -8e5d8ba948aea5fd26035351a960e87f0d23efddd8e13236cc8e4545a3dda2e9a85e6521efb8577e03772d3637d213d9 -93efc82d2017e9c57834a1246463e64774e56183bb247c8fc9dd98c56817e878d97b05f5c8d900acf1fbbbca6f146556 -8731176363ad7658a2862426ee47a5dce9434216cef60e6045fa57c40bb3ce1e78dac4510ae40f1f31db5967022ced32 -b10c9a96745722c85bdb1a693100104d560433d45b9ac4add54c7646a7310d8e9b3ca9abd1039d473ae768a18e489845 -a2ac374dfbb464bf850b4a2caf15b112634a6428e8395f9c9243baefd2452b4b4c61b0cb2836d8eae2d57d4900bf407e -b69fe3ded0c4f5d44a09a0e0f398221b6d1bf5dbb8bc4e338b93c64f1a3cac1e4b5f73c2b8117158030ec03787f4b452 -8852cdbaf7d0447a8c6f211b4830711b3b5c105c0f316e3a6a18dcfbb9be08bd6f4e5c8ae0c3692da08a2dfa532f9d5c -93bbf6d7432a7d98ade3f94b57bf9f4da9bc221a180a370b113066dd42601bb9e09edd79e2e6e04e00423399339eebda -a80941c391f1eeafc1451c59e4775d6a383946ff22997aeaadf806542ba451d3b0f0c6864eeba954174a296efe2c1550 -a045fe2bb011c2a2f71a0181a8f457a3078470fb74c628eab8b59aef69ffd0d649723bf74d6885af3f028bc5a104fb39 -b9d8c35911009c4c8cad64692139bf3fc16b78f5a19980790cb6a7aea650a25df4231a4437ae0c351676a7e42c16134f -94c79501ded0cfcbab99e1841abe4a00a0252b3870e20774c3da16c982d74c501916ec28304e71194845be6e3113c7ab -900a66418b082a24c6348d8644ddb1817df5b25cb33044a519ef47cc8e1f7f1e38d2465b7b96d32ed472d2d17f8414c6 -b26f45d393b8b2fcb29bdbb16323dc7f4b81c09618519ab3a39f8ee5bd148d0d9f3c0b5dfab55b5ce14a1cb9206d777b -aa1a87735fc493a80a96a9a57ca40a6d9c32702bfcaa9869ce1a116ae65d69cefe2f3e79a12454b4590353e96f8912b4 -a922b188d3d0b69b4e4ea2a2aa076566962844637da12c0832105d7b31dea4a309eee15d12b7a336be3ea36fcbd3e3b7 -8f3841fcf4105131d8c4d9885e6e11a46c448226401cf99356c291fadb864da9fa9d30f3a73c327f23f9fd99a11d633e -9791d1183fae270e226379af6c497e7da803ea854bb20afa74b253239b744c15f670ee808f708ede873e78d79a626c9a -a4cad52e3369491ada61bf28ada9e85de4516d21c882e5f1cd845bea9c06e0b2887b0c5527fcff6fc28acd3c04f0a796 -b9ac86a900899603452bd11a7892a9bfed8054970bfcbeaa8c9d1930db891169e38d6977f5258c25734f96c8462eee3b -a3a154c28e5580656a859f4efc2f5ebfa7eaa84ca40e3f134fa7865e8581586db74992dbfa4036aa252fba103773ddde -95cc2a0c1885a029e094f5d737e3ecf4d26b99036453a8773c77e360101f9f98676ee246f6f732a377a996702d55691f -842651bbe99720438d8d4b0218feb60481280c05beb17750e9ca0d8c0599a60f873b7fbdcc7d8835ba9a6d57b16eec03 -81ee54699da98f5620307893dcea8f64670609fa20e5622265d66283adeac122d458b3308c5898e6c57c298db2c8b24f -b97868b0b2bc98032d68352a535a1b341b9ff3c7af4e3a7f3ebc82d3419daa1b5859d6aedc39994939623c7cd878bd9b -b60325cd5d36461d07ef253d826f37f9ee6474a760f2fff80f9873d01fd2b57711543cdc8d7afa1c350aa753c2e33dea -8c205326c11d25a46717b780c639d89714c7736c974ae71287e3f4b02e6605ac2d9b4928967b1684f12be040b7bf2dd3 -95a392d82db51e26ade6c2ccd3396d7e40aff68fa570b5951466580d6e56dda51775dce5cf3a74a7f28c3cb2eb551c4d -8f2cc8071eb56dffb70bda6dd433b556221dc8bba21c53353c865f00e7d4d86c9e39f119ea9a8a12ef583e9a55d9a6b6 -9449a71af9672aaf8856896d7e3d788b22991a7103f75b08c0abbcc2bfe60fda4ed8ce502cea4511ff0ea52a93e81222 -857090ab9fdb7d59632d068f3cc8cf27e61f0d8322d30e6b38e780a1f05227199b4cd746aac1311c36c659ef20931f28 -98a891f4973e7d9aaf9ac70854608d4f7493dffc7e0987d7be9dd6029f6ea5636d24ef3a83205615ca1ff403750058e1 -a486e1365bbc278dd66a2a25d258dc82f46b911103cb16aab3945b9c95ae87b386313a12b566df5b22322ede0afe25ad -a9a1eb399ed95d396dccd8d1ac718043446f8b979ec62bdce51c617c97a312f01376ab7fb87d27034e5f5570797b3c33 -b7abc3858d7a74bb446218d2f5a037e0fae11871ed9caf44b29b69c500c1fa1dcfad64c9cdccc9d80d5e584f06213deb -8cfb09fe2e202faa4cebad932b1d35f5ca204e1c2a0c740a57812ac9a6792130d1312aabd9e9d4c58ca168bfebd4c177 -a90a305c2cd0f184787c6be596fa67f436afd1f9b93f30e875f817ac2aae8bdd2e6e656f6be809467e6b3ad84adb86b1 -80a9ef993c2b009ae172cc8f7ec036f5734cf4f4dfa06a7db4d54725e7fbfae5e3bc6f22687bdbb6961939d6f0c87537 -848ade1901931e72b955d7db1893f07003e1708ff5d93174bac5930b9a732640f0578839203e9b77eb27965c700032d3 -93fdf4697609c5ae9c33b9ca2f5f1af44abeb2b98dc4fdf732cf7388de086f410730dc384d9b7a7f447bb009653c8381 -89ce3fb805aea618b5715c0d22a9f46da696b6fa86794f56fdf1d44155a33d42daf1920bcbe36cbacf3cf4c92df9cbc7 -829ce2c342cf82aa469c65f724f308f7a750bd1494adc264609cd790c8718b8b25b5cab5858cf4ee2f8f651d569eea67 -af2f0cee7bf413204be8b9df59b9e4991bc9009e0d6dbe6815181df0ec2ca93ab8f4f3135b1c14d8f53d74bff0bd6f27 -b87998cecf7b88cde93d1779f10a521edd5574a2fbd240102978639ec57433ba08cdb53849038a329cebbe74657268d2 -a64542a1261a6ed3d720c2c3a802303aad8c4c110c95d0f12e05c1065e66f42da494792b6bfc5b9272363f3b1d457f58 -86a6fd042e4f282fadf07a4bfee03fc96a3aea49f7a00f52bf249a20f1ec892326855410e61f37fbb27d9305eb2fc713 -967ea5bc403b6db269682f7fd0df90659350d7e1aa66bc4fab4c9dfcd75ed0bba4b52f1cebc5f34dc8ba810793727629 -a52990f9f3b8616ce3cdc2c74cd195029e6a969753dcf2d1630438700e7d6ebde36538532b3525ac516f5f2ce9dd27a3 -a64f7ff870bab4a8bf0d4ef6f5c744e9bf1021ed08b4c80903c7ad318e80ba1817c3180cc45cb5a1cae1170f0241655f -b00f706fa4de1f663f021e8ad3d155e84ce6084a409374b6e6cd0f924a0a0b51bebaaaf1d228c77233a73b0a5a0df0e9 -8b882cc3bff3e42babdb96df95fb780faded84887a0a9bab896bef371cdcf169d909f5658649e93006aa3c6e1146d62e -9332663ef1d1dcf805c3d0e4ce7a07d9863fb1731172e766b3cde030bf81682cc011e26b773fb9c68e0477b4ae2cfb79 -a8aa8151348dbd4ef40aaeb699b71b4c4bfd3218560c120d85036d14f678f6736f0ec68e80ce1459d3d35feccc575164 -a16cd8b729768f51881c213434aa28301fa78fcb554ddd5f9012ee1e4eae7b5cb3dd88d269d53146dea92d10790faf0b -86844f0ef9d37142faf3b1e196e44fbe280a3ba4189aa05c356778cb9e3b388a2bff95eed305ada8769935c9974e4c57 -ae2eec6b328fccf3b47bcdac32901ac2744a51beb410b04c81dea34dee4912b619466a4f5e2780d87ecefaebbe77b46d -915df4c38d301c8a4eb2dc5b1ba0ffaad67cbb177e0a80095614e9c711f4ef24a4cef133f9d982a63d2a943ba6c8669d -ae6a2a4dedfc2d1811711a8946991fede972fdf2a389b282471280737536ffc0ac3a6d885b1f8bda0366eb0b229b9979 -a9b628c63d08b8aba6b1317f6e91c34b2382a6c85376e8ef2410a463c6796740ae936fc4e9e0737cb9455d1daa287bd8 -848e30bf7edf2546670b390d5cf9ab71f98fcb6add3c0b582cb34996c26a446dee5d1bde4fdcde4fc80c10936e117b29 -907d6096c7c8c087d1808dd995d5d2b9169b3768c3f433475b50c2e2bd4b082f4d543afd8b0b0ddffa9c66222a72d51d -a59970a2493b07339124d763ac9d793c60a03354539ecbcf6035bc43d1ea6e35718202ae6d7060b7d388f483d971573c -b9cfef2af9681b2318f119d8611ff6d9485a68d8044581b1959ab1840cbca576dbb53eec17863d2149966e9feb21122f -ad47271806161f61d3afa45cdfe2babceef5e90031a21779f83dc8562e6076680525b4970b2f11fe9b2b23c382768323 -8e425a99b71677b04fe044625d338811fbb8ee32368a424f6ab2381c52e86ee7a6cecedf777dc97181519d41c351bc22 -86b55b54d7adefc12954a9252ee23ae83efe8b5b4b9a7dc307904413e5d69868c7087a818b2833f9b004213d629be8ad -a14fda6b93923dd11e564ae4457a66f397741527166e0b16a8eb91c6701c244fd1c4b63f9dd3515193ec88fa6c266b35 -a9b17c36ae6cd85a0ed7f6cabc5b47dc8f80ced605db327c47826476dc1fb8f8669aa7a7dc679fbd4ee3d8e8b4bd6a6f -82a0829469c1458d959c821148f15dacae9ea94bf56c59a6ab2d4dd8b3d16d73e313b5a3912a6c1f131d73a8f06730c4 -b22d56d549a53eaef549595924bdb621ff807aa4513feedf3fdcbf7ba8b6b9cfa4481c2f67fc642db397a6b794a8b63a -974c59c24392e2cb9294006cbe3c52163e255f3bd0c2b457bdc68a6338e6d5b6f87f716854492f8d880a6b896ccf757c -b70d247ba7cad97c50b57f526c2ba915786e926a94e8f8c3eebc2e1be6f4255411b9670e382060049c8f4184302c40b2 -ad80201fe75ef21c3ddbd98cf23591e0d7a3ba1036dfe77785c32f44755a212c31f0ceb0a0b6f5ee9b6dc81f358d30c3 -8c656e841f9bb90b9a42d425251f3fdbc022a604d75f5845f479ed4be23e02aaf9e6e56cde351dd7449c50574818a199 -8b88dd3fa209d3063b7c5b058f7249ee9900fbc2287d16da61a0704a0a1d71e45d9c96e1cda7fdf9654534ec44558b22 -961da00cc8750bd84d253c08f011970ae1b1158ad6778e8ed943d547bceaf52d6d5a212a7de3bf2706688c4389b827d2 -a5dd379922549a956033e3d51a986a4b1508e575042b8eaa1df007aa77cf0b8c2ab23212f9c075702788fa9c53696133 -ac8fcfde3a349d1e93fc8cf450814e842005c545c4844c0401bc80e6b96cdb77f29285a14455e167c191d4f312e866cd -ac63d79c799783a8466617030c59dd5a8f92ee6c5204676fd8d881ce5f7f8663bdbeb0379e480ea9b6340ab0dc88e574 -805874fde19ce359041ae2bd52a39e2841acabfd31f965792f2737d7137f36d4e4722ede8340d8c95afa6af278af8acb -8d2f323a228aa8ba7b7dc1399138f9e6b41df1a16a7069003ab8104b8b68506a45141bc5fe66acf430e23e13a545190b -a1610c721a2d9af882bb6b39bea97cff1527a3aea041d25934de080214ae77c959e79957164440686d15ab301e897d4d -aba16d29a47fc36f12b654fde513896723e2c700c4190f11b26aa4011da57737ad717daa02794aa3246e4ae5f0b0cc3a -a406db2f15fdd135f346cc4846623c47edd195e80ba8c7cb447332095314d565e4040694ca924696bb5ee7f8996ea0ba -8b30e2cd9b47d75ba57b83630e40f832249af6c058d4f490416562af451993eec46f3e1f90bc4d389e4c06abd1b32a46 -aacf9eb7036e248e209adbfc3dd7ce386569ea9b312caa4b240726549db3c68c4f1c8cbf8ed5ea9ea60c7e57c9df3b8e -b20fcac63bf6f5ee638a42d7f89be847f348c085ddcbec3fa318f4323592d136c230495f188ef2022aa355cc2b0da6f9 -811eff750456a79ec1b1249d76d7c1547065b839d8d4aaad860f6d4528eb5b669473dcceeeea676cddbc3980b68461b7 -b52d14ae33f4ab422f953392ae76a19c618cc31afc96290bd3fe2fb44c954b5c92c4789f3f16e8793f2c0c1691ade444 -a7826dafeeba0db5b66c4dfcf2b17fd7b40507a5a53ac2e42942633a2cb30b95ba1739a6e9f3b7a0e0f1ec729bf274e2 -8acfd83ddf7c60dd7c8b20c706a3b972c65d336b8f9b3d907bdd8926ced271430479448100050b1ef17578a49c8fa616 -af0c69f65184bb06868029ad46f8465d75c36814c621ac20a5c0b06a900d59305584f5a6709683d9c0e4b6cd08d650a6 -b6cc8588191e00680ee6c3339bd0f0a17ad8fd7f4be57d5d7075bede0ea593a19e67f3d7c1a20114894ee5bfcab71063 -a82fd4f58635129dbb6cc3eb9391cf2d28400018b105fc41500fbbd12bd890b918f97d3d359c29dd3b4c4e34391dfab0 -92fc544ed65b4a3625cf03c41ddff7c039bc22d22c0d59dcc00efd5438401f2606adb125a1d5de294cca216ec8ac35a3 -906f67e4a32582b71f15940523c0c7ce370336935e2646bdaea16a06995256d25e99df57297e39d6c39535e180456407 -97510337ea5bbd5977287339197db55c60533b2ec35c94d0a460a416ae9f60e85cee39be82abeeacd5813cf54df05862 -87e6894643815c0ea48cb96c607266c5ee4f1f82ba5fe352fb77f9b6ed14bfc2b8e09e80a99ac9047dfcf62b2ae26795 -b6fd55dd156622ad7d5d51b7dde75e47bd052d4e542dd6449e72411f68275775c846dde301e84613312be8c7bce58b07 -b98461ac71f554b2f03a94e429b255af89eec917e208a8e60edf5fc43b65f1d17a20de3f31d2ce9f0cb573c25f2f4d98 -96f0dea40ca61cefbee41c4e1fe9a7d81fbe1f49bb153d083ab70f5d0488a1f717fd28cedcf6aa18d07cce2c62801898 -8d7c3ab310184f7dc34b6ce4684e4d29a31e77b09940448ea4daac730b7eb308063125d4dd229046cf11bfd521b771e0 -96f0564898fe96687918bbf0a6adead99cf72e3a35ea3347e124af9d006221f8e82e5a9d2fe80094d5e8d48e610f415e -ad50fcb92c2675a398cf07d4c40a579e44bf8d35f27cc330b57e54d5ea59f7d898af0f75dccfe3726e5471133d70f92b -828beed62020361689ae7481dd8f116902b522fb0c6c122678e7f949fdef70ead011e0e6bffd25678e388744e17cdb69 -8349decac1ca16599eee2efc95bcaabf67631107da1d34a2f917884bd70dfec9b4b08ab7bc4379d6c73b19c0b6e54fb8 -b2a6a2e50230c05613ace9e58bb2e98d94127f196f02d9dddc53c43fc68c184549ca12d713cb1b025d8260a41e947155 -94ff52181aadae832aed52fc3b7794536e2a31a21fc8be3ea312ca5c695750d37f08002f286b33f4023dba1e3253ecfa -a21d56153c7e5972ee9a319501be4faff199fdf09bb821ea9ce64aa815289676c00f105e6f00311b3a5b627091b0d0fc -a27a60d219f1f0c971db73a7f563b371b5c9fc3ed1f72883b2eac8a0df6698400c9954f4ca17d7e94e44bd4f95532afb -a2fc56fae99b1f18ba5e4fe838402164ce82f8a7f3193d0bbd360c2bac07c46f9330c4c7681ffb47074c6f81ee6e7ac6 -b748e530cd3afb96d879b83e89c9f1a444f54e55372ab1dcd46a0872f95ce8f49cf2363fc61be82259e04f555937ed16 -8bf8993e81080c7cbba1e14a798504af1e4950b2f186ab3335b771d6acaee4ffe92131ae9c53d74379d957cb6344d9cd -96774d0ef730d22d7ab6d9fb7f90b9ead44285219d076584a901960542756700a2a1603cdf72be4708b267200f6c36a9 -b47703c2ab17be1e823cc7bf3460db1d6760c0e33862c90ca058845b2ff234b0f9834ddba2efb2ee1770eb261e7d8ffd -84319e67c37a9581f8b09b5e4d4ae88d0a7fb4cbb6908971ab5be28070c3830f040b1de83ee663c573e0f2f6198640e4 -96811875fa83133e0b3c0e0290f9e0e28bca6178b77fdf5350eb19344d453dbd0d71e55a0ef749025a5a2ca0ad251e81 -81a423423e9438343879f2bfd7ee9f1c74ebebe7ce3cfffc8a11da6f040cc4145c3b527bd3cf63f9137e714dbcb474ef -b8c3535701ddbeec2db08e17a4fa99ba6752d32ece5331a0b8743676f421fcb14798afc7c783815484f14693d2f70db8 -81aee980c876949bf40782835eec8817d535f6f3f7e00bf402ddd61101fdcd60173961ae90a1cf7c5d060339a18c959d -87e67b928d97b62c49dac321ce6cb680233f3a394d4c9a899ac2e8db8ccd8e00418e66cdfd68691aa3cb8559723b580c -8eac204208d99a2b738648df96353bbb1b1065e33ee4f6bba174b540bbbd37d205855e1f1e69a6b7ff043ca377651126 -848e6e7a54ad64d18009300b93ea6f459ce855971dddb419b101f5ac4c159215626fadc20cc3b9ab1701d8f6dfaddd8b -88aa123d9e0cf309d46dddb6acf634b1ade3b090a2826d6e5e78669fa1220d6df9a6697d7778cd9b627db17eea846126 -9200c2a629b9144d88a61151b661b6c4256cc5dadfd1e59a8ce17a013c2d8f7e754aabe61663c3b30f1bc47784c1f8cf -b6e1a2827c3bdda91715b0e1b1f10dd363cef337e7c80cac1f34165fc0dea7c8b69747e310563db5818390146ce3e231 -92c333e694f89f0d306d54105b2a5dcc912dbe7654d9e733edab12e8537350815be472b063e56cfde5286df8922fdecb -a6fac04b6d86091158ebb286586ccfec2a95c9786e14d91a9c743f5f05546073e5e3cc717635a0c602cad8334e922346 -a581b4af77feebc1fb897d49b5b507c6ad513d8f09b273328efbb24ef0d91eb740d01b4d398f2738125dacfe550330cd -81c4860cccf76a34f8a2bc3f464b7bfd3e909e975cce0d28979f457738a56e60a4af8e68a3992cf273b5946e8d7f76e2 -8d1eaa09a3180d8af1cbaee673db5223363cc7229a69565f592fa38ba0f9d582cedf91e15dabd06ebbf2862fc0feba54 -9832f49b0147f4552402e54593cfa51f99540bffada12759b71fcb86734be8e500eea2d8b3d036710bdf04c901432de9 -8bdb0e8ec93b11e5718e8c13cb4f5de545d24829fd76161216340108098dfe5148ed25e3b57a89a516f09fa79043734d -ab96f06c4b9b0b2c0571740b24fca758e6976315053a7ecb20119150a9fa416db2d3a2e0f8168b390bb063f0c1caf785 -ab777f5c52acd62ecf4d1f168b9cc8e1a9b45d4ec6a8ff52c583e867c2239aba98d7d3af977289b367edce03d9c2dfb1 -a09d3ce5e748da84802436951acc3d3ea5d8ec1d6933505ed724d6b4b0d69973ab0930daec9c6606960f6e541e4a3ce2 -8ef94f7be4d85d5ad3d779a5cf4d7b2fc3e65c52fb8e1c3c112509a4af77a0b5be994f251e5e40fabeeb1f7d5615c22b -a7406a5bf5708d9e10922d3c5c45c03ef891b8d0d74ec9f28328a72be4cdc05b4f2703fa99366426659dfca25d007535 -b7f52709669bf92a2e070bfe740f422f0b7127392c5589c7f0af71bb5a8428697c762d3c0d74532899da24ea7d8695c2 -b9dfb0c8df84104dbf9239ccefa4672ef95ddabb8801b74997935d1b81a78a6a5669a3c553767ec19a1281f6e570f4ff -ae4d5c872156061ce9195ac640190d8d71dd406055ee43ffa6f9893eb24b870075b74c94d65bc1d5a07a6573282b5520 -afe6bd3eb72266d333f1807164900dcfa02a7eb5b1744bb3c86b34b3ee91e3f05e38fa52a50dc64eeb4bdb1dd62874b8 -948043cf1bc2ef3c01105f6a78dc06487f57548a3e6ef30e6ebc51c94b71e4bf3ff6d0058c72b6f3ecc37efd7c7fa8c0 -a22fd17c2f7ffe552bb0f23fa135584e8d2d8d75e3f742d94d04aded2a79e22a00dfe7acbb57d44e1cdb962fb22ae170 -8cd0f4e9e4fb4a37c02c1bde0f69359c43ab012eb662d346487be0c3758293f1ca560122b059b091fddce626383c3a8f -90499e45f5b9c81426f3d735a52a564cafbed72711d9279fdd88de8038e953bc48c57b58cba85c3b2e4ce56f1ddb0e11 -8c30e4c034c02958384564cac4f85022ef36ab5697a3d2feaf6bf105049675bbf23d01b4b6814711d3d9271abff04cac -81f7999e7eeea30f3e1075e6780bbf054f2fb6f27628a2afa4d41872a385b4216dd5f549da7ce6cf39049b2251f27fb7 -b36a7191f82fc39c283ffe53fc1f5a9a00b4c64eee7792a8443475da9a4d226cf257f226ea9d66e329af15d8f04984ec -aad4da528fdbb4db504f3041c747455baff5fcd459a2efd78f15bdf3aea0bdb808343e49df88fe7a7c8620009b7964a3 -99ebd8c6dd5dd299517fb6381cfc2a7f443e6e04a351440260dd7c2aee3f1d8ef06eb6c18820b394366ecdfd2a3ce264 -8873725b81871db72e4ec3643084b1cdce3cbf80b40b834b092767728605825c19b6847ad3dcf328438607e8f88b4410 -b008ee2f895daa6abd35bd39b6f7901ae4611a11a3271194e19da1cdcc7f1e1ea008fe5c5440e50d2c273784541ad9c5 -9036feafb4218d1f576ef89d0e99124e45dacaa6d816988e34d80f454d10e96809791d5b78f7fd65f569e90d4d7238c5 -92073c1d11b168e4fa50988b0288638b4868e48bbc668c5a6dddf5499875d53be23a285acb5e4bad60114f6cf6c556e9 -88c87dfcb8ba6cbfe7e1be081ccfadbd589301db2cb7c99f9ee5d7db90aa297ed1538d5a867678a763f2deede5fd219a -b42a562805c661a50f5dea63108002c0f27c0da113da6a9864c9feb5552225417c0356c4209e8e012d9bcc9d182c7611 -8e6317d00a504e3b79cd47feb4c60f9df186467fe9ca0f35b55c0364db30528f5ff071109dabb2fc80bb9cd4949f0c24 -b7b1ea6a88694f8d2f539e52a47466695e39e43a5eb9c6f23bca15305fe52939d8755cc3ac9d6725e60f82f994a3772f -a3cd55161befe795af93a38d33290fb642b8d80da8b786c6e6fb02d393ea308fbe87f486994039cbd7c7b390414594b6 -b416d2d45b44ead3b1424e92c73c2cf510801897b05d1724ff31cbd741920cd858282fb5d6040fe1f0aa97a65bc49424 -950ee01291754feace97c2e933e4681e7ddfbc4fcd079eb6ff830b0e481d929c93d0c7fb479c9939c28ca1945c40da09 -869bd916aee8d86efe362a49010382674825d49195b413b4b4018e88ce43fe091b475d0b863ff0ba2259400f280c2b23 -9782f38cd9c9d3385ec286ebbc7cba5b718d2e65a5890b0a5906b10a89dc8ed80d417d71d7c213bf52f2af1a1f513ea7 -91cd33bc2628d096269b23faf47ee15e14cb7fdc6a8e3a98b55e1031ea0b68d10ba30d97e660f7e967d24436d40fad73 -8becc978129cc96737034c577ae7225372dd855da8811ae4e46328e020c803833b5bdbc4a20a93270e2b8bd1a2feae52 -a36b1d8076783a9522476ce17f799d78008967728ce920531fdaf88303321bcaf97ecaa08e0c01f77bc32e53c5f09525 -b4720e744943f70467983aa34499e76de6d59aa6fadf86f6b787fdce32a2f5b535b55db38fe2da95825c51002cfe142d -91ad21fc502eda3945f6de874d1b6bf9a9a7711f4d61354f9e5634fc73f9c06ada848de15ab0a75811d3250be862827d -84f78e2ebf5fc077d78635f981712daf17e2475e14c2a96d187913006ad69e234746184a51a06ef510c9455b38acb0d7 -960aa7906e9a2f11db64a26b5892ac45f20d2ccb5480f4888d89973beb6fa0dfdc06d68d241ff5ffc7f1b82b1aac242d -a99365dcd1a00c66c9db6924b97c920f5c723380e823b250db85c07631b320ec4e92e586f7319e67a522a0578f7b6d6c -a25d92d7f70cf6a88ff317cfec071e13774516da664f5fac0d4ecaa65b8bf4eb87a64a4d5ef2bd97dfae98d388dbf5cc -a7af47cd0041295798f9779020a44653007444e8b4ef0712982b06d0dcdd434ec4e1f7c5f7a049326602cb605c9105b7 -aefe172eac5568369a05980931cc476bebd9dea573ba276d59b9d8c4420784299df5a910033b7e324a6c2dfc62e3ef05 -b69bc9d22ffa645baa55e3e02522e9892bb2daa7fff7c15846f13517d0799766883ee09ae0869df4139150c5b843ca8a -95a10856140e493354fdd12722c7fdded21b6a2ffbc78aa2697104af8ad0c8e2206f44b0bfee077ef3949d46bbf7c16b -891f2fcd2c47cbea36b7fa715968540c233313f05333f09d29aba23c193f462ed490dd4d00969656e89c53155fdfe710 -a6c33e18115e64e385c843dde34e8a228222795c7ca90bc2cc085705d609025f3351d9be61822c69035a49fb3e48f2d5 -b87fb12f12c0533b005adad0487f03393ff682e13575e3cb57280c3873b2c38ba96a63c49eef7a442753d26b7005230b -b905c02ba451bfd411c135036d92c27af3b0b1c9c2f1309d6948544a264b125f39dd41afeff4666b12146c545adc168a -8b29c513f43a78951cf742231cf5457a6d9d55edf45df5481a0f299a418d94effef561b15d2c1a01d1b8067e7153fda9 -b9941cccd51dc645920d2781c81a317e5a33cb7cf76427b60396735912cb6d2ca9292bb4d36b6392467d390d2c58d9f3 -a8546b627c76b6ef5c93c6a98538d8593dbe21cb7673fd383d5401b0c935eea0bdeeefeb1af6ad41bad8464fb87bbc48 -aa286b27de2812de63108a1aec29d171775b69538dc6198640ac1e96767c2b83a50391f49259195957d457b493b667c9 -a932fb229f641e9abbd8eb2bd874015d97b6658ab6d29769fc23b7db9e41dd4f850382d4c1f08af8f156c5937d524473 -a1412840fcc86e2aeec175526f2fb36e8b3b8d21a78412b7266daf81e51b3f68584ed8bd42a66a43afdd8c297b320520 -89c78be9efb624c97ebca4fe04c7704fa52311d183ffd87737f76b7dadc187c12c982bd8e9ed7cd8beb48cdaafd2fd01 -a3f5ddec412a5bec0ce15e3bcb41c6214c2b05d4e9135a0d33c8e50a78eaba71e0a5a6ea8b45854dec5c2ed300971fc2 -9721f9cec7a68b7758e3887548790de49fa6a442d0396739efa20c2f50352a7f91d300867556d11a703866def2d5f7b5 -a23764e140a87e5991573521af039630dd28128bf56eed2edbed130fd4278e090b60cf5a1dca9de2910603d44b9f6d45 -a1a6494a994215e48ab55c70efa8ffdddce6e92403c38ae7e8dd2f8288cad460c6c7db526bbdf578e96ca04d9fe12797 -b1705ea4cb7e074efe0405fc7b8ee2ec789af0426142f3ec81241cacd4f7edcd88e39435e4e4d8e7b1df64f3880d6613 -85595d061d677116089a6064418b93eb44ff79e68d12bd9625078d3bbc440a60d0b02944eff6054433ee34710ae6fbb4 -9978d5e30bedb7526734f9a1febd973a70bfa20890490e7cc6f2f9328feab1e24f991285dbc3711d892514e2d7d005ad -af30243c66ea43b9f87a061f947f7bce745f09194f6e95f379c7582b9fead920e5d6957eaf05c12ae1282ada4670652f -a1930efb473f88001e47aa0b2b2a7566848cccf295792e4544096ecd14ee5d7927c173a8576b405bfa2eec551cd67eb5 -b0446d1c590ee5a45f7e22d269c044f3848c97aec1d226b44bfd0e94d9729c28a38bccddc3a1006cc5fe4e3c24f001f2 -b8a8380172df3d84b06176df916cf557966d4f2f716d3e9437e415d75b646810f79f2b2b71d857181b7fc944018883a3 -a563afec25b7817bfa26e19dc9908bc00aa8fc3d19be7d6de23648701659009d10e3e4486c28e9c6b13d48231ae29ac5 -a5a8e80579de886fb7d6408f542791876885947b27ad6fa99a8a26e381f052598d7b4e647b0115d4b5c64297e00ce28e -8f87afcc7ad33c51ac719bade3cd92da671a37a82c14446b0a2073f4a0a23085e2c8d31913ed2d0be928f053297de8f6 -a43c455ce377e0bc434386c53c752880687e017b2f5ae7f8a15c044895b242dffde4c92fb8f8bb50b18470b17351b156 -8368f8b12a5bceb1dba25adb3a2e9c7dc9b1a77a1f328e5a693f5aec195cd1e06b0fe9476b554c1c25dac6c4a5b640a3 -919878b27f3671fc78396f11531c032f3e2bd132d04cc234fa4858676b15fb1db3051c0b1db9b4fc49038216f11321ce -b48cd67fb7f1242696c1f877da4bdf188eac676cd0e561fbac1a537f7b8229aff5a043922441d603a26aae56a15faee4 -a3e0fdfd4d29ea996517a16f0370b54787fefe543c2fe73bfc6f9e560c1fd30dad8409859e2d7fa2d44316f24746c712 -8bb156ade8faf149df7bea02c140c7e392a4742ae6d0394d880a849127943e6f26312033336d3b9fdc0092d71b5efe87 -8845e5d5cc555ca3e0523244300f2c8d7e4d02aaebcb5bd749d791208856c209a6f84dd99fd55968c9f0ab5f82916707 -a3e90bb5c97b07789c2f32dff1aec61d0a2220928202f5ad5355ae71f8249237799d6c8a22602e32e572cb12eabe0c17 -b150bcc391884c996149dc3779ce71f15dda63a759ee9cc05871f5a8379dcb62b047098922c0f26c7bd04deb394c33f9 -95cd4ad88d51f0f2efcfd0c2df802fe252bb9704d1afbf9c26a248df22d55da87bdfaf41d7bc6e5df38bd848f0b13f42 -a05a49a31e91dff6a52ac8b9c2cfdd646a43f0d488253f9e3cfbce52f26667166bbb9b608fc358763a65cbf066cd6d05 -a59c3c1227fdd7c2e81f5e11ef5c406da44662987bac33caed72314081e2eed66055d38137e01b2268e58ec85dd986c0 -b7020ec3bd73a99861f0f1d88cf5a19abab1cbe14b7de77c9868398c84bb8e18dbbe9831838a96b6d6ca06e82451c67b -98d1ff2525e9718ee59a21d8900621636fcd873d9a564b8dceb4be80a194a0148daf1232742730b3341514b2e5a5436c -886d97b635975fc638c1b6afc493e5998ca139edba131b75b65cfe5a8e814f11bb678e0eeee5e6e5cd913ad3f2fefdfc -8fb9fd928d38d5d813b671c924edd56601dd7163b686c13f158645c2f869d9250f3859aa5463a39258c90fef0f41190a -aac35e1cd655c94dec3580bb3800bd9c2946c4a9856f7d725af15fbea6a2d8ca51c8ad2772abed60ee0e3fb9cb24046b -b8d71fa0fa05ac9e443c9b4929df9e7f09a919be679692682e614d24227e04894bfc14a5c73a62fb927fedff4a0e4aa7 -a45a19f11fbbb531a704badbb813ed8088ab827c884ee4e4ebf363fa1132ff7cfa9d28be9c85b143e4f7cdbc94e7cf1a -82b54703a4f295f5471b255ab59dce00f0fe90c9fb6e06b9ee48b15c91d43f4e2ef4a96c3118aeb03b08767be58181bb -8283264c8e6d2a36558f0d145c18576b6600ff45ff99cc93eca54b6c6422993cf392668633e5df396b9331e873d457e5 -8c549c03131ead601bc30eb6b9537b5d3beb7472f5bb1bcbbfd1e9f3704477f7840ab3ab7f7dc13bbbbcdff886a462d4 -afbb0c520ac1b5486513587700ad53e314cb74bfbc12e0b5fbdcfdaac36d342e8b59856196a0d84a25cff6e6e1d17e76 -89e4c22ffb51f2829061b3c7c1983c5c750cad158e3a825d46f7cf875677da5d63f653d8a297022b5db5845c9271b32b -afb27a86c4c2373088c96b9adf4433f2ebfc78ac5c526e9f0510670b6e4e5e0057c0a4f75b185e1a30331b9e805c1c15 -a18e16b57445f88730fc5d3567bf5a176861dc14c7a08ed2996fe80eed27a0e7628501bcb78a1727c5e9ac55f29c12c4 -93d61bf88b192d6825cf4e1120af1c17aa0f994d158b405e25437eaeefae049f7b721a206e7cc8a04fdc29d3c42580a1 -a99f2995a2e3ed2fd1228d64166112038de2f516410aa439f4c507044e2017ea388604e2d0f7121256fadf7fbe7023d1 -914fd91cffc23c32f1c6d0e98bf660925090d873367d543034654389916f65f552e445b0300b71b61b721a72e9a5983c -b42a578a7787b71f924e7def425d849c1c777156b1d4170a8ee7709a4a914e816935131afd9a0412c4cb952957b20828 -82fb30590e84b9e45db1ec475a39971cf554dc01bcc7050bc89265740725c02e2be5a972168c5170c86ae83e5b0ad2c0 -b14f8d8e1e93a84976289e0cf0dfa6f3a1809e98da16ee5c4932d0e1ed6bf8a07697fdd4dd86a3df84fb0003353cdcc0 -85d7a2f4bda31aa2cb208b771fe03291a4ebdaf6f1dc944c27775af5caec412584c1f45bc741fca2a6a85acb3f26ad7d -af02e56ce886ff2253bc0a68faad76f25ead84b2144e5364f3fb9b648f03a50ee9dc0b2c33ebacf7c61e9e43201ef9ef -87e025558c8a0b0abd06dfc350016847ea5ced7af2d135a5c9eec9324a4858c4b21510fb0992ec52a73447f24945058e -80fff0bafcd058118f5e7a4d4f1ae0912efeb281d2cbe4d34ba8945cc3dbe5d8baf47fb077343b90b8d895c90b297aca -b6edcf3a40e7b1c3c0148f47a263cd819e585a51ef31c2e35a29ce6f04c53e413f743034c0d998d9c00a08ba00166f31 -abb87ed86098c0c70a76e557262a494ff51a30fb193f1c1a32f8e35eafa34a43fcc07aa93a3b7a077d9e35afa07b1a3d -a280214cd3bb0fb7ecd2d8bcf518cbd9078417f2b91d2533ec2717563f090fb84f2a5fcfdbbeb2a2a1f8a71cc5aa5941 -a63083ca7238ea2b57d15a475963cf1d4f550d8cd76db290014a0461b90351f1f26a67d674c837b0b773b330c7c3d534 -a8fa39064cb585ece5263e2f42f430206476bf261bd50f18d2b694889bd79d04d56410664cecad62690e5c5a20b3f6ff -85ba52ce9d700a5dcf6c5b00559acbe599d671ce5512467ff4b6179d7fad550567ce2a9c126a50964e3096458ea87920 -b913501e1008f076e5eac6d883105174f88b248e1c9801e568fefaffa1558e4909364fc6d9512aa4d125cbd7cc895f05 -8eb33b5266c8f2ed4725a6ad147a322e44c9264cf261c933cbbe230a43d47fca0f29ec39756b20561dabafadd5796494 -850ebc8b661a04318c9db5a0515066e6454fa73865aa4908767a837857ecd717387f614acb614a88e075d4edc53a2f5a -a08d6b92d866270f29f4ce23a3f5d99b36b1e241a01271ede02817c8ec3f552a5c562db400766c07b104a331835c0c64 -8131804c89bb3e74e9718bfc4afa547c1005ff676bd4db9604335032b203390cfa54478d45c6c78d1fe31a436ed4be9f -9106d94f23cc1eacec8316f16d6f0a1cc160967c886f51981fdb9f3f12ee1182407d2bb24e5b873de58cb1a3ee915a6b -a13806bfc3eae7a7000c9d9f1bd25e10218d4e67f59ae798b145b098bca3edad2b1040e3fc1e6310e612fb8818f459ac -8c69fbca502046cb5f6db99900a47b34117aef3f4b241690cdb3b84ca2a2fc7833e149361995dc41fa78892525bce746 -852c473150c91912d58ecb05769222fa18312800c3f56605ad29eec9e2d8667b0b81c379048d3d29100ed2773bb1f3c5 -b1767f6074426a00e01095dbb1795beb4e4050c6411792cbad6537bc444c3165d1058bafd1487451f9c5ddd209e0ae7e -80c600a5fe99354ce59ff0f84c760923dc8ff66a30bf47dc0a086181785ceb01f9b951c4e66df800ea6d705e8bc47055 -b5cf19002fbc88a0764865b82afcb4d64a50196ea361e5c71dff7de084f4dcbbc34ec94a45cc9e0247bd51da565981aa -93e67a254ea8ce25e112d93cc927fadaa814152a2c4ec7d9a56eaa1ed47aec99b7e9916b02e64452cc724a6641729bbb -ace70b32491bda18eee4a4d041c3bc9effae9340fe7e6c2f5ad975ee0874c17f1a7da7c96bd85fccff9312c518fac6e9 -ab4cfa02065017dd7f1aadc66f2c92f78f0f11b8597c03a5d69d82cb2eaf95a4476a836ac102908f137662472c8d914b -a40b8cd8deb8ae503d20364d64cab7c2801b7728a9646ed19c65edea6a842756a2f636283494299584ad57f4bb12cd0b -8594e11d5fc2396bcd9dbf5509ce4816dbb2b7305168021c426171fb444d111da5a152d6835ad8034542277011c26c0e -8024de98c26b4c994a66628dc304bb737f4b6859c86ded552c5abb81fd4c6c2e19d5a30beed398a694b9b2fdea1dd06a -8843f5872f33f54df8d0e06166c1857d733995f67bc54abb8dfa94ad92407cf0179bc91b0a50bbb56cdc2b350d950329 -b8bab44c7dd53ef9edf497dcb228e2a41282c90f00ba052fc52d57e87b5c8ab132d227af1fcdff9a12713d1f980bcaae -982b4d7b29aff22d527fd82d2a52601d95549bfb000429bb20789ed45e5abf1f4b7416c7b7c4b79431eb3574b29be658 -8eb1f571b6a1878e11e8c1c757e0bc084bab5e82e897ca9be9b7f4b47b91679a8190bf0fc8f799d9b487da5442415857 -a6e74b588e5af935c8b243e888582ef7718f8714569dd4992920740227518305eb35fab674d21a5551cca44b3e511ef2 -a30fc2f3a4cb4f50566e82307de73cd7bd8fe2c1184e9293c136a9b9e926a018d57c6e4f308c95b9eb8299e94d90a2a1 -a50c5869ca5d2b40722c056a32f918d47e0b65ca9d7863ca7d2fb4a7b64fe523fe9365cf0573733ceaadebf20b48fff8 -83bbdd32c04d17581418cf360749c7a169b55d54f2427390defd9f751f100897b2d800ce6636c5bbc046c47508d60c8c -a82904bdf614de5d8deaff688c8a5e7ac5b3431687acbcda8fa53960b7c417a39c8b2e462d7af91ce6d79260f412db8e -a4362e31ff4b05d278b033cf5eebea20de01714ae16d4115d04c1da4754269873afc8171a6f56c5104bfd7b0db93c3e7 -b5b8daa63a3735581e74a021b684a1038cea77168fdb7fdf83c670c2cfabcfc3ab2fc7359069b5f9048188351aef26b5 -b48d723894b7782d96ac8433c48faca1bdfa5238019c451a7f47d958097cce3ae599b876cf274269236b9d6ff8b6d7ca -98ffff6a61a3a6205c7820a91ca2e7176fab5dba02bc194c4d14942ac421cb254183c705506ab279e4f8db066f941c6c -ae7db24731da2eaa6efc4f7fcba2ecc26940ddd68038dce43acf2cee15b72dc4ef42a7bfdd32946d1ed78786dd7696b3 -a656db14f1de9a7eb84f6301b4acb2fbf78bfe867f48a270e416c974ab92821eb4df1cb881b2d600cfed0034ac784641 -aa315f8ecba85a5535e9a49e558b15f39520fce5d4bf43131bfbf2e2c9dfccc829074f9083e8d49f405fb221d0bc4c3c -90bffba5d9ff40a62f6c8e9fc402d5b95f6077ed58d030c93e321b8081b77d6b8dac3f63a92a7ddc01585cf2c127d66c -abdd733a36e0e0f05a570d0504e73801bf9b5a25ff2c78786f8b805704997acb2e6069af342538c581144d53149fa6d3 -b4a723bb19e8c18a01bd449b1bb3440ddb2017f10bb153da27deb7a6a60e9bb37619d6d5435fbb1ba617687838e01dd0 -870016b4678bab3375516db0187a2108b2e840bae4d264b9f4f27dbbc7cc9cac1d7dc582d7a04d6fd1ed588238e5e513 -80d33d2e20e8fc170aa3cb4f69fffb72aeafb3b5bb4ea0bc79ab55da14142ca19b2d8b617a6b24d537366e3b49cb67c3 -a7ee76aec273aaae03b3b87015789289551969fb175c11557da3ab77e39ab49d24634726f92affae9f4d24003050d974 -8415ea4ab69d779ebd42d0fe0c6aef531d6a465a5739e429b1fcf433ec45aa8296c527e965a20f0ec9f340c9273ea3cf -8c7662520794e8b4405d0b33b5cac839784bc86a5868766c06cbc1fa306dbe334978177417b31baf90ce7b0052a29c56 -902b2abecc053a3dbdea9897ee21e74821f3a1b98b2d560a514a35799f4680322550fd3a728d4f6d64e1de98033c32b8 -a05e84ed9ecab8d508d670c39f2db61ad6e08d2795ec32a3c9d0d3737ef3801618f4fc2a95f90ec2f068606131e076c5 -8b9208ff4d5af0c2e3f53c9375da666773ac57197dfabb0d25b1c8d0588ba7f3c15ee9661bb001297f322ea2fbf6928b -a3c827741b34a03254d4451b5ab74a96f2b9f7fb069e2f5adaf54fd97cc7a4d516d378db5ca07da87d8566d6eef13726 -8509d8a3f4a0ed378e0a1e28ea02f6bf1d7f6c819c6c2f5297c7df54c895b848f841653e32ba2a2c22c2ff739571acb8 -a0ce988b7d3c40b4e496aa83a09e4b5472a2d98679622f32bea23e6d607bc7de1a5374fb162bce0549a67dad948519be -aa8a3dd12bd60e3d2e05f9c683cdcb8eab17fc59134815f8d197681b1bcf65108cba63ac5c58ee632b1e5ed6bba5d474 -8b955f1d894b3aefd883fb4b65f14cd37fc2b9db77db79273f1700bef9973bf3fd123897ea2b7989f50003733f8f7f21 -ac79c00ddac47f5daf8d9418d798d8af89fc6f1682e7e451f71ea3a405b0d36af35388dd2a332af790bc83ca7b819328 -a0d44dd2a4438b809522b130d0938c3fe7c5c46379365dbd1810a170a9aa5818e1c783470dd5d0b6d4ac7edbb7330910 -a30b69e39ad43dd540a43c521f05b51b5f1b9c4eed54b8162374ae11eac25da4f5756e7b70ce9f3c92c2eeceee7431ed -ac43220b762c299c7951222ea19761ab938bf38e4972deef58ed84f4f9c68c230647cf7506d7cbfc08562fcca55f0485 -b28233b46a8fb424cfa386a845a3b5399d8489ceb83c8f3e05c22c934798d639c93718b7b68ab3ce24c5358339e41cbb -ac30d50ee8ce59a10d4b37a3a35e62cdb2273e5e52232e202ca7d7b8d09d28958ee667fae41a7bb6cdc6fe8f6e6c9c85 -b199842d9141ad169f35cc7ff782b274cbaa645fdb727761e0a89edbf0d781a15f8218b4bf4eead326f2903dd88a9cc1 -85e018c7ddcad34bb8285a737c578bf741ccd547e68c734bdb3808380e12c5d4ef60fc896b497a87d443ff9abd063b38 -8c856e6ba4a815bdb891e1276f93545b7072f6cb1a9aa6aa5cf240976f29f4dee01878638500a6bf1daf677b96b54343 -b8a47555fa8710534150e1a3f13eab33666017be6b41005397afa647ea49708565f2b86b77ad4964d140d9ced6b4d585 -8cd1f1db1b2f4c85a3f46211599caf512d5439e2d8e184663d7d50166fd3008f0e9253272f898d81007988435f715881 -b1f34b14612c973a3eceb716dc102b82ab18afef9de7630172c2780776679a7706a4874e1df3eaadf541fb009731807f -b25464af9cff883b55be2ff8daf610052c02df9a5e147a2cf4df6ce63edcdee6dc535c533590084cc177da85c5dc0baa -91c3c4b658b42d8d3448ae1415d4541d02379a40dc51e36a59bd6e7b9ba3ea51533f480c7c6e8405250ee9b96a466c29 -86dc027b95deb74c36a58a1333a03e63cb5ae22d3b29d114cfd2271badb05268c9d0c819a977f5e0c6014b00c1512e3a -ae0e6ff58eb5fa35da5107ebeacf222ab8f52a22bb1e13504247c1dfa65320f40d97b0e6b201cb6613476687cb2f0681 -8f13415d960b9d7a1d93ef28afc2223e926639b63bdefce0f85e945dfc81670a55df288893a0d8b3abe13c5708f82f91 -956f67ca49ad27c1e3a68c1faad5e7baf0160c459094bf6b7baf36b112de935fdfd79fa4a9ea87ea8de0ac07272969f4 -835e45e4a67df9fb51b645d37840b3a15c171d571a10b03a406dd69d3c2f22df3aa9c5cbe1e73f8d767ce01c4914ea9a -919b938e56d4b32e2667469d0bdccb95d9dda3341aa907683ee70a14bbbe623035014511c261f4f59b318b610ac90aa3 -96b48182121ccd9d689bf1dfdc228175564cd68dc904a99c808a7f0053a6f636c9d953e12198bdf2ea49ea92772f2e18 -ac5e5a941d567fa38fdbcfa8cf7f85bb304e3401c52d88752bcd516d1fa9bac4572534ea2205e38423c1df065990790f -ac0bd594fb85a8d4fc26d6df0fa81f11919401f1ecf9168b891ec7f061a2d9368af99f7fd8d9b43b2ce361e7b8482159 -83d92c69ca540d298fe80d8162a1c7af3fa9b49dfb69e85c1d136a3ec39fe419c9fa78e0bb6d96878771fbd37fe92e40 -b35443ae8aa66c763c2db9273f908552fe458e96696b90e41dd509c17a5c04ee178e3490d9c6ba2dc0b8f793c433c134 -923b2d25aa45b2e580ffd94cbb37dc8110f340f0f011217ee1bd81afb0714c0b1d5fb4db86006cdd2457563276f59c59 -96c9125d38fca1a61ac21257b696f8ac3dae78def50285e44d90ea293d591d1c58f703540a7e4e99e070afe4646bbe15 -b57946b2332077fbcdcb406b811779aefd54473b5559a163cd65cb8310679b7e2028aa55c12a1401fdcfcac0e6fae29a -845daedc5cf972883835d7e13c937b63753c2200324a3b8082a6c4abb4be06c5f7c629d4abe4bfaf1d80a1f073eb6ce6 -91a55dfd0efefcd03dc6dacc64ec93b8d296cb83c0ee72400a36f27246e7f2a60e73b7b70ba65819e9cfb73edb7bd297 -8874606b93266455fe8fdd25df9f8d2994e927460af06f2e97dd4d2d90db1e6b06d441b72c2e76504d753badca87fb37 -8ee99e6d231274ff9252c0f4e84549da173041299ad1230929c3e3d32399731c4f20a502b4a307642cac9306ccd49d3c -8836497714a525118e20849d6933bb8535fb6f72b96337d49e3133d936999c90a398a740f42e772353b5f1c63581df6d -a6916945e10628f7497a6cdc5e2de113d25f7ade3e41e74d3de48ccd4fce9f2fa9ab69645275002e6f49399b798c40af -9597706983107eb23883e0812e1a2c58af7f3499d50c6e29b455946cb9812fde1aa323d9ed30d1c0ffd455abe32303cd -a24ee89f7f515cc33bdbdb822e7d5c1877d337f3b2162303cfc2dae028011c3a267c5cb4194afa63a4856a6e1c213448 -8cd25315e4318801c2776824ae6e7d543cb85ed3bc2498ba5752df2e8142b37653cf9e60104d674be3aeb0a66912e97a -b5085ecbe793180b40dbeb879f4c976eaaccaca3a5246807dced5890e0ed24d35f3f86955e2460e14fb44ff5081c07ba -960188cc0b4f908633a6840963a6fa2205fc42c511c6c309685234911c5304ef4c304e3ae9c9c69daa2fb6a73560c256 -a32d0a70bf15d569b4cda5aebe3e41e03c28bf99cdd34ffa6c5d58a097f322772acca904b3a47addb6c7492a7126ebac -977f72d06ad72d4aa4765e0f1f9f4a3231d9f030501f320fe7714cc5d329d08112789fa918c60dd7fdb5837d56bb7fc6 -99fa038bb0470d45852bb871620d8d88520adb701712fcb1f278fed2882722b9e729e6cdce44c82caafad95e37d0e6f7 -b855e8f4fc7634ada07e83b6c719a1e37acb06394bc8c7dcab7747a8c54e5df3943915f021364bd019fdea103864e55f -88bc2cd7458532e98c596ef59ea2cf640d7cc31b4c33cef9ed065c078d1d4eb49677a67de8e6229cc17ea48bace8ee5a -aaa78a3feaa836d944d987d813f9b9741afb076e6aca1ffa42682ab06d46d66e0c07b8f40b9dbd63e75e81efa1ef7b08 -b7b080420cc4d808723b98b2a5b7b59c81e624ab568ecdfdeb8bf3aa151a581b6f56e983ef1b6f909661e25db40b0c69 -abee85c462ac9a2c58e54f06c91b3e5cd8c5f9ab5b5deb602b53763c54826ed6deb0d6db315a8d7ad88733407e8d35e2 -994d075c1527407547590df53e9d72dd31f037c763848d1662eebd4cefec93a24328c986802efa80e038cb760a5300f5 -ab8777640116dfb6678e8c7d5b36d01265dfb16321abbfc277da71556a34bb3be04bc4ae90124ed9c55386d2bfb3bda0 -967e3a828bc59409144463bcf883a3a276b5f24bf3cbfdd7a42343348cba91e00b46ac285835a9b91eef171202974204 -875a9f0c4ffe5bb1d8da5e3c8e41d0397aa6248422a628bd60bfae536a651417d4e8a7d2fb98e13f2dad3680f7bd86d3 -acaa330c3e8f95d46b1880126572b238dbb6d04484d2cd4f257ab9642d8c9fc7b212188b9c7ac9e0fd135c520d46b1bf -aceb762edbb0f0c43dfcdb01ea7a1ac5918ca3882b1e7ebc4373521742f1ed5250d8966b498c00b2b0f4d13212e6dd0b -81d072b4ad258b3646f52f399bced97c613b22e7ad76373453d80b1650c0ca87edb291a041f8253b649b6e5429bb4cff -980a47d27416ac39c7c3a0ebe50c492f8c776ea1de44d5159ac7d889b6d554357f0a77f0e5d9d0ff41aae4369eba1fc2 -8b4dfd5ef5573db1476d5e43aacfb5941e45d6297794508f29c454fe50ea622e6f068b28b3debe8635cf6036007de2e3 -a60831559d6305839515b68f8c3bc7abbd8212cc4083502e19dd682d56ca37c9780fc3ce4ec2eae81ab23b221452dc57 -951f6b2c1848ced9e8a2339c65918e00d3d22d3e59a0a660b1eca667d18f8430d737884e9805865ef3ed0fe1638a22d9 -b02e38fe790b492aa5e89257c4986c9033a8b67010fa2add9787de857d53759170fdd67715ca658220b4e14b0ca48124 -a51007e4346060746e6b0e4797fc08ef17f04a34fe24f307f6b6817edbb8ce2b176f40771d4ae8a60d6152cbebe62653 -a510005b05c0b305075b27b243c9d64bcdce85146b6ed0e75a3178b5ff9608213f08c8c9246f2ca6035a0c3e31619860 -aaff4ef27a7a23be3419d22197e13676d6e3810ceb06a9e920d38125745dc68a930f1741c9c2d9d5c875968e30f34ab5 -864522a9af9857de9814e61383bebad1ba9a881696925a0ea6bfc6eff520d42c506bbe5685a9946ed710e889765be4a0 -b63258c080d13f3b7d5b9f3ca9929f8982a6960bdb1b0f8676f4dca823971601672f15e653917bf5d3746bb220504913 -b51ce0cb10869121ae310c7159ee1f3e3a9f8ad498827f72c3d56864808c1f21fa2881788f19ece884d3f705cd7bd0c5 -95d9cecfc018c6ed510e441cf84c712d9909c778c16734706c93222257f64dcd2a9f1bd0b400ca271e22c9c487014274 -8beff4d7d0140b86380ff4842a9bda94c2d2be638e20ac68a4912cb47dbe01a261857536375208040c0554929ced1ddc -891ff49258749e2b57c1e9b8e04b12c77d79c3308b1fb615a081f2aacdfb4b39e32d53e069ed136fdbd43c53b87418fa -9625cad224e163d387738825982d1e40eeff35fe816d10d7541d15fdc4d3eee48009090f3faef4024b249205b0b28f72 -8f3947433d9bd01aa335895484b540a9025a19481a1c40b4f72dd676bfcf332713714fd4010bde936eaf9470fd239ed0 -a00ec2d67789a7054b53f0e858a8a232706ccc29a9f3e389df7455f1a51a2e75801fd78469a13dbc25d28399ae4c6182 -a3f65884506d4a62b8775a0ea0e3d78f5f46bc07910a93cd604022154eabdf1d73591e304d61edc869e91462951975e1 -a14eef4fd5dfac311713f0faa9a60415e3d30b95a4590cbf95f2033dffb4d16c02e7ceff3dcd42148a4e3bc49cce2dd4 -8afa11c0eef3c540e1e3460bc759bb2b6ea90743623f88e62950c94e370fe4fd01c22b6729beba4dcd4d581198d9358f -afb05548a69f0845ffcc5f5dc63e3cdb93cd270f5655173b9a950394b0583663f2b7164ba6df8d60c2e775c1d9f120af -97f179e01a947a906e1cbeafa083960bc9f1bade45742a3afee488dfb6011c1c6e2db09a355d77f5228a42ccaa7bdf8e -8447fca4d35f74b3efcbd96774f41874ca376bf85b79b6e66c92fa3f14bdd6e743a051f12a7fbfd87f319d1c6a5ce217 -a57ca39c23617cd2cf32ff93b02161bd7baf52c4effb4679d9d5166406e103bc8f3c6b5209e17c37dbb02deb8bc72ddd -9667c7300ff80f0140be002b0e36caab07aaee7cce72679197c64d355e20d96196acaf54e06e1382167d081fe6f739c1 -828126bb0559ce748809b622677267ca896fa2ee76360fd2c02990e6477e06a667241379ca7e65d61a5b64b96d7867de -8b8835dea6ba8cf61c91f01a4b3d2f8150b687a4ee09b45f2e5fc8f80f208ae5d142d8e3a18153f0722b90214e60c5a7 -a98e8ff02049b4da386e3ee93db23bbb13dfeb72f1cfde72587c7e6d962780b7671c63e8ac3fbaeb1a6605e8d79e2f29 -87a4892a0026d7e39ef3af632172b88337cb03669dea564bcdb70653b52d744730ebb5d642e20cb627acc9dbb547a26b -877352a22fc8052878a57effc159dac4d75fe08c84d3d5324c0bab6d564cdf868f33ceee515eee747e5856b62cfa0cc7 -8b801ba8e2ff019ee62f64b8cb8a5f601fc35423eb0f9494b401050103e1307dc584e4e4b21249cd2c686e32475e96c3 -a9e7338d6d4d9bfec91b2af28a8ed13b09415f57a3a00e5e777c93d768fdb3f8e4456ae48a2c6626b264226e911a0e28 -99c05fedf40ac4726ed585d7c1544c6e79619a0d3fb6bda75a08c7f3c0008e8d5e19ed4da48de3216135f34a15eba17c -a61cce8a1a8b13a4a650fdbec0eeea8297c352a8238fb7cac95a0df18ed16ee02a3daa2de108fa122aca733bd8ad7855 -b97f37da9005b440b4cb05870dd881bf8491fe735844f2d5c8281818583b38e02286e653d9f2e7fa5e74c3c3eb616540 -a72164a8554da8e103f692ac5ebb4aece55d5194302b9f74b6f2a05335b6e39beede0bf7bf8c5bfd4d324a784c5fb08c -b87e8221c5341cd9cc8bb99c10fe730bc105550f25ed4b96c0d45e6142193a1b2e72f1b3857373a659b8c09be17b3d91 -a41fb1f327ef91dcb7ac0787918376584890dd9a9675c297c45796e32d6e5985b12f9b80be47fc3a8596c245f419d395 -90dafa3592bdbb3465c92e2a54c2531822ba0459d45d3e7a7092fa6b823f55af28357cb51896d4ec2d66029c82f08e26 -a0a9adc872ebc396557f484f1dd21954d4f4a21c4aa5eec543f5fa386fe590839735c01f236574f7ff95407cd12de103 -b8c5c940d58be7538acf8672852b5da3af34f82405ef2ce8e4c923f1362f97fc50921568d0fd2fe846edfb0823e62979 -85aaf06a8b2d0dac89dafd00c28533f35dbd074978c2aaa5bef75db44a7b12aeb222e724f395513b9a535809a275e30b -81f3cbe82fbc7028c26a6c1808c604c63ba023a30c9f78a4c581340008dbda5ec07497ee849a2183fcd9124f7936af32 -a11ac738de75fd60f15a34209d3825d5e23385796a4c7fc5931822f3f380af977dd0f7b59fbd58eed7777a071e21b680 -85a279c493de03db6fa6c3e3c1b1b29adc9a8c4effc12400ae1128da8421954fa8b75ad19e5388fe4543b76fb0812813 -83a217b395d59ab20db6c4adb1e9713fc9267f5f31a6c936042fe051ce8b541f579442f3dcf0fa16b9e6de9fd3518191 -83a0b86e7d4ed8f9ccdc6dfc8ff1484509a6378fa6f09ed908e6ab9d1073f03011dc497e14304e4e3d181b57de06a5ab -a63ad69c9d25704ce1cc8e74f67818e5ed985f8f851afa8412248b2df5f833f83b95b27180e9e7273833ed0d07113d3b -99b1bc2021e63b561fe44ddd0af81fcc8627a91bfeecbbc989b642bc859abc0c8d636399701aad7bbaf6a385d5f27d61 -b53434adb66f4a807a6ad917c6e856321753e559b1add70824e5c1e88191bf6993fccb9b8b911fc0f473fb11743acacd -97ed3b9e6fb99bf5f945d4a41f198161294866aa23f2327818cdd55cb5dc4c1a8eff29dd8b8d04902d6cd43a71835c82 -b1e808260e368a18d9d10bdea5d60223ba1713b948c782285a27a99ae50cc5fc2c53d407de07155ecc16fb8a36d744a0 -a3eb4665f18f71833fec43802730e56b3ee5a357ea30a888ad482725b169d6f1f6ade6e208ee081b2e2633079b82ba7d -ab8beb2c8353fc9f571c18fdd02bdb977fc883313469e1277b0372fbbb33b80dcff354ca41de436d98d2ed710faa467e -aa9071cfa971e4a335a91ad634c98f2be51544cb21f040f2471d01bb97e1df2277ae1646e1ea8f55b7ba9f5c8c599b39 -80b7dbfdcaf40f0678012acc634eba44ea51181475180d9deb2050dc4f2de395289edd0223018c81057ec79b04b04c49 -89623d7f6cb17aa877af14de842c2d4ab7fd576d61ddd7518b5878620a01ded40b6010de0da3cdf31d837eecf30e9847 -a773bb024ae74dd24761f266d4fb27d6fd366a8634febe8235376b1ae9065c2fe12c769f1d0407867dfbe9f5272c352f -8455a561c3aaa6ba64c881a5e13921c592b3a02e968f4fb24a2243c36202795d0366d9cc1a24e916f84d6e158b7aeac7 -81d8bfc4b283cf702a40b87a2b96b275bdbf0def17e67d04842598610b67ea08c804d400c3e69fa09ea001eaf345b276 -b8f8f82cb11fea1c99467013d7e167ff03deb0c65a677fab76ded58826d1ba29aa7cf9fcd7763615735ea3ad38e28719 -89a6a04baf9cccc1db55179e1650b1a195dd91fb0aebc197a25143f0f393524d2589975e3fbfc2547126f0bced7fd6f2 -b81b2162df045390f04df07cbd0962e6b6ca94275a63edded58001a2f28b2ae2af2c7a6cba4ecd753869684e77e7e799 -a3757f722776e50de45c62d9c4a2ee0f5655a512344c4cbec542d8045332806568dd626a719ef21a4eb06792ca70f204 -8c5590df96ec22179a4e8786de41beb44f987a1dcc508eb341eecbc0b39236fdfad47f108f852e87179ccf4e10091e59 -87502f026ed4e10167419130b88c3737635c5b9074c364e1dd247cef5ef0fc064b4ae99b187e33301e438bbd2fe7d032 -af925a2165e980ced620ff12289129fe17670a90ae0f4db9d4b39bd887ccb1f5d2514ac9ecf910f6390a8fc66bd5be17 -857fca899828cf5c65d26e3e8a6e658542782fc72762b3b9c73514919f83259e0f849a9d4838b40dc905fe43024d0d23 -87ffebdbfb69a9e1007ebac4ffcb4090ff13705967b73937063719aa97908986effcb7262fdadc1ae0f95c3690e3245d -a9ff6c347ac6f4c6ab993b748802e96982eaf489dc69032269568412fc9a79e7c2850dfc991b28211b3522ee4454344b -a65b3159df4ec48bebb67cb3663cd744027ad98d970d620e05bf6c48f230fa45bf17527fe726fdf705419bb7a1bb913e -84b97b1e6408b6791831997b03cd91f027e7660fd492a93d95daafe61f02427371c0e237c75706412f442991dfdff989 -ab761c26527439b209af0ae6afccd9340bbed5fbe098734c3145b76c5d2cd7115d9227b2eb523882b7317fbb09180498 -a0479a8da06d7a69c0b0fee60df4e691c19c551f5e7da286dab430bfbcabf31726508e20d26ea48c53365a7f00a3ad34 -a732dfc9baa0f4f40b5756d2e8d8937742999623477458e0bc81431a7b633eefc6f53b3b7939fe0a020018549c954054 -901502436a1169ba51dc479a5abe7c8d84e0943b16bc3c6a627b49b92cd46263c0005bc324c67509edd693f28e612af1 -b627aee83474e7f84d1bab9b7f6b605e33b26297ac6bbf52d110d38ba10749032bd551641e73a383a303882367af429b -95108866745760baef4a46ef56f82da6de7e81c58b10126ebd2ba2cd13d339f91303bf2fb4dd104a6956aa3b13739503 -899ed2ade37236cec90056f3569bc50f984f2247792defafcceb49ad0ca5f6f8a2f06573705300e07f0de0c759289ff5 -a9f5eee196d608efe4bcef9bf71c646d27feb615e21252cf839a44a49fd89da8d26a758419e0085a05b1d59600e2dc42 -b36c6f68fed6e6c85f1f4a162485f24817f2843ec5cbee45a1ebfa367d44892e464949c6669f7972dc7167af08d55d25 -aaaede243a9a1b6162afbc8f571a52671a5a4519b4062e3f26777664e245ba873ed13b0492c5dbf0258c788c397a0e9e -972b4fb39c31cbe127bf9a32a5cc10d621ebdd9411df5e5da3d457f03b2ab2cd1f6372d8284a4a9400f0b06ecdbfd38e -8f6ca1e110e959a4b1d9a5ce5f212893cec21db40d64d5ac4d524f352d72198f923416a850bf845bc5a22a79c0ea2619 -a0f3c93b22134f66f04b2553a53b738644d1665ceb196b8494b315a4c28236fb492017e4a0de4224827c78e42f9908b7 -807fb5ee74f6c8735b0b5ca07e28506214fe4047dbeb00045d7c24f7849e98706aea79771241224939cb749cf1366c7d -915eb1ff034224c0b645442cdb7d669303fdc00ca464f91aaf0b6fde0b220a3a74ff0cb043c26c9f3a5667b3fdaa9420 -8fda6cef56ed33fefffa9e6ac8e6f76b1af379f89761945c63dd448801f7bb8ca970504a7105fac2f74f652ccff32327 -87380cffdcffb1d0820fa36b63cc081e72187f86d487315177d4d04da4533eb19a0e2ff6115ceab528887819c44a5164 -8cd89e03411a18e7f16f968b89fb500c36d47d229f6487b99e62403a980058db5925ce249206743333538adfad168330 -974451b1df33522ce7056de9f03e10c70bf302c44b0741a59df3d6877d53d61a7394dcee1dd46e013d7cb9d73419c092 -98c35ddf645940260c490f384a49496a7352bb8e3f686feed815b1d38f59ded17b1ad6e84a209e773ed08f7b8ff1e4c2 -963f386cf944bb9b2ddebb97171b64253ea0a2894ac40049bdd86cda392292315f3a3d490ca5d9628c890cfb669f0acb -8d507712152babd6d142ee682638da8495a6f3838136088df9424ef50d5ec28d815a198c9a4963610b22e49b4cdf95e9 -83d4bc6b0be87c8a4f1e9c53f257719de0c73d85b490a41f7420e777311640937320557ff2f1d9bafd1daaa54f932356 -82f5381c965b7a0718441131c4d13999f4cdce637698989a17ed97c8ea2e5bdb5d07719c5f7be8688edb081b23ede0f4 -a6ebecab0b72a49dfd01d69fa37a7f74d34fb1d4fef0aa10e3d6fceb9eccd671225c230af89f6eb514250e41a5f91f52 -846d185bdad6e11e604df7f753b7a08a28b643674221f0e750ebdb6b86ec584a29c869e131bca868972a507e61403f6a -85a98332292acb744bd1c0fd6fdcf1f889a78a2c9624d79413ffa194cc8dfa7821a4b60cde8081d4b5f71f51168dd67f -8f7d97c3b4597880d73200d074eb813d95432306e82dafc70b580b8e08cb8098b70f2d07b4b3ac6a4d77e92d57035031 -8185439c8751e595825d7053518cbe121f191846a38d4dbcb558c3f9d7a3104f3153401adaaaf27843bbe2edb504bfe3 -b3c00d8ece1518fca6b1215a139b0a0e26d9cba1b3a424f7ee59f30ce800a5db967279ed60958dd1f3ee69cf4dd1b204 -a2e6cb6978e883f9719c3c0d44cfe8de0cc6f644b98f98858433bea8bbe7b612c8aca5952fccce4f195f9d54f9722dc2 -99663087e3d5000abbec0fbda4e7342ec38846cc6a1505191fb3f1a337cb369455b7f8531a6eb8b0f7b2c4baf83cbe2b -ab0836c6377a4dbc7ca6a4d6cf021d4cd60013877314dd05f351706b128d4af6337711ed3443cb6ca976f40d74070a9a -87abfd5126152fd3bac3c56230579b489436755ea89e0566aa349490b36a5d7b85028e9fb0710907042bcde6a6f5d7e3 -974ba1033f75f60e0cf7c718a57ae1da3721cf9d0fb925714c46f027632bdd84cd9e6de4cf4d00bc55465b1c5ebb7384 -a607b49d73689ac64f25cec71221d30d53e781e1100d19a2114a21da6507a60166166369d860bd314acb226596525670 -a7c2b0b915d7beba94954f2aa7dd08ec075813661e2a3ecca5d28a0733e59583247fed9528eb28aba55b972cdbaf06eb -b8b3123e44128cc8efbe3270f2f94e50ca214a4294c71c3b851f8cbb70cb67fe9536cf07d04bf7fe380e5e3a29dd3c15 -a59a07e343b62ad6445a0859a32b58c21a593f9ddbfe52049650f59628c93715aa1f4e1f45b109321756d0eeec8a5429 -94f51f8a4ed18a6030d0aaa8899056744bd0e9dc9ac68f62b00355cddab11da5da16798db75f0bfbce0e5bdfe750c0b6 -97460a97ca1e1fa5ce243b81425edc0ec19b7448e93f0b55bc9785eedeeafe194a3c8b33a61a5c72990edf375f122777 -8fa859a089bc17d698a7ee381f37ce9beadf4e5b44fce5f6f29762bc04f96faff5d58c48c73631290325f05e9a1ecf49 -abdf38f3b20fc95eff31de5aa9ef1031abfa48f1305ee57e4d507594570401503476d3bcc493838fc24d6967a3082c7f -b8914bfb82815abb86da35c64d39ab838581bc0bf08967192697d9663877825f2b9d6fbdcf9b410463482b3731361aef -a8187f9d22b193a5f578999954d6ec9aa9b32338ccadb8a3e1ce5bad5ea361d69016e1cdfac44e9d6c54e49dd88561b9 -aac262cb7cba7fd62c14daa7b39677cabc1ef0947dd06dd89cac8570006a200f90d5f0353e84f5ff03179e3bebe14231 -a630ef5ece9733b8c46c0a2df14a0f37647a85e69c63148e79ffdcc145707053f9f9d305c3f1cf3c7915cb46d33abd07 -b102c237cb2e254588b6d53350dfda6901bd99493a3fbddb4121d45e0b475cf2663a40d7b9a75325eda83e4ba1e68cb3 -86a930dd1ddcc16d1dfa00aa292cb6c2607d42c367e470aa920964b7c17ab6232a7108d1c2c11fc40fb7496547d0bbf8 -a832fdc4500683e72a96cce61e62ac9ee812c37fe03527ad4cf893915ca1962cee80e72d4f82b20c8fc0b764376635a1 -88ad985f448dabb04f8808efd90f273f11f5e6d0468b5489a1a6a3d77de342992a73eb842d419034968d733f101ff683 -98a8538145f0d86f7fbf9a81c9140f6095c5bdd8960b1c6f3a1716428cd9cca1bf8322e6d0af24e6169abcf7df2b0ff6 -9048c6eba5e062519011e177e955a200b2c00b3a0b8615bdecdebc217559d41058d3315f6d05617be531ef0f6aef0e51 -833bf225ab6fc68cdcacf1ec1b50f9d05f5410e6cdcd8d56a3081dc2be8a8d07b81534d1ec93a25c2e270313dfb99e3b -a84bcd24c3da5e537e64a811b93c91bfc84d7729b9ead7f79078989a6eb76717d620c1fad17466a0519208651e92f5ff -b7cdd0a3fbd79aed93e1b5a44ca44a94e7af5ed911e4492f332e3a5ed146c7286bde01b52276a2fcc02780d2109874dd -8a19a09854e627cb95750d83c20c67442b66b35896a476358f993ba9ac114d32c59c1b3d0b8787ee3224cf3888b56c64 -a9abd5afb8659ee52ada8fa5d57e7dd355f0a7350276f6160bec5fbf70d5f99234dd179eb221c913e22a49ec6d267846 -8c13c4274c0d30d184e73eaf812200094bbbd57293780bdadbceb262e34dee5b453991e7f37c7333a654fc71c69d6445 -a4320d73296ff8176ce0127ca1921c450e2a9c06eff936681ebaffb5a0b05b17fded24e548454de89aca2dcf6d7a9de4 -b2b8b3e15c1f645f07783e5628aba614e60157889db41d8161d977606788842b67f83f361eae91815dc0abd84e09abd5 -ad26c3aa35ddfddc15719b8bb6c264aaec7065e88ac29ba820eb61f220fef451609a7bb037f3722d022e6c86e4f1dc88 -b8615bf43e13ae5d7b8dd903ce37190800cd490f441c09b22aa29d7a29ed2c0417b7a08ead417868f1de2589deaadd80 -8d3425e1482cd1e76750a76239d33c06b3554c3c3c87c15cb7ab58b1cee86a4c5c4178b44e23f36928365a1b484bde02 -806893a62e38c941a7dd6f249c83af16596f69877cc737d8f73f6b8cd93cbc01177a7a276b2b8c6b0e5f2ad864db5994 -86618f17fa4b0d65496b661bbb5ba3bc3a87129d30a4b7d4f515b904f4206ca5253a41f49fd52095861e5e065ec54f21 -9551915da1304051e55717f4c31db761dcdcf3a1366c89a4af800a9e99aca93a357bf928307f098e62b44a02cb689a46 -8f79c4ec0ec1146cb2a523b52fe33def90d7b5652a0cb9c2d1c8808a32293e00aec6969f5b1538e3a94cd1efa3937f86 -a0c03e329a707300081780f1e310671315b4c6a4cedcb29697aedfabb07a9d5df83f27b20e9c44cf6b16e39d9ded5b98 -86a7cfa7c8e7ce2c01dd0baec2139e97e8e090ad4e7b5f51518f83d564765003c65968f85481bbb97cb18f005ccc7d9f -a33811770c6dfda3f7f74e6ad0107a187fe622d61b444bbd84fd7ef6e03302e693b093df76f6ab39bb4e02afd84a575a -85480f5c10d4162a8e6702b5e04f801874d572a62a130be94b0c02b58c3c59bdcd48cd05f0a1c2839f88f06b6e3cd337 -8e181011564b17f7d787fe0e7f3c87f6b62da9083c54c74fd6c357a1f464c123c1d3d8ade3cf72475000b464b14e2be3 -8ee178937294b8c991337e0621ab37e9ffa4ca2bdb3284065c5e9c08aad6785d50cf156270ff9daf9a9127289710f55b -8bd1e8e2d37379d4b172f1aec96f2e41a6e1393158d7a3dbd9a95c8dd4f8e0b05336a42efc11a732e5f22b47fc5c271d -8f3da353cd487c13136a85677de8cedf306faae0edec733cf4f0046f82fa4639db4745b0095ff33a9766aba50de0cbcf -8d187c1e97638df0e4792b78e8c23967dac43d98ea268ca4aabea4e0fa06cb93183fd92d4c9df74118d7cc27bf54415e -a4c992f08c2f8bac0b74b3702fb0c75c9838d2ce90b28812019553d47613c14d8ce514d15443159d700b218c5a312c49 -a6fd1874034a34c3ea962a316c018d9493d2b3719bb0ec4edbc7c56b240802b2228ab49bee6f04c8a3e9f6f24a48c1c2 -b2efed8e799f8a15999020900dc2c58ece5a3641c90811b86a5198e593d7318b9d53b167818ccdfbe7df2414c9c34011 -995ff7de6181ddf95e3ead746089c6148da3508e4e7a2323c81785718b754d356789b902e7e78e2edc6b0cbd4ff22c78 -944073d24750a9068cbd020b834afc72d2dde87efac04482b3287b40678ad07588519a4176b10f2172a2c463d063a5cd -99db4b1bb76475a6fd75289986ef40367960279524378cc917525fb6ba02a145a218c1e9caeb99332332ab486a125ac0 -89fce4ecd420f8e477af4353b16faabb39e063f3f3c98fde2858b1f2d1ef6eed46f0975a7c08f233b97899bf60ccd60a -8c09a4f07a02b80654798bc63aada39fd638d3e3c4236ccd8a5ca280350c31e4a89e5f4c9aafb34116e71da18c1226b8 -85325cfa7ded346cc51a2894257eab56e7488dbff504f10f99f4cd2b630d913003761a50f175ed167e8073f1b6b63fb0 -b678b4fbec09a8cc794dcbca185f133578f29e354e99c05f6d07ac323be20aecb11f781d12898168e86f2e0f09aca15e -a249cfcbca4d9ba0a13b5f6aac72bf9b899adf582f9746bb2ad043742b28915607467eb794fca3704278f9136f7642be -9438e036c836a990c5e17af3d78367a75b23c37f807228362b4d13e3ddcb9e431348a7b552d09d11a2e9680704a4514f -925ab70450af28c21a488bfb5d38ac994f784cf249d7fd9ad251bb7fd897a23e23d2528308c03415074d43330dc37ef4 -a290563904d5a8c0058fc8330120365bdd2ba1fdbaef7a14bc65d4961bb4217acfaed11ab82669e359531f8bf589b8db -a7e07a7801b871fc9b981a71e195a3b4ba6b6313bc132b04796a125157e78fe5c11a3a46cf731a255ac2d78a4ae78cd0 -b26cd2501ee72718b0eebab6fb24d955a71f363f36e0f6dff0ab1d2d7836dab88474c0cef43a2cc32701fca7e82f7df3 -a1dc3b6c968f3de00f11275092290afab65b2200afbcfa8ddc70e751fa19dbbc300445d6d479a81bda3880729007e496 -a9bc213e28b630889476a095947d323b9ac6461dea726f2dc9084473ae8e196d66fb792a21905ad4ec52a6d757863e7d -b25d178df8c2df8051e7c888e9fa677fde5922e602a95e966db9e4a3d6b23ce043d7dc48a5b375c6b7c78e966893e8c3 -a1c8d88d72303692eaa7adf68ea41de4febec40cc14ae551bb4012afd786d7b6444a3196b5d9d5040655a3366d96b7cd -b22bd44f9235a47118a9bbe2ba5a2ba9ec62476061be2e8e57806c1a17a02f9a51403e849e2e589520b759abd0117683 -b8add766050c0d69fe81d8d9ea73e1ed05f0135d093ff01debd7247e42dbb86ad950aceb3b50b9af6cdc14ab443b238f -af2cf95f30ef478f018cf81d70d47d742120b09193d8bb77f0d41a5d2e1a80bfb467793d9e2471b4e0ad0cb2c3b42271 -8af5ef2107ad284e246bb56e20fef2a255954f72de791cbdfd3be09f825298d8466064f3c98a50496c7277af32b5c0bc -85dc19558572844c2849e729395a0c125096476388bd1b14fa7f54a7c38008fc93e578da3aac6a52ff1504d6ca82db05 -ae8c9b43c49572e2e166d704caf5b4b621a3b47827bb2a3bcd71cdc599bba90396fd9a405261b13e831bb5d44c0827d7 -a7ba7efede25f02e88f6f4cbf70643e76784a03d97e0fbd5d9437c2485283ad7ca3abb638a5f826cd9f6193e5dec0b6c -94a9d122f2f06ef709fd8016fd4b712d88052245a65a301f5f177ce22992f74ad05552b1f1af4e70d1eac62cef309752 -82d999b3e7cf563833b8bc028ff63a6b26eb357dfdb3fd5f10e33a1f80a9b2cfa7814d871b32a7ebfbaa09e753e37c02 -aec6edcde234df502a3268dd2c26f4a36a2e0db730afa83173f9c78fcb2b2f75510a02b80194327b792811caefda2725 -94c0bfa66c9f91d462e9194144fdd12d96f9bbe745737e73bab8130607ee6ea9d740e2cfcbbd00a195746edb6369ee61 -ab7573dab8c9d46d339e3f491cb2826cabe8b49f85f1ede78d845fc3995537d1b4ab85140b7d0238d9c24daf0e5e2a7e -87e8b16832843251fe952dadfd01d41890ed4bb4b8fa0254550d92c8cced44368225eca83a6c3ad47a7f81ff8a80c984 -9189d2d9a7c64791b19c0773ad4f0564ce6bea94aa275a917f78ad987f150fdb3e5e26e7fef9982ac184897ecc04683f -b3661bf19e2da41415396ae4dd051a9272e8a2580b06f1a1118f57b901fa237616a9f8075af1129af4eabfefedbe2f1c -af43c86661fb15daf5d910a4e06837225e100fb5680bd3e4b10f79a2144c6ec48b1f8d6e6b98e067d36609a5d038889a -82ac0c7acaa83ddc86c5b4249aae12f28155989c7c6b91e5137a4ce05113c6cbc16f6c44948b0efd8665362d3162f16a -8f268d1195ab465beeeb112cd7ffd5d5548559a8bc01261106d3555533fc1971081b25558d884d552df0db1cddda89d8 -8ef7caa5521f3e037586ce8ac872a4182ee20c7921c0065ed9986c047e3dda08294da1165f385d008b40d500f07d895f -8c2f98f6880550573fad46075d3eba26634b5b025ce25a0b4d6e0193352c8a1f0661064027a70fe8190b522405f9f4e3 -b7653f353564feb164f0f89ec7949da475b8dad4a4d396d252fc2a884f6932d027b7eb2dc4d280702c74569319ed701a -a026904f4066333befd9b87a8fad791d014096af60cdd668ef919c24dbe295ff31f7a790e1e721ba40cf5105abca67f4 -988f982004ada07a22dd345f2412a228d7a96b9cae2c487de42e392afe1e35c2655f829ce07a14629148ce7079a1f142 -9616add009067ed135295fb74d5b223b006b312bf14663e547a0d306694ff3a8a7bb9cfc466986707192a26c0bce599f -ad4c425de9855f6968a17ee9ae5b15e0a5b596411388cf976df62ecc6c847a6e2ddb2cea792a5f6e9113c2445dba3e5c -b698ac9d86afa3dc69ff8375061f88e3b0cff92ff6dfe747cebaf142e813c011851e7a2830c10993b715e7fd594604a9 -a386fa189847bb3b798efca917461e38ead61a08b101948def0f82cd258b945ed4d45b53774b400af500670149e601b7 -905c95abda2c68a6559d8a39b6db081c68cef1e1b4be63498004e1b2f408409be9350b5b5d86a30fd443e2b3e445640a -9116dade969e7ce8954afcdd43e5cab64dc15f6c1b8da9d2d69de3f02ba79e6c4f6c7f54d6bf586d30256ae405cd1e41 -a3084d173eacd08c9b5084a196719b57e47a0179826fda73466758235d7ecdb87cbcf097bd6b510517d163a85a7c7edd -85bb00415ad3c9be99ff9ba83672cc59fdd24356b661ab93713a3c8eab34e125d8867f628a3c3891b8dc056e69cd0e83 -8d58541f9f39ed2ee4478acce5d58d124031338ec11b0d55551f00a5a9a6351faa903a5d7c132dc5e4bb026e9cbd18e4 -a622adf72dc250e54f672e14e128c700166168dbe0474cecb340da175346e89917c400677b1bc1c11fcc4cc26591d9db -b3f865014754b688ca8372e8448114fff87bf3ca99856ab9168894d0c4679782c1ced703f5b74e851b370630f5e6ee86 -a7e490b2c40c2446fcd91861c020da9742c326a81180e38110558bb5d9f2341f1c1885e79b364e6419023d1cbdc47380 -b3748d472b1062e54572badbb8e87ac36534407f74932e7fc5b8392d008e8e89758f1671d1e4d30ab0fa40551b13bb5e -89898a5c5ec4313aabc607b0049fd1ebad0e0c074920cf503c9275b564d91916c2c446d3096491c950b7af3ac5e4b0ed -8eb8c83fef2c9dd30ea44e286e9599ec5c20aba983f702e5438afe2e5b921884327ad8d1566c72395587efac79ca7d56 -b92479599e806516ce21fb0bd422a1d1d925335ebe2b4a0a7e044dd275f30985a72b97292477053ac5f00e081430da80 -a34ae450a324fe8a3c25a4d653a654f9580ed56bbea213b8096987bbad0f5701d809a17076435e18017fea4d69f414bc -81381afe6433d62faf62ea488f39675e0091835892ecc238e02acf1662669c6d3962a71a3db652f6fe3bc5f42a0e5dc5 -a430d475bf8580c59111103316fe1aa79c523ea12f1d47a976bbfae76894717c20220e31cf259f08e84a693da6688d70 -b842814c359754ece614deb7d184d679d05d16f18a14b288a401cef5dad2cf0d5ee90bad487b80923fc5573779d4e4e8 -971d9a2627ff2a6d0dcf2af3d895dfbafca28b1c09610c466e4e2bff2746f8369de7f40d65b70aed135fe1d72564aa88 -8f4ce1c59e22b1ce7a0664caaa7e53735b154cfba8d2c5cc4159f2385843de82ab58ed901be876c6f7fce69cb4130950 -86cc9dc321b6264297987000d344fa297ef45bcc2a4df04e458fe2d907ad304c0ea2318e32c3179af639a9a56f3263cf -8229e0876dfe8f665c3fb19b250bd89d40f039bbf1b331468b403655be7be2e104c2fd07b9983580c742d5462ca39a43 -99299d73066e8eb128f698e56a9f8506dfe4bd014931e86b6b487d6195d2198c6c5bf15cccb40ccf1f8ddb57e9da44a2 -a3a3be37ac554c574b393b2f33d0a32a116c1a7cfeaf88c54299a4da2267149a5ecca71f94e6c0ef6e2f472b802f5189 -a91700d1a00387502cdba98c90f75fbc4066fefe7cc221c8f0e660994c936badd7d2695893fde2260c8c11d5bdcdd951 -8e03cae725b7f9562c5c5ab6361644b976a68bada3d7ca508abca8dfc80a469975689af1fba1abcf21bc2a190dab397d -b01461ad23b2a8fa8a6d241e1675855d23bc977dbf4714add8c4b4b7469ccf2375cec20e80cedfe49361d1a30414ac5b -a2673bf9bc621e3892c3d7dd4f1a9497f369add8cbaa3472409f4f86bd21ac67cfac357604828adfee6ada1835365029 -a042dff4bf0dfc33c178ba1b335e798e6308915128de91b12e5dbbab7c4ac8d60a01f6aea028c3a6d87b9b01e4e74c01 -86339e8a75293e4b3ae66b5630d375736b6e6b6b05c5cda5e73fbf7b2f2bd34c18a1d6cefede08625ce3046e77905cb8 -af2ebe1b7d073d03e3d98bc61af83bf26f7a8c130fd607aa92b75db22d14d016481b8aa231e2c9757695f55b7224a27f -a00ee882c9685e978041fd74a2c465f06e2a42ffd3db659053519925be5b454d6f401e3c12c746e49d910e4c5c9c5e8c -978a781c0e4e264e0dad57e438f1097d447d891a1e2aa0d5928f79a9d5c3faae6f258bc94fdc530b7b2fa6a9932bb193 -aa4b7ce2e0c2c9e9655bf21e3e5651c8503bce27483017b0bf476be743ba06db10228b3a4c721219c0779747f11ca282 -b003d1c459dacbcf1a715551311e45d7dbca83a185a65748ac74d1800bbeaba37765d9f5a1a221805c571910b34ebca8 -95b6e531b38648049f0d19de09b881baa1f7ea3b2130816b006ad5703901a05da57467d1a3d9d2e7c73fb3f2e409363c -a6cf9c06593432d8eba23a4f131bb7f72b9bd51ab6b4b772a749fe03ed72b5ced835a349c6d9920dba2a39669cb7c684 -aa3d59f6e2e96fbb66195bc58c8704e139fa76cd15e4d61035470bd6e305db9f98bcbf61ac1b95e95b69ba330454c1b3 -b57f97959c208361de6d7e86dff2b873068adb0f158066e646f42ae90e650079798f165b5cd713141cd3a2a90a961d9a -a76ee8ed9052f6a7a8c69774bb2597be182942f08115baba03bf8faaeaee526feba86120039fe8ca7b9354c3b6e0a8e6 -95689d78c867724823f564627d22d25010f278674c6d2d0cdb10329169a47580818995d1d727ce46c38a1e47943ebb89 -ab676d2256c6288a88e044b3d9ffd43eb9d5aaee00e8fc60ac921395fb835044c71a26ca948e557fed770f52d711e057 -96351c72785c32e5d004b6f4a1259fb8153d631f0c93fed172f18e8ba438fbc5585c1618deeabd0d6d0b82173c2e6170 -93dd8d3db576418e22536eba45ab7f56967c6c97c64260d6cddf38fb19c88f2ec5cd0e0156f50e70855eee8a2b879ffd -ad6ff16f40f6de3d7a737f8e6cebd8416920c4ff89dbdcd75eabab414af9a6087f83ceb9aff7680aa86bff98bd09c8cc -84de53b11671abc9c38710e19540c5c403817562aeb22a88404cdaff792c1180f717dbdfe8f54940c062c4d032897429 -872231b9efa1cdd447b312099a5c164c560440a9441d904e70f5abfc3b2a0d16be9a01aca5e0a2599a61e19407587e3d -88f44ac27094a2aa14e9dc40b099ee6d68f97385950f303969d889ee93d4635e34dff9239103bdf66a4b7cbba3e7eb7a -a59afebadf0260e832f6f44468443562f53fbaf7bcb5e46e1462d3f328ac437ce56edbca617659ac9883f9e13261fad7 -b1990e42743a88de4deeacfd55fafeab3bc380cb95de43ed623d021a4f2353530bcab9594389c1844b1c5ea6634c4555 -85051e841149a10e83f56764e042182208591396d0ce78c762c4a413e6836906df67f38c69793e158d64fef111407ba3 -9778172bbd9b1f2ec6bbdd61829d7b39a7df494a818e31c654bf7f6a30139899c4822c1bf418dd4f923243067759ce63 -9355005b4878c87804fc966e7d24f3e4b02bed35b4a77369d01f25a3dcbff7621b08306b1ac85b76fe7b4a3eb5f839b1 -8f9dc6a54fac052e236f8f0e1f571ac4b5308a43acbe4cc8183bce26262ddaf7994e41cf3034a4cbeca2c505a151e3b1 -8cc59c17307111723fe313046a09e0e32ea0cce62c13814ab7c6408c142d6a0311d801be4af53fc9240523f12045f9ef -8e6057975ed40a1932e47dd3ac778f72ee2a868d8540271301b1aa6858de1a5450f596466494a3e0488be4fbeb41c840 -812145efbd6559ae13325d56a15940ca4253b17e72a9728986b563bb5acc13ec86453796506ac1a8f12bd6f9e4a288c3 -911da0a6d6489eb3dab2ec4a16e36127e8a291ae68a6c2c9de33e97f3a9b1f00da57a94e270a0de79ecc5ecb45d19e83 -b72ea85973f4b2a7e6e71962b0502024e979a73c18a9111130e158541fa47bbaaf53940c8f846913a517dc69982ba9e1 -a7a56ad1dbdc55f177a7ad1d0af78447dc2673291e34e8ab74b26e2e2e7d8c5fe5dc89e7ef60f04a9508847b5b3a8188 -b52503f6e5411db5d1e70f5fb72ccd6463fa0f197b3e51ca79c7b5a8ab2e894f0030476ada72534fa4eb4e06c3880f90 -b51c7957a3d18c4e38f6358f2237b3904618d58b1de5dec53387d25a63772e675a5b714ad35a38185409931157d4b529 -b86b4266e719d29c043d7ec091547aa6f65bbf2d8d831d1515957c5c06513b72aa82113e9645ad38a7bc3f5383504fa6 -b95b547357e6601667b0f5f61f261800a44c2879cf94e879def6a105b1ad2bbf1795c3b98a90d588388e81789bd02681 -a58fd4c5ae4673fa350da6777e13313d5d37ed1dafeeb8f4f171549765b84c895875d9d3ae6a9741f3d51006ef81d962 -9398dc348d078a604aadc154e6eef2c0be1a93bb93ba7fe8976edc2840a3a318941338cc4d5f743310e539d9b46613d2 -902c9f0095014c4a2f0dccaaab543debba6f4cc82c345a10aaf4e72511725dbed7a34cd393a5f4e48a3e5142b7be84ed -a7c0447849bb44d04a0393a680f6cd390093484a79a147dd238f5d878030d1c26646d88211108e59fe08b58ad20c6fbd -80db045535d6e67a422519f5c89699e37098449d249698a7cc173a26ccd06f60238ae6cc7242eb780a340705c906790c -8e52b451a299f30124505de2e74d5341e1b5597bdd13301cc39b05536c96e4380e7f1b5c7ef076f5b3005a868657f17c -824499e89701036037571761e977654d2760b8ce21f184f2879fda55d3cda1e7a95306b8abacf1caa79d3cc075b9d27f -9049b956b77f8453d2070607610b79db795588c0cec12943a0f5fe76f358dea81e4f57a4692112afda0e2c05c142b26f -81911647d818a4b5f4990bfd4bc13bf7be7b0059afcf1b6839333e8569cdb0172fd2945410d88879349f677abaed5eb3 -ad4048f19b8194ed45b6317d9492b71a89a66928353072659f5ce6c816d8f21e69b9d1817d793effe49ca1874daa1096 -8d22f7b2ddb31458661abd34b65819a374a1f68c01fc6c9887edeba8b80c65bceadb8f57a3eb686374004b836261ef67 -92637280c259bc6842884db3d6e32602a62252811ae9b019b3c1df664e8809ffe86db88cfdeb8af9f46435c9ee790267 -a2f416379e52e3f5edc21641ea73dc76c99f7e29ea75b487e18bd233856f4c0183429f378d2bfc6cd736d29d6cadfa49 -882cb6b76dbdc188615dcf1a8439eba05ffca637dd25197508156e03c930b17b9fed2938506fdd7b77567cb488f96222 -b68b621bb198a763fb0634eddb93ed4b5156e59b96c88ca2246fd1aea3e6b77ed651e112ac41b30cd361fadc011d385e -a3cb22f6b675a29b2d1f827cacd30df14d463c93c3502ef965166f20d046af7f9ab7b2586a9c64f4eae4fad2d808a164 -8302d9ce4403f48ca217079762ce42cee8bc30168686bb8d3a945fbd5acd53b39f028dce757b825eb63af2d5ae41169d -b2eef1fbd1a176f1f4cd10f2988c7329abe4eb16c7405099fb92baa724ab397bc98734ef7d4b24c0f53dd90f57520d04 -a1bbef0bd684a3f0364a66bde9b29326bac7aa3dde4caed67f14fb84fed3de45c55e406702f1495a3e2864d4ee975030 -976acdb0efb73e3a3b65633197692dedc2adaed674291ae3df76b827fc866d214e9cac9ca46baefc4405ff13f953d936 -b9fbf71cc7b6690f601f0b1c74a19b7d14254183a2daaafec7dc3830cba5ae173d854bbfebeca985d1d908abe5ef0cda -90591d7b483598c94e38969c4dbb92710a1a894bcf147807f1bcbd8aa3ac210b9f2be65519aa829f8e1ccdc83ad9b8cf -a30568577c91866b9c40f0719d46b7b3b2e0b4a95e56196ac80898a2d89cc67880e1229933f2cd28ee3286f8d03414d7 -97589a88c3850556b359ec5e891f0937f922a751ac7c95949d3bbc7058c172c387611c0f4cb06351ef02e5178b3dd9e4 -98e7bbe27a1711f4545df742f17e3233fbcc63659d7419e1ca633f104cb02a32c84f2fac23ca2b84145c2672f68077ab -a7ddb91636e4506d8b7e92aa9f4720491bb71a72dadc47c7f4410e15f93e43d07d2b371951a0e6a18d1bd087aa96a5c4 -a7c006692227a06db40bceac3d5b1daae60b5692dd9b54772bedb5fea0bcc91cbcdb530cac31900ffc70c5b3ffadc969 -8d3ec6032778420dfa8be52066ba0e623467df33e4e1901dbadd586c5d750f4ccde499b5197e26b9ea43931214060f69 -8d9a8410518ea64f89df319bfd1fc97a0971cdb9ad9b11d1f8fe834042ea7f8dce4db56eeaf179ff8dda93b6db93e5ce -a3c533e9b3aa04df20b9ff635cb1154ce303e045278fcf3f10f609064a5445552a1f93989c52ce852fd0bbd6e2b6c22e -81934f3a7f8c1ae60ec6e4f212986bcc316118c760a74155d06ce0a8c00a9b9669ec4e143ca214e1b995e41271774fd9 -ab8e2d01a71192093ef8fafa7485e795567cc9db95a93fb7cc4cf63a391ef89af5e2bfad4b827fffe02b89271300407f -83064a1eaa937a84e392226f1a60b7cfad4efaa802f66de5df7498962f7b2649924f63cd9962d47906380b97b9fe80e1 -b4f5e64a15c6672e4b55417ee5dc292dcf93d7ea99965a888b1cc4f5474a11e5b6520eacbcf066840b343f4ceeb6bf33 -a63d278b842456ef15c278b37a6ea0f27c7b3ffffefca77c7a66d2ea06c33c4631eb242bbb064d730e70a8262a7b848a -83a41a83dbcdf0d22dc049de082296204e848c453c5ab1ba75aa4067984e053acf6f8b6909a2e1f0009ed051a828a73b -819485b036b7958508f15f3c19436da069cbe635b0318ebe8c014cf1ef9ab2df038c81161b7027475bcfa6fff8dd9faf -aa40e38172806e1e045e167f3d1677ef12d5dcdc89b43639a170f68054bd196c4fae34c675c1644d198907a03f76ba57 -969bae484883a9ed1fbed53b26b3d4ee4b0e39a6c93ece5b3a49daa01444a1c25727dabe62518546f36b047b311b177c -80a9e73a65da99664988b238096a090d313a0ee8e4235bc102fa79bb337b51bb08c4507814eb5baec22103ec512eaab0 -86604379aec5bddda6cbe3ef99c0ac3a3c285b0b1a15b50451c7242cd42ae6b6c8acb717dcca7917838432df93a28502 -a23407ee02a495bed06aa7e15f94cfb05c83e6d6fba64456a9bbabfa76b2b68c5c47de00ba169e710681f6a29bb41a22 -98cff5ecc73b366c6a01b34ac9066cb34f7eeaf4f38a5429bad2d07e84a237047e2a065c7e8a0a6581017dadb4695deb -8de9f68a938f441f3b7ab84bb1f473c5f9e5c9e139e42b7ccee1d254bd57d0e99c2ccda0f3198f1fc5737f6023dd204e -b0ce48d815c2768fb472a315cad86aa033d0e9ca506f146656e2941829e0acb735590b4fbc713c2d18d3676db0a954ac -82f485cdefd5642a6af58ac6817991c49fac9c10ace60f90b27f1788cc026c2fe8afc83cf499b3444118f9f0103598a8 -82c24550ed512a0d53fc56f64cc36b553823ae8766d75d772dacf038c460f16f108f87a39ceef7c66389790f799dbab3 -859ffcf1fe9166388316149b9acc35694c0ea534d43f09dae9b86f4aa00a23b27144dda6a352e74b9516e8c8d6fc809c -b8f7f353eec45da77fb27742405e5ad08d95ec0f5b6842025be9def3d9892f85eb5dd0921b41e6eff373618dba215bca -8ccca4436f9017e426229290f5cd05eac3f16571a4713141a7461acfe8ae99cd5a95bf5b6df129148693c533966145da -a2c67ecc19c0178b2994846fea4c34c327a5d786ac4b09d1d13549d5be5996d8a89021d63d65cb814923388f47cc3a03 -aa0ff87d676b418ec08f5cbf577ac7e744d1d0e9ebd14615b550eb86931eafd2a36d4732cc5d6fab1713fd7ab2f6f7c0 -8aef4730bb65e44efd6bb9441c0ae897363a2f3054867590a2c2ecf4f0224e578c7a67f10b40f8453d9f492ac15a9b2d -86a187e13d8fba5addcfdd5b0410cedd352016c930f913addd769ee09faa6be5ca3e4b1bdb417a965c643a99bd92be42 -a0a4e9632a7a094b14b29b78cd9c894218cdf6783e61671e0203865dc2a835350f465fbaf86168f28af7c478ca17bc89 -a8c7b02d8deff2cd657d8447689a9c5e2cd74ef57c1314ac4d69084ac24a7471954d9ff43fe0907d875dcb65fd0d3ce5 -97ded38760aa7be6b6960b5b50e83b618fe413cbf2bcc1da64c05140bcc32f5e0e709cd05bf8007949953fac5716bad9 -b0d293835a24d64c2ae48ce26e550b71a8c94a0883103757fb6b07e30747f1a871707d23389ba2b2065fa6bafe220095 -8f9e291bf849feaa575592e28e3c8d4b7283f733d41827262367ea1c40f298c7bcc16505255a906b62bf15d9f1ba85fb -998f4e2d12708b4fd85a61597ca2eddd750f73c9e0c9b3cf0825d8f8e01f1628fd19797dcaed3b16dc50331fc6b8b821 -b30d1f8c115d0e63bf48f595dd10908416774c78b3bbb3194192995154d80ea042d2e94d858de5f8aa0261b093c401fd -b5d9c75bb41f964cbff3f00e96d9f1480c91df8913f139f0d385d27a19f57a820f838eb728e46823cbff00e21c660996 -a6edec90b5d25350e2f5f0518777634f9e661ec9d30674cf5b156c4801746d62517751d90074830ac0f4b09911c262f1 -82f98da1264b6b75b8fbeb6a4d96d6a05b25c24db0d57ba3a38efe3a82d0d4e331b9fc4237d6494ccfe4727206457519 -b89511843453cf4ecd24669572d6371b1e529c8e284300c43e0d5bb6b3aaf35aeb634b3cb5c0a2868f0d5e959c1d0772 -a82bf065676583e5c1d3b81987aaae5542f522ba39538263a944bb33ea5b514c649344a96c0205a3b197a3f930fcda6c -a37b47ea527b7e06c460776aa662d9a49ff4149d3993f1a974b0dd165f7171770d189b0e2ea54fd5fccb6a14b116e68a -a1017677f97dda818274d47556d09d0e4ccacb23a252f82a6cfe78c630ad46fb9806307445a59fb61262182de3a2b29c -b01e9fcac239ba270e6877b79273ddd768bf8a51d2ed8a051b1c11e18eff3de5920e2fcbfbd26f06d381eddd3b1f1e1b -82fcd53d803b1c8e4ed76adc339b7f3a5962d37042b9683aabac7513ac68775d4a566a9460183926a6a95dbe7d551a1f -a763e78995d55cd21cdb7ef75d9642d6e1c72453945e346ab6690c20a4e1eeec61bb848ef830ae4b56182535e3c71d8f -b769f4db602251d4b0a1186782799bdcef66de33c110999a5775c50b349666ffd83d4c89714c4e376f2efe021a5cfdb2 -a59cbd1b785efcfa6e83fc3b1d8cf638820bc0c119726b5368f3fba9dce8e3414204fb1f1a88f6c1ff52e87961252f97 -95c8c458fd01aa23ecf120481a9c6332ebec2e8bb70a308d0576926a858457021c277958cf79017ddd86a56cacc2d7db -82eb41390800287ae56e77f2e87709de5b871c8bdb67c10a80fc65f3acb9f7c29e8fa43047436e8933f27449ea61d94d -b3ec25e3545eb83aed2a1f3558d1a31c7edde4be145ecc13b33802654b77dc049b4f0065069dd9047b051e52ab11dcdd -b78a0c715738f56f0dc459ab99e252e3b579b208142836b3c416b704ca1de640ca082f29ebbcee648c8c127df06f6b1e -a4083149432eaaf9520188ebf4607d09cf664acd1f471d4fb654476e77a9eaae2251424ffda78d09b6cb880df35c1219 -8c52857d68d6e9672df3db2df2dbf46b516a21a0e8a18eec09a6ae13c1ef8f369d03233320dd1c2c0bbe00abfc1ea18b -8c856089488803066bff3f8d8e09afb9baf20cecc33c8823c1c0836c3d45498c3de37e87c016b705207f60d2b00f8609 -831a3df39be959047b2aead06b4dcd3012d7b29417f642b83c9e8ce8de24a3dbbd29c6fdf55e2db3f7ea04636c94e403 -aed84d009f66544addabe404bf6d65af7779ce140dc561ff0c86a4078557b96b2053b7b8a43432ffb18cd814f143b9da -93282e4d72b0aa85212a77b336007d8ba071eea17492da19860f1ad16c1ea8867ccc27ef5c37c74b052465cc11ea4f52 -a7b78b8c8d057194e8d68767f1488363f77c77bddd56c3da2bc70b6354c7aa76247c86d51f7371aa38a4aa7f7e3c0bb7 -b1c77283d01dcd1bde649b5b044eac26befc98ff57cbee379fb5b8e420134a88f2fc7f0bf04d15e1fbd45d29e7590fe6 -a4aa8de70330a73b2c6458f20a1067eed4b3474829b36970a8df125d53bbdda4f4a2c60063b7cccb0c80fc155527652f -948a6c79ba1b8ad7e0bed2fae2f0481c4e41b4d9bbdd9b58164e28e9065700e83f210c8d5351d0212e0b0b68b345b3a5 -86a48c31dcbbf7b082c92d28e1f613a2378a910677d7db3a349dc089e4a1e24b12eee8e8206777a3a8c64748840b7387 -976adb1af21e0fc34148917cf43d933d7bfd3fd12ed6c37039dcd5a4520e3c6cf5868539ba5bf082326430deb8a4458d -b93e1a4476f2c51864bb4037e7145f0635eb2827ab91732b98d49b6c07f6ac443111aa1f1da76d1888665cb897c3834e -8afd46fb23bf869999fa19784b18a432a1f252d09506b8dbb756af900518d3f5f244989b3d7c823d9029218c655d3dc6 -83f1e59e3abeed18cdc632921672673f1cb6e330326e11c4e600e13e0d5bc11bdc970ae12952e15103a706fe720bf4d6 -90ce4cc660714b0b673d48010641c09c00fc92a2c596208f65c46073d7f349dd8e6e077ba7dcef9403084971c3295b76 -8b09b0f431a7c796561ecf1549b85048564de428dac0474522e9558b6065fede231886bc108539c104ce88ebd9b5d1b0 -85d6e742e2fb16a7b0ba0df64bc2c0dbff9549be691f46a6669bca05e89c884af16822b85faefefb604ec48c8705a309 -a87989ee231e468a712c66513746fcf03c14f103aadca0eac28e9732487deb56d7532e407953ab87a4bf8961588ef7b0 -b00da10efe1c29ee03c9d37d5918e391ae30e48304e294696b81b434f65cf8c8b95b9d1758c64c25e534d045ba28696f -91c0e1fb49afe46c7056400baa06dbb5f6e479db78ee37e2d76c1f4e88994357e257b83b78624c4ef6091a6c0eb8254d -883fb797c498297ccbf9411a3e727c3614af4eccde41619b773dc7f3259950835ee79453debf178e11dec4d3ada687a0 -a14703347e44eb5059070b2759297fcfcfc60e6893c0373eea069388eba3950aa06f1c57cd2c30984a2d6f9e9c92c79e -afebc7585b304ceba9a769634adff35940e89cd32682c78002822aab25eec3edc29342b7f5a42a56a1fec67821172ad5 -aea3ff3822d09dba1425084ca95fd359718d856f6c133c5fabe2b2eed8303b6e0ba0d8698b48b93136a673baac174fd9 -af2456a09aa777d9e67aa6c7c49a1845ea5cdda2e39f4c935c34a5f8280d69d4eec570446998cbbe31ede69a91e90b06 -82cada19fed16b891ef3442bafd49e1f07c00c2f57b2492dd4ee36af2bd6fd877d6cb41188a4d6ce9ec8d48e8133d697 -82a21034c832287f616619a37c122cee265cc34ae75e881fcaea4ea7f689f3c2bc8150bbf7dbcfd123522bfb7f7b1d68 -86877217105f5d0ec3eeff0289fc2a70d505c9fdf7862e8159553ef60908fb1a27bdaf899381356a4ef4649072a9796c -82b196e49c6e861089a427c0b4671d464e9d15555ffb90954cd0d630d7ae02eb3d98ceb529d00719c2526cd96481355a -a29b41d0d43d26ce76d4358e0db2b77df11f56e389f3b084d8af70a636218bd3ac86b36a9fe46ec9058c26a490f887f7 -a4311c4c20c4d7dd943765099c50f2fd423e203ccfe98ff00087d205467a7873762510cac5fdce7a308913ed07991ed7 -b1f040fc5cc51550cb2c25cf1fd418ecdd961635a11f365515f0cb4ffb31da71f48128c233e9cc7c0cf3978d757ec84e -a9ebae46f86d3bd543c5f207ed0d1aed94b8375dc991161d7a271f01592912072e083e2daf30c146430894e37325a1b9 -826418c8e17ad902b5fe88736323a47e0ca7a44bce4cbe27846ec8fe81de1e8942455dda6d30e192cdcc73e11df31256 -85199db563427c5edcbac21f3d39fec2357be91fb571982ddcdc4646b446ad5ced84410de008cb47b3477ee0d532daf8 -b7eed9cd400b2ca12bf1d9ae008214b8561fb09c8ad9ff959e626ffde00fee5ff2f5b6612e231f2a1a9b1646fcc575e3 -8b40bf12501dcbac78f5a314941326bfcddf7907c83d8d887d0bb149207f85d80cd4dfbd7935439ea7b14ea39a3fded7 -83e3041af302485399ba6cd5120e17af61043977083887e8d26b15feec4a6b11171ac5c06e6ad0971d4b58a81ff12af3 -8f5b9a0eecc589dbf8c35a65d5e996a659277ef6ea509739c0cb7b3e2da9895e8c8012de662e5b23c5fa85d4a8f48904 -835d71ed5e919d89d8e6455f234f3ff215462c4e3720c371ac8c75e83b19dfe3ae15a81547e4dc1138e5f5997f413cc9 -8b7d2e4614716b1db18e9370176ea483e6abe8acdcc3dcdf5fb1f4d22ca55d652feebdccc171c6de38398d9f7bfdec7a -93eace72036fe57d019676a02acf3d224cf376f166658c1bf705db4f24295881d477d6fdd7916efcfceff8c7a063deda -b1ac460b3d516879a84bc886c54f020a9d799e7c49af3e4d7de5bf0d2793c852254c5d8fe5616147e6659512e5ccb012 -acd0947a35cb167a48bcd9667620464b54ac0e78f9316b4aa92dcaab5422d7a732087e52e1c827faa847c6b2fe6e7766 -94ac33d21c3d12ff762d32557860e911cd94d666609ddcc42161b9c16f28d24a526e8b10bb03137257a92cec25ae637d -832e02058b6b994eadd8702921486241f9a19e68ed1406dad545e000a491ae510f525ccf9d10a4bba91c68f2c53a0f58 -9471035d14f78ff8f463b9901dd476b587bb07225c351161915c2e9c6114c3c78a501379ab6fb4eb03194c457cbd22bf -ab64593e034c6241d357fcbc32d8ea5593445a5e7c24cac81ad12bd2ef01843d477a36dc1ba21dbe63b440750d72096a -9850f3b30045e927ad3ec4123a32ed2eb4c911f572b6abb79121873f91016f0d80268de8b12e2093a4904f6e6cab7642 -987212c36b4722fe2e54fa30c52b1e54474439f9f35ca6ad33c5130cd305b8b54b532dd80ffd2c274105f20ce6d79f6e -8b4d0c6abcb239b5ed47bef63bc17efe558a27462c8208fa652b056e9eae9665787cd1aee34fbb55beb045c8bfdb882b -a9f3483c6fee2fe41312d89dd4355d5b2193ac413258993805c5cbbf0a59221f879386d3e7a28e73014f10e65dd503d9 -a2225da3119b9b7c83d514b9f3aeb9a6d9e32d9cbf9309cbb971fd53c4b2c001d10d880a8ad8a7c281b21d85ceca0b7c -a050be52e54e676c151f7a54453bbb707232f849beab4f3bf504b4d620f59ed214409d7c2bd3000f3ff13184ccda1c35 -adbccf681e15b3edb6455a68d292b0a1d0f5a4cb135613f5e6db9943f02181341d5755875db6ee474e19ace1c0634a28 -8b6eff675632a6fad0111ec72aacc61c7387380eb87933fd1d098856387d418bd38e77d897e65d6fe35951d0627c550b -aabe2328ddf90989b15e409b91ef055cb02757d34987849ae6d60bef2c902bf8251ed21ab30acf39e500d1d511e90845 -92ba4eb1f796bc3d8b03515f65c045b66e2734c2da3fc507fdd9d6b5d1e19ab3893726816a32141db7a31099ca817d96 -8a98b3cf353138a1810beb60e946183803ef1d39ac4ea92f5a1e03060d35a4774a6e52b14ead54f6794d5f4022b8685c -909f8a5c13ec4a59b649ed3bee9f5d13b21d7f3e2636fd2bb3413c0646573fdf9243d63083356f12f5147545339fcd55 -9359d914d1267633141328ed0790d81c695fea3ddd2d406c0df3d81d0c64931cf316fe4d92f4353c99ff63e2aefc4e34 -b88302031681b54415fe8fbfa161c032ea345c6af63d2fb8ad97615103fd4d4281c5a9cae5b0794c4657b97571a81d3b -992c80192a519038082446b1fb947323005b275e25f2c14c33cc7269e0ec038581cc43705894f94bad62ae33a8b7f965 -a78253e3e3eece124bef84a0a8807ce76573509f6861d0b6f70d0aa35a30a123a9da5e01e84969708c40b0669eb70aa6 -8d5724de45270ca91c94792e8584e676547d7ac1ac816a6bb9982ee854eb5df071d20545cdfd3771cd40f90e5ba04c8e -825a6f586726c68d45f00ad0f5a4436523317939a47713f78fd4fe81cd74236fdac1b04ecd97c2d0267d6f4981d7beb1 -93e02b6052719f607dacd3a088274f65596bd0d09920b61ab5da61bbdc7f5049334cf11213945d57e5ac7d055d042b7e024aa2b2f08f0a91260805272dc51051c6e47ad4fa403b02b4510b647ae3d1770bac0326a805bbefd48056c8c121bdb8 -b5bfd7dd8cdeb128843bc287230af38926187075cbfbefa81009a2ce615ac53d2914e5870cb452d2afaaab24f3499f72185cbfee53492714734429b7b38608e23926c911cceceac9a36851477ba4c60b087041de621000edc98edada20c1def2 -b5337ba0ce5d37224290916e268e2060e5c14f3f9fc9e1ec3af5a958e7a0303122500ce18f1a4640bf66525bd10e763501fe986d86649d8d45143c08c3209db3411802c226e9fe9a55716ac4a0c14f9dcef9e70b2bb309553880dc5025eab3cc -b3c1dcdc1f62046c786f0b82242ef283e7ed8f5626f72542aa2c7a40f14d9094dd1ebdbd7457ffdcdac45fd7da7e16c51200b06d791e5e43e257e45efdf0bd5b06cd2333beca2a3a84354eb48662d83aef5ecf4e67658c851c10b13d8d87c874 -954d91c7688983382609fca9e211e461f488a5971fd4e40d7e2892037268eacdfd495cfa0a7ed6eb0eb11ac3ae6f651716757e7526abe1e06c64649d80996fd3105c20c4c94bc2b22d97045356fe9d791f21ea6428ac48db6f9e68e30d875280 -88a6b6bb26c51cf9812260795523973bb90ce80f6820b6c9048ab366f0fb96e48437a7f7cb62aedf64b11eb4dfefebb0147608793133d32003cb1f2dc47b13b5ff45f1bb1b2408ea45770a08dbfaec60961acb8119c47b139a13b8641e2c9487 -85cd7be9728bd925d12f47fb04b32d9fad7cab88788b559f053e69ca18e463113ecc8bbb6dbfb024835f901b3a957d3108d6770fb26d4c8be0a9a619f6e3a4bf15cbfd48e61593490885f6cee30e4300c5f9cf5e1c08e60a2d5b023ee94fcad0 -80477dba360f04399821a48ca388c0fa81102dd15687fea792ee8c1114e00d1bc4839ad37ac58900a118d863723acfbe08126ea883be87f50e4eabe3b5e72f5d9e041db8d9b186409fd4df4a7dde38c0e0a3b1ae29b098e5697e7f110b6b27e4 -b7a6aec08715a9f8672a2b8c367e407be37e59514ac19dd4f0942a68007bba3923df22da48702c63c0d6b3efd3c2d04e0fe042d8b5a54d562f9f33afc4865dcbcc16e99029e25925580e87920c399e710d438ac1ce3a6dc9b0d76c064a01f6f7 -ac1b001edcea02c8258aeffbf9203114c1c874ad88dae1184fadd7d94cd09053649efd0ca413400e6e9b5fa4eac33261000af88b6bd0d2abf877a4f0355d2fb4d6007adb181695201c5432e50b850b51b3969f893bddf82126c5a71b042b7686 -90043fda4de53fb364fab2c04be5296c215599105ecff0c12e4917c549257125775c29f2507124d15f56e30447f367db0596c33237242c02d83dfd058735f1e3c1ff99069af55773b6d51d32a68bf75763f59ec4ee7267932ae426522b8aaab6 -a8660ce853e9dc08271bf882e29cd53397d63b739584dda5263da4c7cc1878d0cf6f3e403557885f557e184700575fee016ee8542dec22c97befe1d10f414d22e84560741cdb3e74c30dda9b42eeaaf53e27822de2ee06e24e912bf764a9a533 -8fe3921a96d0d065e8aa8fce9aa42c8e1461ca0470688c137be89396dd05103606dab6cdd2a4591efd6addf72026c12e065da7be276dee27a7e30afa2bd81c18f1516e7f068f324d0bad9570b95f6bd02c727cd2343e26db0887c3e4e26dceda -8ae1ad97dcb9c192c9a3933541b40447d1dc4eebf380151440bbaae1e120cc5cdf1bcea55180b128d8e180e3af623815191d063cc0d7a47d55fb7687b9d87040bf7bc1a7546b07c61db5ccf1841372d7c2fe4a5431ffff829f3c2eb590b0b710 -8c2fa96870a88150f7876c931e2d3cc2adeaaaf5c73ef5fa1cf9dfa0991ae4819f9321af7e916e5057d87338e630a2f21242c29d76963cf26035b548d2a63d8ad7bd6efefa01c1df502cbdfdfe0334fb21ceb9f686887440f713bf17a89b8081 -b9aa98e2f02bb616e22ee5dd74c7d1049321ac9214d093a738159850a1dbcc7138cb8d26ce09d8296368fd5b291d74fa17ac7cc1b80840fdd4ee35e111501e3fa8485b508baecda7c1ab7bd703872b7d64a2a40b3210b6a70e8a6ffe0e5127e3 -9292db67f8771cdc86854a3f614a73805bf3012b48f1541e704ea4015d2b6b9c9aaed36419769c87c49f9e3165f03edb159c23b3a49c4390951f78e1d9b0ad997129b17cdb57ea1a6638794c0cca7d239f229e589c5ae4f9fe6979f7f8cba1d7 -91cd9e86550f230d128664f7312591fee6a84c34f5fc7aed557bcf986a409a6de722c4330453a305f06911d2728626e611acfdf81284f77f60a3a1595053a9479964fd713117e27c0222cc679674b03bc8001501aaf9b506196c56de29429b46 -a9516b73f605cc31b89c68b7675dc451e6364595243d235339437f556cf22d745d4250c1376182273be2d99e02c10eee047410a43eff634d051aeb784e76cb3605d8e079b9eb6ad1957dfdf77e1cd32ce4a573c9dfcc207ca65af6eb187f6c3d -a9667271f7d191935cc8ad59ef3ec50229945faea85bfdfb0d582090f524436b348aaa0183b16a6231c00332fdac2826125b8c857a2ed9ec66821cfe02b3a2279be2412441bc2e369b255eb98614e4be8490799c4df22f18d47d24ec70bba5f7 -a4371144d2aa44d70d3cb9789096d3aa411149a6f800cb46f506461ee8363c8724667974252f28aea61b6030c05930ac039c1ee64bb4bd56532a685cae182bf2ab935eee34718cffcb46cae214c77aaca11dbb1320faf23c47247db1da04d8dc -89a7eb441892260b7e81168c386899cd84ffc4a2c5cad2eae0d1ab9e8b5524662e6f660fe3f8bfe4c92f60b060811bc605b14c5631d16709266886d7885a5eb5930097127ec6fb2ebbaf2df65909cf48f253b3d5e22ae48d3e9a2fd2b01f447e -9648c42ca97665b5eccb49580d8532df05eb5a68db07f391a2340769b55119eaf4c52fe4f650c09250fa78a76c3a1e271799b8333cc2628e3d4b4a6a3e03da1f771ecf6516dd63236574a7864ff07e319a6f11f153406280d63af9e2b5713283 -9663bf6dd446ea7a90658ee458578d4196dc0b175ef7fcfa75f44d41670850774c2e46c5a6be132a2c072a3c0180a24f0305d1acac49d2d79878e5cda80c57feda3d01a6af12e78b5874e2a4b3717f11c97503b41a4474e2e95b179113726199 -b212aeb4814e0915b432711b317923ed2b09e076aaf558c3ae8ef83f9e15a83f9ea3f47805b2750ab9e8106cb4dc6ad003522c84b03dc02829978a097899c773f6fb31f7fe6b8f2d836d96580f216fec20158f1590c3e0d7850622e15194db05 -925f005059bf07e9ceccbe66c711b048e236ade775720d0fe479aebe6e23e8af281225ad18e62458dc1b03b42ad4ca290d4aa176260604a7aad0d9791337006fbdebe23746f8060d42876f45e4c83c3643931392fde1cd13ff8bddf8111ef974 -9553edb22b4330c568e156a59ef03b26f5c326424f830fe3e8c0b602f08c124730ffc40bc745bec1a22417adb22a1a960243a10565c2be3066bfdb841d1cd14c624cd06e0008f4beb83f972ce6182a303bee3fcbcabc6cfe48ec5ae4b7941bfc -935f5a404f0a78bdcce709899eda0631169b366a669e9b58eacbbd86d7b5016d044b8dfc59ce7ed8de743ae16c2343b50e2f925e88ba6319e33c3fc76b314043abad7813677b4615c8a97eb83cc79de4fedf6ccbcfa4d4cbf759a5a84e4d9742 -a5b014ab936eb4be113204490e8b61cd38d71da0dec7215125bcd131bf3ab22d0a32ce645bca93e7b3637cf0c2db3d6601a0ddd330dc46f9fae82abe864ffc12d656c88eb50c20782e5bb6f75d18760666f43943abb644b881639083e122f557 -935b7298ae52862fa22bf03bfc1795b34c70b181679ae27de08a9f5b4b884f824ef1b276b7600efa0d2f1d79e4a470d51692fd565c5cf8343dd80e5d3336968fc21c09ba9348590f6206d4424eb229e767547daefa98bc3aa9f421158dee3f2a -9830f92446e708a8f6b091cc3c38b653505414f8b6507504010a96ffda3bcf763d5331eb749301e2a1437f00e2415efb01b799ad4c03f4b02de077569626255ac1165f96ea408915d4cf7955047620da573e5c439671d1fa5c833fb11de7afe6 -840dcc44f673fff3e387af2bb41e89640f2a70bcd2b92544876daa92143f67c7512faf5f90a04b7191de01f3e2b1bde00622a20dc62ca23bbbfaa6ad220613deff43908382642d4d6a86999f662efd64b1df448b68c847cfa87630a3ffd2ec76 -92950c895ed54f7f876b2fda17ecc9c41b7accfbdd42c210cc5b475e0737a7279f558148531b5c916e310604a1de25a80940c94fe5389ae5d6a5e9c371be67bceea1877f5401725a6595bcf77ece60905151b6dfcb68b75ed2e708c73632f4fd -8010246bf8e94c25fd029b346b5fbadb404ef6f44a58fd9dd75acf62433d8cc6db66974f139a76e0c26dddc1f329a88214dbb63276516cf325c7869e855d07e0852d622c332ac55609ba1ec9258c45746a2aeb1af0800141ee011da80af175d4 -b0f1bad257ebd187bdc3f37b23f33c6a5d6a8e1f2de586080d6ada19087b0e2bf23b79c1b6da1ee82271323f5bdf3e1b018586b54a5b92ab6a1a16bb3315190a3584a05e6c37d5ca1e05d702b9869e27f513472bcdd00f4d0502a107773097da -9636d24f1ede773ce919f309448dd7ce023f424afd6b4b69cb98c2a988d849a283646dc3e469879daa1b1edae91ae41f009887518e7eb5578f88469321117303cd3ac2d7aee4d9cb5f82ab9ae3458e796dfe7c24284b05815acfcaa270ff22e2 -b373feb5d7012fd60578d7d00834c5c81df2a23d42794fed91aa9535a4771fde0341c4da882261785e0caca40bf83405143085e7f17e55b64f6c5c809680c20b050409bf3702c574769127c854d27388b144b05624a0e24a1cbcc4d08467005b -b15680648949ce69f82526e9b67d9b55ce5c537dc6ab7f3089091a9a19a6b90df7656794f6edc87fb387d21573ffc847062623685931c2790a508cbc8c6b231dd2c34f4d37d4706237b1407673605a604bcf6a50cc0b1a2db20485e22b02c17e -8817e46672d40c8f748081567b038a3165f87994788ec77ee8daea8587f5540df3422f9e120e94339be67f186f50952504cb44f61e30a5241f1827e501b2de53c4c64473bcc79ab887dd277f282fbfe47997a930dd140ac08b03efac88d81075 -a6e4ef6c1d1098f95aae119905f87eb49b909d17f9c41bcfe51127aa25fee20782ea884a7fdf7d5e9c245b5a5b32230b07e0dbf7c6743bf52ee20e2acc0b269422bd6cf3c07115df4aa85b11b2c16630a07c974492d9cdd0ec325a3fabd95044 -8634aa7c3d00e7f17150009698ce440d8e1b0f13042b624a722ace68ead870c3d2212fbee549a2c190e384d7d6ac37ce14ab962c299ea1218ef1b1489c98906c91323b94c587f1d205a6edd5e9d05b42d591c26494a6f6a029a2aadb5f8b6f67 -821a58092900bdb73decf48e13e7a5012a3f88b06288a97b855ef51306406e7d867d613d9ec738ebacfa6db344b677d21509d93f3b55c2ebf3a2f2a6356f875150554c6fff52e62e3e46f7859be971bf7dd9d5b3e1d799749c8a97c2e04325df -8dba356577a3a388f782e90edb1a7f3619759f4de314ad5d95c7cc6e197211446819c4955f99c5fc67f79450d2934e3c09adefc91b724887e005c5190362245eec48ce117d0a94d6fa6db12eda4ba8dde608fbbd0051f54dcf3bb057adfb2493 -a32a690dc95c23ed9fb46443d9b7d4c2e27053a7fcc216d2b0020a8cf279729c46114d2cda5772fd60a97016a07d6c5a0a7eb085a18307d34194596f5b541cdf01b2ceb31d62d6b55515acfd2b9eec92b27d082fbc4dc59fc63b551eccdb8468 -a040f7f4be67eaf0a1d658a3175d65df21a7dbde99bfa893469b9b43b9d150fc2e333148b1cb88cfd0447d88fa1a501d126987e9fdccb2852ecf1ba907c2ca3d6f97b055e354a9789854a64ecc8c2e928382cf09dda9abde42bbdf92280cdd96 -864baff97fa60164f91f334e0c9be00a152a416556b462f96d7c43b59fe1ebaff42f0471d0bf264976f8aa6431176eb905bd875024cf4f76c13a70bede51dc3e47e10b9d5652d30d2663b3af3f08d5d11b9709a0321aba371d2ef13174dcfcaf -95a46f32c994133ecc22db49bad2c36a281d6b574c83cfee6680b8c8100466ca034b815cfaedfbf54f4e75188e661df901abd089524e1e0eb0bf48d48caa9dd97482d2e8c1253e7e8ac250a32fd066d5b5cb08a8641bdd64ecfa48289dca83a3 -a2cce2be4d12144138cb91066e0cd0542c80b478bf467867ebef9ddaf3bd64e918294043500bf5a9f45ee089a8d6ace917108d9ce9e4f41e7e860cbce19ac52e791db3b6dde1c4b0367377b581f999f340e1d6814d724edc94cb07f9c4730774 -b145f203eee1ac0a1a1731113ffa7a8b0b694ef2312dabc4d431660f5e0645ef5838e3e624cfe1228cfa248d48b5760501f93e6ab13d3159fc241427116c4b90359599a4cb0a86d0bb9190aa7fabff482c812db966fd2ce0a1b48cb8ac8b3bca -adabe5d215c608696e03861cbd5f7401869c756b3a5aadc55f41745ad9478145d44393fec8bb6dfc4ad9236dc62b9ada0f7ca57fe2bae1b71565dbf9536d33a68b8e2090b233422313cc96afc7f1f7e0907dc7787806671541d6de8ce47c4cd0 -ae7845fa6b06db53201c1080e01e629781817f421f28956589c6df3091ec33754f8a4bd4647a6bb1c141ac22731e3c1014865d13f3ed538dcb0f7b7576435133d9d03be655f8fbb4c9f7d83e06d1210aedd45128c2b0c9bab45a9ddde1c862a5 -9159eaa826a24adfa7adf6e8d2832120ebb6eccbeb3d0459ffdc338548813a2d239d22b26451fda98cc0c204d8e1ac69150b5498e0be3045300e789bcb4e210d5cd431da4bdd915a21f407ea296c20c96608ded0b70d07188e96e6c1a7b9b86b -a9fc6281e2d54b46458ef564ffaed6944bff71e389d0acc11fa35d3fcd8e10c1066e0dde5b9b6516f691bb478e81c6b20865281104dcb640e29dc116daae2e884f1fe6730d639dbe0e19a532be4fb337bf52ae8408446deb393d224eee7cfa50 -84291a42f991bfb36358eedead3699d9176a38f6f63757742fdbb7f631f2c70178b1aedef4912fed7b6cf27e88ddc7eb0e2a6aa4b999f3eb4b662b93f386c8d78e9ac9929e21f4c5e63b12991fcde93aa64a735b75b535e730ff8dd2abb16e04 -a1b7fcacae181495d91765dfddf26581e8e39421579c9cbd0dd27a40ea4c54af3444a36bf85a11dda2114246eaddbdd619397424bb1eb41b5a15004b902a590ede5742cd850cf312555be24d2df8becf48f5afba5a8cd087cb7be0a521728386 -92feaaf540dbd84719a4889a87cdd125b7e995a6782911931fef26da9afcfbe6f86aaf5328fe1f77631491ce6239c5470f44c7791506c6ef1626803a5794e76d2be0af92f7052c29ac6264b7b9b51f267ad820afc6f881460521428496c6a5f1 -a525c925bfae1b89320a5054acc1fa11820f73d0cf28d273092b305467b2831fab53b6daf75fb926f332782d50e2522a19edcd85be5eb72f1497193c952d8cd0bcc5d43b39363b206eae4cb1e61668bde28a3fb2fc1e0d3d113f6dfadb799717 -98752bb6f5a44213f40eda6aa4ff124057c1b13b6529ab42fe575b9afa66e59b9c0ed563fb20dff62130c436c3e905ee17dd8433ba02c445b1d67182ab6504a90bbe12c26a754bbf734665c622f76c62fe2e11dd43ce04fd2b91a8463679058b -a9aa9a84729f7c44219ff9e00e651e50ddea3735ef2a73fdf8ed8cd271961d8ed7af5cd724b713a89a097a3fe65a3c0202f69458a8b4c157c62a85668b12fc0d3957774bc9b35f86c184dd03bfefd5c325da717d74192cc9751c2073fe9d170e -b221c1fd335a4362eff504cd95145f122bf93ea02ae162a3fb39c75583fc13a932d26050e164da97cff3e91f9a7f6ff80302c19dd1916f24acf6b93b62f36e9665a8785413b0c7d930c7f1668549910f849bca319b00e59dd01e5dec8d2edacc -a71e2b1e0b16d754b848f05eda90f67bedab37709550171551050c94efba0bfc282f72aeaaa1f0330041461f5e6aa4d11537237e955e1609a469d38ed17f5c2a35a1752f546db89bfeff9eab78ec944266f1cb94c1db3334ab48df716ce408ef -b990ae72768779ba0b2e66df4dd29b3dbd00f901c23b2b4a53419226ef9232acedeb498b0d0687c463e3f1eead58b20b09efcefa566fbfdfe1c6e48d32367936142d0a734143e5e63cdf86be7457723535b787a9cfcfa32fe1d61ad5a2617220 -8d27e7fbff77d5b9b9bbc864d5231fecf817238a6433db668d5a62a2c1ee1e5694fdd90c3293c06cc0cb15f7cbeab44d0d42be632cb9ff41fc3f6628b4b62897797d7b56126d65b694dcf3e298e3561ac8813fbd7296593ced33850426df42db -a92039a08b5502d5b211a7744099c9f93fa8c90cedcb1d05e92f01886219dd464eb5fb0337496ad96ed09c987da4e5f019035c5b01cc09b2a18b8a8dd419bc5895388a07e26958f6bd26751929c25f89b8eb4a299d822e2d26fec9ef350e0d3c -92dcc5a1c8c3e1b28b1524e3dd6dbecd63017c9201da9dbe077f1b82adc08c50169f56fc7b5a3b28ec6b89254de3e2fd12838a761053437883c3e01ba616670cea843754548ef84bcc397de2369adcca2ab54cd73c55dc68d87aec3fc2fe4f10 \ No newline at end of file diff --git a/crates/primitives/src/block.rs b/crates/primitives/src/block.rs index 36cfdceaf1db..9e7fb81bdf33 100644 --- a/crates/primitives/src/block.rs +++ b/crates/primitives/src/block.rs @@ -1,14 +1,12 @@ -use crate::{ - Address, BlockHash, BlockNumber, Header, SealedHeader, TransactionSigned, Withdrawal, B256, U64, -}; -use alloy_rlp::{Decodable, Encodable, Error as RlpError, RlpDecodable, RlpEncodable}; +use crate::{Address, Header, SealedHeader, TransactionSigned, Withdrawal, B256}; +use alloy_rlp::{RlpDecodable, RlpEncodable}; use reth_codecs::derive_arbitrary; -use serde::{ - de::{MapAccess, Visitor}, - ser::SerializeStruct, - Deserialize, Deserializer, Serialize, Serializer, +use serde::{Deserialize, Serialize}; +use std::ops::Deref; + +pub use reth_rpc_types::{ + BlockHashOrNumber, BlockId, BlockNumHash, BlockNumberOrTag, ForkBlock, RpcBlockHash, }; -use std::{fmt, fmt::Formatter, num::ParseIntError, ops::Deref, str::FromStr}; /// Ethereum full block. /// @@ -269,520 +267,6 @@ impl std::ops::DerefMut for SealedBlockWithSenders { } } -/// Either a block hash _or_ a block number -#[derive_arbitrary(rlp)] -#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] -pub enum BlockHashOrNumber { - /// A block hash - Hash(B256), - /// A block number - Number(u64), -} - -// === impl BlockHashOrNumber === - -impl BlockHashOrNumber { - /// Returns the block number if it is a [`BlockHashOrNumber::Number`]. - #[inline] - pub fn as_number(self) -> Option { - match self { - BlockHashOrNumber::Hash(_) => None, - BlockHashOrNumber::Number(num) => Some(num), - } - } -} - -impl From for BlockHashOrNumber { - fn from(value: B256) -> Self { - BlockHashOrNumber::Hash(value) - } -} - -impl From for BlockHashOrNumber { - fn from(value: u64) -> Self { - BlockHashOrNumber::Number(value) - } -} - -/// Allows for RLP encoding of either a block hash or block number -impl Encodable for BlockHashOrNumber { - fn encode(&self, out: &mut dyn bytes::BufMut) { - match self { - Self::Hash(block_hash) => block_hash.encode(out), - Self::Number(block_number) => block_number.encode(out), - } - } - fn length(&self) -> usize { - match self { - Self::Hash(block_hash) => block_hash.length(), - Self::Number(block_number) => block_number.length(), - } - } -} - -/// Allows for RLP decoding of a block hash or block number -impl Decodable for BlockHashOrNumber { - fn decode(buf: &mut &[u8]) -> alloy_rlp::Result { - let header: u8 = *buf.first().ok_or(RlpError::InputTooShort)?; - // if the byte string is exactly 32 bytes, decode it into a Hash - // 0xa0 = 0x80 (start of string) + 0x20 (32, length of string) - if header == 0xa0 { - // strip the first byte, parsing the rest of the string. - // If the rest of the string fails to decode into 32 bytes, we'll bubble up the - // decoding error. - let hash = B256::decode(buf)?; - Ok(Self::Hash(hash)) - } else { - // a block number when encoded as bytes ranges from 0 to any number of bytes - we're - // going to accept numbers which fit in less than 64 bytes. - // Any data larger than this which is not caught by the Hash decoding should error and - // is considered an invalid block number. - Ok(Self::Number(u64::decode(buf)?)) - } - } -} - -#[derive(Debug, thiserror::Error)] -#[error("Failed to parse `{input}` as integer: {pares_int_error} or as hex: {hex_error}")] -pub struct ParseBlockHashOrNumberError { - input: String, - pares_int_error: ParseIntError, - hex_error: crate::hex::FromHexError, -} - -impl FromStr for BlockHashOrNumber { - type Err = ParseBlockHashOrNumberError; - - fn from_str(s: &str) -> Result { - match u64::from_str(s) { - Ok(val) => Ok(val.into()), - Err(pares_int_error) => match B256::from_str(s) { - Ok(val) => Ok(val.into()), - Err(hex_error) => Err(ParseBlockHashOrNumberError { - input: s.to_string(), - pares_int_error, - hex_error, - }), - }, - } - } -} - -/// A Block Identifier -/// -#[derive(Copy, Clone, Debug, PartialEq, Eq)] -pub enum BlockId { - /// A block hash and an optional bool that defines if it's canonical - Hash(RpcBlockHash), - /// A block number - Number(BlockNumberOrTag), -} - -// === impl BlockId === - -impl BlockId { - /// Returns the block hash if it is [BlockId::Hash] - pub fn as_block_hash(&self) -> Option { - match self { - BlockId::Hash(hash) => Some(hash.block_hash), - BlockId::Number(_) => None, - } - } - - /// Returns true if this is [BlockNumberOrTag::Latest] - pub fn is_latest(&self) -> bool { - matches!(self, BlockId::Number(BlockNumberOrTag::Latest)) - } - - /// Returns true if this is [BlockNumberOrTag::Pending] - pub fn is_pending(&self) -> bool { - matches!(self, BlockId::Number(BlockNumberOrTag::Pending)) - } -} - -impl From for BlockId { - fn from(num: u64) -> Self { - BlockNumberOrTag::Number(num).into() - } -} - -impl From for BlockId { - fn from(num: BlockNumberOrTag) -> Self { - BlockId::Number(num) - } -} - -impl From for BlockId { - fn from(block_hash: B256) -> Self { - BlockId::Hash(RpcBlockHash { block_hash, require_canonical: None }) - } -} - -impl From<(B256, Option)> for BlockId { - fn from(hash_can: (B256, Option)) -> Self { - BlockId::Hash(RpcBlockHash { block_hash: hash_can.0, require_canonical: hash_can.1 }) - } -} - -impl From for BlockId { - fn from(hash_can: RpcBlockHash) -> Self { - BlockId::Hash(hash_can) - } -} - -impl From for BlockId { - fn from(value: BlockHashOrNumber) -> Self { - match value { - BlockHashOrNumber::Hash(hash) => B256::from(hash.0).into(), - BlockHashOrNumber::Number(number) => number.into(), - } - } -} - -impl Serialize for BlockId { - fn serialize(&self, serializer: S) -> Result - where - S: Serializer, - { - match *self { - BlockId::Hash(RpcBlockHash { ref block_hash, ref require_canonical }) => { - let mut s = serializer.serialize_struct("BlockIdEip1898", 1)?; - s.serialize_field("blockHash", block_hash)?; - if let Some(require_canonical) = require_canonical { - s.serialize_field("requireCanonical", require_canonical)?; - } - s.end() - } - BlockId::Number(ref num) => num.serialize(serializer), - } - } -} - -impl<'de> Deserialize<'de> for BlockId { - fn deserialize(deserializer: D) -> Result - where - D: Deserializer<'de>, - { - struct BlockIdVisitor; - - impl<'de> Visitor<'de> for BlockIdVisitor { - type Value = BlockId; - - fn expecting(&self, formatter: &mut Formatter<'_>) -> std::fmt::Result { - formatter.write_str("Block identifier following EIP-1898") - } - - fn visit_str(self, v: &str) -> Result - where - E: serde::de::Error, - { - // Since there is no way to clearly distinguish between a DATA parameter and a QUANTITY parameter. A str is therefor deserialized into a Block Number: - // However, since the hex string should be a QUANTITY, we can safely assume that if the len is 66 bytes, it is in fact a hash, ref - if v.len() == 66 { - Ok(BlockId::Hash(v.parse::().map_err(serde::de::Error::custom)?.into())) - } else { - // quantity hex string or tag - Ok(BlockId::Number(v.parse().map_err(serde::de::Error::custom)?)) - } - } - - fn visit_map(self, mut map: A) -> Result - where - A: MapAccess<'de>, - { - let mut number = None; - let mut block_hash = None; - let mut require_canonical = None; - while let Some(key) = map.next_key::()? { - match key.as_str() { - "blockNumber" => { - if number.is_some() || block_hash.is_some() { - return Err(serde::de::Error::duplicate_field("blockNumber")) - } - if require_canonical.is_some() { - return Err(serde::de::Error::custom( - "Non-valid require_canonical field", - )) - } - number = Some(map.next_value::()?) - } - "blockHash" => { - if number.is_some() || block_hash.is_some() { - return Err(serde::de::Error::duplicate_field("blockHash")) - } - - block_hash = Some(map.next_value::()?); - } - "requireCanonical" => { - if number.is_some() || require_canonical.is_some() { - return Err(serde::de::Error::duplicate_field("requireCanonical")) - } - - require_canonical = Some(map.next_value::()?) - } - key => { - return Err(serde::de::Error::unknown_field( - key, - &["blockNumber", "blockHash", "requireCanonical"], - )) - } - } - } - - if let Some(number) = number { - Ok(BlockId::Number(number)) - } else if let Some(block_hash) = block_hash { - Ok(BlockId::Hash(RpcBlockHash { block_hash, require_canonical })) - } else { - Err(serde::de::Error::custom( - "Expected `blockNumber` or `blockHash` with `requireCanonical` optionally", - )) - } - } - } - - deserializer.deserialize_any(BlockIdVisitor) - } -} - -/// A block Number (or tag - "latest", "earliest", "pending") -#[derive(Copy, Clone, Debug, Default, PartialEq, Eq, Hash)] -pub enum BlockNumberOrTag { - /// Latest block - #[default] - Latest, - /// Finalized block accepted as canonical - Finalized, - /// Safe head block - Safe, - /// Earliest block (genesis) - Earliest, - /// Pending block (not yet part of the blockchain) - Pending, - /// Block by number from canon chain - Number(u64), -} - -impl BlockNumberOrTag { - /// Returns the numeric block number if explicitly set - pub fn as_number(&self) -> Option { - match *self { - BlockNumberOrTag::Number(num) => Some(num), - _ => None, - } - } - - /// Returns `true` if a numeric block number is set - pub fn is_number(&self) -> bool { - matches!(self, BlockNumberOrTag::Number(_)) - } - - /// Returns `true` if it's "latest" - pub fn is_latest(&self) -> bool { - matches!(self, BlockNumberOrTag::Latest) - } - - /// Returns `true` if it's "finalized" - pub fn is_finalized(&self) -> bool { - matches!(self, BlockNumberOrTag::Finalized) - } - - /// Returns `true` if it's "safe" - pub fn is_safe(&self) -> bool { - matches!(self, BlockNumberOrTag::Safe) - } - - /// Returns `true` if it's "pending" - pub fn is_pending(&self) -> bool { - matches!(self, BlockNumberOrTag::Pending) - } - - /// Returns `true` if it's "earliest" - pub fn is_earliest(&self) -> bool { - matches!(self, BlockNumberOrTag::Earliest) - } -} - -impl From for BlockNumberOrTag { - fn from(num: u64) -> Self { - BlockNumberOrTag::Number(num) - } -} - -impl From for BlockNumberOrTag { - fn from(num: U64) -> Self { - num.into_limbs()[0].into() - } -} - -impl Serialize for BlockNumberOrTag { - fn serialize(&self, serializer: S) -> Result - where - S: Serializer, - { - match *self { - BlockNumberOrTag::Number(ref x) => serializer.serialize_str(&format!("0x{x:x}")), - BlockNumberOrTag::Latest => serializer.serialize_str("latest"), - BlockNumberOrTag::Finalized => serializer.serialize_str("finalized"), - BlockNumberOrTag::Safe => serializer.serialize_str("safe"), - BlockNumberOrTag::Earliest => serializer.serialize_str("earliest"), - BlockNumberOrTag::Pending => serializer.serialize_str("pending"), - } - } -} - -impl<'de> Deserialize<'de> for BlockNumberOrTag { - fn deserialize(deserializer: D) -> Result - where - D: Deserializer<'de>, - { - let s = String::deserialize(deserializer)?.to_lowercase(); - s.parse().map_err(serde::de::Error::custom) - } -} - -impl FromStr for BlockNumberOrTag { - type Err = ParseBlockNumberError; - - fn from_str(s: &str) -> Result { - let block = match s { - "latest" => Self::Latest, - "finalized" => Self::Finalized, - "safe" => Self::Safe, - "earliest" => Self::Earliest, - "pending" => Self::Pending, - _number => { - if let Some(hex_val) = s.strip_prefix("0x") { - let number = u64::from_str_radix(hex_val, 16); - BlockNumberOrTag::Number(number?) - } else { - return Err(HexStringMissingPrefixError::default().into()) - } - } - }; - Ok(block) - } -} - -impl fmt::Display for BlockNumberOrTag { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - match self { - BlockNumberOrTag::Number(ref x) => format!("0x{x:x}").fmt(f), - BlockNumberOrTag::Latest => f.write_str("latest"), - BlockNumberOrTag::Finalized => f.write_str("finalized"), - BlockNumberOrTag::Safe => f.write_str("safe"), - BlockNumberOrTag::Earliest => f.write_str("earliest"), - BlockNumberOrTag::Pending => f.write_str("pending"), - } - } -} - -/// Error variants when parsing a [BlockNumberOrTag] -#[derive(Debug, thiserror::Error)] -pub enum ParseBlockNumberError { - /// Failed to parse hex value - #[error(transparent)] - ParseIntErr(#[from] ParseIntError), - /// Block numbers should be 0x-prefixed - #[error(transparent)] - MissingPrefix(#[from] HexStringMissingPrefixError), -} - -/// Thrown when a 0x-prefixed hex string was expected -#[derive(Debug, Default, thiserror::Error)] -#[non_exhaustive] -#[error("hex string without 0x prefix")] -pub struct HexStringMissingPrefixError; - -/// A block hash which may have -/// a boolean requireCanonical field. -/// If false, an RPC call should raise if a block -/// matching the hash is not found. -/// If true, an RPC call should additionaly raise if -/// the block is not in the canonical chain. -/// -#[derive(Copy, Clone, Debug, PartialEq, Eq, Serialize)] -pub struct RpcBlockHash { - /// A block hash - pub block_hash: B256, - /// Whether the block must be a canonical block - pub require_canonical: Option, -} - -impl RpcBlockHash { - pub fn from_hash(block_hash: B256, require_canonical: Option) -> Self { - RpcBlockHash { block_hash, require_canonical } - } -} - -impl From for RpcBlockHash { - fn from(value: B256) -> Self { - Self::from_hash(value, None) - } -} - -impl From for B256 { - fn from(value: RpcBlockHash) -> Self { - value.block_hash - } -} - -impl AsRef for RpcBlockHash { - fn as_ref(&self) -> &B256 { - &self.block_hash - } -} - -/// Block number and hash. -#[derive(Clone, Copy, Hash, Default, PartialEq, Eq)] -pub struct BlockNumHash { - /// Block number - pub number: BlockNumber, - /// Block hash - pub hash: BlockHash, -} - -/// Block number and hash of the forked block. -pub type ForkBlock = BlockNumHash; - -impl std::fmt::Debug for BlockNumHash { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - f.debug_tuple("").field(&self.number).field(&self.hash).finish() - } -} - -impl BlockNumHash { - /// Creates a new `BlockNumHash` from a block number and hash. - pub fn new(number: BlockNumber, hash: BlockHash) -> Self { - Self { number, hash } - } - - /// Consumes `Self` and returns [`BlockNumber`], [`BlockHash`] - pub fn into_components(self) -> (BlockNumber, BlockHash) { - (self.number, self.hash) - } - - /// Returns whether or not the block matches the given [BlockHashOrNumber]. - pub fn matches_block_or_num(&self, block: &BlockHashOrNumber) -> bool { - match block { - BlockHashOrNumber::Hash(hash) => self.hash == *hash, - BlockHashOrNumber::Number(number) => self.number == *number, - } - } -} - -impl From<(BlockNumber, BlockHash)> for BlockNumHash { - fn from(val: (BlockNumber, BlockHash)) -> Self { - BlockNumHash { number: val.0, hash: val.1 } - } -} - -impl From<(BlockHash, BlockNumber)> for BlockNumHash { - fn from(val: (BlockHash, BlockNumber)) -> Self { - BlockNumHash { hash: val.0, number: val.1 } - } -} - /// A response to `GetBlockBodies`, containing bodies if any bodies were found. /// /// Withdrawals can be optionally included at the end of the RLP encoded message. @@ -887,6 +371,9 @@ pub struct BlockBodyRoots { mod test { use super::{BlockId, BlockNumberOrTag::*, *}; use crate::hex_literal::hex; + use alloy_rlp::{Decodable, Encodable}; + use reth_rpc_types::HexStringMissingPrefixError; + use std::str::FromStr; /// Check parsing according to EIP-1898. #[test] diff --git a/crates/primitives/src/chain/spec.rs b/crates/primitives/src/chain/spec.rs index b045784504f1..9cebf52a8367 100644 --- a/crates/primitives/src/chain/spec.rs +++ b/crates/primitives/src/chain/spec.rs @@ -708,10 +708,10 @@ impl ForkTimestamps { #[derive(Debug, Clone, Deserialize, Serialize)] #[serde(untagged)] pub enum AllGenesisFormats { - /// The geth genesis format - Geth(Genesis), /// The reth genesis format Reth(ChainSpec), + /// The geth genesis format + Geth(Genesis), } impl From for AllGenesisFormats { @@ -1189,10 +1189,13 @@ impl DepositContract { #[cfg(test)] mod tests { use super::*; - use crate::{b256, hex, NamedChain, B256, DEV, GOERLI, HOLESKY, MAINNET, SEPOLIA, U256}; + use crate::{ + b256, hex, ChainConfig, GenesisAccount, NamedChain, B256, DEV, GOERLI, HOLESKY, MAINNET, + SEPOLIA, U256, + }; use alloy_rlp::Encodable; use bytes::BytesMut; - use std::str::FromStr; + use std::{collections::HashMap, str::FromStr}; fn test_fork_ids(spec: &ChainSpec, cases: &[(Head, ForkId)]) { for (block, expected_id) in cases { @@ -1444,7 +1447,7 @@ Post-merge hard forks (timestamp based): // technically unecessary - but we include it here for thoroughness let fork_cond_block_only_case = ChainSpec::builder() .chain(Chain::mainnet()) - .genesis(empty_genesis.clone()) + .genesis(empty_genesis) .with_fork(Hardfork::Frontier, ForkCondition::Block(0)) .with_fork(Hardfork::Homestead, ForkCondition::Block(73)) .build(); @@ -1959,7 +1962,7 @@ Post-merge hard forks (timestamp based): timestamp + 1, ), ( - construct_chainspec(default_spec_builder.clone(), timestamp + 1, timestamp + 2), + construct_chainspec(default_spec_builder, timestamp + 1, timestamp + 2), timestamp + 1, ), ]; @@ -2250,6 +2253,27 @@ Post-merge hard forks (timestamp based): assert_eq!(genesis.config.cancun_time, Some(4661)); } + #[test] + fn test_parse_cancun_genesis_all_formats() { + let s = r#"{"config":{"ethash":{},"chainId":1337,"homesteadBlock":0,"eip150Block":0,"eip155Block":0,"eip158Block":0,"byzantiumBlock":0,"constantinopleBlock":0,"petersburgBlock":0,"istanbulBlock":0,"berlinBlock":0,"londonBlock":0,"terminalTotalDifficulty":0,"terminalTotalDifficultyPassed":true,"shanghaiTime":0,"cancunTime":4661},"nonce":"0x0","timestamp":"0x0","extraData":"0x","gasLimit":"0x4c4b40","difficulty":"0x1","mixHash":"0x0000000000000000000000000000000000000000000000000000000000000000","coinbase":"0x0000000000000000000000000000000000000000","alloc":{"658bdf435d810c91414ec09147daa6db62406379":{"balance":"0x487a9a304539440000"},"aa00000000000000000000000000000000000000":{"code":"0x6042","storage":{"0x0000000000000000000000000000000000000000000000000000000000000000":"0x0000000000000000000000000000000000000000000000000000000000000000","0x0100000000000000000000000000000000000000000000000000000000000000":"0x0100000000000000000000000000000000000000000000000000000000000000","0x0200000000000000000000000000000000000000000000000000000000000000":"0x0200000000000000000000000000000000000000000000000000000000000000","0x0300000000000000000000000000000000000000000000000000000000000000":"0x0000000000000000000000000000000000000000000000000000000000000303"},"balance":"0x1","nonce":"0x1"},"bb00000000000000000000000000000000000000":{"code":"0x600154600354","storage":{"0x0000000000000000000000000000000000000000000000000000000000000000":"0x0000000000000000000000000000000000000000000000000000000000000000","0x0100000000000000000000000000000000000000000000000000000000000000":"0x0100000000000000000000000000000000000000000000000000000000000000","0x0200000000000000000000000000000000000000000000000000000000000000":"0x0200000000000000000000000000000000000000000000000000000000000000","0x0300000000000000000000000000000000000000000000000000000000000000":"0x0000000000000000000000000000000000000000000000000000000000000303"},"balance":"0x2","nonce":"0x1"}},"number":"0x0","gasUsed":"0x0","parentHash":"0x0000000000000000000000000000000000000000000000000000000000000000","baseFeePerGas":"0x3b9aca00"}"#; + let genesis: AllGenesisFormats = serde_json::from_str(s).unwrap(); + + // this should be the genesis format + let genesis = match genesis { + AllGenesisFormats::Geth(genesis) => genesis, + _ => panic!("expected geth genesis format"), + }; + + // assert that the alloc was picked up + let acc = genesis + .alloc + .get(&"0xaa00000000000000000000000000000000000000".parse::
().unwrap()) + .unwrap(); + assert_eq!(acc.balance, U256::from(1)); + // assert that the cancun time was picked up + assert_eq!(genesis.config.cancun_time, Some(4661)); + } + #[test] fn test_default_cancun_header_forkhash() { // set the gas limit from the hive test genesis according to the hash @@ -2293,4 +2317,61 @@ Post-merge hard forks (timestamp based): .fork(Hardfork::Paris) .active_at_ttd(HOLESKY.genesis.difficulty, HOLESKY.genesis.difficulty)); } + + #[test] + fn test_all_genesis_formats_deserialization() { + // custom genesis with chain config + let config = ChainConfig { + chain_id: 2600, + homestead_block: Some(0), + eip150_block: Some(0), + eip155_block: Some(0), + eip158_block: Some(0), + byzantium_block: Some(0), + constantinople_block: Some(0), + petersburg_block: Some(0), + istanbul_block: Some(0), + berlin_block: Some(0), + london_block: Some(0), + shanghai_time: Some(0), + terminal_total_difficulty: Some(U256::ZERO), + terminal_total_difficulty_passed: true, + ..Default::default() + }; + // genesis + let genesis = Genesis { + config, + nonce: 0, + timestamp: 1698688670, + gas_limit: 5000, + difficulty: U256::ZERO, + mix_hash: B256::ZERO, + coinbase: Address::ZERO, + ..Default::default() + }; + + // seed accounts after genesis struct created + let address = hex!("6Be02d1d3665660d22FF9624b7BE0551ee1Ac91b").into(); + let account = GenesisAccount::default().with_balance(U256::from(33)); + let genesis = genesis.extend_accounts(HashMap::from([(address, account)])); + + // ensure genesis is deserialized correctly + let serialized_genesis = serde_json::to_string(&genesis).unwrap(); + let deserialized_genesis: AllGenesisFormats = + serde_json::from_str(&serialized_genesis).unwrap(); + assert!(matches!(deserialized_genesis, AllGenesisFormats::Geth(_))); + + // build chain + let chain_spec = ChainSpecBuilder::default() + .chain(2600.into()) + .genesis(genesis) + .cancun_activated() + .build(); + + // ensure chain spec is deserialized correctly + let serialized_chain_spec = serde_json::to_string(&chain_spec).unwrap(); + let deserialized_chain_spec: AllGenesisFormats = + serde_json::from_str(&serialized_chain_spec).unwrap(); + assert!(matches!(deserialized_chain_spec, AllGenesisFormats::Reth(_))) + } } diff --git a/crates/primitives/src/constants/eip4844.rs b/crates/primitives/src/constants/eip4844.rs index 9d05526331d1..ba6ac288e25f 100644 --- a/crates/primitives/src/constants/eip4844.rs +++ b/crates/primitives/src/constants/eip4844.rs @@ -1,8 +1,6 @@ //! [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844#parameters) protocol constants and utils for shard Blob Transactions. - -use crate::kzg::KzgSettings; -use once_cell::sync::Lazy; -use std::{io::Write, sync::Arc}; +#[cfg(feature = "c-kzg")] +pub use trusted_setup::*; /// Size a single field element in bytes. pub const FIELD_ELEMENT_BYTES: u64 = 32; @@ -34,44 +32,55 @@ pub const BLOB_TX_MIN_BLOB_GASPRICE: u128 = 1u128; /// Commitment version of a KZG commitment pub const VERSIONED_HASH_VERSION_KZG: u8 = 0x01; -/// KZG Trusted setup raw -const TRUSTED_SETUP_RAW: &[u8] = include_bytes!("../../res/eip4844/trusted_setup.txt"); - -/// KZG trusted setup -pub static MAINNET_KZG_TRUSTED_SETUP: Lazy> = Lazy::new(|| { - Arc::new( - load_trusted_setup_from_bytes(TRUSTED_SETUP_RAW).expect("Failed to load trusted setup"), - ) -}); - -/// Loads the trusted setup parameters from the given bytes and returns the [KzgSettings]. -/// -/// This creates a temp file to store the bytes and then loads the [KzgSettings] from the file via -/// [KzgSettings::load_trusted_setup_file]. -pub fn load_trusted_setup_from_bytes(bytes: &[u8]) -> Result { - let mut file = tempfile::NamedTempFile::new().map_err(LoadKzgSettingsError::TempFileErr)?; - file.write_all(bytes).map_err(LoadKzgSettingsError::TempFileErr)?; - KzgSettings::load_trusted_setup_file(file.path()).map_err(LoadKzgSettingsError::KzgError) -} +#[cfg(feature = "c-kzg")] +mod trusted_setup { + use crate::kzg::KzgSettings; + use once_cell::sync::Lazy; + use std::{io::Write, sync::Arc}; + + /// KZG trusted setup + pub static MAINNET_KZG_TRUSTED_SETUP: Lazy> = Lazy::new(|| { + Arc::new( + c_kzg::KzgSettings::load_trusted_setup( + &revm_primitives::kzg::G1_POINTS.0, + &revm_primitives::kzg::G2_POINTS.0, + ) + .expect("failed to load trusted setup"), + ) + }); + + /// Loads the trusted setup parameters from the given bytes and returns the [KzgSettings]. + /// + /// This creates a temp file to store the bytes and then loads the [KzgSettings] from the file + /// via [KzgSettings::load_trusted_setup_file]. + pub fn load_trusted_setup_from_bytes( + bytes: &[u8], + ) -> Result { + let mut file = tempfile::NamedTempFile::new().map_err(LoadKzgSettingsError::TempFileErr)?; + file.write_all(bytes).map_err(LoadKzgSettingsError::TempFileErr)?; + KzgSettings::load_trusted_setup_file(file.path()).map_err(LoadKzgSettingsError::KzgError) + } -/// Error type for loading the trusted setup. -#[derive(Debug, thiserror::Error)] -pub enum LoadKzgSettingsError { - /// Failed to create temp file to store bytes for loading [KzgSettings] via - /// [KzgSettings::load_trusted_setup_file]. - #[error("Failed to setup temp file: {0:?}")] - TempFileErr(#[from] std::io::Error), - /// Kzg error - #[error("Kzg error: {0:?}")] - KzgError(c_kzg::Error), -} + /// Error type for loading the trusted setup. + #[derive(Debug, thiserror::Error)] + pub enum LoadKzgSettingsError { + /// Failed to create temp file to store bytes for loading [KzgSettings] via + /// [KzgSettings::load_trusted_setup_file]. + #[error("failed to setup temp file: {0}")] + TempFileErr(#[from] std::io::Error), + /// Kzg error + #[error("KZG error: {0:?}")] + KzgError(#[from] c_kzg::Error), + } -#[cfg(test)] -mod tests { - use super::*; + #[cfg(test)] + mod tests { + use super::*; + use std::sync::Arc; - #[test] - fn ensure_load_kzg_settings() { - let _settings = Arc::clone(&MAINNET_KZG_TRUSTED_SETUP); + #[test] + fn ensure_load_kzg_settings() { + let _settings = Arc::clone(&MAINNET_KZG_TRUSTED_SETUP); + } } } diff --git a/crates/primitives/src/eip4844.rs b/crates/primitives/src/eip4844.rs index bf84da3f755c..6d7668b59521 100644 --- a/crates/primitives/src/eip4844.rs +++ b/crates/primitives/src/eip4844.rs @@ -1,9 +1,8 @@ //! Helpers for working with EIP-4844 blob fee -use crate::{ - constants::eip4844::{TARGET_DATA_GAS_PER_BLOCK, VERSIONED_HASH_VERSION_KZG}, - kzg::KzgCommitment, - B256, -}; +use crate::constants::eip4844::TARGET_DATA_GAS_PER_BLOCK; +#[cfg(feature = "c-kzg")] +use crate::{constants::eip4844::VERSIONED_HASH_VERSION_KZG, kzg::KzgCommitment, B256}; +#[cfg(feature = "c-kzg")] use sha2::{Digest, Sha256}; // re-exports from revm for calculating blob fee @@ -12,6 +11,7 @@ pub use revm_primitives::calc_blob_gasprice; /// Calculates the versioned hash for a KzgCommitment /// /// Specified in [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844#header-extension) +#[cfg(feature = "c-kzg")] pub fn kzg_to_versioned_hash(commitment: KzgCommitment) -> B256 { let mut res = Sha256::digest(commitment.as_slice()); res[0] = VERSIONED_HASH_VERSION_KZG; diff --git a/crates/primitives/src/integer_list.rs b/crates/primitives/src/integer_list.rs index fe65ad588c60..90f53a27d5f2 100644 --- a/crates/primitives/src/integer_list.rs +++ b/crates/primitives/src/integer_list.rs @@ -146,10 +146,10 @@ impl<'a> Arbitrary<'a> for IntegerList { #[derive(Debug, thiserror::Error)] pub enum EliasFanoError { /// The provided input is invalid. - #[error("The provided input is invalid.")] + #[error("the provided input is invalid")] InvalidInput, /// Failed to deserialize data into type. - #[error("Failed to deserialize data into type.")] + #[error("failed to deserialize data into type")] FailedDeserialize, } diff --git a/crates/primitives/src/lib.rs b/crates/primitives/src/lib.rs index 2ac3b2131427..36fba28daafc 100644 --- a/crates/primitives/src/lib.rs +++ b/crates/primitives/src/lib.rs @@ -51,7 +51,7 @@ mod withdrawal; pub use account::{Account, Bytecode}; pub use block::{ Block, BlockBody, BlockBodyRoots, BlockHashOrNumber, BlockId, BlockNumHash, BlockNumberOrTag, - BlockWithSenders, ForkBlock, SealedBlock, SealedBlockWithSenders, + BlockWithSenders, ForkBlock, RpcBlockHash, SealedBlock, SealedBlockWithSenders, }; pub use bytes::{Buf, BufMut, BytesMut}; pub use chain::{ @@ -64,9 +64,10 @@ pub use constants::{ DEV_GENESIS_HASH, EMPTY_OMMER_ROOT_HASH, GOERLI_GENESIS_HASH, HOLESKY_GENESIS_HASH, KECCAK_EMPTY, MAINNET_GENESIS_HASH, SEPOLIA_GENESIS_HASH, }; +#[cfg(feature = "c-kzg")] pub use eip4844::{calculate_excess_blob_gas, kzg_to_versioned_hash}; pub use forkid::{ForkFilter, ForkHash, ForkId, ForkTransition, ValidationError}; -pub use genesis::{Genesis, GenesisAccount}; +pub use genesis::{ChainConfig, Genesis, GenesisAccount}; pub use hardfork::Hardfork; pub use header::{Head, Header, HeadersDirection, SealedHeader}; pub use integer_list::IntegerList; @@ -84,14 +85,20 @@ pub use receipt::{Receipt, ReceiptWithBloom, ReceiptWithBloomRef, Receipts}; pub use serde_helper::JsonU256; pub use snapshot::SnapshotSegment; pub use storage::StorageEntry; + +#[cfg(feature = "c-kzg")] +pub use transaction::{ + BlobTransaction, BlobTransactionSidecar, BlobTransactionValidationError, + FromRecoveredPooledTransaction, PooledTransactionsElement, + PooledTransactionsElementEcRecovered, +}; + pub use transaction::{ util::secp256k1::{public_key_to_address, recover_signer, sign_message}, - AccessList, AccessListItem, BlobTransaction, BlobTransactionSidecar, - BlobTransactionValidationError, FromRecoveredPooledTransaction, FromRecoveredTransaction, - IntoRecoveredTransaction, InvalidTransactionError, PooledTransactionsElement, - PooledTransactionsElementEcRecovered, Signature, Transaction, TransactionKind, TransactionMeta, + AccessList, AccessListItem, FromRecoveredTransaction, IntoRecoveredTransaction, + InvalidTransactionError, Signature, Transaction, TransactionKind, TransactionMeta, TransactionSigned, TransactionSignedEcRecovered, TransactionSignedNoHash, TxEip1559, TxEip2930, - TxEip4844, TxLegacy, TxType, TxValue, EIP1559_TX_TYPE_ID, EIP2930_TX_TYPE_ID, + TxEip4844, TxHashOrNumber, TxLegacy, TxType, TxValue, EIP1559_TX_TYPE_ID, EIP2930_TX_TYPE_ID, EIP4844_TX_TYPE_ID, LEGACY_TX_TYPE_ID, }; pub use withdrawal::Withdrawal; @@ -125,6 +132,7 @@ pub type H64 = B64; pub use arbitrary; /// EIP-4844 + KZG helpers +#[cfg(feature = "c-kzg")] pub mod kzg { pub use c_kzg::*; } diff --git a/crates/primitives/src/net.rs b/crates/primitives/src/net.rs index eeec5abae03b..afb43c871e82 100644 --- a/crates/primitives/src/net.rs +++ b/crates/primitives/src/net.rs @@ -1,118 +1,4 @@ -use crate::PeerId; -use alloy_rlp::{RlpDecodable, RlpEncodable}; -use secp256k1::{SecretKey, SECP256K1}; -use serde_with::{DeserializeFromStr, SerializeDisplay}; -use std::{ - fmt, - fmt::Write, - net::{IpAddr, Ipv4Addr, SocketAddr}, - num::ParseIntError, - str::FromStr, -}; -use url::{Host, Url}; - -/// Represents a ENR in discv4. -/// -/// Note: this is only an excerpt of the [`NodeRecord`] data structure. -#[derive( - Clone, - Copy, - Debug, - Eq, - PartialEq, - Hash, - SerializeDisplay, - DeserializeFromStr, - RlpEncodable, - RlpDecodable, -)] -pub struct NodeRecord { - /// The Address of a node. - pub address: IpAddr, - /// TCP port of the port that accepts connections. - pub tcp_port: u16, - /// UDP discovery port. - pub udp_port: u16, - /// Public key of the discovery service - pub id: PeerId, -} - -impl NodeRecord { - /// Derive the [`NodeRecord`] from the secret key and addr - pub fn from_secret_key(addr: SocketAddr, sk: &SecretKey) -> Self { - let pk = secp256k1::PublicKey::from_secret_key(SECP256K1, sk); - let id = PeerId::from_slice(&pk.serialize_uncompressed()[1..]); - Self::new(addr, id) - } - - /// Converts the `address` into an [`Ipv4Addr`] if the `address` is a mapped - /// [Ipv6Addr](std::net::Ipv6Addr). - /// - /// Returns `true` if the address was converted. - /// - /// See also [std::net::Ipv6Addr::to_ipv4_mapped] - pub fn convert_ipv4_mapped(&mut self) -> bool { - // convert IPv4 mapped IPv6 address - if let IpAddr::V6(v6) = self.address { - if let Some(v4) = v6.to_ipv4_mapped() { - self.address = v4.into(); - return true - } - } - false - } - - /// Same as [Self::convert_ipv4_mapped] but consumes the type - pub fn into_ipv4_mapped(mut self) -> Self { - self.convert_ipv4_mapped(); - self - } - - /// Creates a new record from a socket addr and peer id. - #[allow(unused)] - pub fn new(addr: SocketAddr, id: PeerId) -> Self { - Self { address: addr.ip(), tcp_port: addr.port(), udp_port: addr.port(), id } - } - - /// The TCP socket address of this node - #[must_use] - pub fn tcp_addr(&self) -> SocketAddr { - SocketAddr::new(self.address, self.tcp_port) - } - - /// The UDP socket address of this node - #[must_use] - pub fn udp_addr(&self) -> SocketAddr { - SocketAddr::new(self.address, self.udp_port) - } -} - -impl fmt::Display for NodeRecord { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str("enode://")?; - crate::hex::encode(self.id.as_slice()).fmt(f)?; - f.write_char('@')?; - match self.address { - IpAddr::V4(ip) => { - ip.fmt(f)?; - } - IpAddr::V6(ip) => { - // encapsulate with brackets - f.write_char('[')?; - ip.fmt(f)?; - f.write_char(']')?; - } - } - f.write_char(':')?; - self.tcp_port.fmt(f)?; - if self.tcp_port != self.udp_port { - f.write_str("?discport=")?; - self.udp_port.fmt(f)?; - } - - Ok(()) - } -} +pub use reth_rpc_types::NodeRecord; // @@ -180,60 +66,18 @@ fn parse_nodes(nodes: impl IntoIterator>) -> Vec Result { - let url = Url::parse(s).map_err(|e| NodeRecordParseError::InvalidUrl(e.to_string()))?; - - let address = match url.host() { - Some(Host::Ipv4(ip)) => IpAddr::V4(ip), - Some(Host::Ipv6(ip)) => IpAddr::V6(ip), - Some(Host::Domain(ip)) => IpAddr::V4( - Ipv4Addr::from_str(ip) - .map_err(|e| NodeRecordParseError::InvalidUrl(e.to_string()))?, - ), - _ => return Err(NodeRecordParseError::InvalidUrl(format!("invalid host: {url:?}"))), - }; - let port = url - .port() - .ok_or_else(|| NodeRecordParseError::InvalidUrl("no port specified".to_string()))?; - - let udp_port = if let Some(discovery_port) = url - .query_pairs() - .find_map(|(maybe_disc, port)| (maybe_disc.as_ref() == "discport").then_some(port)) - { - discovery_port.parse::().map_err(NodeRecordParseError::Discport)? - } else { - port - }; - - let id = url - .username() - .parse::() - .map_err(|e| NodeRecordParseError::InvalidId(e.to_string()))?; - - Ok(Self { address, id, tcp_port: port, udp_port }) - } -} - #[cfg(test)] mod tests { + use std::{ + net::{IpAddr, Ipv4Addr}, + str::FromStr, + }; + use super::*; use alloy_rlp::{Decodable, Encodable}; use bytes::BytesMut; use rand::{thread_rng, Rng, RngCore}; + use reth_rpc_types::PeerId; #[test] fn test_mapped_ipv6() { diff --git a/crates/primitives/src/peer.rs b/crates/primitives/src/peer.rs index af2f6c9d83ea..852f9e01c5b8 100644 --- a/crates/primitives/src/peer.rs +++ b/crates/primitives/src/peer.rs @@ -1,10 +1,5 @@ -use crate::B512; - -// TODO: should we use `PublicKey` for this? Even when dealing with public keys we should try to -// prevent misuse -/// This represents an uncompressed secp256k1 public key. -/// This encodes the concatenation of the x and y components of the affine point in bytes. -pub type PeerId = B512; +// Re-export PeerId for ease of use. +pub use reth_rpc_types::PeerId; /// Generic wrapper with peer id #[derive(Debug)] diff --git a/crates/primitives/src/prune/segment.rs b/crates/primitives/src/prune/segment.rs index 4f3e62027b0f..0806ce909ce5 100644 --- a/crates/primitives/src/prune/segment.rs +++ b/crates/primitives/src/prune/segment.rs @@ -43,10 +43,10 @@ impl PruneSegment { #[derive(Debug, Error, PartialEq, Eq, Clone)] pub enum PruneSegmentError { /// Invalid configuration of a prune segment. - #[error("The configuration provided for {0} is invalid.")] + #[error("the configuration provided for {0} is invalid")] Configuration(PruneSegment), /// Receipts have been pruned - #[error("Receipts have been pruned")] + #[error("receipts have been pruned")] ReceiptsPruned, } diff --git a/crates/primitives/src/serde_helper/mod.rs b/crates/primitives/src/serde_helper/mod.rs index 4792c2e9841d..6e78c5a7984f 100644 --- a/crates/primitives/src/serde_helper/mod.rs +++ b/crates/primitives/src/serde_helper/mod.rs @@ -6,8 +6,7 @@ use serde::{Deserialize, Deserializer, Serialize, Serializer}; mod storage; pub use storage::*; -mod jsonu256; -pub use jsonu256::*; +pub use reth_rpc_types::json_u256::*; pub mod num; diff --git a/crates/primitives/src/snapshot/mod.rs b/crates/primitives/src/snapshot/mod.rs index 6355ff0efe5d..d8fc8db53624 100644 --- a/crates/primitives/src/snapshot/mod.rs +++ b/crates/primitives/src/snapshot/mod.rs @@ -6,4 +6,7 @@ mod segment; pub use compression::Compression; pub use filters::{Filters, InclusionFilter, PerfectHashingFunction}; -pub use segment::SnapshotSegment; +pub use segment::{SegmentHeader, SnapshotSegment}; + +/// Default snapshot block count. +pub const BLOCKS_PER_SNAPSHOT: u64 = 500_000; diff --git a/crates/primitives/src/snapshot/segment.rs b/crates/primitives/src/snapshot/segment.rs index 8902e5005377..8a86768ede68 100644 --- a/crates/primitives/src/snapshot/segment.rs +++ b/crates/primitives/src/snapshot/segment.rs @@ -1,4 +1,8 @@ +use crate::{snapshot::PerfectHashingFunction, BlockNumber, TxNumber}; use serde::{Deserialize, Serialize}; +use std::{ops::RangeInclusive, path::PathBuf}; + +use super::{Compression, Filters, InclusionFilter}; #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash, Ord, PartialOrd, Deserialize, Serialize)] #[cfg_attr(feature = "clap", derive(clap::ValueEnum))] @@ -11,3 +15,105 @@ pub enum SnapshotSegment { /// Snapshot segment responsible for the `Receipts` table. Receipts, } + +impl SnapshotSegment { + /// Returns the default configuration of the segment. + const fn config(&self) -> (Filters, Compression) { + let default_config = ( + Filters::WithFilters(InclusionFilter::Cuckoo, super::PerfectHashingFunction::Fmph), + Compression::Lz4, + ); + + match self { + SnapshotSegment::Headers => default_config, + SnapshotSegment::Transactions => default_config, + SnapshotSegment::Receipts => default_config, + } + } + + /// Returns the default file name for the provided segment and range. + pub fn filename(&self, range: &RangeInclusive) -> PathBuf { + let (filters, compression) = self.config(); + self.filename_with_configuration(filters, compression, range) + } + + /// Returns file name for the provided segment, filters, compression and range. + pub fn filename_with_configuration( + &self, + filters: Filters, + compression: Compression, + range: &RangeInclusive, + ) -> PathBuf { + let segment_name = match self { + SnapshotSegment::Headers => "headers", + SnapshotSegment::Transactions => "transactions", + SnapshotSegment::Receipts => "receipts", + }; + let filters_name = match filters { + Filters::WithFilters(inclusion_filter, phf) => { + let inclusion_filter = match inclusion_filter { + InclusionFilter::Cuckoo => "cuckoo", + }; + let phf = match phf { + PerfectHashingFunction::Fmph => "fmph", + PerfectHashingFunction::GoFmph => "gofmph", + }; + format!("{inclusion_filter}-{phf}") + } + Filters::WithoutFilters => "none".to_string(), + }; + let compression_name = match compression { + Compression::Lz4 => "lz4", + Compression::Zstd => "zstd", + Compression::ZstdWithDictionary => "zstd-dict", + Compression::Uncompressed => "uncompressed", + }; + + format!( + "snapshot_{segment_name}_{}_{}_{filters_name}_{compression_name}", + range.start(), + range.end(), + ) + .into() + } +} + +/// A segment header that contains information common to all segments. Used for storage. +#[derive(Debug, Serialize, Deserialize, Eq, PartialEq, Hash)] +pub struct SegmentHeader { + /// Block range of the snapshot segment + block_range: RangeInclusive, + /// Transaction range of the snapshot segment + tx_range: RangeInclusive, + /// Segment type + segment: SnapshotSegment, +} + +impl SegmentHeader { + /// Returns [`SegmentHeader`]. + pub fn new( + block_range: RangeInclusive, + tx_range: RangeInclusive, + segment: SnapshotSegment, + ) -> Self { + Self { block_range, tx_range, segment } + } + + /// Returns the first block number of the segment. + pub fn block_start(&self) -> BlockNumber { + *self.block_range.start() + } + + /// Returns the first transaction number of the segment. + pub fn tx_start(&self) -> TxNumber { + *self.tx_range.start() + } + + /// Returns the row offset which depends on whether the segment is block or transaction based. + pub fn start(&self) -> u64 { + match self.segment { + SnapshotSegment::Headers => self.block_start(), + SnapshotSegment::Transactions | SnapshotSegment::Receipts => self.tx_start(), + } + } +} diff --git a/crates/primitives/src/stage/checkpoints.rs b/crates/primitives/src/stage/checkpoints.rs index 8225eddd691a..c03b5c6ca847 100644 --- a/crates/primitives/src/stage/checkpoints.rs +++ b/crates/primitives/src/stage/checkpoints.rs @@ -246,15 +246,6 @@ impl StageCheckpoint { } } -impl Display for StageCheckpoint { - fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { - match self.entities() { - Some(entities) => entities.fmt(f), - None => write!(f, "{}", self.block_number), - } - } -} - // TODO(alexey): add a merkle checkpoint. Currently it's hard because [`MerkleCheckpoint`] // is not a Copy type. /// Stage-specific checkpoint metrics. diff --git a/crates/primitives/src/transaction/eip4844.rs b/crates/primitives/src/transaction/eip4844.rs index d21d03266153..1f074f6aa2c9 100644 --- a/crates/primitives/src/transaction/eip4844.rs +++ b/crates/primitives/src/transaction/eip4844.rs @@ -1,32 +1,23 @@ use super::access_list::AccessList; use crate::{ - constants::eip4844::DATA_GAS_PER_BLOB, - keccak256, - kzg::{ - self, Blob, Bytes48, KzgCommitment, KzgProof, KzgSettings, BYTES_PER_BLOB, - BYTES_PER_COMMITMENT, BYTES_PER_PROOF, - }, - kzg_to_versioned_hash, Bytes, ChainId, Signature, Transaction, TransactionKind, - TransactionSigned, TxHash, TxType, TxValue, B256, EIP4844_TX_TYPE_ID, + constants::eip4844::DATA_GAS_PER_BLOB, keccak256, Bytes, ChainId, Signature, TransactionKind, + TxType, TxValue, B256, }; -use alloy_rlp::{length_of_length, Decodable, Encodable, Error as RlpError, Header}; -use bytes::BytesMut; -use reth_codecs::{main_codec, Compact}; -use serde::{Deserialize, Serialize}; -use std::{mem, ops::Deref}; -#[cfg(any(test, feature = "arbitrary"))] -use proptest::{ - arbitrary::{any as proptest_any, ParamsFor}, - collection::vec as proptest_vec, - strategy::{BoxedStrategy, Strategy}, -}; +#[cfg(feature = "c-kzg")] +use crate::transaction::sidecar::*; -#[cfg(any(test, feature = "arbitrary"))] -use crate::{ - constants::eip4844::{FIELD_ELEMENTS_PER_BLOB, MAINNET_KZG_TRUSTED_SETUP}, - kzg::BYTES_PER_FIELD_ELEMENT, -}; +#[cfg(feature = "c-kzg")] +use crate::kzg_to_versioned_hash; + +#[cfg(feature = "c-kzg")] +use crate::kzg::{self, KzgCommitment, KzgProof, KzgSettings}; +use alloy_rlp::{length_of_length, Decodable, Encodable, Header}; +use bytes::BytesMut; +use reth_codecs::{main_codec, Compact}; +use std::mem; +#[cfg(feature = "c-kzg")] +use std::ops::Deref; /// [EIP-4844 Blob Transaction](https://eips.ethereum.org/EIPS/eip-4844#blob-transaction) /// @@ -127,6 +118,7 @@ impl TxEip4844 { /// Returns [BlobTransactionValidationError::InvalidProof] if any blob KZG proof in the response /// fails to verify, or if the versioned hashes in the transaction do not match the actual /// commitment versioned hashes. + #[cfg(feature = "c-kzg")] pub fn validate_blob( &self, sidecar: &BlobTransactionSidecar, @@ -326,437 +318,3 @@ impl TxEip4844 { keccak256(&buf) } } - -/// An error that can occur when validating a [BlobTransaction]. -#[derive(Debug, thiserror::Error)] -pub enum BlobTransactionValidationError { - /// Proof validation failed. - #[error("invalid kzg proof")] - InvalidProof, - /// An error returned by the [kzg] library - #[error("kzg error: {0:?}")] - KZGError(kzg::Error), - /// The inner transaction is not a blob transaction - #[error("unable to verify proof for non blob transaction: {0}")] - NotBlobTransaction(u8), -} - -impl From for BlobTransactionValidationError { - fn from(value: kzg::Error) -> Self { - Self::KZGError(value) - } -} - -/// A response to `GetPooledTransactions` that includes blob data, their commitments, and their -/// corresponding proofs. -/// -/// This is defined in [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844#networking) as an element -/// of a `PooledTransactions` response. -#[derive(Clone, Debug, PartialEq, Eq, Default, Serialize, Deserialize)] -pub struct BlobTransaction { - /// The transaction hash. - pub hash: TxHash, - /// The transaction payload. - pub transaction: TxEip4844, - /// The transaction signature. - pub signature: Signature, - /// The transaction's blob sidecar. - pub sidecar: BlobTransactionSidecar, -} - -impl BlobTransaction { - /// Constructs a new [BlobTransaction] from a [TransactionSigned] and a - /// [BlobTransactionSidecar]. - /// - /// Returns an error if the signed transaction is not [TxEip4844] - pub fn try_from_signed( - tx: TransactionSigned, - sidecar: BlobTransactionSidecar, - ) -> Result { - let TransactionSigned { transaction, signature, hash } = tx; - match transaction { - Transaction::Eip4844(transaction) => Ok(Self { hash, transaction, signature, sidecar }), - transaction => { - let tx = TransactionSigned { transaction, signature, hash }; - Err((tx, sidecar)) - } - } - } - - /// Verifies that the transaction's blob data, commitments, and proofs are all valid. - /// - /// See also [TxEip4844::validate_blob] - pub fn validate( - &self, - proof_settings: &KzgSettings, - ) -> Result<(), BlobTransactionValidationError> { - self.transaction.validate_blob(&self.sidecar, proof_settings) - } - - /// Splits the [BlobTransaction] into its [TransactionSigned] and [BlobTransactionSidecar] - /// components. - pub fn into_parts(self) -> (TransactionSigned, BlobTransactionSidecar) { - let transaction = TransactionSigned { - transaction: Transaction::Eip4844(self.transaction), - hash: self.hash, - signature: self.signature, - }; - - (transaction, self.sidecar) - } - - /// Encodes the [BlobTransaction] fields as RLP, with a tx type. If `with_header` is `false`, - /// the following will be encoded: - /// `tx_type (0x03) || rlp([transaction_payload_body, blobs, commitments, proofs])` - /// - /// If `with_header` is `true`, the following will be encoded: - /// `rlp(tx_type (0x03) || rlp([transaction_payload_body, blobs, commitments, proofs]))` - /// - /// NOTE: The header will be a byte string header, not a list header. - pub(crate) fn encode_with_type_inner(&self, out: &mut dyn bytes::BufMut, with_header: bool) { - // Calculate the length of: - // `tx_type || rlp([transaction_payload_body, blobs, commitments, proofs])` - // - // to construct and encode the string header - if with_header { - Header { - list: false, - // add one for the tx type - payload_length: 1 + self.payload_len(), - } - .encode(out); - } - - out.put_u8(EIP4844_TX_TYPE_ID); - - // Now we encode the inner blob transaction: - self.encode_inner(out); - } - - /// Encodes the [BlobTransaction] fields as RLP, with the following format: - /// `rlp([transaction_payload_body, blobs, commitments, proofs])` - /// - /// where `transaction_payload_body` is a list: - /// `[chain_id, nonce, max_priority_fee_per_gas, ..., y_parity, r, s]` - /// - /// Note: this should be used only when implementing other RLP encoding methods, and does not - /// represent the full RLP encoding of the blob transaction. - pub(crate) fn encode_inner(&self, out: &mut dyn bytes::BufMut) { - // First we construct both required list headers. - // - // The `transaction_payload_body` length is the length of the fields, plus the length of - // its list header. - let tx_header = Header { - list: true, - payload_length: self.transaction.fields_len() + self.signature.payload_len(), - }; - - let tx_length = tx_header.length() + tx_header.payload_length; - - // The payload length is the length of the `tranascation_payload_body` list, plus the - // length of the blobs, commitments, and proofs. - let payload_length = tx_length + self.sidecar.fields_len(); - - // First we use the payload len to construct the first list header - let blob_tx_header = Header { list: true, payload_length }; - - // Encode the blob tx header first - blob_tx_header.encode(out); - - // Encode the inner tx list header, then its fields - tx_header.encode(out); - self.transaction.encode_fields(out); - - // Encode the signature - self.signature.encode(out); - - // Encode the blobs, commitments, and proofs - self.sidecar.encode_inner(out); - } - - /// Ouputs the length of the RLP encoding of the blob transaction, including the tx type byte, - /// optionally including the length of a wrapping string header. If `with_header` is `false`, - /// the length of the following will be calculated: - /// `tx_type (0x03) || rlp([transaction_payload_body, blobs, commitments, proofs])` - /// - /// If `with_header` is `true`, the length of the following will be calculated: - /// `rlp(tx_type (0x03) || rlp([transaction_payload_body, blobs, commitments, proofs]))` - pub(crate) fn payload_len_with_type(&self, with_header: bool) -> usize { - if with_header { - // Construct a header and use that to calculate the total length - let wrapped_header = Header { - list: false, - // add one for the tx type byte - payload_length: 1 + self.payload_len(), - }; - - // The total length is now the length of the header plus the length of the payload - // (which includes the tx type byte) - wrapped_header.length() + wrapped_header.payload_length - } else { - // Just add the length of the tx type to the payload length - 1 + self.payload_len() - } - } - - /// Outputs the length of the RLP encoding of the blob transaction with the following format: - /// `rlp([transaction_payload_body, blobs, commitments, proofs])` - /// - /// where `transaction_payload_body` is a list: - /// `[chain_id, nonce, max_priority_fee_per_gas, ..., y_parity, r, s]` - /// - /// Note: this should be used only when implementing other RLP encoding length methods, and - /// does not represent the full RLP encoding of the blob transaction. - pub(crate) fn payload_len(&self) -> usize { - // The `transaction_payload_body` length is the length of the fields, plus the length of - // its list header. - let tx_header = Header { - list: true, - payload_length: self.transaction.fields_len() + self.signature.payload_len(), - }; - - let tx_length = tx_header.length() + tx_header.payload_length; - - // The payload length is the length of the `tranascation_payload_body` list, plus the - // length of the blobs, commitments, and proofs. - let payload_length = tx_length + self.sidecar.fields_len(); - - // We use the calculated payload len to construct the first list header, which encompasses - // everything in the tx - the length of the second, inner list header is part of - // payload_length - let blob_tx_header = Header { list: true, payload_length }; - - // The final length is the length of: - // * the outer blob tx header + - // * the inner tx header + - // * the inner tx fields + - // * the signature fields + - // * the sidecar fields - blob_tx_header.length() + blob_tx_header.payload_length - } - - /// Decodes a [BlobTransaction] from RLP. This expects the encoding to be: - /// `rlp([transaction_payload_body, blobs, commitments, proofs])` - /// - /// where `transaction_payload_body` is a list: - /// `[chain_id, nonce, max_priority_fee_per_gas, ..., y_parity, r, s]` - /// - /// Note: this should be used only when implementing other RLP decoding methods, and does not - /// represent the full RLP decoding of the `PooledTransactionsElement` type. - pub(crate) fn decode_inner(data: &mut &[u8]) -> alloy_rlp::Result { - // decode the _first_ list header for the rest of the transaction - let header = Header::decode(data)?; - if !header.list { - return Err(RlpError::Custom("PooledTransactions blob tx must be encoded as a list")) - } - - // Now we need to decode the inner 4844 transaction and its signature: - // - // `[chain_id, nonce, max_priority_fee_per_gas, ..., y_parity, r, s]` - let header = Header::decode(data)?; - if !header.list { - return Err(RlpError::Custom( - "PooledTransactions inner blob tx must be encoded as a list", - )) - } - - // inner transaction - let transaction = TxEip4844::decode_inner(data)?; - - // signature - let signature = Signature::decode(data)?; - - // All that's left are the blobs, commitments, and proofs - let sidecar = BlobTransactionSidecar::decode_inner(data)?; - - // # Calculating the hash - // - // The full encoding of the `PooledTransaction` response is: - // `tx_type (0x03) || rlp([tx_payload_body, blobs, commitments, proofs])` - // - // The transaction hash however, is: - // `keccak256(tx_type (0x03) || rlp(tx_payload_body))` - // - // Note that this is `tx_payload_body`, not `[tx_payload_body]`, which would be - // `[[chain_id, nonce, max_priority_fee_per_gas, ...]]`, i.e. a list within a list. - // - // Because the pooled transaction encoding is different than the hash encoding for - // EIP-4844 transactions, we do not use the original buffer to calculate the hash. - // - // Instead, we use `encode_with_signature`, which RLP encodes the transaction with a - // signature for hashing without a header. We then hash the result. - let mut buf = Vec::new(); - transaction.encode_with_signature(&signature, &mut buf, false); - let hash = keccak256(&buf); - - Ok(Self { transaction, hash, signature, sidecar }) - } -} - -/// This represents a set of blobs, and its corresponding commitments and proofs. -#[derive(Clone, Debug, PartialEq, Eq, Default, Serialize, Deserialize)] -#[repr(C)] -pub struct BlobTransactionSidecar { - /// The blob data. - pub blobs: Vec, - /// The blob commitments. - pub commitments: Vec, - /// The blob proofs. - pub proofs: Vec, -} - -impl BlobTransactionSidecar { - /// Creates a new [BlobTransactionSidecar] using the given blobs, commitments, and proofs. - pub fn new(blobs: Vec, commitments: Vec, proofs: Vec) -> Self { - Self { blobs, commitments, proofs } - } - - /// Encodes the inner [BlobTransactionSidecar] fields as RLP bytes, without a RLP header. - /// - /// This encodes the fields in the following order: - /// - `blobs` - /// - `commitments` - /// - `proofs` - pub(crate) fn encode_inner(&self, out: &mut dyn bytes::BufMut) { - BlobTransactionSidecarRlp::wrap_ref(self).encode(out); - } - - /// Outputs the RLP length of the [BlobTransactionSidecar] fields, without a RLP header. - pub fn fields_len(&self) -> usize { - BlobTransactionSidecarRlp::wrap_ref(self).fields_len() - } - - /// Decodes the inner [BlobTransactionSidecar] fields from RLP bytes, without a RLP header. - /// - /// This decodes the fields in the following order: - /// - `blobs` - /// - `commitments` - /// - `proofs` - pub(crate) fn decode_inner(buf: &mut &[u8]) -> alloy_rlp::Result { - Ok(BlobTransactionSidecarRlp::decode(buf)?.unwrap()) - } - - /// Calculates a size heuristic for the in-memory size of the [BlobTransactionSidecar]. - #[inline] - pub fn size(&self) -> usize { - self.blobs.len() * BYTES_PER_BLOB + // blobs - self.commitments.len() * BYTES_PER_COMMITMENT + // commitments - self.proofs.len() * BYTES_PER_PROOF // proofs - } -} - -// Wrapper for c-kzg rlp -#[repr(C)] -struct BlobTransactionSidecarRlp { - blobs: Vec<[u8; c_kzg::BYTES_PER_BLOB]>, - commitments: Vec<[u8; 48]>, - proofs: Vec<[u8; 48]>, -} - -const _: [(); std::mem::size_of::()] = - [(); std::mem::size_of::()]; - -impl BlobTransactionSidecarRlp { - fn wrap_ref(other: &BlobTransactionSidecar) -> &Self { - // SAFETY: Same repr and size - unsafe { &*(other as *const BlobTransactionSidecar).cast::() } - } - - fn unwrap(self) -> BlobTransactionSidecar { - // SAFETY: Same repr and size - unsafe { std::mem::transmute(self) } - } - - fn encode(&self, out: &mut dyn bytes::BufMut) { - // Encode the blobs, commitments, and proofs - self.blobs.encode(out); - self.commitments.encode(out); - self.proofs.encode(out); - } - - fn fields_len(&self) -> usize { - self.blobs.length() + self.commitments.length() + self.proofs.length() - } - - fn decode(buf: &mut &[u8]) -> alloy_rlp::Result { - Ok(Self { - blobs: Decodable::decode(buf)?, - commitments: Decodable::decode(buf)?, - proofs: Decodable::decode(buf)?, - }) - } -} - -#[cfg(any(test, feature = "arbitrary"))] -impl<'a> arbitrary::Arbitrary<'a> for BlobTransactionSidecar { - fn arbitrary(u: &mut arbitrary::Unstructured<'a>) -> arbitrary::Result { - let mut arr = [0u8; BYTES_PER_BLOB]; - let blobs: Vec = (0..u.int_in_range(1..=16)?) - .map(|_| { - arr = arbitrary::Arbitrary::arbitrary(u).unwrap(); - - // Ensure that each blob is cacnonical by ensuring each field element contained in - // the blob is < BLS_MODULUS - for i in 0..(FIELD_ELEMENTS_PER_BLOB as usize) { - arr[i * BYTES_PER_FIELD_ELEMENT] = 0; - } - - Blob::from(arr) - }) - .collect(); - - Ok(generate_blob_sidecar(blobs)) - } -} - -#[cfg(any(test, feature = "arbitrary"))] -impl proptest::arbitrary::Arbitrary for BlobTransactionSidecar { - type Parameters = ParamsFor; - type Strategy = BoxedStrategy; - - fn arbitrary_with(_args: Self::Parameters) -> Self::Strategy { - proptest_vec(proptest_vec(proptest_any::(), BYTES_PER_BLOB), 1..=5) - .prop_map(move |blobs| { - let blobs = blobs - .into_iter() - .map(|mut blob| { - let mut arr = [0u8; BYTES_PER_BLOB]; - - // Ensure that each blob is cacnonical by ensuring each field element - // contained in the blob is < BLS_MODULUS - for i in 0..(FIELD_ELEMENTS_PER_BLOB as usize) { - blob[i * BYTES_PER_FIELD_ELEMENT] = 0; - } - - arr.copy_from_slice(blob.as_slice()); - arr.into() - }) - .collect(); - - generate_blob_sidecar(blobs) - }) - .boxed() - } -} - -#[cfg(any(test, feature = "arbitrary"))] -fn generate_blob_sidecar(blobs: Vec) -> BlobTransactionSidecar { - let kzg_settings = MAINNET_KZG_TRUSTED_SETUP.clone(); - - let commitments: Vec = blobs - .iter() - .map(|blob| KzgCommitment::blob_to_kzg_commitment(&blob.clone(), &kzg_settings).unwrap()) - .map(|commitment| commitment.to_bytes()) - .collect(); - - let proofs: Vec = blobs - .iter() - .zip(commitments.iter()) - .map(|(blob, commitment)| { - KzgProof::compute_blob_kzg_proof(blob, commitment, &kzg_settings).unwrap() - }) - .map(|proof| proof.to_bytes()) - .collect(); - - BlobTransactionSidecar { blobs, commitments, proofs } -} diff --git a/crates/primitives/src/transaction/error.rs b/crates/primitives/src/transaction/error.rs index b45ac8cb08b7..7542e8f5c8f7 100644 --- a/crates/primitives/src/transaction/error.rs +++ b/crates/primitives/src/transaction/error.rs @@ -6,49 +6,51 @@ use crate::U256; #[derive(Debug, Clone, Eq, PartialEq, thiserror::Error)] pub enum InvalidTransactionError { /// The sender does not have enough funds to cover the transaction fees - #[error("Sender does not have enough funds ({available_funds:?}) to cover transaction fees: {cost:?}.")] + #[error( + "sender does not have enough funds ({available_funds}) to cover transaction fees: {cost}" + )] InsufficientFunds { cost: U256, available_funds: U256 }, /// The nonce is lower than the account's nonce, or there is a nonce gap present. /// /// This is a consensus error. - #[error("Transaction nonce is not consistent.")] + #[error("transaction nonce is not consistent")] NonceNotConsistent, /// The transaction is before Spurious Dragon and has a chain ID - #[error("Transactions before Spurious Dragon should not have a chain ID.")] + #[error("transactions before Spurious Dragon should not have a chain ID")] OldLegacyChainId, /// The chain ID in the transaction does not match the current network configuration. - #[error("Transaction's chain ID does not match.")] + #[error("transaction's chain ID does not match")] ChainIdMismatch, /// The transaction requires EIP-2930 which is not enabled currently. - #[error("EIP-2930 transactions are disabled.")] + #[error("EIP-2930 transactions are disabled")] Eip2930Disabled, /// The transaction requires EIP-1559 which is not enabled currently. - #[error("EIP-1559 transactions are disabled.")] + #[error("EIP-1559 transactions are disabled")] Eip1559Disabled, /// The transaction requires EIP-4844 which is not enabled currently. - #[error("EIP-4844 transactions are disabled.")] + #[error("EIP-4844 transactions are disabled")] Eip4844Disabled, /// Thrown if a transaction is not supported in the current network configuration. - #[error("Transaction type not supported")] + #[error("transaction type not supported")] TxTypeNotSupported, /// The calculated gas of the transaction exceeds `u64::MAX`. - #[error("Gas overflow (maximum of u64)")] + #[error("gas overflow (maximum of u64)")] GasUintOverflow, /// The transaction is specified to use less gas than required to start the /// invocation. - #[error("Intrinsic gas too low")] + #[error("intrinsic gas too low")] GasTooLow, /// The transaction gas exceeds the limit - #[error("Intrinsic gas too high")] + #[error("intrinsic gas too high")] GasTooHigh, /// Thrown to ensure no one is able to specify a transaction with a tip higher than the total /// fee cap. - #[error("Max priority fee per gas higher than max fee per gas")] + #[error("max priority fee per gas higher than max fee per gas")] TipAboveFeeCap, /// Thrown post London if the transaction's fee is less than the base fee of the block - #[error("Max fee per gas less than block base fee")] + #[error("max fee per gas less than block base fee")] FeeCapTooLow, /// Thrown if the sender of a transaction is a contract. - #[error("Transaction signer has bytecode set.")] + #[error("transaction signer has bytecode set")] SignerAccountHasBytecode, } diff --git a/crates/primitives/src/transaction/mod.rs b/crates/primitives/src/transaction/mod.rs index 664fd3137128..3c05d849c09a 100644 --- a/crates/primitives/src/transaction/mod.rs +++ b/crates/primitives/src/transaction/mod.rs @@ -1,6 +1,6 @@ use crate::{ compression::{TRANSACTION_COMPRESSOR, TRANSACTION_DECOMPRESSOR}, - keccak256, Address, Bytes, TxHash, B256, + keccak256, Address, BlockHashOrNumber, Bytes, TxHash, B256, }; use alloy_rlp::{ Decodable, Encodable, Error as RlpError, Header, EMPTY_LIST_CODE, EMPTY_STRING_CODE, @@ -16,13 +16,15 @@ use std::mem; pub use access_list::{AccessList, AccessListItem}; pub use eip1559::TxEip1559; pub use eip2930::TxEip2930; -pub use eip4844::{ - BlobTransaction, BlobTransactionSidecar, BlobTransactionValidationError, TxEip4844, -}; +pub use eip4844::TxEip4844; + pub use error::InvalidTransactionError; pub use legacy::TxLegacy; pub use meta::TransactionMeta; +#[cfg(feature = "c-kzg")] pub use pooled::{PooledTransactionsElement, PooledTransactionsElementEcRecovered}; +#[cfg(feature = "c-kzg")] +pub use sidecar::{BlobTransaction, BlobTransactionSidecar, BlobTransactionValidationError}; pub use signature::Signature; pub use tx_type::{ TxType, EIP1559_TX_TYPE_ID, EIP2930_TX_TYPE_ID, EIP4844_TX_TYPE_ID, LEGACY_TX_TYPE_ID, @@ -37,7 +39,10 @@ mod eip4844; mod error; mod legacy; mod meta; +#[cfg(feature = "c-kzg")] mod pooled; +#[cfg(feature = "c-kzg")] +mod sidecar; mod signature; mod tx_type; mod tx_value; @@ -302,50 +307,35 @@ impl Transaction { } } - // TODO: dedup with effective_tip_per_gas - /// Determine the effective gas limit for the given transaction and base fee. - /// If the base fee is `None`, the `max_priority_fee_per_gas`, or gas price for non-EIP1559 - /// transactions is returned. - /// - /// If the `max_fee_per_gas` is less than the base fee, `None` returned. - pub fn effective_gas_tip(&self, base_fee: Option) -> Option { - if let Some(base_fee) = base_fee { - let max_fee_per_gas = self.max_fee_per_gas(); - - if max_fee_per_gas < base_fee as u128 { - None - } else { - let effective_max_fee = max_fee_per_gas - base_fee as u128; - Some(std::cmp::min(effective_max_fee, self.priority_fee_or_price())) - } - } else { - Some(self.priority_fee_or_price()) - } - } - /// Returns the effective miner gas tip cap (`gasTipCap`) for the given base fee: /// `min(maxFeePerGas - baseFee, maxPriorityFeePerGas)` /// + /// If the base fee is `None`, the `max_priority_fee_per_gas`, or gas price for non-EIP1559 + /// transactions is returned. + /// /// Returns `None` if the basefee is higher than the [Transaction::max_fee_per_gas]. - pub fn effective_tip_per_gas(&self, base_fee: u64) -> Option { - let base_fee = base_fee as u128; + pub fn effective_tip_per_gas(&self, base_fee: Option) -> Option { + let base_fee = match base_fee { + Some(base_fee) => base_fee as u128, + None => return Some(self.priority_fee_or_price()), + }; + let max_fee_per_gas = self.max_fee_per_gas(); + // Check if max_fee_per_gas is less than base_fee if max_fee_per_gas < base_fee { return None } - // the miner tip is the difference between the max fee and the base fee or the - // max_priority_fee_per_gas, whatever is lower - - // SAFETY: max_fee_per_gas >= base_fee + // Calculate the difference between max_fee_per_gas and base_fee let fee = max_fee_per_gas - base_fee; + // Compare the fee with max_priority_fee_per_gas (or gas price for non-EIP1559 transactions) if let Some(priority_fee) = self.max_priority_fee_per_gas() { - return Some(fee.min(priority_fee)) + Some(fee.min(priority_fee)) + } else { + Some(fee) } - - Some(fee) } /// Get the transaction's input field. @@ -726,6 +716,21 @@ impl TransactionSignedNoHash { pub fn with_hash(self) -> TransactionSigned { self.into() } + + /// Recovers a list of signers from a transaction list iterator + /// + /// Returns `None`, if some transaction's signature is invalid, see also + /// [Self::recover_signer]. + pub fn recover_signers<'a, T>(txes: T, num_txes: usize) -> Option> + where + T: IntoParallelIterator + IntoIterator + Send, + { + if num_txes < *PARALLEL_SENDER_RECOVERY_THRESHOLD { + txes.into_iter().map(|tx| tx.recover_signer()).collect() + } else { + txes.into_par_iter().map(|tx| tx.recover_signer()).collect() + } + } } impl Compact for TransactionSignedNoHash { @@ -968,8 +973,6 @@ impl TransactionSigned { /// /// Refer to the docs for [Self::decode_rlp_legacy_transaction] for details on the exact /// format expected. - // TODO: make buf advancement semantics consistent with `decode_enveloped_typed_transaction`, - // so decoding methods do not need to manually advance the buffer pub(crate) fn decode_rlp_legacy_transaction_tuple( data: &mut &[u8], ) -> alloy_rlp::Result<(TxLegacy, TxHash, Signature)> { @@ -977,6 +980,13 @@ impl TransactionSigned { let original_encoding = *data; let header = Header::decode(data)?; + let remaining_len = data.len(); + + let transaction_payload_len = header.payload_length; + + if transaction_payload_len > remaining_len { + return Err(RlpError::InputTooShort) + } let mut transaction = TxLegacy { nonce: Decodable::decode(data)?, @@ -990,6 +1000,12 @@ impl TransactionSigned { let (signature, extracted_id) = Signature::decode_with_eip155_chain_id(data)?; transaction.chain_id = extracted_id; + // check the new length, compared to the original length and the header length + let decoded = remaining_len - data.len(); + if decoded != transaction_payload_len { + return Err(RlpError::UnexpectedLength) + } + let tx_length = header.payload_length + header.length(); let hash = keccak256(&original_encoding[..tx_length]); Ok((transaction, hash, signature)) @@ -1039,6 +1055,8 @@ impl TransactionSigned { return Err(RlpError::Custom("typed tx fields must be encoded as a list")) } + let remaining_len = data.len(); + // length of tx encoding = tx type byte (size = 1) + length of header + payload length let tx_length = 1 + header.length() + header.payload_length; @@ -1052,6 +1070,11 @@ impl TransactionSigned { let signature = Signature::decode(data)?; + let bytes_consumed = remaining_len - data.len(); + if bytes_consumed != header.payload_length { + return Err(RlpError::UnexpectedLength) + } + let hash = keccak256(&original_encoding[..tx_length]); let signed = TransactionSigned { transaction, hash, signature }; Ok(signed) @@ -1151,9 +1174,21 @@ impl Decodable for TransactionSigned { let mut original_encoding = *buf; let header = Header::decode(buf)?; + let remaining_len = buf.len(); + // if the transaction is encoded as a string then it is a typed transaction if !header.list { - TransactionSigned::decode_enveloped_typed_transaction(buf) + let tx = TransactionSigned::decode_enveloped_typed_transaction(buf)?; + + let bytes_consumed = remaining_len - buf.len(); + // because Header::decode works for single bytes (including the tx type), returning a + // string Header with payload_length of 1, we need to make sure this check is only + // performed for transactions with a string header + if bytes_consumed != header.payload_length && original_encoding[0] > EMPTY_STRING_CODE { + return Err(RlpError::UnexpectedLength) + } + + Ok(tx) } else { let tx = TransactionSigned::decode_rlp_legacy_transaction(&mut original_encoding)?; @@ -1286,6 +1321,7 @@ impl FromRecoveredTransaction for TransactionSignedEcRecovered { /// /// This is a conversion trait that'll ensure transactions received via P2P can be converted to the /// transaction type that the transaction pool uses. +#[cfg(feature = "c-kzg")] pub trait FromRecoveredPooledTransaction { /// Converts to this type from the given [`PooledTransactionsElementEcRecovered`]. fn from_recovered_transaction(tx: PooledTransactionsElementEcRecovered) -> Self; @@ -1307,6 +1343,9 @@ impl IntoRecoveredTransaction for TransactionSignedEcRecovered { } } +/// Either a transaction hash or number. +pub type TxHashOrNumber = BlockHashOrNumber; + #[cfg(test)] mod tests { use crate::{ diff --git a/crates/primitives/src/transaction/pooled.rs b/crates/primitives/src/transaction/pooled.rs index 005f36a05487..2d2d8a322f20 100644 --- a/crates/primitives/src/transaction/pooled.rs +++ b/crates/primitives/src/transaction/pooled.rs @@ -1,5 +1,8 @@ //! Defines the types for blob transactions, legacy, and other EIP-2718 transactions included in a //! response to `GetPooledTransactions`. +#![cfg(feature = "c-kzg")] +#![cfg_attr(docsrs, doc(cfg(feature = "c-kzg")))] + use crate::{ Address, BlobTransaction, Bytes, Signature, Transaction, TransactionSigned, TransactionSignedEcRecovered, TxEip1559, TxEip2930, TxHash, TxLegacy, B256, EIP4844_TX_TYPE_ID, @@ -321,7 +324,7 @@ impl Decodable for PooledTransactionsElement { return Err(RlpError::InputTooShort) } - // keep this around for buffer advancement post-legacy decoding + // keep the original buf around for legacy decoding let mut original_encoding = *buf; // If the header is a list header, it is a legacy transaction. Otherwise, it is a typed @@ -334,7 +337,7 @@ impl Decodable for PooledTransactionsElement { let (transaction, hash, signature) = TransactionSigned::decode_rlp_legacy_transaction_tuple(&mut original_encoding)?; - // advance the buffer based on how far `decode_rlp_legacy_transaction` advanced the + // advance the buffer by however long the legacy transaction decoding advanced the // buffer *buf = original_encoding; @@ -342,6 +345,7 @@ impl Decodable for PooledTransactionsElement { } else { // decode the type byte, only decode BlobTransaction if it is a 4844 transaction let tx_type = *buf.first().ok_or(RlpError::InputTooShort)?; + let remaining_len = buf.len(); if tx_type == EIP4844_TX_TYPE_ID { // Recall that the blob transaction response `TranactionPayload` is encoded like @@ -359,12 +363,25 @@ impl Decodable for PooledTransactionsElement { // Now, we decode the inner blob transaction: // `rlp([[chain_id, nonce, ...], blobs, commitments, proofs])` let blob_tx = BlobTransaction::decode_inner(buf)?; + + // check that the bytes consumed match the payload length + let bytes_consumed = remaining_len - buf.len(); + if bytes_consumed != header.payload_length { + return Err(RlpError::UnexpectedLength) + } + Ok(PooledTransactionsElement::BlobTransaction(blob_tx)) } else { // DO NOT advance the buffer for the type, since we want the enveloped decoding to // decode it again and advance the buffer on its own. let typed_tx = TransactionSigned::decode_enveloped_typed_transaction(buf)?; + // check that the bytes consumed match the payload length + let bytes_consumed = remaining_len - buf.len(); + if bytes_consumed != header.payload_length { + return Err(RlpError::UnexpectedLength) + } + // because we checked the tx type, we can be sure that the transaction is not a // blob transaction or legacy match typed_tx.transaction { @@ -514,3 +531,82 @@ impl From for PooledTransactionsElementEcRecovered Self { transaction, signer } } } + +#[cfg(test)] +mod tests { + use super::*; + use alloy_primitives::hex; + use assert_matches::assert_matches; + + #[test] + fn invalid_legacy_pooled_decoding_input_too_short() { + let input_too_short = [ + // this should fail because the payload length is longer than expected + &hex!("d90b0280808bc5cd028083c5cdfd9e407c56565656")[..], + // these should fail decoding + // + // The `c1` at the beginning is a list header, and the rest is a valid legacy + // transaction, BUT the payload length of the list header is 1, and the payload is + // obviously longer than one byte. + &hex!("c10b02808083c5cd028883c5cdfd9e407c56565656"), + &hex!("c10b0280808bc5cd028083c5cdfd9e407c56565656"), + // this one is 19 bytes, and the buf is long enough, but the transaction will not + // consume that many bytes. + &hex!("d40b02808083c5cdeb8783c5acfd9e407c5656565656"), + &hex!("d30102808083c5cd02887dc5cdfd9e64fd9e407c56"), + ]; + + for hex_data in input_too_short.iter() { + let input_rlp = &mut &hex_data[..]; + let res = PooledTransactionsElement::decode(input_rlp); + + assert!( + res.is_err(), + "expected err after decoding rlp input: {:x?}", + Bytes::copy_from_slice(hex_data) + ); + + // this is a legacy tx so we can attempt the same test with decode_enveloped + let input_rlp = &mut &hex_data[..]; + let res = + PooledTransactionsElement::decode_enveloped(Bytes::copy_from_slice(input_rlp)); + + assert!( + res.is_err(), + "expected err after decoding enveloped rlp input: {:x?}", + Bytes::copy_from_slice(hex_data) + ); + } + } + + #[test] + fn legacy_valid_pooled_decoding() { + // d3 <- payload length, d3 - c0 = 0x13 = 19 + // 0b <- nonce + // 02 <- gas_price + // 80 <- gas_limit + // 80 <- to (Create) + // 83 c5cdeb <- value + // 87 83c5acfd9e407c <- input + // 56 <- v (eip155, so modified with a chain id) + // 56 <- r + // 56 <- s + let data = &hex!("d30b02808083c5cdeb8783c5acfd9e407c565656")[..]; + + let input_rlp = &mut &data[..]; + let res = PooledTransactionsElement::decode(input_rlp); + assert_matches!(res, Ok(_tx)); + assert!(input_rlp.is_empty()); + + // this is a legacy tx so we can attempt the same test with + // decode_rlp_legacy_transaction_tuple + let input_rlp = &mut &data[..]; + let res = TransactionSigned::decode_rlp_legacy_transaction_tuple(input_rlp); + assert_matches!(res, Ok(_tx)); + assert!(input_rlp.is_empty()); + + // we can also decode_enveloped + let res = PooledTransactionsElement::decode_enveloped(Bytes::copy_from_slice(data)); + assert_matches!(res, Ok(_tx)); + } +} diff --git a/crates/primitives/src/transaction/sidecar.rs b/crates/primitives/src/transaction/sidecar.rs new file mode 100644 index 000000000000..0f51c0df7303 --- /dev/null +++ b/crates/primitives/src/transaction/sidecar.rs @@ -0,0 +1,470 @@ +#![cfg(feature = "c-kzg")] +#![cfg_attr(docsrs, doc(cfg(feature = "c-kzg")))] + +use crate::{ + keccak256, Signature, Transaction, TransactionSigned, TxEip4844, TxHash, EIP4844_TX_TYPE_ID, +}; + +use crate::kzg::{ + self, Blob, Bytes48, KzgSettings, BYTES_PER_BLOB, BYTES_PER_COMMITMENT, BYTES_PER_PROOF, +}; +use alloy_rlp::{Decodable, Encodable, Error as RlpError, Header}; + +use serde::{Deserialize, Serialize}; + +#[cfg(any(test, feature = "arbitrary"))] +use proptest::{ + arbitrary::{any as proptest_any, ParamsFor}, + collection::vec as proptest_vec, + strategy::{BoxedStrategy, Strategy}, +}; + +#[cfg(any(test, feature = "arbitrary"))] +use crate::{ + constants::eip4844::{FIELD_ELEMENTS_PER_BLOB, MAINNET_KZG_TRUSTED_SETUP}, + kzg::{KzgCommitment, KzgProof, BYTES_PER_FIELD_ELEMENT}, +}; + +/// An error that can occur when validating a [BlobTransaction]. +#[derive(Debug, thiserror::Error)] +pub enum BlobTransactionValidationError { + /// Proof validation failed. + #[error("invalid KZG proof")] + InvalidProof, + /// An error returned by [`kzg`]. + #[error("KZG error: {0:?}")] + KZGError(#[from] kzg::Error), + /// The inner transaction is not a blob transaction. + #[error("unable to verify proof for non blob transaction: {0}")] + NotBlobTransaction(u8), +} + +/// A response to `GetPooledTransactions` that includes blob data, their commitments, and their +/// corresponding proofs. +/// +/// This is defined in [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844#networking) as an element +/// of a `PooledTransactions` response. +#[derive(Clone, Debug, PartialEq, Eq, Default, Serialize, Deserialize)] +pub struct BlobTransaction { + /// The transaction hash. + pub hash: TxHash, + /// The transaction payload. + pub transaction: TxEip4844, + /// The transaction signature. + pub signature: Signature, + /// The transaction's blob sidecar. + pub sidecar: BlobTransactionSidecar, +} + +impl BlobTransaction { + /// Constructs a new [BlobTransaction] from a [TransactionSigned] and a + /// [BlobTransactionSidecar]. + /// + /// Returns an error if the signed transaction is not [TxEip4844] + pub fn try_from_signed( + tx: TransactionSigned, + sidecar: BlobTransactionSidecar, + ) -> Result { + let TransactionSigned { transaction, signature, hash } = tx; + match transaction { + Transaction::Eip4844(transaction) => Ok(Self { hash, transaction, signature, sidecar }), + transaction => { + let tx = TransactionSigned { transaction, signature, hash }; + Err((tx, sidecar)) + } + } + } + + /// Verifies that the transaction's blob data, commitments, and proofs are all valid. + /// + /// See also [TxEip4844::validate_blob] + pub fn validate( + &self, + proof_settings: &KzgSettings, + ) -> Result<(), BlobTransactionValidationError> { + self.transaction.validate_blob(&self.sidecar, proof_settings) + } + + /// Splits the [BlobTransaction] into its [TransactionSigned] and [BlobTransactionSidecar] + /// components. + pub fn into_parts(self) -> (TransactionSigned, BlobTransactionSidecar) { + let transaction = TransactionSigned { + transaction: Transaction::Eip4844(self.transaction), + hash: self.hash, + signature: self.signature, + }; + + (transaction, self.sidecar) + } + + /// Encodes the [BlobTransaction] fields as RLP, with a tx type. If `with_header` is `false`, + /// the following will be encoded: + /// `tx_type (0x03) || rlp([transaction_payload_body, blobs, commitments, proofs])` + /// + /// If `with_header` is `true`, the following will be encoded: + /// `rlp(tx_type (0x03) || rlp([transaction_payload_body, blobs, commitments, proofs]))` + /// + /// NOTE: The header will be a byte string header, not a list header. + pub(crate) fn encode_with_type_inner(&self, out: &mut dyn bytes::BufMut, with_header: bool) { + // Calculate the length of: + // `tx_type || rlp([transaction_payload_body, blobs, commitments, proofs])` + // + // to construct and encode the string header + if with_header { + Header { + list: false, + // add one for the tx type + payload_length: 1 + self.payload_len(), + } + .encode(out); + } + + out.put_u8(EIP4844_TX_TYPE_ID); + + // Now we encode the inner blob transaction: + self.encode_inner(out); + } + + /// Encodes the [BlobTransaction] fields as RLP, with the following format: + /// `rlp([transaction_payload_body, blobs, commitments, proofs])` + /// + /// where `transaction_payload_body` is a list: + /// `[chain_id, nonce, max_priority_fee_per_gas, ..., y_parity, r, s]` + /// + /// Note: this should be used only when implementing other RLP encoding methods, and does not + /// represent the full RLP encoding of the blob transaction. + pub(crate) fn encode_inner(&self, out: &mut dyn bytes::BufMut) { + // First we construct both required list headers. + // + // The `transaction_payload_body` length is the length of the fields, plus the length of + // its list header. + let tx_header = Header { + list: true, + payload_length: self.transaction.fields_len() + self.signature.payload_len(), + }; + + let tx_length = tx_header.length() + tx_header.payload_length; + + // The payload length is the length of the `tranascation_payload_body` list, plus the + // length of the blobs, commitments, and proofs. + let payload_length = tx_length + self.sidecar.fields_len(); + + // First we use the payload len to construct the first list header + let blob_tx_header = Header { list: true, payload_length }; + + // Encode the blob tx header first + blob_tx_header.encode(out); + + // Encode the inner tx list header, then its fields + tx_header.encode(out); + self.transaction.encode_fields(out); + + // Encode the signature + self.signature.encode(out); + + // Encode the blobs, commitments, and proofs + self.sidecar.encode_inner(out); + } + + /// Ouputs the length of the RLP encoding of the blob transaction, including the tx type byte, + /// optionally including the length of a wrapping string header. If `with_header` is `false`, + /// the length of the following will be calculated: + /// `tx_type (0x03) || rlp([transaction_payload_body, blobs, commitments, proofs])` + /// + /// If `with_header` is `true`, the length of the following will be calculated: + /// `rlp(tx_type (0x03) || rlp([transaction_payload_body, blobs, commitments, proofs]))` + pub(crate) fn payload_len_with_type(&self, with_header: bool) -> usize { + if with_header { + // Construct a header and use that to calculate the total length + let wrapped_header = Header { + list: false, + // add one for the tx type byte + payload_length: 1 + self.payload_len(), + }; + + // The total length is now the length of the header plus the length of the payload + // (which includes the tx type byte) + wrapped_header.length() + wrapped_header.payload_length + } else { + // Just add the length of the tx type to the payload length + 1 + self.payload_len() + } + } + + /// Outputs the length of the RLP encoding of the blob transaction with the following format: + /// `rlp([transaction_payload_body, blobs, commitments, proofs])` + /// + /// where `transaction_payload_body` is a list: + /// `[chain_id, nonce, max_priority_fee_per_gas, ..., y_parity, r, s]` + /// + /// Note: this should be used only when implementing other RLP encoding length methods, and + /// does not represent the full RLP encoding of the blob transaction. + pub(crate) fn payload_len(&self) -> usize { + // The `transaction_payload_body` length is the length of the fields, plus the length of + // its list header. + let tx_header = Header { + list: true, + payload_length: self.transaction.fields_len() + self.signature.payload_len(), + }; + + let tx_length = tx_header.length() + tx_header.payload_length; + + // The payload length is the length of the `tranascation_payload_body` list, plus the + // length of the blobs, commitments, and proofs. + let payload_length = tx_length + self.sidecar.fields_len(); + + // We use the calculated payload len to construct the first list header, which encompasses + // everything in the tx - the length of the second, inner list header is part of + // payload_length + let blob_tx_header = Header { list: true, payload_length }; + + // The final length is the length of: + // * the outer blob tx header + + // * the inner tx header + + // * the inner tx fields + + // * the signature fields + + // * the sidecar fields + blob_tx_header.length() + blob_tx_header.payload_length + } + + /// Decodes a [BlobTransaction] from RLP. This expects the encoding to be: + /// `rlp([transaction_payload_body, blobs, commitments, proofs])` + /// + /// where `transaction_payload_body` is a list: + /// `[chain_id, nonce, max_priority_fee_per_gas, ..., y_parity, r, s]` + /// + /// Note: this should be used only when implementing other RLP decoding methods, and does not + /// represent the full RLP decoding of the `PooledTransactionsElement` type. + pub(crate) fn decode_inner(data: &mut &[u8]) -> alloy_rlp::Result { + // decode the _first_ list header for the rest of the transaction + let outer_header = Header::decode(data)?; + if !outer_header.list { + return Err(RlpError::Custom("PooledTransactions blob tx must be encoded as a list")) + } + + let outer_remaining_len = data.len(); + + // Now we need to decode the inner 4844 transaction and its signature: + // + // `[chain_id, nonce, max_priority_fee_per_gas, ..., y_parity, r, s]` + let inner_header = Header::decode(data)?; + if !inner_header.list { + return Err(RlpError::Custom( + "PooledTransactions inner blob tx must be encoded as a list", + )) + } + + let inner_remaining_len = data.len(); + + // inner transaction + let transaction = TxEip4844::decode_inner(data)?; + + // signature + let signature = Signature::decode(data)?; + + // the inner header only decodes the transaction and signature, so we check the length here + let inner_consumed = inner_remaining_len - data.len(); + if inner_consumed != inner_header.payload_length { + return Err(RlpError::UnexpectedLength) + } + + // All that's left are the blobs, commitments, and proofs + let sidecar = BlobTransactionSidecar::decode_inner(data)?; + + // # Calculating the hash + // + // The full encoding of the `PooledTransaction` response is: + // `tx_type (0x03) || rlp([tx_payload_body, blobs, commitments, proofs])` + // + // The transaction hash however, is: + // `keccak256(tx_type (0x03) || rlp(tx_payload_body))` + // + // Note that this is `tx_payload_body`, not `[tx_payload_body]`, which would be + // `[[chain_id, nonce, max_priority_fee_per_gas, ...]]`, i.e. a list within a list. + // + // Because the pooled transaction encoding is different than the hash encoding for + // EIP-4844 transactions, we do not use the original buffer to calculate the hash. + // + // Instead, we use `encode_with_signature`, which RLP encodes the transaction with a + // signature for hashing without a header. We then hash the result. + let mut buf = Vec::new(); + transaction.encode_with_signature(&signature, &mut buf, false); + let hash = keccak256(&buf); + + // the outer header is for the entire transaction, so we check the length here + let outer_consumed = outer_remaining_len - data.len(); + if outer_consumed != outer_header.payload_length { + return Err(RlpError::UnexpectedLength) + } + + Ok(Self { transaction, hash, signature, sidecar }) + } +} + +/// This represents a set of blobs, and its corresponding commitments and proofs. +#[derive(Clone, Debug, PartialEq, Eq, Default, Serialize, Deserialize)] +#[repr(C)] +pub struct BlobTransactionSidecar { + /// The blob data. + pub blobs: Vec, + /// The blob commitments. + pub commitments: Vec, + /// The blob proofs. + pub proofs: Vec, +} + +impl BlobTransactionSidecar { + /// Creates a new [BlobTransactionSidecar] using the given blobs, commitments, and proofs. + pub fn new(blobs: Vec, commitments: Vec, proofs: Vec) -> Self { + Self { blobs, commitments, proofs } + } + + /// Encodes the inner [BlobTransactionSidecar] fields as RLP bytes, without a RLP header. + /// + /// This encodes the fields in the following order: + /// - `blobs` + /// - `commitments` + /// - `proofs` + pub(crate) fn encode_inner(&self, out: &mut dyn bytes::BufMut) { + BlobTransactionSidecarRlp::wrap_ref(self).encode(out); + } + + /// Outputs the RLP length of the [BlobTransactionSidecar] fields, without a RLP header. + pub fn fields_len(&self) -> usize { + BlobTransactionSidecarRlp::wrap_ref(self).fields_len() + } + + /// Decodes the inner [BlobTransactionSidecar] fields from RLP bytes, without a RLP header. + /// + /// This decodes the fields in the following order: + /// - `blobs` + /// - `commitments` + /// - `proofs` + pub(crate) fn decode_inner(buf: &mut &[u8]) -> alloy_rlp::Result { + Ok(BlobTransactionSidecarRlp::decode(buf)?.unwrap()) + } + + /// Calculates a size heuristic for the in-memory size of the [BlobTransactionSidecar]. + #[inline] + pub fn size(&self) -> usize { + self.blobs.len() * BYTES_PER_BLOB + // blobs + self.commitments.len() * BYTES_PER_COMMITMENT + // commitments + self.proofs.len() * BYTES_PER_PROOF // proofs + } +} + +// Wrapper for c-kzg rlp +#[repr(C)] +struct BlobTransactionSidecarRlp { + blobs: Vec<[u8; c_kzg::BYTES_PER_BLOB]>, + commitments: Vec<[u8; 48]>, + proofs: Vec<[u8; 48]>, +} + +const _: [(); std::mem::size_of::()] = + [(); std::mem::size_of::()]; + +impl BlobTransactionSidecarRlp { + fn wrap_ref(other: &BlobTransactionSidecar) -> &Self { + // SAFETY: Same repr and size + unsafe { &*(other as *const BlobTransactionSidecar).cast::() } + } + + fn unwrap(self) -> BlobTransactionSidecar { + // SAFETY: Same repr and size + unsafe { std::mem::transmute(self) } + } + + fn encode(&self, out: &mut dyn bytes::BufMut) { + // Encode the blobs, commitments, and proofs + self.blobs.encode(out); + self.commitments.encode(out); + self.proofs.encode(out); + } + + fn fields_len(&self) -> usize { + self.blobs.length() + self.commitments.length() + self.proofs.length() + } + + fn decode(buf: &mut &[u8]) -> alloy_rlp::Result { + Ok(Self { + blobs: Decodable::decode(buf)?, + commitments: Decodable::decode(buf)?, + proofs: Decodable::decode(buf)?, + }) + } +} + +#[cfg(any(test, feature = "arbitrary"))] +impl<'a> arbitrary::Arbitrary<'a> for BlobTransactionSidecar { + fn arbitrary(u: &mut arbitrary::Unstructured<'a>) -> arbitrary::Result { + let mut arr = [0u8; BYTES_PER_BLOB]; + let blobs: Vec = (0..u.int_in_range(1..=16)?) + .map(|_| { + arr = arbitrary::Arbitrary::arbitrary(u).unwrap(); + + // Ensure that each blob is cacnonical by ensuring each field element contained in + // the blob is < BLS_MODULUS + for i in 0..(FIELD_ELEMENTS_PER_BLOB as usize) { + arr[i * BYTES_PER_FIELD_ELEMENT] = 0; + } + + Blob::from(arr) + }) + .collect(); + + Ok(generate_blob_sidecar(blobs)) + } +} + +#[cfg(any(test, feature = "arbitrary"))] +impl proptest::arbitrary::Arbitrary for BlobTransactionSidecar { + type Parameters = ParamsFor; + type Strategy = BoxedStrategy; + + fn arbitrary_with(_args: Self::Parameters) -> Self::Strategy { + proptest_vec(proptest_vec(proptest_any::(), BYTES_PER_BLOB), 1..=5) + .prop_map(move |blobs| { + let blobs = blobs + .into_iter() + .map(|mut blob| { + let mut arr = [0u8; BYTES_PER_BLOB]; + + // Ensure that each blob is cacnonical by ensuring each field element + // contained in the blob is < BLS_MODULUS + for i in 0..(FIELD_ELEMENTS_PER_BLOB as usize) { + blob[i * BYTES_PER_FIELD_ELEMENT] = 0; + } + + arr.copy_from_slice(blob.as_slice()); + arr.into() + }) + .collect(); + + generate_blob_sidecar(blobs) + }) + .boxed() + } +} + +#[cfg(any(test, feature = "arbitrary"))] +fn generate_blob_sidecar(blobs: Vec) -> BlobTransactionSidecar { + let kzg_settings = MAINNET_KZG_TRUSTED_SETUP.clone(); + + let commitments: Vec = blobs + .iter() + .map(|blob| KzgCommitment::blob_to_kzg_commitment(&blob.clone(), &kzg_settings).unwrap()) + .map(|commitment| commitment.to_bytes()) + .collect(); + + let proofs: Vec = blobs + .iter() + .zip(commitments.iter()) + .map(|(blob, commitment)| { + KzgProof::compute_blob_kzg_proof(blob, commitment, &kzg_settings).unwrap() + }) + .map(|proof| proof.to_bytes()) + .collect(); + + BlobTransactionSidecar { blobs, commitments, proofs } +} diff --git a/crates/prune/src/error.rs b/crates/prune/src/error.rs index 360fd61c5a15..e12320bc8fdb 100644 --- a/crates/prune/src/error.rs +++ b/crates/prune/src/error.rs @@ -9,10 +9,10 @@ pub enum PrunerError { #[error(transparent)] PruneSegment(#[from] PruneSegmentError), - #[error("Inconsistent data: {0}")] + #[error("inconsistent data: {0}")] InconsistentData(&'static str), - #[error("An interface error occurred.")] + #[error(transparent)] Interface(#[from] RethError), #[error(transparent)] diff --git a/crates/prune/src/segments/set.rs b/crates/prune/src/segments/set.rs index 92402825e269..8593dd42e5f9 100644 --- a/crates/prune/src/segments/set.rs +++ b/crates/prune/src/segments/set.rs @@ -15,11 +15,19 @@ impl SegmentSet { } /// Adds new [Segment] to collection. - pub fn add_segment + 'static>(mut self, segment: S) -> Self { + pub fn segment + 'static>(mut self, segment: S) -> Self { self.inner.push(Arc::new(segment)); self } + /// Adds new [Segment] to collection if it's [Some]. + pub fn segment_opt + 'static>(self, segment: Option) -> Self { + if let Some(segment) = segment { + return self.segment(segment) + } + self + } + /// Consumes [SegmentSet] and returns a [Vec]. pub fn into_vec(self) -> Vec>> { self.inner diff --git a/crates/revm/revm-inspectors/src/tracing/builder/geth.rs b/crates/revm/revm-inspectors/src/tracing/builder/geth.rs index 7dea00a98df8..0f583e6c8471 100644 --- a/crates/revm/revm-inspectors/src/tracing/builder/geth.rs +++ b/crates/revm/revm-inspectors/src/tracing/builder/geth.rs @@ -2,6 +2,7 @@ use crate::tracing::{ types::{CallTraceNode, CallTraceStepStackItem}, + utils::load_account_code, TracingInspectorConfig, }; use reth_primitives::{Address, Bytes, B256, U256}; @@ -9,10 +10,7 @@ use reth_rpc_types::trace::geth::{ AccountChangeKind, AccountState, CallConfig, CallFrame, DefaultFrame, DiffMode, GethDefaultTracingOptions, PreStateConfig, PreStateFrame, PreStateMode, StructLog, }; -use revm::{ - db::DatabaseRef, - primitives::{AccountInfo, ResultAndState, KECCAK_EMPTY}, -}; +use revm::{db::DatabaseRef, primitives::ResultAndState}; use std::collections::{btree_map::Entry, BTreeMap, HashMap, VecDeque}; /// A type for creating geth style traces @@ -179,34 +177,12 @@ impl GethTraceBuilder { /// * `state` - The state post-transaction execution. /// * `diff_mode` - if prestate is in diff or prestate mode. /// * `db` - The database to fetch state pre-transaction execution. - pub fn geth_prestate_traces( + pub fn geth_prestate_traces( &self, ResultAndState { state, .. }: &ResultAndState, prestate_config: PreStateConfig, db: DB, - ) -> Result - where - DB: DatabaseRef, - { - // loads the code from the account or the database - // Geth always includes the contract code in the prestate. However, - // the code hash will be KECCAK_EMPTY if the account is an EOA. Therefore - // we need to filter it out. - let load_account_code = |db_acc: &AccountInfo| { - db_acc - .code - .as_ref() - .map(|code| code.original_bytes()) - .or_else(|| { - if db_acc.code_hash == KECCAK_EMPTY { - None - } else { - db.code_by_hash_ref(db_acc.code_hash).ok().map(|code| code.original_bytes()) - } - }) - .map(Into::into) - }; - + ) -> Result { let account_diffs = state.into_iter().map(|(addr, acc)| (*addr, acc)); if prestate_config.is_default_mode() { @@ -218,7 +194,7 @@ impl GethTraceBuilder { let acc_state = match prestate.0.entry(addr) { Entry::Vacant(entry) => { let db_acc = db.basic_ref(addr)?.unwrap_or_default(); - let code = load_account_code(&db_acc); + let code = load_account_code(&db, &db_acc); let acc_state = AccountState::from_account_info(db_acc.nonce, db_acc.balance, code); entry.insert(acc_state) @@ -243,7 +219,7 @@ impl GethTraceBuilder { let acc_state = match prestate.0.entry(addr) { Entry::Vacant(entry) => { let db_acc = db.basic_ref(addr)?.unwrap_or_default(); - let code = load_account_code(&db_acc); + let code = load_account_code(&db, &db_acc); let acc_state = AccountState::from_account_info(db_acc.nonce, db_acc.balance, code); entry.insert(acc_state) @@ -275,7 +251,7 @@ impl GethTraceBuilder { for (addr, changed_acc) in account_diffs { let db_acc = db.basic_ref(addr)?.unwrap_or_default(); - let pre_code = load_account_code(&db_acc); + let pre_code = load_account_code(&db, &db_acc); let mut pre_state = AccountState::from_account_info(db_acc.nonce, db_acc.balance, pre_code); diff --git a/crates/revm/revm-inspectors/src/tracing/builder/parity.rs b/crates/revm/revm-inspectors/src/tracing/builder/parity.rs index 4a0bb4d58131..d17ecc53118a 100644 --- a/crates/revm/revm-inspectors/src/tracing/builder/parity.rs +++ b/crates/revm/revm-inspectors/src/tracing/builder/parity.rs @@ -1,6 +1,7 @@ use super::walker::CallTraceNodeWalkerBF; use crate::tracing::{ types::{CallTraceNode, CallTraceStep}, + utils::load_account_code, TracingInspectorConfig, }; use reth_primitives::{Address, U64}; @@ -179,15 +180,12 @@ impl ParityTraceBuilder { /// Note: this is considered a convenience method that takes the state map of /// [ResultAndState] after inspecting a transaction /// with the [TracingInspector](crate::tracing::TracingInspector). - pub fn into_trace_results_with_state( + pub fn into_trace_results_with_state( self, res: &ResultAndState, trace_types: &HashSet, db: DB, - ) -> Result - where - DB: DatabaseRef, - { + ) -> Result { let ResultAndState { ref result, ref state } = res; let breadth_first_addresses = if trace_types.contains(&TraceType::VmTrace) { @@ -383,7 +381,7 @@ impl ParityTraceBuilder { } else { Some(MemoryDelta { off: step.memory_size, - data: step.memory.slice(0, step.memory.len()).to_vec().into(), + data: step.memory.as_bytes().to_vec().into(), }) }; @@ -586,14 +584,14 @@ where if changed_acc.is_created() || changed_acc.is_loaded_as_not_existing() { entry.balance = Delta::Added(changed_acc.info.balance); entry.nonce = Delta::Added(U64::from(changed_acc.info.nonce)); - if changed_acc.info.code_hash == KECCAK_EMPTY { - // this is an additional check to ensure new accounts always get the empty code - // marked as added - entry.code = Delta::Added(Default::default()); - } - // new storage values - for (key, slot) in changed_acc.storage.iter() { + // accounts without code are marked as added + let account_code = load_account_code(&db, &changed_acc.info).unwrap_or_default(); + entry.code = Delta::Added(account_code); + + // new storage values are marked as added, + // however we're filtering changed here to avoid adding entries for the zero value + for (key, slot) in changed_acc.storage.iter().filter(|(_, slot)| slot.is_changed()) { entry.storage.insert((*key).into(), Delta::Added(slot.present_value.into())); } } else { diff --git a/crates/revm/revm-inspectors/src/tracing/js/bindings.rs b/crates/revm/revm-inspectors/src/tracing/js/bindings.rs index 25d4cfc96274..abe56e397ee8 100644 --- a/crates/revm/revm-inspectors/src/tracing/js/bindings.rs +++ b/crates/revm/revm-inspectors/src/tracing/js/bindings.rs @@ -3,8 +3,8 @@ use crate::tracing::{ js::{ builtins::{ - address_to_buf, bytes_to_address, bytes_to_hash, from_buf, to_bigint, to_bigint_array, - to_buf, to_buf_value, + address_to_buf, bytes_to_address, bytes_to_hash, from_buf, to_bigint, to_buf, + to_buf_value, }, JsDbRequest, }, @@ -15,7 +15,7 @@ use boa_engine::{ object::{builtins::JsArrayBuffer, FunctionObjectBuilder}, Context, JsArgs, JsError, JsNativeError, JsObject, JsResult, JsValue, }; -use boa_gc::{empty_trace, Finalize, Gc, Trace}; +use boa_gc::{empty_trace, Finalize, Trace}; use reth_primitives::{Account, Address, Bytes, B256, KECCAK_EMPTY, U256}; use revm::{ interpreter::{ @@ -24,7 +24,7 @@ use revm::{ }, primitives::State, }; -use std::{borrow::Borrow, sync::mpsc::channel}; +use std::{cell::RefCell, rc::Rc, sync::mpsc::channel}; use tokio::sync::mpsc; /// A macro that creates a native function that returns via [JsValue::from] @@ -54,15 +54,79 @@ macro_rules! js_value_capture_getter { }; } +/// A reference to a value that can be garbagae collected, but will not give access to the value if +/// it has been dropped. +/// +/// This is used to allow the JS tracer functions to access values at a certain point during +/// inspection by ref without having to clone them and capture them in the js object. +/// +/// JS tracer functions get access to evm internals via objects or function arguments, for example +/// `function step(log,evm)` where log has an object `stack` that has a function `peek(number)` that +/// returns a value from the stack. +/// +/// These functions could get garbage collected, however the data accessed by the function is +/// supposed to be ephemeral and only valid for the duration of the function call. +/// +/// This type supports garbage collection of (rust) references and prevents access to the value if +/// it has been dropped. +#[derive(Debug, Clone)] +pub(crate) struct GuardedNullableGcRef { + /// The lifetime is a lie to make it possible to use a reference in boa which requires 'static + inner: Rc>>, +} + +impl GuardedNullableGcRef { + /// Creates a garbage collectible reference to the given reference. + /// + /// SAFETY; the caller must ensure that the guard is dropped before the value is dropped. + pub(crate) fn new(val: &Val) -> (Self, RefGuard<'_, Val>) { + let inner = Rc::new(RefCell::new(Some(val))); + let guard = RefGuard { inner: Rc::clone(&inner) }; + + // SAFETY: guard enforces that the value is removed from the refcell before it is dropped + let this = Self { inner: unsafe { std::mem::transmute(inner) } }; + + (this, guard) + } + + /// Executes the given closure with a reference to the inner value if it is still present. + pub(crate) fn with_inner(&self, f: F) -> Option + where + F: FnOnce(&Val) -> R, + { + self.inner.borrow().map(f) + } +} + +impl Finalize for GuardedNullableGcRef {} + +unsafe impl Trace for GuardedNullableGcRef { + empty_trace!(); +} + +/// Guard the inner references, once this value is dropped the inner reference is also removed. +/// +/// This type guarantees that it never outlives the wrapped reference. +#[derive(Debug)] +pub(crate) struct RefGuard<'a, Val> { + inner: Rc>>, +} + +impl<'a, Val> Drop for RefGuard<'a, Val> { + fn drop(&mut self) { + self.inner.borrow_mut().take(); + } +} + /// The Log object that is passed to the javascript inspector. #[derive(Debug)] pub(crate) struct StepLog { /// Stack before step execution - pub(crate) stack: StackObj, + pub(crate) stack: StackRef, /// Opcode to be executed pub(crate) op: OpObj, /// All allocated memory in a step - pub(crate) memory: MemoryObj, + pub(crate) memory: MemoryRef, /// Program counter before step execution pub(crate) pc: u64, /// Remaining gas before step execution @@ -131,15 +195,23 @@ impl StepLog { } /// Represents the memory object -#[derive(Debug)] -pub(crate) struct MemoryObj(pub(crate) SharedMemory); +#[derive(Debug, Clone)] +pub(crate) struct MemoryRef(pub(crate) GuardedNullableGcRef); + +impl MemoryRef { + /// Creates a new stack reference + pub(crate) fn new(mem: &SharedMemory) -> (Self, RefGuard<'_, SharedMemory>) { + let (inner, guard) = GuardedNullableGcRef::new(mem); + (MemoryRef(inner), guard) + } + + fn len(&self) -> usize { + self.0.with_inner(|mem| mem.len()).unwrap_or_default() + } -impl MemoryObj { pub(crate) fn into_js_object(self, context: &mut Context<'_>) -> JsResult { let obj = JsObject::default(); - let len = self.0.len(); - // TODO: add into data - let value = to_buf(self.0.slice(0, len).to_vec(), context)?; + let len = self.len(); let length = FunctionObjectBuilder::new( context, @@ -150,13 +222,14 @@ impl MemoryObj { .length(0) .build(); + // slice returns the requested range of memory as a byte slice. let slice = FunctionObjectBuilder::new( context, NativeFunction::from_copy_closure_with_captures( - |_this, args, memory, ctx| { + move |_this, args, memory, ctx| { let start = args.get_or_undefined(0).to_number(ctx)?; let end = args.get_or_undefined(1).to_number(ctx)?; - if end < start || start < 0. { + if end < start || start < 0. || (end as usize) < memory.len() { return Err(JsError::from_native(JsNativeError::typ().with_message( format!( "tracer accessed out of bound memory: offset {start}, end {end}" @@ -165,12 +238,15 @@ impl MemoryObj { } let start = start as usize; let end = end as usize; + let size = end - start; + let slice = memory + .0 + .with_inner(|mem| mem.slice(start, size).to_vec()) + .unwrap_or_default(); - let mut mem = memory.take()?; - let slice = mem.drain(start..end).collect::>(); to_buf_value(slice, ctx) }, - value.clone(), + self.clone(), ), ) .length(2) @@ -179,21 +255,19 @@ impl MemoryObj { let get_uint = FunctionObjectBuilder::new( context, NativeFunction::from_copy_closure_with_captures( - |_this, args, memory, ctx| { + move |_this, args, memory, ctx| { let offset_f64 = args.get_or_undefined(0).to_number(ctx)?; - - let mut mem = memory.take()?; + let len = memory.len(); let offset = offset_f64 as usize; - if mem.len() < offset+32 || offset_f64 < 0. { + if len < offset+32 || offset_f64 < 0. { return Err(JsError::from_native( - JsNativeError::typ().with_message(format!("tracer accessed out of bound memory: available {}, offset {}, size 32", mem.len(), offset)) + JsNativeError::typ().with_message(format!("tracer accessed out of bound memory: available {len}, offset {offset}, size 32")) )); } - - let slice = mem.drain(offset..offset+32).collect::>(); + let slice = memory.0.with_inner(|mem| mem.slice(offset, 32).to_vec()).unwrap_or_default(); to_buf_value(slice, ctx) }, - value + self ), ) .length(1) @@ -206,6 +280,40 @@ impl MemoryObj { } } +impl Finalize for MemoryRef {} + +unsafe impl Trace for MemoryRef { + empty_trace!(); +} + +/// Represents the state object +#[derive(Debug, Clone)] +pub(crate) struct StateRef(pub(crate) GuardedNullableGcRef); + +impl StateRef { + /// Creates a new stack reference + pub(crate) fn new(state: &State) -> (Self, RefGuard<'_, State>) { + let (inner, guard) = GuardedNullableGcRef::new(state); + (StateRef(inner), guard) + } + + fn get_account(&self, address: &Address) -> Option { + self.0.with_inner(|state| { + state.get(address).map(|acc| Account { + nonce: acc.info.nonce, + balance: acc.info.balance, + bytecode_hash: Some(acc.info.code_hash), + }) + })? + } +} + +impl Finalize for StateRef {} + +unsafe impl Trace for StateRef { + empty_trace!(); +} + /// Represents the opcode object #[derive(Debug)] pub(crate) struct OpObj(pub(crate) u8); @@ -264,15 +372,39 @@ impl From for OpObj { } /// Represents the stack object -#[derive(Debug, Clone)] -pub(crate) struct StackObj(pub(crate) Stack); +#[derive(Debug)] +pub(crate) struct StackRef(pub(crate) GuardedNullableGcRef); + +impl StackRef { + /// Creates a new stack reference + pub(crate) fn new(stack: &Stack) -> (Self, RefGuard<'_, Stack>) { + let (inner, guard) = GuardedNullableGcRef::new(stack); + (StackRef(inner), guard) + } + + fn peek(&self, idx: usize, ctx: &mut Context<'_>) -> JsResult { + self.0 + .with_inner(|stack| { + let value = stack.peek(idx).map_err(|_| { + JsError::from_native(JsNativeError::typ().with_message(format!( + "tracer accessed out of bound stack: size {}, index {}", + stack.len(), + idx + ))) + })?; + to_bigint(value, ctx) + }) + .ok_or_else(|| { + JsError::from_native(JsNativeError::typ().with_message(format!( + "tracer accessed out of bound stack: size 0, index {}", + idx + ))) + })? + } -impl StackObj { pub(crate) fn into_js_object(self, context: &mut Context<'_>) -> JsResult { let obj = JsObject::default(); - let stack = self.0; - let len = stack.len(); - let stack_arr = to_bigint_array(stack.data(), context)?; + let len = self.0.with_inner(|stack| stack.len()).unwrap_or_default(); let length = FunctionObjectBuilder::new( context, NativeFunction::from_copy_closure(move |_this, _args, _ctx| Ok(JsValue::from(len))), @@ -280,10 +412,11 @@ impl StackObj { .length(0) .build(); + // peek returns the nth-from-the-top element of the stack. let peek = FunctionObjectBuilder::new( context, NativeFunction::from_copy_closure_with_captures( - move |_this, args, stack_arr, ctx| { + move |_this, args, stack, ctx| { let idx_f64 = args.get_or_undefined(0).to_number(ctx)?; let idx = idx_f64 as usize; if len <= idx || idx_f64 < 0. { @@ -293,9 +426,9 @@ impl StackObj { ), ))) } - stack_arr.get(idx as u64, ctx) + stack.peek(idx, ctx) }, - stack_arr, + self, ), ) .length(1) @@ -307,6 +440,12 @@ impl StackObj { } } +impl Finalize for StackRef {} + +unsafe impl Trace for StackRef { + empty_trace!(); +} + /// Represents the contract object #[derive(Debug, Clone, Default)] pub(crate) struct Contract { @@ -551,123 +690,28 @@ impl EvmContext { } /// DB is the object that allows the js inspector to interact with the database. -pub(crate) struct EvmDb { - db: EvmDBInner, -} - -impl EvmDb { - pub(crate) fn new(state: State, to_db: mpsc::Sender) -> Self { - Self { db: EvmDBInner { state, to_db } } - } +#[derive(Debug, Clone)] +pub(crate) struct EvmDbRef { + state: StateRef, + to_db: mpsc::Sender, } -impl EvmDb { - pub(crate) fn into_js_object(self, context: &mut Context<'_>) -> JsResult { - let obj = JsObject::default(); - - let db = Gc::new(self.db); - let exists = FunctionObjectBuilder::new( - context, - NativeFunction::from_copy_closure_with_captures( - move |_this, args, db, ctx| { - let val = args.get_or_undefined(0).clone(); - let db: &EvmDBInner = db.borrow(); - let acc = db.read_basic(val, ctx)?; - let exists = acc.is_some(); - Ok(JsValue::from(exists)) - }, - db.clone(), - ), - ) - .length(1) - .build(); - - let get_balance = FunctionObjectBuilder::new( - context, - NativeFunction::from_copy_closure_with_captures( - move |_this, args, db, ctx| { - let val = args.get_or_undefined(0).clone(); - let db: &EvmDBInner = db.borrow(); - let acc = db.read_basic(val, ctx)?; - let balance = acc.map(|acc| acc.balance).unwrap_or_default(); - to_bigint(balance, ctx) - }, - db.clone(), - ), - ) - .length(1) - .build(); - - let get_nonce = FunctionObjectBuilder::new( - context, - NativeFunction::from_copy_closure_with_captures( - move |_this, args, db, ctx| { - let val = args.get_or_undefined(0).clone(); - let db: &EvmDBInner = db.borrow(); - let acc = db.read_basic(val, ctx)?; - let nonce = acc.map(|acc| acc.nonce).unwrap_or_default(); - Ok(JsValue::from(nonce)) - }, - db.clone(), - ), - ) - .length(1) - .build(); - - let get_code = FunctionObjectBuilder::new( - context, - NativeFunction::from_copy_closure_with_captures( - move |_this, args, db, ctx| { - let val = args.get_or_undefined(0).clone(); - let db: &EvmDBInner = db.borrow(); - Ok(db.read_code(val, ctx)?.into()) - }, - db.clone(), - ), - ) - .length(1) - .build(); - - let get_state = FunctionObjectBuilder::new( - context, - NativeFunction::from_copy_closure_with_captures( - move |_this, args, db, ctx| { - let addr = args.get_or_undefined(0).clone(); - let slot = args.get_or_undefined(1).clone(); - let db: &EvmDBInner = db.borrow(); - Ok(db.read_state(addr, slot, ctx)?.into()) - }, - db, - ), - ) - .length(2) - .build(); - - obj.set("getBalance", get_balance, false, context)?; - obj.set("getNonce", get_nonce, false, context)?; - obj.set("getCode", get_code, false, context)?; - obj.set("getState", get_state, false, context)?; - obj.set("exists", exists, false, context)?; - Ok(obj) +impl EvmDbRef { + /// Creates a new DB reference + pub(crate) fn new( + state: &State, + to_db: mpsc::Sender, + ) -> (Self, RefGuard<'_, State>) { + let (state, guard) = StateRef::new(state); + let this = Self { state, to_db }; + (this, guard) } -} -#[derive(Clone)] -struct EvmDBInner { - state: State, - to_db: mpsc::Sender, -} - -impl EvmDBInner { fn read_basic(&self, address: JsValue, ctx: &mut Context<'_>) -> JsResult> { let buf = from_buf(address, ctx)?; let address = bytes_to_address(buf); - if let Some(acc) = self.state.get(&address) { - return Ok(Some(Account { - nonce: acc.info.nonce, - balance: acc.info.balance, - bytecode_hash: Some(acc.info.code_hash), - })) + if let acc @ Some(_) = self.state.get_account(&address) { + return Ok(acc) } let (tx, rx) = channel(); if self.to_db.try_send(JsDbRequest::Basic { address, resp: tx }).is_err() { @@ -747,11 +791,93 @@ impl EvmDBInner { let value: B256 = value.into(); to_buf(value.as_slice().to_vec(), ctx) } + + pub(crate) fn into_js_object(self, context: &mut Context<'_>) -> JsResult { + let obj = JsObject::default(); + let exists = FunctionObjectBuilder::new( + context, + NativeFunction::from_copy_closure_with_captures( + move |_this, args, db, ctx| { + let val = args.get_or_undefined(0).clone(); + let acc = db.read_basic(val, ctx)?; + let exists = acc.is_some(); + Ok(JsValue::from(exists)) + }, + self.clone(), + ), + ) + .length(1) + .build(); + + let get_balance = FunctionObjectBuilder::new( + context, + NativeFunction::from_copy_closure_with_captures( + move |_this, args, db, ctx| { + let val = args.get_or_undefined(0).clone(); + let acc = db.read_basic(val, ctx)?; + let balance = acc.map(|acc| acc.balance).unwrap_or_default(); + to_bigint(balance, ctx) + }, + self.clone(), + ), + ) + .length(1) + .build(); + + let get_nonce = FunctionObjectBuilder::new( + context, + NativeFunction::from_copy_closure_with_captures( + move |_this, args, db, ctx| { + let val = args.get_or_undefined(0).clone(); + let acc = db.read_basic(val, ctx)?; + let nonce = acc.map(|acc| acc.nonce).unwrap_or_default(); + Ok(JsValue::from(nonce)) + }, + self.clone(), + ), + ) + .length(1) + .build(); + + let get_code = FunctionObjectBuilder::new( + context, + NativeFunction::from_copy_closure_with_captures( + move |_this, args, db, ctx| { + let val = args.get_or_undefined(0).clone(); + Ok(db.read_code(val, ctx)?.into()) + }, + self.clone(), + ), + ) + .length(1) + .build(); + + let get_state = FunctionObjectBuilder::new( + context, + NativeFunction::from_copy_closure_with_captures( + move |_this, args, db, ctx| { + let addr = args.get_or_undefined(0).clone(); + let slot = args.get_or_undefined(1).clone(); + Ok(db.read_state(addr, slot, ctx)?.into()) + }, + self, + ), + ) + .length(2) + .build(); + + obj.set("getBalance", get_balance, false, context)?; + obj.set("getNonce", get_nonce, false, context)?; + obj.set("getCode", get_code, false, context)?; + obj.set("getState", get_state, false, context)?; + obj.set("exists", exists, false, context)?; + Ok(obj) + } } -impl Finalize for EvmDBInner {} +impl Finalize for EvmDbRef {} -unsafe impl Trace for EvmDBInner { +unsafe impl Trace for EvmDbRef { empty_trace!(); } diff --git a/crates/revm/revm-inspectors/src/tracing/js/builtins.rs b/crates/revm/revm-inspectors/src/tracing/js/builtins.rs index eee817a78d33..5ae1ff7af1b0 100644 --- a/crates/revm/revm-inspectors/src/tracing/js/builtins.rs +++ b/crates/revm/revm-inspectors/src/tracing/js/builtins.rs @@ -67,24 +67,6 @@ pub(crate) fn to_buf_value(bytes: Vec, context: &mut Context<'_>) -> JsResul Ok(to_buf(bytes, context)?.into()) } -/// Create a new array buffer object from byte block. -pub(crate) fn to_bigint_array(items: &[U256], ctx: &mut Context<'_>) -> JsResult { - let arr = JsArray::new(ctx); - let bigint = ctx.global_object().get("bigint", ctx)?; - if !bigint.is_callable() { - return Err(JsError::from_native( - JsNativeError::typ().with_message("global object bigint is not callable"), - )) - } - let bigint = bigint.as_callable().unwrap(); - - for item in items { - let val = bigint.call(&JsValue::undefined(), &[JsValue::from(item.to_string())], ctx)?; - arr.push(val, ctx)?; - } - Ok(arr) -} - /// Converts a buffer type to an address. /// /// If the buffer is larger than the address size, it will be cropped from the left diff --git a/crates/revm/revm-inspectors/src/tracing/js/mod.rs b/crates/revm/revm-inspectors/src/tracing/js/mod.rs index 2824c9065b8b..94adf1d44162 100644 --- a/crates/revm/revm-inspectors/src/tracing/js/mod.rs +++ b/crates/revm/revm-inspectors/src/tracing/js/mod.rs @@ -3,7 +3,7 @@ use crate::tracing::{ js::{ bindings::{ - CallFrame, Contract, EvmContext, EvmDb, FrameResult, MemoryObj, StackObj, StepLog, + CallFrame, Contract, EvmContext, EvmDbRef, FrameResult, MemoryRef, StackRef, StepLog, }, builtins::{register_builtins, PrecompileList}, }, @@ -151,7 +151,7 @@ impl JsInspector { /// Calls the result function and returns the result. pub fn result(&mut self, res: ResultAndState, env: &Env) -> Result { let ResultAndState { result, state } = res; - let db = EvmDb::new(state, self.to_db_service.clone()); + let (db, _db_guard) = EvmDbRef::new(&state, self.to_db_service.clone()); let gas_used = result.gas_used(); let mut to = None; @@ -206,14 +206,14 @@ impl JsInspector { )?) } - fn try_fault(&mut self, step: StepLog, db: EvmDb) -> JsResult<()> { + fn try_fault(&mut self, step: StepLog, db: EvmDbRef) -> JsResult<()> { let step = step.into_js_object(&mut self.ctx)?; let db = db.into_js_object(&mut self.ctx)?; self.fault_fn.call(&(self.obj.clone().into()), &[step.into(), db.into()], &mut self.ctx)?; Ok(()) } - fn try_step(&mut self, step: StepLog, db: EvmDb) -> JsResult<()> { + fn try_step(&mut self, step: StepLog, db: EvmDbRef) -> JsResult<()> { if let Some(step_fn) = &self.step_fn { let step = step.into_js_object(&mut self.ctx)?; let db = db.into_js_object(&mut self.ctx)?; @@ -274,8 +274,7 @@ impl JsInspector { if !self.precompiles_registered { return } - let precompiles = - PrecompileList(precompiles.addresses().into_iter().map(Into::into).collect()); + let precompiles = PrecompileList(precompiles.addresses().into_iter().copied().collect()); let _ = precompiles.register_callable(&mut self.ctx); @@ -292,12 +291,15 @@ where return } - let db = EvmDb::new(data.journaled_state.state.clone(), self.to_db_service.clone()); + let (db, _db_guard) = + EvmDbRef::new(&data.journaled_state.state, self.to_db_service.clone()); + let (stack, _stack_guard) = StackRef::new(&interp.stack); + let (memory, _memory_guard) = MemoryRef::new(interp.shared_memory); let step = StepLog { - stack: StackObj(interp.stack.clone()), + stack, op: interp.current_opcode().into(), - memory: MemoryObj(interp.shared_memory.clone()), + memory, pc: interp.program_counter() as u64, gas_remaining: interp.gas.remaining(), cost: interp.gas.spend(), @@ -327,12 +329,15 @@ where } if matches!(interp.instruction_result, return_revert!()) { - let db = EvmDb::new(data.journaled_state.state.clone(), self.to_db_service.clone()); + let (db, _db_guard) = + EvmDbRef::new(&data.journaled_state.state, self.to_db_service.clone()); + let (stack, _stack_guard) = StackRef::new(&interp.stack); + let (memory, _memory_guard) = MemoryRef::new(interp.shared_memory); let step = StepLog { - stack: StackObj(interp.stack.clone()), + stack, op: interp.current_opcode().into(), - memory: MemoryObj(interp.shared_memory.clone()), + memory, pc: interp.program_counter() as u64, gas_remaining: interp.gas.remaining(), cost: interp.gas.spend(), @@ -511,9 +516,9 @@ struct CallStackItem { pub enum JsInspectorError { #[error(transparent)] JsError(#[from] JsError), - #[error("Failed to eval js code: {0}")] + #[error("failed to evaluate JS code: {0}")] EvalCode(JsError), - #[error("The evaluated code is not a JS object")] + #[error("the evaluated code is not a JS object")] ExpectedJsObject, #[error("trace object must expose a function result()")] ResultFunctionMissing, @@ -521,8 +526,8 @@ pub enum JsInspectorError { FaultFunctionMissing, #[error("setup object must be a function")] SetupFunctionNotCallable, - #[error("Failed to call setup(): {0}")] + #[error("failed to call setup(): {0}")] SetupCallFailed(JsError), - #[error("Invalid JSON config: {0}")] + #[error("invalid JSON config: {0}")] InvalidJsonConfig(JsError), } diff --git a/crates/revm/revm-inspectors/src/tracing/mod.rs b/crates/revm/revm-inspectors/src/tracing/mod.rs index c8d7a45ed557..a947c42538c4 100644 --- a/crates/revm/revm-inspectors/src/tracing/mod.rs +++ b/crates/revm/revm-inspectors/src/tracing/mod.rs @@ -24,7 +24,7 @@ mod types; mod utils; use crate::tracing::{ arena::PushTraceKind, - types::{CallTraceNode, StorageChange, StorageChangeReason}, + types::{CallTraceNode, RecordedMemory, StorageChange, StorageChangeReason}, utils::gas_used, }; pub use builder::{ @@ -280,7 +280,7 @@ impl TracingInspector { let memory = self .config .record_memory_snapshots - .then(|| interp.shared_memory.clone()) + .then(|| RecordedMemory::new(interp.shared_memory.context_memory().to_vec())) .unwrap_or_default(); let stack = self.config.record_stack_snapshots.then(|| interp.stack.clone()).unwrap_or_default(); @@ -302,8 +302,8 @@ impl TracingInspector { contract: interp.contract.address, stack, push_stack: None, + memory_size: memory.len(), memory, - memory_size: interp.shared_memory.len(), gas_remaining: self.gas_inspector.gas_remaining(), gas_refund_counter: interp.gas.refunded() as u64, diff --git a/crates/revm/revm-inspectors/src/tracing/types.rs b/crates/revm/revm-inspectors/src/tracing/types.rs index ee6cf5eede74..89563f62b594 100644 --- a/crates/revm/revm-inspectors/src/tracing/types.rs +++ b/crates/revm/revm-inspectors/src/tracing/types.rs @@ -11,7 +11,7 @@ use reth_rpc_types::trace::{ }, }; use revm::interpreter::{ - opcode, CallContext, CallScheme, CreateScheme, InstructionResult, OpCode, SharedMemory, Stack, + opcode, CallContext, CallScheme, CreateScheme, InstructionResult, OpCode, Stack, }; use serde::{Deserialize, Serialize}; use std::collections::{BTreeMap, VecDeque}; @@ -518,7 +518,7 @@ pub(crate) struct CallTraceStep { /// All allocated memory in a step /// /// This will be empty if memory capture is disabled - pub(crate) memory: SharedMemory, + pub(crate) memory: RecordedMemory, /// Size of memory at the beginning of the step pub(crate) memory_size: usize, /// Remaining gas before step execution @@ -568,7 +568,7 @@ impl CallTraceStep { } if opts.is_memory_enabled() { - log.memory = Some(convert_memory(self.memory.slice(0, self.memory.len()))); + log.memory = Some(self.memory.memory_chunks()); } log @@ -623,3 +623,36 @@ pub(crate) struct StorageChange { pub(crate) had_value: Option, pub(crate) reason: StorageChangeReason, } + +/// Represents the memory captured during execution +/// +/// This is a wrapper around the [SharedMemory](revm::interpreter::SharedMemory) context memory. +#[derive(Debug, Clone, PartialEq, Eq, Default)] +pub(crate) struct RecordedMemory(pub(crate) Vec); + +impl RecordedMemory { + pub(crate) fn new(mem: Vec) -> Self { + Self(mem) + } + + pub(crate) fn as_bytes(&self) -> &[u8] { + &self.0 + } + + pub(crate) fn resize(&mut self, size: usize) { + self.0.resize(size, 0); + } + + pub(crate) fn len(&self) -> usize { + self.0.len() + } + + pub(crate) fn is_empty(&self) -> bool { + self.0.is_empty() + } + + /// Converts the memory into 32byte hex chunks + pub(crate) fn memory_chunks(&self) -> Vec { + convert_memory(self.as_bytes()) + } +} diff --git a/crates/revm/revm-inspectors/src/tracing/utils.rs b/crates/revm/revm-inspectors/src/tracing/utils.rs index 3d5224965809..a50edd89519e 100644 --- a/crates/revm/revm-inspectors/src/tracing/utils.rs +++ b/crates/revm/revm-inspectors/src/tracing/utils.rs @@ -1,6 +1,6 @@ //! Util functions for revm related ops -use reth_primitives::{hex, Address, B256}; +use reth_primitives::{hex, revm_primitives::db::DatabaseRef, Address, Bytes, B256, KECCAK_EMPTY}; use revm::{ interpreter::CreateInputs, primitives::{CreateScheme, SpecId}, @@ -35,3 +35,25 @@ pub(crate) fn get_create_address(call: &CreateInputs, nonce: u64) -> Address { } } } + +/// Loads the code for the given account from the account itself or the database +/// +/// Returns None if the code hash is the KECCAK_EMPTY hash +#[inline] +pub(crate) fn load_account_code( + db: DB, + db_acc: &revm::primitives::AccountInfo, +) -> Option { + db_acc + .code + .as_ref() + .map(|code| code.original_bytes()) + .or_else(|| { + if db_acc.code_hash == KECCAK_EMPTY { + None + } else { + db.code_by_hash_ref(db_acc.code_hash).ok().map(|code| code.original_bytes()) + } + }) + .map(Into::into) +} diff --git a/crates/revm/src/processor.rs b/crates/revm/src/processor.rs index de86e2e3323b..c23fcbed3498 100644 --- a/crates/revm/src/processor.rs +++ b/crates/revm/src/processor.rs @@ -268,7 +268,7 @@ impl<'a> EVMProcessor<'a> { // main execution. self.evm.transact() }; - out.map_err(|e| BlockValidationError::EVM { hash, message: format!("{e:?}") }.into()) + out.map_err(|e| BlockValidationError::EVM { hash, error: e.into() }.into()) } /// Runs the provided transactions and commits their state to the run-time database. @@ -534,8 +534,8 @@ pub fn verify_receipt<'a>( let receipts_root = reth_primitives::proofs::calculate_receipt_root(&receipts_with_bloom); if receipts_root != expected_receipts_root { return Err(BlockValidationError::ReceiptRootDiff { - got: receipts_root, - expected: expected_receipts_root, + got: Box::new(receipts_root), + expected: Box::new(expected_receipts_root), } .into()) } diff --git a/crates/revm/src/state_change.rs b/crates/revm/src/state_change.rs index 20a162acbdab..6fe24790f401 100644 --- a/crates/revm/src/state_change.rs +++ b/crates/revm/src/state_change.rs @@ -4,8 +4,8 @@ use reth_primitives::{ constants::SYSTEM_ADDRESS, revm::env::fill_tx_env_with_beacon_root_contract_call, Address, ChainSpec, Header, Withdrawal, B256, U256, }; -use revm::{primitives::ResultAndState, Database, DatabaseCommit, EVM}; -use std::{collections::HashMap, fmt::Debug}; +use revm::{Database, DatabaseCommit, EVM}; +use std::collections::HashMap; /// Collect all balance changes at the end of the block. /// @@ -61,51 +61,58 @@ pub fn apply_beacon_root_contract_call( chain_spec: &ChainSpec, block_timestamp: u64, block_number: u64, - block_parent_beacon_block_root: Option, + parent_beacon_block_root: Option, evm: &mut EVM, ) -> Result<(), BlockExecutionError> where - ::Error: Debug, + DB::Error: std::fmt::Display, { - if chain_spec.is_cancun_active_at_timestamp(block_timestamp) { - // if the block number is zero (genesis block) then the parent beacon block root must - // be 0x0 and no system transaction may occur as per EIP-4788 - if block_number == 0 { - if block_parent_beacon_block_root != Some(B256::ZERO) { - return Err(BlockValidationError::CancunGenesisParentBeaconBlockRootNotZero.into()) + if !chain_spec.is_cancun_active_at_timestamp(block_timestamp) { + return Ok(()) + } + + let parent_beacon_block_root = + parent_beacon_block_root.ok_or(BlockValidationError::MissingParentBeaconBlockRoot)?; + + // if the block number is zero (genesis block) then the parent beacon block root must + // be 0x0 and no system transaction may occur as per EIP-4788 + if block_number == 0 { + if parent_beacon_block_root != B256::ZERO { + return Err(BlockValidationError::CancunGenesisParentBeaconBlockRootNotZero { + parent_beacon_block_root, } - } else { - let parent_beacon_block_root = block_parent_beacon_block_root.ok_or( - BlockExecutionError::from(BlockValidationError::MissingParentBeaconBlockRoot), - )?; - - // get previous env - let previous_env = evm.env.clone(); - - // modify env for pre block call - fill_tx_env_with_beacon_root_contract_call(&mut evm.env, parent_beacon_block_root); - - let ResultAndState { mut state, .. } = match evm.transact() { - Ok(res) => res, - Err(e) => { - evm.env = previous_env; - return Err(BlockExecutionError::from(BlockValidationError::EVM { - hash: Default::default(), - message: format!("{e:?}"), - })) - } - }; + .into()) + } + return Ok(()) + } - state.remove(&SYSTEM_ADDRESS); - state.remove(&evm.env.block.coinbase); + // get previous env + let previous_env = evm.env.clone(); - let db = evm.db().expect("db to not be moved"); - db.commit(state); + // modify env for pre block call + fill_tx_env_with_beacon_root_contract_call(&mut evm.env, parent_beacon_block_root); - // re-set the previous env + let mut state = match evm.transact() { + Ok(res) => res.state, + Err(e) => { evm.env = previous_env; + return Err(BlockValidationError::BeaconRootContractCall { + parent_beacon_block_root: Box::new(parent_beacon_block_root), + message: e.to_string(), + } + .into()) } - } + }; + + state.remove(&SYSTEM_ADDRESS); + state.remove(&evm.env.block.coinbase); + + let db = evm.db().expect("db to not be moved"); + db.commit(state); + + // re-set the previous env + evm.env = previous_env; + Ok(()) } diff --git a/crates/rpc/ipc/src/client.rs b/crates/rpc/ipc/src/client.rs index 61a8381fcc20..640c0e3a3474 100644 --- a/crates/rpc/ipc/src/client.rs +++ b/crates/rpc/ipc/src/client.rs @@ -120,13 +120,13 @@ impl IpcTransportClientBuilder { #[allow(missing_docs)] pub enum IpcError { /// Operation not supported - #[error("Operation not supported")] + #[error("operation not supported")] NotSupported, /// Stream was closed - #[error("Stream closed")] + #[error("stream closed")] Closed, /// Thrown when failed to establish a socket connection. - #[error("Failed to connect to socket {path}: {err}")] + #[error("failed to connect to socket {path}: {err}")] FailedToConnect { /// The path of the socket. path: PathBuf, diff --git a/crates/rpc/rpc-api/src/eth_filter.rs b/crates/rpc/rpc-api/src/eth_filter.rs index 484157898e1d..8ec470c125b9 100644 --- a/crates/rpc/rpc-api/src/eth_filter.rs +++ b/crates/rpc/rpc-api/src/eth_filter.rs @@ -1,6 +1,5 @@ use jsonrpsee::{core::RpcResult, proc_macros::rpc}; -use reth_rpc_types::{Filter, FilterChanges, FilterId, Log}; - +use reth_rpc_types::{Filter, FilterChanges, FilterId, Log, PendingTransactionFilterKind}; /// Rpc Interface for poll-based ethereum filter API. #[cfg_attr(not(feature = "client"), rpc(server, namespace = "eth"))] #[cfg_attr(feature = "client", rpc(server, client, namespace = "eth"))] @@ -15,7 +14,10 @@ pub trait EthFilterApi { /// Creates a pending transaction filter and returns its id. #[method(name = "newPendingTransactionFilter")] - async fn new_pending_transaction_filter(&self) -> RpcResult; + async fn new_pending_transaction_filter( + &self, + kind: Option, + ) -> RpcResult; /// Returns all filter changes since last poll. #[method(name = "getFilterChanges")] diff --git a/crates/rpc/rpc-api/src/trace.rs b/crates/rpc/rpc-api/src/trace.rs index a05a7bd9af5c..557016a9a57a 100644 --- a/crates/rpc/rpc-api/src/trace.rs +++ b/crates/rpc/rpc-api/src/trace.rs @@ -1,8 +1,9 @@ use jsonrpsee::{core::RpcResult, proc_macros::rpc}; use reth_primitives::{BlockId, Bytes, B256}; use reth_rpc_types::{ - trace::{filter::TraceFilter, parity::*, tracerequest::TraceRequest}, - CallRequest, Index, + state::StateOverride, + trace::{filter::TraceFilter, parity::*}, + BlockOverrides, CallRequest, Index, }; use std::collections::HashSet; @@ -12,7 +13,14 @@ use std::collections::HashSet; pub trait TraceApi { /// Executes the given call and returns a number of possible traces for it. #[method(name = "call")] - async fn trace_call(&self, trace_request: TraceRequest) -> RpcResult; + async fn trace_call( + &self, + call: CallRequest, + trace_types: HashSet, + block_id: Option, + state_overrides: Option, + block_overrides: Option>, + ) -> RpcResult; /// Performs multiple call traces on top of the same block. i.e. transaction n will be executed /// on top of a pending block with all n-1 transactions applied (traced) first. Allows to trace diff --git a/crates/rpc/rpc-builder/src/auth.rs b/crates/rpc/rpc-builder/src/auth.rs index bc526b32dca6..afb0916a9293 100644 --- a/crates/rpc/rpc-builder/src/auth.rs +++ b/crates/rpc/rpc-builder/src/auth.rs @@ -1,6 +1,6 @@ use crate::{ constants, - constants::DEFAULT_MAX_LOGS_PER_RESPONSE, + constants::{DEFAULT_MAX_BLOCKS_PER_FILTER, DEFAULT_MAX_LOGS_PER_RESPONSE}, error::{RpcError, ServerKind}, EthConfig, }; @@ -72,14 +72,11 @@ where BlockingTaskPool::build().expect("failed to build tracing pool"), fee_history_cache, ); - let eth_filter = EthFilter::new( - provider, - pool, - eth_cache.clone(), - DEFAULT_MAX_LOGS_PER_RESPONSE, - Box::new(executor.clone()), - EthConfig::default().stale_filter_ttl, - ); + let config = EthFilterConfig::default() + .max_logs_per_response(DEFAULT_MAX_LOGS_PER_RESPONSE) + .max_blocks_per_filter(DEFAULT_MAX_BLOCKS_PER_FILTER); + let eth_filter = + EthFilter::new(provider, pool, eth_cache.clone(), config, Box::new(executor.clone())); launch_with_eth_api(eth_api, eth_filter, engine_api, socket_addr, secret).await } @@ -132,7 +129,7 @@ where pub struct AuthServerConfig { /// Where the server should listen. pub(crate) socket_addr: SocketAddr, - /// The secrete for the auth layer of the server. + /// The secret for the auth layer of the server. pub(crate) secret: JwtSecret, /// Configs for JSON-RPC Http. pub(crate) server_config: ServerBuilder, diff --git a/crates/rpc/rpc-builder/src/constants.rs b/crates/rpc/rpc-builder/src/constants.rs index cbc051730c8b..6659174123fc 100644 --- a/crates/rpc/rpc-builder/src/constants.rs +++ b/crates/rpc/rpc-builder/src/constants.rs @@ -7,6 +7,9 @@ pub const DEFAULT_WS_RPC_PORT: u16 = 8546; /// The default port for the auth server. pub const DEFAULT_AUTH_PORT: u16 = 8551; +/// The default maximum block range allowed to filter +pub const DEFAULT_MAX_BLOCKS_PER_FILTER: u64 = 100_000; + /// The default maximum of logs in a single response. pub const DEFAULT_MAX_LOGS_PER_RESPONSE: usize = 20_000; diff --git a/crates/rpc/rpc-builder/src/cors.rs b/crates/rpc/rpc-builder/src/cors.rs index 7b7492c86d17..73e755f9fae6 100644 --- a/crates/rpc/rpc-builder/src/cors.rs +++ b/crates/rpc/rpc-builder/src/cors.rs @@ -6,7 +6,7 @@ use tower_http::cors::{AllowOrigin, Any, CorsLayer}; pub(crate) enum CorsDomainError { #[error("{domain} is an invalid header value")] InvalidHeader { domain: String }, - #[error("Wildcard origin (`*`) cannot be passed as part of a list: {input}")] + #[error("wildcard origin (`*`) cannot be passed as part of a list: {input}")] WildCardNotAllowed { input: String }, } diff --git a/crates/rpc/rpc-builder/src/error.rs b/crates/rpc/rpc-builder/src/error.rs index d1689c089a4b..5b13e78824de 100644 --- a/crates/rpc/rpc-builder/src/error.rs +++ b/crates/rpc/rpc-builder/src/error.rs @@ -35,7 +35,7 @@ pub enum RpcError { #[error(transparent)] RpcError(#[from] JsonRpseeError), /// Address already in use. - #[error("Address {kind} is already in use (os error 98)")] + #[error("address {kind} is already in use (os error 98)")] AddressAlreadyInUse { /// Server kind. kind: ServerKind, @@ -74,7 +74,10 @@ impl RpcError { #[derive(Debug, thiserror::Error)] pub enum WsHttpSamePortError { /// Ws and http server configured on same port but with different cors domains. - #[error("CORS domains for http and ws are different, but they are on the same port: http: {http_cors_domains:?}, ws: {ws_cors_domains:?}")] + #[error( + "CORS domains for HTTP and WS are different, but they are on the same port: \ + HTTP: {http_cors_domains:?}, WS: {ws_cors_domains:?}" + )] ConflictingCorsDomains { /// Http cors domains. http_cors_domains: Option, @@ -82,7 +85,10 @@ pub enum WsHttpSamePortError { ws_cors_domains: Option, }, /// Ws and http server configured on same port but with different modules. - #[error("Different api modules for http and ws on the same port is currently not supported: http: {http_modules:?}, ws: {ws_modules:?}")] + #[error( + "different API modules for HTTP and WS on the same port is currently not supported: \ + HTTP: {http_modules:?}, WS: {ws_modules:?}" + )] ConflictingModules { /// Http modules. http_modules: Vec, diff --git a/crates/rpc/rpc-builder/src/eth.rs b/crates/rpc/rpc-builder/src/eth.rs index dd146e1eda81..8da3405368fd 100644 --- a/crates/rpc/rpc-builder/src/eth.rs +++ b/crates/rpc/rpc-builder/src/eth.rs @@ -1,9 +1,11 @@ -use crate::constants::{DEFAULT_MAX_LOGS_PER_RESPONSE, DEFAULT_MAX_TRACING_REQUESTS}; +use crate::constants::{ + DEFAULT_MAX_BLOCKS_PER_FILTER, DEFAULT_MAX_LOGS_PER_RESPONSE, DEFAULT_MAX_TRACING_REQUESTS, +}; use reth_rpc::{ eth::{ cache::{EthStateCache, EthStateCacheConfig}, gas_oracle::GasPriceOracleConfig, - FeeHistoryCacheConfig, RPC_DEFAULT_GAS_CAP, + EthFilterConfig, FeeHistoryCacheConfig, RPC_DEFAULT_GAS_CAP, }, BlockingTaskPool, EthApi, EthFilter, EthPubSub, }; @@ -33,6 +35,8 @@ pub struct EthConfig { pub gas_oracle: GasPriceOracleConfig, /// The maximum number of tracing calls that can be executed in concurrently. pub max_tracing_requests: u32, + /// Maximum number of blocks that could be scanned per filter request in `eth_getLogs` calls. + pub max_blocks_per_filter: u64, /// Maximum number of logs that can be returned in a single response in `eth_getLogs` calls. pub max_logs_per_response: usize, /// Gas limit for `eth_call` and call tracing RPC methods. @@ -46,6 +50,16 @@ pub struct EthConfig { pub fee_history_cache: FeeHistoryCacheConfig, } +impl EthConfig { + /// Returns the filter config for the `eth_filter` handler. + pub fn filter_config(&self) -> EthFilterConfig { + EthFilterConfig::default() + .max_blocks_per_filter(self.max_blocks_per_filter) + .max_logs_per_response(self.max_logs_per_response) + .stale_filter_ttl(self.stale_filter_ttl) + } +} + /// Default value for stale filter ttl const DEFAULT_STALE_FILTER_TTL: std::time::Duration = std::time::Duration::from_secs(5 * 60); @@ -55,6 +69,7 @@ impl Default for EthConfig { cache: EthStateCacheConfig::default(), gas_oracle: GasPriceOracleConfig::default(), max_tracing_requests: DEFAULT_MAX_TRACING_REQUESTS, + max_blocks_per_filter: DEFAULT_MAX_BLOCKS_PER_FILTER, max_logs_per_response: DEFAULT_MAX_LOGS_PER_RESPONSE, rpc_gas_cap: RPC_DEFAULT_GAS_CAP.into(), stale_filter_ttl: DEFAULT_STALE_FILTER_TTL, @@ -82,6 +97,12 @@ impl EthConfig { self } + /// Configures the maximum block length to scan per `eth_getLogs` request + pub fn max_blocks_per_filter(mut self, max_blocks: u64) -> Self { + self.max_blocks_per_filter = max_blocks; + self + } + /// Configures the maximum number of logs per response pub fn max_logs_per_response(mut self, max_logs: usize) -> Self { self.max_logs_per_response = max_logs; diff --git a/crates/rpc/rpc-builder/src/lib.rs b/crates/rpc/rpc-builder/src/lib.rs index b12fc0280406..580de14bf6ac 100644 --- a/crates/rpc/rpc-builder/src/lib.rs +++ b/crates/rpc/rpc-builder/src/lib.rs @@ -98,10 +98,10 @@ #![warn(missing_debug_implementations, missing_docs, unreachable_pub, rustdoc::all)] #![deny(unused_must_use, rust_2018_idioms)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] - use crate::{auth::AuthRpcModule, error::WsHttpSamePortError, metrics::RpcServerMetrics}; use constants::*; use error::{RpcError, ServerKind}; +use hyper::{header::AUTHORIZATION, HeaderMap}; use jsonrpsee::{ server::{IdProvider, Server, ServerHandle}, Methods, RpcModule, @@ -119,9 +119,9 @@ use reth_rpc::{ gas_oracle::GasPriceOracle, FeeHistoryCache, }, - AdminApi, BlockingTaskGuard, BlockingTaskPool, DebugApi, EngineEthApi, EthApi, EthFilter, - EthPubSub, EthSubscriptionIdProvider, NetApi, OtterscanApi, RPCApi, RethApi, TraceApi, - TxPoolApi, Web3Api, + AdminApi, AuthLayer, BlockingTaskGuard, BlockingTaskPool, Claims, DebugApi, EngineEthApi, + EthApi, EthFilter, EthPubSub, EthSubscriptionIdProvider, JwtAuthValidator, JwtSecret, NetApi, + OtterscanApi, RPCApi, RethApi, TraceApi, TxPoolApi, Web3Api, }; use reth_rpc_api::{servers::*, EngineApiServer}; use reth_tasks::{TaskSpawner, TokioTaskExecutor}; @@ -132,6 +132,7 @@ use std::{ fmt, net::{Ipv4Addr, SocketAddr, SocketAddrV4}, str::FromStr, + time::{Duration, SystemTime, UNIX_EPOCH}, }; use strum::{AsRefStr, EnumString, EnumVariantNames, ParseError, VariantNames}; use tower::layer::util::{Identity, Stack}; @@ -1059,9 +1060,8 @@ where self.provider.clone(), self.pool.clone(), cache.clone(), - self.config.eth.max_logs_per_response, + self.config.eth.filter_config(), executor.clone(), - self.config.eth.stale_filter_ttl, ); let pubsub = EthPubSub::with_spawner( @@ -1157,6 +1157,8 @@ pub struct RpcServerConfig { ipc_server_config: Option, /// The Endpoint where to launch the ipc server ipc_endpoint: Option, + /// JWT secret for authentication + jwt_secret: Option, } impl fmt::Debug for RpcServerConfig { @@ -1169,6 +1171,7 @@ impl fmt::Debug for RpcServerConfig { .field("ws_addr", &self.ws_addr) .field("ipc_server_config", &self.ipc_server_config) .field("ipc_endpoint", &self.ipc_endpoint.as_ref().map(|endpoint| endpoint.path())) + .field("jwt_secret", &self.jwt_secret) .finish() } } @@ -1280,6 +1283,12 @@ impl RpcServerConfig { self } + /// Configures the JWT secret for authentication. + pub fn with_jwt_secret(mut self, secret: Option) -> Self { + self.jwt_secret = secret; + self + } + /// Returns true if any server is configured. /// /// If no server is configured, no server will be be launched on [RpcServerConfig::start]. @@ -1317,6 +1326,7 @@ impl RpcServerConfig { Ipv4Addr::LOCALHOST, DEFAULT_HTTP_RPC_PORT, ))); + let jwt_secret = self.jwt_secret.clone(); let ws_socket_addr = self .ws_addr @@ -1344,6 +1354,8 @@ impl RpcServerConfig { } .cloned(); + let secret = self.jwt_secret.clone(); + // we merge this into one server using the http setup self.ws_server_config.take(); @@ -1352,6 +1364,7 @@ impl RpcServerConfig { builder, http_socket_addr, cors, + secret, ServerKind::WsHttp(http_socket_addr), metrics.clone(), ) @@ -1360,6 +1373,7 @@ impl RpcServerConfig { http_local_addr: Some(addr), ws_local_addr: Some(addr), server: WsHttpServers::SamePort(server), + jwt_secret, }) } @@ -1374,6 +1388,7 @@ impl RpcServerConfig { builder, ws_socket_addr, self.ws_cors_domains.take(), + self.jwt_secret.clone(), ServerKind::WS(ws_socket_addr), metrics.clone(), ) @@ -1388,6 +1403,7 @@ impl RpcServerConfig { builder, http_socket_addr, self.http_cors_domains.take(), + self.jwt_secret.clone(), ServerKind::Http(http_socket_addr), metrics.clone(), ) @@ -1400,6 +1416,7 @@ impl RpcServerConfig { http_local_addr, ws_local_addr, server: WsHttpServers::DifferentPort { http: http_server, ws: ws_server }, + jwt_secret, }) } @@ -1619,6 +1636,8 @@ struct WsHttpServer { ws_local_addr: Option, /// Configured ws,http servers server: WsHttpServers, + /// The jwt secret. + jwt_secret: Option, } /// Enum for holding the http and ws servers in all possible combinations. @@ -1683,6 +1702,12 @@ enum WsHttpServerKind { Plain(Server), /// Http server with cors WithCors(Server, RpcServerMetrics>), + /// Http server with auth + WithAuth(Server, Identity>, RpcServerMetrics>), + /// Http server with cors and auth + WithCorsAuth( + Server, Stack>, RpcServerMetrics>, + ), } // === impl WsHttpServerKind === @@ -1693,30 +1718,69 @@ impl WsHttpServerKind { match self { WsHttpServerKind::Plain(server) => server.start(module), WsHttpServerKind::WithCors(server) => server.start(module), + WsHttpServerKind::WithAuth(server) => server.start(module), + WsHttpServerKind::WithCorsAuth(server) => server.start(module), } } - /// Builds + /// Builds the server according to the given config parameters. + /// + /// Returns the address of the started server. async fn build( builder: ServerBuilder, socket_addr: SocketAddr, cors_domains: Option, + jwt_secret: Option, server_kind: ServerKind, metrics: RpcServerMetrics, ) -> Result<(Self, SocketAddr), RpcError> { if let Some(cors) = cors_domains.as_deref().map(cors::create_cors_layer) { let cors = cors.map_err(|err| RpcError::Custom(err.to_string()))?; - let middleware = tower::ServiceBuilder::new().layer(cors); + + if let Some(secret) = jwt_secret { + // stack cors and auth layers + let middleware = tower::ServiceBuilder::new() + .layer(cors) + .layer(AuthLayer::new(JwtAuthValidator::new(secret.clone()))); + + let server = builder + .set_middleware(middleware) + .set_logger(metrics) + .build(socket_addr) + .await + .map_err(|err| RpcError::from_jsonrpsee_error(err, server_kind))?; + let local_addr = server.local_addr()?; + let server = WsHttpServerKind::WithCorsAuth(server); + Ok((server, local_addr)) + } else { + let middleware = tower::ServiceBuilder::new().layer(cors); + let server = builder + .set_middleware(middleware) + .set_logger(metrics) + .build(socket_addr) + .await + .map_err(|err| RpcError::from_jsonrpsee_error(err, server_kind))?; + let local_addr = server.local_addr()?; + let server = WsHttpServerKind::WithCors(server); + Ok((server, local_addr)) + } + } else if let Some(secret) = jwt_secret { + // jwt auth layered service + let middleware = tower::ServiceBuilder::new() + .layer(AuthLayer::new(JwtAuthValidator::new(secret.clone()))); let server = builder .set_middleware(middleware) .set_logger(metrics) .build(socket_addr) .await - .map_err(|err| RpcError::from_jsonrpsee_error(err, server_kind))?; + .map_err(|err| { + RpcError::from_jsonrpsee_error(err, ServerKind::Auth(socket_addr)) + })?; let local_addr = server.local_addr()?; - let server = WsHttpServerKind::WithCors(server); + let server = WsHttpServerKind::WithAuth(server); Ok((server, local_addr)) } else { + // plain server without any middleware let server = builder .set_logger(metrics) .build(socket_addr) @@ -1748,6 +1812,10 @@ impl RpcServer { pub fn http_local_addr(&self) -> Option { self.ws_http.http_local_addr } + /// Return the JwtSecret of the the server + pub fn jwt(&self) -> Option { + self.ws_http.jwt_secret.clone() + } /// Returns the [`SocketAddr`] of the ws server if started. pub fn ws_local_addr(&self) -> Option { @@ -1775,6 +1843,7 @@ impl RpcServer { ws: None, ipc_endpoint: None, ipc: None, + jwt_secret: None, }; let (http, ws) = ws_http.server.start(http, ws, &config).await?; @@ -1815,11 +1884,28 @@ pub struct RpcServerHandle { ws: Option, ipc_endpoint: Option, ipc: Option, + jwt_secret: Option, } // === impl RpcServerHandle === impl RpcServerHandle { + /// Configures the JWT secret for authentication. + fn bearer_token(&self) -> Option { + self.jwt_secret.as_ref().map(|secret| { + format!( + "Bearer {}", + secret + .encode(&Claims { + iat: (SystemTime::now().duration_since(UNIX_EPOCH).unwrap() + + Duration::from_secs(60)) + .as_secs(), + exp: None, + }) + .unwrap() + ) + }) + } /// Returns the [`SocketAddr`] of the http server if started. pub fn http_local_addr(&self) -> Option { self.http_local_addr @@ -1865,19 +1951,28 @@ impl RpcServerHandle { /// Returns a http client connected to the server. pub fn http_client(&self) -> Option { let url = self.http_url()?; - let client = jsonrpsee::http_client::HttpClientBuilder::default() - .build(url) - .expect("Failed to create http client"); - Some(client) - } + let client = if let Some(token) = self.bearer_token() { + jsonrpsee::http_client::HttpClientBuilder::default() + .set_headers(HeaderMap::from_iter([(AUTHORIZATION, token.parse().unwrap())])) + .build(url) + } else { + jsonrpsee::http_client::HttpClientBuilder::default().build(url) + }; + + client.expect("failed to create http client").into() + } /// Returns a ws client connected to the server. pub async fn ws_client(&self) -> Option { let url = self.ws_url()?; - let client = jsonrpsee::ws_client::WsClientBuilder::default() - .build(url) - .await - .expect("Failed to create ws client"); + let mut builder = jsonrpsee::ws_client::WsClientBuilder::default(); + + if let Some(token) = self.bearer_token() { + let headers = HeaderMap::from_iter([(AUTHORIZATION, token.parse().unwrap())]); + builder = builder.set_headers(headers); + } + + let client = builder.build(url).await.expect("failed to create ws client"); Some(client) } } diff --git a/crates/rpc/rpc-builder/tests/it/http.rs b/crates/rpc/rpc-builder/tests/it/http.rs index 45931efc441f..85a87b67ec90 100644 --- a/crates/rpc/rpc-builder/tests/it/http.rs +++ b/crates/rpc/rpc-builder/tests/it/http.rs @@ -18,7 +18,10 @@ use reth_rpc_api::{ Web3ApiClient, }; use reth_rpc_builder::RethRpcModule; -use reth_rpc_types::{trace::filter::TraceFilter, CallRequest, Filter, Index, TransactionRequest}; +use reth_rpc_types::{ + trace::filter::TraceFilter, CallRequest, Filter, Index, PendingTransactionFilterKind, + TransactionRequest, +}; use std::collections::HashSet; fn is_unimplemented(err: Error) -> bool { @@ -36,7 +39,13 @@ where C: ClientT + SubscriptionClientT + Sync, { EthFilterApiClient::new_filter(client, Filter::default()).await.unwrap(); - EthFilterApiClient::new_pending_transaction_filter(client).await.unwrap(); + EthFilterApiClient::new_pending_transaction_filter(client, None).await.unwrap(); + EthFilterApiClient::new_pending_transaction_filter( + client, + Some(PendingTransactionFilterKind::Full), + ) + .await + .unwrap(); let id = EthFilterApiClient::new_block_filter(client).await.unwrap(); EthFilterApiClient::filter_changes(client, id.clone()).await.unwrap(); EthFilterApiClient::logs(client, Filter::default()).await.unwrap(); diff --git a/crates/rpc/rpc-engine-api/Cargo.toml b/crates/rpc/rpc-engine-api/Cargo.toml index ad2e876e6b8a..65e81ad74fdc 100644 --- a/crates/rpc/rpc-engine-api/Cargo.toml +++ b/crates/rpc/rpc-engine-api/Cargo.toml @@ -32,6 +32,7 @@ thiserror.workspace = true jsonrpsee-types.workspace = true jsonrpsee-core.workspace = true tracing.workspace = true +serde.workspace = true [dev-dependencies] alloy-rlp.workspace = true diff --git a/crates/rpc/rpc-engine-api/src/engine_api.rs b/crates/rpc/rpc-engine-api/src/engine_api.rs index 7fd29331d0ff..d2267e096adc 100644 --- a/crates/rpc/rpc-engine-api/src/engine_api.rs +++ b/crates/rpc/rpc-engine-api/src/engine_api.rs @@ -805,6 +805,7 @@ mod tests { use reth_payload_builder::test_utils::spawn_test_payload_service; use reth_primitives::{SealedBlock, B256, MAINNET}; use reth_provider::test_utils::MockEthProvider; + use reth_rpc_types_compat::engine::payload::execution_payload_from_sealed_block; use reth_tasks::TokioTaskExecutor; use std::sync::Arc; use tokio::sync::mpsc::{unbounded_channel, UnboundedReceiver}; @@ -837,7 +838,9 @@ mod tests { let (mut handle, api) = setup_engine_api(); tokio::spawn(async move { - api.new_payload_v1(SealedBlock::default().into()).await.unwrap(); + api.new_payload_v1(execution_payload_from_sealed_block(SealedBlock::default())) + .await + .unwrap(); }); assert_matches!(handle.from_api.recv().await, Some(BeaconEngineMessage::NewPayload { .. })); } diff --git a/crates/rpc/rpc-engine-api/src/error.rs b/crates/rpc/rpc-engine-api/src/error.rs index 8ec546608847..fe1637e77b40 100644 --- a/crates/rpc/rpc-engine-api/src/error.rs +++ b/crates/rpc/rpc-engine-api/src/error.rs @@ -1,4 +1,6 @@ -use jsonrpsee_types::error::{INTERNAL_ERROR_CODE, INVALID_PARAMS_CODE}; +use jsonrpsee_types::error::{ + INTERNAL_ERROR_CODE, INVALID_PARAMS_CODE, INVALID_PARAMS_MSG, SERVER_ERROR_MSG, +}; use reth_beacon_consensus::{BeaconForkChoiceUpdateError, BeaconOnNewPayloadError}; use reth_payload_builder::error::PayloadBuilderError; use reth_primitives::{B256, U256}; @@ -14,26 +16,31 @@ pub const UNKNOWN_PAYLOAD_CODE: i32 = -38001; /// Request too large error code. pub const REQUEST_TOO_LARGE_CODE: i32 = -38004; +/// Error message for the request too large error. +const REQUEST_TOO_LARGE_MESSAGE: &str = "Too large request"; + /// Error returned by [`EngineApi`][crate::EngineApi] /// -/// Note: This is a high-fidelity error type which can be converted to an RPC error that adheres to the spec: +/// Note: This is a high-fidelity error type which can be converted to an RPC error that adheres to +/// the [Engine API spec](https://github.com/ethereum/execution-apis/blob/main/src/engine/common.md#errors). #[derive(Error, Debug)] pub enum EngineApiError { - /// Unknown payload requested. + // **IMPORTANT**: keep error messages in sync with the Engine API spec linked above. + /// Payload does not exist / is not available. #[error("Unknown payload")] UnknownPayload, /// The payload body request length is too large. - #[error("Payload request too large: {len}")] + #[error("requested count too large: {len}")] PayloadRequestTooLarge { /// The length that was requested. len: u64, }, /// Thrown if engine_getPayloadBodiesByRangeV1 contains an invalid range - #[error("invalid start or count, start: {start} count: {count}")] + #[error("invalid start ({start}) or count ({count})")] InvalidBodiesRange { /// Start of the range start: u64, - /// requested number of items + /// Requested number of items count: u64, }, /// Thrown if `PayloadAttributes` provided in engine_forkchoiceUpdated before V3 contains a @@ -44,10 +51,10 @@ pub enum EngineApiError { #[error("withdrawals not supported in V1")] WithdrawalsNotSupportedInV1, /// Thrown if engine_forkchoiceUpdated contains no withdrawals after Shanghai - #[error("no withdrawals post-shanghai")] + #[error("no withdrawals post-Shanghai")] NoWithdrawalsPostShanghai, /// Thrown if engine_forkchoiceUpdated contains withdrawals before Shanghai - #[error("withdrawals pre-shanghai")] + #[error("withdrawals pre-Shanghai")] HasWithdrawalsPreShanghai, /// Thrown if the `PayloadAttributes` provided in engine_forkchoiceUpdated contains no parent /// beacon block root after Cancun @@ -55,11 +62,12 @@ pub enum EngineApiError { NoParentBeaconBlockRootPostCancun, /// Thrown if `PayloadAttributes` were provided with a timestamp, but the version of the engine /// method called is meant for a fork that occurs after the provided timestamp. - #[error("unsupported fork")] + #[error("Unsupported fork")] UnsupportedFork, /// Terminal total difficulty mismatch during transition configuration exchange. #[error( - "Invalid transition terminal total difficulty. Execution: {execution}. Consensus: {consensus}" + "invalid transition terminal total difficulty: \ + execution: {execution}, consensus: {consensus}" )] TerminalTD { /// Execution terminal total difficulty value. @@ -69,7 +77,8 @@ pub enum EngineApiError { }, /// Terminal block hash mismatch during transition configuration exchange. #[error( - "Invalid transition terminal block hash. Execution: {execution:?}. Consensus: {consensus:?}" + "invalid transition terminal block hash: \ + execution: {execution:?}, consensus: {consensus}" )] TerminalBlockHash { /// Execution terminal block hash. `None` if block number is not found in the database. @@ -85,43 +94,103 @@ pub enum EngineApiError { NewPayload(#[from] BeaconOnNewPayloadError), /// Encountered an internal error. #[error(transparent)] - Internal(Box), + Internal(#[from] Box), /// Fetching the payload failed #[error(transparent)] GetPayloadError(#[from] PayloadBuilderError), } +/// Helper type to represent the `error` field in the error response: +/// +#[derive(serde::Serialize)] +struct ErrorData { + err: String, +} + +impl ErrorData { + #[inline] + fn new(err: impl std::fmt::Display) -> Self { + Self { err: err.to_string() } + } +} + impl From for jsonrpsee_types::error::ErrorObject<'static> { fn from(error: EngineApiError) -> Self { - let code = match error { + match error { EngineApiError::InvalidBodiesRange { .. } | EngineApiError::WithdrawalsNotSupportedInV1 | EngineApiError::ParentBeaconBlockRootNotSupportedBeforeV3 | EngineApiError::NoParentBeaconBlockRootPostCancun | EngineApiError::NoWithdrawalsPostShanghai | - EngineApiError::HasWithdrawalsPreShanghai => INVALID_PARAMS_CODE, - EngineApiError::UnknownPayload => UNKNOWN_PAYLOAD_CODE, - EngineApiError::PayloadRequestTooLarge { .. } => REQUEST_TOO_LARGE_CODE, - EngineApiError::UnsupportedFork => UNSUPPORTED_FORK_CODE, - + EngineApiError::HasWithdrawalsPreShanghai => { + // Note: the data field is not required by the spec, but is also included by other + // clients + jsonrpsee_types::error::ErrorObject::owned( + INVALID_PARAMS_CODE, + INVALID_PARAMS_MSG, + Some(ErrorData::new(error)), + ) + } + EngineApiError::UnknownPayload => jsonrpsee_types::error::ErrorObject::owned( + UNKNOWN_PAYLOAD_CODE, + error.to_string(), + None::<()>, + ), + EngineApiError::PayloadRequestTooLarge { .. } => { + jsonrpsee_types::error::ErrorObject::owned( + REQUEST_TOO_LARGE_CODE, + REQUEST_TOO_LARGE_MESSAGE, + Some(ErrorData::new(error)), + ) + } + EngineApiError::UnsupportedFork => jsonrpsee_types::error::ErrorObject::owned( + UNSUPPORTED_FORK_CODE, + error.to_string(), + None::<()>, + ), // Error responses from the consensus engine EngineApiError::ForkChoiceUpdate(ref err) => match err { - BeaconForkChoiceUpdateError::ForkchoiceUpdateError(err) => return (*err).into(), + BeaconForkChoiceUpdateError::ForkchoiceUpdateError(err) => (*err).into(), BeaconForkChoiceUpdateError::EngineUnavailable | - BeaconForkChoiceUpdateError::Internal(_) => INTERNAL_ERROR_CODE, + BeaconForkChoiceUpdateError::Internal(_) => { + jsonrpsee_types::error::ErrorObject::owned( + INTERNAL_ERROR_CODE, + SERVER_ERROR_MSG, + Some(ErrorData::new(error)), + ) + } }, EngineApiError::NewPayload(ref err) => match err { - BeaconOnNewPayloadError::Internal(_) | - BeaconOnNewPayloadError::PreCancunBlockWithBlobTransactions => INVALID_PARAMS_CODE, - BeaconOnNewPayloadError::EngineUnavailable => INTERNAL_ERROR_CODE, + BeaconOnNewPayloadError::Internal(_) => jsonrpsee_types::error::ErrorObject::owned( + INTERNAL_ERROR_CODE, + SERVER_ERROR_MSG, + Some(ErrorData::new(error)), + ), + BeaconOnNewPayloadError::PreCancunBlockWithBlobTransactions => { + jsonrpsee_types::error::ErrorObject::owned( + INVALID_PARAMS_CODE, + INVALID_PARAMS_MSG, + Some(ErrorData::new(error)), + ) + } + BeaconOnNewPayloadError::EngineUnavailable => { + jsonrpsee_types::error::ErrorObject::owned( + INTERNAL_ERROR_CODE, + SERVER_ERROR_MSG, + Some(ErrorData::new(error)), + ) + } }, // Any other server error EngineApiError::TerminalTD { .. } | EngineApiError::TerminalBlockHash { .. } | EngineApiError::Internal(_) | - EngineApiError::GetPayloadError(_) => INTERNAL_ERROR_CODE, - }; - jsonrpsee_types::error::ErrorObject::owned(code, error.to_string(), None::<()>) + EngineApiError::GetPayloadError(_) => jsonrpsee_types::error::ErrorObject::owned( + INTERNAL_ERROR_CODE, + SERVER_ERROR_MSG, + Some(ErrorData::new(error)), + ), + } } } @@ -130,3 +199,60 @@ impl From for jsonrpsee_core::error::Error { jsonrpsee_core::error::Error::Call(error.into()) } } + +#[cfg(test)] +mod tests { + use super::*; + use reth_rpc_types::engine::ForkchoiceUpdateError; + + #[track_caller] + fn ensure_engine_rpc_error( + code: i32, + message: &str, + err: impl Into>, + ) { + let err = err.into(); + dbg!(&err); + assert_eq!(err.code(), code); + assert_eq!(err.message(), message); + } + + // Tests that engine errors are formatted correctly according to the engine API spec + // + #[test] + fn engine_error_rpc_error_test() { + ensure_engine_rpc_error( + UNSUPPORTED_FORK_CODE, + "Unsupported fork", + EngineApiError::UnsupportedFork, + ); + + ensure_engine_rpc_error( + REQUEST_TOO_LARGE_CODE, + "Too large request", + EngineApiError::PayloadRequestTooLarge { len: 0 }, + ); + + ensure_engine_rpc_error( + -38002, + "Invalid forkchoice state", + EngineApiError::ForkChoiceUpdate(BeaconForkChoiceUpdateError::ForkchoiceUpdateError( + ForkchoiceUpdateError::InvalidState, + )), + ); + + ensure_engine_rpc_error( + -38003, + "Invalid payload attributes", + EngineApiError::ForkChoiceUpdate(BeaconForkChoiceUpdateError::ForkchoiceUpdateError( + ForkchoiceUpdateError::UpdatedInvalidPayloadAttributes, + )), + ); + + ensure_engine_rpc_error( + UNKNOWN_PAYLOAD_CODE, + "Unknown payload", + EngineApiError::UnknownPayload, + ); + } +} diff --git a/crates/rpc/rpc-testing-util/src/trace.rs b/crates/rpc/rpc-testing-util/src/trace.rs index 69e51b398d27..575383b66f4b 100644 --- a/crates/rpc/rpc-testing-util/src/trace.rs +++ b/crates/rpc/rpc-testing-util/src/trace.rs @@ -1,20 +1,43 @@ //! Helpers for testing trace calls. use futures::{Stream, StreamExt}; use jsonrpsee::core::Error as RpcError; -use reth_primitives::{BlockId, TxHash}; +use reth_primitives::{BlockId, Bytes, TxHash, B256}; use reth_rpc_api::clients::TraceApiClient; -use reth_rpc_types::trace::parity::{LocalizedTransactionTrace, TraceResults, TraceType}; +use reth_rpc_types::{ + trace::{ + filter::TraceFilter, + parity::{LocalizedTransactionTrace, TraceResults, TraceType}, + }, + CallRequest, Index, +}; use std::{ collections::HashSet, pin::Pin, task::{Context, Poll}, }; +/// A type alias that represents the result of a raw transaction trace stream. +type RawTransactionTraceResult<'a> = + Pin> + 'a>>; /// A result type for the `trace_block` method that also captures the requested block. pub type TraceBlockResult = Result<(Vec, BlockId), (RpcError, BlockId)>; /// Type alias representing the result of replaying a transaction. pub type ReplayTransactionResult = Result<(TraceResults, TxHash), (RpcError, TxHash)>; +/// A type representing the result of calling `trace_call_many` method. + +pub type CallManyTraceResult = Result< + (Vec, Vec<(CallRequest, HashSet)>), + (RpcError, Vec<(CallRequest, HashSet)>), +>; +/// Result type for the `trace_get` method that also captures the requested transaction hash and +/// index. +pub type TraceGetResult = + Result<(Option, B256, Vec), (RpcError, B256, Vec)>; +/// Represents a result type for the `trace_filter` stream extension. +pub type TraceFilterResult = + Result<(Vec, TraceFilter), (RpcError, TraceFilter)>; + /// An extension trait for the Trace API. #[async_trait::async_trait] pub trait TraceApiExt { @@ -47,6 +70,118 @@ pub trait TraceApiExt { ) -> ReplayTransactionStream<'_> where I: IntoIterator; + + /// Returns a new stream that traces the provided raw transaction data. + fn trace_raw_transaction_stream( + &self, + data: Bytes, + trace_types: HashSet, + block_id: Option, + ) -> RawTransactionTraceStream<'_>; + /// Creates a stream of results for multiple dependent transaction calls on top of the same + /// block. + + fn trace_call_many_stream( + &self, + calls: I, + block_id: Option, + ) -> CallManyTraceStream<'_> + where + I: IntoIterator)>; + /// Returns a new stream that yields the traces for the given transaction hash and indices. + fn trace_get_stream(&self, hash: B256, indices: I) -> TraceGetStream<'_> + where + I: IntoIterator; + + /// Returns a new stream that yields traces for given filters. + fn trace_filter_stream(&self, filters: I) -> TraceFilterStream<'_> + where + I: IntoIterator; +} + +/// Represents a stream that asynchronously yields the results of the `trace_filter` method. +#[must_use = "streams do nothing unless polled"] +pub struct TraceFilterStream<'a> { + stream: Pin + 'a>>, +} + +impl<'a> Stream for TraceFilterStream<'a> { + type Item = TraceFilterResult; + + /// Attempts to pull out the next value of the stream. + fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll> { + self.stream.as_mut().poll_next(cx) + } +} + +impl<'a> std::fmt::Debug for TraceFilterStream<'a> { + /// Provides a debug representation of the `TraceFilterStream`. + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("TraceFilterStream").finish_non_exhaustive() + } +} +/// A stream that asynchronously yields the results of the `trace_get` method for a given +/// transaction hash and a series of indices. +#[must_use = "streams do nothing unless polled"] +pub struct TraceGetStream<'a> { + stream: Pin + 'a>>, +} +impl<'a> Stream for TraceGetStream<'a> { + type Item = TraceGetResult; + /// Attempts to pull out the next item of the stream + fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll> { + self.stream.as_mut().poll_next(cx) + } +} + +impl<'a> std::fmt::Debug for TraceGetStream<'a> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("TraceGetStream").finish_non_exhaustive() + } +} + +/// A stream that provides asynchronous iteration over results from the `trace_call_many` function. +/// +/// The stream yields items of type `CallManyTraceResult`. +#[must_use = "streams do nothing unless polled"] +pub struct CallManyTraceStream<'a> { + stream: Pin + 'a>>, +} + +impl<'a> Stream for CallManyTraceStream<'a> { + type Item = CallManyTraceResult; + /// Polls for the next item from the stream. + + fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll> { + self.stream.as_mut().poll_next(cx) + } +} + +impl<'a> std::fmt::Debug for CallManyTraceStream<'a> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("CallManyTraceStream").finish() + } +} + +/// A stream that traces the provided raw transaction data. + +#[must_use = "streams do nothing unless polled"] +pub struct RawTransactionTraceStream<'a> { + stream: RawTransactionTraceResult<'a>, +} + +impl<'a> Stream for RawTransactionTraceStream<'a> { + type Item = Result<(TraceResults, Bytes), (RpcError, Bytes)>; + + fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll> { + self.stream.as_mut().poll_next(cx) + } +} + +impl<'a> std::fmt::Debug for RawTransactionTraceStream<'a> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("RawTransactionTraceStream").finish() + } } /// A stream that replays the transactions for the requested hashes. @@ -125,6 +260,68 @@ impl TraceApiExt for T { .buffered(10); ReplayTransactionStream { stream: Box::pin(stream) } } + fn trace_raw_transaction_stream( + &self, + data: Bytes, + trace_types: HashSet, + block_id: Option, + ) -> RawTransactionTraceStream<'_> { + let stream = futures::stream::once(async move { + match self.trace_raw_transaction(data.clone(), trace_types, block_id).await { + Ok(result) => Ok((result, data)), + Err(err) => Err((err, data)), + } + }); + RawTransactionTraceStream { stream: Box::pin(stream) } + } + + fn trace_call_many_stream( + &self, + calls: I, + block_id: Option, + ) -> CallManyTraceStream<'_> + where + I: IntoIterator)>, + { + let call_set = calls.into_iter().collect::>(); + let stream = futures::stream::once(async move { + match self.trace_call_many(call_set.clone(), block_id).await { + Ok(results) => Ok((results, call_set)), + Err(err) => Err((err, call_set)), + } + }); + CallManyTraceStream { stream: Box::pin(stream) } + } + + fn trace_get_stream(&self, hash: B256, indices: I) -> TraceGetStream<'_> + where + I: IntoIterator, + { + let index_list = indices.into_iter().collect::>(); + let stream = futures::stream::iter(index_list.into_iter().map(move |index| async move { + match self.trace_get(hash, vec![index]).await { + Ok(result) => Ok((result, hash, vec![index])), + Err(err) => Err((err, hash, vec![index])), + } + })) + .buffered(10); + TraceGetStream { stream: Box::pin(stream) } + } + + fn trace_filter_stream(&self, filters: I) -> TraceFilterStream<'_> + where + I: IntoIterator, + { + let filter_list = filters.into_iter().collect::>(); + let stream = futures::stream::iter(filter_list.into_iter().map(move |filter| async move { + match self.trace_filter(filter.clone()).await { + Ok(result) => Ok((result, filter)), + Err(err) => Err((err, filter)), + } + })) + .buffered(10); + TraceFilterStream { stream: Box::pin(stream) } + } } /// A stream that yields the traces for the requested blocks. @@ -164,6 +361,7 @@ mod tests { use super::*; use jsonrpsee::http_client::HttpClientBuilder; use reth_primitives::BlockNumberOrTag; + use std::collections::HashSet; fn assert_is_stream(_: &St) {} @@ -213,4 +411,52 @@ mod tests { println!("Total successes: {}", successes); println!("Total failures: {}", failures); } + + #[tokio::test] + #[ignore] + async fn can_create_trace_call_many_stream() { + let client = HttpClientBuilder::default().build("http://localhost:8545").unwrap(); + + let call_request_1 = CallRequest::default(); + let call_request_2 = CallRequest::default(); + let trace_types = HashSet::from([TraceType::StateDiff, TraceType::VmTrace]); + let calls = vec![(call_request_1, trace_types.clone()), (call_request_2, trace_types)]; + + let mut stream = client.trace_call_many_stream(calls, None); + + assert_is_stream(&stream); + + while let Some(result) = stream.next().await { + match result { + Ok(trace_result) => { + println!("Success: {:?}", trace_result); + } + Err(error) => { + println!("Error: {:?}", error); + } + } + } + } + #[tokio::test] + #[ignore] + async fn can_create_trace_get_stream() { + let client = HttpClientBuilder::default().build("http://localhost:8545").unwrap(); + + let tx_hash: B256 = "".parse().unwrap(); + + let indices: Vec = vec![Index::from(0)]; + + let mut stream = client.trace_get_stream(tx_hash, indices); + + while let Some(result) = stream.next().await { + match result { + Ok(trace) => { + println!("Received trace: {:?}", trace); + } + Err(e) => { + println!("Error fetching trace: {:?}", e); + } + } + } + } } diff --git a/crates/rpc/rpc-testing-util/tests/it/trace.rs b/crates/rpc/rpc-testing-util/tests/it/trace.rs index 0e3d6559fd65..eb83913f088b 100644 --- a/crates/rpc/rpc-testing-util/tests/it/trace.rs +++ b/crates/rpc/rpc-testing-util/tests/it/trace.rs @@ -1,7 +1,8 @@ +use futures::StreamExt; use jsonrpsee::http_client::HttpClientBuilder; use reth_rpc_api_testing_util::{trace::TraceApiExt, utils::parse_env_url}; -use std::time::Instant; - +use reth_rpc_types::trace::parity::TraceType; +use std::{collections::HashSet, time::Instant}; /// This is intended to be run locally against a running node. /// /// This is a noop of env var `RETH_RPC_TEST_NODE_URL` is not set. @@ -21,3 +22,26 @@ async fn trace_many_blocks() { } println!("Traced all blocks in {:?}", now.elapsed()); } + +/// Tests the replaying of transactions on a local Ethereum node. + +#[tokio::test(flavor = "multi_thread")] +#[ignore] +async fn replay_transactions() { + let url = parse_env_url("RETH_RPC_TEST_NODE_URL").unwrap(); + let client = HttpClientBuilder::default().build(url).unwrap(); + + let tx_hashes = vec![ + "0x4e08fe36db723a338e852f89f613e606b0c9a17e649b18b01251f86236a2cef3".parse().unwrap(), + "0xea2817f1aeeb587b82f4ab87a6dbd3560fc35ed28de1be280cb40b2a24ab48bb".parse().unwrap(), + ]; + + let trace_types = HashSet::from([TraceType::StateDiff, TraceType::VmTrace]); + + let mut stream = client.replay_transactions(tx_hashes, trace_types); + let now = Instant::now(); + while let Some(replay_txs) = stream.next().await { + println!("Transaction: {:?}", replay_txs); + println!("Replayed transactions in {:?}", now.elapsed()); + } +} diff --git a/crates/rpc/rpc-types-compat/src/block.rs b/crates/rpc/rpc-types-compat/src/block.rs index a5d5d94769c1..570697dffb76 100644 --- a/crates/rpc/rpc-types-compat/src/block.rs +++ b/crates/rpc/rpc-types-compat/src/block.rs @@ -2,7 +2,7 @@ use crate::transaction::from_recovered_with_block_context; use alloy_rlp::Encodable; -use reth_primitives::{Block as PrimitiveBlock, Header as PrimitiveHeader, B256, U256}; +use reth_primitives::{Block as PrimitiveBlock, Header as PrimitiveHeader, B256, U256, U64}; use reth_rpc_types::{Block, BlockError, BlockTransactions, BlockTransactionsKind, Header}; /// Converts the given primitive block into a [Block] response with the given @@ -85,6 +85,71 @@ pub fn from_block_full( )) } +/// Converts from a [reth_primitives::SealedHeader] to a [reth_rpc_types::BlockNumberOrTag] +pub fn from_primitive_with_hash(primitive_header: reth_primitives::SealedHeader) -> Header { + let reth_primitives::SealedHeader { + header: + PrimitiveHeader { + parent_hash, + ommers_hash, + beneficiary, + state_root, + transactions_root, + receipts_root, + logs_bloom, + difficulty, + number, + gas_limit, + gas_used, + timestamp, + mix_hash, + nonce, + base_fee_per_gas, + extra_data, + withdrawals_root, + blob_gas_used, + excess_blob_gas, + parent_beacon_block_root, + }, + hash, + } = primitive_header; + + Header { + hash: Some(hash), + parent_hash, + uncles_hash: ommers_hash, + miner: beneficiary, + state_root, + transactions_root, + receipts_root, + withdrawals_root, + number: Some(U256::from(number)), + gas_used: U256::from(gas_used), + gas_limit: U256::from(gas_limit), + extra_data, + logs_bloom, + timestamp: U256::from(timestamp), + difficulty, + mix_hash, + nonce: Some(nonce.to_be_bytes().into()), + base_fee_per_gas: base_fee_per_gas.map(U256::from), + blob_gas_used: blob_gas_used.map(U64::from), + excess_blob_gas: excess_blob_gas.map(U64::from), + parent_beacon_block_root, + } +} + +fn from_primitive_withdrawal( + withdrawal: reth_primitives::Withdrawal, +) -> reth_rpc_types::Withdrawal { + reth_rpc_types::Withdrawal { + index: withdrawal.index, + address: withdrawal.address, + validator_index: withdrawal.validator_index, + amount: withdrawal.amount, + } +} + #[inline] fn from_block_with_transactions( block_length: usize, @@ -94,8 +159,14 @@ fn from_block_with_transactions( transactions: BlockTransactions, ) -> Block { let uncles = block.ommers.into_iter().map(|h| h.hash_slow()).collect(); - let header = Header::from_primitive_with_hash(block.header.seal(block_hash)); - let withdrawals = if header.withdrawals_root.is_some() { block.withdrawals } else { None }; + let header = from_primitive_with_hash(block.header.seal(block_hash)); + let withdrawals = if header.withdrawals_root.is_some() { + block + .withdrawals + .map(|withdrawals| withdrawals.into_iter().map(from_primitive_withdrawal).collect()) + } else { + None + }; Block { header, uncles, @@ -110,7 +181,7 @@ fn from_block_with_transactions( /// an Uncle from its header. pub fn uncle_block_from_header(header: PrimitiveHeader) -> Block { let hash = header.hash_slow(); - let rpc_header = Header::from_primitive_with_hash(header.clone().seal(hash)); + let rpc_header = from_primitive_with_hash(header.clone().seal(hash)); let uncle_block = PrimitiveBlock { header, ..Default::default() }; let size = Some(U256::from(uncle_block.length())); Block { diff --git a/crates/rpc/rpc-types-compat/src/engine/payload.rs b/crates/rpc/rpc-types-compat/src/engine/payload.rs index 0ebe8b6baf2b..7b0dbdb987df 100644 --- a/crates/rpc/rpc-types-compat/src/engine/payload.rs +++ b/crates/rpc/rpc-types-compat/src/engine/payload.rs @@ -360,6 +360,47 @@ pub fn convert_to_payload_body_v1(value: Block) -> ExecutionPayloadBodyV1 { ExecutionPayloadBodyV1 { transactions: transactions.collect(), withdrawals: withdraw } } +/// Transforms a [reth_primitives::BlobTransactionSidecar] into a +/// [reth_rpc_types::BlobTransactionSidecar] +pub fn from_primitive_sidecar( + sidecar: reth_primitives::BlobTransactionSidecar, +) -> reth_rpc_types::BlobTransactionSidecar { + reth_rpc_types::BlobTransactionSidecar { + blobs: sidecar.blobs, + commitments: sidecar.commitments, + proofs: sidecar.proofs, + } +} + +/// Transforms a [SealedBlock] into a [ExecutionPayloadV1] +pub fn execution_payload_from_sealed_block(value: SealedBlock) -> ExecutionPayloadV1 { + let transactions = value + .body + .iter() + .map(|tx| { + let mut encoded = Vec::new(); + tx.encode_enveloped(&mut encoded); + encoded.into() + }) + .collect(); + ExecutionPayloadV1 { + parent_hash: value.parent_hash, + fee_recipient: value.beneficiary, + state_root: value.state_root, + receipts_root: value.receipts_root, + logs_bloom: value.logs_bloom, + prev_randao: value.mix_hash, + block_number: U64::from(value.number), + gas_limit: U64::from(value.gas_limit), + gas_used: U64::from(value.gas_used), + timestamp: U64::from(value.timestamp), + extra_data: value.extra_data.clone(), + base_fee_per_gas: U256::from(value.base_fee_per_gas.unwrap_or_default()), + block_hash: value.hash(), + transactions, + } +} + #[cfg(test)] mod tests { use reth_primitives::{hex, Bytes, U256, U64}; diff --git a/crates/rpc/rpc-types-compat/src/log.rs b/crates/rpc/rpc-types-compat/src/log.rs index fed647571ade..2d2ebb2e98c9 100644 --- a/crates/rpc/rpc-types-compat/src/log.rs +++ b/crates/rpc/rpc-types-compat/src/log.rs @@ -15,6 +15,13 @@ pub fn from_primitive_log(log: reth_primitives::Log) -> reth_rpc_types::Log { removed: false, } } + +/// Converts from a [reth_rpc_types::Log] to a [reth_primitives::Log] +#[inline] +pub fn to_primitive_log(log: reth_rpc_types::Log) -> reth_primitives::Log { + reth_primitives::Log { address: log.address, topics: log.topics, data: log.data } +} + /// Converts a primitive `AccessList` structure from the `reth_primitives` module into the /// corresponding RPC type. #[inline] @@ -30,3 +37,19 @@ pub fn from_primitive_access_list(list: reth_primitives::AccessList) -> reth_rpc reth_rpc_types::AccessList(converted_list) } + +/// Converts a primitive `AccessList` structure from the `reth_primitives` module into the +/// corresponding RPC type. +#[inline] +pub fn to_primitive_access_list(list: reth_rpc_types::AccessList) -> reth_primitives::AccessList { + let converted_list: Vec = list + .0 + .into_iter() + .map(|item| reth_primitives::AccessListItem { + address: item.address, + storage_keys: item.storage_keys, + }) + .collect(); + + reth_primitives::AccessList(converted_list) +} diff --git a/crates/rpc/rpc-types-compat/src/proof.rs b/crates/rpc/rpc-types-compat/src/proof.rs index aea17f0c794d..32c2cf9ac6cb 100644 --- a/crates/rpc/rpc-types-compat/src/proof.rs +++ b/crates/rpc/rpc-types-compat/src/proof.rs @@ -1,11 +1,10 @@ //! Compatibility functions for rpc proof related types. use reth_primitives::{ - serde_helper::JsonStorageKey, trie::{AccountProof, StorageProof}, U64, }; -use reth_rpc_types::{EIP1186AccountProofResponse, EIP1186StorageProof}; +use reth_rpc_types::{storage::JsonStorageKey, EIP1186AccountProofResponse, EIP1186StorageProof}; /// Creates a new rpc storage proof from a primitive storage proof type. pub fn from_primitive_storage_proof(proof: StorageProof) -> EIP1186StorageProof { diff --git a/crates/rpc/rpc-types-compat/src/transaction/mod.rs b/crates/rpc/rpc-types-compat/src/transaction/mod.rs index 53ae7cd20372..dcbe633aa123 100644 --- a/crates/rpc/rpc-types-compat/src/transaction/mod.rs +++ b/crates/rpc/rpc-types-compat/src/transaction/mod.rs @@ -1,11 +1,13 @@ //! Compatibility functions for rpc `Transaction` type. mod signature; +mod typed; use reth_primitives::{ BlockNumber, Transaction as PrimitiveTransaction, TransactionKind as PrimitiveTransactionKind, TransactionSignedEcRecovered, TxType, B256, U128, U256, U64, }; use reth_rpc_types::{AccessListItem, CallInput, CallRequest, Transaction}; use signature::from_primitive_signature; +pub use typed::*; /// Create a new rpc transaction result for a mined transaction, using the given block hash, /// number, and tx index fields to populate the corresponding fields in the rpc result. /// @@ -52,7 +54,9 @@ fn fill( // baseFee` let gas_price = base_fee .and_then(|base_fee| { - signed_tx.effective_tip_per_gas(base_fee).map(|tip| tip + base_fee as u128) + signed_tx + .effective_tip_per_gas(Some(base_fee)) + .map(|tip| tip + base_fee as u128) }) .unwrap_or_else(|| signed_tx.max_fee_per_gas()); @@ -132,6 +136,38 @@ fn fill( } } +/// Convert [reth_primitives::AccessList] to [reth_rpc_types::AccessList] +pub fn from_primitive_access_list( + access_list: reth_primitives::AccessList, +) -> reth_rpc_types::AccessList { + reth_rpc_types::AccessList( + access_list + .0 + .into_iter() + .map(|item| reth_rpc_types::AccessListItem { + address: item.address.0.into(), + storage_keys: item.storage_keys.into_iter().map(|key| key.0.into()).collect(), + }) + .collect(), + ) +} + +/// Convert [reth_rpc_types::AccessList] to [reth_primitives::AccessList] +pub fn to_primitive_access_list( + access_list: reth_rpc_types::AccessList, +) -> reth_primitives::AccessList { + reth_primitives::AccessList( + access_list + .0 + .into_iter() + .map(|item| reth_primitives::AccessListItem { + address: item.address.0.into(), + storage_keys: item.storage_keys.into_iter().map(|key| key.0.into()).collect(), + }) + .collect(), + ) +} + /// Convert [TransactionSignedEcRecovered] to [CallRequest] pub fn transaction_to_call_request(tx: TransactionSignedEcRecovered) -> CallRequest { let from = tx.signer(); @@ -141,7 +177,7 @@ pub fn transaction_to_call_request(tx: TransactionSignedEcRecovered) -> CallRequ let input = tx.transaction.input().clone(); let nonce = tx.transaction.nonce(); let chain_id = tx.transaction.chain_id(); - let access_list = tx.transaction.access_list().cloned(); + let access_list = tx.transaction.access_list().cloned().map(from_primitive_access_list); let max_fee_per_blob_gas = tx.transaction.max_fee_per_blob_gas(); let blob_versioned_hashes = tx.transaction.blob_versioned_hashes(); let tx_type = tx.transaction.tx_type(); diff --git a/crates/rpc/rpc-types-compat/src/transaction/typed.rs b/crates/rpc/rpc-types-compat/src/transaction/typed.rs new file mode 100644 index 000000000000..19adf6652c2d --- /dev/null +++ b/crates/rpc/rpc-types-compat/src/transaction/typed.rs @@ -0,0 +1,70 @@ +use crate::log::to_primitive_access_list; + +/// Converts a typed transaction request into a primitive transaction. +/// +/// Returns `None` if any of the following are true: +/// - `nonce` is greater than [`u64::MAX`] +/// - `gas_limit` is greater than [`u64::MAX`] +/// - `value` is greater than [`u128::MAX`] +pub fn to_primitive_transaction( + tx_request: reth_rpc_types::TypedTransactionRequest, +) -> Option { + use reth_primitives::{Transaction, TxEip1559, TxEip2930, TxEip4844, TxLegacy}; + use reth_rpc_types::TypedTransactionRequest; + + Some(match tx_request { + TypedTransactionRequest::Legacy(tx) => Transaction::Legacy(TxLegacy { + chain_id: tx.chain_id, + nonce: tx.nonce.to(), + gas_price: tx.gas_price.to(), + gas_limit: tx.gas_limit.try_into().ok()?, + to: to_primitive_transaction_kind(tx.kind), + value: tx.value.into(), + input: tx.input, + }), + TypedTransactionRequest::EIP2930(tx) => Transaction::Eip2930(TxEip2930 { + chain_id: tx.chain_id, + nonce: tx.nonce.to(), + gas_price: tx.gas_price.to(), + gas_limit: tx.gas_limit.try_into().ok()?, + to: to_primitive_transaction_kind(tx.kind), + value: tx.value.into(), + input: tx.input, + access_list: to_primitive_access_list(tx.access_list), + }), + TypedTransactionRequest::EIP1559(tx) => Transaction::Eip1559(TxEip1559 { + chain_id: tx.chain_id, + nonce: tx.nonce.to(), + max_fee_per_gas: tx.max_fee_per_gas.to(), + gas_limit: tx.gas_limit.try_into().ok()?, + to: to_primitive_transaction_kind(tx.kind), + value: tx.value.into(), + input: tx.input, + access_list: to_primitive_access_list(tx.access_list), + max_priority_fee_per_gas: tx.max_priority_fee_per_gas.to(), + }), + TypedTransactionRequest::EIP4844(tx) => Transaction::Eip4844(TxEip4844 { + chain_id: tx.chain_id, + nonce: tx.nonce.to(), + gas_limit: tx.gas_limit.to(), + max_fee_per_gas: tx.max_fee_per_gas.to(), + max_priority_fee_per_gas: tx.max_priority_fee_per_gas.to(), + to: to_primitive_transaction_kind(tx.kind), + value: tx.value.into(), + access_list: to_primitive_access_list(tx.access_list), + blob_versioned_hashes: tx.blob_versioned_hashes, + max_fee_per_blob_gas: tx.max_fee_per_blob_gas.to(), + input: tx.input, + }), + }) +} + +/// Transforms a [reth_rpc_types::TransactionKind] into a [reth_primitives::TransactionKind] +pub fn to_primitive_transaction_kind( + kind: reth_rpc_types::TransactionKind, +) -> reth_primitives::TransactionKind { + match kind { + reth_rpc_types::TransactionKind::Call(to) => reth_primitives::TransactionKind::Call(to), + reth_rpc_types::TransactionKind::Create => reth_primitives::TransactionKind::Create, + } +} diff --git a/crates/rpc/rpc-types/Cargo.toml b/crates/rpc/rpc-types/Cargo.toml index 98d1c95034d2..1e1a3fd2a398 100644 --- a/crates/rpc/rpc-types/Cargo.toml +++ b/crates/rpc/rpc-types/Cargo.toml @@ -11,11 +11,8 @@ Reth RPC types """ [dependencies] -# reth -reth-primitives.workspace = true - # # ethereum -alloy-rlp = { workspace = true, features = ["arrayvec"] } +alloy-rlp = { workspace = true, features = ["arrayvec", "derive"] } # misc thiserror.workspace = true @@ -24,13 +21,27 @@ serde = { workspace = true, features = ["derive"] } serde_with = "3.3" serde_json.workspace = true jsonrpsee-types = { workspace = true, optional = true } -alloy-primitives = { workspace = true, features = ["rand", "rlp"] } +alloy-primitives = { workspace = true, features = ["rand", "rlp", "serde"] } +c-kzg = { workspace = true, features = ["serde"] } +url = "2.3" +# necessary so we don't hit a "undeclared 'std'": +# https://github.com/paradigmxyz/reth/pull/177#discussion_r1021172198 +secp256k1.workspace = true +bytes.workspace = true +arbitrary = { workspace = true, features = ["derive"], optional = true } +proptest = { workspace = true, optional = true } +proptest-derive = { workspace = true, optional = true } [features] default = ["jsonrpsee-types"] +arbitrary = ["dep:arbitrary", "dep:proptest-derive", "dep:proptest", "alloy-primitives/arbitrary"] [dev-dependencies] # misc +alloy-primitives = { workspace = true, features = ["rand", "rlp", "serde", "arbitrary"] } +arbitrary = { workspace = true, features = ["derive"] } +proptest.workspace = true +proptest-derive.workspace = true rand.workspace = true -similar-asserts = "1.4" \ No newline at end of file +similar-asserts = "1.4" diff --git a/crates/rpc/rpc-types/src/admin.rs b/crates/rpc/rpc-types/src/admin.rs index b250e39c7c7f..03ddb17ef6cd 100644 --- a/crates/rpc/rpc-types/src/admin.rs +++ b/crates/rpc/rpc-types/src/admin.rs @@ -1,5 +1,5 @@ +use crate::{NodeRecord, PeerId}; use alloy_primitives::{B256, U256}; -use reth_primitives::{NodeRecord, PeerId}; use serde::{Deserialize, Serialize}; use std::{ collections::BTreeMap, @@ -79,7 +79,7 @@ pub struct NetworkStatus { #[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] pub struct EthProtocolInfo { /// The current difficulty at the head of the chain. - #[serde(deserialize_with = "reth_primitives::serde_helper::deserialize_json_u256")] + #[serde(deserialize_with = "crate::serde_helpers::json_u256::deserialize_json_u256")] pub difficulty: U256, /// The block hash of the head of the chain. pub head: B256, diff --git a/crates/rpc/rpc-types/src/eth/account.rs b/crates/rpc/rpc-types/src/eth/account.rs index 567285e6fa91..7188dc98ab2a 100644 --- a/crates/rpc/rpc-types/src/eth/account.rs +++ b/crates/rpc/rpc-types/src/eth/account.rs @@ -1,6 +1,6 @@ #![allow(missing_docs)] +use crate::serde_helpers::storage::JsonStorageKey; use alloy_primitives::{Address, Bytes, B256, B512, U256, U64}; -use reth_primitives::serde_helper::JsonStorageKey; use serde::{Deserialize, Serialize}; /// Account information. diff --git a/crates/rpc/rpc-types/src/eth/block.rs b/crates/rpc/rpc-types/src/eth/block.rs index afd98f0554dd..c4522c7844b4 100644 --- a/crates/rpc/rpc-types/src/eth/block.rs +++ b/crates/rpc/rpc-types/src/eth/block.rs @@ -1,9 +1,19 @@ -//! Contains types that represent ethereum types in [reth_primitives] when used in RPC -use crate::Transaction; -use alloy_primitives::{Address, Bloom, Bytes, B256, B64, U256, U64}; -use reth_primitives::{Header as PrimitiveHeader, SealedHeader, Withdrawal}; -use serde::{ser::Error, Deserialize, Serialize, Serializer}; -use std::{collections::BTreeMap, ops::Deref}; +//! Contains types that represent ethereum types when used in RPC +use crate::{Transaction, Withdrawal}; +use alloy_primitives::{Address, BlockHash, BlockNumber, Bloom, Bytes, B256, B64, U256, U64}; +use alloy_rlp::{bytes, Decodable, Encodable, Error as RlpError}; +use serde::{ + de::{MapAccess, Visitor}, + ser::{Error, SerializeStruct}, + Deserialize, Deserializer, Serialize, Serializer, +}; +use std::{ + collections::BTreeMap, + fmt::{self, Formatter}, + num::ParseIntError, + ops::Deref, + str::FromStr, +}; /// Block Transactions depending on the boolean attribute of `eth_getBlockBy*`, /// or if used by `eth_getUncle*` #[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)] @@ -120,7 +130,7 @@ pub struct Block { } /// Block header representation. -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Hash)] #[serde(rename_all = "camelCase")] pub struct Header { /// Hash of the block @@ -173,62 +183,506 @@ pub struct Header { pub parent_beacon_block_root: Option, } -// === impl Header === +/// A block hash which may have +/// a boolean requireCanonical field. +/// If false, an RPC call should raise if a block +/// matching the hash is not found. +/// If true, an RPC call should additionaly raise if +/// the block is not in the canonical chain. +/// +#[derive(Copy, Clone, Debug, PartialEq, Eq, Serialize)] +pub struct RpcBlockHash { + /// A block hash + pub block_hash: B256, + /// Whether the block must be a canonical block + pub require_canonical: Option, +} -impl Header { - /// Converts the primitive header type to this RPC type - /// - /// CAUTION: this takes the header's hash as is and does _not_ calculate the hash. - pub fn from_primitive_with_hash(primitive_header: SealedHeader) -> Self { - let SealedHeader { - header: - PrimitiveHeader { - parent_hash, - ommers_hash, - beneficiary, - state_root, - transactions_root, - receipts_root, - logs_bloom, - difficulty, - number, - gas_limit, - gas_used, - timestamp, - mix_hash, - nonce, - base_fee_per_gas, - extra_data, - withdrawals_root, - blob_gas_used, - excess_blob_gas, - parent_beacon_block_root, - }, - hash, - } = primitive_header; - - Header { - hash: Some(hash), - parent_hash, - uncles_hash: ommers_hash, - miner: beneficiary, - state_root, - transactions_root, - receipts_root, - withdrawals_root, - number: Some(U256::from(number)), - gas_used: U256::from(gas_used), - gas_limit: U256::from(gas_limit), - extra_data, - logs_bloom, - timestamp: U256::from(timestamp), - difficulty, - mix_hash, - nonce: Some(nonce.to_be_bytes().into()), - base_fee_per_gas: base_fee_per_gas.map(U256::from), - blob_gas_used: blob_gas_used.map(U64::from), - excess_blob_gas: excess_blob_gas.map(U64::from), - parent_beacon_block_root, +impl RpcBlockHash { + /// Returns an [RpcBlockHash] from a [B256]. + pub const fn from_hash(block_hash: B256, require_canonical: Option) -> Self { + RpcBlockHash { block_hash, require_canonical } + } +} + +impl From for RpcBlockHash { + fn from(value: B256) -> Self { + Self::from_hash(value, None) + } +} + +impl From for B256 { + fn from(value: RpcBlockHash) -> Self { + value.block_hash + } +} + +impl AsRef for RpcBlockHash { + fn as_ref(&self) -> &B256 { + &self.block_hash + } +} + +/// A block Number (or tag - "latest", "earliest", "pending") +#[derive(Copy, Clone, Debug, Default, PartialEq, Eq, Hash)] +pub enum BlockNumberOrTag { + /// Latest block + #[default] + Latest, + /// Finalized block accepted as canonical + Finalized, + /// Safe head block + Safe, + /// Earliest block (genesis) + Earliest, + /// Pending block (not yet part of the blockchain) + Pending, + /// Block by number from canon chain + Number(u64), +} + +impl BlockNumberOrTag { + /// Returns the numeric block number if explicitly set + pub const fn as_number(&self) -> Option { + match *self { + BlockNumberOrTag::Number(num) => Some(num), + _ => None, + } + } + + /// Returns `true` if a numeric block number is set + pub const fn is_number(&self) -> bool { + matches!(self, BlockNumberOrTag::Number(_)) + } + + /// Returns `true` if it's "latest" + pub const fn is_latest(&self) -> bool { + matches!(self, BlockNumberOrTag::Latest) + } + + /// Returns `true` if it's "finalized" + pub const fn is_finalized(&self) -> bool { + matches!(self, BlockNumberOrTag::Finalized) + } + + /// Returns `true` if it's "safe" + pub const fn is_safe(&self) -> bool { + matches!(self, BlockNumberOrTag::Safe) + } + + /// Returns `true` if it's "pending" + pub const fn is_pending(&self) -> bool { + matches!(self, BlockNumberOrTag::Pending) + } + + /// Returns `true` if it's "earliest" + pub const fn is_earliest(&self) -> bool { + matches!(self, BlockNumberOrTag::Earliest) + } +} + +impl From for BlockNumberOrTag { + fn from(num: u64) -> Self { + BlockNumberOrTag::Number(num) + } +} + +impl From for BlockNumberOrTag { + fn from(num: U64) -> Self { + num.into_limbs()[0].into() + } +} + +impl Serialize for BlockNumberOrTag { + fn serialize(&self, serializer: S) -> Result + where + S: Serializer, + { + match *self { + BlockNumberOrTag::Number(ref x) => serializer.serialize_str(&format!("0x{x:x}")), + BlockNumberOrTag::Latest => serializer.serialize_str("latest"), + BlockNumberOrTag::Finalized => serializer.serialize_str("finalized"), + BlockNumberOrTag::Safe => serializer.serialize_str("safe"), + BlockNumberOrTag::Earliest => serializer.serialize_str("earliest"), + BlockNumberOrTag::Pending => serializer.serialize_str("pending"), + } + } +} + +impl<'de> Deserialize<'de> for BlockNumberOrTag { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + let s = String::deserialize(deserializer)?.to_lowercase(); + s.parse().map_err(serde::de::Error::custom) + } +} + +impl FromStr for BlockNumberOrTag { + type Err = ParseBlockNumberError; + + fn from_str(s: &str) -> Result { + let block = match s { + "latest" => Self::Latest, + "finalized" => Self::Finalized, + "safe" => Self::Safe, + "earliest" => Self::Earliest, + "pending" => Self::Pending, + _number => { + if let Some(hex_val) = s.strip_prefix("0x") { + let number = u64::from_str_radix(hex_val, 16); + BlockNumberOrTag::Number(number?) + } else { + return Err(HexStringMissingPrefixError::default().into()) + } + } + }; + Ok(block) + } +} + +impl fmt::Display for BlockNumberOrTag { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + BlockNumberOrTag::Number(ref x) => format!("0x{x:x}").fmt(f), + BlockNumberOrTag::Latest => f.write_str("latest"), + BlockNumberOrTag::Finalized => f.write_str("finalized"), + BlockNumberOrTag::Safe => f.write_str("safe"), + BlockNumberOrTag::Earliest => f.write_str("earliest"), + BlockNumberOrTag::Pending => f.write_str("pending"), + } + } +} + +/// Error variants when parsing a [BlockNumberOrTag] +#[derive(Debug, thiserror::Error)] +pub enum ParseBlockNumberError { + /// Failed to parse hex value + #[error(transparent)] + ParseIntErr(#[from] ParseIntError), + /// Block numbers should be 0x-prefixed + #[error(transparent)] + MissingPrefix(#[from] HexStringMissingPrefixError), +} + +/// Thrown when a 0x-prefixed hex string was expected +#[derive(Copy, Clone, Debug, Default, thiserror::Error)] +#[non_exhaustive] +#[error("hex string without 0x prefix")] +pub struct HexStringMissingPrefixError; + +/// A Block Identifier +/// +#[derive(Copy, Clone, Debug, PartialEq, Eq)] +pub enum BlockId { + /// A block hash and an optional bool that defines if it's canonical + Hash(RpcBlockHash), + /// A block number + Number(BlockNumberOrTag), +} + +// === impl BlockId === + +impl BlockId { + /// Returns the block hash if it is [BlockId::Hash] + pub const fn as_block_hash(&self) -> Option { + match self { + BlockId::Hash(hash) => Some(hash.block_hash), + BlockId::Number(_) => None, + } + } + + /// Returns true if this is [BlockNumberOrTag::Latest] + pub const fn is_latest(&self) -> bool { + matches!(self, BlockId::Number(BlockNumberOrTag::Latest)) + } + + /// Returns true if this is [BlockNumberOrTag::Pending] + pub const fn is_pending(&self) -> bool { + matches!(self, BlockId::Number(BlockNumberOrTag::Pending)) + } +} + +impl From for BlockId { + fn from(num: u64) -> Self { + BlockNumberOrTag::Number(num).into() + } +} + +impl From for BlockId { + fn from(num: BlockNumberOrTag) -> Self { + BlockId::Number(num) + } +} + +impl From for BlockId { + fn from(block_hash: B256) -> Self { + BlockId::Hash(RpcBlockHash { block_hash, require_canonical: None }) + } +} + +impl From<(B256, Option)> for BlockId { + fn from(hash_can: (B256, Option)) -> Self { + BlockId::Hash(RpcBlockHash { block_hash: hash_can.0, require_canonical: hash_can.1 }) + } +} + +impl Serialize for BlockId { + fn serialize(&self, serializer: S) -> Result + where + S: Serializer, + { + match *self { + BlockId::Hash(RpcBlockHash { ref block_hash, ref require_canonical }) => { + let mut s = serializer.serialize_struct("BlockIdEip1898", 1)?; + s.serialize_field("blockHash", block_hash)?; + if let Some(require_canonical) = require_canonical { + s.serialize_field("requireCanonical", require_canonical)?; + } + s.end() + } + BlockId::Number(ref num) => num.serialize(serializer), + } + } +} + +impl<'de> Deserialize<'de> for BlockId { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + struct BlockIdVisitor; + + impl<'de> Visitor<'de> for BlockIdVisitor { + type Value = BlockId; + + fn expecting(&self, formatter: &mut Formatter<'_>) -> std::fmt::Result { + formatter.write_str("Block identifier following EIP-1898") + } + + fn visit_str(self, v: &str) -> Result + where + E: serde::de::Error, + { + // Since there is no way to clearly distinguish between a DATA parameter and a QUANTITY parameter. A str is therefor deserialized into a Block Number: + // However, since the hex string should be a QUANTITY, we can safely assume that if the len is 66 bytes, it is in fact a hash, ref + if v.len() == 66 { + Ok(BlockId::Hash(v.parse::().map_err(serde::de::Error::custom)?.into())) + } else { + // quantity hex string or tag + Ok(BlockId::Number(v.parse().map_err(serde::de::Error::custom)?)) + } + } + + fn visit_map(self, mut map: A) -> Result + where + A: MapAccess<'de>, + { + let mut number = None; + let mut block_hash = None; + let mut require_canonical = None; + while let Some(key) = map.next_key::()? { + match key.as_str() { + "blockNumber" => { + if number.is_some() || block_hash.is_some() { + return Err(serde::de::Error::duplicate_field("blockNumber")) + } + if require_canonical.is_some() { + return Err(serde::de::Error::custom( + "Non-valid require_canonical field", + )) + } + number = Some(map.next_value::()?) + } + "blockHash" => { + if number.is_some() || block_hash.is_some() { + return Err(serde::de::Error::duplicate_field("blockHash")) + } + + block_hash = Some(map.next_value::()?); + } + "requireCanonical" => { + if number.is_some() || require_canonical.is_some() { + return Err(serde::de::Error::duplicate_field("requireCanonical")) + } + + require_canonical = Some(map.next_value::()?) + } + key => { + return Err(serde::de::Error::unknown_field( + key, + &["blockNumber", "blockHash", "requireCanonical"], + )) + } + } + } + + if let Some(number) = number { + Ok(BlockId::Number(number)) + } else if let Some(block_hash) = block_hash { + Ok(BlockId::Hash(RpcBlockHash { block_hash, require_canonical })) + } else { + Err(serde::de::Error::custom( + "Expected `blockNumber` or `blockHash` with `requireCanonical` optionally", + )) + } + } + } + + deserializer.deserialize_any(BlockIdVisitor) + } +} + +/// Block number and hash. +#[derive(Clone, Copy, Hash, Default, PartialEq, Eq)] +pub struct BlockNumHash { + /// Block number + pub number: BlockNumber, + /// Block hash + pub hash: BlockHash, +} + +/// Block number and hash of the forked block. +pub type ForkBlock = BlockNumHash; + +impl std::fmt::Debug for BlockNumHash { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_tuple("").field(&self.number).field(&self.hash).finish() + } +} + +impl BlockNumHash { + /// Creates a new `BlockNumHash` from a block number and hash. + pub fn new(number: BlockNumber, hash: BlockHash) -> Self { + Self { number, hash } + } + + /// Consumes `Self` and returns [`BlockNumber`], [`BlockHash`] + pub fn into_components(self) -> (BlockNumber, BlockHash) { + (self.number, self.hash) + } + + /// Returns whether or not the block matches the given [BlockHashOrNumber]. + pub fn matches_block_or_num(&self, block: &BlockHashOrNumber) -> bool { + match block { + BlockHashOrNumber::Hash(hash) => self.hash == *hash, + BlockHashOrNumber::Number(number) => self.number == *number, + } + } +} + +impl From<(BlockNumber, BlockHash)> for BlockNumHash { + fn from(val: (BlockNumber, BlockHash)) -> Self { + BlockNumHash { number: val.0, hash: val.1 } + } +} + +impl From<(BlockHash, BlockNumber)> for BlockNumHash { + fn from(val: (BlockHash, BlockNumber)) -> Self { + BlockNumHash { hash: val.0, number: val.1 } + } +} + +/// Either a block hash _or_ a block number +#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] +#[cfg_attr( + any(test, feature = "arbitrary"), + derive(proptest_derive::Arbitrary, arbitrary::Arbitrary) +)] +pub enum BlockHashOrNumber { + /// A block hash + Hash(B256), + /// A block number + Number(u64), +} + +// === impl BlockHashOrNumber === + +impl BlockHashOrNumber { + /// Returns the block number if it is a [`BlockHashOrNumber::Number`]. + #[inline] + pub fn as_number(self) -> Option { + match self { + BlockHashOrNumber::Hash(_) => None, + BlockHashOrNumber::Number(num) => Some(num), + } + } +} + +impl From for BlockHashOrNumber { + fn from(value: B256) -> Self { + BlockHashOrNumber::Hash(value) + } +} + +impl From for BlockHashOrNumber { + fn from(value: u64) -> Self { + BlockHashOrNumber::Number(value) + } +} + +/// Allows for RLP encoding of either a block hash or block number +impl Encodable for BlockHashOrNumber { + fn encode(&self, out: &mut dyn bytes::BufMut) { + match self { + Self::Hash(block_hash) => block_hash.encode(out), + Self::Number(block_number) => block_number.encode(out), + } + } + fn length(&self) -> usize { + match self { + Self::Hash(block_hash) => block_hash.length(), + Self::Number(block_number) => block_number.length(), + } + } +} + +/// Allows for RLP decoding of a block hash or block number +impl Decodable for BlockHashOrNumber { + fn decode(buf: &mut &[u8]) -> alloy_rlp::Result { + let header: u8 = *buf.first().ok_or(RlpError::InputTooShort)?; + // if the byte string is exactly 32 bytes, decode it into a Hash + // 0xa0 = 0x80 (start of string) + 0x20 (32, length of string) + if header == 0xa0 { + // strip the first byte, parsing the rest of the string. + // If the rest of the string fails to decode into 32 bytes, we'll bubble up the + // decoding error. + let hash = B256::decode(buf)?; + Ok(Self::Hash(hash)) + } else { + // a block number when encoded as bytes ranges from 0 to any number of bytes - we're + // going to accept numbers which fit in less than 64 bytes. + // Any data larger than this which is not caught by the Hash decoding should error and + // is considered an invalid block number. + Ok(Self::Number(u64::decode(buf)?)) + } + } +} + +/// Error thrown when parsing a [BlockHashOrNumber] from a string. +#[derive(Debug, thiserror::Error)] +#[error("failed to parse {input:?} as a number: {parse_int_error} or hash: {hex_error}")] +pub struct ParseBlockHashOrNumberError { + input: String, + parse_int_error: ParseIntError, + hex_error: alloy_primitives::hex::FromHexError, +} + +impl FromStr for BlockHashOrNumber { + type Err = ParseBlockHashOrNumberError; + + fn from_str(s: &str) -> Result { + match u64::from_str(s) { + Ok(val) => Ok(val.into()), + Err(pares_int_error) => match B256::from_str(s) { + Ok(val) => Ok(val.into()), + Err(hex_error) => Err(ParseBlockHashOrNumberError { + input: s.to_string(), + parse_int_error: pares_int_error, + hex_error, + }), + }, } } } diff --git a/crates/rpc/rpc-types/src/eth/call.rs b/crates/rpc/rpc-types/src/eth/call.rs index e984776ae18c..2c41dcf28257 100644 --- a/crates/rpc/rpc-types/src/eth/call.rs +++ b/crates/rpc/rpc-types/src/eth/call.rs @@ -1,7 +1,6 @@ //use crate::access_list::AccessList; -use crate::BlockOverrides; +use crate::{AccessList, BlockId, BlockOverrides}; use alloy_primitives::{Address, Bytes, B256, U256, U64, U8}; -use reth_primitives::{AccessList, BlockId}; use serde::{Deserialize, Deserializer, Serialize, Serializer}; /// Bundle of transactions #[derive(Debug, Clone, Default, Eq, PartialEq, Serialize, Deserialize)] diff --git a/crates/rpc/rpc-types/src/eth/engine/beacon_api/events.rs b/crates/rpc/rpc-types/src/eth/engine/beacon_api/events.rs deleted file mode 100644 index fca3fb876031..000000000000 --- a/crates/rpc/rpc-types/src/eth/engine/beacon_api/events.rs +++ /dev/null @@ -1,71 +0,0 @@ -//! Support for the Beacon API events -//! -//! See also [ethereum-beacon-API eventstream](https://ethereum.github.io/beacon-APIs/#/Events/eventstream) - -use crate::engine::PayloadAttributes; -use alloy_primitives::B256; -use serde::{Deserialize, Serialize}; -use serde_with::{serde_as, DisplayFromStr}; - -/// Event for the `payload_attributes` topic of the beacon API node event stream. -/// -/// This event gives block builders and relays sufficient information to construct or verify a block -/// at `proposal_slot`. -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct PayloadAttributesEvent { - /// the identifier of the beacon hard fork at `proposal_slot`, e.g `"bellatrix"`, `"capella"`. - pub version: String, - /// Wrapped data of the event. - pub data: PayloadAttributesData, -} - -impl PayloadAttributesEvent { - /// Returns the payload attributes - pub fn attributes(&self) -> &PayloadAttributes { - &self.data.payload_attributes - } -} - -/// Data of the event that contains the payload attributes -#[serde_as] -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct PayloadAttributesData { - /// The slot at which a block using these payload attributes may be built - #[serde_as(as = "DisplayFromStr")] - pub proposal_slot: u64, - /// the beacon block root of the parent block to be built upon. - pub parent_block_root: B256, - /// he execution block number of the parent block. - #[serde_as(as = "DisplayFromStr")] - pub parent_block_number: u64, - /// the execution block hash of the parent block. - pub parent_block_hash: B256, - /// The execution block number of the parent block. - /// the validator index of the proposer at `proposal_slot` on the chain identified by - /// `parent_block_root`. - #[serde_as(as = "DisplayFromStr")] - pub proposer_index: u64, - /// Beacon API encoding of `PayloadAttributesV` as defined by the `execution-apis` - /// specification - /// - /// Note: this uses the beacon API format which uses snake-case and quoted decimals rather than - /// big-endian hex. - #[serde(with = "crate::eth::engine::payload::beacon_api_payload_attributes")] - pub payload_attributes: PayloadAttributes, -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn serde_payload_attributes_event() { - let s = r#"{"version":"capella","data":{"proposal_slot":"173332","proposer_index":"649112","parent_block_root":"0x5a49069647f6bf8f25d76b55ce920947654ade4ba1c6ab826d16712dd62b42bf","parent_block_number":"161093","parent_block_hash":"0x608b3d140ecb5bbcd0019711ac3704ece7be8e6d100816a55db440c1bcbb0251","payload_attributes":{"timestamp":"1697982384","prev_randao":"0x3142abd98055871ebf78f0f8e758fd3a04df3b6e34d12d09114f37a737f8f01e","suggested_fee_recipient":"0x0000000000000000000000000000000000000001","withdrawals":[{"index":"2461612","validator_index":"853570","address":"0x778f5f13c4be78a3a4d7141bcb26999702f407cf","amount":"45016211"},{"index":"2461613","validator_index":"853571","address":"0x778f5f13c4be78a3a4d7141bcb26999702f407cf","amount":"5269785"},{"index":"2461614","validator_index":"853572","address":"0x778f5f13c4be78a3a4d7141bcb26999702f407cf","amount":"5275106"},{"index":"2461615","validator_index":"853573","address":"0x778f5f13c4be78a3a4d7141bcb26999702f407cf","amount":"5235962"},{"index":"2461616","validator_index":"853574","address":"0x778f5f13c4be78a3a4d7141bcb26999702f407cf","amount":"5252171"},{"index":"2461617","validator_index":"853575","address":"0x778f5f13c4be78a3a4d7141bcb26999702f407cf","amount":"5221319"},{"index":"2461618","validator_index":"853576","address":"0x778f5f13c4be78a3a4d7141bcb26999702f407cf","amount":"5260879"},{"index":"2461619","validator_index":"853577","address":"0x778f5f13c4be78a3a4d7141bcb26999702f407cf","amount":"5285244"},{"index":"2461620","validator_index":"853578","address":"0x778f5f13c4be78a3a4d7141bcb26999702f407cf","amount":"5266681"},{"index":"2461621","validator_index":"853579","address":"0x778f5f13c4be78a3a4d7141bcb26999702f407cf","amount":"5271322"},{"index":"2461622","validator_index":"853580","address":"0x778f5f13c4be78a3a4d7141bcb26999702f407cf","amount":"5231327"},{"index":"2461623","validator_index":"853581","address":"0x778f5f13c4be78a3a4d7141bcb26999702f407cf","amount":"5276761"},{"index":"2461624","validator_index":"853582","address":"0x778f5f13c4be78a3a4d7141bcb26999702f407cf","amount":"5246244"},{"index":"2461625","validator_index":"853583","address":"0x778f5f13c4be78a3a4d7141bcb26999702f407cf","amount":"5261011"},{"index":"2461626","validator_index":"853584","address":"0x778f5f13c4be78a3a4d7141bcb26999702f407cf","amount":"5276477"},{"index":"2461627","validator_index":"853585","address":"0x778f5f13c4be78a3a4d7141bcb26999702f407cf","amount":"5275319"}]}}}"#; - - let event = serde_json::from_str::(s).unwrap(); - let input = serde_json::from_str::(s).unwrap(); - let json = serde_json::to_value(event).unwrap(); - assert_eq!(input, json); - } -} diff --git a/crates/rpc/rpc-types/src/eth/engine/beacon_api/events/attestation.rs b/crates/rpc/rpc-types/src/eth/engine/beacon_api/events/attestation.rs new file mode 100644 index 000000000000..c789a46713ad --- /dev/null +++ b/crates/rpc/rpc-types/src/eth/engine/beacon_api/events/attestation.rs @@ -0,0 +1,30 @@ +use alloy_primitives::B256; +use serde::{Deserialize, Serialize}; +use serde_with::{serde_as, DisplayFromStr}; + +#[serde_as] +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct AttestationData { + #[serde_as(as = "DisplayFromStr")] + pub slot: u64, + #[serde_as(as = "DisplayFromStr")] + pub index: u64, + pub beacon_block_root: B256, + pub source: Source, + pub target: Target, +} + +#[serde_as] +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct Source { + #[serde_as(as = "DisplayFromStr")] + pub epoch: u64, + pub root: B256, +} +#[serde_as] +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct Target { + #[serde_as(as = "DisplayFromStr")] + pub epoch: u64, + pub root: B256, +} diff --git a/crates/rpc/rpc-types/src/eth/engine/beacon_api/events/light_client_finality.rs b/crates/rpc/rpc-types/src/eth/engine/beacon_api/events/light_client_finality.rs new file mode 100644 index 000000000000..10928c7a780c --- /dev/null +++ b/crates/rpc/rpc-types/src/eth/engine/beacon_api/events/light_client_finality.rs @@ -0,0 +1,54 @@ +use alloy_primitives::{Bytes, B256}; +use serde::{Deserialize, Serialize}; +use serde_with::{serde_as, DisplayFromStr}; + +#[serde_as] +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct LightClientFinalityData { + pub attested_header: AttestedHeader, + pub finalized_header: FinalizedHeader, + pub finality_branch: Vec, + pub sync_aggregate: SyncAggregate, + #[serde_as(as = "DisplayFromStr")] + pub signature_slot: u64, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct AttestedHeader { + pub beacon: Beacon, +} + +#[serde_as] +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct Beacon { + #[serde_as(as = "DisplayFromStr")] + pub slot: u64, + #[serde_as(as = "DisplayFromStr")] + pub proposer_index: u64, + pub parent_root: B256, + pub state_root: B256, + pub body_root: B256, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct FinalizedHeader { + pub beacon: Beacon2, +} + +#[serde_as] +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct Beacon2 { + #[serde_as(as = "DisplayFromStr")] + pub slot: u64, + #[serde_as(as = "DisplayFromStr")] + pub proposer_index: u64, + pub parent_root: B256, + pub state_root: B256, + pub body_root: B256, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct SyncAggregate { + pub sync_committee_bits: Bytes, + pub sync_committee_signature: Bytes, +} diff --git a/crates/rpc/rpc-types/src/eth/engine/beacon_api/events/light_client_optimistic.rs b/crates/rpc/rpc-types/src/eth/engine/beacon_api/events/light_client_optimistic.rs new file mode 100644 index 000000000000..31f676a7b91a --- /dev/null +++ b/crates/rpc/rpc-types/src/eth/engine/beacon_api/events/light_client_optimistic.rs @@ -0,0 +1,35 @@ +use alloy_primitives::{Bytes, B256}; +use serde::{Deserialize, Serialize}; +use serde_with::{serde_as, DisplayFromStr}; + +#[serde_as] +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct LightClientOptimisticData { + pub attested_header: AttestedHeader, + pub sync_aggregate: SyncAggregate, + #[serde_as(as = "DisplayFromStr")] + pub signature_slot: u64, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct AttestedHeader { + pub beacon: Beacon, +} + +#[serde_as] +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct Beacon { + #[serde_as(as = "DisplayFromStr")] + pub slot: u64, + #[serde_as(as = "DisplayFromStr")] + pub proposer_index: u64, + pub parent_root: B256, + pub state_root: B256, + pub body_root: B256, +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct SyncAggregate { + pub sync_committee_bits: Bytes, + pub sync_committee_signature: Bytes, +} diff --git a/crates/rpc/rpc-types/src/eth/engine/beacon_api/events/mod.rs b/crates/rpc/rpc-types/src/eth/engine/beacon_api/events/mod.rs new file mode 100644 index 000000000000..d4f1bc8f4f7e --- /dev/null +++ b/crates/rpc/rpc-types/src/eth/engine/beacon_api/events/mod.rs @@ -0,0 +1,403 @@ +//! Support for the Beacon API events +//! +//! See also [ethereum-beacon-API eventstream](https://ethereum.github.io/beacon-APIs/#/Events/eventstream) + +use crate::engine::PayloadAttributes; +use alloy_primitives::{Address, Bytes, B256}; +use attestation::AttestationData; +use light_client_finality::LightClientFinalityData; +use light_client_optimistic::LightClientOptimisticData; +use serde::{Deserialize, Serialize}; +use serde_with::{serde_as, DisplayFromStr}; + +pub mod attestation; +pub mod light_client_finality; +pub mod light_client_optimistic; + +/// Topic variant for the eventstream API +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum BeaconNodeEventTopic { + PayloadAttributes, + Head, + Block, + Attestation, + VoluntaryExit, + BlsToExecutionChange, + FinalizedCheckpoint, + ChainReorg, + ContributionAndProof, + LightClientFinalityUpdate, + LightClientOptimisticUpdate, + BlobSidecar, +} + +impl BeaconNodeEventTopic { + /// Returns the identifier value for the eventstream query + pub fn query_value(&self) -> &'static str { + match self { + BeaconNodeEventTopic::PayloadAttributes => "payload_attributes", + BeaconNodeEventTopic::Head => "head", + BeaconNodeEventTopic::Block => "block", + BeaconNodeEventTopic::Attestation => "attestation", + BeaconNodeEventTopic::VoluntaryExit => "voluntary_exit", + BeaconNodeEventTopic::BlsToExecutionChange => "bls_to_execution_change", + BeaconNodeEventTopic::FinalizedCheckpoint => "finalized_checkpoint", + BeaconNodeEventTopic::ChainReorg => "chain_reorg", + BeaconNodeEventTopic::ContributionAndProof => "contribution_and_proof", + BeaconNodeEventTopic::LightClientFinalityUpdate => "light_client_finality_update", + BeaconNodeEventTopic::LightClientOptimisticUpdate => "light_client_optimistic_update", + BeaconNodeEventTopic::BlobSidecar => "blob_sidecar", + } + } +} + +/// Event for the `payload_attributes` topic of the beacon API node event stream. +/// +/// This event gives block builders and relays sufficient information to construct or verify a block +/// at `proposal_slot`. +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct PayloadAttributesEvent { + /// the identifier of the beacon hard fork at `proposal_slot`, e.g `"bellatrix"`, `"capella"`. + pub version: String, + /// Wrapped data of the event. + pub data: PayloadAttributesData, +} + +/// Event for the `Head` topic of the beacon API node event stream. +/// +/// The node has finished processing, resulting in a new head. previous_duty_dependent_root is +/// \`get_block_root_at_slot(state, compute_start_slot_at_epoch(epoch - 1) - 1)\` and +/// current_duty_dependent_root is \`get_block_root_at_slot(state, +/// compute_start_slot_at_epoch(epoch) +/// - 1)\`. Both dependent roots use the genesis block root in the case of underflow. +#[serde_as] +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct HeadEvent { + #[serde_as(as = "DisplayFromStr")] + pub slot: u64, + pub block: B256, + pub state: B256, + pub epoch_transition: bool, + pub previous_duty_dependent_root: B256, + pub current_duty_dependent_root: B256, + pub execution_optimistic: bool, +} + +/// Event for the `Block` topic of the beacon API node event stream. +/// +/// The node has received a valid block (from P2P or API) +#[serde_as] +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct BlockEvent { + #[serde_as(as = "DisplayFromStr")] + pub slot: u64, + pub block: B256, + pub execution_optimistic: bool, +} + +/// Event for the `Attestation` topic of the beacon API node event stream. +/// +/// The node has received a valid attestation (from P2P or API) +#[serde_as] +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct AttestationEvent { + pub aggregation_bits: Bytes, + pub signature: Bytes, + pub data: AttestationData, +} + +/// Event for the `VoluntaryExit` topic of the beacon API node event stream. +/// +/// The node has received a valid voluntary exit (from P2P or API) +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct VoluntaryExitEvent { + pub message: VoluntaryExitMessage, + pub signature: Bytes, +} + +#[serde_as] +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct VoluntaryExitMessage { + #[serde_as(as = "DisplayFromStr")] + pub epoch: u64, + #[serde_as(as = "DisplayFromStr")] + pub validator_index: u64, +} + +/// Event for the `BlsToExecutionChange` topic of the beacon API node event stream. +/// +/// The node has received a BLS to execution change (from P2P or API) +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct BlsToExecutionChangeEvent { + pub message: BlsToExecutionChangeMessage, + pub signature: Bytes, +} + +#[serde_as] +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct BlsToExecutionChangeMessage { + #[serde_as(as = "DisplayFromStr")] + pub validator_index: u64, + pub from_bls_pubkey: String, + pub to_execution_address: Address, +} + +/// Event for the `Deposit` topic of the beacon API node event stream. +/// +/// Finalized checkpoint has been updated +#[serde_as] +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct FinalizedCheckpointEvent { + pub block: B256, + pub state: B256, + #[serde_as(as = "DisplayFromStr")] + pub epoch: u64, + pub execution_optimistic: bool, +} + +/// Event for the `ChainReorg` topic of the beacon API node event stream. +/// +/// The node has reorganized its chain +#[serde_as] +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct ChainReorgEvent { + #[serde_as(as = "DisplayFromStr")] + pub slot: u64, + #[serde_as(as = "DisplayFromStr")] + pub depth: u64, + pub old_head_block: B256, + pub new_head_block: B256, + pub old_head_state: B256, + pub new_head_state: B256, + #[serde_as(as = "DisplayFromStr")] + pub epoch: u64, + pub execution_optimistic: bool, +} + +/// Event for the `ContributionAndProof` topic of the beacon API node event stream. +/// +/// The node has received a valid sync committee SignedContributionAndProof (from P2P or API) +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct ContributionAndProofEvent { + pub message: ContributionAndProofMessage, + pub signature: Bytes, +} + +#[serde_as] +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct ContributionAndProofMessage { + #[serde_as(as = "DisplayFromStr")] + pub aggregator_index: u64, + pub contribution: Contribution, + pub selection_proof: Bytes, +} + +#[serde_as] +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct Contribution { + #[serde_as(as = "DisplayFromStr")] + pub slot: u64, + pub beacon_block_root: B256, + #[serde_as(as = "DisplayFromStr")] + pub subcommittee_index: u64, + pub aggregation_bits: Bytes, + pub signature: Bytes, +} + +/// Event for the `LightClientFinalityUpdate` topic of the beacon API node event stream. +/// +/// The node's latest known `LightClientFinalityUpdate` has been updated +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct LightClientFinalityUpdateEvent { + pub version: String, + pub data: LightClientFinalityData, +} + +/// Event for the `LightClientOptimisticUpdate` topic of the beacon API node event stream. +/// +/// The node's latest known `LightClientOptimisticUpdate` has been updated +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct LightClientOptimisticUpdateEvent { + pub version: String, + pub data: LightClientOptimisticData, +} + +/// Event for the `BlobSidecar` topic of the beacon API node event stream. +/// +/// The node has received a BlobSidecar (from P2P or API) that passes all gossip validations on the +/// blob_sidecar_{subnet_id} topic +#[serde_as] +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct BlobSidecarEvent { + pub block_root: B256, + #[serde_as(as = "DisplayFromStr")] + pub index: u64, + #[serde_as(as = "DisplayFromStr")] + pub slot: u64, + pub kzg_commitment: Bytes, + pub versioned_hash: B256, +} + +impl PayloadAttributesEvent { + /// Returns the payload attributes + pub fn attributes(&self) -> &PayloadAttributes { + &self.data.payload_attributes + } +} + +/// Data of the event that contains the payload attributes +#[serde_as] +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct PayloadAttributesData { + /// The slot at which a block using these payload attributes may be built + #[serde_as(as = "DisplayFromStr")] + pub proposal_slot: u64, + /// the beacon block root of the parent block to be built upon. + pub parent_block_root: B256, + /// the execution block number of the parent block. + #[serde_as(as = "DisplayFromStr")] + pub parent_block_number: u64, + /// the execution block hash of the parent block. + pub parent_block_hash: B256, + /// The execution block number of the parent block. + /// the validator index of the proposer at `proposal_slot` on the chain identified by + /// `parent_block_root`. + #[serde_as(as = "DisplayFromStr")] + pub proposer_index: u64, + /// Beacon API encoding of `PayloadAttributesV` as defined by the `execution-apis` + /// specification + /// + /// Note: this uses the beacon API format which uses snake-case and quoted decimals rather than + /// big-endian hex. + #[serde(with = "crate::eth::engine::payload::beacon_api_payload_attributes")] + pub payload_attributes: PayloadAttributes, +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn serde_payload_attributes_event() { + let s = r#"{"version":"capella","data":{"proposal_slot":"173332","proposer_index":"649112","parent_block_root":"0x5a49069647f6bf8f25d76b55ce920947654ade4ba1c6ab826d16712dd62b42bf","parent_block_number":"161093","parent_block_hash":"0x608b3d140ecb5bbcd0019711ac3704ece7be8e6d100816a55db440c1bcbb0251","payload_attributes":{"timestamp":"1697982384","prev_randao":"0x3142abd98055871ebf78f0f8e758fd3a04df3b6e34d12d09114f37a737f8f01e","suggested_fee_recipient":"0x0000000000000000000000000000000000000001","withdrawals":[{"index":"2461612","validator_index":"853570","address":"0x778f5f13c4be78a3a4d7141bcb26999702f407cf","amount":"45016211"},{"index":"2461613","validator_index":"853571","address":"0x778f5f13c4be78a3a4d7141bcb26999702f407cf","amount":"5269785"},{"index":"2461614","validator_index":"853572","address":"0x778f5f13c4be78a3a4d7141bcb26999702f407cf","amount":"5275106"},{"index":"2461615","validator_index":"853573","address":"0x778f5f13c4be78a3a4d7141bcb26999702f407cf","amount":"5235962"},{"index":"2461616","validator_index":"853574","address":"0x778f5f13c4be78a3a4d7141bcb26999702f407cf","amount":"5252171"},{"index":"2461617","validator_index":"853575","address":"0x778f5f13c4be78a3a4d7141bcb26999702f407cf","amount":"5221319"},{"index":"2461618","validator_index":"853576","address":"0x778f5f13c4be78a3a4d7141bcb26999702f407cf","amount":"5260879"},{"index":"2461619","validator_index":"853577","address":"0x778f5f13c4be78a3a4d7141bcb26999702f407cf","amount":"5285244"},{"index":"2461620","validator_index":"853578","address":"0x778f5f13c4be78a3a4d7141bcb26999702f407cf","amount":"5266681"},{"index":"2461621","validator_index":"853579","address":"0x778f5f13c4be78a3a4d7141bcb26999702f407cf","amount":"5271322"},{"index":"2461622","validator_index":"853580","address":"0x778f5f13c4be78a3a4d7141bcb26999702f407cf","amount":"5231327"},{"index":"2461623","validator_index":"853581","address":"0x778f5f13c4be78a3a4d7141bcb26999702f407cf","amount":"5276761"},{"index":"2461624","validator_index":"853582","address":"0x778f5f13c4be78a3a4d7141bcb26999702f407cf","amount":"5246244"},{"index":"2461625","validator_index":"853583","address":"0x778f5f13c4be78a3a4d7141bcb26999702f407cf","amount":"5261011"},{"index":"2461626","validator_index":"853584","address":"0x778f5f13c4be78a3a4d7141bcb26999702f407cf","amount":"5276477"},{"index":"2461627","validator_index":"853585","address":"0x778f5f13c4be78a3a4d7141bcb26999702f407cf","amount":"5275319"}]}}}"#; + + let event: PayloadAttributesEvent = + serde_json::from_str::(s).unwrap(); + let input = serde_json::from_str::(s).unwrap(); + let json = serde_json::to_value(event).unwrap(); + assert_eq!(input, json); + } + #[test] + fn serde_head_event() { + let s = r#"{"slot":"10", "block":"0x9a2fefd2fdb57f74993c7780ea5b9030d2897b615b89f808011ca5aebed54eaf", "state":"0x600e852a08c1200654ddf11025f1ceacb3c2e74bdd5c630cde0838b2591b69f9", "epoch_transition":false, "previous_duty_dependent_root":"0x5e0043f107cb57913498fbf2f99ff55e730bf1e151f02f221e977c91a90a0e91", "current_duty_dependent_root":"0x5e0043f107cb57913498fbf2f99ff55e730bf1e151f02f221e977c91a90a0e91", "execution_optimistic": false}"#; + + let event: HeadEvent = serde_json::from_str::(s).unwrap(); + let input = serde_json::from_str::(s).unwrap(); + let json = serde_json::to_value(event).unwrap(); + assert_eq!(input, json); + } + + #[test] + fn serde_block_event() { + let s = r#"{"slot":"10", "block":"0x9a2fefd2fdb57f74993c7780ea5b9030d2897b615b89f808011ca5aebed54eaf", "execution_optimistic": false}"#; + + let event: BlockEvent = serde_json::from_str::(s).unwrap(); + let input = serde_json::from_str::(s).unwrap(); + let json = serde_json::to_value(event).unwrap(); + assert_eq!(input, json); + } + #[test] + fn serde_attestation_event() { + let s = r#"{"aggregation_bits":"0x01", "signature":"0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505", "data":{"slot":"1", "index":"1", "beacon_block_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "source":{"epoch":"1", "root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"}, "target":{"epoch":"1", "root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"}}}"#; + + let event: AttestationEvent = serde_json::from_str::(s).unwrap(); + let input = serde_json::from_str::(s).unwrap(); + let json = serde_json::to_value(event).unwrap(); + assert_eq!(input, json); + } + + #[test] + fn serde_voluntary_exit_event() { + let s = r#"{"message":{"epoch":"1", "validator_index":"1"}, "signature":"0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"}"#; + + let event: VoluntaryExitEvent = serde_json::from_str::(s).unwrap(); + let input = serde_json::from_str::(s).unwrap(); + let json = serde_json::to_value(event).unwrap(); + assert_eq!(input, json); + } + + #[test] + fn serde_bls_to_execution_change_event() { + let s = r#"{"message":{"validator_index":"1", "from_bls_pubkey":"0x933ad9491b62059dd065b560d256d8957a8c402cc6e8d8ee7290ae11e8f7329267a8811c397529dac52ae1342ba58c95", "to_execution_address":"0x9be8d619c56699667c1fedcd15f6b14d8b067f72"}, "signature":"0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"}"#; + + let event: BlsToExecutionChangeEvent = + serde_json::from_str::(s).unwrap(); + let input = serde_json::from_str::(s).unwrap(); + let json = serde_json::to_value(event).unwrap(); + assert_eq!(input, json); + } + + #[test] + fn serde_finalize_checkpoint_event() { + let s = r#"{"block":"0x9a2fefd2fdb57f74993c7780ea5b9030d2897b615b89f808011ca5aebed54eaf", "state":"0x600e852a08c1200654ddf11025f1ceacb3c2e74bdd5c630cde0838b2591b69f9", "epoch":"2", "execution_optimistic": false }"#; + + let event: FinalizedCheckpointEvent = + serde_json::from_str::(s).unwrap(); + let input = serde_json::from_str::(s).unwrap(); + let json = serde_json::to_value(event).unwrap(); + assert_eq!(input, json); + } + + #[test] + fn serde_chain_reorg_event() { + let s = r#"{"slot":"200", "depth":"50", "old_head_block":"0x9a2fefd2fdb57f74993c7780ea5b9030d2897b615b89f808011ca5aebed54eaf", "new_head_block":"0x76262e91970d375a19bfe8a867288d7b9cde43c8635f598d93d39d041706fc76", "old_head_state":"0x9a2fefd2fdb57f74993c7780ea5b9030d2897b615b89f808011ca5aebed54eaf", "new_head_state":"0x600e852a08c1200654ddf11025f1ceacb3c2e74bdd5c630cde0838b2591b69f9", "epoch":"2", "execution_optimistic": false}"#; + + let event: ChainReorgEvent = serde_json::from_str::(s).unwrap(); + let input = serde_json::from_str::(s).unwrap(); + let json = serde_json::to_value(event).unwrap(); + assert_eq!(input, json); + } + + #[test] + fn serde_contribution_and_proof_event() { + let s = r#"{"message": {"aggregator_index": "997", "contribution": {"slot": "168097", "beacon_block_root": "0x56f1fd4262c08fa81e27621c370e187e621a67fc80fe42340b07519f84b42ea1", "subcommittee_index": "0", "aggregation_bits": "0xffffffffffffffffffffffffffffffff", "signature": "0x85ab9018e14963026476fdf784cc674da144b3dbdb47516185438768774f077d882087b90ad642469902e782a8b43eed0cfc1b862aa9a473b54c98d860424a702297b4b648f3f30bdaae8a8b7627d10d04cb96a2cc8376af3e54a9aa0c8145e3"}, "selection_proof": "0x87c305f04bfe5db27c2b19fc23e00d7ac496ec7d3e759cbfdd1035cb8cf6caaa17a36a95a08ba78c282725e7b66a76820ca4eb333822bd399ceeb9807a0f2926c67ce67cfe06a0b0006838203b493505a8457eb79913ce1a3bcd1cc8e4ef30ed"}, "signature": "0xac118511474a94f857300b315c50585c32a713e4452e26a6bb98cdb619936370f126ed3b6bb64469259ee92e69791d9e12d324ce6fd90081680ce72f39d85d50b0ff977260a8667465e613362c6d6e6e745e1f9323ec1d6f16041c4e358839ac"}"#; + + let event: ContributionAndProofEvent = + serde_json::from_str::(s).unwrap(); + let input = serde_json::from_str::(s).unwrap(); + let json = serde_json::to_value(event).unwrap(); + assert_eq!(input, json); + } + + #[test] + fn serde_light_client_finality_update_event() { + let s = r#"{"version":"phase0", "data": {"attested_header": {"beacon": {"slot":"1", "proposer_index":"1", "parent_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "state_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "body_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"}}, "finalized_header": {"beacon": {"slot":"1", "proposer_index":"1", "parent_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "state_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "body_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"}}, "finality_branch": ["0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"], "sync_aggregate": {"sync_committee_bits":"0x01", "sync_committee_signature":"0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"}, "signature_slot":"1"}}"#; + + let event: LightClientFinalityUpdateEvent = + serde_json::from_str::(s).unwrap(); + let input = serde_json::from_str::(s).unwrap(); + let json = serde_json::to_value(event).unwrap(); + assert_eq!(input, json); + } + #[test] + fn serde_light_client_optimistic_update_event() { + let s = r#"{"version":"phase0", "data": {"attested_header": {"beacon": {"slot":"1", "proposer_index":"1", "parent_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "state_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "body_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"}}, "sync_aggregate": {"sync_committee_bits":"0x01", "sync_committee_signature":"0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"}, "signature_slot":"1"}}"#; + + let event: LightClientOptimisticUpdateEvent = + serde_json::from_str::(s).unwrap(); + let input = serde_json::from_str::(s).unwrap(); + let json = serde_json::to_value(event).unwrap(); + assert_eq!(input, json); + } + + #[test] + fn serde_blob_sidecar_event() { + let s = r#"{"block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "index": "1", "slot": "1", "kzg_commitment": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505", "versioned_hash": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"}"#; + + let event: BlobSidecarEvent = serde_json::from_str::(s).unwrap(); + let input = serde_json::from_str::(s).unwrap(); + let json = serde_json::to_value(event).unwrap(); + assert_eq!(input, json); + } +} diff --git a/crates/rpc/rpc-types/src/eth/engine/forkchoice.rs b/crates/rpc/rpc-types/src/eth/engine/forkchoice.rs index 9aad00610316..aae2e76ed5c9 100644 --- a/crates/rpc/rpc-types/src/eth/engine/forkchoice.rs +++ b/crates/rpc/rpc-types/src/eth/engine/forkchoice.rs @@ -40,10 +40,10 @@ pub enum ForkchoiceUpdateError { /// [PayloadAttributes](crate::engine::PayloadAttributes). /// /// This is returned as an error because the payload attributes are invalid and the payload is not valid, See - #[error("Invalid payload attributes")] + #[error("invalid payload attributes")] UpdatedInvalidPayloadAttributes, /// The given [ForkchoiceState] is invalid or inconsistent. - #[error("Invalid forkchoice state")] + #[error("invalid forkchoice state")] InvalidState, /// Thrown when a forkchoice final block does not exist in the database. #[error("final block not available in database")] diff --git a/crates/rpc/rpc-types/src/eth/engine/payload.rs b/crates/rpc/rpc-types/src/eth/engine/payload.rs index bfb0a6b07bc3..fc6c28a80382 100644 --- a/crates/rpc/rpc-types/src/eth/engine/payload.rs +++ b/crates/rpc/rpc-types/src/eth/engine/payload.rs @@ -1,10 +1,7 @@ -use crate::eth::withdrawal::BeaconAPIWithdrawal; +use crate::eth::{transaction::BlobTransactionSidecar, withdrawal::BeaconAPIWithdrawal}; pub use crate::Withdrawal; use alloy_primitives::{Address, Bloom, Bytes, B256, B64, U256, U64}; -use reth_primitives::{ - kzg::{Blob, Bytes48}, - BlobTransactionSidecar, SealedBlock, -}; +use c_kzg::{Blob, Bytes48}; use serde::{ser::SerializeMap, Deserialize, Serialize, Serializer}; use serde_with::{serde_as, DisplayFromStr}; @@ -140,36 +137,6 @@ pub struct ExecutionPayloadV1 { pub transactions: Vec, } -impl From for ExecutionPayloadV1 { - fn from(value: SealedBlock) -> Self { - let transactions = value - .body - .iter() - .map(|tx| { - let mut encoded = Vec::new(); - tx.encode_enveloped(&mut encoded); - encoded.into() - }) - .collect(); - ExecutionPayloadV1 { - parent_hash: value.parent_hash, - fee_recipient: value.beneficiary, - state_root: value.state_root, - receipts_root: value.receipts_root, - logs_bloom: value.logs_bloom, - prev_randao: value.mix_hash, - block_number: U64::from(value.number), - gas_limit: U64::from(value.gas_limit), - gas_used: U64::from(value.gas_used), - timestamp: U64::from(value.timestamp), - extra_data: value.extra_data.clone(), - base_fee_per_gas: U256::from(value.base_fee_per_gas.unwrap_or_default()), - block_hash: value.hash(), - transactions, - } - } -} - /// This structure maps on the ExecutionPayloadV2 structure of the beacon chain spec. /// /// See also: @@ -341,22 +308,22 @@ impl From for ExecutionPayload { #[derive(thiserror::Error, Debug)] pub enum PayloadError { /// Invalid payload extra data. - #[error("Invalid payload extra data: {0}")] + #[error("invalid payload extra data: {0}")] ExtraData(Bytes), /// Invalid payload base fee. - #[error("Invalid payload base fee: {0}")] + #[error("invalid payload base fee: {0}")] BaseFee(U256), /// Invalid payload blob gas used. - #[error("Invalid payload blob gas used: {0}")] + #[error("invalid payload blob gas used: {0}")] BlobGasUsed(U256), /// Invalid payload excess blob gas. - #[error("Invalid payload excess blob gas: {0}")] + #[error("invalid payload excess blob gas: {0}")] ExcessBlobGas(U256), /// Pre-cancun Payload has blob transactions. - #[error("Invalid payload, pre-Cancun payload has blob transactions")] + #[error("pre-Cancun payload has blob transactions")] PreCancunBlockWithBlobTransactions, /// Invalid payload block hash. - #[error("blockhash mismatch, want {consensus}, got {execution}")] + #[error("block hash mismatch: want {consensus}, got {execution}")] BlockHash { /// The block hash computed from the payload. execution: B256, @@ -364,7 +331,7 @@ pub enum PayloadError { consensus: B256, }, /// Expected blob versioned hashes do not match the given transactions. - #[error("Expected blob versioned hashes do not match the given transactions")] + #[error("expected blob versioned hashes do not match the given transactions")] InvalidVersionedHashes, /// Encountered decoding error. #[error(transparent)] diff --git a/crates/rpc/rpc-types/src/eth/filter.rs b/crates/rpc/rpc-types/src/eth/filter.rs index 863a52888021..6935feca54d0 100644 --- a/crates/rpc/rpc-types/src/eth/filter.rs +++ b/crates/rpc/rpc-types/src/eth/filter.rs @@ -1,7 +1,6 @@ -use crate::Log as RpcLog; +use crate::{eth::log::Log as RpcLog, BlockNumberOrTag, Log, Transaction}; use alloy_primitives::{keccak256, Address, Bloom, BloomInput, B256, U256, U64}; use itertools::{EitherOrBoth::*, Itertools}; -use reth_primitives::{BlockNumberOrTag, Log}; use serde::{ de::{DeserializeOwned, MapAccess, Visitor}, ser::SerializeStruct, @@ -283,7 +282,7 @@ impl Filter { /// Match the latest block only /// /// ```rust - /// # use reth_primitives::BlockNumberOrTag; + /// # use reth_rpc_types::BlockNumberOrTag; /// # use reth_rpc_types::Filter; /// # fn main() { /// let filter = Filter::new().select(BlockNumberOrTag::Latest); @@ -821,7 +820,6 @@ impl FilteredParams { true } } - /// Response of the `eth_getFilterChanges` RPC. #[derive(Clone, Debug, Eq, PartialEq)] pub enum FilterChanges { @@ -829,6 +827,8 @@ pub enum FilterChanges { Logs(Vec), /// New hashes (block or transactions) Hashes(Vec), + /// New transactions. + Transactions(Vec), /// Empty result, Empty, } @@ -841,6 +841,7 @@ impl Serialize for FilterChanges { match self { FilterChanges::Logs(logs) => logs.serialize(s), FilterChanges::Hashes(hashes) => hashes.serialize(s), + FilterChanges::Transactions(transactions) => transactions.serialize(s), FilterChanges::Empty => (&[] as &[serde_json::Value]).serialize(s), } } @@ -909,6 +910,51 @@ impl From> for FilterId { } } } +/// Specifies the kind of information you wish to receive from the `eth_newPendingTransactionFilter` +/// RPC endpoint. +/// +/// When this type is used in a request, it determines whether the client wishes to receive: +/// - Only the transaction hashes (`Hashes` variant), or +/// - Full transaction details (`Full` variant). +#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)] +pub enum PendingTransactionFilterKind { + /// Receive only the hashes of the transactions. + #[default] + Hashes, + /// Receive full details of the transactions. + Full, +} + +impl Serialize for PendingTransactionFilterKind { + /// Serializes the `PendingTransactionFilterKind` into a boolean value: + /// - `false` for `Hashes` + /// - `true` for `Full` + fn serialize(&self, serializer: S) -> Result + where + S: Serializer, + { + match self { + PendingTransactionFilterKind::Hashes => false.serialize(serializer), + PendingTransactionFilterKind::Full => true.serialize(serializer), + } + } +} + +impl<'a> Deserialize<'a> for PendingTransactionFilterKind { + /// Deserializes a boolean value into `PendingTransactionFilterKind`: + /// - `false` becomes `Hashes` + /// - `true` becomes `Full` + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'a>, + { + let val = Option::::deserialize(deserializer)?; + match val { + Some(true) => Ok(PendingTransactionFilterKind::Full), + _ => Ok(PendingTransactionFilterKind::Hashes), + } + } +} #[cfg(test)] mod tests { diff --git a/crates/rpc/rpc-types/src/eth/mod.rs b/crates/rpc/rpc-types/src/eth/mod.rs index 0e02a8e50301..20cdf102f654 100644 --- a/crates/rpc/rpc-types/src/eth/mod.rs +++ b/crates/rpc/rpc-types/src/eth/mod.rs @@ -10,6 +10,7 @@ mod filter; mod index; mod log; pub mod pubsub; +pub mod raw_log; pub mod state; mod syncing; pub mod trace; @@ -26,6 +27,7 @@ pub use fee::{FeeHistory, TxGasAndReward}; pub use filter::*; pub use index::Index; pub use log::Log; +pub use raw_log::{logs_bloom, Log as RawLog}; pub use syncing::*; pub use transaction::*; pub use withdrawal::Withdrawal; diff --git a/crates/rpc/rpc-types/src/eth/pubsub.rs b/crates/rpc/rpc-types/src/eth/pubsub.rs index 3c4344ca8b66..66a8266fb260 100644 --- a/crates/rpc/rpc-types/src/eth/pubsub.rs +++ b/crates/rpc/rpc-types/src/eth/pubsub.rs @@ -4,7 +4,6 @@ use crate::{ eth::{Filter, Transaction}, Log, RichHeader, }; - use alloy_primitives::B256; use serde::{de::Error, Deserialize, Deserializer, Serialize, Serializer}; diff --git a/crates/rpc/rpc-types/src/eth/raw_log.rs b/crates/rpc/rpc-types/src/eth/raw_log.rs new file mode 100644 index 000000000000..2a12903ec09d --- /dev/null +++ b/crates/rpc/rpc-types/src/eth/raw_log.rs @@ -0,0 +1,30 @@ +//! Ethereum log object. + +use alloy_primitives::{Address, Bloom, Bytes, B256}; +use alloy_rlp::{RlpDecodable, RlpEncodable}; + +/// Ethereum Log +#[derive(Clone, Debug, PartialEq, Eq, RlpDecodable, RlpEncodable, Default)] +pub struct Log { + /// Contract that emitted this log. + pub address: Address, + /// Topics of the log. The number of logs depend on what `LOG` opcode is used. + pub topics: Vec, + /// Arbitrary length data. + pub data: Bytes, +} + +/// Calculate receipt logs bloom. +pub fn logs_bloom<'a, It>(logs: It) -> Bloom +where + It: IntoIterator, +{ + let mut bloom = Bloom::ZERO; + for log in logs { + bloom.m3_2048(log.address.as_slice()); + for topic in &log.topics { + bloom.m3_2048(topic.as_slice()); + } + } + bloom +} diff --git a/crates/rpc/rpc-types/src/eth/trace/filter.rs b/crates/rpc/rpc-types/src/eth/trace/filter.rs index 17497bff75ec..0c27d4bf09a1 100644 --- a/crates/rpc/rpc-types/src/eth/trace/filter.rs +++ b/crates/rpc/rpc-types/src/eth/trace/filter.rs @@ -1,11 +1,11 @@ //! `trace_filter` types and support +use crate::serde_helpers::num::u64_hex_or_decimal_opt; use alloy_primitives::Address; -use reth_primitives::serde_helper::num::u64_hex_or_decimal_opt; use serde::{Deserialize, Serialize}; use std::collections::HashSet; /// Trace filter. -#[derive(Debug, PartialEq, Eq, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Eq, Serialize, Deserialize, Clone)] #[serde(deny_unknown_fields)] #[serde(rename_all = "camelCase")] pub struct TraceFilter { @@ -52,7 +52,7 @@ pub enum TraceFilterMode { Intersection, } -/// Helper type for matching `from` and `to` addresses. +/// Helper type for matching `from` and `to` addresses. Empty sets match all addresses. #[derive(Debug, Clone, PartialEq, Eq)] pub struct TraceFilterMatcher { mode: TraceFilterMode, @@ -63,15 +63,20 @@ pub struct TraceFilterMatcher { impl TraceFilterMatcher { /// Returns `true` if the given `from` and `to` addresses match this filter. pub fn matches(&self, from: Address, to: Option
) -> bool { - match self.mode { - TraceFilterMode::Union => { - self.from_addresses.contains(&from) || - to.map_or(false, |to| self.to_addresses.contains(&to)) - } - TraceFilterMode::Intersection => { - self.from_addresses.contains(&from) && - to.map_or(false, |to| self.to_addresses.contains(&to)) - } + match (self.from_addresses.is_empty(), self.to_addresses.is_empty()) { + (true, true) => true, + (false, true) => self.from_addresses.contains(&from), + (true, false) => to.map_or(false, |to_addr| self.to_addresses.contains(&to_addr)), + (false, false) => match self.mode { + TraceFilterMode::Union => { + self.from_addresses.contains(&from) || + to.map_or(false, |to_addr| self.to_addresses.contains(&to_addr)) + } + TraceFilterMode::Intersection => { + self.from_addresses.contains(&from) && + to.map_or(false, |to_addr| self.to_addresses.contains(&to_addr)) + } + }, } } } @@ -79,6 +84,7 @@ impl TraceFilterMatcher { #[cfg(test)] mod tests { use super::*; + use serde_json::json; #[test] fn test_parse_filter() { @@ -87,4 +93,91 @@ mod tests { assert_eq!(filter.from_block, Some(3)); assert_eq!(filter.to_block, Some(5)); } + + #[test] + fn test_filter_matcher_addresses_unspecified() { + let test_addr_d8 = "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045".parse().unwrap(); + let test_addr_16 = "0x160f5f00288e9e1cc8655b327e081566e580a71d".parse().unwrap(); + let filter_json = json!({ + "fromBlock": "0x3", + "toBlock": "0x5", + }); + let filter: TraceFilter = + serde_json::from_value(filter_json).expect("Failed to parse filter"); + let matcher = filter.matcher(); + assert!(matcher.matches(test_addr_d8, None)); + assert!(matcher.matches(test_addr_16, None)); + assert!(matcher.matches(test_addr_d8, Some(test_addr_16))); + assert!(matcher.matches(test_addr_16, Some(test_addr_d8))); + } + + #[test] + fn test_filter_matcher_from_address() { + let test_addr_d8 = "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045".parse().unwrap(); + let test_addr_16 = "0x160f5f00288e9e1cc8655b327e081566e580a71d".parse().unwrap(); + let filter_json = json!({ + "fromBlock": "0x3", + "toBlock": "0x5", + "fromAddress": [test_addr_d8] + }); + let filter: TraceFilter = serde_json::from_value(filter_json).unwrap(); + let matcher = filter.matcher(); + assert!(matcher.matches(test_addr_d8, None)); + assert!(!matcher.matches(test_addr_16, None)); + assert!(matcher.matches(test_addr_d8, Some(test_addr_16))); + assert!(!matcher.matches(test_addr_16, Some(test_addr_d8))); + } + + #[test] + fn test_filter_matcher_to_address() { + let test_addr_d8 = "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045".parse().unwrap(); + let test_addr_16 = "0x160f5f00288e9e1cc8655b327e081566e580a71d".parse().unwrap(); + let filter_json = json!({ + "fromBlock": "0x3", + "toBlock": "0x5", + "toAddress": [test_addr_d8], + }); + let filter: TraceFilter = serde_json::from_value(filter_json).unwrap(); + let matcher = filter.matcher(); + assert!(matcher.matches(test_addr_16, Some(test_addr_d8))); + assert!(!matcher.matches(test_addr_16, None)); + assert!(!matcher.matches(test_addr_d8, Some(test_addr_16))); + } + + #[test] + fn test_filter_matcher_both_addresses_union() { + let test_addr_d8 = "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045".parse().unwrap(); + let test_addr_16 = "0x160f5f00288e9e1cc8655b327e081566e580a71d".parse().unwrap(); + let filter_json = json!({ + "fromBlock": "0x3", + "toBlock": "0x5", + "fromAddress": [test_addr_16], + "toAddress": [test_addr_d8], + }); + let filter: TraceFilter = serde_json::from_value(filter_json).unwrap(); + let matcher = filter.matcher(); + assert!(matcher.matches(test_addr_16, Some(test_addr_d8))); + assert!(matcher.matches(test_addr_16, None)); + assert!(matcher.matches(test_addr_d8, Some(test_addr_d8))); + assert!(!matcher.matches(test_addr_d8, Some(test_addr_16))); + } + + #[test] + fn test_filter_matcher_both_addresses_intersection() { + let test_addr_d8 = "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045".parse().unwrap(); + let test_addr_16 = "0x160f5f00288e9e1cc8655b327e081566e580a71d".parse().unwrap(); + let filter_json = json!({ + "fromBlock": "0x3", + "toBlock": "0x5", + "fromAddress": [test_addr_16], + "toAddress": [test_addr_d8], + "mode": "intersection", + }); + let filter: TraceFilter = serde_json::from_value(filter_json).unwrap(); + let matcher = filter.matcher(); + assert!(matcher.matches(test_addr_16, Some(test_addr_d8))); + assert!(!matcher.matches(test_addr_16, None)); + assert!(!matcher.matches(test_addr_d8, Some(test_addr_d8))); + assert!(!matcher.matches(test_addr_d8, Some(test_addr_16))); + } } diff --git a/crates/rpc/rpc-types/src/eth/trace/geth/call.rs b/crates/rpc/rpc-types/src/eth/trace/geth/call.rs index 92869f4df29c..1d2d75419471 100644 --- a/crates/rpc/rpc-types/src/eth/trace/geth/call.rs +++ b/crates/rpc/rpc-types/src/eth/trace/geth/call.rs @@ -1,5 +1,5 @@ +use crate::serde_helpers::num::from_int_or_hex; use alloy_primitives::{Address, Bytes, B256, U256}; -use reth_primitives::serde_helper::num::from_int_or_hex; use serde::{Deserialize, Serialize}; /// The response object for `debug_traceTransaction` with `"tracer": "callTracer"` diff --git a/crates/rpc/rpc-types/src/eth/trace/geth/mod.rs b/crates/rpc/rpc-types/src/eth/trace/geth/mod.rs index f9b03bbfcce4..adc2f7a8e31c 100644 --- a/crates/rpc/rpc-types/src/eth/trace/geth/mod.rs +++ b/crates/rpc/rpc-types/src/eth/trace/geth/mod.rs @@ -45,7 +45,7 @@ pub struct BlockTraceResult { pub struct DefaultFrame { pub failed: bool, pub gas: u64, - #[serde(serialize_with = "reth_primitives::serde_helper::serialize_hex_string_no_prefix")] + #[serde(serialize_with = "crate::serde_helpers::serialize_hex_string_no_prefix")] pub return_value: Bytes, pub struct_logs: Vec, } diff --git a/crates/rpc/rpc-types/src/eth/trace/geth/pre_state.rs b/crates/rpc/rpc-types/src/eth/trace/geth/pre_state.rs index 3a67bba67862..04cb7c812b48 100644 --- a/crates/rpc/rpc-types/src/eth/trace/geth/pre_state.rs +++ b/crates/rpc/rpc-types/src/eth/trace/geth/pre_state.rs @@ -1,5 +1,5 @@ +use crate::serde_helpers::num::from_int_or_hex_opt; use alloy_primitives::{Address, Bytes, B256, U256}; -use reth_primitives::serde_helper::num::from_int_or_hex_opt; use serde::{Deserialize, Serialize}; use std::collections::{btree_map, BTreeMap}; diff --git a/crates/rpc/rpc-types/src/eth/trace/tracerequest.rs b/crates/rpc/rpc-types/src/eth/trace/tracerequest.rs index 7b6b509eb4d9..3c2c2563afed 100644 --- a/crates/rpc/rpc-types/src/eth/trace/tracerequest.rs +++ b/crates/rpc/rpc-types/src/eth/trace/tracerequest.rs @@ -1,13 +1,15 @@ //! Builder style functions for `trace_call` -use crate::{state::StateOverride, trace::parity::TraceType, BlockOverrides, CallRequest}; -use reth_primitives::BlockId; +use crate::{ + eth::block::BlockId, state::StateOverride, trace::parity::TraceType, BlockOverrides, + CallRequest, +}; use serde::{Deserialize, Serialize}; use std::collections::HashSet; -/// Trace Request builder style function implementation +/// Container type for `trace_call` arguments #[derive(Debug, Serialize, Deserialize)] -pub struct TraceRequest { +pub struct TraceCallRequest { /// call request object pub call: CallRequest, /// trace types @@ -20,8 +22,8 @@ pub struct TraceRequest { pub block_overrides: Option>, } -impl TraceRequest { - /// Returns a new [`TraceRequest`] given a [`CallRequest`] and [`HashSet`] +impl TraceCallRequest { + /// Returns a new [`TraceCallRequest`] given a [`CallRequest`] and [`HashSet`] pub fn new(call: CallRequest) -> Self { Self { call, diff --git a/crates/rpc/rpc-types/src/eth/tracerequest.rs b/crates/rpc/rpc-types/src/eth/tracerequest.rs deleted file mode 100644 index d895c2367b14..000000000000 --- a/crates/rpc/rpc-types/src/eth/tracerequest.rs +++ /dev/null @@ -1,37 +0,0 @@ -use crate::{CallRequest,state::StateOverride,BlockOverrides}; -use std::{collections::HashSet}; -use reth_primitives::{BlockId}; -use reth_rpc::{types::tracerequest::parity::TraceType}; - -pub struct TraceRequest{ - call: CallRequest, - trace_types: HashSet, - block_id: Option, - state_overrides: Option, - block_overrides: Option> -} - -impl TraceRequest{ - - pub fn new(call:CallRequest,trace_types:HashSet) -> Self{ - - Self { call,trace_types,block_id:None, state_overrides: None, block_overrides:None } - - } - - pub fn with_block_id(mut self, block_id: BlockId) -> Self{ - self.block_id = Some(block_id); - self - } - - pub fn with_state_override(mut self, state_overrides:StateOverride) -> Self{ - self.state_overrides = Some(state_overrides); - self - } - - pub fn with_block_overrides(mut self, block_overrides:Box) -> Self{ - self.block_overrides = Some(block_overrides); - self - } - -} \ No newline at end of file diff --git a/crates/rpc/rpc-types/src/eth/transaction/access_list.rs b/crates/rpc/rpc-types/src/eth/transaction/access_list.rs index a5a14ab867ad..f6fd892a90af 100644 --- a/crates/rpc/rpc-types/src/eth/transaction/access_list.rs +++ b/crates/rpc/rpc-types/src/eth/transaction/access_list.rs @@ -1,4 +1,4 @@ -use reth_primitives::{Address, B256, U256}; +use alloy_primitives::{Address, B256, U256}; use serde::{Deserialize, Serialize}; /// A list of addresses and storage keys that the transaction plans to access. diff --git a/crates/rpc/rpc-types/src/eth/transaction/request.rs b/crates/rpc/rpc-types/src/eth/transaction/request.rs index a7420ae03633..716c3960b299 100644 --- a/crates/rpc/rpc-types/src/eth/transaction/request.rs +++ b/crates/rpc/rpc-types/src/eth/transaction/request.rs @@ -1,9 +1,11 @@ -use crate::eth::transaction::typed::{ - EIP1559TransactionRequest, EIP2930TransactionRequest, LegacyTransactionRequest, - TransactionKind, TypedTransactionRequest, +use crate::eth::transaction::{ + typed::{ + EIP1559TransactionRequest, EIP2930TransactionRequest, LegacyTransactionRequest, + TransactionKind, TypedTransactionRequest, + }, + AccessList, }; use alloy_primitives::{Address, Bytes, U128, U256, U64, U8}; -use reth_primitives::AccessList; use serde::{Deserialize, Serialize}; /// Represents _all_ transaction requests received from RPC diff --git a/crates/rpc/rpc-types/src/eth/transaction/typed.rs b/crates/rpc/rpc-types/src/eth/transaction/typed.rs index 9cfbf21e9fcd..6988872e7b6a 100644 --- a/crates/rpc/rpc-types/src/eth/transaction/typed.rs +++ b/crates/rpc/rpc-types/src/eth/transaction/typed.rs @@ -3,13 +3,12 @@ //! transaction deserialized from the json input of an RPC call. Depending on what fields are set, //! it can be converted into the container type [`TypedTransactionRequest`]. +use crate::eth::transaction::AccessList; use alloy_primitives::{Address, Bytes, B256, U128, U256, U64}; -use alloy_rlp::{BufMut, Decodable, Encodable, Error as RlpError, RlpDecodable, RlpEncodable}; -use reth_primitives::{ - kzg::{Blob, Bytes48}, - AccessList, Transaction, TxEip1559, TxEip2930, TxEip4844, TxLegacy, -}; +use alloy_rlp::{BufMut, Decodable, Encodable, Error as RlpError}; +use c_kzg::{Blob, Bytes48}; use serde::{Deserialize, Serialize}; + /// Container type for various Ethereum transaction requests /// /// Its variants correspond to specific allowed transactions: @@ -24,62 +23,6 @@ pub enum TypedTransactionRequest { EIP4844(Eip4844TransactionRequest), } -impl TypedTransactionRequest { - /// Converts a typed transaction request into a primitive transaction. - /// - /// Returns `None` if any of the following are true: - /// - `nonce` is greater than [`u64::MAX`] - /// - `gas_limit` is greater than [`u64::MAX`] - /// - `value` is greater than [`u128::MAX`] - pub fn into_transaction(self) -> Option { - Some(match self { - TypedTransactionRequest::Legacy(tx) => Transaction::Legacy(TxLegacy { - chain_id: tx.chain_id, - nonce: tx.nonce.to(), - gas_price: tx.gas_price.to(), - gas_limit: tx.gas_limit.try_into().ok()?, - to: tx.kind.into(), - value: tx.value.into(), - input: tx.input, - }), - TypedTransactionRequest::EIP2930(tx) => Transaction::Eip2930(TxEip2930 { - chain_id: tx.chain_id, - nonce: tx.nonce.to(), - gas_price: tx.gas_price.to(), - gas_limit: tx.gas_limit.try_into().ok()?, - to: tx.kind.into(), - value: tx.value.into(), - input: tx.input, - access_list: tx.access_list, - }), - TypedTransactionRequest::EIP1559(tx) => Transaction::Eip1559(TxEip1559 { - chain_id: tx.chain_id, - nonce: tx.nonce.to(), - max_fee_per_gas: tx.max_fee_per_gas.to(), - gas_limit: tx.gas_limit.try_into().ok()?, - to: tx.kind.into(), - value: tx.value.into(), - input: tx.input, - access_list: tx.access_list, - max_priority_fee_per_gas: tx.max_priority_fee_per_gas.to(), - }), - TypedTransactionRequest::EIP4844(tx) => Transaction::Eip4844(TxEip4844 { - chain_id: tx.chain_id, - nonce: tx.nonce.to(), - gas_limit: tx.gas_limit.to(), - max_fee_per_gas: tx.max_fee_per_gas.to(), - max_priority_fee_per_gas: tx.max_priority_fee_per_gas.to(), - to: tx.kind.into(), - value: tx.value.into(), - access_list: tx.access_list, - blob_versioned_hashes: tx.blob_versioned_hashes, - max_fee_per_blob_gas: tx.max_fee_per_blob_gas.to(), - input: tx.input, - }), - }) - } -} - /// Represents a legacy transaction request #[derive(Debug, Clone, PartialEq, Eq)] pub struct LegacyTransactionRequest { @@ -93,7 +36,7 @@ pub struct LegacyTransactionRequest { } /// Represents an EIP-2930 transaction request -#[derive(Debug, Clone, PartialEq, Eq, RlpEncodable, RlpDecodable)] +#[derive(Debug, Clone, PartialEq, Eq)] pub struct EIP2930TransactionRequest { pub chain_id: u64, pub nonce: U64, @@ -106,7 +49,7 @@ pub struct EIP2930TransactionRequest { } /// Represents an EIP-1559 transaction request -#[derive(Debug, Clone, PartialEq, Eq, RlpEncodable, RlpDecodable)] +#[derive(Debug, Clone, PartialEq, Eq)] pub struct EIP1559TransactionRequest { pub chain_id: u64, pub nonce: U64, @@ -191,15 +134,6 @@ impl Decodable for TransactionKind { } } -impl From for reth_primitives::TransactionKind { - fn from(kind: TransactionKind) -> Self { - match kind { - TransactionKind::Call(to) => reth_primitives::TransactionKind::Call(to), - TransactionKind::Create => reth_primitives::TransactionKind::Create, - } - } -} - /// This represents a set of blobs, and its corresponding commitments and proofs. #[derive(Clone, Debug, PartialEq, Eq, Default, Serialize, Deserialize)] pub struct BlobTransactionSidecar { diff --git a/crates/rpc/rpc-types/src/eth/withdrawal.rs b/crates/rpc/rpc-types/src/eth/withdrawal.rs index d989794d8955..0ea2322b7d54 100644 --- a/crates/rpc/rpc-types/src/eth/withdrawal.rs +++ b/crates/rpc/rpc-types/src/eth/withdrawal.rs @@ -1,13 +1,20 @@ //! Withdrawal type and serde helpers. +use std::mem; + +use crate::serde_helpers::u64_hex; use alloy_primitives::{Address, U256}; -use alloy_rlp::RlpEncodable; -use reth_primitives::{constants::GWEI_TO_WEI, serde_helper::u64_hex}; +use alloy_rlp::{RlpDecodable, RlpEncodable}; use serde::{Deserialize, Deserializer, Serialize, Serializer}; use serde_with::{serde_as, DeserializeAs, DisplayFromStr, SerializeAs}; +/// Multiplier for converting gwei to wei. +pub const GWEI_TO_WEI: u64 = 1_000_000_000; + /// Withdrawal represents a validator withdrawal from the consensus layer. -#[derive(Debug, Clone, PartialEq, Eq, Default, Hash, RlpEncodable, Serialize, Deserialize)] +#[derive( + Debug, Clone, PartialEq, Eq, Default, Hash, RlpEncodable, RlpDecodable, Serialize, Deserialize, +)] pub struct Withdrawal { /// Monotonically increasing identifier issued by consensus layer. #[serde(with = "u64_hex")] @@ -27,6 +34,12 @@ impl Withdrawal { pub fn amount_wei(&self) -> U256 { U256::from(self.amount) * U256::from(GWEI_TO_WEI) } + + /// Calculate a heuristic for the in-memory size of the [Withdrawal]. + #[inline] + pub fn size(&self) -> usize { + mem::size_of::() + } } /// Same as [Withdrawal] but respects the Beacon API format which uses snake-case and quoted diff --git a/crates/rpc/rpc-types/src/lib.rs b/crates/rpc/rpc-types/src/lib.rs index 5e59041b0fd1..d655fbcce8d0 100644 --- a/crates/rpc/rpc-types/src/lib.rs +++ b/crates/rpc/rpc-types/src/lib.rs @@ -14,11 +14,17 @@ mod admin; mod eth; mod mev; +mod net; mod otterscan; +mod peer; mod rpc; +mod serde_helpers; pub use admin::*; pub use eth::*; pub use mev::*; +pub use net::*; pub use otterscan::*; +pub use peer::*; pub use rpc::*; +pub use serde_helpers::*; diff --git a/crates/rpc/rpc-types/src/mev.rs b/crates/rpc/rpc-types/src/mev.rs index 8b082927a491..a37dc8afef8c 100644 --- a/crates/rpc/rpc-types/src/mev.rs +++ b/crates/rpc/rpc-types/src/mev.rs @@ -1,8 +1,8 @@ //! MEV bundle type bindings #![allow(missing_docs)] +use crate::{BlockId, BlockNumberOrTag, Log}; use alloy_primitives::{Address, Bytes, TxHash, B256, U256, U64}; -use reth_primitives::{BlockId, BlockNumberOrTag, Log}; use serde::{ ser::{SerializeSeq, Serializer}, Deserialize, Deserializer, Serialize, diff --git a/crates/rpc/rpc-types/src/net.rs b/crates/rpc/rpc-types/src/net.rs new file mode 100644 index 000000000000..291241ea3c33 --- /dev/null +++ b/crates/rpc/rpc-types/src/net.rs @@ -0,0 +1,300 @@ +use crate::PeerId; +use alloy_rlp::{RlpDecodable, RlpEncodable}; +use secp256k1::{SecretKey, SECP256K1}; +use serde_with::{DeserializeFromStr, SerializeDisplay}; +use std::{ + fmt, + fmt::Write, + net::{IpAddr, Ipv4Addr, SocketAddr}, + num::ParseIntError, + str::FromStr, +}; +use url::{Host, Url}; + +/// Represents a ENR in discovery. +/// +/// Note: this is only an excerpt of the [`NodeRecord`] data structure. +#[derive( + Clone, + Copy, + Debug, + Eq, + PartialEq, + Hash, + SerializeDisplay, + DeserializeFromStr, + RlpEncodable, + RlpDecodable, +)] +pub struct NodeRecord { + /// The Address of a node. + pub address: IpAddr, + /// TCP port of the port that accepts connections. + pub tcp_port: u16, + /// UDP discovery port. + pub udp_port: u16, + /// Public key of the discovery service + pub id: PeerId, +} + +impl NodeRecord { + /// Derive the [`NodeRecord`] from the secret key and addr + pub fn from_secret_key(addr: SocketAddr, sk: &SecretKey) -> Self { + let pk = secp256k1::PublicKey::from_secret_key(SECP256K1, sk); + let id = PeerId::from_slice(&pk.serialize_uncompressed()[1..]); + Self::new(addr, id) + } + + /// Converts the `address` into an [`Ipv4Addr`] if the `address` is a mapped + /// [Ipv6Addr](std::net::Ipv6Addr). + /// + /// Returns `true` if the address was converted. + /// + /// See also [std::net::Ipv6Addr::to_ipv4_mapped] + pub fn convert_ipv4_mapped(&mut self) -> bool { + // convert IPv4 mapped IPv6 address + if let IpAddr::V6(v6) = self.address { + if let Some(v4) = v6.to_ipv4_mapped() { + self.address = v4.into(); + return true + } + } + false + } + + /// Same as [Self::convert_ipv4_mapped] but consumes the type + pub fn into_ipv4_mapped(mut self) -> Self { + self.convert_ipv4_mapped(); + self + } + + /// Creates a new record from a socket addr and peer id. + #[allow(unused)] + pub fn new(addr: SocketAddr, id: PeerId) -> Self { + Self { address: addr.ip(), tcp_port: addr.port(), udp_port: addr.port(), id } + } + + /// The TCP socket address of this node + #[must_use] + pub fn tcp_addr(&self) -> SocketAddr { + SocketAddr::new(self.address, self.tcp_port) + } + + /// The UDP socket address of this node + #[must_use] + pub fn udp_addr(&self) -> SocketAddr { + SocketAddr::new(self.address, self.udp_port) + } +} + +impl fmt::Display for NodeRecord { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.write_str("enode://")?; + alloy_primitives::hex::encode(self.id.as_slice()).fmt(f)?; + f.write_char('@')?; + match self.address { + IpAddr::V4(ip) => { + ip.fmt(f)?; + } + IpAddr::V6(ip) => { + // encapsulate with brackets + f.write_char('[')?; + ip.fmt(f)?; + f.write_char(']')?; + } + } + f.write_char(':')?; + self.tcp_port.fmt(f)?; + if self.tcp_port != self.udp_port { + f.write_str("?discport=")?; + self.udp_port.fmt(f)?; + } + + Ok(()) + } +} + +/// Possible error types when parsing a `NodeRecord` +#[derive(Debug, thiserror::Error)] +pub enum NodeRecordParseError { + /// Invalid url + #[error("Failed to parse url: {0}")] + InvalidUrl(String), + /// Invalid id + #[error("Failed to parse id")] + InvalidId(String), + /// Invalid discport + #[error("Failed to discport query: {0}")] + Discport(ParseIntError), +} + +impl FromStr for NodeRecord { + type Err = NodeRecordParseError; + + fn from_str(s: &str) -> Result { + let url = Url::parse(s).map_err(|e| NodeRecordParseError::InvalidUrl(e.to_string()))?; + + let address = match url.host() { + Some(Host::Ipv4(ip)) => IpAddr::V4(ip), + Some(Host::Ipv6(ip)) => IpAddr::V6(ip), + Some(Host::Domain(ip)) => IpAddr::V4( + Ipv4Addr::from_str(ip) + .map_err(|e| NodeRecordParseError::InvalidUrl(e.to_string()))?, + ), + _ => return Err(NodeRecordParseError::InvalidUrl(format!("invalid host: {url:?}"))), + }; + let port = url + .port() + .ok_or_else(|| NodeRecordParseError::InvalidUrl("no port specified".to_string()))?; + + let udp_port = if let Some(discovery_port) = url + .query_pairs() + .find_map(|(maybe_disc, port)| (maybe_disc.as_ref() == "discport").then_some(port)) + { + discovery_port.parse::().map_err(NodeRecordParseError::Discport)? + } else { + port + }; + + let id = url + .username() + .parse::() + .map_err(|e| NodeRecordParseError::InvalidId(e.to_string()))?; + + Ok(Self { address, id, tcp_port: port, udp_port }) + } +} + +#[cfg(test)] +mod tests { + use super::*; + use alloy_rlp::{Decodable, Encodable}; + use bytes::BytesMut; + use rand::{thread_rng, Rng, RngCore}; + + #[test] + fn test_mapped_ipv6() { + let mut rng = thread_rng(); + + let v4: Ipv4Addr = "0.0.0.0".parse().unwrap(); + let v6 = v4.to_ipv6_mapped(); + + let record = NodeRecord { + address: v6.into(), + tcp_port: rng.gen(), + udp_port: rng.gen(), + id: rng.gen(), + }; + + assert!(record.clone().convert_ipv4_mapped()); + assert_eq!(record.into_ipv4_mapped().address, IpAddr::from(v4)); + } + + #[test] + fn test_mapped_ipv4() { + let mut rng = thread_rng(); + let v4: Ipv4Addr = "0.0.0.0".parse().unwrap(); + + let record = NodeRecord { + address: v4.into(), + tcp_port: rng.gen(), + udp_port: rng.gen(), + id: rng.gen(), + }; + + assert!(!record.clone().convert_ipv4_mapped()); + assert_eq!(record.into_ipv4_mapped().address, IpAddr::from(v4)); + } + + #[test] + fn test_noderecord_codec_ipv4() { + let mut rng = thread_rng(); + for _ in 0..100 { + let mut ip = [0u8; 4]; + rng.fill_bytes(&mut ip); + let record = NodeRecord { + address: IpAddr::V4(ip.into()), + tcp_port: rng.gen(), + udp_port: rng.gen(), + id: rng.gen(), + }; + + let mut buf = BytesMut::new(); + record.encode(&mut buf); + + let decoded = NodeRecord::decode(&mut buf.as_ref()).unwrap(); + assert_eq!(record, decoded); + } + } + + #[test] + fn test_noderecord_codec_ipv6() { + let mut rng = thread_rng(); + for _ in 0..100 { + let mut ip = [0u8; 16]; + rng.fill_bytes(&mut ip); + let record = NodeRecord { + address: IpAddr::V6(ip.into()), + tcp_port: rng.gen(), + udp_port: rng.gen(), + id: rng.gen(), + }; + + let mut buf = BytesMut::new(); + record.encode(&mut buf); + + let decoded = NodeRecord::decode(&mut buf.as_ref()).unwrap(); + assert_eq!(record, decoded); + } + } + + #[test] + fn test_url_parse() { + let url = "enode://6f8a80d14311c39f35f516fa664deaaaa13e85b2f7493f37f6144d86991ec012937307647bd3b9a82abe2974e1407241d54947bbb39763a4cac9f77166ad92a0@10.3.58.6:30303?discport=30301"; + let node: NodeRecord = url.parse().unwrap(); + assert_eq!(node, NodeRecord { + address: IpAddr::V4([10,3,58,6].into()), + tcp_port: 30303, + udp_port: 30301, + id: "6f8a80d14311c39f35f516fa664deaaaa13e85b2f7493f37f6144d86991ec012937307647bd3b9a82abe2974e1407241d54947bbb39763a4cac9f77166ad92a0".parse().unwrap(), + }) + } + + #[test] + fn test_node_display() { + let url = "enode://6f8a80d14311c39f35f516fa664deaaaa13e85b2f7493f37f6144d86991ec012937307647bd3b9a82abe2974e1407241d54947bbb39763a4cac9f77166ad92a0@10.3.58.6:30303"; + let node: NodeRecord = url.parse().unwrap(); + assert_eq!(url, &format!("{node}")); + } + + #[test] + fn test_node_display_discport() { + let url = "enode://6f8a80d14311c39f35f516fa664deaaaa13e85b2f7493f37f6144d86991ec012937307647bd3b9a82abe2974e1407241d54947bbb39763a4cac9f77166ad92a0@10.3.58.6:30303?discport=30301"; + let node: NodeRecord = url.parse().unwrap(); + assert_eq!(url, &format!("{node}")); + } + + #[test] + fn test_node_serialize() { + let node = NodeRecord{ + address: IpAddr::V4([10, 3, 58, 6].into()), + tcp_port: 30303u16, + udp_port: 30301u16, + id: PeerId::from_str("6f8a80d14311c39f35f516fa664deaaaa13e85b2f7493f37f6144d86991ec012937307647bd3b9a82abe2974e1407241d54947bbb39763a4cac9f77166ad92a0").unwrap(), + }; + let ser = serde_json::to_string::(&node).expect("couldn't serialize"); + assert_eq!(ser, "\"enode://6f8a80d14311c39f35f516fa664deaaaa13e85b2f7493f37f6144d86991ec012937307647bd3b9a82abe2974e1407241d54947bbb39763a4cac9f77166ad92a0@10.3.58.6:30303?discport=30301\"") + } + + #[test] + fn test_node_deserialize() { + let url = "\"enode://6f8a80d14311c39f35f516fa664deaaaa13e85b2f7493f37f6144d86991ec012937307647bd3b9a82abe2974e1407241d54947bbb39763a4cac9f77166ad92a0@10.3.58.6:30303?discport=30301\""; + let node: NodeRecord = serde_json::from_str(url).expect("couldn't deserialize"); + assert_eq!(node, NodeRecord{ + address: IpAddr::V4([10, 3, 58, 6].into()), + tcp_port: 30303u16, + udp_port: 30301u16, + id: PeerId::from_str("6f8a80d14311c39f35f516fa664deaaaa13e85b2f7493f37f6144d86991ec012937307647bd3b9a82abe2974e1407241d54947bbb39763a4cac9f77166ad92a0").unwrap(), + }) + } +} diff --git a/crates/rpc/rpc-types/src/peer.rs b/crates/rpc/rpc-types/src/peer.rs new file mode 100644 index 000000000000..a07e61d00285 --- /dev/null +++ b/crates/rpc/rpc-types/src/peer.rs @@ -0,0 +1,4 @@ +use alloy_primitives::B512; + +/// Alias for a peer identifier +pub type PeerId = B512; diff --git a/crates/primitives/src/serde_helper/jsonu256.rs b/crates/rpc/rpc-types/src/serde_helpers/json_u256.rs similarity index 92% rename from crates/primitives/src/serde_helper/jsonu256.rs rename to crates/rpc/rpc-types/src/serde_helpers/json_u256.rs index 5b854451892a..5566a2f7d428 100644 --- a/crates/primitives/src/serde_helper/jsonu256.rs +++ b/crates/rpc/rpc-types/src/serde_helpers/json_u256.rs @@ -1,4 +1,6 @@ -use crate::U256; +//! Json U256 serde helpers. + +use alloy_primitives::U256; use serde::{ de::{Error, Visitor}, Deserialize, Deserializer, Serialize, Serializer, @@ -21,6 +23,12 @@ impl From for JsonU256 { } } +impl fmt::Display for JsonU256 { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "{}", self.0) + } +} + impl Serialize for JsonU256 { fn serialize(&self, serializer: S) -> Result where @@ -39,6 +47,7 @@ impl<'a> Deserialize<'a> for JsonU256 { } } +/// Visitor pattern for `JsonU256` deserialization. struct JsonU256Visitor; impl<'a> Visitor<'a> for JsonU256Visitor { @@ -102,7 +111,7 @@ where #[cfg(test)] mod test { use super::JsonU256; - use crate::U256; + use alloy_primitives::U256; #[test] fn jsonu256_deserialize() { diff --git a/crates/rpc/rpc-types/src/serde_helpers/mod.rs b/crates/rpc/rpc-types/src/serde_helpers/mod.rs new file mode 100644 index 000000000000..1c45b0d56d42 --- /dev/null +++ b/crates/rpc/rpc-types/src/serde_helpers/mod.rs @@ -0,0 +1,30 @@ +//! Serde helpers for primitive types. + +use alloy_primitives::U256; +use serde::{Deserialize, Deserializer, Serializer}; + +pub mod json_u256; +pub mod num; +/// Storage related helpers. +pub mod storage; +pub mod u64_hex; + +/// Deserializes the input into a U256, accepting both 0x-prefixed hex and decimal strings with +/// arbitrary precision, defined by serde_json's [`Number`](serde_json::Number). +pub fn from_int_or_hex<'de, D>(deserializer: D) -> Result +where + D: Deserializer<'de>, +{ + num::NumberOrHexU256::deserialize(deserializer)?.try_into_u256() +} + +/// Serialize a byte vec as a hex string _without_ the "0x" prefix. +/// +/// This behaves the same as [`hex::encode`](alloy_primitives::hex::encode). +pub fn serialize_hex_string_no_prefix(x: T, s: S) -> Result +where + S: Serializer, + T: AsRef<[u8]>, +{ + s.serialize_str(&alloy_primitives::hex::encode(x.as_ref())) +} diff --git a/crates/rpc/rpc-types/src/serde_helpers/num.rs b/crates/rpc/rpc-types/src/serde_helpers/num.rs new file mode 100644 index 000000000000..d1e6959065fe --- /dev/null +++ b/crates/rpc/rpc-types/src/serde_helpers/num.rs @@ -0,0 +1,139 @@ +//! Numeric serde helpers. + +use alloy_primitives::{U256, U64}; +use serde::{de, Deserialize, Deserializer, Serialize}; +use std::str::FromStr; + +/// A `u64` wrapper type that deserializes from hex or a u64 and serializes as hex. +/// +/// +/// ```rust +/// use reth_rpc_types::num::U64HexOrNumber; +/// let number_json = "100"; +/// let hex_json = "\"0x64\""; +/// +/// let number: U64HexOrNumber = serde_json::from_str(number_json).unwrap(); +/// let hex: U64HexOrNumber = serde_json::from_str(hex_json).unwrap(); +/// assert_eq!(number, hex); +/// assert_eq!(hex.to(), 100); +/// ``` +#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize)] +pub struct U64HexOrNumber(U64); + +impl U64HexOrNumber { + /// Returns the wrapped u64 + pub fn to(self) -> u64 { + self.0.to() + } +} + +impl From for U64HexOrNumber { + fn from(value: u64) -> Self { + Self(U64::from(value)) + } +} + +impl From for U64HexOrNumber { + fn from(value: U64) -> Self { + Self(value) + } +} + +impl From for u64 { + fn from(value: U64HexOrNumber) -> Self { + value.to() + } +} + +impl From for U64 { + fn from(value: U64HexOrNumber) -> Self { + value.0 + } +} + +impl<'de> Deserialize<'de> for U64HexOrNumber { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + #[derive(Deserialize)] + #[serde(untagged)] + enum NumberOrHexU64 { + Hex(U64), + Int(u64), + } + match NumberOrHexU64::deserialize(deserializer)? { + NumberOrHexU64::Int(val) => Ok(val.into()), + NumberOrHexU64::Hex(val) => Ok(val.into()), + } + } +} + +/// serde functions for handling primitive optional `u64` as [U64] +pub mod u64_hex_or_decimal_opt { + use crate::serde_helpers::num::U64HexOrNumber; + use serde::{Deserialize, Deserializer, Serialize, Serializer}; + + /// Deserializes an `u64` accepting a hex quantity string with optional 0x prefix or + /// a number + pub fn deserialize<'de, D>(deserializer: D) -> Result, D::Error> + where + D: Deserializer<'de>, + { + match Option::::deserialize(deserializer)? { + Some(val) => Ok(Some(val.into())), + None => Ok(None), + } + } + + /// Serializes u64 as hex string + pub fn serialize(value: &Option, s: S) -> Result { + match value { + Some(val) => U64HexOrNumber::from(*val).serialize(s), + None => s.serialize_none(), + } + } +} + +/// Deserializes the input into an `Option`, using [`from_int_or_hex`] to deserialize the +/// inner value. +pub fn from_int_or_hex_opt<'de, D>(deserializer: D) -> Result, D::Error> +where + D: Deserializer<'de>, +{ + match Option::::deserialize(deserializer)? { + Some(val) => val.try_into_u256().map(Some), + None => Ok(None), + } +} + +/// An enum that represents either a [serde_json::Number] integer, or a hex [U256]. +#[derive(Debug, Deserialize)] +#[serde(untagged)] +pub enum NumberOrHexU256 { + /// An integer + Int(serde_json::Number), + /// A hex U256 + Hex(U256), +} + +impl NumberOrHexU256 { + /// Tries to convert this into a [U256]]. + pub fn try_into_u256(self) -> Result { + match self { + NumberOrHexU256::Int(num) => { + U256::from_str(num.to_string().as_str()).map_err(E::custom) + } + NumberOrHexU256::Hex(val) => Ok(val), + } + } +} + +/// Deserializes the input into a U256, accepting both 0x-prefixed hex and decimal strings with +/// arbitrary precision, defined by serde_json's [`Number`](serde_json::Number). +pub fn from_int_or_hex<'de, D>(deserializer: D) -> Result +where + D: Deserializer<'de>, +{ + NumberOrHexU256::deserialize(deserializer)?.try_into_u256() +} diff --git a/crates/rpc/rpc-types/src/serde_helpers/storage.rs b/crates/rpc/rpc-types/src/serde_helpers/storage.rs new file mode 100644 index 000000000000..885274f5f07b --- /dev/null +++ b/crates/rpc/rpc-types/src/serde_helpers/storage.rs @@ -0,0 +1,102 @@ +use alloy_primitives::{Bytes, B256, U256}; +use serde::{Deserialize, Deserializer, Serialize}; +use std::{collections::HashMap, fmt::Write}; + +/// A storage key type that can be serialized to and from a hex string up to 32 bytes. Used for +/// `eth_getStorageAt` and `eth_getProof` RPCs. +/// +/// This is a wrapper type meant to mirror geth's serialization and deserialization behavior for +/// storage keys. +/// +/// In `eth_getStorageAt`, this is used for deserialization of the `index` field. Internally, the +/// index is a [B256], but in `eth_getStorageAt` requests, its serialization can be _up to_ 32 +/// bytes. To support this, the storage key is deserialized first as a U256, and converted to a +/// B256 for use internally. +/// +/// `eth_getProof` also takes storage keys up to 32 bytes as input, so the `keys` field is +/// similarly deserialized. However, geth populates the storage proof `key` fields in the response +/// by mirroring the `key` field used in the input. +/// * See how `storageKey`s (the input) are populated in the `StorageResult` (the output): +/// +/// +/// The contained [B256] and From implementation for String are used to preserve the input and +/// implement this behavior from geth. +#[derive(Copy, Clone, Debug, Default, Eq, PartialEq, Serialize, Deserialize)] +#[serde(from = "U256", into = "String")] +pub struct JsonStorageKey(pub B256); + +impl From for JsonStorageKey { + fn from(value: U256) -> Self { + // SAFETY: Address (B256) and U256 have the same number of bytes + JsonStorageKey(B256::from(value.to_be_bytes())) + } +} + +impl From for String { + fn from(value: JsonStorageKey) -> Self { + // SAFETY: Address (B256) and U256 have the same number of bytes + let uint = U256::from_be_bytes(value.0 .0); + + // serialize byte by byte + // + // this is mainly so we can return an output that hive testing expects, because the + // `eth_getProof` implementation in geth simply mirrors the input + // + // see the use of `hexKey` in the `eth_getProof` response: + // + let bytes = uint.to_be_bytes_trimmed_vec(); + let mut hex = String::with_capacity(2 + bytes.len() * 2); + hex.push_str("0x"); + for byte in bytes { + write!(hex, "{:02x}", byte).unwrap(); + } + hex + } +} + +/// Converts a Bytes value into a B256, accepting inputs that are less than 32 bytes long. These +/// inputs will be left padded with zeros. +pub fn from_bytes_to_b256<'de, D>(bytes: Bytes) -> Result +where + D: Deserializer<'de>, +{ + if bytes.0.len() > 32 { + return Err(serde::de::Error::custom("input too long to be a B256")) + } + + // left pad with zeros to 32 bytes + let mut padded = [0u8; 32]; + padded[32 - bytes.0.len()..].copy_from_slice(&bytes.0); + + // then convert to B256 without a panic + Ok(B256::from_slice(&padded)) +} + +/// Deserializes the input into an Option>, using [from_bytes_to_b256] which +/// allows cropped values: +/// +/// ```json +/// { +/// "0x0000000000000000000000000000000000000000000000000000000000000001": "0x22" +/// } +/// ``` +pub fn deserialize_storage_map<'de, D>( + deserializer: D, +) -> Result>, D::Error> +where + D: Deserializer<'de>, +{ + let map = Option::>::deserialize(deserializer)?; + match map { + Some(mut map) => { + let mut res_map = HashMap::with_capacity(map.len()); + for (k, v) in map.drain() { + let k_deserialized = from_bytes_to_b256::<'de, D>(k)?; + let v_deserialized = from_bytes_to_b256::<'de, D>(v)?; + res_map.insert(k_deserialized, v_deserialized); + } + Ok(Some(res_map)) + } + None => Ok(None), + } +} diff --git a/crates/rpc/rpc-types/src/serde_helpers/u64_hex.rs b/crates/rpc/rpc-types/src/serde_helpers/u64_hex.rs new file mode 100644 index 000000000000..dc8f9a96ef98 --- /dev/null +++ b/crates/rpc/rpc-types/src/serde_helpers/u64_hex.rs @@ -0,0 +1,18 @@ +//! Helper to deserialize an `u64` from [U64] accepting a hex quantity string with optional 0x +//! prefix + +use alloy_primitives::U64; +use serde::{Deserialize, Deserializer, Serialize, Serializer}; + +/// Deserializes an `u64` from [U64] accepting a hex quantity string with optional 0x prefix +pub fn deserialize<'de, D>(deserializer: D) -> Result +where + D: Deserializer<'de>, +{ + U64::deserialize(deserializer).map(|val| val.to()) +} + +/// Serializes u64 as hex string +pub fn serialize(value: &u64, s: S) -> Result { + U64::from(*value).serialize(s) +} diff --git a/crates/rpc/rpc/src/blocking_pool.rs b/crates/rpc/rpc/src/blocking_pool.rs index ef3dbe7d7abb..cfd0c907485e 100644 --- a/crates/rpc/rpc/src/blocking_pool.rs +++ b/crates/rpc/rpc/src/blocking_pool.rs @@ -145,7 +145,7 @@ impl Future for BlockingTaskHandle { /// /// This should only happen #[derive(Debug, Default, thiserror::Error)] -#[error("Tokio channel dropped while awaiting result")] +#[error("tokio channel dropped while awaiting result")] #[non_exhaustive] pub struct TokioBlockingTaskError; diff --git a/crates/rpc/rpc/src/debug.rs b/crates/rpc/rpc/src/debug.rs index 6c79e4ed21f8..7bad7e8c4e26 100644 --- a/crates/rpc/rpc/src/debug.rs +++ b/crates/rpc/rpc/src/debug.rs @@ -354,7 +354,8 @@ where let StateContext { transaction_index, block_number } = state_context.unwrap_or_default(); let transaction_index = transaction_index.unwrap_or_default(); - let target_block = block_number.unwrap_or(BlockId::Number(BlockNumberOrTag::Latest)); + let target_block = block_number + .unwrap_or(reth_rpc_types::BlockId::Number(reth_rpc_types::BlockNumberOrTag::Latest)); let ((cfg, block_env, _), block) = futures::try_join!( self.inner.eth_api.evm_env_at(target_block), self.inner.eth_api.block_by_id(target_block), diff --git a/crates/rpc/rpc/src/eth/api/call.rs b/crates/rpc/rpc/src/eth/api/call.rs index 9c364263fbd5..94fcbed215cc 100644 --- a/crates/rpc/rpc/src/eth/api/call.rs +++ b/crates/rpc/rpc/src/eth/api/call.rs @@ -21,7 +21,7 @@ use reth_rpc_types::{ state::StateOverride, AccessListWithGasUsed, BlockError, Bundle, CallRequest, EthCallResponse, StateContext, }; -use reth_rpc_types_compat::log::from_primitive_access_list; +use reth_rpc_types_compat::log::{from_primitive_access_list, to_primitive_access_list}; use reth_transaction_pool::TransactionPool; use revm::{ db::{CacheDB, DatabaseRef}, @@ -87,6 +87,7 @@ where let transaction_index = transaction_index.unwrap_or_default(); let target_block = block_number.unwrap_or(BlockId::Number(BlockNumberOrTag::Latest)); + let ((cfg, block_env, _), block) = futures::try_join!(self.evm_env_at(target_block), self.block_by_id(target_block))?; @@ -230,11 +231,11 @@ where // if the provided gas limit is less than computed cap, use that let gas_limit = std::cmp::min(U256::from(env.tx.gas_limit), highest_gas_limit); - env.block.gas_limit = gas_limit; + env.tx.gas_limit = gas_limit.saturating_to(); trace!(target: "rpc::eth::estimate", ?env, "Starting gas estimation"); - // execute the call without writing to db + // transact with the highest __possible__ gas limit let ethres = transact(&mut db, env.clone()); // Exceptional case: init used too much gas, we need to increase the gas limit and try @@ -254,6 +255,8 @@ where // succeeded } ExecutionResult::Halt { reason, gas_used } => { + // here we don't check for invalid opcode because already executed with highest gas + // limit return Err(RpcInvalidTransactionError::halt(reason, gas_used).into()) } ExecutionResult::Revert { output, .. } => { @@ -316,7 +319,11 @@ where } ExecutionResult::Halt { reason, .. } => { match reason { - Halt::OutOfGas(_) => { + Halt::OutOfGas(_) | Halt::InvalidFEOpcode => { + // either out of gas or invalid opcode can be thrown dynamically if + // gasLeft is too low, so we treat this as `out of gas`, we know this + // call succeeds with a higher gaslimit. common usage of invalid opcode in openzeppelin + // increase the lowest gas limit lowest_gas_limit = mid_gas_limit; } @@ -386,7 +393,8 @@ where let initial = request.access_list.take().unwrap_or_default(); let precompiles = get_precompiles(env.cfg.spec_id); - let mut inspector = AccessListInspector::new(initial, from, to, precompiles); + let mut inspector = + AccessListInspector::new(to_primitive_access_list(initial), from, to, precompiles); let (result, env) = inspect(&mut db, env, &mut inspector)?; match result.result { @@ -403,7 +411,7 @@ where let access_list = inspector.into_access_list(); // calculate the gas used using the access list - request.access_list = Some(access_list.clone()); + request.access_list = Some(from_primitive_access_list(access_list.clone())); let gas_used = self.estimate_gas_with(env.cfg, env.block, request, db.db.state())?; Ok(AccessListWithGasUsed { access_list: from_primitive_access_list(access_list), gas_used }) diff --git a/crates/rpc/rpc/src/eth/api/fees.rs b/crates/rpc/rpc/src/eth/api/fees.rs index c2392c9b5c59..7ab5c873a478 100644 --- a/crates/rpc/rpc/src/eth/api/fees.rs +++ b/crates/rpc/rpc/src/eth/api/fees.rs @@ -171,7 +171,7 @@ where Some(TxGasAndReward { gas_used, - reward: tx.effective_gas_tip(header.base_fee_per_gas).unwrap_or_default(), + reward: tx.effective_tip_per_gas(header.base_fee_per_gas).unwrap_or_default(), }) }) .collect::>(); diff --git a/crates/rpc/rpc/src/eth/api/pending_block.rs b/crates/rpc/rpc/src/eth/api/pending_block.rs index 396c8de4e6ba..a1625e0c6953 100644 --- a/crates/rpc/rpc/src/eth/api/pending_block.rs +++ b/crates/rpc/rpc/src/eth/api/pending_block.rs @@ -1,7 +1,6 @@ //! Support for building a pending block via local txpool. use crate::eth::error::{EthApiError, EthResult}; -use core::fmt::Debug; use reth_primitives::{ constants::{eip4844::MAX_DATA_GAS_PER_BLOCK, BEACON_NONCE}, proofs, @@ -248,7 +247,7 @@ impl PendingBlockEnv { /// /// This uses [apply_beacon_root_contract_call] to ultimately apply the beacon root contract state /// change. -fn pre_block_beacon_root_contract_call( +fn pre_block_beacon_root_contract_call( db: &mut DB, chain_spec: &ChainSpec, block_number: u64, @@ -257,8 +256,7 @@ fn pre_block_beacon_root_contract_call( parent_beacon_block_root: Option, ) -> EthResult<()> where - DB: Database + DatabaseCommit, - ::Error: Debug, + DB::Error: std::fmt::Display, { // Configure the environment for the block. let env = Env { diff --git a/crates/rpc/rpc/src/eth/bundle.rs b/crates/rpc/rpc/src/eth/bundle.rs index c70075ede565..0ce269b81908 100644 --- a/crates/rpc/rpc/src/eth/bundle.rs +++ b/crates/rpc/rpc/src/eth/bundle.rs @@ -55,9 +55,8 @@ where let transactions = txs.into_iter().map(recover_raw_transaction).collect::, _>>()?; - - let (cfg, mut block_env, at) = - self.inner.eth_api.evm_env_at(state_block_number.into()).await?; + let block_id: reth_rpc_types::BlockId = state_block_number.into(); + let (cfg, mut block_env, at) = self.inner.eth_api.evm_env_at(block_id).await?; // need to adjust the timestamp for the next block if let Some(timestamp) = timestamp { @@ -97,7 +96,7 @@ where let tx = tx.into_ecrecovered_transaction(); hash_bytes.extend_from_slice(tx.hash().as_slice()); let gas_price = tx - .effective_gas_tip(basefee) + .effective_tip_per_gas(basefee) .ok_or_else(|| RpcInvalidTransactionError::FeeCapTooLow)?; tx.try_fill_tx_env(&mut evm.env.tx)?; let ResultAndState { result, state } = evm.transact()?; diff --git a/crates/rpc/rpc/src/eth/error.rs b/crates/rpc/rpc/src/eth/error.rs index 998469ecbde7..b22ab5c0415e 100644 --- a/crates/rpc/rpc/src/eth/error.rs +++ b/crates/rpc/rpc/src/eth/error.rs @@ -11,7 +11,8 @@ use reth_primitives::{Address, Bytes, U256}; use reth_revm::tracing::js::JsInspectorError; use reth_rpc_types::{error::EthRpcErrorCode, BlockError, CallInputError}; use reth_transaction_pool::error::{ - Eip4844PoolTransactionError, InvalidPoolTransactionError, PoolError, PoolTransactionError, + Eip4844PoolTransactionError, InvalidPoolTransactionError, PoolError, PoolErrorKind, + PoolTransactionError, }; use revm::primitives::{EVMError, ExecutionResult, Halt, OutOfGasError}; use revm_primitives::InvalidHeader; @@ -25,29 +26,29 @@ pub type EthResult = Result; #[allow(missing_docs)] pub enum EthApiError { /// When a raw transaction is empty - #[error("Empty transaction data")] + #[error("empty transaction data")] EmptyRawTransactionData, - #[error("Failed to decode signed transaction")] + #[error("failed to decode signed transaction")] FailedToDecodeSignedTransaction, - #[error("Invalid transaction signature")] + #[error("invalid transaction signature")] InvalidTransactionSignature, #[error(transparent)] PoolError(RpcPoolError), - #[error("Unknown block number")] + #[error("unknown block number")] UnknownBlockNumber, /// Thrown when querying for `finalized` or `safe` block before the merge transition is /// finalized, - #[error("Unknown block")] + #[error("unknown block")] UnknownSafeOrFinalizedBlock, - #[error("Unknown block or tx index")] + #[error("unknown block or tx index")] UnknownBlockOrTxIndex, - #[error("Invalid block range")] + #[error("invalid block range")] InvalidBlockRange, /// An internal error where prevrandao is not set in the evm's environment - #[error("Prevrandao not in th EVM's environment after merge")] + #[error("prevrandao not in the EVM's environment after merge")] PrevrandaoNotSet, /// Excess_blob_gas is not set for Cancun and above. - #[error("Excess blob gas missing th EVM's environment after Cancun")] + #[error("excess blob gas missing the EVM's environment after Cancun")] ExcessBlobGasNotSet, /// Thrown when a call or transaction request (`eth_call`, `eth_estimateGas`, /// `eth_sendTransaction`) contains conflicting fields (legacy, EIP-1559) @@ -265,38 +266,38 @@ pub enum RpcInvalidTransactionError { #[error("sender not an eoa")] SenderNoEOA, /// Thrown during estimate if caller has insufficient funds to cover the tx. - #[error("Out of gas: gas required exceeds allowance: {0:?}")] + #[error("out of gas: gas required exceeds allowance: {0:?}")] BasicOutOfGas(U256), /// As BasicOutOfGas but thrown when gas exhausts during memory expansion. - #[error("Out of gas: gas exhausts during memory expansion: {0:?}")] + #[error("out of gas: gas exhausts during memory expansion: {0:?}")] MemoryOutOfGas(U256), /// As BasicOutOfGas but thrown when gas exhausts during precompiled contract execution. - #[error("Out of gas: gas exhausts during precompiled contract execution: {0:?}")] + #[error("out of gas: gas exhausts during precompiled contract execution: {0:?}")] PrecompileOutOfGas(U256), /// revm's Type cast error, U256 casts down to a u64 with overflow - #[error("Out of gas: revm's Type cast error, U256 casts down to a u64 with overflow {0:?}")] + #[error("out of gas: revm's Type cast error, U256 casts down to a u64 with overflow {0:?}")] InvalidOperandOutOfGas(U256), /// Thrown if executing a transaction failed during estimate/call #[error("{0}")] Revert(RevertError), - /// Unspecific evm halt error + /// Unspecific EVM halt error. #[error("EVM error {0:?}")] EvmHalt(Halt), /// Invalid chain id set for the transaction. - #[error("Invalid chain id")] + #[error("invalid chain ID")] InvalidChainId, /// The transaction is before Spurious Dragon and has a chain ID - #[error("Transactions before Spurious Dragon should not have a chain ID.")] + #[error("transactions before Spurious Dragon should not have a chain ID")] OldLegacyChainId, /// The transitions is before Berlin and has access list - #[error("Transactions before Berlin should not have access list")] + #[error("transactions before Berlin should not have access list")] AccessListNotSupported, /// `max_fee_per_blob_gas` is not supported for blocks before the Cancun hardfork. - #[error("max_fee_per_blob_gas is not supported for blocks before the Cancun hardfork.")] + #[error("max_fee_per_blob_gas is not supported for blocks before the Cancun hardfork")] MaxFeePerBlobGasNotSupported, /// `blob_hashes`/`blob_versioned_hashes` is not supported for blocks before the Cancun /// hardfork. - #[error("blob_versioned_hashes is not supported for blocks before the Cancun hardfork.")] + #[error("blob_versioned_hashes is not supported for blocks before the Cancun hardfork")] BlobVersionedHashesNotSupported, /// Block `blob_gas_price` is greater than tx-specified `max_fee_per_blob_gas` after Cancun. #[error("max fee per blob gas less than block blob gas fee")] @@ -527,7 +528,7 @@ pub enum RpcPoolError { #[error(transparent)] Invalid(#[from] RpcInvalidTransactionError), /// Custom pool error - #[error("{0:?}")] + #[error(transparent)] PoolTransactionError(Box), /// Eip-4844 related error #[error(transparent)] @@ -553,15 +554,15 @@ impl From for ErrorObject<'static> { impl From for RpcPoolError { fn from(err: PoolError) -> RpcPoolError { - match err { - PoolError::ReplacementUnderpriced(_) => RpcPoolError::ReplaceUnderpriced, - PoolError::FeeCapBelowMinimumProtocolFeeCap(_, _) => RpcPoolError::Underpriced, - PoolError::SpammerExceededCapacity(_, _) => RpcPoolError::TxPoolOverflow, - PoolError::DiscardedOnInsert(_) => RpcPoolError::TxPoolOverflow, - PoolError::InvalidTransaction(_, err) => err.into(), - PoolError::Other(_, err) => RpcPoolError::Other(err), - PoolError::AlreadyImported(_) => RpcPoolError::AlreadyKnown, - PoolError::ExistingConflictingTransactionType(_, _, _) => { + match err.kind { + PoolErrorKind::ReplacementUnderpriced => RpcPoolError::ReplaceUnderpriced, + PoolErrorKind::FeeCapBelowMinimumProtocolFeeCap(_) => RpcPoolError::Underpriced, + PoolErrorKind::SpammerExceededCapacity(_) => RpcPoolError::TxPoolOverflow, + PoolErrorKind::DiscardedOnInsert => RpcPoolError::TxPoolOverflow, + PoolErrorKind::InvalidTransaction(err) => err.into(), + PoolErrorKind::Other(err) => RpcPoolError::Other(err), + PoolErrorKind::AlreadyImported => RpcPoolError::AlreadyKnown, + PoolErrorKind::ExistingConflictingTransactionType(_, _) => { RpcPoolError::AddressAlreadyReserved } } @@ -600,19 +601,19 @@ impl From for EthApiError { #[derive(Debug, thiserror::Error)] pub enum SignError { /// Error occured while trying to sign data. - #[error("Could not sign")] + #[error("could not sign")] CouldNotSign, /// Signer for requested account not found. - #[error("Unknown account")] + #[error("unknown account")] NoAccount, /// TypedData has invalid format. - #[error("Given typed data is not valid")] + #[error("given typed data is not valid")] InvalidTypedData, /// Invalid transaction request in `sign_transaction`. - #[error("Invalid transaction request")] + #[error("invalid transaction request")] InvalidTransactionRequest, /// No chain ID was given. - #[error("No chainid")] + #[error("no chainid")] NoChainId, } diff --git a/crates/rpc/rpc/src/eth/filter.rs b/crates/rpc/rpc/src/eth/filter.rs index 5b0cc631ba98..3427a06fe301 100644 --- a/crates/rpc/rpc/src/eth/filter.rs +++ b/crates/rpc/rpc/src/eth/filter.rs @@ -7,16 +7,20 @@ use crate::{ result::{rpc_error_with_code, ToRpcResult}, EthSubscriptionIdProvider, }; -use alloy_primitives::B256; +use core::fmt; + use async_trait::async_trait; use jsonrpsee::{core::RpcResult, server::IdProvider}; use reth_interfaces::RethError; -use reth_primitives::{BlockHashOrNumber, Receipt, SealedBlock, TxHash}; +use reth_primitives::{BlockHashOrNumber, IntoRecoveredTransaction, Receipt, SealedBlock, TxHash}; use reth_provider::{BlockIdReader, BlockReader, EvmEnvProvider}; use reth_rpc_api::EthFilterApiServer; -use reth_rpc_types::{Filter, FilterBlockOption, FilterChanges, FilterId, FilteredParams, Log}; +use reth_rpc_types::{ + Filter, FilterBlockOption, FilterChanges, FilterId, FilteredParams, Log, + PendingTransactionFilterKind, +}; use reth_tasks::TaskSpawner; -use reth_transaction_pool::TransactionPool; +use reth_transaction_pool::{NewSubpoolTransactionStream, PoolTransaction, TransactionPool}; use std::{ collections::HashMap, iter::StepBy, @@ -35,7 +39,7 @@ const MAX_HEADERS_RANGE: u64 = 1_000; // with ~530bytes per header this is ~500k /// `Eth` filter RPC implementation. pub struct EthFilter { - /// All nested fields bundled together. + /// All nested fields bundled together inner: Arc>, } @@ -47,29 +51,32 @@ where /// Creates a new, shareable instance. /// /// This uses the given pool to get notified about new transactions, the provider to interact - /// with the blockchain, the cache to fetch cacheable data, like the logs and the - /// max_logs_per_response to limit the amount of logs returned in a single response - /// `eth_getLogs` + /// with the blockchain, the cache to fetch cacheable data, like the logs. + /// + /// See also [EthFilterConfig]. /// /// This also spawns a task that periodically clears stale filters. pub fn new( provider: Provider, pool: Pool, eth_cache: EthStateCache, - max_logs_per_response: usize, + config: EthFilterConfig, task_spawner: Box, - stale_filter_ttl: Duration, ) -> Self { + let EthFilterConfig { max_blocks_per_filter, max_logs_per_response, stale_filter_ttl } = + config; let inner = EthFilterInner { provider, active_filters: Default::default(), pool, id_provider: Arc::new(EthSubscriptionIdProvider::default()), - max_logs_per_response, eth_cache, max_headers_range: MAX_HEADERS_RANGE, task_spawner, stale_filter_ttl, + // if not set, use the max value, which is effectively no limit + max_blocks_per_filter: max_blocks_per_filter.unwrap_or(u64::MAX), + max_logs_per_response: max_logs_per_response.unwrap_or(usize::MAX), }; let eth_filter = Self { inner: Arc::new(inner) }; @@ -120,6 +127,7 @@ impl EthFilter where Provider: BlockReader + BlockIdReader + EvmEnvProvider + 'static, Pool: TransactionPool + 'static, + ::Transaction: 'static, { /// Returns all the filter changes for the given id, if any pub async fn filter_changes(&self, id: FilterId) -> Result { @@ -148,10 +156,7 @@ where }; match kind { - FilterKind::PendingTransaction(receiver) => { - let pending_txs = receiver.drain().await; - Ok(FilterChanges::Hashes(pending_txs)) - } + FilterKind::PendingTransaction(filter) => Ok(filter.drain().await), FilterKind::Block => { // Note: we need to fetch the block hashes from inclusive range // [start_block..best_block] @@ -235,13 +240,31 @@ where } /// Handler for `eth_newPendingTransactionFilter` - async fn new_pending_transaction_filter(&self) -> RpcResult { + async fn new_pending_transaction_filter( + &self, + kind: Option, + ) -> RpcResult { trace!(target: "rpc::eth", "Serving eth_newPendingTransactionFilter"); - let receiver = self.inner.pool.pending_transactions_listener(); - let pending_txs_receiver = PendingTransactionsReceiver::new(receiver); + let transaction_kind = match kind.unwrap_or_default() { + PendingTransactionFilterKind::Hashes => { + let receiver = self.inner.pool.pending_transactions_listener(); + let pending_txs_receiver = PendingTransactionsReceiver::new(receiver); + FilterKind::PendingTransaction(PendingTransactionKind::Hashes(pending_txs_receiver)) + } + PendingTransactionFilterKind::Full => { + let stream = self.inner.pool.new_pending_pool_transactions_listener(); + let full_txs_receiver = FullTransactionsReceiver::new(stream); + FilterKind::PendingTransaction(PendingTransactionKind::FullTransaction(Arc::new( + full_txs_receiver, + ))) + } + }; + + //let filter = FilterKind::PendingTransaction(transaction_kind); - self.inner.install_filter(FilterKind::PendingTransaction(pending_txs_receiver)).await + // Install the filter and propagate any errors + self.inner.install_filter(transaction_kind).await } /// Handler for `eth_getFilterChanges` @@ -304,6 +327,8 @@ struct EthFilterInner { active_filters: ActiveFilters, /// Provides ids to identify filters id_provider: Arc, + /// Maximum number of blocks that could be scanned per filter + max_blocks_per_filter: u64, /// Maximum number of logs that can be returned in a response max_logs_per_response: usize, /// The async cache frontend for eth related data @@ -404,6 +429,10 @@ where ) -> Result, FilterError> { trace!(target: "rpc::eth::filter", from=from_block, to=to_block, ?filter, "finding logs in range"); + if to_block - from_block > self.max_blocks_per_filter { + return Err(FilterError::QueryExceedsMaxBlocks(self.max_blocks_per_filter)) + } + let mut all_logs = Vec::new(); let filter_params = FilteredParams::new(Some(filter.clone())); @@ -411,8 +440,6 @@ where let address_filter = FilteredParams::address_filter(&filter.address); let topics_filter = FilteredParams::topics_filter(&filter.topics); - let is_multi_block_range = from_block != to_block; - // loop over the range of new blocks and check logs if the filter matches the log's bloom // filter for (from, to) in @@ -447,6 +474,7 @@ where // size check but only if range is multiple blocks, so we always return all // logs of a single block + let is_multi_block_range = from_block != to_block; if is_multi_block_range && all_logs.len() > self.max_logs_per_response { return Err(FilterError::QueryExceedsMaxResults( self.max_logs_per_response, @@ -461,6 +489,56 @@ where } } +/// Config for the filter +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct EthFilterConfig { + /// Maximum number of blocks that a filter can scan for logs. + /// + /// If `None` then no limit is enforced. + pub max_blocks_per_filter: Option, + /// Maximum number of logs that can be returned in a single response in `eth_getLogs` calls. + /// + /// If `None` then no limit is enforced. + pub max_logs_per_response: Option, + /// How long a filter remains valid after the last poll. + /// + /// A filter is considered stale if it has not been polled for longer than this duration and + /// will be removed. + pub stale_filter_ttl: Duration, +} + +impl EthFilterConfig { + /// Sets the maximum number of blocks that a filter can scan for logs. + pub fn max_blocks_per_filter(mut self, num: u64) -> Self { + self.max_blocks_per_filter = Some(num); + self + } + + /// Sets the maximum number of logs that can be returned in a single response in `eth_getLogs` + /// calls. + pub fn max_logs_per_response(mut self, num: usize) -> Self { + self.max_logs_per_response = Some(num); + self + } + + /// Sets how long a filter remains valid after the last poll before it will be removed. + pub fn stale_filter_ttl(mut self, duration: Duration) -> Self { + self.stale_filter_ttl = duration; + self + } +} + +impl Default for EthFilterConfig { + fn default() -> Self { + Self { + max_blocks_per_filter: None, + max_logs_per_response: None, + // 5min + stale_filter_ttl: Duration::from_secs(5 * 60), + } + } +} + /// All active filters #[derive(Debug, Clone, Default)] pub struct ActiveFilters { @@ -490,14 +568,81 @@ impl PendingTransactionsReceiver { } /// Returns all new pending transactions received since the last poll. - async fn drain(&self) -> Vec { + async fn drain(&self) -> FilterChanges { let mut pending_txs = Vec::new(); let mut prepared_stream = self.txs_receiver.lock().await; while let Ok(tx_hash) = prepared_stream.try_recv() { pending_txs.push(tx_hash); } - pending_txs + + // Convert the vector of hashes into FilterChanges::Hashes + FilterChanges::Hashes(pending_txs) + } +} + +/// A structure to manage and provide access to a stream of full transaction details. +#[derive(Debug, Clone)] +struct FullTransactionsReceiver { + txs_stream: Arc>>, +} + +impl FullTransactionsReceiver +where + T: PoolTransaction + 'static, +{ + /// Creates a new `FullTransactionsReceiver` encapsulating the provided transaction stream. + fn new(stream: NewSubpoolTransactionStream) -> Self { + FullTransactionsReceiver { txs_stream: Arc::new(Mutex::new(stream)) } + } + + /// Returns all new pending transactions received since the last poll. + async fn drain(&self) -> FilterChanges { + let mut pending_txs = Vec::new(); + let mut prepared_stream = self.txs_stream.lock().await; + + while let Ok(tx) = prepared_stream.try_recv() { + pending_txs.push(reth_rpc_types_compat::transaction::from_recovered( + tx.transaction.to_recovered_transaction(), + )) + } + FilterChanges::Transactions(pending_txs) + } +} + +/// Helper trait for [FullTransactionsReceiver] to erase the `Transaction` type. +#[async_trait] +trait FullTransactionsFilter: fmt::Debug + Send + Sync + Unpin + 'static { + async fn drain(&self) -> FilterChanges; +} + +#[async_trait] +impl FullTransactionsFilter for FullTransactionsReceiver +where + T: PoolTransaction + 'static, +{ + async fn drain(&self) -> FilterChanges { + FullTransactionsReceiver::drain(self).await + } +} + +/// Represents the kind of pending transaction data that can be retrieved. +/// +/// This enum differentiates between two kinds of pending transaction data: +/// - Just the transaction hashes. +/// - Full transaction details. +#[derive(Debug, Clone)] +enum PendingTransactionKind { + Hashes(PendingTransactionsReceiver), + FullTransaction(Arc), +} + +impl PendingTransactionKind { + async fn drain(&self) -> FilterChanges { + match self { + PendingTransactionKind::Hashes(receiver) => receiver.drain().await, + PendingTransactionKind::FullTransaction(receiver) => receiver.drain().await, + } } } @@ -505,15 +650,16 @@ impl PendingTransactionsReceiver { enum FilterKind { Log(Box), Block, - PendingTransaction(PendingTransactionsReceiver), + PendingTransaction(PendingTransactionKind), } - /// Errors that can occur in the handler implementation #[derive(Debug, thiserror::Error)] pub enum FilterError { #[error("filter not found")] FilterNotFound(FilterId), - #[error("Query exceeds max results {0}")] + #[error("query exceeds max block range {0}")] + QueryExceedsMaxBlocks(u64), + #[error("query exceeds max results {0}")] QueryExceedsMaxResults(usize), #[error(transparent)] EthAPIError(#[from] EthApiError), @@ -534,6 +680,9 @@ impl From for jsonrpsee::types::error::ErrorObject<'static> { rpc_error_with_code(jsonrpsee::types::error::INTERNAL_ERROR_CODE, err.to_string()) } FilterError::EthAPIError(err) => err.into(), + err @ FilterError::QueryExceedsMaxBlocks(_) => { + rpc_error_with_code(jsonrpsee::types::error::INVALID_PARAMS_CODE, err.to_string()) + } err @ FilterError::QueryExceedsMaxResults(_) => { rpc_error_with_code(jsonrpsee::types::error::INVALID_PARAMS_CODE, err.to_string()) } diff --git a/crates/rpc/rpc/src/eth/gas_oracle.rs b/crates/rpc/rpc/src/eth/gas_oracle.rs index 1fbd1874120c..f3afc3ff7be3 100644 --- a/crates/rpc/rpc/src/eth/gas_oracle.rs +++ b/crates/rpc/rpc/src/eth/gas_oracle.rs @@ -237,7 +237,7 @@ where let parent_hash = block.parent_hash; // sort the functions by ascending effective tip first - block.body.sort_by_cached_key(|tx| tx.effective_gas_tip(base_fee_per_gas)); + block.body.sort_by_cached_key(|tx| tx.effective_tip_per_gas(base_fee_per_gas)); let mut prices = Vec::with_capacity(limit); @@ -245,7 +245,7 @@ where let mut effective_gas_tip = None; // ignore transactions with a tip under the configured threshold if let Some(ignore_under) = self.ignore_price { - let tip = tx.effective_gas_tip(base_fee_per_gas); + let tip = tx.effective_tip_per_gas(base_fee_per_gas); effective_gas_tip = Some(tip); if tip < Some(ignore_under) { continue @@ -262,7 +262,7 @@ where // a `None` effective_gas_tip represents a transaction where the max_fee_per_gas is // less than the base fee which would be invalid let effective_gas_tip = effective_gas_tip - .unwrap_or_else(|| tx.effective_gas_tip(base_fee_per_gas)) + .unwrap_or_else(|| tx.effective_tip_per_gas(base_fee_per_gas)) .ok_or(RpcInvalidTransactionError::FeeCapTooLow)?; prices.push(U256::from(effective_gas_tip)); diff --git a/crates/rpc/rpc/src/eth/logs_utils.rs b/crates/rpc/rpc/src/eth/logs_utils.rs index 60906577643b..2fdd711356d4 100644 --- a/crates/rpc/rpc/src/eth/logs_utils.rs +++ b/crates/rpc/rpc/src/eth/logs_utils.rs @@ -1,5 +1,6 @@ use reth_primitives::{BlockNumHash, ChainInfo, Receipt, TxHash, U256}; use reth_rpc_types::{FilteredParams, Log}; +use reth_rpc_types_compat::log::from_primitive_log; /// Returns all matching logs of a block's receipts grouped with the hash of their transaction. pub(crate) fn matching_block_logs( @@ -60,8 +61,8 @@ pub(crate) fn log_matches_filter( if params.filter.is_some() && (!params.filter_block_range(block.number) || !params.filter_block_hash(block.hash) || - !params.filter_address(log) || - !params.filter_topics(log)) + !params.filter_address(&from_primitive_log(log.clone())) || + !params.filter_topics(&from_primitive_log(log.clone()))) { return false } @@ -97,7 +98,7 @@ pub(crate) fn get_filter_block_range( #[cfg(test)] mod tests { use super::*; - use reth_primitives::BlockNumberOrTag; + use reth_rpc_types::Filter; #[test] @@ -159,8 +160,8 @@ mod tests { let start_block = info.best_number; let (from_block_number, to_block_number) = get_filter_block_range( - from_block.and_then(BlockNumberOrTag::as_number), - to_block.and_then(BlockNumberOrTag::as_number), + from_block.and_then(reth_rpc_types::BlockNumberOrTag::as_number), + to_block.and_then(reth_rpc_types::BlockNumberOrTag::as_number), start_block, info, ); diff --git a/crates/rpc/rpc/src/eth/mod.rs b/crates/rpc/rpc/src/eth/mod.rs index 82eb104d7c1c..30c4b39f68e0 100644 --- a/crates/rpc/rpc/src/eth/mod.rs +++ b/crates/rpc/rpc/src/eth/mod.rs @@ -18,6 +18,6 @@ pub use api::{ FeeHistoryCacheConfig, TransactionSource, RPC_DEFAULT_GAS_CAP, }; pub use bundle::EthBundle; -pub use filter::EthFilter; +pub use filter::{EthFilter, EthFilterConfig}; pub use id_provider::EthSubscriptionIdProvider; pub use pubsub::EthPubSub; diff --git a/crates/rpc/rpc/src/eth/pubsub.rs b/crates/rpc/rpc/src/eth/pubsub.rs index 3f3c671e71a4..b720ebec1647 100644 --- a/crates/rpc/rpc/src/eth/pubsub.rs +++ b/crates/rpc/rpc/src/eth/pubsub.rs @@ -294,7 +294,9 @@ where .committed() .map(|chain| chain.headers().collect::>()) .unwrap_or_default(); - futures::stream::iter(headers.into_iter().map(Header::from_primitive_with_hash)) + futures::stream::iter( + headers.into_iter().map(reth_rpc_types_compat::block::from_primitive_with_hash), + ) }) } diff --git a/crates/rpc/rpc/src/eth/revm_utils.rs b/crates/rpc/rpc/src/eth/revm_utils.rs index 4b1911599b3c..8e8bac970c8f 100644 --- a/crates/rpc/rpc/src/eth/revm_utils.rs +++ b/crates/rpc/rpc/src/eth/revm_utils.rs @@ -3,7 +3,7 @@ use crate::eth::error::{EthApiError, EthResult, RpcInvalidTransactionError}; use reth_primitives::{ revm::env::{fill_tx_env, fill_tx_env_with_recovered}, - AccessList, Address, TransactionSigned, TransactionSignedEcRecovered, TxHash, B256, U256, + Address, TransactionSigned, TransactionSignedEcRecovered, TxHash, B256, U256, }; use reth_rpc_types::{ state::{AccountOverride, StateOverride}, @@ -309,7 +309,9 @@ pub(crate) fn create_txn_env(block_env: &BlockEnv, request: CallRequest) -> EthR value: value.unwrap_or_default(), data: input.try_into_unique_input()?.unwrap_or_default(), chain_id: chain_id.map(|c| c.to()), - access_list: access_list.map(AccessList::into_flattened).unwrap_or_default(), + access_list: access_list + .map(reth_rpc_types::AccessList::into_flattened) + .unwrap_or_default(), // EIP-4844 fields blob_hashes: blob_versioned_hashes.unwrap_or_default(), max_fee_per_blob_gas, diff --git a/crates/rpc/rpc/src/eth/signer.rs b/crates/rpc/rpc/src/eth/signer.rs index a271c9ca52f7..e3c911aa7a14 100644 --- a/crates/rpc/rpc/src/eth/signer.rs +++ b/crates/rpc/rpc/src/eth/signer.rs @@ -7,6 +7,7 @@ use reth_primitives::{ }; use reth_rpc_types::TypedTransactionRequest; +use reth_rpc_types_compat::transaction::to_primitive_transaction; use secp256k1::SecretKey; use std::collections::HashMap; @@ -78,7 +79,8 @@ impl EthSigner for DevSigner { address: &Address, ) -> Result { // convert to primitive transaction - let transaction = request.into_transaction().ok_or(SignError::InvalidTransactionRequest)?; + let transaction = + to_primitive_transaction(request).ok_or(SignError::InvalidTransactionRequest)?; let tx_signature_hash = transaction.signature_hash(); let signature = self.sign_hash(tx_signature_hash, *address)?; diff --git a/crates/rpc/rpc/src/layers/auth_layer.rs b/crates/rpc/rpc/src/layers/auth_layer.rs index 838fb678dd7b..0a3a529d19f2 100644 --- a/crates/rpc/rpc/src/layers/auth_layer.rs +++ b/crates/rpc/rpc/src/layers/auth_layer.rs @@ -233,7 +233,7 @@ mod tests { let jwt = "this jwt has serious encoding problems".to_string(); let (status, body) = send_request(Some(jwt)).await; assert_eq!(status, StatusCode::UNAUTHORIZED); - assert_eq!(body, "JWT decoding error Error(InvalidToken)".to_string()); + assert_eq!(body, "JWT decoding error: Error(InvalidToken)".to_string()); } async fn send_request(jwt: Option) -> (StatusCode, String) { diff --git a/crates/rpc/rpc/src/layers/jwt_secret.rs b/crates/rpc/rpc/src/layers/jwt_secret.rs index f0c0df0bae27..61bb3149f10b 100644 --- a/crates/rpc/rpc/src/layers/jwt_secret.rs +++ b/crates/rpc/rpc/src/layers/jwt_secret.rs @@ -8,6 +8,7 @@ use reth_primitives::{ use serde::{Deserialize, Serialize}; use std::{ path::Path, + str::FromStr, time::{Duration, SystemTime, UNIX_EPOCH}, }; use thiserror::Error; @@ -20,19 +21,19 @@ pub enum JwtError { JwtSecretHexDecodeError(#[from] hex::FromHexError), #[error("JWT key is expected to have a length of {0} digits. {1} digits key provided")] InvalidLength(usize, usize), - #[error("Unsupported signature algorithm. Only HS256 is supported")] + #[error("unsupported signature algorithm. Only HS256 is supported")] UnsupportedSignatureAlgorithm, - #[error("The provided signature is invalid")] + #[error("provided signature is invalid")] InvalidSignature, - #[error("The iat (issued-at) claim is not within +-60 seconds from the current time")] + #[error("IAT (issued-at) claim is not within ±60 seconds from the current time")] InvalidIssuanceTimestamp, #[error("Authorization header is missing or invalid")] MissingOrInvalidAuthorizationHeader, - #[error("JWT decoding error {0}")] + #[error("JWT decoding error: {0}")] JwtDecodingError(String), #[error(transparent)] JwtFsPathError(#[from] FsPathError), - #[error("An I/O error occurred: {0}")] + #[error(transparent)] IOError(#[from] std::io::Error), } @@ -101,15 +102,7 @@ impl JwtSecret { fs::write(fpath, hex)?; Ok(secret) } -} - -impl std::fmt::Debug for JwtSecret { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - f.debug_tuple("JwtSecretHash").field(&"{{}}").finish() - } -} -impl JwtSecret { /// Validates a JWT token along the following rules: /// - The JWT signature is valid. /// - The JWT is signed with the `HMAC + SHA256 (HS256)` algorithm. @@ -169,6 +162,20 @@ impl JwtSecret { } } +impl std::fmt::Debug for JwtSecret { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_tuple("JwtSecretHash").field(&"{{}}").finish() + } +} + +impl FromStr for JwtSecret { + type Err = JwtError; + + fn from_str(s: &str) -> Result { + JwtSecret::from_hex(s) + } +} + /// Claims in JWT are used to represent a set of information about an entity. /// Claims are essentially key-value pairs that are encoded as JSON objects and included in the /// payload of a JWT. They are used to transmit information such as the identity of the entity, the diff --git a/crates/rpc/rpc/src/trace.rs b/crates/rpc/rpc/src/trace.rs index f562b45556dc..d81c6430316e 100644 --- a/crates/rpc/rpc/src/trace.rs +++ b/crates/rpc/rpc/src/trace.rs @@ -20,8 +20,9 @@ use reth_revm::{ }; use reth_rpc_api::TraceApiServer; use reth_rpc_types::{ - trace::{filter::TraceFilter, parity::*, tracerequest::TraceRequest}, - BlockError, CallRequest, Index, + state::StateOverride, + trace::{filter::TraceFilter, parity::*, tracerequest::TraceCallRequest}, + BlockError, BlockOverrides, CallRequest, Index, }; use revm::{db::CacheDB, primitives::Env}; use revm_primitives::db::DatabaseCommit; @@ -65,7 +66,7 @@ where Eth: EthTransactions + 'static, { /// Executes the given call and returns a number of possible traces for it. - pub async fn trace_call(&self, trace_request: TraceRequest) -> EthResult { + pub async fn trace_call(&self, trace_request: TraceCallRequest) -> EthResult { let at = trace_request.block_id.unwrap_or(BlockId::Number(BlockNumberOrTag::Latest)); let config = tracing_config(&trace_request.trace_types); let overrides = @@ -433,9 +434,18 @@ where /// Executes the given call and returns a number of possible traces for it. /// /// Handler for `trace_call` - async fn trace_call(&self, trace_request: TraceRequest) -> Result { + async fn trace_call( + &self, + call: CallRequest, + trace_types: HashSet, + block_id: Option, + state_overrides: Option, + block_overrides: Option>, + ) -> Result { let _permit = self.acquire_trace_permit().await; - Ok(TraceApi::trace_call(self, trace_request).await?) + let request = + TraceCallRequest { call, trace_types, block_id, state_overrides, block_overrides }; + Ok(TraceApi::trace_call(self, request).await?) } /// Handler for `trace_callMany` @@ -546,7 +556,9 @@ struct TraceApiInner { #[inline] fn tracing_config(trace_types: &HashSet) -> TracingInspectorConfig { let needs_vm_trace = trace_types.contains(&TraceType::VmTrace); - TracingInspectorConfig::default_parity().set_steps(needs_vm_trace) + TracingInspectorConfig::default_parity() + .set_steps(needs_vm_trace) + .set_memory_snapshots(needs_vm_trace) } /// Helper to construct a [`LocalizedTransactionTrace`] that describes a reward to the block diff --git a/crates/snapshot/README.md b/crates/snapshot/README.md new file mode 100644 index 000000000000..6056bbf9f0a0 --- /dev/null +++ b/crates/snapshot/README.md @@ -0,0 +1,88 @@ +# Snapshot + +## Overview + +Data that has reached a finalized state and won't undergo further changes (essentially frozen) should be read without concerns of modification. This makes it unsuitable for traditional databases. + +This crate aims to copy this data from the current database to multiple static files, aggregated by block ranges. At every 500_000th block new static files are created. + +Below are two diagrams illustrating the processes of creating static files (custom format: `NippyJar`) and querying them. A glossary is also provided to explain the different (linked) components involved in these processes. + +
+ Creation diagram (Snapshotter) + +```mermaid +graph TD; + I("BLOCK_HEIGHT % 500_000 == 0")--triggers-->SP(Snapshotter) + SP --> |triggers| SH["create_snapshot(block_range, SnapshotSegment::Headers)"] + SP --> |triggers| ST["create_snapshot(block_range, SnapshotSegment::Transactions)"] + SP --> |triggers| SR["create_snapshot(block_range, SnapshotSegment::Receipts)"] + SP --> |triggers| ETC["create_snapshot(block_range, ...)"] + SH --> CS["create_snapshot::< T >(DatabaseCursor)"] + ST --> CS + SR --> CS + ETC --> CS + CS --> |create| IF(NippyJar::InclusionFilters) + CS -- iterates --> DC(DatabaseCursor) -->HN{HasNext} + HN --> |true| NJC(NippyJar::Compression) + NJC --> HN + NJC --store--> NJ + HN --> |false| NJ + IF --store--> NJ(NippyJar) + NJ --freeze--> F(File) + F--"on success"--> SP1(Snapshotter) + SP1 --"sends BLOCK_HEIGHT"--> HST(HighestSnapshotTracker) + HST --"read by"-->Pruner + HST --"read by"-->DatabaseProvider + HST --"read by"-->SnapsotProvider + HST --"read by"-->ProviderFactory + +``` +
+ + +
+ Query diagram (Provider) + +```mermaid +graph TD; + RPC-->P + P("Provider::header(block_number)")-->PF(ProviderFactory) + PF--shares-->SP1("Arc(SnapshotProvider)") + SP1--shares-->PD(DatabaseProvider) + PF--creates-->PD + PD--check `HighestSnapshotTracker`-->PD + PD-->DC1{block_number
>
highest snapshot block} + DC1 --> |true| PD1("DatabaseProvider::header(block_number)") + DC1 --> |false| ASP("SnapshotProvider::header(block_number)") + PD1 --> MDBX + ASP --find correct jar and creates--> JP("SnapshotJarProvider::header(block_number)") + JP --"creates"-->SC(SnapshotCursor) + SC --".get_one< HeaderMask< Header > >(number)"--->NJC("NippyJarCursor") + NJC--".row_by_number(row_index, mask)"-->NJ[NippyJar] + NJ--"&[u8]"-->NJC + NJC--"&[u8]"-->SC + SC--"Header"--> JP + JP--"Header"--> ASP +``` +
+ + +### Glossary +In descending order of abstraction hierarchy: + +[`Snapshotter`](../../crates/snapshot/src/snapshotter.rs#L20): A `reth` background service that **copies** data from the database to new snapshot files when the block height reaches a certain threshold (e.g., `500_000th`). Upon completion, it dispatches a notification about the higher snapshotted block to `HighestSnapshotTracker` channel. **It DOES NOT remove data from the database.** + +[`HighestSnapshotTracker`](../../crates/snapshot/src/snapshotter.rs#L22): A channel utilized by `Snapshotter` to announce the newest snapshot block to all components with a listener: `Pruner` (to know which additional tables can be pruned) and `DatabaseProvider` (to know which data can be queried from the snapshots). + +[`SnapshotProvider`](../../crates/storage/provider/src/providers/snapshot/manager.rs#L15) A provider similar to `DatabaseProvider`, **managing all existing snapshot files** and selecting the optimal one (by range and segment type) to fulfill a request. **A single instance is shared across all components and should be instantiated only once within `ProviderFactory`**. An immutable reference is given everytime `ProviderFactory` creates a new `DatabaseProvider`. + +[`SnapshotJarProvider`](../../crates/storage/provider/src/providers/snapshot/jar.rs#L42) A provider similar to `DatabaseProvider` that provides access to a **single snapshot file**. + +[`SnapshotCursor`](../../crates/storage/db/src/snapshot/cursor.rs#L12) An elevated abstraction of `NippyJarCursor` for simplified access. It associates the bitmasks with type decoding. For instance, `cursor.get_two::>(tx_number)` would yield `Tx` and `Signature`, eliminating the need to manage masks or invoke a decoder/decompressor. + +[`SnapshotSegment`](../../crates/primitives/src/snapshot/segment.rs#L10) Each snapshot file only contains data of a specific segment, e.g., `Headers`, `Transactions`, or `Receipts`. + +[`NippyJarCursor`](../../crates/storage/nippy-jar/src/cursor.rs#L12) Accessor of data in a `NippyJar` file. It enables queries either by row number (e.g., block number 1) or by a predefined key not part of the file (e.g., transaction hashes). If a file has multiple columns (e.g., `Tx | TxSender | Signature`), and one wishes to access only one of the column values, this can be accomplished by bitmasks. (e.g., for `TxSender`, the mask would be `0b010`). + +[`NippyJar`](../../crates/storage/nippy-jar/src/lib.rs#57) A create-only file format. No data can be appended after creation. It supports multiple columns, compression (e.g., Zstd (with and without dictionaries), lz4, uncompressed) and inclusion filters (e.g., cuckoo filter: `is hash X part of this dataset`). Snapshots are organized by block ranges. (e.g., `TransactionSnapshot_499_999.jar` contains a transaction per row for all transactions from block `0` to block `499_999`). For more check the struct documentation. diff --git a/crates/snapshot/src/error.rs b/crates/snapshot/src/error.rs index 4bdea3e8fc02..20da642bee89 100644 --- a/crates/snapshot/src/error.rs +++ b/crates/snapshot/src/error.rs @@ -7,10 +7,10 @@ use thiserror::Error; #[derive(Error, Debug)] #[allow(missing_docs)] pub enum SnapshotterError { - #[error("Inconsistent data: {0}")] + #[error("inconsistent data: {0}")] InconsistentData(&'static str), - #[error("An interface error occurred.")] + #[error(transparent)] Interface(#[from] RethError), #[error(transparent)] diff --git a/crates/snapshot/src/segments/headers.rs b/crates/snapshot/src/segments/headers.rs index 2de938b1110f..4cc3ced20470 100644 --- a/crates/snapshot/src/segments/headers.rs +++ b/crates/snapshot/src/segments/headers.rs @@ -1,6 +1,6 @@ -use crate::segments::{prepare_jar, Segment}; +use crate::segments::{prepare_jar, Segment, SegmentHeader}; use reth_db::{ - cursor::DbCursorRO, snapshot::create_snapshot_T1_T2_T3, table::Table, tables, + cursor::DbCursorRO, database::Database, snapshot::create_snapshot_T1_T2_T3, tables, transaction::DbTx, RawKey, RawTable, }; use reth_interfaces::RethResult; @@ -8,6 +8,7 @@ use reth_primitives::{ snapshot::{Compression, Filters}, BlockNumber, SnapshotSegment, }; +use reth_provider::DatabaseProviderRO; use std::ops::RangeInclusive; /// Snapshot segment responsible for [SnapshotSegment::Headers] part of data. @@ -22,28 +23,17 @@ impl Headers { pub fn new(compression: Compression, filters: Filters) -> Self { Self { compression, filters } } - - // Generates the dataset to train a zstd dictionary with the most recent rows (at most 1000). - fn dataset_for_compression>( - &self, - tx: &impl DbTx, - range: &RangeInclusive, - range_len: usize, - ) -> RethResult>> { - let mut cursor = tx.cursor_read::>()?; - Ok(cursor - .walk_back(Some(RawKey::from(*range.end())))? - .take(range_len.min(1000)) - .map(|row| row.map(|(_key, value)| value.into_value()).expect("should exist")) - .collect::>()) - } } impl Segment for Headers { - fn snapshot(&self, tx: &impl DbTx, range: RangeInclusive) -> RethResult<()> { + fn snapshot( + &self, + provider: &DatabaseProviderRO<'_, DB>, + range: RangeInclusive, + ) -> RethResult<()> { let range_len = range.clone().count(); - let mut jar = prepare_jar::<3, tables::Headers>( - tx, + let mut jar = prepare_jar::( + provider, SnapshotSegment::Headers, self.filters, self.compression, @@ -51,17 +41,21 @@ impl Segment for Headers { range_len, || { Ok([ - self.dataset_for_compression::(tx, &range, range_len)?, - self.dataset_for_compression::(tx, &range, range_len)?, - self.dataset_for_compression::( - tx, &range, range_len, + self.dataset_for_compression::( + provider, &range, range_len, + )?, + self.dataset_for_compression::( + provider, &range, range_len, + )?, + self.dataset_for_compression::( + provider, &range, range_len, )?, ]) }, )?; // Generate list of hashes for filters & PHF - let mut cursor = tx.cursor_read::>()?; + let mut cursor = provider.tx_ref().cursor_read::>()?; let mut hashes = None; if self.filters.has_filters() { hashes = Some( @@ -77,8 +71,9 @@ impl Segment for Headers { tables::HeaderTD, tables::CanonicalHeaders, BlockNumber, + SegmentHeader, >( - tx, + provider.tx_ref(), range, None, // We already prepared the dictionary beforehand diff --git a/crates/snapshot/src/segments/mod.rs b/crates/snapshot/src/segments/mod.rs index 1d9ee6a3a2fa..9a8bb462789f 100644 --- a/crates/snapshot/src/segments/mod.rs +++ b/crates/snapshot/src/segments/mod.rs @@ -1,39 +1,68 @@ //! Snapshot segment implementations and utilities. -mod headers; +mod transactions; +pub use transactions::Transactions; +mod headers; pub use headers::Headers; -use reth_db::{table::Table, transaction::DbTx}; +mod receipts; +pub use receipts::Receipts; + +use reth_db::{ + cursor::DbCursorRO, database::Database, table::Table, transaction::DbTx, RawKey, RawTable, +}; use reth_interfaces::RethResult; use reth_nippy_jar::NippyJar; use reth_primitives::{ - snapshot::{Compression, Filters, InclusionFilter, PerfectHashingFunction}, + snapshot::{Compression, Filters, InclusionFilter, PerfectHashingFunction, SegmentHeader}, BlockNumber, SnapshotSegment, }; -use std::{ops::RangeInclusive, path::PathBuf}; +use reth_provider::{DatabaseProviderRO, TransactionsProviderExt}; +use std::ops::RangeInclusive; pub(crate) type Rows = [Vec>; COLUMNS]; /// A segment represents a snapshotting of some portion of the data. pub trait Segment { /// Snapshot data using the provided range. - fn snapshot(&self, tx: &impl DbTx, range: RangeInclusive) -> RethResult<()>; + fn snapshot( + &self, + provider: &DatabaseProviderRO<'_, DB>, + range: RangeInclusive, + ) -> RethResult<()>; + + /// Generates the dataset to train a zstd dictionary with the most recent rows (at most 1000). + fn dataset_for_compression>( + &self, + provider: &DatabaseProviderRO<'_, DB>, + range: &RangeInclusive, + range_len: usize, + ) -> RethResult>> { + let mut cursor = provider.tx_ref().cursor_read::>()?; + Ok(cursor + .walk_back(Some(RawKey::from(*range.end())))? + .take(range_len.min(1000)) + .map(|row| row.map(|(_key, value)| value.into_value()).expect("should exist")) + .collect::>()) + } } /// Returns a [`NippyJar`] according to the desired configuration. -pub(crate) fn prepare_jar( - tx: &impl DbTx, +pub(crate) fn prepare_jar( + provider: &DatabaseProviderRO<'_, DB>, segment: SnapshotSegment, filters: Filters, compression: Compression, - range: RangeInclusive, - range_len: usize, + block_range: RangeInclusive, + total_rows: usize, prepare_compression: impl Fn() -> RethResult>, -) -> RethResult { - let mut nippy_jar = NippyJar::new_without_header( +) -> RethResult> { + let tx_range = provider.transaction_range_by_block_range(block_range.clone())?; + let mut nippy_jar = NippyJar::new( COLUMNS, - &get_snapshot_segment_file_name(segment, filters, compression, &range), + &segment.filename_with_configuration(filters, compression, &block_range), + SegmentHeader::new(block_range, tx_range, segment), ); nippy_jar = match compression { @@ -50,7 +79,6 @@ pub(crate) fn prepare_jar( }; if let Filters::WithFilters(inclusion_filter, phf) = filters { - let total_rows = (tx.entries::()? - *range.start() as usize).min(range_len); nippy_jar = match inclusion_filter { InclusionFilter::Cuckoo => nippy_jar.with_cuckoo_filter(total_rows), }; @@ -62,43 +90,3 @@ pub(crate) fn prepare_jar( Ok(nippy_jar) } - -/// Returns file name for the provided segment, filters, compression and range. -pub fn get_snapshot_segment_file_name( - segment: SnapshotSegment, - filters: Filters, - compression: Compression, - range: &RangeInclusive, -) -> PathBuf { - let segment_name = match segment { - SnapshotSegment::Headers => "headers", - SnapshotSegment::Transactions => "transactions", - SnapshotSegment::Receipts => "receipts", - }; - let filters_name = match filters { - Filters::WithFilters(inclusion_filter, phf) => { - let inclusion_filter = match inclusion_filter { - InclusionFilter::Cuckoo => "cuckoo", - }; - let phf = match phf { - PerfectHashingFunction::Fmph => "fmph", - PerfectHashingFunction::GoFmph => "gofmph", - }; - format!("{inclusion_filter}-{phf}") - } - Filters::WithoutFilters => "none".to_string(), - }; - let compression_name = match compression { - Compression::Lz4 => "lz4", - Compression::Zstd => "zstd", - Compression::ZstdWithDictionary => "zstd-dict", - Compression::Uncompressed => "uncompressed", - }; - - format!( - "snapshot_{segment_name}_{}_{}_{filters_name}_{compression_name}", - range.start(), - range.end(), - ) - .into() -} diff --git a/crates/snapshot/src/segments/receipts.rs b/crates/snapshot/src/segments/receipts.rs new file mode 100644 index 000000000000..4fb2e399d115 --- /dev/null +++ b/crates/snapshot/src/segments/receipts.rs @@ -0,0 +1,74 @@ +use crate::segments::{prepare_jar, Segment}; +use reth_db::{database::Database, snapshot::create_snapshot_T1, tables}; +use reth_interfaces::RethResult; +use reth_primitives::{ + snapshot::{Compression, Filters, SegmentHeader}, + BlockNumber, SnapshotSegment, TxNumber, +}; +use reth_provider::{DatabaseProviderRO, TransactionsProviderExt}; +use std::ops::RangeInclusive; + +/// Snapshot segment responsible for [SnapshotSegment::Receipts] part of data. +#[derive(Debug)] +pub struct Receipts { + compression: Compression, + filters: Filters, +} + +impl Receipts { + /// Creates new instance of [Receipts] snapshot segment. + pub fn new(compression: Compression, filters: Filters) -> Self { + Self { compression, filters } + } +} + +impl Segment for Receipts { + fn snapshot( + &self, + provider: &DatabaseProviderRO<'_, DB>, + block_range: RangeInclusive, + ) -> RethResult<()> { + let tx_range = provider.transaction_range_by_block_range(block_range.clone())?; + let tx_range_len = tx_range.clone().count(); + + let mut jar = prepare_jar::( + provider, + SnapshotSegment::Receipts, + self.filters, + self.compression, + block_range, + tx_range_len, + || { + Ok([self.dataset_for_compression::( + provider, + &tx_range, + tx_range_len, + )?]) + }, + )?; + + // Generate list of hashes for filters & PHF + let mut hashes = None; + if self.filters.has_filters() { + hashes = Some( + provider + .transaction_hashes_by_range(*tx_range.start()..(*tx_range.end() + 1))? + .into_iter() + .map(|(tx, _)| Ok(tx)), + ); + } + + create_snapshot_T1::( + provider.tx_ref(), + tx_range, + None, + // We already prepared the dictionary beforehand + None::>>>, + hashes, + tx_range_len, + &mut jar, + )?; + + Ok(()) + } +} diff --git a/crates/snapshot/src/segments/transactions.rs b/crates/snapshot/src/segments/transactions.rs new file mode 100644 index 000000000000..09d120c09db4 --- /dev/null +++ b/crates/snapshot/src/segments/transactions.rs @@ -0,0 +1,74 @@ +use crate::segments::{prepare_jar, Segment}; +use reth_db::{database::Database, snapshot::create_snapshot_T1, tables}; +use reth_interfaces::RethResult; +use reth_primitives::{ + snapshot::{Compression, Filters, SegmentHeader}, + BlockNumber, SnapshotSegment, TxNumber, +}; +use reth_provider::{DatabaseProviderRO, TransactionsProviderExt}; +use std::ops::RangeInclusive; + +/// Snapshot segment responsible for [SnapshotSegment::Transactions] part of data. +#[derive(Debug)] +pub struct Transactions { + compression: Compression, + filters: Filters, +} + +impl Transactions { + /// Creates new instance of [Transactions] snapshot segment. + pub fn new(compression: Compression, filters: Filters) -> Self { + Self { compression, filters } + } +} + +impl Segment for Transactions { + fn snapshot( + &self, + provider: &DatabaseProviderRO<'_, DB>, + block_range: RangeInclusive, + ) -> RethResult<()> { + let tx_range = provider.transaction_range_by_block_range(block_range.clone())?; + let tx_range_len = tx_range.clone().count(); + + let mut jar = prepare_jar::( + provider, + SnapshotSegment::Transactions, + self.filters, + self.compression, + block_range, + tx_range_len, + || { + Ok([self.dataset_for_compression::( + provider, + &tx_range, + tx_range_len, + )?]) + }, + )?; + + // Generate list of hashes for filters & PHF + let mut hashes = None; + if self.filters.has_filters() { + hashes = Some( + provider + .transaction_hashes_by_range(*tx_range.start()..(*tx_range.end() + 1))? + .into_iter() + .map(|(tx, _)| Ok(tx)), + ); + } + + create_snapshot_T1::( + provider.tx_ref(), + tx_range, + None, + // We already prepared the dictionary beforehand + None::>>>, + hashes, + tx_range_len, + &mut jar, + )?; + + Ok(()) + } +} diff --git a/crates/stages/Cargo.toml b/crates/stages/Cargo.toml index 25018ff8eefe..6a7a54261306 100644 --- a/crates/stages/Cargo.toml +++ b/crates/stages/Cargo.toml @@ -53,7 +53,7 @@ num-traits = "0.2.15" [dev-dependencies] # reth -reth-primitives = { workspace = true, features = ["arbitrary"] } +reth-primitives = { workspace = true, features = ["test-utils", "arbitrary"] } reth-db = { workspace = true, features = ["test-utils", "mdbx"] } reth-interfaces = { workspace = true, features = ["test-utils"] } reth-downloaders = { path = "../net/downloaders" } diff --git a/crates/stages/benches/criterion.rs b/crates/stages/benches/criterion.rs index 449256106e7c..9e55781b7e74 100644 --- a/crates/stages/benches/criterion.rs +++ b/crates/stages/benches/criterion.rs @@ -136,7 +136,7 @@ fn measure_stage_with_path( }, |_| async { let mut stage = stage.clone(); - let factory = ProviderFactory::new(tx.tx.as_ref(), MAINNET.clone()); + let factory = ProviderFactory::new(tx.tx.db(), MAINNET.clone()); let provider = factory.provider_rw().unwrap(); stage.execute(&provider, input).await.unwrap(); provider.commit().unwrap(); diff --git a/crates/stages/benches/setup/mod.rs b/crates/stages/benches/setup/mod.rs index 6bbd4746d0b8..f5c45be9b96e 100644 --- a/crates/stages/benches/setup/mod.rs +++ b/crates/stages/benches/setup/mod.rs @@ -41,7 +41,7 @@ pub(crate) fn stage_unwind>( tokio::runtime::Runtime::new().unwrap().block_on(async { let mut stage = stage.clone(); - let factory = ProviderFactory::new(tx.tx.as_ref(), MAINNET.clone()); + let factory = ProviderFactory::new(tx.tx.db(), MAINNET.clone()); let provider = factory.provider_rw().unwrap(); // Clear previous run @@ -69,7 +69,7 @@ pub(crate) fn unwind_hashes>( tokio::runtime::Runtime::new().unwrap().block_on(async { let mut stage = stage.clone(); - let factory = ProviderFactory::new(tx.tx.as_ref(), MAINNET.clone()); + let factory = ProviderFactory::new(tx.tx.db(), MAINNET.clone()); let provider = factory.provider_rw().unwrap(); StorageHashingStage::default().unwind(&provider, unwind).await.unwrap(); diff --git a/crates/stages/src/error.rs b/crates/stages/src/error.rs index 9bc50e5c4b9d..b44a8a14f865 100644 --- a/crates/stages/src/error.rs +++ b/crates/stages/src/error.rs @@ -11,18 +11,18 @@ use tokio::sync::mpsc::error::SendError; #[derive(Error, Debug)] pub enum BlockErrorKind { /// The block encountered a validation error. - #[error("Validation error: {0}")] - Validation(#[source] consensus::ConsensusError), + #[error("validation error: {0}")] + Validation(#[from] consensus::ConsensusError), /// The block encountered an execution error. - #[error("Execution error: {0}")] - Execution(#[source] executor::BlockExecutionError), + #[error("execution error: {0}")] + Execution(#[from] executor::BlockExecutionError), } /// A stage execution error. #[derive(Error, Debug)] pub enum StageError { /// The stage encountered an error related to a block. - #[error("Stage encountered a block error in block {number}: {error}.", number = block.number)] + #[error("stage encountered an error in block #{number}: {error}", number = block.number)] Block { /// The block that caused the error. block: SealedHeader, @@ -33,7 +33,9 @@ pub enum StageError { /// The stage encountered a downloader error where the responses cannot be attached to the /// current head. #[error( - "Stage encountered inconsistent chain. Downloaded header #{header_number} ({header_hash:?}) is detached from local head #{head_number} ({head_hash:?}). Details: {error}.", + "stage encountered inconsistent chain: \ + downloaded header #{header_number} ({header_hash}) is detached from \ + local head #{head_number} ({head_hash}): {error}", header_number = header.number, header_hash = header.hash, head_number = local_head.number, @@ -45,26 +47,27 @@ pub enum StageError { /// The header we attempted to attach. header: SealedHeader, /// The error that occurred when attempting to attach the header. + #[source] error: Box, }, /// The stage encountered a database error. - #[error("An internal database error occurred: {0}")] + #[error("internal database error occurred: {0}")] Database(#[from] DbError), /// Invalid pruning configuration #[error(transparent)] PruningConfiguration(#[from] reth_primitives::PruneSegmentError), /// Invalid checkpoint passed to the stage - #[error("Invalid stage checkpoint: {0}")] + #[error("invalid stage checkpoint: {0}")] StageCheckpoint(u64), /// Download channel closed - #[error("Download channel closed")] + #[error("download channel closed")] ChannelClosed, /// The stage encountered a database integrity error. - #[error("A database integrity error occurred: {0}")] + #[error("database integrity error occurred: {0}")] DatabaseIntegrity(#[from] ProviderError), /// Invalid download response. Applicable for stages which /// rely on external downloaders - #[error("Invalid download response: {0}")] + #[error("invalid download response: {0}")] Download(#[from] DownloadError), /// Internal error #[error(transparent)] @@ -101,16 +104,16 @@ impl StageError { #[derive(Error, Debug)] pub enum PipelineError { /// The pipeline encountered an irrecoverable error in one of the stages. - #[error("A stage encountered an irrecoverable error.")] + #[error(transparent)] Stage(#[from] StageError), /// The pipeline encountered a database error. - #[error("A database error occurred.")] + #[error(transparent)] Database(#[from] DbError), /// The pipeline encountered an irrecoverable error in one of the stages. - #[error("An interface error occurred.")] + #[error(transparent)] Interface(#[from] RethError), /// The pipeline encountered an error while trying to send an event. - #[error("The pipeline encountered an error while trying to send an event.")] + #[error("pipeline encountered an error while trying to send an event")] Channel(#[from] SendError), /// The stage encountered an internal error. #[error(transparent)] diff --git a/crates/stages/src/pipeline/event.rs b/crates/stages/src/pipeline/event.rs index 2230c4075e04..05d7945d3319 100644 --- a/crates/stages/src/pipeline/event.rs +++ b/crates/stages/src/pipeline/event.rs @@ -1,5 +1,6 @@ use crate::stage::{ExecOutput, UnwindInput, UnwindOutput}; use reth_primitives::stage::{StageCheckpoint, StageId}; +use std::fmt::{Display, Formatter}; /// An event emitted by a [Pipeline][crate::Pipeline]. /// @@ -12,10 +13,8 @@ use reth_primitives::stage::{StageCheckpoint, StageId}; pub enum PipelineEvent { /// Emitted when a stage is about to be run. Running { - /// 1-indexed ID of the stage that is about to be run out of total stages in the pipeline. - pipeline_position: usize, - /// Total number of stages in the pipeline. - pipeline_total: usize, + /// Pipeline stages progress. + pipeline_stages_progress: PipelineStagesProgress, /// The stage that is about to be run. stage_id: StageId, /// The previous checkpoint of the stage. @@ -23,10 +22,8 @@ pub enum PipelineEvent { }, /// Emitted when a stage has run a single time. Ran { - /// 1-indexed ID of the stage that was run out of total stages in the pipeline. - pipeline_position: usize, - /// Total number of stages in the pipeline. - pipeline_total: usize, + /// Pipeline stages progress. + pipeline_stages_progress: PipelineStagesProgress, /// The stage that was run. stage_id: StageId, /// The result of executing the stage. @@ -61,3 +58,18 @@ pub enum PipelineEvent { stage_id: StageId, }, } + +/// Pipeline stages progress. +#[derive(Debug, PartialEq, Eq, Clone)] +pub struct PipelineStagesProgress { + /// 1-indexed ID of the stage that is about to be run out of total stages in the pipeline. + pub current: usize, + /// Total number of stages in the pipeline. + pub total: usize, +} + +impl Display for PipelineStagesProgress { + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { + write!(f, "{}/{}", self.current, self.total) + } +} diff --git a/crates/stages/src/pipeline/mod.rs b/crates/stages/src/pipeline/mod.rs index 2ff0b029ec3c..ccf7f08efbac 100644 --- a/crates/stages/src/pipeline/mod.rs +++ b/crates/stages/src/pipeline/mod.rs @@ -272,12 +272,23 @@ where let mut checkpoint = provider_rw.get_stage_checkpoint(stage_id)?.unwrap_or_default(); if checkpoint.block_number < to { - debug!(target: "sync::pipeline", from = %checkpoint, %to, "Unwind point too far for stage"); + debug!( + target: "sync::pipeline", + from = %checkpoint.block_number, + %to, + "Unwind point too far for stage" + ); self.listeners.notify(PipelineEvent::Skipped { stage_id }); continue } - debug!(target: "sync::pipeline", from = %checkpoint, %to, ?bad_block, "Starting unwind"); + debug!( + target: "sync::pipeline", + from = %checkpoint.block_number, + %to, + ?bad_block, + "Starting unwind" + ); while checkpoint.block_number > to { let input = UnwindInput { checkpoint, unwind_to: to, bad_block }; self.listeners.notify(PipelineEvent::Unwinding { stage_id, input }); @@ -360,8 +371,10 @@ where } self.listeners.notify(PipelineEvent::Running { - pipeline_position: stage_index + 1, - pipeline_total: total_stages, + pipeline_stages_progress: event::PipelineStagesProgress { + current: stage_index + 1, + total: total_stages, + }, stage_id, checkpoint: prev_checkpoint, }); @@ -373,14 +386,27 @@ where Ok(out @ ExecOutput { checkpoint, done }) => { made_progress |= checkpoint.block_number != prev_checkpoint.unwrap_or_default().block_number; - debug!( - target: "sync::pipeline", - stage = %stage_id, - progress = checkpoint.block_number, - %checkpoint, - %done, - "Stage committed progress" - ); + + if let Some(progress) = checkpoint.entities() { + debug!( + target: "sync::pipeline", + stage = %stage_id, + checkpoint = checkpoint.block_number, + ?target, + %progress, + %done, + "Stage committed progress" + ); + } else { + debug!( + target: "sync::pipeline", + stage = %stage_id, + checkpoint = checkpoint.block_number, + ?target, + %done, + "Stage committed progress" + ); + } if let Some(metrics_tx) = &mut self.metrics_tx { let _ = metrics_tx.send(MetricEvent::StageCheckpoint { stage_id, @@ -391,8 +417,10 @@ where provider_rw.save_stage_checkpoint(stage_id, checkpoint)?; self.listeners.notify(PipelineEvent::Ran { - pipeline_position: stage_index + 1, - pipeline_total: total_stages, + pipeline_stages_progress: event::PipelineStagesProgress { + current: stage_index + 1, + total: total_stages, + }, stage_id, result: out.clone(), }); @@ -579,26 +607,22 @@ mod tests { events.collect::>().await, vec![ PipelineEvent::Running { - pipeline_position: 1, - pipeline_total: 2, + pipeline_stages_progress: PipelineStagesProgress { current: 1, total: 2 }, stage_id: StageId::Other("A"), checkpoint: None }, PipelineEvent::Ran { - pipeline_position: 1, - pipeline_total: 2, + pipeline_stages_progress: PipelineStagesProgress { current: 1, total: 2 }, stage_id: StageId::Other("A"), result: ExecOutput { checkpoint: StageCheckpoint::new(20), done: true }, }, PipelineEvent::Running { - pipeline_position: 2, - pipeline_total: 2, + pipeline_stages_progress: PipelineStagesProgress { current: 2, total: 2 }, stage_id: StageId::Other("B"), checkpoint: None }, PipelineEvent::Ran { - pipeline_position: 2, - pipeline_total: 2, + pipeline_stages_progress: PipelineStagesProgress { current: 2, total: 2 }, stage_id: StageId::Other("B"), result: ExecOutput { checkpoint: StageCheckpoint::new(10), done: true }, }, @@ -646,38 +670,32 @@ mod tests { vec![ // Executing PipelineEvent::Running { - pipeline_position: 1, - pipeline_total: 3, + pipeline_stages_progress: PipelineStagesProgress { current: 1, total: 3 }, stage_id: StageId::Other("A"), checkpoint: None }, PipelineEvent::Ran { - pipeline_position: 1, - pipeline_total: 3, + pipeline_stages_progress: PipelineStagesProgress { current: 1, total: 3 }, stage_id: StageId::Other("A"), result: ExecOutput { checkpoint: StageCheckpoint::new(100), done: true }, }, PipelineEvent::Running { - pipeline_position: 2, - pipeline_total: 3, + pipeline_stages_progress: PipelineStagesProgress { current: 2, total: 3 }, stage_id: StageId::Other("B"), checkpoint: None }, PipelineEvent::Ran { - pipeline_position: 2, - pipeline_total: 3, + pipeline_stages_progress: PipelineStagesProgress { current: 2, total: 3 }, stage_id: StageId::Other("B"), result: ExecOutput { checkpoint: StageCheckpoint::new(10), done: true }, }, PipelineEvent::Running { - pipeline_position: 3, - pipeline_total: 3, + pipeline_stages_progress: PipelineStagesProgress { current: 3, total: 3 }, stage_id: StageId::Other("C"), checkpoint: None }, PipelineEvent::Ran { - pipeline_position: 3, - pipeline_total: 3, + pipeline_stages_progress: PipelineStagesProgress { current: 3, total: 3 }, stage_id: StageId::Other("C"), result: ExecOutput { checkpoint: StageCheckpoint::new(20), done: true }, }, @@ -756,26 +774,22 @@ mod tests { vec![ // Executing PipelineEvent::Running { - pipeline_position: 1, - pipeline_total: 2, + pipeline_stages_progress: PipelineStagesProgress { current: 1, total: 2 }, stage_id: StageId::Other("A"), checkpoint: None }, PipelineEvent::Ran { - pipeline_position: 1, - pipeline_total: 2, + pipeline_stages_progress: PipelineStagesProgress { current: 1, total: 2 }, stage_id: StageId::Other("A"), result: ExecOutput { checkpoint: StageCheckpoint::new(100), done: true }, }, PipelineEvent::Running { - pipeline_position: 2, - pipeline_total: 2, + pipeline_stages_progress: PipelineStagesProgress { current: 2, total: 2 }, stage_id: StageId::Other("B"), checkpoint: None }, PipelineEvent::Ran { - pipeline_position: 2, - pipeline_total: 2, + pipeline_stages_progress: PipelineStagesProgress { current: 2, total: 2 }, stage_id: StageId::Other("B"), result: ExecOutput { checkpoint: StageCheckpoint::new(10), done: true }, }, @@ -846,20 +860,17 @@ mod tests { events.collect::>().await, vec![ PipelineEvent::Running { - pipeline_position: 1, - pipeline_total: 2, + pipeline_stages_progress: PipelineStagesProgress { current: 1, total: 2 }, stage_id: StageId::Other("A"), checkpoint: None }, PipelineEvent::Ran { - pipeline_position: 1, - pipeline_total: 2, + pipeline_stages_progress: PipelineStagesProgress { current: 1, total: 2 }, stage_id: StageId::Other("A"), result: ExecOutput { checkpoint: StageCheckpoint::new(10), done: true }, }, PipelineEvent::Running { - pipeline_position: 2, - pipeline_total: 2, + pipeline_stages_progress: PipelineStagesProgress { current: 2, total: 2 }, stage_id: StageId::Other("B"), checkpoint: None }, @@ -877,26 +888,22 @@ mod tests { result: UnwindOutput { checkpoint: StageCheckpoint::new(0) }, }, PipelineEvent::Running { - pipeline_position: 1, - pipeline_total: 2, + pipeline_stages_progress: PipelineStagesProgress { current: 1, total: 2 }, stage_id: StageId::Other("A"), checkpoint: Some(StageCheckpoint::new(0)) }, PipelineEvent::Ran { - pipeline_position: 1, - pipeline_total: 2, + pipeline_stages_progress: PipelineStagesProgress { current: 1, total: 2 }, stage_id: StageId::Other("A"), result: ExecOutput { checkpoint: StageCheckpoint::new(10), done: true }, }, PipelineEvent::Running { - pipeline_position: 2, - pipeline_total: 2, + pipeline_stages_progress: PipelineStagesProgress { current: 2, total: 2 }, stage_id: StageId::Other("B"), checkpoint: None }, PipelineEvent::Ran { - pipeline_position: 2, - pipeline_total: 2, + pipeline_stages_progress: PipelineStagesProgress { current: 2, total: 2 }, stage_id: StageId::Other("B"), result: ExecOutput { checkpoint: StageCheckpoint::new(10), done: true }, }, diff --git a/crates/stages/src/stages/bodies.rs b/crates/stages/src/stages/bodies.rs index 9991ae9deb0d..8da7e6511ed3 100644 --- a/crates/stages/src/stages/bodies.rs +++ b/crates/stages/src/stages/bodies.rs @@ -458,6 +458,7 @@ mod tests { database::Database, models::{StoredBlockBodyIndices, StoredBlockOmmers}, tables, + test_utils::TempDatabase, transaction::{DbTx, DbTxMut}, DatabaseEnv, }; @@ -740,7 +741,7 @@ mod tests { /// A [BodyDownloader] that is backed by an internal [HashMap] for testing. #[derive(Debug)] pub(crate) struct TestBodyDownloader { - db: Arc, + db: Arc>, responses: HashMap, headers: VecDeque, batch_size: u64, @@ -748,7 +749,7 @@ mod tests { impl TestBodyDownloader { pub(crate) fn new( - db: Arc, + db: Arc>, responses: HashMap, batch_size: u64, ) -> Self { diff --git a/crates/stages/src/stages/headers.rs b/crates/stages/src/stages/headers.rs index a8460412de71..e57b736d61e6 100644 --- a/crates/stages/src/stages/headers.rs +++ b/crates/stages/src/stages/headers.rs @@ -206,7 +206,12 @@ where // Nothing to sync if gap.is_closed() { - info!(target: "sync::stages::headers", checkpoint = %current_checkpoint, target = ?tip, "Target block already reached"); + info!( + target: "sync::stages::headers", + checkpoint = %current_checkpoint.block_number, + target = ?tip, + "Target block already reached" + ); return Ok(ExecOutput::done(current_checkpoint)) } diff --git a/crates/stages/src/stages/mod.rs b/crates/stages/src/stages/mod.rs index 02b51dfa7e34..c0173747a8ec 100644 --- a/crates/stages/src/stages/mod.rs +++ b/crates/stages/src/stages/mod.rs @@ -69,7 +69,7 @@ mod tests { #[ignore] async fn test_prune() { let test_tx = TestTransaction::default(); - let factory = Arc::new(ProviderFactory::new(test_tx.tx.as_ref(), MAINNET.clone())); + let factory = Arc::new(ProviderFactory::new(test_tx.tx.db(), MAINNET.clone())); let provider = factory.provider_rw().unwrap(); let tip = 66; diff --git a/crates/stages/src/stages/sender_recovery.rs b/crates/stages/src/stages/sender_recovery.rs index f7c6ec148feb..4105e810a276 100644 --- a/crates/stages/src/stages/sender_recovery.rs +++ b/crates/stages/src/stages/sender_recovery.rs @@ -228,14 +228,16 @@ fn stage_checkpoint( #[error(transparent)] enum SenderRecoveryStageError { /// A transaction failed sender recovery - FailedRecovery(FailedSenderRecoveryError), + #[error(transparent)] + FailedRecovery(#[from] FailedSenderRecoveryError), /// A different type of stage error occurred + #[error(transparent)] StageError(#[from] StageError), } #[derive(Error, Debug)] -#[error("Sender recovery failed for transaction {tx}.")] +#[error("sender recovery failed for transaction {tx}")] struct FailedSenderRecoveryError { /// The transaction that failed sender recovery tx: TxNumber, diff --git a/crates/stages/src/stages/total_difficulty.rs b/crates/stages/src/stages/total_difficulty.rs index 9fbb9bca3f61..5a923e9d18f6 100644 --- a/crates/stages/src/stages/total_difficulty.rs +++ b/crates/stages/src/stages/total_difficulty.rs @@ -72,7 +72,7 @@ impl Stage for TotalDifficultyStage { let last_header_number = input.checkpoint().block_number; let last_entry = cursor_td .seek_exact(last_header_number)? - .ok_or(ProviderError::TotalDifficultyNotFound { number: last_header_number })?; + .ok_or(ProviderError::TotalDifficultyNotFound { block_number: last_header_number })?; let mut td: U256 = last_entry.1.into(); debug!(target: "sync::stages::total_difficulty", ?td, block_number = last_header_number, "Last total difficulty entry"); diff --git a/crates/stages/src/stages/tx_lookup.rs b/crates/stages/src/stages/tx_lookup.rs index 697c1870747b..758fa403320b 100644 --- a/crates/stages/src/stages/tx_lookup.rs +++ b/crates/stages/src/stages/tx_lookup.rs @@ -1,23 +1,20 @@ use crate::{ExecInput, ExecOutput, Stage, StageError, UnwindInput, UnwindOutput}; -use itertools::Itertools; use rayon::prelude::*; use reth_db::{ cursor::{DbCursorRO, DbCursorRW}, database::Database, tables, transaction::{DbTx, DbTxMut}, - DatabaseError, }; use reth_interfaces::provider::ProviderError; use reth_primitives::{ - keccak256, stage::{EntitiesCheckpoint, StageCheckpoint, StageId}, - PruneCheckpoint, PruneMode, PruneSegment, TransactionSignedNoHash, TxNumber, B256, + PruneCheckpoint, PruneMode, PruneSegment, }; use reth_provider::{ BlockReader, DatabaseProviderRW, PruneCheckpointReader, PruneCheckpointWriter, + TransactionsProviderExt, }; -use tokio::sync::mpsc; use tracing::*; /// The transaction lookup stage. @@ -93,49 +90,15 @@ impl Stage for TransactionLookupStage { let (tx_range, block_range, is_final_range) = input.next_block_range_with_transaction_threshold(provider, self.commit_threshold)?; let end_block = *block_range.end(); - let tx_range_size = tx_range.clone().count(); debug!(target: "sync::stages::transaction_lookup", ?tx_range, "Updating transaction lookup"); - let tx = provider.tx_ref(); - let mut tx_cursor = tx.cursor_read::()?; - let tx_walker = tx_cursor.walk_range(tx_range)?; - - let chunk_size = (tx_range_size / rayon::current_num_threads()).max(1); - let mut channels = Vec::with_capacity(chunk_size); - let mut transaction_count = 0; - - for chunk in &tx_walker.chunks(chunk_size) { - let (tx, rx) = mpsc::unbounded_channel(); - channels.push(rx); - - // Note: Unfortunate side-effect of how chunk is designed in itertools (it is not Send) - let chunk: Vec<_> = chunk.collect(); - transaction_count += chunk.len(); - - // Spawn the task onto the global rayon pool - // This task will send the results through the channel after it has calculated the hash. - rayon::spawn(move || { - let mut rlp_buf = Vec::with_capacity(128); - for entry in chunk { - rlp_buf.clear(); - let _ = tx.send(calculate_hash(entry, &mut rlp_buf)); - } - }); - } - let mut tx_list = Vec::with_capacity(transaction_count); - - // Iterate over channels and append the tx hashes to be sorted out later - for mut channel in channels { - while let Some(tx) = channel.recv().await { - let (tx_hash, tx_id) = tx.map_err(|boxed| *boxed)?; - tx_list.push((tx_hash, tx_id)); - } - } + let mut tx_list = provider.transaction_hashes_by_range(tx_range)?; // Sort before inserting the reverse lookup for hash -> tx_id. tx_list.par_sort_unstable_by(|txa, txb| txa.0.cmp(&txb.0)); + let tx = provider.tx_ref(); let mut txhash_cursor = tx.cursor_write::()?; // If the last inserted element in the database is equal or bigger than the first @@ -201,17 +164,6 @@ impl Stage for TransactionLookupStage { } } -/// Calculates the hash of the given transaction -#[inline] -fn calculate_hash( - entry: Result<(TxNumber, TransactionSignedNoHash), DatabaseError>, - rlp_buf: &mut Vec, -) -> Result<(B256, TxNumber), Box> { - let (tx_id, tx) = entry.map_err(|e| Box::new(e.into()))?; - tx.transaction.encode_with_signature(&tx.signature, rlp_buf, false); - Ok((keccak256(rlp_buf), tx_id)) -} - fn stage_checkpoint( provider: &DatabaseProviderRW<'_, &DB>, ) -> Result { diff --git a/crates/stages/src/test_utils/runner.rs b/crates/stages/src/test_utils/runner.rs index ece1cfc4ab5a..190ea3b53a99 100644 --- a/crates/stages/src/test_utils/runner.rs +++ b/crates/stages/src/test_utils/runner.rs @@ -9,11 +9,11 @@ use tokio::sync::oneshot; #[derive(thiserror::Error, Debug)] pub(crate) enum TestRunnerError { - #[error("Database error occurred.")] + #[error(transparent)] Database(#[from] DatabaseError), - #[error("Internal runner error occurred.")] + #[error(transparent)] Internal(#[from] Box), - #[error("Internal interface error occurred.")] + #[error(transparent)] Interface(#[from] RethError), } @@ -48,7 +48,7 @@ pub(crate) trait ExecuteStageTestRunner: StageTestRunner { let (tx, rx) = oneshot::channel(); let (db, mut stage) = (self.tx().inner_raw(), self.stage()); tokio::spawn(async move { - let factory = ProviderFactory::new(db.as_ref(), MAINNET.clone()); + let factory = ProviderFactory::new(db.db(), MAINNET.clone()); let provider = factory.provider_rw().unwrap(); let result = stage.execute(&provider, input).await; @@ -74,7 +74,7 @@ pub(crate) trait UnwindStageTestRunner: StageTestRunner { let (tx, rx) = oneshot::channel(); let (db, mut stage) = (self.tx().inner_raw(), self.stage()); tokio::spawn(async move { - let factory = ProviderFactory::new(db.as_ref(), MAINNET.clone()); + let factory = ProviderFactory::new(db.db(), MAINNET.clone()); let provider = factory.provider_rw().unwrap(); let result = stage.unwind(&provider, input).await; diff --git a/crates/stages/src/test_utils/test_db.rs b/crates/stages/src/test_utils/test_db.rs index 8bdb580156b5..56361f21295a 100644 --- a/crates/stages/src/test_utils/test_db.rs +++ b/crates/stages/src/test_utils/test_db.rs @@ -5,7 +5,7 @@ use reth_db::{ models::{AccountBeforeTx, StoredBlockBodyIndices}, table::{Table, TableRow}, tables, - test_utils::{create_test_rw_db, create_test_rw_db_with_path}, + test_utils::{create_test_rw_db, create_test_rw_db_with_path, TempDatabase}, transaction::{DbTx, DbTxGAT, DbTxMut, DbTxMutGAT}, DatabaseEnv, DatabaseError as DbError, }; @@ -33,9 +33,9 @@ use std::{ #[derive(Debug)] pub struct TestTransaction { /// DB - pub tx: Arc, + pub tx: Arc>, pub path: Option, - pub factory: ProviderFactory>, + pub factory: ProviderFactory>>, } impl Default for TestTransaction { @@ -57,17 +57,17 @@ impl TestTransaction { } /// Return a database wrapped in [DatabaseProviderRW]. - pub fn inner_rw(&self) -> DatabaseProviderRW<'_, Arc> { + pub fn inner_rw(&self) -> DatabaseProviderRW<'_, Arc>> { self.factory.provider_rw().expect("failed to create db container") } /// Return a database wrapped in [DatabaseProviderRO]. - pub fn inner(&self) -> DatabaseProviderRO<'_, Arc> { + pub fn inner(&self) -> DatabaseProviderRO<'_, Arc>> { self.factory.provider().expect("failed to create db container") } /// Get a pointer to an internal database. - pub fn inner_raw(&self) -> Arc { + pub fn inner_raw(&self) -> Arc> { self.tx.clone() } diff --git a/crates/storage/codecs/derive/src/lib.rs b/crates/storage/codecs/derive/src/lib.rs index a06a111e70df..f0133b95b1f4 100644 --- a/crates/storage/codecs/derive/src/lib.rs +++ b/crates/storage/codecs/derive/src/lib.rs @@ -148,8 +148,8 @@ pub fn derive_arbitrary(args: TokenStream, input: TokenStream) -> TokenStream { let tests = arbitrary::maybe_generate_tests(args, &ast); // Avoid duplicate names - let prop_import = format_ident!("{}PropTestArbitratry", ast.ident); - let arb_import = format_ident!("{}Arbitratry", ast.ident); + let prop_import = format_ident!("{}PropTestArbitrary", ast.ident); + let arb_import = format_ident!("{}Arbitrary", ast.ident); quote! { #[cfg(any(test, feature = "arbitrary"))] diff --git a/crates/storage/db/Cargo.toml b/crates/storage/db/Cargo.toml index 937bb232b9b2..2920ffd68b23 100644 --- a/crates/storage/db/Cargo.toml +++ b/crates/storage/db/Cargo.toml @@ -45,6 +45,8 @@ parking_lot.workspace = true derive_more = "0.99" eyre.workspace = true paste = "1.0" +rayon.workspace = true +itertools.workspace = true # arbitrary utils arbitrary = { workspace = true, features = ["derive"], optional = true } diff --git a/crates/storage/db/benches/hash_keys.rs b/crates/storage/db/benches/hash_keys.rs index d00384a6e3c3..58d005efe4d2 100644 --- a/crates/storage/db/benches/hash_keys.rs +++ b/crates/storage/db/benches/hash_keys.rs @@ -86,6 +86,7 @@ where // Reset DB let _ = fs::remove_dir_all(bench_db_path); let db = Arc::try_unwrap(create_test_rw_db_with_path(bench_db_path)).unwrap(); + let db = db.into_inner_db(); let mut unsorted_input = unsorted_input.clone(); if scenario_str == "append_all" { diff --git a/crates/storage/db/benches/utils.rs b/crates/storage/db/benches/utils.rs index d5c558df60ce..67ce2307ff03 100644 --- a/crates/storage/db/benches/utils.rs +++ b/crates/storage/db/benches/utils.rs @@ -72,5 +72,5 @@ where tx.inner.commit().unwrap(); } - db + db.into_inner_db() } diff --git a/crates/storage/db/src/abstraction/mock.rs b/crates/storage/db/src/abstraction/mock.rs index bac7e061f345..737797008085 100644 --- a/crates/storage/db/src/abstraction/mock.rs +++ b/crates/storage/db/src/abstraction/mock.rs @@ -63,7 +63,7 @@ impl DbTx for TxMock { Ok(true) } - fn drop(self) {} + fn abort(self) {} fn cursor_read(&self) -> Result<>::Cursor, DatabaseError> { Ok(CursorMock { _cursor: 0 }) diff --git a/crates/storage/db/src/abstraction/transaction.rs b/crates/storage/db/src/abstraction/transaction.rs index 798b1d276ace..bbbd775d7a16 100644 --- a/crates/storage/db/src/abstraction/transaction.rs +++ b/crates/storage/db/src/abstraction/transaction.rs @@ -39,8 +39,8 @@ pub trait DbTx: for<'a> DbTxGAT<'a> { /// Commit for read only transaction will consume and free transaction and allows /// freeing of memory pages fn commit(self) -> Result; - /// Drops transaction - fn drop(self); + /// Aborts transaction + fn abort(self); /// Iterate over read only values in table. fn cursor_read(&self) -> Result<>::Cursor, DatabaseError>; /// Iterate over read only values in dup sorted table. diff --git a/crates/storage/db/src/implementation/mdbx/cursor.rs b/crates/storage/db/src/implementation/mdbx/cursor.rs index 936069ca86db..e8a6f1e3399e 100644 --- a/crates/storage/db/src/implementation/mdbx/cursor.rs +++ b/crates/storage/db/src/implementation/mdbx/cursor.rs @@ -1,7 +1,7 @@ //! Cursor wrapper for libmdbx-sys. use reth_interfaces::db::DatabaseWriteOperation; -use std::{borrow::Cow, collections::Bound, ops::RangeBounds}; +use std::{borrow::Cow, collections::Bound, marker::PhantomData, ops::RangeBounds}; use crate::{ common::{PairResult, ValueOnlyResult}, @@ -9,6 +9,7 @@ use crate::{ DbCursorRO, DbCursorRW, DbDupCursorRO, DbDupCursorRW, DupWalker, RangeWalker, ReverseWalker, Walker, }, + metrics::{Operation, OperationMetrics}, table::{Compress, DupSort, Encode, Table}, tables::utils::*, DatabaseError, @@ -24,13 +25,38 @@ pub type CursorRW<'tx, T> = Cursor<'tx, RW, T>; #[derive(Debug)] pub struct Cursor<'tx, K: TransactionKind, T: Table> { /// Inner `libmdbx` cursor. - pub inner: reth_libmdbx::Cursor<'tx, K>, - /// Table name as is inside the database. - pub table: &'static str, - /// Phantom data to enforce encoding/decoding. - pub _dbi: std::marker::PhantomData, + pub(crate) inner: reth_libmdbx::Cursor<'tx, K>, /// Cache buffer that receives compressed values. - pub buf: Vec, + buf: Vec, + /// Whether to record metrics or not. + with_metrics: bool, + /// Phantom data to enforce encoding/decoding. + _dbi: PhantomData, +} + +impl<'tx, K: TransactionKind, T: Table> Cursor<'tx, K, T> { + pub(crate) fn new_with_metrics( + inner: reth_libmdbx::Cursor<'tx, K>, + with_metrics: bool, + ) -> Self { + Self { inner, buf: Vec::new(), with_metrics, _dbi: PhantomData } + } + + /// If `self.with_metrics == true`, record a metric with the provided operation and value size. + /// + /// Otherwise, just execute the closure. + fn execute_with_operation_metric( + &mut self, + operation: Operation, + value_size: Option, + f: impl FnOnce(&mut Self) -> R, + ) -> R { + if self.with_metrics { + OperationMetrics::record(T::NAME, operation, value_size, || f(self)) + } else { + f(self) + } + } } /// Takes `(key, value)` from the database and decodes it appropriately. @@ -43,14 +69,14 @@ macro_rules! decode { /// Some types don't support compression (eg. B256), and we don't want to be copying them to the /// allocated buffer when we can just use their reference. -macro_rules! compress_or_ref { +macro_rules! compress_to_buf_or_ref { ($self:expr, $value:expr) => { if let Some(value) = $value.uncompressable_ref() { - value + Some(value) } else { $self.buf.truncate(0); $value.compress_to_buf(&mut $self.buf); - $self.buf.as_ref() + None } }; } @@ -229,61 +255,92 @@ impl DbCursorRW for Cursor<'_, RW, T> { /// found, before calling `upsert`. fn upsert(&mut self, key: T::Key, value: T::Value) -> Result<(), DatabaseError> { let key = key.encode(); - // Default `WriteFlags` is UPSERT - self.inner.put(key.as_ref(), compress_or_ref!(self, value), WriteFlags::UPSERT).map_err( - |e| DatabaseError::Write { - code: e.into(), - operation: DatabaseWriteOperation::CursorUpsert, - table_name: T::NAME, - key: Box::from(key.as_ref()), + let value = compress_to_buf_or_ref!(self, value); + self.execute_with_operation_metric( + Operation::CursorUpsert, + Some(value.unwrap_or(&self.buf).len()), + |this| { + this.inner + .put(key.as_ref(), value.unwrap_or(&this.buf), WriteFlags::UPSERT) + .map_err(|e| DatabaseError::Write { + code: e.into(), + operation: DatabaseWriteOperation::CursorUpsert, + table_name: T::NAME, + key: Box::from(key.as_ref()), + }) }, ) } fn insert(&mut self, key: T::Key, value: T::Value) -> Result<(), DatabaseError> { let key = key.encode(); - self.inner - .put(key.as_ref(), compress_or_ref!(self, value), WriteFlags::NO_OVERWRITE) - .map_err(|e| DatabaseError::Write { - code: e.into(), - operation: DatabaseWriteOperation::CursorInsert, - table_name: T::NAME, - key: Box::from(key.as_ref()), - }) + let value = compress_to_buf_or_ref!(self, value); + self.execute_with_operation_metric( + Operation::CursorInsert, + Some(value.unwrap_or(&self.buf).len()), + |this| { + this.inner + .put(key.as_ref(), value.unwrap_or(&this.buf), WriteFlags::NO_OVERWRITE) + .map_err(|e| DatabaseError::Write { + code: e.into(), + operation: DatabaseWriteOperation::CursorInsert, + table_name: T::NAME, + key: Box::from(key.as_ref()), + }) + }, + ) } /// Appends the data to the end of the table. Consequently, the append operation /// will fail if the inserted key is less than the last table key fn append(&mut self, key: T::Key, value: T::Value) -> Result<(), DatabaseError> { let key = key.encode(); - self.inner.put(key.as_ref(), compress_or_ref!(self, value), WriteFlags::APPEND).map_err( - |e| DatabaseError::Write { - code: e.into(), - operation: DatabaseWriteOperation::CursorAppend, - table_name: T::NAME, - key: Box::from(key.as_ref()), + let value = compress_to_buf_or_ref!(self, value); + self.execute_with_operation_metric( + Operation::CursorAppend, + Some(value.unwrap_or(&self.buf).len()), + |this| { + this.inner + .put(key.as_ref(), value.unwrap_or(&this.buf), WriteFlags::APPEND) + .map_err(|e| DatabaseError::Write { + code: e.into(), + operation: DatabaseWriteOperation::CursorAppend, + table_name: T::NAME, + key: Box::from(key.as_ref()), + }) }, ) } fn delete_current(&mut self) -> Result<(), DatabaseError> { - self.inner.del(WriteFlags::CURRENT).map_err(|e| DatabaseError::Delete(e.into())) + self.execute_with_operation_metric(Operation::CursorDeleteCurrent, None, |this| { + this.inner.del(WriteFlags::CURRENT).map_err(|e| DatabaseError::Delete(e.into())) + }) } } impl DbDupCursorRW for Cursor<'_, RW, T> { fn delete_current_duplicates(&mut self) -> Result<(), DatabaseError> { - self.inner.del(WriteFlags::NO_DUP_DATA).map_err(|e| DatabaseError::Delete(e.into())) + self.execute_with_operation_metric(Operation::CursorDeleteCurrentDuplicates, None, |this| { + this.inner.del(WriteFlags::NO_DUP_DATA).map_err(|e| DatabaseError::Delete(e.into())) + }) } fn append_dup(&mut self, key: T::Key, value: T::Value) -> Result<(), DatabaseError> { let key = key.encode(); - self.inner.put(key.as_ref(), compress_or_ref!(self, value), WriteFlags::APPEND_DUP).map_err( - |e| DatabaseError::Write { - code: e.into(), - operation: DatabaseWriteOperation::CursorAppendDup, - table_name: T::NAME, - key: Box::from(key.as_ref()), + let value = compress_to_buf_or_ref!(self, value); + self.execute_with_operation_metric( + Operation::CursorAppendDup, + Some(value.unwrap_or(&self.buf).len()), + |this| { + this.inner + .put(key.as_ref(), value.unwrap_or(&this.buf), WriteFlags::APPEND_DUP) + .map_err(|e| DatabaseError::Write { + code: e.into(), + operation: DatabaseWriteOperation::CursorAppendDup, + table_name: T::NAME, + key: Box::from(key.as_ref()), + }) }, ) } diff --git a/crates/storage/db/src/implementation/mdbx/mod.rs b/crates/storage/db/src/implementation/mdbx/mod.rs index ea82ed4285d6..2fac746cf74f 100644 --- a/crates/storage/db/src/implementation/mdbx/mod.rs +++ b/crates/storage/db/src/implementation/mdbx/mod.rs @@ -37,6 +37,8 @@ pub enum EnvKind { pub struct Env { /// Libmdbx-sys environment. pub inner: Environment, + /// Whether to record metrics or not. + with_metrics: bool, } impl<'a, E: EnvironmentKind> DatabaseGAT<'a> for Env { @@ -46,14 +48,16 @@ impl<'a, E: EnvironmentKind> DatabaseGAT<'a> for Env { impl Database for Env { fn tx(&self) -> Result<>::TX, DatabaseError> { - Ok(Tx::new( - self.inner.begin_ro_txn().map_err(|e| DatabaseError::InitTransaction(e.into()))?, + Ok(Tx::new_with_metrics( + self.inner.begin_ro_txn().map_err(|e| DatabaseError::InitTx(e.into()))?, + self.with_metrics, )) } fn tx_mut(&self) -> Result<>::TXMut, DatabaseError> { - Ok(Tx::new( - self.inner.begin_rw_txn().map_err(|e| DatabaseError::InitTransaction(e.into()))?, + Ok(Tx::new_with_metrics( + self.inner.begin_rw_txn().map_err(|e| DatabaseError::InitTx(e.into()))?, + self.with_metrics, )) } } @@ -120,15 +124,23 @@ impl Env { } } - let env = - Env { inner: inner_env.open(path).map_err(|e| DatabaseError::FailedToOpen(e.into()))? }; + let env = Env { + inner: inner_env.open(path).map_err(|e| DatabaseError::Open(e.into()))?, + with_metrics: false, + }; Ok(env) } + /// Enables metrics on the database. + pub fn with_metrics(mut self) -> Self { + self.with_metrics = true; + self + } + /// Creates all the defined tables, if necessary. pub fn create_tables(&self) -> Result<(), DatabaseError> { - let tx = self.inner.begin_rw_txn().map_err(|e| DatabaseError::InitTransaction(e.into()))?; + let tx = self.inner.begin_rw_txn().map_err(|e| DatabaseError::InitTx(e.into()))?; for table in Tables::ALL { let flags = match table.table_type() { @@ -137,7 +149,7 @@ impl Env { }; tx.create_db(Some(table.name()), flags) - .map_err(|e| DatabaseError::TableCreation(e.into()))?; + .map_err(|e| DatabaseError::CreateTable(e.into()))?; } tx.commit().map_err(|e| DatabaseError::Commit(e.into()))?; diff --git a/crates/storage/db/src/implementation/mdbx/tx.rs b/crates/storage/db/src/implementation/mdbx/tx.rs index 2bf8450ca91f..276cd594d140 100644 --- a/crates/storage/db/src/implementation/mdbx/tx.rs +++ b/crates/storage/db/src/implementation/mdbx/tx.rs @@ -2,6 +2,9 @@ use super::cursor::Cursor; use crate::{ + metrics::{ + Operation, OperationMetrics, TransactionMetrics, TransactionMode, TransactionOutcome, + }, table::{Compress, DupSort, Encode, Table, TableImporter}, tables::{utils::decode_one, Tables, NUM_TABLES}, transaction::{DbTx, DbTxGAT, DbTxMut, DbTxMutGAT}, @@ -10,7 +13,6 @@ use crate::{ use parking_lot::RwLock; use reth_interfaces::db::DatabaseWriteOperation; use reth_libmdbx::{ffi::DBI, EnvironmentKind, Transaction, TransactionKind, WriteFlags, RW}; -use reth_metrics::metrics::histogram; use std::{marker::PhantomData, str::FromStr, sync::Arc, time::Instant}; /// Wrapper for the libmdbx transaction. @@ -18,8 +20,13 @@ use std::{marker::PhantomData, str::FromStr, sync::Arc, time::Instant}; pub struct Tx<'a, K: TransactionKind, E: EnvironmentKind> { /// Libmdbx-sys transaction. pub inner: Transaction<'a, K, E>, - /// Database table handle cache - pub db_handles: Arc; NUM_TABLES]>>, + /// Database table handle cache. + pub(crate) db_handles: Arc; NUM_TABLES]>>, + /// Handler for metrics with its own [Drop] implementation for cases when the transaction isn't + /// closed by [Tx::commit] or [Tx::abort], but we still need to report it in the metrics. + /// + /// If [Some], then metrics are reported. + metrics_handler: Option>, } impl<'env, K: TransactionKind, E: EnvironmentKind> Tx<'env, K, E> { @@ -28,12 +35,30 @@ impl<'env, K: TransactionKind, E: EnvironmentKind> Tx<'env, K, E> { where 'a: 'env, { - Self { inner, db_handles: Default::default() } + Self { inner, db_handles: Default::default(), metrics_handler: None } + } + + /// Creates new `Tx` object with a `RO` or `RW` transaction and optionally enables metrics. + pub fn new_with_metrics<'a>(inner: Transaction<'a, K, E>, with_metrics: bool) -> Self + where + 'a: 'env, + { + let metrics_handler = with_metrics.then(|| { + let handler = MetricsHandler:: { + txn_id: inner.id(), + start: Instant::now(), + close_recorded: false, + _marker: PhantomData, + }; + TransactionMetrics::record_open(handler.transaction_mode()); + handler + }); + Self { inner, db_handles: Default::default(), metrics_handler } } /// Gets this transaction ID. pub fn id(&self) -> u64 { - self.inner.id() + self.metrics_handler.as_ref().map_or_else(|| self.inner.id(), |handler| handler.txn_id) } /// Gets a table database handle if it exists, otherwise creates it. @@ -57,15 +82,94 @@ impl<'env, K: TransactionKind, E: EnvironmentKind> Tx<'env, K, E> { /// Create db Cursor pub fn new_cursor(&self) -> Result, DatabaseError> { - Ok(Cursor { - inner: self - .inner - .cursor_with_dbi(self.get_dbi::()?) - .map_err(|e| DatabaseError::InitCursor(e.into()))?, - table: T::NAME, - _dbi: PhantomData, - buf: vec![], - }) + let inner = self + .inner + .cursor_with_dbi(self.get_dbi::()?) + .map_err(|e| DatabaseError::InitCursor(e.into()))?; + + Ok(Cursor::new_with_metrics(inner, self.metrics_handler.is_some())) + } + + /// If `self.metrics_handler == Some(_)`, measure the time it takes to execute the closure and + /// record a metric with the provided transaction outcome. + /// + /// Otherwise, just execute the closure. + fn execute_with_close_transaction_metric( + mut self, + outcome: TransactionOutcome, + f: impl FnOnce(Self) -> R, + ) -> R { + if let Some(mut metrics_handler) = self.metrics_handler.take() { + metrics_handler.close_recorded = true; + + let start = Instant::now(); + let result = f(self); + let close_duration = start.elapsed(); + let open_duration = metrics_handler.start.elapsed(); + + TransactionMetrics::record_close( + metrics_handler.transaction_mode(), + outcome, + open_duration, + Some(close_duration), + ); + + result + } else { + f(self) + } + } + + /// If `self.metrics_handler == Some(_)`, measure the time it takes to execute the closure and + /// record a metric with the provided operation. + /// + /// Otherwise, just execute the closure. + fn execute_with_operation_metric( + &self, + operation: Operation, + value_size: Option, + f: impl FnOnce(&Transaction<'_, K, E>) -> R, + ) -> R { + if self.metrics_handler.is_some() { + OperationMetrics::record(T::NAME, operation, value_size, || f(&self.inner)) + } else { + f(&self.inner) + } + } +} + +#[derive(Debug)] +struct MetricsHandler { + /// Cached internal transaction ID provided by libmdbx. + txn_id: u64, + /// The time when transaction has started. + start: Instant, + /// If true, the metric about transaction closing has already been recorded and we don't need + /// to do anything on [Drop::drop]. + close_recorded: bool, + _marker: PhantomData, +} + +impl MetricsHandler { + const fn transaction_mode(&self) -> TransactionMode { + if K::IS_READ_ONLY { + TransactionMode::ReadOnly + } else { + TransactionMode::ReadWrite + } + } +} + +impl Drop for MetricsHandler { + fn drop(&mut self) { + if !self.close_recorded { + TransactionMetrics::record_close( + self.transaction_mode(), + TransactionOutcome::Drop, + self.start.elapsed(), + None, + ); + } } } @@ -83,22 +187,24 @@ impl TableImporter for Tx<'_, RW, E> {} impl DbTx for Tx<'_, K, E> { fn get(&self, key: T::Key) -> Result::Value>, DatabaseError> { - self.inner - .get(self.get_dbi::()?, key.encode().as_ref()) - .map_err(|e| DatabaseError::Read(e.into()))? - .map(decode_one::) - .transpose() + self.execute_with_operation_metric::(Operation::Get, None, |tx| { + tx.get(self.get_dbi::()?, key.encode().as_ref()) + .map_err(|e| DatabaseError::Read(e.into()))? + .map(decode_one::) + .transpose() + }) } fn commit(self) -> Result { - let start = Instant::now(); - let result = self.inner.commit().map_err(|e| DatabaseError::Commit(e.into())); - histogram!("tx.commit", start.elapsed()); - result + self.execute_with_close_transaction_metric(TransactionOutcome::Commit, |this| { + this.inner.commit().map_err(|e| DatabaseError::Commit(e.into())) + }) } - fn drop(self) { - drop(self.inner) + fn abort(self) { + self.execute_with_close_transaction_metric(TransactionOutcome::Abort, |this| { + drop(this.inner) + }) } // Iterate over read only values in database. @@ -126,14 +232,21 @@ impl DbTx for Tx<'_, K, E> { impl DbTxMut for Tx<'_, RW, E> { fn put(&self, key: T::Key, value: T::Value) -> Result<(), DatabaseError> { let key = key.encode(); - self.inner - .put(self.get_dbi::()?, key.as_ref(), &value.compress(), WriteFlags::UPSERT) - .map_err(|e| DatabaseError::Write { - code: e.into(), - operation: DatabaseWriteOperation::Put, - table_name: T::NAME, - key: Box::from(key.as_ref()), - }) + let value = value.compress(); + self.execute_with_operation_metric::( + Operation::Put, + Some(value.as_ref().len()), + |tx| { + tx.put(self.get_dbi::()?, key.as_ref(), value, WriteFlags::UPSERT).map_err(|e| { + DatabaseError::Write { + code: e.into(), + operation: DatabaseWriteOperation::Put, + table_name: T::NAME, + key: Box::from(key.as_ref()), + } + }) + }, + ) } fn delete( @@ -148,9 +261,10 @@ impl DbTxMut for Tx<'_, RW, E> { data = Some(value.as_ref()); }; - self.inner - .del(self.get_dbi::()?, key.encode(), data) - .map_err(|e| DatabaseError::Delete(e.into())) + self.execute_with_operation_metric::(Operation::Delete, None, |tx| { + tx.del(self.get_dbi::()?, key.encode(), data) + .map_err(|e| DatabaseError::Delete(e.into())) + }) } fn clear(&self) -> Result<(), DatabaseError> { diff --git a/crates/storage/db/src/lib.rs b/crates/storage/db/src/lib.rs index 8cb3fe80c19e..a1511fb09ed6 100644 --- a/crates/storage/db/src/lib.rs +++ b/crates/storage/db/src/lib.rs @@ -68,6 +68,7 @@ pub mod abstraction; mod implementation; +mod metrics; pub mod snapshot; pub mod tables; mod utils; @@ -160,7 +161,8 @@ pub fn open_db(path: &Path, log_level: Option) -> eyre::Result { + db: Option, + path: PathBuf, + } + + impl Drop for TempDatabase { + fn drop(&mut self) { + if let Some(db) = self.db.take() { + drop(db); + let _ = std::fs::remove_dir_all(&self.path); + } + } + } + + impl TempDatabase { + /// returns the ref of inner db + pub fn db(&self) -> &DB { + self.db.as_ref().unwrap() + } + + /// returns the inner db + pub fn into_inner_db(mut self) -> DB { + self.db.take().unwrap() // take out db to avoid clean path in drop fn + } + } + + impl<'a, DB: Database> DatabaseGAT<'a> for TempDatabase { + type TX = >::TX; + type TXMut = >::TXMut; + } + + impl Database for TempDatabase { + fn tx(&self) -> Result<>::TX, DatabaseError> { + self.db().tx() + } + + fn tx_mut(&self) -> Result<>::TXMut, DatabaseError> { + self.db().tx_mut() + } + } + /// Create read/write database for testing - pub fn create_test_rw_db() -> Arc { - Arc::new( - init_db(tempfile::TempDir::new().expect(ERROR_TEMPDIR).into_path(), None) - .expect(ERROR_DB_CREATION), - ) + pub fn create_test_rw_db() -> Arc> { + let path = tempfile::TempDir::new().expect(ERROR_TEMPDIR).into_path(); + let emsg = format!("{}: {:?}", ERROR_DB_CREATION, path); + + let db = init_db(&path, None).expect(&emsg); + + Arc::new(TempDatabase { db: Some(db), path }) } /// Create read/write database for testing - pub fn create_test_rw_db_with_path>(path: P) -> Arc { - Arc::new(init_db(path.as_ref(), None).expect(ERROR_DB_CREATION)) + pub fn create_test_rw_db_with_path>(path: P) -> Arc> { + let path = path.as_ref().to_path_buf(); + let db = init_db(path.as_path(), None).expect(ERROR_DB_CREATION); + Arc::new(TempDatabase { db: Some(db), path }) } /// Create read only database for testing - pub fn create_test_ro_db() -> Arc { + pub fn create_test_ro_db() -> Arc> { let path = tempfile::TempDir::new().expect(ERROR_TEMPDIR).into_path(); { init_db(path.as_path(), None).expect(ERROR_DB_CREATION); } - Arc::new(open_db_read_only(path.as_path(), None).expect(ERROR_DB_OPEN)) + let db = open_db_read_only(path.as_path(), None).expect(ERROR_DB_OPEN); + Arc::new(TempDatabase { db: Some(db), path }) } } diff --git a/crates/storage/db/src/metrics.rs b/crates/storage/db/src/metrics.rs new file mode 100644 index 000000000000..fff6cecbd6ac --- /dev/null +++ b/crates/storage/db/src/metrics.rs @@ -0,0 +1,168 @@ +use metrics::{Gauge, Histogram}; +use reth_metrics::{metrics::Counter, Metrics}; +use std::time::{Duration, Instant}; + +const LARGE_VALUE_THRESHOLD_BYTES: usize = 4096; + +#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)] +#[allow(missing_docs)] +pub(crate) enum TransactionMode { + ReadOnly, + ReadWrite, +} + +impl TransactionMode { + pub(crate) const fn as_str(&self) -> &'static str { + match self { + TransactionMode::ReadOnly => "read-only", + TransactionMode::ReadWrite => "read-write", + } + } +} + +#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)] +#[allow(missing_docs)] +pub(crate) enum TransactionOutcome { + Commit, + Abort, + Drop, +} + +impl TransactionOutcome { + pub(crate) const fn as_str(&self) -> &'static str { + match self { + TransactionOutcome::Commit => "commit", + TransactionOutcome::Abort => "abort", + TransactionOutcome::Drop => "drop", + } + } +} + +#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)] +#[allow(missing_docs)] +pub(crate) enum Operation { + Get, + Put, + Delete, + CursorUpsert, + CursorInsert, + CursorAppend, + CursorAppendDup, + CursorDeleteCurrent, + CursorDeleteCurrentDuplicates, +} + +impl Operation { + pub(crate) const fn as_str(&self) -> &'static str { + match self { + Operation::Get => "get", + Operation::Put => "put", + Operation::Delete => "delete", + Operation::CursorUpsert => "cursor-upsert", + Operation::CursorInsert => "cursor-insert", + Operation::CursorAppend => "cursor-append", + Operation::CursorAppendDup => "cursor-append-dup", + Operation::CursorDeleteCurrent => "cursor-delete-current", + Operation::CursorDeleteCurrentDuplicates => "cursor-delete-current-duplicates", + } + } +} + +enum Labels { + Table, + TransactionMode, + TransactionOutcome, + Operation, +} + +impl Labels { + pub(crate) fn as_str(&self) -> &'static str { + match self { + Labels::Table => "table", + Labels::TransactionMode => "mode", + Labels::TransactionOutcome => "outcome", + Labels::Operation => "operation", + } + } +} + +#[derive(Metrics, Clone)] +#[metrics(scope = "database.transaction")] +pub(crate) struct TransactionMetrics { + /// Total number of currently open database transactions + open_total: Gauge, + /// The time a database transaction has been open + open_duration_seconds: Histogram, + /// The time it took to close a database transaction + close_duration_seconds: Histogram, +} + +impl TransactionMetrics { + /// Record transaction opening. + pub(crate) fn record_open(mode: TransactionMode) { + let metrics = Self::new_with_labels(&[(Labels::TransactionMode.as_str(), mode.as_str())]); + metrics.open_total.increment(1.0); + } + + /// Record transaction closing with the duration it was open and the duration it took to close + /// it. + pub(crate) fn record_close( + mode: TransactionMode, + outcome: TransactionOutcome, + open_duration: Duration, + close_duration: Option, + ) { + let metrics = Self::new_with_labels(&[(Labels::TransactionMode.as_str(), mode.as_str())]); + metrics.open_total.decrement(1.0); + + let metrics = Self::new_with_labels(&[ + (Labels::TransactionMode.as_str(), mode.as_str()), + (Labels::TransactionOutcome.as_str(), outcome.as_str()), + ]); + metrics.open_duration_seconds.record(open_duration); + + if let Some(close_duration) = close_duration { + metrics.close_duration_seconds.record(close_duration) + } + } +} + +#[derive(Metrics, Clone)] +#[metrics(scope = "database.operation")] +pub(crate) struct OperationMetrics { + /// Total number of database operations made + calls_total: Counter, + /// The time it took to execute a database operation (put/upsert/insert/append/append_dup) with + /// value larger than [LARGE_VALUE_THRESHOLD_BYTES] bytes. + large_value_duration_seconds: Histogram, +} + +impl OperationMetrics { + /// Record operation metric. + /// + /// The duration it took to execute the closure is recorded only if the provided `value_size` is + /// larger than [LARGE_VALUE_THRESHOLD_BYTES]. + pub(crate) fn record( + table: &'static str, + operation: Operation, + value_size: Option, + f: impl FnOnce() -> T, + ) -> T { + let metrics = Self::new_with_labels(&[ + (Labels::Table.as_str(), table), + (Labels::Operation.as_str(), operation.as_str()), + ]); + metrics.calls_total.increment(1); + + // Record duration only for large values to prevent the performance hit of clock syscall + // on small operations + if value_size.map_or(false, |size| size > LARGE_VALUE_THRESHOLD_BYTES) { + let start = Instant::now(); + let result = f(); + metrics.large_value_duration_seconds.record(start.elapsed()); + result + } else { + f() + } + } +} diff --git a/crates/storage/db/src/snapshot/cursor.rs b/crates/storage/db/src/snapshot/cursor.rs new file mode 100644 index 000000000000..403183f930a1 --- /dev/null +++ b/crates/storage/db/src/snapshot/cursor.rs @@ -0,0 +1,111 @@ +use super::mask::{ColumnSelectorOne, ColumnSelectorThree, ColumnSelectorTwo}; +use crate::table::Decompress; +use derive_more::{Deref, DerefMut}; +use reth_interfaces::{RethError, RethResult}; +use reth_nippy_jar::{MmapHandle, NippyJar, NippyJarCursor}; +use reth_primitives::{snapshot::SegmentHeader, B256}; + +/// Cursor of a snapshot segment. +#[derive(Debug, Deref, DerefMut)] +pub struct SnapshotCursor<'a>(NippyJarCursor<'a, SegmentHeader>); + +impl<'a> SnapshotCursor<'a> { + /// Returns a new [`SnapshotCursor`]. + pub fn new( + jar: &'a NippyJar, + mmap_handle: MmapHandle, + ) -> Result { + Ok(Self(NippyJarCursor::with_handle(jar, mmap_handle)?)) + } + + /// Returns the current `BlockNumber` or `TxNumber` of the cursor depending on the kind of + /// snapshot segment. + pub fn number(&self) -> u64 { + self.row_index() + self.jar().user_header().start() + } + + /// Gets a row of values. + pub fn get( + &mut self, + key_or_num: KeyOrNumber<'_>, + mask: usize, + ) -> RethResult>> { + let row = match key_or_num { + KeyOrNumber::Key(k) => self.row_by_key_with_cols(k, mask), + KeyOrNumber::Number(n) => { + let offset = self.jar().user_header().start(); + if offset > n { + return Ok(None) + } + self.row_by_number_with_cols((n - offset) as usize, mask) + } + }?; + + Ok(row) + } + + /// Gets one column value from a row. + pub fn get_one( + &mut self, + key_or_num: KeyOrNumber<'_>, + ) -> RethResult> { + let row = self.get(key_or_num, M::MASK)?; + + match row { + Some(row) => Ok(Some(M::FIRST::decompress(row[0])?)), + None => Ok(None), + } + } + + /// Gets two column values from a row. + pub fn get_two( + &mut self, + key_or_num: KeyOrNumber<'_>, + ) -> RethResult> { + let row = self.get(key_or_num, M::MASK)?; + + match row { + Some(row) => Ok(Some((M::FIRST::decompress(row[0])?, M::SECOND::decompress(row[1])?))), + None => Ok(None), + } + } + + /// Gets three column values from a row. + #[allow(clippy::type_complexity)] + pub fn get_three( + &mut self, + key_or_num: KeyOrNumber<'_>, + ) -> RethResult> { + let row = self.get(key_or_num, M::MASK)?; + + match row { + Some(row) => Ok(Some(( + M::FIRST::decompress(row[0])?, + M::SECOND::decompress(row[1])?, + M::THIRD::decompress(row[2])?, + ))), + None => Ok(None), + } + } +} + +/// Either a key _or_ a block/tx number +#[derive(Debug)] +pub enum KeyOrNumber<'a> { + /// A slice used as a key. Usually a block/tx hash + Key(&'a [u8]), + /// A block/tx number + Number(u64), +} + +impl<'a> From<&'a B256> for KeyOrNumber<'a> { + fn from(value: &'a B256) -> Self { + KeyOrNumber::Key(value.as_slice()) + } +} + +impl<'a> From for KeyOrNumber<'a> { + fn from(value: u64) -> Self { + KeyOrNumber::Number(value) + } +} diff --git a/crates/storage/db/src/snapshot.rs b/crates/storage/db/src/snapshot/generation.rs similarity index 96% rename from crates/storage/db/src/snapshot.rs rename to crates/storage/db/src/snapshot/generation.rs index 7f62379878f7..5a2088ed60c4 100644 --- a/crates/storage/db/src/snapshot.rs +++ b/crates/storage/db/src/snapshot/generation.rs @@ -1,14 +1,15 @@ -//! reth's snapshot creation from database tables - use crate::{ abstraction::cursor::DbCursorRO, table::{Key, Table}, transaction::DbTx, RawKey, RawTable, }; + use reth_interfaces::RethResult; use reth_nippy_jar::{ColumnResult, NippyJar, PHFKey}; + use reth_tracing::tracing::*; +use serde::{Deserialize, Serialize}; use std::{error::Error as StdError, ops::RangeInclusive}; /// Macro that generates snapshot creation functions that take an arbitratry number of [`Table`] and @@ -34,7 +35,8 @@ macro_rules! generate_snapshot_func { #[allow(non_snake_case)] pub fn []< $($tbl: Table,)+ - K + K, + H: for<'a> Deserialize<'a> + Send + Serialize + Sync + std::fmt::Debug > ( tx: &impl DbTx, @@ -43,7 +45,7 @@ macro_rules! generate_snapshot_func { dict_compression_set: Option>>>, keys: Option>>, row_count: usize, - nippy_jar: &mut NippyJar + nippy_jar: &mut NippyJar ) -> RethResult<()> where K: Key + Copy { diff --git a/crates/storage/db/src/snapshot/mask.rs b/crates/storage/db/src/snapshot/mask.rs new file mode 100644 index 000000000000..7b8cb016772c --- /dev/null +++ b/crates/storage/db/src/snapshot/mask.rs @@ -0,0 +1,90 @@ +use crate::table::Decompress; + +/// Generic Mask helper struct for selecting specific column values to read and decompress. +/// +/// #### Explanation: +/// +/// A `NippyJar` snapshot row can contain multiple column values. To specify the column values +/// to be read, a mask is utilized. +/// +/// For example, a snapshot with three columns, if the first and last columns are queried, the mask +/// `0b101` would be passed. To select only the second column, the mask `0b010` would be used. +/// +/// Since each snapshot has its own column distribution, different wrapper types are necessary. For +/// instance, `B256` might be the third column in the `Header` segment, while being the second +/// column in another segment. Hence, `Mask` would only be applicable to one of these +/// scenarios. +/// +/// Alongside, the column selector traits (eg. [`ColumnSelectorOne`]) this provides a structured way +/// to tie the types to be decoded to the mask necessary to query them. +#[derive(Debug)] +pub struct Mask(std::marker::PhantomData<(FIRST, SECOND, THIRD)>); + +macro_rules! add_segments { + ($($segment:tt),+) => { + paste::paste! { + $( + #[doc = concat!("Mask for ", stringify!($segment), " snapshot segment. See [`Mask`] for more.")] + #[derive(Debug)] + pub struct [<$segment Mask>](Mask); + )+ + } + }; +} +add_segments!(Header, Receipt, Transaction); + +/// Trait for specifying a mask to select one column value. +pub trait ColumnSelectorOne { + /// First desired column value + type FIRST: Decompress; + /// Mask to obtain desired values, should correspond to the order of columns in a snapshot. + const MASK: usize; +} + +/// Trait for specifying a mask to select two column values. +pub trait ColumnSelectorTwo { + /// First desired column value + type FIRST: Decompress; + /// Second desired column value + type SECOND: Decompress; + /// Mask to obtain desired values, should correspond to the order of columns in a snapshot. + const MASK: usize; +} + +/// Trait for specifying a mask to select three column values. +pub trait ColumnSelectorThree { + /// First desired column value + type FIRST: Decompress; + /// Second desired column value + type SECOND: Decompress; + /// Third desired column value + type THIRD: Decompress; + /// Mask to obtain desired values, should correspond to the order of columns in a snapshot. + const MASK: usize; +} + +#[macro_export] +/// Add mask to select `N` column values from a specific snapshot segment row. +macro_rules! add_snapshot_mask { + ($mask_struct:tt, $type1:ty, $mask:expr) => { + impl ColumnSelectorOne for $mask_struct<$type1> { + type FIRST = $type1; + const MASK: usize = $mask; + } + }; + ($mask_struct:tt, $type1:ty, $type2:ty, $mask:expr) => { + impl ColumnSelectorTwo for $mask_struct<$type1, $type2> { + type FIRST = $type1; + type SECOND = $type2; + const MASK: usize = $mask; + } + }; + ($mask_struct:tt, $type1:ty, $type2:ty, $type3:ty, $mask:expr) => { + impl ColumnSelectorTwo for $mask_struct<$type1, $type2, $type3> { + type FIRST = $type1; + type SECOND = $type2; + type THIRD = $type3; + const MASK: usize = $mask; + } + }; +} diff --git a/crates/storage/db/src/snapshot/masks.rs b/crates/storage/db/src/snapshot/masks.rs new file mode 100644 index 000000000000..aecf151ebd84 --- /dev/null +++ b/crates/storage/db/src/snapshot/masks.rs @@ -0,0 +1,28 @@ +use super::{ReceiptMask, TransactionMask}; +use crate::{ + add_snapshot_mask, + snapshot::mask::{ColumnSelectorOne, ColumnSelectorTwo, HeaderMask}, + table::Table, + CanonicalHeaders, HeaderTD, Receipts, Transactions, +}; +use reth_primitives::{BlockHash, Header}; + +// HEADER MASKS + +add_snapshot_mask!(HeaderMask, Header, 0b001); +add_snapshot_mask!(HeaderMask, ::Value, 0b010); +add_snapshot_mask!(HeaderMask, BlockHash, 0b100); + +add_snapshot_mask!(HeaderMask, Header, BlockHash, 0b101); +add_snapshot_mask!( + HeaderMask, + ::Value, + ::Value, + 0b110 +); + +// RECEIPT MASKS +add_snapshot_mask!(ReceiptMask, ::Value, 0b1); + +// TRANSACTION MASKS +add_snapshot_mask!(TransactionMask, ::Value, 0b1); diff --git a/crates/storage/db/src/snapshot/mod.rs b/crates/storage/db/src/snapshot/mod.rs new file mode 100644 index 000000000000..88eb67ac765c --- /dev/null +++ b/crates/storage/db/src/snapshot/mod.rs @@ -0,0 +1,12 @@ +//! reth's snapshot database table import and access + +mod generation; +pub use generation::*; + +mod cursor; +pub use cursor::SnapshotCursor; + +mod mask; +pub use mask::*; + +mod masks; diff --git a/crates/storage/db/src/tables/codecs/scale.rs b/crates/storage/db/src/tables/codecs/scale.rs index 6d42325b032d..a837dadef95d 100644 --- a/crates/storage/db/src/tables/codecs/scale.rs +++ b/crates/storage/db/src/tables/codecs/scale.rs @@ -31,8 +31,7 @@ where T: ScaleValue + parity_scale_codec::Decode + Sync + Send + std::fmt::Debug, { fn decompress>(value: B) -> Result { - parity_scale_codec::Decode::decode(&mut value.as_ref()) - .map_err(|_| DatabaseError::DecodeError) + parity_scale_codec::Decode::decode(&mut value.as_ref()).map_err(|_| DatabaseError::Decode) } } diff --git a/crates/storage/db/src/tables/mod.rs b/crates/storage/db/src/tables/mod.rs index 7171f137c6b5..b9502153dd0f 100644 --- a/crates/storage/db/src/tables/mod.rs +++ b/crates/storage/db/src/tables/mod.rs @@ -187,29 +187,22 @@ tables!([ (PruneCheckpoints, TableType::Table) ]); -#[macro_export] /// Macro to declare key value table. +#[macro_export] macro_rules! table { ($(#[$docs:meta])+ ( $table_name:ident ) $key:ty | $value:ty) => { $(#[$docs])+ /// - #[doc = concat!("Takes [`", stringify!($key), "`] as a key and returns [`", stringify!($value), "`]")] + #[doc = concat!("Takes [`", stringify!($key), "`] as a key and returns [`", stringify!($value), "`].")] #[derive(Clone, Copy, Debug, Default)] pub struct $table_name; impl $crate::table::Table for $table_name { - const NAME: &'static str = $table_name::const_name(); + const NAME: &'static str = stringify!($table_name); type Key = $key; type Value = $value; } - impl $table_name { - #[doc=concat!("Return ", stringify!($table_name), " as it is present inside the database.")] - pub const fn const_name() -> &'static str { - stringify!($table_name) - } - } - impl std::fmt::Display for $table_name { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "{}", stringify!($table_name)) @@ -225,7 +218,7 @@ macro_rules! dupsort { table!( $(#[$docs])+ /// - #[doc = concat!("`DUPSORT` table with subkey being: [`", stringify!($subkey), "`].")] + #[doc = concat!("`DUPSORT` table with subkey being: [`", stringify!($subkey), "`]")] ( $table_name ) $key | $value ); impl DupSort for $table_name { @@ -430,37 +423,36 @@ pub type StageId = String; #[cfg(test)] mod tests { + use super::*; use std::str::FromStr; - use crate::*; - const TABLES: [(TableType, &str); NUM_TABLES] = [ - (TableType::Table, CanonicalHeaders::const_name()), - (TableType::Table, HeaderTD::const_name()), - (TableType::Table, HeaderNumbers::const_name()), - (TableType::Table, Headers::const_name()), - (TableType::Table, BlockBodyIndices::const_name()), - (TableType::Table, BlockOmmers::const_name()), - (TableType::Table, BlockWithdrawals::const_name()), - (TableType::Table, TransactionBlock::const_name()), - (TableType::Table, Transactions::const_name()), - (TableType::Table, TxHashNumber::const_name()), - (TableType::Table, Receipts::const_name()), - (TableType::Table, PlainAccountState::const_name()), - (TableType::DupSort, PlainStorageState::const_name()), - (TableType::Table, Bytecodes::const_name()), - (TableType::Table, AccountHistory::const_name()), - (TableType::Table, StorageHistory::const_name()), - (TableType::DupSort, AccountChangeSet::const_name()), - (TableType::DupSort, StorageChangeSet::const_name()), - (TableType::Table, HashedAccount::const_name()), - (TableType::DupSort, HashedStorage::const_name()), - (TableType::Table, AccountsTrie::const_name()), - (TableType::DupSort, StoragesTrie::const_name()), - (TableType::Table, TxSenders::const_name()), - (TableType::Table, SyncStage::const_name()), - (TableType::Table, SyncStageProgress::const_name()), - (TableType::Table, PruneCheckpoints::const_name()), + (TableType::Table, CanonicalHeaders::NAME), + (TableType::Table, HeaderTD::NAME), + (TableType::Table, HeaderNumbers::NAME), + (TableType::Table, Headers::NAME), + (TableType::Table, BlockBodyIndices::NAME), + (TableType::Table, BlockOmmers::NAME), + (TableType::Table, BlockWithdrawals::NAME), + (TableType::Table, TransactionBlock::NAME), + (TableType::Table, Transactions::NAME), + (TableType::Table, TxHashNumber::NAME), + (TableType::Table, Receipts::NAME), + (TableType::Table, PlainAccountState::NAME), + (TableType::DupSort, PlainStorageState::NAME), + (TableType::Table, Bytecodes::NAME), + (TableType::Table, AccountHistory::NAME), + (TableType::Table, StorageHistory::NAME), + (TableType::DupSort, AccountChangeSet::NAME), + (TableType::DupSort, StorageChangeSet::NAME), + (TableType::Table, HashedAccount::NAME), + (TableType::DupSort, HashedStorage::NAME), + (TableType::Table, AccountsTrie::NAME), + (TableType::DupSort, StoragesTrie::NAME), + (TableType::Table, TxSenders::NAME), + (TableType::Table, SyncStage::NAME), + (TableType::Table, SyncStageProgress::NAME), + (TableType::Table, PruneCheckpoints::NAME), ]; #[test] diff --git a/crates/storage/db/src/tables/models/accounts.rs b/crates/storage/db/src/tables/models/accounts.rs index c3b8e6067748..57533f57783e 100644 --- a/crates/storage/db/src/tables/models/accounts.rs +++ b/crates/storage/db/src/tables/models/accounts.rs @@ -116,8 +116,7 @@ impl Encode for BlockNumberAddress { impl Decode for BlockNumberAddress { fn decode>(value: B) -> Result { let value = value.as_ref(); - let num = - u64::from_be_bytes(value[..8].try_into().map_err(|_| DatabaseError::DecodeError)?); + let num = u64::from_be_bytes(value[..8].try_into().map_err(|_| DatabaseError::Decode)?); let hash = Address::from_slice(&value[8..]); Ok(BlockNumberAddress((num, hash))) diff --git a/crates/storage/db/src/tables/models/integer_list.rs b/crates/storage/db/src/tables/models/integer_list.rs index 203957e78365..94746a12111e 100644 --- a/crates/storage/db/src/tables/models/integer_list.rs +++ b/crates/storage/db/src/tables/models/integer_list.rs @@ -19,6 +19,6 @@ impl Compress for IntegerList { impl Decompress for IntegerList { fn decompress>(value: B) -> Result { - IntegerList::from_bytes(value.as_ref()).map_err(|_| DatabaseError::DecodeError) + IntegerList::from_bytes(value.as_ref()).map_err(|_| DatabaseError::Decode) } } diff --git a/crates/storage/db/src/tables/models/mod.rs b/crates/storage/db/src/tables/models/mod.rs index 0db59058a02a..507151797d4b 100644 --- a/crates/storage/db/src/tables/models/mod.rs +++ b/crates/storage/db/src/tables/models/mod.rs @@ -23,8 +23,7 @@ pub use sharded_key::ShardedKey; macro_rules! impl_uints { ($($name:tt),+) => { $( - impl Encode for $name - { + impl Encode for $name { type Encoded = [u8; std::mem::size_of::<$name>()]; fn encode(self) -> Self::Encoded { @@ -32,12 +31,11 @@ macro_rules! impl_uints { } } - impl Decode for $name - { + impl Decode for $name { fn decode>(value: B) -> Result { Ok( $name::from_be_bytes( - value.as_ref().try_into().map_err(|_| $crate::DatabaseError::DecodeError)? + value.as_ref().try_into().map_err(|_| $crate::DatabaseError::Decode)? ) ) } @@ -50,6 +48,7 @@ impl_uints!(u64, u32, u16, u8); impl Encode for Vec { type Encoded = Vec; + fn encode(self) -> Self::Encoded { self } @@ -63,6 +62,7 @@ impl Decode for Vec { impl Encode for Address { type Encoded = [u8; 20]; + fn encode(self) -> Self::Encoded { self.0 .0 } @@ -76,6 +76,7 @@ impl Decode for Address { impl Encode for B256 { type Encoded = [u8; 32]; + fn encode(self) -> Self::Encoded { self.0 } @@ -83,12 +84,13 @@ impl Encode for B256 { impl Decode for B256 { fn decode>(value: B) -> Result { - Ok(B256::from_slice(value.as_ref())) + Ok(B256::new(value.as_ref().try_into().map_err(|_| DatabaseError::Decode)?)) } } impl Encode for String { type Encoded = Vec; + fn encode(self) -> Self::Encoded { self.into_bytes() } @@ -96,7 +98,7 @@ impl Encode for String { impl Decode for String { fn decode>(value: B) -> Result { - String::from_utf8(value.as_ref().to_vec()).map_err(|_| DatabaseError::DecodeError) + String::from_utf8(value.as_ref().to_vec()).map_err(|_| DatabaseError::Decode) } } diff --git a/crates/storage/db/src/tables/models/sharded_key.rs b/crates/storage/db/src/tables/models/sharded_key.rs index 5dedd349eb67..9c0664da44f2 100644 --- a/crates/storage/db/src/tables/models/sharded_key.rs +++ b/crates/storage/db/src/tables/models/sharded_key.rs @@ -69,7 +69,7 @@ where let tx_num_index = value.len() - 8; let highest_tx_number = u64::from_be_bytes( - value[tx_num_index..].try_into().map_err(|_| DatabaseError::DecodeError)?, + value[tx_num_index..].try_into().map_err(|_| DatabaseError::Decode)?, ); let key = T::decode(&value[..tx_num_index])?; diff --git a/crates/storage/db/src/tables/models/storage_sharded_key.rs b/crates/storage/db/src/tables/models/storage_sharded_key.rs index a5fd89b3794f..e0d9faa1f05d 100644 --- a/crates/storage/db/src/tables/models/storage_sharded_key.rs +++ b/crates/storage/db/src/tables/models/storage_sharded_key.rs @@ -63,7 +63,7 @@ impl Decode for StorageShardedKey { let tx_num_index = value.len() - 8; let highest_tx_number = u64::from_be_bytes( - value[tx_num_index..].try_into().map_err(|_| DatabaseError::DecodeError)?, + value[tx_num_index..].try_into().map_err(|_| DatabaseError::Decode)?, ); let address = Address::decode(&value[..20])?; let storage_key = B256::decode(&value[20..52])?; diff --git a/crates/storage/db/src/version.rs b/crates/storage/db/src/version.rs index db617445901d..380c170c54b7 100644 --- a/crates/storage/db/src/version.rs +++ b/crates/storage/db/src/version.rs @@ -15,14 +15,13 @@ pub const DB_VERSION: u64 = 1; #[allow(missing_docs)] #[derive(thiserror::Error, Debug)] pub enum DatabaseVersionError { - #[error("Unable to determine the version of the database, file is missing.")] + #[error("unable to determine the version of the database, file is missing")] MissingFile, - #[error("Unable to determine the version of the database, file is malformed.")] + #[error("unable to determine the version of the database, file is malformed")] MalformedFile, #[error( - "Breaking database change detected. \ - Your database version (v{version}) is incompatible with the latest database version (v{}).", - DB_VERSION.to_string() + "breaking database change detected: your database version (v{version}) \ + is incompatible with the latest database version (v{DB_VERSION})" )] VersionMismatch { version: u64 }, #[error("IO error occurred while reading {path}: {err}")] diff --git a/crates/storage/libmdbx-rs/src/transaction.rs b/crates/storage/libmdbx-rs/src/transaction.rs index bb6b42486069..61cf48c877b1 100644 --- a/crates/storage/libmdbx-rs/src/transaction.rs +++ b/crates/storage/libmdbx-rs/src/transaction.rs @@ -23,12 +23,15 @@ mod private { impl Sealed for RW {} } -pub trait TransactionKind: private::Sealed + Debug + 'static { +pub trait TransactionKind: private::Sealed + Send + Sync + Debug + 'static { #[doc(hidden)] const ONLY_CLEAN: bool; #[doc(hidden)] const OPEN_FLAGS: MDBX_txn_flags_t; + + #[doc(hidden)] + const IS_READ_ONLY: bool; } #[derive(Debug)] @@ -42,10 +45,12 @@ pub struct RW; impl TransactionKind for RO { const ONLY_CLEAN: bool = true; const OPEN_FLAGS: MDBX_txn_flags_t = MDBX_TXN_RDONLY; + const IS_READ_ONLY: bool = true; } impl TransactionKind for RW { const ONLY_CLEAN: bool = false; const OPEN_FLAGS: MDBX_txn_flags_t = MDBX_TXN_READWRITE; + const IS_READ_ONLY: bool = false; } /// An MDBX transaction. diff --git a/crates/storage/nippy-jar/Cargo.toml b/crates/storage/nippy-jar/Cargo.toml index 9be19824a6be..10926c3d8c44 100644 --- a/crates/storage/nippy-jar/Cargo.toml +++ b/crates/storage/nippy-jar/Cargo.toml @@ -27,16 +27,14 @@ sucds = "~0.8" memmap2 = "0.7.1" bincode = "1.3" serde = { version = "1.0", features = ["derive"] } -bytes.workspace = true -tempfile.workspace = true tracing = "0.1.0" -tracing-appender = "0.2" anyhow = "1.0" thiserror.workspace = true -hex = "*" +derive_more = "0.99" [dev-dependencies] rand = { version = "0.8", features = ["small_rng"] } +tempfile.workspace = true [features] diff --git a/crates/storage/nippy-jar/src/compression/zstd.rs b/crates/storage/nippy-jar/src/compression/zstd.rs index df1182f2834f..a70d566ca435 100644 --- a/crates/storage/nippy-jar/src/compression/zstd.rs +++ b/crates/storage/nippy-jar/src/compression/zstd.rs @@ -1,8 +1,10 @@ use crate::{compression::Compression, NippyJarError}; -use serde::{Deserialize, Serialize}; +use derive_more::Deref; +use serde::{Deserialize, Deserializer, Serialize, Serializer}; use std::{ fs::File, io::{Read, Write}, + sync::Arc, }; use tracing::*; use zstd::bulk::Compressor; @@ -17,7 +19,8 @@ pub enum ZstdState { Ready, } -#[derive(Debug, PartialEq, Serialize, Deserialize)] +#[cfg_attr(test, derive(PartialEq))] +#[derive(Debug, Serialize, Deserialize)] /// Zstd compression structure. Supports a compression dictionary per column. pub struct Zstd { /// State. Should be ready before compressing. @@ -29,7 +32,8 @@ pub struct Zstd { /// Max size of a dictionary pub(crate) max_dict_size: usize, /// List of column dictionaries. - pub(crate) raw_dictionaries: Option>, + #[serde(with = "dictionaries_serde")] + pub(crate) dictionaries: Option>>, /// Number of columns to compress. columns: usize, } @@ -42,7 +46,7 @@ impl Zstd { level: 0, use_dict, max_dict_size, - raw_dictionaries: None, + dictionaries: None, columns, } } @@ -52,31 +56,18 @@ impl Zstd { self } - /// If using dictionaries, creates a list of [`DecoderDictionary`]. - /// - /// Consumes `self.raw_dictionaries` in the process. - pub fn generate_decompress_dictionaries<'a>(&mut self) -> Option>> { - self.raw_dictionaries.take().map(|dicts| { - // TODO Can we use ::new instead, and avoid consuming? - dicts.iter().map(|dict| DecoderDictionary::copy(dict)).collect() - }) - } - - /// Creates a list of [`Decompressor`] using the given dictionaries. - pub fn generate_decompressors<'a>( - &self, - dictionaries: &'a [DecoderDictionary<'a>], - ) -> Result>, NippyJarError> { - debug_assert!(dictionaries.len() == self.columns); + /// Creates a list of [`Decompressor`] if using dictionaries. + pub fn decompressors(&self) -> Result>, NippyJarError> { + if let Some(dictionaries) = &self.dictionaries { + debug_assert!(dictionaries.len() == self.columns); + return dictionaries.decompressors() + } - Ok(dictionaries - .iter() - .map(Decompressor::with_prepared_dictionary) - .collect::, _>>()?) + Ok(vec![]) } /// If using dictionaries, creates a list of [`Compressor`]. - pub fn generate_compressors<'a>(&self) -> Result>>, NippyJarError> { + pub fn compressors(&self) -> Result>>, NippyJarError> { match self.state { ZstdState::PendingDictionary => Err(NippyJarError::CompressorNotReady), ZstdState::Ready => { @@ -84,18 +75,11 @@ impl Zstd { return Ok(None) } - let mut compressors = None; - if let Some(dictionaries) = &self.raw_dictionaries { + if let Some(dictionaries) = &self.dictionaries { debug!(target: "nippy-jar", count=?dictionaries.len(), "Generating ZSTD compressor dictionaries."); - - let mut cmp = Vec::with_capacity(dictionaries.len()); - - for dict in dictionaries { - cmp.push(Compressor::with_dictionary(0, dict)?); - } - compressors = Some(cmp) + return Ok(Some(dictionaries.compressors()?)) } - Ok(compressors) + Ok(None) } } } @@ -243,9 +227,144 @@ impl Compression for Zstd { debug_assert_eq!(dictionaries.len(), self.columns); - self.raw_dictionaries = Some(dictionaries); + self.dictionaries = Some(Arc::new(ZstdDictionaries::new(dictionaries))); self.state = ZstdState::Ready; Ok(()) } } + +mod dictionaries_serde { + use super::*; + + pub fn serialize( + dictionaries: &Option>>, + serializer: S, + ) -> Result + where + S: Serializer, + { + match dictionaries { + Some(dicts) => serializer.serialize_some(dicts.as_ref()), + None => serializer.serialize_none(), + } + } + + pub fn deserialize<'de, D>( + deserializer: D, + ) -> Result>>, D::Error> + where + D: Deserializer<'de>, + { + let dictionaries: Option> = Option::deserialize(deserializer)?; + Ok(dictionaries.map(|dicts| Arc::new(ZstdDictionaries::load(dicts)))) + } +} + +/// List of [`ZstdDictionary`] +#[cfg_attr(test, derive(PartialEq))] +#[derive(Serialize, Deserialize, Deref)] +pub struct ZstdDictionaries<'a>(Vec>); + +impl<'a> std::fmt::Debug for ZstdDictionaries<'a> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("ZstdDictionaries").field("num", &self.len()).finish_non_exhaustive() + } +} + +impl<'a> ZstdDictionaries<'a> { + /// Creates [`ZstdDictionaries`]. + pub fn new(raw: Vec) -> Self { + Self(raw.into_iter().map(ZstdDictionary::Raw).collect()) + } + + /// Loads a list [`RawDictionary`] into a list of [`ZstdDictionary::Loaded`]. + pub fn load(raw: Vec) -> Self { + Self( + raw.into_iter() + .map(|dict| ZstdDictionary::Loaded(DecoderDictionary::copy(&dict))) + .collect(), + ) + } + + /// Creates a list of decompressors from a list of [`ZstdDictionary::Loaded`]. + pub fn decompressors(&self) -> Result>, NippyJarError> { + Ok(self + .iter() + .flat_map(|dict| { + dict.loaded() + .ok_or(NippyJarError::DictionaryNotLoaded) + .map(Decompressor::with_prepared_dictionary) + }) + .collect::, _>>()?) + } + + /// Creates a list of compressors from a list of [`ZstdDictionary::Raw`]. + pub fn compressors(&self) -> Result>, NippyJarError> { + Ok(self + .iter() + .flat_map(|dict| { + dict.raw() + .ok_or(NippyJarError::CompressorNotAllowed) + .map(|dict| Compressor::with_dictionary(0, dict)) + }) + .collect::, _>>()?) + } +} + +/// A Zstd dictionary. It's created and serialized with [`ZstdDictionary::Raw`], and deserialized as +/// [`ZstdDictionary::Loaded`]. +pub enum ZstdDictionary<'a> { + Raw(RawDictionary), + Loaded(DecoderDictionary<'a>), +} + +impl<'a> ZstdDictionary<'a> { + /// Returns a reference to the expected `RawDictionary` + pub fn raw(&self) -> Option<&RawDictionary> { + match self { + ZstdDictionary::Raw(dict) => Some(dict), + ZstdDictionary::Loaded(_) => None, + } + } + + /// Returns a reference to the expected `DecoderDictionary` + pub fn loaded(&self) -> Option<&DecoderDictionary<'_>> { + match self { + ZstdDictionary::Raw(_) => None, + ZstdDictionary::Loaded(dict) => Some(dict), + } + } +} + +impl<'de, 'a> Deserialize<'de> for ZstdDictionary<'a> { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + let dict = RawDictionary::deserialize(deserializer)?; + Ok(Self::Loaded(DecoderDictionary::copy(&dict))) + } +} + +impl<'a> Serialize for ZstdDictionary<'a> { + fn serialize(&self, serializer: S) -> Result + where + S: Serializer, + { + match self { + ZstdDictionary::Raw(r) => r.serialize(serializer), + ZstdDictionary::Loaded(_) => unreachable!(), + } + } +} + +#[cfg(test)] +impl<'a> PartialEq for ZstdDictionary<'a> { + fn eq(&self, other: &Self) -> bool { + if let (Self::Raw(a), Self::Raw(b)) = (self, &other) { + return a == b + } + unimplemented!("`DecoderDictionary` can't be compared. So comparison should be done after decompressing a value."); + } +} diff --git a/crates/storage/nippy-jar/src/cursor.rs b/crates/storage/nippy-jar/src/cursor.rs index 19e39fa0cd2b..160beb5df5fb 100644 --- a/crates/storage/nippy-jar/src/cursor.rs +++ b/crates/storage/nippy-jar/src/cursor.rs @@ -1,24 +1,19 @@ use crate::{ - compression::{Compression, Zstd}, - InclusionFilter, NippyJar, NippyJarError, PerfectHashingFunction, RefRow, + compression::{Compression, Compressors, Zstd}, + InclusionFilter, MmapHandle, NippyJar, NippyJarError, PerfectHashingFunction, RefRow, }; -use memmap2::Mmap; use serde::{de::Deserialize, ser::Serialize}; -use std::{fs::File, ops::Range}; +use std::ops::Range; use sucds::int_vectors::Access; use zstd::bulk::Decompressor; /// Simple cursor implementation to retrieve data from [`NippyJar`]. +#[derive(Clone)] pub struct NippyJarCursor<'a, H = ()> { /// [`NippyJar`] which holds most of the required configuration to read from the file. jar: &'a NippyJar, - /// Optional dictionary decompressors. - zstd_decompressors: Option>>, /// Data file. - #[allow(unused)] - file_handle: File, - /// Data file. - mmap_handle: Mmap, + mmap_handle: MmapHandle, /// Internal buffer to unload data to without reallocating memory on each retrieval. internal_buffer: Vec, /// Cursor row position. @@ -36,28 +31,43 @@ where impl<'a, H> NippyJarCursor<'a, H> where - H: Send + Sync + Serialize + for<'b> Deserialize<'b> + std::fmt::Debug, + H: Send + Sync + Serialize + for<'b> Deserialize<'b> + std::fmt::Debug + 'static, { - pub fn new( + pub fn new(jar: &'a NippyJar) -> Result { + let max_row_size = jar.max_row_size; + Ok(NippyJarCursor { + jar, + mmap_handle: jar.open_data()?, + // Makes sure that we have enough buffer capacity to decompress any row of data. + internal_buffer: Vec::with_capacity(max_row_size), + row: 0, + }) + } + + pub fn with_handle( jar: &'a NippyJar, - zstd_decompressors: Option>>, + mmap_handle: MmapHandle, ) -> Result { - let file = File::open(jar.data_path())?; - - // SAFETY: File is read-only and its descriptor is kept alive as long as the mmap handle. - let mmap = unsafe { Mmap::map(&file)? }; - + let max_row_size = jar.max_row_size; Ok(NippyJarCursor { jar, - zstd_decompressors, - file_handle: file, - mmap_handle: mmap, + mmap_handle, // Makes sure that we have enough buffer capacity to decompress any row of data. - internal_buffer: Vec::with_capacity(jar.max_row_size), + internal_buffer: Vec::with_capacity(max_row_size), row: 0, }) } + /// Returns a reference to the related [`NippyJar`] + pub fn jar(&self) -> &NippyJar { + self.jar + } + + /// Returns current row index of the cursor + pub fn row_index(&self) -> u64 { + self.row + } + /// Resets cursor to the beginning. pub fn reset(&mut self) { self.row = 0; @@ -127,15 +137,16 @@ where } /// Returns a row, searching it by a key used during [`NippyJar::prepare_index`] by using a - /// `MASK` to only read certain columns from the row. + /// `mask` to only read certain columns from the row. /// /// **May return false positives.** /// /// Example usage would be querying a transactions file with a transaction hash which is **NOT** /// stored in file. - pub fn row_by_key_with_cols( + pub fn row_by_key_with_cols( &mut self, key: &[u8], + mask: usize, ) -> Result>, NippyJarError> { if let (Some(filter), Some(phf)) = (&self.jar.filter, &self.jar.phf) { // TODO: is it worth to parallize both? @@ -149,7 +160,7 @@ where .offsets_index .access(row_index as usize) .expect("built from same set") as u64; - return self.next_row_with_cols::() + return self.next_row_with_cols(mask) } } } else { @@ -159,21 +170,20 @@ where Ok(None) } - /// Returns a row by its number by using a `MASK` to only read certain columns from the row. - pub fn row_by_number_with_cols( + /// Returns a row by its number by using a `mask` to only read certain columns from the row. + pub fn row_by_number_with_cols( &mut self, row: usize, + mask: usize, ) -> Result>, NippyJarError> { self.row = row as u64; - self.next_row_with_cols::() + self.next_row_with_cols(mask) } /// Returns the current value and advances the row. /// - /// Uses a `MASK` to only read certain columns from the row. - pub fn next_row_with_cols( - &mut self, - ) -> Result>, NippyJarError> { + /// Uses a `mask` to only read certain columns from the row. + pub fn next_row_with_cols(&mut self, mask: usize) -> Result>, NippyJarError> { self.internal_buffer.clear(); if self.row as usize * self.jar.columns >= self.jar.offsets.len() { @@ -181,10 +191,11 @@ where return Ok(None) } - let mut row = Vec::with_capacity(COLUMNS); + let columns = self.jar.columns; + let mut row = Vec::with_capacity(columns); - for column in 0..COLUMNS { - if MASK & (1 << column) != 0 { + for column in 0..columns { + if mask & (1 << column) != 0 { self.read_value(column, &mut row)? } } @@ -218,23 +229,32 @@ where value_offset..next_value_offset }; - if let Some(zstd_dict_decompressors) = self.zstd_decompressors.as_mut() { - let from: usize = self.internal_buffer.len(); - if let Some(decompressor) = zstd_dict_decompressors.get_mut(column) { - Zstd::decompress_with_dictionary( - &self.mmap_handle[column_offset_range], - &mut self.internal_buffer, - decompressor, - )?; - } - let to = self.internal_buffer.len(); - - row.push(ValueRange::Internal(from..to)); - } else if let Some(compression) = self.jar.compressor() { - // Uses the chosen default decompressor + if let Some(compression) = self.jar.compressor() { let from = self.internal_buffer.len(); - compression - .decompress_to(&self.mmap_handle[column_offset_range], &mut self.internal_buffer)?; + match compression { + Compressors::Zstd(z) if z.use_dict => { + // If we are here, then for sure we have the necessary dictionaries and they're + // loaded (happens during deserialization). Otherwise, there's an issue + // somewhere else and we can't recover here anyway. + let dictionaries = z.dictionaries.as_ref().expect("dictionaries to exist") + [column] + .loaded() + .expect("dictionary to be loaded"); + let mut decompressor = Decompressor::with_prepared_dictionary(dictionaries)?; + Zstd::decompress_with_dictionary( + &self.mmap_handle[column_offset_range], + &mut self.internal_buffer, + &mut decompressor, + )?; + } + _ => { + // Uses the chosen default decompressor + compression.decompress_to( + &self.mmap_handle[column_offset_range], + &mut self.internal_buffer, + )?; + } + } let to = self.internal_buffer.len(); row.push(ValueRange::Internal(from..to)); diff --git a/crates/storage/nippy-jar/src/error.rs b/crates/storage/nippy-jar/src/error.rs index b17d3d2163a1..dbb37c1f868d 100644 --- a/crates/storage/nippy-jar/src/error.rs +++ b/crates/storage/nippy-jar/src/error.rs @@ -13,28 +13,32 @@ pub enum NippyJarError { Bincode(#[from] Box), #[error(transparent)] EliasFano(#[from] anyhow::Error), - #[error("Compression was enabled, but it's not ready yet.")] + #[error("compression was enabled, but it's not ready yet")] CompressorNotReady, - #[error("Decompression was enabled, but it's not ready yet.")] + #[error("decompression was enabled, but it's not ready yet")] DecompressorNotReady, - #[error("Number of columns does not match. {0} != {1}")] + #[error("number of columns does not match: {0} != {1}")] ColumnLenMismatch(usize, usize), - #[error("UnexpectedMissingValue row: {0} col:{1}")] + #[error("unexpected missing value: row:col {0}:{1}")] UnexpectedMissingValue(u64, u64), #[error(transparent)] FilterError(#[from] cuckoofilter::CuckooError), - #[error("NippyJar initialized without filter.")] + #[error("nippy jar initialized without filter")] FilterMissing, - #[error("Filter has reached max capacity.")] + #[error("filter has reached max capacity")] FilterMaxCapacity, - #[error("Cuckoo was not properly initialized after loaded.")] + #[error("cuckoo was not properly initialized after loaded")] FilterCuckooNotLoaded, - #[error("Perfect hashing function doesn't have any keys added.")] + #[error("perfect hashing function doesn't have any keys added")] PHFMissingKeys, - #[error("NippyJar initialized without perfect hashing function.")] + #[error("nippy jar initialized without perfect hashing function")] PHFMissing, - #[error("NippyJar was built without an index.")] + #[error("nippy jar was built without an index")] UnsupportedFilterQuery, - #[error("Compression or decompression requires a bigger destination output.")] + #[error("compression or decompression requires a bigger destination output")] OutputTooSmall, + #[error("Dictionary is not loaded.")] + DictionaryNotLoaded, + #[error("It's not possible to generate a compressor after loading a dictionary.")] + CompressorNotAllowed, } diff --git a/crates/storage/nippy-jar/src/lib.rs b/crates/storage/nippy-jar/src/lib.rs index 7544e3c29e53..c7515305d76c 100644 --- a/crates/storage/nippy-jar/src/lib.rs +++ b/crates/storage/nippy-jar/src/lib.rs @@ -10,6 +10,7 @@ #![deny(unused_must_use, rust_2018_idioms)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] +use memmap2::Mmap; use serde::{Deserialize, Serialize}; use std::{ clone::Clone, @@ -17,7 +18,9 @@ use std::{ fs::File, io::{Seek, Write}, marker::Sync, + ops::Deref, path::{Path, PathBuf}, + sync::Arc, }; use sucds::{ int_vectors::PrefixSummedEliasFano, @@ -247,6 +250,11 @@ where .join(format!("{}.idx", data_path.file_name().expect("exists").to_string_lossy())) } + /// Returns a [`MmapHandle`] of the data file + pub fn open_data(&self) -> Result { + MmapHandle::new(self.data_path()) + } + /// If required, prepares any compression algorithm to an early pass of the data. pub fn prepare_compression( &mut self, @@ -323,7 +331,7 @@ where // implementation let mut maybe_zstd_compressors = None; if let Some(Compressors::Zstd(zstd)) = &self.compressor { - maybe_zstd_compressors = zstd.generate_compressors()?; + maybe_zstd_compressors = zstd.compressors()?; } // Temporary buffer to avoid multiple reallocations if compressing to a buffer (eg. zstd w/ @@ -394,6 +402,9 @@ where column_iterators = iterators.into_iter(); } + // drops immutable borrow + drop(maybe_zstd_compressors); + // Write offsets and offset index to file self.freeze_offsets(offsets)?; @@ -484,6 +495,34 @@ where } } +/// Holds an `Arc` over a file and its associated mmap handle. +#[derive(Debug, Clone)] +pub struct MmapHandle { + /// File descriptor. Needs to be kept alive as long as the mmap handle. + #[allow(unused)] + file: Arc, + /// Mmap handle. + mmap: Arc, +} + +impl MmapHandle { + pub fn new(path: impl AsRef) -> Result { + let file = File::open(path)?; + + // SAFETY: File is read-only and its descriptor is kept alive as long as the mmap handle. + let mmap = unsafe { Mmap::map(&file)? }; + + Ok(Self { file: Arc::new(file), mmap: Arc::new(mmap) }) + } +} + +impl Deref for MmapHandle { + type Target = Mmap; + fn deref(&self) -> &Self::Target { + &self.mmap + } +} + #[cfg(test)] mod tests { use super::*; @@ -622,7 +661,7 @@ mod tests { assert!(nippy.compressor().is_some()); if let Some(Compressors::Zstd(zstd)) = &mut nippy.compressor_mut() { - assert!(matches!(zstd.generate_compressors(), Err(NippyJarError::CompressorNotReady))); + assert!(matches!(zstd.compressors(), Err(NippyJarError::CompressorNotReady))); // Make sure the number of column iterators match the initial set up ones. assert!(matches!( @@ -642,27 +681,26 @@ mod tests { if let Some(Compressors::Zstd(zstd)) = &nippy.compressor() { assert!(matches!( - (&zstd.state, zstd.raw_dictionaries.as_ref().map(|dict| dict.len())), + (&zstd.state, zstd.dictionaries.as_ref().map(|dict| dict.len())), (compression::ZstdState::Ready, Some(columns)) if columns == num_columns )); } nippy.freeze(vec![clone_with_result(&col1), clone_with_result(&col2)], num_rows).unwrap(); - let mut loaded_nippy = NippyJar::load_without_header(file_path.path()).unwrap(); - assert_eq!(nippy, loaded_nippy); - - let mut dicts = vec![]; - if let Some(Compressors::Zstd(zstd)) = loaded_nippy.compressor_mut() { - dicts = zstd.generate_decompress_dictionaries().unwrap() - } + let loaded_nippy = NippyJar::load_without_header(file_path.path()).unwrap(); + assert_eq!(nippy.version, loaded_nippy.version); + assert_eq!(nippy.columns, loaded_nippy.columns); + assert_eq!(nippy.filter, loaded_nippy.filter); + assert_eq!(nippy.phf, loaded_nippy.phf); + assert_eq!(nippy.offsets_index, loaded_nippy.offsets_index); + assert_eq!(nippy.offsets, loaded_nippy.offsets); + assert_eq!(nippy.max_row_size, loaded_nippy.max_row_size); + assert_eq!(nippy.path, loaded_nippy.path); if let Some(Compressors::Zstd(zstd)) = loaded_nippy.compressor() { - let mut cursor = NippyJarCursor::new( - &loaded_nippy, - Some(zstd.generate_decompressors(&dicts).unwrap()), - ) - .unwrap(); + assert!(zstd.use_dict); + let mut cursor = NippyJarCursor::new(&loaded_nippy).unwrap(); // Iterate over compressed values and compare let mut row_index = 0usize; @@ -673,6 +711,8 @@ mod tests { ); row_index += 1; } + } else { + panic!("Expected Zstd compressor") } } @@ -695,7 +735,7 @@ mod tests { assert_eq!(nippy, loaded_nippy); if let Some(Compressors::Lz4(_)) = loaded_nippy.compressor() { - let mut cursor = NippyJarCursor::new(&loaded_nippy, None).unwrap(); + let mut cursor = NippyJarCursor::new(&loaded_nippy).unwrap(); // Iterate over compressed values and compare let mut row_index = 0usize; @@ -733,7 +773,7 @@ mod tests { if let Some(Compressors::Zstd(zstd)) = loaded_nippy.compressor() { assert!(!zstd.use_dict); - let mut cursor = NippyJarCursor::new(&loaded_nippy, None).unwrap(); + let mut cursor = NippyJarCursor::new(&loaded_nippy).unwrap(); // Iterate over compressed values and compare let mut row_index = 0usize; @@ -782,23 +822,15 @@ mod tests { // Read file { - let mut loaded_nippy = NippyJar::::load(file_path.path()).unwrap(); + let loaded_nippy = NippyJar::::load(file_path.path()).unwrap(); assert!(loaded_nippy.compressor().is_some()); assert!(loaded_nippy.filter.is_some()); assert!(loaded_nippy.phf.is_some()); assert_eq!(loaded_nippy.user_header().block_start, block_start); - let mut dicts = vec![]; - if let Some(Compressors::Zstd(zstd)) = loaded_nippy.compressor_mut() { - dicts = zstd.generate_decompress_dictionaries().unwrap() - } - if let Some(Compressors::Zstd(zstd)) = loaded_nippy.compressor() { - let mut cursor = NippyJarCursor::new( - &loaded_nippy, - Some(zstd.generate_decompressors(&dicts).unwrap()), - ) - .unwrap(); + if let Some(Compressors::Zstd(_zstd)) = loaded_nippy.compressor() { + let mut cursor = NippyJarCursor::new(&loaded_nippy).unwrap(); // Iterate over compressed values and compare let mut row_num = 0usize; @@ -851,7 +883,7 @@ mod tests { .with_cuckoo_filter(col1.len()) .with_fmph(); - nippy.prepare_compression(data.clone()).unwrap(); + nippy.prepare_compression(data).unwrap(); nippy.prepare_index(clone_with_result(&col1), col1.len()).unwrap(); nippy .freeze(vec![clone_with_result(&col1), clone_with_result(&col2)], num_rows) @@ -860,18 +892,10 @@ mod tests { // Read file { - let mut loaded_nippy = NippyJar::load_without_header(file_path.path()).unwrap(); + let loaded_nippy = NippyJar::load_without_header(file_path.path()).unwrap(); - let mut dicts = vec![]; - if let Some(Compressors::Zstd(zstd)) = loaded_nippy.compressor_mut() { - dicts = zstd.generate_decompress_dictionaries().unwrap() - } - if let Some(Compressors::Zstd(zstd)) = loaded_nippy.compressor() { - let mut cursor = NippyJarCursor::new( - &loaded_nippy, - Some(zstd.generate_decompressors(&dicts).unwrap()), - ) - .unwrap(); + if let Some(Compressors::Zstd(_zstd)) = loaded_nippy.compressor() { + let mut cursor = NippyJarCursor::new(&loaded_nippy).unwrap(); // Shuffled for chaos. let mut data = col1.iter().zip(col2.iter()).enumerate().collect::>(); @@ -879,14 +903,13 @@ mod tests { // Imagine `Blocks` snapshot file has two columns: `Block | StoredWithdrawals` const BLOCKS_FULL_MASK: usize = 0b11; - const BLOCKS_COLUMNS: usize = 2; // Read both columns for (row_num, (v0, v1)) in &data { // Simulates `by_hash` queries by iterating col1 values, which were used to // create the inner index. let row_by_value = cursor - .row_by_key_with_cols::(v0) + .row_by_key_with_cols(v0, BLOCKS_FULL_MASK) .unwrap() .unwrap() .iter() @@ -896,7 +919,7 @@ mod tests { // Simulates `by_number` queries let row_by_num = cursor - .row_by_number_with_cols::(*row_num) + .row_by_number_with_cols(*row_num, BLOCKS_FULL_MASK) .unwrap() .unwrap(); assert_eq!(row_by_value, row_by_num); @@ -908,7 +931,7 @@ mod tests { // Simulates `by_hash` queries by iterating col1 values, which were used to // create the inner index. let row_by_value = cursor - .row_by_key_with_cols::(v0) + .row_by_key_with_cols(v0, BLOCKS_BLOCK_MASK) .unwrap() .unwrap() .iter() @@ -919,7 +942,7 @@ mod tests { // Simulates `by_number` queries let row_by_num = cursor - .row_by_number_with_cols::(*row_num) + .row_by_number_with_cols(*row_num, BLOCKS_BLOCK_MASK) .unwrap() .unwrap(); assert_eq!(row_by_num.len(), 1); @@ -932,7 +955,7 @@ mod tests { // Simulates `by_hash` queries by iterating col1 values, which were used to // create the inner index. let row_by_value = cursor - .row_by_key_with_cols::(v0) + .row_by_key_with_cols(v0, BLOCKS_WITHDRAWAL_MASK) .unwrap() .unwrap() .iter() @@ -943,7 +966,7 @@ mod tests { // Simulates `by_number` queries let row_by_num = cursor - .row_by_number_with_cols::(*row_num) + .row_by_number_with_cols(*row_num, BLOCKS_WITHDRAWAL_MASK) .unwrap() .unwrap(); assert_eq!(row_by_num.len(), 1); @@ -956,14 +979,14 @@ mod tests { // Simulates `by_hash` queries by iterating col1 values, which were used to // create the inner index. assert!(cursor - .row_by_key_with_cols::(v0) + .row_by_key_with_cols(v0, BLOCKS_EMPTY_MASK) .unwrap() .unwrap() .is_empty()); // Simulates `by_number` queries assert!(cursor - .row_by_number_with_cols::(*row_num) + .row_by_number_with_cols(*row_num, BLOCKS_EMPTY_MASK) .unwrap() .unwrap() .is_empty()); diff --git a/crates/storage/provider/Cargo.toml b/crates/storage/provider/Cargo.toml index c8c7b4fcb250..16693d90e135 100644 --- a/crates/storage/provider/Cargo.toml +++ b/crates/storage/provider/Cargo.toml @@ -25,11 +25,16 @@ tokio-stream = { workspace = true, features = ["sync"] } # tracing tracing.workspace = true +# metrics +reth-metrics.workspace = true +metrics.workspace = true + # misc auto_impl = "1.0" itertools.workspace = true pin-project.workspace = true parking_lot.workspace = true +dashmap = { version = "5.5", features = ["inline"] } # test-utils alloy-rlp = { workspace = true, optional = true } diff --git a/crates/storage/provider/src/bundle_state/bundle_state_with_receipts.rs b/crates/storage/provider/src/bundle_state/bundle_state_with_receipts.rs index eb998cc432ea..ba98104d81a6 100644 --- a/crates/storage/provider/src/bundle_state/bundle_state_with_receipts.rs +++ b/crates/storage/provider/src/bundle_state/bundle_state_with_receipts.rs @@ -376,15 +376,16 @@ mod tests { use crate::{AccountReader, BundleStateWithReceipts, ProviderFactory}; use reth_db::{ cursor::{DbCursorRO, DbDupCursorRO}, + database::Database, models::{AccountBeforeTx, BlockNumberAddress}, tables, test_utils::create_test_rw_db, transaction::DbTx, - DatabaseEnv, }; use reth_primitives::{ revm::compat::into_reth_acc, Address, Receipt, Receipts, StorageEntry, B256, MAINNET, U256, }; + use reth_trie::test_utils::state_root; use revm::{ db::{ states::{ @@ -392,18 +393,19 @@ mod tests { changes::PlainStorageRevert, PlainStorageChangeset, }, - BundleState, + BundleState, EmptyDB, }, primitives::{ - Account, AccountInfo as RevmAccountInfo, AccountStatus, HashMap, StorageSlot, + Account as RevmAccount, AccountInfo as RevmAccountInfo, AccountStatus, HashMap, + StorageSlot, }, - CacheState, DatabaseCommit, State, + DatabaseCommit, State, }; - use std::sync::Arc; + use std::collections::BTreeMap; #[test] fn write_to_db_account_info() { - let db: Arc = create_test_rw_db(); + let db = create_test_rw_db(); let factory = ProviderFactory::new(db, MAINNET.clone()); let provider = factory.provider_rw().unwrap(); @@ -415,16 +417,14 @@ mod tests { let account_b_changed = RevmAccountInfo { balance: U256::from(3), nonce: 3, ..Default::default() }; - let mut cache_state = CacheState::new(true); - cache_state.insert_not_existing(address_a); - cache_state.insert_account(address_b, account_b.clone()); - let mut state = - State::builder().with_cached_prestate(cache_state).with_bundle_update().build(); + let mut state = State::builder().with_bundle_update().build(); + state.insert_not_existing(address_a); + state.insert_account(address_b, account_b.clone()); // 0x00.. is created state.commit(HashMap::from([( address_a, - Account { + RevmAccount { info: account_a.clone(), status: AccountStatus::Touched | AccountStatus::Created, storage: HashMap::default(), @@ -434,7 +434,7 @@ mod tests { // 0xff.. is changed (balance + 1, nonce + 1) state.commit(HashMap::from([( address_b, - Account { + RevmAccount { info: account_b_changed.clone(), status: AccountStatus::Touched, storage: HashMap::default(), @@ -490,15 +490,13 @@ mod tests { "Account B changeset is wrong" ); - let mut cache_state = CacheState::new(true); - cache_state.insert_account(address_b, account_b_changed.clone()); - let mut state = - State::builder().with_cached_prestate(cache_state).with_bundle_update().build(); + let mut state = State::builder().with_bundle_update().build(); + state.insert_account(address_b, account_b_changed.clone()); // 0xff.. is destroyed state.commit(HashMap::from([( address_b, - Account { + RevmAccount { status: AccountStatus::Touched | AccountStatus::SelfDestructed, info: account_b_changed, storage: HashMap::default(), @@ -546,7 +544,7 @@ mod tests { #[test] fn write_to_db_storage() { - let db: Arc = create_test_rw_db(); + let db = create_test_rw_db(); let factory = ProviderFactory::new(db, MAINNET.clone()); let provider = factory.provider_rw().unwrap(); @@ -555,20 +553,18 @@ mod tests { let account_b = RevmAccountInfo { balance: U256::from(2), nonce: 2, ..Default::default() }; - let mut cache_state = CacheState::new(true); - cache_state.insert_not_existing(address_a); - cache_state.insert_account_with_storage( + let mut state = State::builder().with_bundle_update().build(); + state.insert_not_existing(address_a); + state.insert_account_with_storage( address_b, account_b.clone(), HashMap::from([(U256::from(1), U256::from(1))]), ); - let mut state = - State::builder().with_cached_prestate(cache_state).with_bundle_update().build(); state.commit(HashMap::from([ ( address_a, - Account { + RevmAccount { status: AccountStatus::Touched | AccountStatus::Created, info: RevmAccountInfo::default(), // 0x00 => 0 => 1 @@ -587,7 +583,7 @@ mod tests { ), ( address_b, - Account { + RevmAccount { status: AccountStatus::Touched, info: account_b, // 0x01 => 1 => 2 @@ -689,14 +685,12 @@ mod tests { ); // Delete account A - let mut cache_state = CacheState::new(true); - cache_state.insert_account(address_a, RevmAccountInfo::default()); - let mut state = - State::builder().with_cached_prestate(cache_state).with_bundle_update().build(); + let mut state = State::builder().with_bundle_update().build(); + state.insert_account(address_a, RevmAccountInfo::default()); state.commit(HashMap::from([( address_a, - Account { + RevmAccount { status: AccountStatus::Touched | AccountStatus::SelfDestructed, info: RevmAccountInfo::default(), storage: HashMap::default(), @@ -739,7 +733,7 @@ mod tests { #[test] fn write_to_db_multiple_selfdestructs() { - let db: Arc = create_test_rw_db(); + let db = create_test_rw_db(); let factory = ProviderFactory::new(db, MAINNET.clone()); let provider = factory.provider_rw().unwrap(); @@ -747,13 +741,11 @@ mod tests { let account_info = RevmAccountInfo { nonce: 1, ..Default::default() }; // Block #0: initial state. - let mut cache_state = CacheState::new(true); - cache_state.insert_not_existing(address1); - let mut init_state = - State::builder().with_cached_prestate(cache_state).with_bundle_update().build(); + let mut init_state = State::builder().with_bundle_update().build(); + init_state.insert_not_existing(address1); init_state.commit(HashMap::from([( address1, - Account { + RevmAccount { info: account_info.clone(), status: AccountStatus::Touched | AccountStatus::Created, // 0x00 => 0 => 1 @@ -775,19 +767,17 @@ mod tests { .write_to_db(provider.tx_ref(), OriginalValuesKnown::Yes) .expect("Could not write init bundle state to DB"); - let mut cache_state = CacheState::new(true); - cache_state.insert_account_with_storage( + let mut state = State::builder().with_bundle_update().build(); + state.insert_account_with_storage( address1, account_info.clone(), HashMap::from([(U256::ZERO, U256::from(1)), (U256::from(1), U256::from(2))]), ); - let mut state = - State::builder().with_cached_prestate(cache_state).with_bundle_update().build(); // Block #1: change storage. state.commit(HashMap::from([( address1, - Account { + RevmAccount { status: AccountStatus::Touched, info: account_info.clone(), // 0x00 => 1 => 2 @@ -805,7 +795,7 @@ mod tests { // Block #2: destroy account. state.commit(HashMap::from([( address1, - Account { + RevmAccount { status: AccountStatus::Touched | AccountStatus::SelfDestructed, info: account_info.clone(), storage: HashMap::default(), @@ -816,7 +806,7 @@ mod tests { // Block #3: re-create account and change storage. state.commit(HashMap::from([( address1, - Account { + RevmAccount { status: AccountStatus::Touched | AccountStatus::Created, info: account_info.clone(), storage: HashMap::default(), @@ -827,7 +817,7 @@ mod tests { // Block #4: change storage. state.commit(HashMap::from([( address1, - Account { + RevmAccount { status: AccountStatus::Touched, info: account_info.clone(), // 0x00 => 0 => 2 @@ -854,7 +844,7 @@ mod tests { // Block #5: Destroy account again. state.commit(HashMap::from([( address1, - Account { + RevmAccount { status: AccountStatus::Touched | AccountStatus::SelfDestructed, info: account_info.clone(), storage: HashMap::default(), @@ -865,7 +855,7 @@ mod tests { // Block #6: Create, change, destroy and re-create in the same block. state.commit(HashMap::from([( address1, - Account { + RevmAccount { status: AccountStatus::Touched | AccountStatus::Created, info: account_info.clone(), storage: HashMap::default(), @@ -873,7 +863,7 @@ mod tests { )])); state.commit(HashMap::from([( address1, - Account { + RevmAccount { status: AccountStatus::Touched, info: account_info.clone(), // 0x00 => 0 => 2 @@ -885,7 +875,7 @@ mod tests { )])); state.commit(HashMap::from([( address1, - Account { + RevmAccount { status: AccountStatus::Touched | AccountStatus::SelfDestructed, info: account_info.clone(), storage: HashMap::default(), @@ -893,7 +883,7 @@ mod tests { )])); state.commit(HashMap::from([( address1, - Account { + RevmAccount { status: AccountStatus::Touched | AccountStatus::Created, info: account_info.clone(), storage: HashMap::default(), @@ -904,7 +894,7 @@ mod tests { // Block #7: Change storage. state.commit(HashMap::from([( address1, - Account { + RevmAccount { status: AccountStatus::Touched, info: account_info.clone(), // 0x00 => 0 => 9 @@ -1052,7 +1042,7 @@ mod tests { #[test] fn storage_change_after_selfdestruct_within_block() { - let db: Arc = create_test_rw_db(); + let db = create_test_rw_db(); let factory = ProviderFactory::new(db, MAINNET.clone()); let provider = factory.provider_rw().unwrap(); @@ -1060,13 +1050,11 @@ mod tests { let account1 = RevmAccountInfo { nonce: 1, ..Default::default() }; // Block #0: initial state. - let mut cache_state = CacheState::new(true); - cache_state.insert_not_existing(address1); - let mut init_state = - State::builder().with_cached_prestate(cache_state).with_bundle_update().build(); + let mut init_state = State::builder().with_bundle_update().build(); + init_state.insert_not_existing(address1); init_state.commit(HashMap::from([( address1, - Account { + RevmAccount { info: account1.clone(), status: AccountStatus::Touched | AccountStatus::Created, // 0x00 => 0 => 1 @@ -1088,19 +1076,17 @@ mod tests { .write_to_db(provider.tx_ref(), OriginalValuesKnown::Yes) .expect("Could not write init bundle state to DB"); - let mut cache_state = CacheState::new(true); - cache_state.insert_account_with_storage( + let mut state = State::builder().with_bundle_update().build(); + state.insert_account_with_storage( address1, account1.clone(), HashMap::from([(U256::ZERO, U256::from(1)), (U256::from(1), U256::from(2))]), ); - let mut state = - State::builder().with_cached_prestate(cache_state).with_bundle_update().build(); // Block #1: Destroy, re-create, change storage. state.commit(HashMap::from([( address1, - Account { + RevmAccount { status: AccountStatus::Touched | AccountStatus::SelfDestructed, info: account1.clone(), storage: HashMap::default(), @@ -1109,7 +1095,7 @@ mod tests { state.commit(HashMap::from([( address1, - Account { + RevmAccount { status: AccountStatus::Touched | AccountStatus::Created, info: account1.clone(), storage: HashMap::default(), @@ -1118,7 +1104,7 @@ mod tests { state.commit(HashMap::from([( address1, - Account { + RevmAccount { status: AccountStatus::Touched, info: account1.clone(), // 0x01 => 0 => 5 @@ -1187,4 +1173,168 @@ mod tests { assert!(!this.revert_to(17)); assert_eq!(this.receipts.len(), 7); } + + #[test] + fn bundle_state_state_root() { + type PreState = BTreeMap)>; + let mut prestate: PreState = (0..10) + .map(|key| { + let account = Account { nonce: 1, balance: U256::from(key), bytecode_hash: None }; + let storage = + (1..11).map(|key| (B256::with_last_byte(key), U256::from(key))).collect(); + (Address::with_last_byte(key), (account, storage)) + }) + .collect(); + + let db = create_test_rw_db(); + + // insert initial state to the database + db.update(|tx| { + for (address, (account, storage)) in prestate.iter() { + let hashed_address = keccak256(address); + tx.put::(hashed_address, *account).unwrap(); + for (slot, value) in storage { + tx.put::( + hashed_address, + StorageEntry { key: keccak256(slot), value: *value }, + ) + .unwrap(); + } + } + + let (_, updates) = StateRoot::new(tx).root_with_updates().unwrap(); + updates.flush(tx).unwrap(); + }) + .unwrap(); + + let tx = db.tx().unwrap(); + let mut state = State::builder().with_bundle_update().build(); + + let assert_state_root = |state: &State, expected: &PreState, msg| { + assert_eq!( + BundleStateWithReceipts::new(state.bundle_state.clone(), Receipts::default(), 0) + .state_root_slow(&tx) + .unwrap(), + state_root(expected.clone().into_iter().map(|(address, (account, storage))| ( + address, + (account, storage.into_iter()) + ))), + "{msg}" + ); + }; + + // database only state root is correct + assert_state_root(&state, &prestate, "empty"); + + // destroy account 1 + let address1 = Address::with_last_byte(1); + let account1_old = prestate.remove(&address1).unwrap(); + state.insert_account(address1, into_revm_acc(account1_old.0)); + state.commit(HashMap::from([( + address1, + RevmAccount { + status: AccountStatus::Touched | AccountStatus::SelfDestructed, + info: RevmAccountInfo::default(), + storage: HashMap::default(), + }, + )])); + state.merge_transitions(BundleRetention::PlainState); + assert_state_root(&state, &prestate, "destroyed account"); + + // change slot 2 in account 2 + let address2 = Address::with_last_byte(2); + let slot2 = U256::from(2); + let slot2_key = B256::from(slot2); + let account2 = prestate.get_mut(&address2).unwrap(); + let account2_slot2_old_value = *account2.1.get(&slot2_key).unwrap(); + state.insert_account_with_storage( + address2, + into_revm_acc(account2.0), + HashMap::from([(slot2, account2_slot2_old_value)]), + ); + + let account2_slot2_new_value = U256::from(100); + account2.1.insert(slot2_key, account2_slot2_new_value); + state.commit(HashMap::from([( + address2, + RevmAccount { + status: AccountStatus::Touched, + info: into_revm_acc(account2.0), + storage: HashMap::from_iter([( + slot2, + StorageSlot::new_changed(account2_slot2_old_value, account2_slot2_new_value), + )]), + }, + )])); + state.merge_transitions(BundleRetention::PlainState); + assert_state_root(&state, &prestate, "changed storage"); + + // change balance of account 3 + let address3 = Address::with_last_byte(3); + let account3 = prestate.get_mut(&address3).unwrap(); + state.insert_account(address3, into_revm_acc(account3.0)); + + account3.0.balance = U256::from(24); + state.commit(HashMap::from([( + address3, + RevmAccount { + status: AccountStatus::Touched, + info: into_revm_acc(account3.0), + storage: HashMap::default(), + }, + )])); + state.merge_transitions(BundleRetention::PlainState); + assert_state_root(&state, &prestate, "changed balance"); + + // change nonce of account 4 + let address4 = Address::with_last_byte(4); + let account4 = prestate.get_mut(&address4).unwrap(); + state.insert_account(address4, into_revm_acc(account4.0)); + + account4.0.nonce = 128; + state.commit(HashMap::from([( + address4, + RevmAccount { + status: AccountStatus::Touched, + info: into_revm_acc(account4.0), + storage: HashMap::default(), + }, + )])); + state.merge_transitions(BundleRetention::PlainState); + assert_state_root(&state, &prestate, "changed nonce"); + + // recreate account 1 + let account1_new = + Account { nonce: 56, balance: U256::from(123), bytecode_hash: Some(B256::random()) }; + prestate.insert(address1, (account1_new, BTreeMap::default())); + state.commit(HashMap::from([( + address1, + RevmAccount { + status: AccountStatus::Touched | AccountStatus::Created, + info: into_revm_acc(account1_new), + storage: HashMap::default(), + }, + )])); + state.merge_transitions(BundleRetention::PlainState); + assert_state_root(&state, &prestate, "recreated"); + + // update storage for account 1 + let slot20 = U256::from(20); + let slot20_key = B256::from(slot20); + let account1_slot20_value = U256::from(12345); + prestate.get_mut(&address1).unwrap().1.insert(slot20_key, account1_slot20_value); + state.commit(HashMap::from([( + address1, + RevmAccount { + status: AccountStatus::Touched | AccountStatus::Created, + info: into_revm_acc(account1_new), + storage: HashMap::from_iter([( + slot20, + StorageSlot::new_changed(U256::ZERO, account1_slot20_value), + )]), + }, + )])); + state.merge_transitions(BundleRetention::PlainState); + assert_state_root(&state, &prestate, "recreated changed storage"); + } } diff --git a/crates/storage/provider/src/lib.rs b/crates/storage/provider/src/lib.rs index c100d5a1e7d9..87118a6351c1 100644 --- a/crates/storage/provider/src/lib.rs +++ b/crates/storage/provider/src/lib.rs @@ -25,7 +25,7 @@ pub use traits::{ PruneCheckpointWriter, ReceiptProvider, ReceiptProviderIdExt, StageCheckpointReader, StageCheckpointWriter, StateProvider, StateProviderBox, StateProviderFactory, StateRootProvider, StorageReader, TransactionVariant, TransactionsProvider, - WithdrawalsProvider, + TransactionsProviderExt, WithdrawalsProvider, }; /// Provider trait implementations. diff --git a/crates/storage/provider/src/providers/database/metrics.rs b/crates/storage/provider/src/providers/database/metrics.rs new file mode 100644 index 000000000000..b36e9140ab9b --- /dev/null +++ b/crates/storage/provider/src/providers/database/metrics.rs @@ -0,0 +1,102 @@ +use metrics::Histogram; +use reth_metrics::Metrics; +use std::time::{Duration, Instant}; + +#[derive(Debug)] +pub(crate) struct DurationsRecorder { + start: Instant, + pub(crate) actions: Vec<(Action, Duration)>, + latest: Option, +} + +impl Default for DurationsRecorder { + fn default() -> Self { + Self { start: Instant::now(), actions: Vec::new(), latest: None } + } +} + +impl DurationsRecorder { + /// Saves the provided duration for future logging and instantly reports as a metric with + /// `action` label. + pub(crate) fn record_duration(&mut self, action: Action, duration: Duration) { + self.actions.push((action, duration)); + Metrics::new_with_labels(&[("action", format!("{action:?}"))]).duration.record(duration); + self.latest = Some(self.start.elapsed()); + } + + /// Records the duration since last record, saves it for future logging and instantly reports as + /// a metric with `action` label. + pub(crate) fn record_relative(&mut self, action: Action) { + let elapsed = self.start.elapsed(); + let duration = elapsed - self.latest.unwrap_or_default(); + + self.actions.push((action, duration)); + Metrics::new_with_labels(&[("action", action.as_str())]).duration.record(duration); + + self.latest = Some(elapsed); + } +} + +#[derive(Debug, Copy, Clone)] +pub(crate) enum Action { + InsertStorageHashing, + InsertAccountHashing, + InsertMerkleTree, + InsertBlock, + InsertState, + InsertHashes, + InsertHistoryIndices, + UpdatePipelineStages, + InsertCanonicalHeaders, + InsertHeaders, + InsertHeaderNumbers, + InsertHeaderTD, + InsertBlockOmmers, + InsertTxSenders, + InsertTransactions, + InsertTxHashNumbers, + InsertBlockWithdrawals, + InsertBlockBodyIndices, + InsertTransactionBlock, + + RecoverSigners, + GetNextTxNum, + GetParentTD, +} + +impl Action { + fn as_str(&self) -> &'static str { + match self { + Action::InsertStorageHashing => "insert storage hashing", + Action::InsertAccountHashing => "insert account hashing", + Action::InsertMerkleTree => "insert merkle tree", + Action::InsertBlock => "insert block", + Action::InsertState => "insert state", + Action::InsertHashes => "insert hashes", + Action::InsertHistoryIndices => "insert history indices", + Action::UpdatePipelineStages => "update pipeline stages", + Action::InsertCanonicalHeaders => "insert canonical headers", + Action::InsertHeaders => "insert headers", + Action::InsertHeaderNumbers => "insert header numbers", + Action::InsertHeaderTD => "insert header TD", + Action::InsertBlockOmmers => "insert block ommers", + Action::InsertTxSenders => "insert tx senders", + Action::InsertTransactions => "insert transactions", + Action::InsertTxHashNumbers => "insert tx hash numbers", + Action::InsertBlockWithdrawals => "insert block withdrawals", + Action::InsertBlockBodyIndices => "insert block body indices", + Action::InsertTransactionBlock => "insert transaction block", + Action::RecoverSigners => "recover signers", + Action::GetNextTxNum => "get next tx num", + Action::GetParentTD => "get parent TD", + } + } +} + +#[derive(Metrics)] +#[metrics(scope = "storage.providers.database")] +/// Database provider metrics +struct Metrics { + /// The time it took to execute an action + duration: Histogram, +} diff --git a/crates/storage/provider/src/providers/database/mod.rs b/crates/storage/provider/src/providers/database/mod.rs index 140de2a2ff43..c87c4c415cd7 100644 --- a/crates/storage/provider/src/providers/database/mod.rs +++ b/crates/storage/provider/src/providers/database/mod.rs @@ -21,7 +21,9 @@ use std::{ }; use tracing::trace; +mod metrics; mod provider; + pub use provider::{DatabaseProvider, DatabaseProviderRO, DatabaseProviderRW}; /// A common provider that fetches data from a database. diff --git a/crates/storage/provider/src/providers/database/provider.rs b/crates/storage/provider/src/providers/database/provider.rs index 913503f09a6f..3fc623daf7c7 100644 --- a/crates/storage/provider/src/providers/database/provider.rs +++ b/crates/storage/provider/src/providers/database/provider.rs @@ -1,12 +1,14 @@ use crate::{ bundle_state::{BundleStateInit, BundleStateWithReceipts, RevertsInit}, + providers::database::metrics, traits::{ AccountExtReader, BlockSource, ChangeSetReader, ReceiptProvider, StageCheckpointWriter, }, AccountReader, BlockExecutionWriter, BlockHashReader, BlockNumReader, BlockReader, BlockWriter, Chain, EvmEnvProvider, HashingWriter, HeaderProvider, HistoryWriter, OriginalValuesKnown, ProviderError, PruneCheckpointReader, PruneCheckpointWriter, StageCheckpointReader, - StorageReader, TransactionVariant, TransactionsProvider, WithdrawalsProvider, + StorageReader, TransactionVariant, TransactionsProvider, TransactionsProviderExt, + WithdrawalsProvider, }; use itertools::{izip, Itertools}; use reth_db::{ @@ -24,7 +26,7 @@ use reth_db::{ }; use reth_interfaces::{ executor::{BlockExecutionError, BlockValidationError}, - RethResult, + RethError, RethResult, }; use reth_primitives::{ keccak256, @@ -46,8 +48,10 @@ use std::{ collections::{hash_map, BTreeMap, BTreeSet, HashMap, HashSet}, fmt::Debug, ops::{Deref, DerefMut, Range, RangeBounds, RangeInclusive}, - sync::Arc, + sync::{mpsc, Arc}, + time::{Duration, Instant}, }; +use tracing::debug; /// A [`DatabaseProvider`] that holds a read-only database transaction. pub type DatabaseProviderRO<'this, DB> = DatabaseProvider<>::TX>; @@ -1140,6 +1144,65 @@ impl BlockReader for DatabaseProvider { } } +impl TransactionsProviderExt for DatabaseProvider { + /// Recovers transaction hashes by walking through `Transactions` table and + /// calculating them in a parallel manner. Returned unsorted. + fn transaction_hashes_by_range( + &self, + tx_range: Range, + ) -> RethResult> { + let mut tx_cursor = self.tx.cursor_read::()?; + let tx_range_size = tx_range.clone().count(); + let tx_walker = tx_cursor.walk_range(tx_range)?; + + let chunk_size = (tx_range_size / rayon::current_num_threads()).max(1); + let mut channels = Vec::with_capacity(chunk_size); + let mut transaction_count = 0; + + #[inline] + fn calculate_hash( + entry: Result<(TxNumber, TransactionSignedNoHash), DatabaseError>, + rlp_buf: &mut Vec, + ) -> Result<(B256, TxNumber), Box> { + let (tx_id, tx) = entry.map_err(|e| Box::new(e.into()))?; + tx.transaction.encode_with_signature(&tx.signature, rlp_buf, false); + Ok((keccak256(rlp_buf), tx_id)) + } + + for chunk in &tx_walker.chunks(chunk_size) { + let (tx, rx) = mpsc::channel(); + channels.push(rx); + + // Note: Unfortunate side-effect of how chunk is designed in itertools (it is not Send) + let chunk: Vec<_> = chunk.collect(); + transaction_count += chunk.len(); + + // Spawn the task onto the global rayon pool + // This task will send the results through the channel after it has calculated the hash. + rayon::spawn(move || { + let mut rlp_buf = Vec::with_capacity(128); + for entry in chunk { + rlp_buf.clear(); + let _ = tx.send(calculate_hash(entry, &mut rlp_buf)); + } + }); + } + let mut tx_list = Vec::with_capacity(transaction_count); + + // Iterate over channels and append the tx hashes unsorted + for channel in channels { + while let Ok(tx) = channel.recv() { + let (tx_hash, tx_id) = tx.map_err(|boxed| *boxed)?; + tx_list.push((tx_hash, tx_id)); + } + } + + Ok(tx_list) + } +} + +/// Calculates the hash of the given transaction + impl TransactionsProvider for DatabaseProvider { fn transaction_id(&self, tx_hash: TxHash) -> RethResult> { Ok(self.tx.get::(tx_hash)?) @@ -1540,6 +1603,8 @@ impl HashingWriter for DatabaseProvider { let mut storage_prefix_set: HashMap = HashMap::default(); let mut destroyed_accounts = HashSet::default(); + let mut durations_recorder = metrics::DurationsRecorder::default(); + // storage hashing stage { let lists = self.changed_storages_with_range(range.clone())?; @@ -1555,6 +1620,7 @@ impl HashingWriter for DatabaseProvider { } } } + durations_recorder.record_relative(metrics::Action::InsertStorageHashing); // account hashing stage { @@ -1568,6 +1634,7 @@ impl HashingWriter for DatabaseProvider { } } } + durations_recorder.record_relative(metrics::Action::InsertAccountHashing); // merkle tree { @@ -1592,6 +1659,10 @@ impl HashingWriter for DatabaseProvider { } trie_updates.flush(&self.tx)?; } + durations_recorder.record_relative(metrics::Action::InsertMerkleTree); + + debug!(target: "providers::db", ?range, actions = ?durations_recorder.actions, "Inserted hashes"); + Ok(()) } @@ -1764,7 +1835,7 @@ impl HashingWriter for DatabaseProvider { } impl HistoryWriter for DatabaseProvider { - fn calculate_history_indices(&self, range: RangeInclusive) -> RethResult<()> { + fn update_history_indices(&self, range: RangeInclusive) -> RethResult<()> { // account history stage { let indices = self.changed_accounts_and_blocks_with_range(range.clone())?; @@ -2002,28 +2073,39 @@ impl BlockWriter for DatabaseProvider { prune_modes: Option<&PruneModes>, ) -> RethResult { let block_number = block.number; - self.tx.put::(block.number, block.hash())?; + + let mut durations_recorder = metrics::DurationsRecorder::default(); + + self.tx.put::(block_number, block.hash())?; + durations_recorder.record_relative(metrics::Action::InsertCanonicalHeaders); + // Put header with canonical hashes. - self.tx.put::(block.number, block.header.as_ref().clone())?; - self.tx.put::(block.hash(), block.number)?; + self.tx.put::(block_number, block.header.as_ref().clone())?; + durations_recorder.record_relative(metrics::Action::InsertHeaders); + + self.tx.put::(block.hash(), block_number)?; + durations_recorder.record_relative(metrics::Action::InsertHeaderNumbers); // total difficulty - let ttd = if block.number == 0 { + let ttd = if block_number == 0 { block.difficulty } else { - let parent_block_number = block.number - 1; + let parent_block_number = block_number - 1; let parent_ttd = self.header_td_by_number(parent_block_number)?.unwrap_or_default(); + durations_recorder.record_relative(metrics::Action::GetParentTD); parent_ttd + block.difficulty }; - self.tx.put::(block.number, ttd.into())?; + self.tx.put::(block_number, ttd.into())?; + durations_recorder.record_relative(metrics::Action::InsertHeaderTD); // insert body ommers data if !block.ommers.is_empty() { self.tx.put::( - block.number, + block_number, StoredBlockOmmers { ommers: block.ommers }, )?; + durations_recorder.record_relative(metrics::Action::InsertBlockOmmers); } let mut next_tx_num = self @@ -2032,6 +2114,7 @@ impl BlockWriter for DatabaseProvider { .last()? .map(|(n, _)| n + 1) .unwrap_or_default(); + durations_recorder.record_relative(metrics::Action::GetNextTxNum); let first_tx_num = next_tx_num; let tx_count = block.body.len() as u64; @@ -2043,10 +2126,14 @@ impl BlockWriter for DatabaseProvider { let senders = TransactionSigned::recover_signers(&block.body, block.body.len()).ok_or( BlockExecutionError::Validation(BlockValidationError::SenderRecoveryError), )?; + durations_recorder.record_relative(metrics::Action::RecoverSigners); debug_assert_eq!(senders.len(), block.body.len(), "missing one or more senders"); block.body.into_iter().zip(senders).collect() }; + let mut tx_senders_elapsed = Duration::default(); + let mut transactions_elapsed = Duration::default(); + let mut tx_hash_numbers_elapsed = Duration::default(); for (transaction, sender) in tx_iter { let hash = transaction.hash(); @@ -2055,20 +2142,31 @@ impl BlockWriter for DatabaseProvider { .filter(|prune_mode| prune_mode.is_full()) .is_none() { + let start = Instant::now(); self.tx.put::(next_tx_num, sender)?; + tx_senders_elapsed += start.elapsed(); } + let start = Instant::now(); self.tx.put::(next_tx_num, transaction.into())?; + transactions_elapsed += start.elapsed(); if prune_modes .and_then(|modes| modes.transaction_lookup) .filter(|prune_mode| prune_mode.is_full()) .is_none() { + let start = Instant::now(); self.tx.put::(hash, next_tx_num)?; + tx_hash_numbers_elapsed += start.elapsed(); } next_tx_num += 1; } + durations_recorder.record_duration(metrics::Action::InsertTxSenders, tx_senders_elapsed); + durations_recorder + .record_duration(metrics::Action::InsertTransactions, transactions_elapsed); + durations_recorder + .record_duration(metrics::Action::InsertTxHashNumbers, tx_hash_numbers_elapsed); if let Some(withdrawals) = block.withdrawals { if !withdrawals.is_empty() { @@ -2076,16 +2174,26 @@ impl BlockWriter for DatabaseProvider { block_number, StoredBlockWithdrawals { withdrawals }, )?; + durations_recorder.record_relative(metrics::Action::InsertBlockWithdrawals); } } let block_indices = StoredBlockBodyIndices { first_tx_num, tx_count }; self.tx.put::(block_number, block_indices.clone())?; + durations_recorder.record_relative(metrics::Action::InsertBlockBodyIndices); if !block_indices.is_empty() { self.tx.put::(block_indices.last_tx_num(), block_number)?; + durations_recorder.record_relative(metrics::Action::InsertTransactionBlock); } + debug!( + target: "providers::db", + ?block_number, + actions = ?durations_recorder.actions, + "Inserted block" + ); + Ok(block_indices) } @@ -2108,22 +2216,31 @@ impl BlockWriter for DatabaseProvider { let last_block_hash = last.hash(); let expected_state_root = last.state_root; + let mut durations_recorder = metrics::DurationsRecorder::default(); + // Insert the blocks for block in blocks { let (block, senders) = block.into_components(); self.insert_block(block, Some(senders), prune_modes)?; + durations_recorder.record_relative(metrics::Action::InsertBlock); } // Write state and changesets to the database. // Must be written after blocks because of the receipt lookup. state.write_to_db(self.tx_ref(), OriginalValuesKnown::No)?; + durations_recorder.record_relative(metrics::Action::InsertState); self.insert_hashes(first_number..=last_block_number, last_block_hash, expected_state_root)?; + durations_recorder.record_relative(metrics::Action::InsertHashes); - self.calculate_history_indices(first_number..=last_block_number)?; + self.update_history_indices(first_number..=last_block_number)?; + durations_recorder.record_relative(metrics::Action::InsertHistoryIndices); // Update pipeline progress self.update_pipeline_stages(new_tip_number, false)?; + durations_recorder.record_relative(metrics::Action::UpdatePipelineStages); + + debug!(target: "providers::db", actions = ?durations_recorder.actions, "Appended blocks"); Ok(()) } diff --git a/crates/storage/provider/src/providers/mod.rs b/crates/storage/provider/src/providers/mod.rs index f07f9f5a082f..17041d2f2da7 100644 --- a/crates/storage/provider/src/providers/mod.rs +++ b/crates/storage/provider/src/providers/mod.rs @@ -37,14 +37,14 @@ mod bundle_state_provider; mod chain_info; mod database; mod snapshot; -pub use snapshot::SnapshotProvider; +pub use snapshot::{SnapshotJarProvider, SnapshotProvider}; mod state; use crate::{providers::chain_info::ChainInfoTracker, traits::BlockSource}; pub use bundle_state_provider::BundleStateProvider; pub use database::*; use reth_db::models::AccountBeforeTx; use reth_interfaces::blockchain_tree::{ - error::InsertBlockError, CanonicalOutcome, InsertPayloadOk, + error::InsertBlockError, BlockValidationKind, CanonicalOutcome, InsertPayloadOk, }; /// The main type for interacting with the blockchain. @@ -574,8 +574,9 @@ where fn insert_block( &self, block: SealedBlockWithSenders, + validation_kind: BlockValidationKind, ) -> Result { - self.tree.insert_block(block) + self.tree.insert_block(block, validation_kind) } fn finalize_block(&self, finalized_block: BlockNumber) { diff --git a/crates/storage/provider/src/providers/snapshot.rs b/crates/storage/provider/src/providers/snapshot.rs deleted file mode 100644 index ec2c36e6b93e..000000000000 --- a/crates/storage/provider/src/providers/snapshot.rs +++ /dev/null @@ -1,223 +0,0 @@ -use crate::HeaderProvider; -use reth_db::{ - table::{Decompress, Table}, - HeaderTD, -}; -use reth_interfaces::{provider::ProviderError, RethResult}; -use reth_nippy_jar::{compression::Decompressor, NippyJar, NippyJarCursor}; -use reth_primitives::{BlockHash, BlockNumber, Header, SealedHeader, U256}; -use std::ops::RangeBounds; - -/// SnapshotProvider -/// -/// WIP Rudimentary impl just for tests -/// TODO: should be able to walk through snapshot files/block_ranges -/// TODO: Arc over NippyJars and/or NippyJarCursors (LRU) -#[derive(Debug)] -pub struct SnapshotProvider<'a> { - /// NippyJar - pub jar: &'a NippyJar, - /// Starting snapshot block - pub jar_start_block: u64, -} - -impl<'a> SnapshotProvider<'a> { - /// Creates cursor - pub fn cursor(&self) -> NippyJarCursor<'a> { - NippyJarCursor::new(self.jar, None).unwrap() - } - - /// Creates cursor with zstd decompressors - pub fn cursor_with_decompressors( - &self, - decompressors: Vec>, - ) -> NippyJarCursor<'a> { - NippyJarCursor::new(self.jar, Some(decompressors)).unwrap() - } -} - -impl<'a> HeaderProvider for SnapshotProvider<'a> { - fn header(&self, block_hash: &BlockHash) -> RethResult> { - // WIP - let mut cursor = self.cursor(); - - let header = Header::decompress( - cursor.row_by_key_with_cols::<0b01, 2>(&block_hash.0).unwrap().unwrap()[0], - ) - .unwrap(); - - if &header.hash_slow() == block_hash { - return Ok(Some(header)) - } else { - // check next snapshot - } - Ok(None) - } - - fn header_by_number(&self, num: BlockNumber) -> RethResult> { - Header::decompress( - self.cursor() - .row_by_number_with_cols::<0b01, 2>((num - self.jar_start_block) as usize)? - .ok_or(ProviderError::HeaderNotFound(num.into()))?[0], - ) - .map(Some) - .map_err(Into::into) - } - - fn header_td(&self, block_hash: &BlockHash) -> RethResult> { - // WIP - let mut cursor = self.cursor(); - - let row = cursor.row_by_key_with_cols::<0b11, 2>(&block_hash.0).unwrap().unwrap(); - - let header = Header::decompress(row[0]).unwrap(); - let td = ::Value::decompress(row[1]).unwrap(); - - if &header.hash_slow() == block_hash { - return Ok(Some(td.0)) - } else { - // check next snapshot - } - Ok(None) - } - - fn header_td_by_number(&self, _number: BlockNumber) -> RethResult> { - unimplemented!(); - } - - fn headers_range(&self, _range: impl RangeBounds) -> RethResult> { - unimplemented!(); - } - - fn sealed_headers_range( - &self, - _range: impl RangeBounds, - ) -> RethResult> { - unimplemented!(); - } - - fn sealed_header(&self, _number: BlockNumber) -> RethResult> { - unimplemented!(); - } -} - -#[cfg(test)] -mod test { - use super::*; - use crate::ProviderFactory; - use rand::{self, seq::SliceRandom}; - use reth_db::{ - cursor::DbCursorRO, - database::Database, - snapshot::create_snapshot_T1_T2, - test_utils::create_test_rw_db, - transaction::{DbTx, DbTxMut}, - CanonicalHeaders, DatabaseError, HeaderNumbers, HeaderTD, Headers, RawTable, - }; - use reth_interfaces::test_utils::generators::{self, random_header_range}; - use reth_nippy_jar::NippyJar; - use reth_primitives::{B256, MAINNET}; - - #[test] - fn test_snap() { - // Ranges - let row_count = 100u64; - let range = 0..=(row_count - 1); - - // Data sources - let db = create_test_rw_db(); - let factory = ProviderFactory::new(&db, MAINNET.clone()); - let snap_file = tempfile::NamedTempFile::new().unwrap(); - - // Setup data - let mut headers = random_header_range( - &mut generators::rng(), - *range.start()..(*range.end() + 1), - B256::random(), - ); - - db.update(|tx| -> Result<(), DatabaseError> { - let mut td = U256::ZERO; - for header in headers.clone() { - td += header.header.difficulty; - let hash = header.hash(); - - tx.put::(header.number, hash)?; - tx.put::(header.number, header.clone().unseal())?; - tx.put::(header.number, td.into())?; - tx.put::(hash, header.number)?; - } - Ok(()) - }) - .unwrap() - .unwrap(); - - // Create Snapshot - { - let with_compression = true; - let with_filter = true; - - let mut nippy_jar = NippyJar::new_without_header(2, snap_file.path()); - - if with_compression { - nippy_jar = nippy_jar.with_zstd(false, 0); - } - - if with_filter { - nippy_jar = nippy_jar.with_cuckoo_filter(row_count as usize + 10).with_fmph(); - } - - let tx = db.tx().unwrap(); - - // Hacky type inference. TODO fix - let mut none_vec = Some(vec![vec![vec![0u8]].into_iter()]); - let _ = none_vec.take(); - - // Generate list of hashes for filters & PHF - let mut cursor = tx.cursor_read::>().unwrap(); - let hashes = cursor - .walk(None) - .unwrap() - .map(|row| row.map(|(_key, value)| value.into_value()).map_err(|e| e.into())); - - create_snapshot_T1_T2::( - &tx, - range, - None, - none_vec, - Some(hashes), - row_count as usize, - &mut nippy_jar, - ) - .unwrap(); - } - - // Use providers to query Header data and compare if it matches - { - let jar = NippyJar::load_without_header(snap_file.path()).unwrap(); - - let db_provider = factory.provider().unwrap(); - let snap_provider = SnapshotProvider { jar: &jar, jar_start_block: 0 }; - - assert!(!headers.is_empty()); - - // Shuffled for chaos. - headers.shuffle(&mut generators::rng()); - - for header in headers { - let header_hash = header.hash(); - let header = header.unseal(); - - // Compare Header - assert_eq!(header, db_provider.header(&header_hash).unwrap().unwrap()); - assert_eq!(header, snap_provider.header(&header_hash).unwrap().unwrap()); - - // Compare HeaderTD - assert_eq!( - db_provider.header_td(&header_hash).unwrap().unwrap(), - snap_provider.header_td(&header_hash).unwrap().unwrap() - ); - } - } - } -} diff --git a/crates/storage/provider/src/providers/snapshot/jar.rs b/crates/storage/provider/src/providers/snapshot/jar.rs new file mode 100644 index 000000000000..1e04c8003c2f --- /dev/null +++ b/crates/storage/provider/src/providers/snapshot/jar.rs @@ -0,0 +1,300 @@ +use super::LoadedJarRef; +use crate::{ + BlockHashReader, BlockNumReader, HeaderProvider, ReceiptProvider, TransactionsProvider, +}; +use reth_db::{ + codecs::CompactU256, + snapshot::{HeaderMask, ReceiptMask, SnapshotCursor, TransactionMask}, +}; +use reth_interfaces::{ + executor::{BlockExecutionError, BlockValidationError}, + provider::ProviderError, + RethResult, +}; +use reth_primitives::{ + Address, BlockHash, BlockHashOrNumber, BlockNumber, ChainInfo, Header, Receipt, SealedHeader, + TransactionMeta, TransactionSigned, TransactionSignedNoHash, TxHash, TxNumber, B256, U256, +}; +use std::ops::{Deref, Range, RangeBounds}; + +/// Provider over a specific `NippyJar` and range. +#[derive(Debug)] +pub struct SnapshotJarProvider<'a> { + /// Main snapshot segment + jar: LoadedJarRef<'a>, + /// Another kind of snapshot segment to help query data from the main one. + auxiliar_jar: Option>, +} + +impl<'a> Deref for SnapshotJarProvider<'a> { + type Target = LoadedJarRef<'a>; + fn deref(&self) -> &Self::Target { + &self.jar + } +} + +impl<'a> From> for SnapshotJarProvider<'a> { + fn from(value: LoadedJarRef<'a>) -> Self { + SnapshotJarProvider { jar: value, auxiliar_jar: None } + } +} + +impl<'a> SnapshotJarProvider<'a> { + /// Provides a cursor for more granular data access. + pub fn cursor<'b>(&'b self) -> RethResult> + where + 'b: 'a, + { + SnapshotCursor::new(self.value(), self.mmap_handle()) + } + + /// Adds a new auxiliar snapshot to help query data from the main one + pub fn with_auxiliar(mut self, auxiliar_jar: SnapshotJarProvider<'a>) -> Self { + self.auxiliar_jar = Some(Box::new(auxiliar_jar)); + self + } +} + +impl<'a> HeaderProvider for SnapshotJarProvider<'a> { + fn header(&self, block_hash: &BlockHash) -> RethResult> { + Ok(self + .cursor()? + .get_two::>(block_hash.into())? + .filter(|(_, hash)| hash == block_hash) + .map(|(header, _)| header)) + } + + fn header_by_number(&self, num: BlockNumber) -> RethResult> { + self.cursor()?.get_one::>(num.into()) + } + + fn header_td(&self, block_hash: &BlockHash) -> RethResult> { + Ok(self + .cursor()? + .get_two::>(block_hash.into())? + .filter(|(_, hash)| hash == block_hash) + .map(|(td, _)| td.into())) + } + + fn header_td_by_number(&self, num: BlockNumber) -> RethResult> { + Ok(self.cursor()?.get_one::>(num.into())?.map(Into::into)) + } + + fn headers_range(&self, range: impl RangeBounds) -> RethResult> { + let range = to_range(range); + + let mut cursor = self.cursor()?; + let mut headers = Vec::with_capacity((range.end - range.start) as usize); + + for num in range.start..range.end { + if let Some(header) = cursor.get_one::>(num.into())? { + headers.push(header); + } + } + + Ok(headers) + } + + fn sealed_headers_range( + &self, + range: impl RangeBounds, + ) -> RethResult> { + let range = to_range(range); + + let mut cursor = self.cursor()?; + let mut headers = Vec::with_capacity((range.end - range.start) as usize); + + for number in range.start..range.end { + if let Some((header, hash)) = + cursor.get_two::>(number.into())? + { + headers.push(header.seal(hash)) + } + } + Ok(headers) + } + + fn sealed_header(&self, number: BlockNumber) -> RethResult> { + Ok(self + .cursor()? + .get_two::>(number.into())? + .map(|(header, hash)| header.seal(hash))) + } +} + +impl<'a> BlockHashReader for SnapshotJarProvider<'a> { + fn block_hash(&self, number: u64) -> RethResult> { + self.cursor()?.get_one::>(number.into()) + } + + fn canonical_hashes_range( + &self, + start: BlockNumber, + end: BlockNumber, + ) -> RethResult> { + let mut cursor = self.cursor()?; + let mut hashes = Vec::with_capacity((end - start) as usize); + + for number in start..end { + if let Some(hash) = cursor.get_one::>(number.into())? { + hashes.push(hash) + } + } + Ok(hashes) + } +} + +impl<'a> BlockNumReader for SnapshotJarProvider<'a> { + fn chain_info(&self) -> RethResult { + // Information on live database + Err(ProviderError::UnsupportedProvider.into()) + } + + fn best_block_number(&self) -> RethResult { + // Information on live database + Err(ProviderError::UnsupportedProvider.into()) + } + + fn last_block_number(&self) -> RethResult { + // Information on live database + Err(ProviderError::UnsupportedProvider.into()) + } + + fn block_number(&self, hash: B256) -> RethResult> { + let mut cursor = self.cursor()?; + + Ok(cursor + .get_one::>((&hash).into())? + .and_then(|res| (res == hash).then(|| cursor.number()))) + } +} + +impl<'a> TransactionsProvider for SnapshotJarProvider<'a> { + fn transaction_id(&self, hash: TxHash) -> RethResult> { + let mut cursor = self.cursor()?; + + Ok(cursor + .get_one::>((&hash).into())? + .and_then(|res| (res.hash() == hash).then(|| cursor.number()))) + } + + fn transaction_by_id(&self, num: TxNumber) -> RethResult> { + Ok(self + .cursor()? + .get_one::>(num.into())? + .map(|tx| tx.with_hash())) + } + + fn transaction_by_id_no_hash( + &self, + num: TxNumber, + ) -> RethResult> { + self.cursor()?.get_one::>(num.into()) + } + + fn transaction_by_hash(&self, hash: TxHash) -> RethResult> { + Ok(self + .cursor()? + .get_one::>((&hash).into())? + .map(|tx| tx.with_hash())) + } + + fn transaction_by_hash_with_meta( + &self, + _hash: TxHash, + ) -> RethResult> { + // Information required on indexing table [`tables::TransactionBlock`] + Err(ProviderError::UnsupportedProvider.into()) + } + + fn transaction_block(&self, _id: TxNumber) -> RethResult> { + // Information on indexing table [`tables::TransactionBlock`] + Err(ProviderError::UnsupportedProvider.into()) + } + + fn transactions_by_block( + &self, + _block_id: BlockHashOrNumber, + ) -> RethResult>> { + // Related to indexing tables. Live database should get the tx_range and call snapshot + // provider with `transactions_by_tx_range` instead. + Err(ProviderError::UnsupportedProvider.into()) + } + + fn transactions_by_block_range( + &self, + _range: impl RangeBounds, + ) -> RethResult>> { + // Related to indexing tables. Live database should get the tx_range and call snapshot + // provider with `transactions_by_tx_range` instead. + Err(ProviderError::UnsupportedProvider.into()) + } + + fn senders_by_tx_range(&self, range: impl RangeBounds) -> RethResult> { + let txs = self.transactions_by_tx_range(range)?; + Ok(TransactionSignedNoHash::recover_signers(&txs, txs.len()) + .ok_or(BlockExecutionError::Validation(BlockValidationError::SenderRecoveryError))?) + } + + fn transactions_by_tx_range( + &self, + range: impl RangeBounds, + ) -> RethResult> { + let range = to_range(range); + let mut cursor = self.cursor()?; + let mut txes = Vec::with_capacity((range.end - range.start) as usize); + + for num in range { + if let Some(tx) = + cursor.get_one::>(num.into())? + { + txes.push(tx) + } + } + Ok(txes) + } + + fn transaction_sender(&self, num: TxNumber) -> RethResult> { + Ok(self + .cursor()? + .get_one::>(num.into())? + .and_then(|tx| tx.recover_signer())) + } +} + +impl<'a> ReceiptProvider for SnapshotJarProvider<'a> { + fn receipt(&self, num: TxNumber) -> RethResult> { + self.cursor()?.get_one::>(num.into()) + } + + fn receipt_by_hash(&self, hash: TxHash) -> RethResult> { + if let Some(tx_snapshot) = &self.auxiliar_jar { + if let Some(num) = tx_snapshot.transaction_id(hash)? { + return self.receipt(num) + } + } + Ok(None) + } + + fn receipts_by_block(&self, _block: BlockHashOrNumber) -> RethResult>> { + // Related to indexing tables. Snapshot should get the tx_range and call snapshot + // provider with `receipt()` instead for each + Err(ProviderError::UnsupportedProvider.into()) + } +} + +fn to_range>(bounds: R) -> Range { + let start = match bounds.start_bound() { + std::ops::Bound::Included(&v) => v, + std::ops::Bound::Excluded(&v) => v + 1, + std::ops::Bound::Unbounded => 0, + }; + + let end = match bounds.end_bound() { + std::ops::Bound::Included(&v) => v + 1, + std::ops::Bound::Excluded(&v) => v, + std::ops::Bound::Unbounded => u64::MAX, + }; + + start..end +} diff --git a/crates/storage/provider/src/providers/snapshot/manager.rs b/crates/storage/provider/src/providers/snapshot/manager.rs new file mode 100644 index 000000000000..a065f6d1db48 --- /dev/null +++ b/crates/storage/provider/src/providers/snapshot/manager.rs @@ -0,0 +1,176 @@ +use super::{LoadedJar, SnapshotJarProvider}; +use crate::{BlockHashReader, BlockNumReader, HeaderProvider, TransactionsProvider}; +use dashmap::DashMap; +use reth_interfaces::RethResult; +use reth_nippy_jar::NippyJar; +use reth_primitives::{ + snapshot::BLOCKS_PER_SNAPSHOT, Address, BlockHash, BlockHashOrNumber, BlockNumber, ChainInfo, + Header, SealedHeader, SnapshotSegment, TransactionMeta, TransactionSigned, + TransactionSignedNoHash, TxHash, TxNumber, B256, U256, +}; +use std::{ops::RangeBounds, path::PathBuf}; + +/// SnapshotProvider +#[derive(Debug, Default)] +pub struct SnapshotProvider { + /// Maintains a map which allows for concurrent access to different `NippyJars`, over different + /// segments and ranges. + map: DashMap<(BlockNumber, SnapshotSegment), LoadedJar>, +} + +impl SnapshotProvider { + /// Gets the provider of the requested segment and range. + pub fn get_segment_provider( + &self, + segment: SnapshotSegment, + block: BlockNumber, + mut path: Option, + ) -> RethResult> { + // TODO this invalidates custom length snapshots. + let snapshot = block / BLOCKS_PER_SNAPSHOT; + let key = (snapshot, segment); + + if let Some(jar) = self.map.get(&key) { + return Ok(jar.into()) + } + + if let Some(path) = &path { + self.map.insert(key, LoadedJar::new(NippyJar::load(path)?)?); + } else { + path = Some(segment.filename( + &((snapshot * BLOCKS_PER_SNAPSHOT)..=((snapshot + 1) * BLOCKS_PER_SNAPSHOT - 1)), + )); + } + + self.get_segment_provider(segment, block, path) + } +} + +impl HeaderProvider for SnapshotProvider { + fn header(&self, _block_hash: &BlockHash) -> RethResult> { + todo!() + } + + fn header_by_number(&self, num: BlockNumber) -> RethResult> { + self.get_segment_provider(SnapshotSegment::Headers, num, None)?.header_by_number(num) + } + + fn header_td(&self, _block_hash: &BlockHash) -> RethResult> { + todo!() + } + + fn header_td_by_number(&self, _number: BlockNumber) -> RethResult> { + todo!(); + } + + fn headers_range(&self, _range: impl RangeBounds) -> RethResult> { + todo!(); + } + + fn sealed_headers_range( + &self, + _range: impl RangeBounds, + ) -> RethResult> { + todo!(); + } + + fn sealed_header(&self, _number: BlockNumber) -> RethResult> { + todo!(); + } +} + +impl BlockHashReader for SnapshotProvider { + fn block_hash(&self, _number: u64) -> RethResult> { + todo!() + } + + fn canonical_hashes_range( + &self, + _start: BlockNumber, + _end: BlockNumber, + ) -> RethResult> { + todo!() + } +} + +impl BlockNumReader for SnapshotProvider { + fn chain_info(&self) -> RethResult { + todo!() + } + + fn best_block_number(&self) -> RethResult { + todo!() + } + + fn last_block_number(&self) -> RethResult { + todo!() + } + + fn block_number(&self, _hash: B256) -> RethResult> { + todo!() + } +} + +impl TransactionsProvider for SnapshotProvider { + fn transaction_id(&self, _tx_hash: TxHash) -> RethResult> { + todo!() + } + + fn transaction_by_id(&self, num: TxNumber) -> RethResult> { + // TODO `num` is provided after checking the index + let block_num = num; + self.get_segment_provider(SnapshotSegment::Transactions, block_num, None)? + .transaction_by_id(num) + } + + fn transaction_by_id_no_hash( + &self, + _id: TxNumber, + ) -> RethResult> { + todo!() + } + + fn transaction_by_hash(&self, _hash: TxHash) -> RethResult> { + todo!() + } + + fn transaction_by_hash_with_meta( + &self, + _hash: TxHash, + ) -> RethResult> { + todo!() + } + + fn transaction_block(&self, _id: TxNumber) -> RethResult> { + todo!() + } + + fn transactions_by_block( + &self, + _block_id: BlockHashOrNumber, + ) -> RethResult>> { + todo!() + } + + fn transactions_by_block_range( + &self, + _range: impl RangeBounds, + ) -> RethResult>> { + todo!() + } + + fn senders_by_tx_range(&self, _range: impl RangeBounds) -> RethResult> { + todo!() + } + + fn transactions_by_tx_range( + &self, + _range: impl RangeBounds, + ) -> RethResult> { + todo!() + } + + fn transaction_sender(&self, _id: TxNumber) -> RethResult> { + todo!() + } +} diff --git a/crates/storage/provider/src/providers/snapshot/mod.rs b/crates/storage/provider/src/providers/snapshot/mod.rs new file mode 100644 index 000000000000..f7fed480f4b9 --- /dev/null +++ b/crates/storage/provider/src/providers/snapshot/mod.rs @@ -0,0 +1,163 @@ +mod manager; +pub use manager::SnapshotProvider; + +mod jar; +pub use jar::SnapshotJarProvider; + +use reth_interfaces::RethResult; +use reth_nippy_jar::NippyJar; +use reth_primitives::{snapshot::SegmentHeader, SnapshotSegment}; +use std::ops::Deref; + +/// Alias type for each specific `NippyJar`. +type LoadedJarRef<'a> = dashmap::mapref::one::Ref<'a, (u64, SnapshotSegment), LoadedJar>; + +/// Helper type to reuse an associated snapshot mmap handle on created cursors. +#[derive(Debug)] +pub struct LoadedJar { + jar: NippyJar, + mmap_handle: reth_nippy_jar::MmapHandle, +} + +impl LoadedJar { + fn new(jar: NippyJar) -> RethResult { + let mmap_handle = jar.open_data()?; + Ok(Self { jar, mmap_handle }) + } + + /// Returns a clone of the mmap handle that can be used to instantiate a cursor. + fn mmap_handle(&self) -> reth_nippy_jar::MmapHandle { + self.mmap_handle.clone() + } +} + +impl Deref for LoadedJar { + type Target = NippyJar; + fn deref(&self) -> &Self::Target { + &self.jar + } +} + +#[cfg(test)] +mod test { + use super::*; + use crate::{HeaderProvider, ProviderFactory}; + use rand::{self, seq::SliceRandom}; + use reth_db::{ + cursor::DbCursorRO, + database::Database, + snapshot::create_snapshot_T1_T2_T3, + test_utils::create_test_rw_db, + transaction::{DbTx, DbTxMut}, + CanonicalHeaders, DatabaseError, HeaderNumbers, HeaderTD, Headers, RawTable, + }; + use reth_interfaces::test_utils::generators::{self, random_header_range}; + use reth_nippy_jar::NippyJar; + use reth_primitives::{BlockNumber, B256, MAINNET, U256}; + + #[test] + fn test_snap() { + // Ranges + let row_count = 100u64; + let range = 0..=(row_count - 1); + let segment_header = + SegmentHeader::new(range.clone(), range.clone(), SnapshotSegment::Headers); + + // Data sources + let db = create_test_rw_db(); + let factory = ProviderFactory::new(&db, MAINNET.clone()); + let snap_file = tempfile::NamedTempFile::new().unwrap(); + + // Setup data + let mut headers = random_header_range( + &mut generators::rng(), + *range.start()..(*range.end() + 1), + B256::random(), + ); + + db.update(|tx| -> Result<(), DatabaseError> { + let mut td = U256::ZERO; + for header in headers.clone() { + td += header.header.difficulty; + let hash = header.hash(); + + tx.put::(header.number, hash)?; + tx.put::(header.number, header.clone().unseal())?; + tx.put::(header.number, td.into())?; + tx.put::(hash, header.number)?; + } + Ok(()) + }) + .unwrap() + .unwrap(); + + // Create Snapshot + { + let with_compression = true; + let with_filter = true; + + let mut nippy_jar = NippyJar::new(3, snap_file.path(), segment_header); + + if with_compression { + nippy_jar = nippy_jar.with_zstd(false, 0); + } + + if with_filter { + nippy_jar = nippy_jar.with_cuckoo_filter(row_count as usize + 10).with_fmph(); + } + + let tx = db.tx().unwrap(); + + // Hacky type inference. TODO fix + let mut none_vec = Some(vec![vec![vec![0u8]].into_iter()]); + let _ = none_vec.take(); + + // Generate list of hashes for filters & PHF + let mut cursor = tx.cursor_read::>().unwrap(); + let hashes = cursor + .walk(None) + .unwrap() + .map(|row| row.map(|(_key, value)| value.into_value()).map_err(|e| e.into())); + + create_snapshot_T1_T2_T3::< + Headers, + HeaderTD, + CanonicalHeaders, + BlockNumber, + SegmentHeader, + >( + &tx, range, None, none_vec, Some(hashes), row_count as usize, &mut nippy_jar + ) + .unwrap(); + } + + // Use providers to query Header data and compare if it matches + { + let db_provider = factory.provider().unwrap(); + let manager = SnapshotProvider::default(); + let jar_provider = manager + .get_segment_provider(SnapshotSegment::Headers, 0, Some(snap_file.path().into())) + .unwrap(); + + assert!(!headers.is_empty()); + + // Shuffled for chaos. + headers.shuffle(&mut generators::rng()); + + for header in headers { + let header_hash = header.hash(); + let header = header.unseal(); + + // Compare Header + assert_eq!(header, db_provider.header(&header_hash).unwrap().unwrap()); + assert_eq!(header, jar_provider.header(&header_hash).unwrap().unwrap()); + + // Compare HeaderTD + assert_eq!( + db_provider.header_td(&header_hash).unwrap().unwrap(), + jar_provider.header_td(&header_hash).unwrap().unwrap() + ); + } + } + } +} diff --git a/crates/storage/provider/src/traits/history.rs b/crates/storage/provider/src/traits/history.rs index bd563fde9415..b9c59cdb76e1 100644 --- a/crates/storage/provider/src/traits/history.rs +++ b/crates/storage/provider/src/traits/history.rs @@ -37,5 +37,5 @@ pub trait HistoryWriter: Send + Sync { ) -> RethResult<()>; /// Read account/storage changesets and update account/storage history indices. - fn calculate_history_indices(&self, range: RangeInclusive) -> RethResult<()>; + fn update_history_indices(&self, range: RangeInclusive) -> RethResult<()>; } diff --git a/crates/storage/provider/src/traits/mod.rs b/crates/storage/provider/src/traits/mod.rs index ae6d36387a5d..8134a19613af 100644 --- a/crates/storage/provider/src/traits/mod.rs +++ b/crates/storage/provider/src/traits/mod.rs @@ -37,7 +37,7 @@ pub use state::{ }; mod transactions; -pub use transactions::TransactionsProvider; +pub use transactions::{TransactionsProvider, TransactionsProviderExt}; mod withdrawals; pub use withdrawals::WithdrawalsProvider; diff --git a/crates/storage/provider/src/traits/transactions.rs b/crates/storage/provider/src/traits/transactions.rs index 711b46c4f231..2f9c72ed191d 100644 --- a/crates/storage/provider/src/traits/transactions.rs +++ b/crates/storage/provider/src/traits/transactions.rs @@ -1,10 +1,10 @@ -use crate::BlockNumReader; -use reth_interfaces::RethResult; +use crate::{BlockNumReader, BlockReader}; +use reth_interfaces::{provider::ProviderError, RethResult}; use reth_primitives::{ Address, BlockHashOrNumber, BlockNumber, TransactionMeta, TransactionSigned, TransactionSignedNoHash, TxHash, TxNumber, }; -use std::ops::RangeBounds; +use std::ops::{Range, RangeBounds, RangeInclusive}; /// Client trait for fetching [TransactionSigned] related data. #[auto_impl::auto_impl(&, Arc)] @@ -63,3 +63,31 @@ pub trait TransactionsProvider: BlockNumReader + Send + Sync { /// Returns None if the transaction is not found. fn transaction_sender(&self, id: TxNumber) -> RethResult>; } + +/// Client trait for fetching additional [TransactionSigned] related data. +#[auto_impl::auto_impl(&, Arc)] +pub trait TransactionsProviderExt: BlockReader + Send + Sync { + /// Get transactions range by block range. + fn transaction_range_by_block_range( + &self, + block_range: RangeInclusive, + ) -> RethResult> { + let from = self + .block_body_indices(*block_range.start())? + .ok_or(ProviderError::BlockBodyIndicesNotFound(*block_range.start()))? + .first_tx_num(); + + let to = self + .block_body_indices(*block_range.end())? + .ok_or(ProviderError::BlockBodyIndicesNotFound(*block_range.end()))? + .last_tx_num(); + + Ok(from..=to) + } + + /// Get transaction hashes from a transaction range. + fn transaction_hashes_by_range( + &self, + tx_range: Range, + ) -> RethResult>; +} diff --git a/crates/tasks/src/metrics.rs b/crates/tasks/src/metrics.rs index 89edaa245177..65163b4b03b8 100644 --- a/crates/tasks/src/metrics.rs +++ b/crates/tasks/src/metrics.rs @@ -18,16 +18,19 @@ pub struct TaskExecutorMetrics { } impl TaskExecutorMetrics { + /// Increments the counter for spawned critical tasks. + pub(crate) fn inc_critical_tasks(&self) { self.critical_tasks.increment(1); } + /// Increments the counter for spawned regular tasks. pub(crate) fn inc_regular_tasks(&self) { self.regular_tasks.increment(1); } } -/// Helper type for increasing counters even if a task fails. +/// Helper type for increasing counters even if a task fails pub struct IncCounterOnDrop(Counter); impl fmt::Debug for IncCounterOnDrop { @@ -37,13 +40,15 @@ impl fmt::Debug for IncCounterOnDrop { } impl IncCounterOnDrop { - /// Create a new `IncCounterOnDrop`. + /// Creates a new instance of `IncCounterOnDrop` with the given counter. pub fn new(counter: Counter) -> Self { IncCounterOnDrop(counter) } } impl Drop for IncCounterOnDrop { + /// Increment the counter when the instance is dropped. + fn drop(&mut self) { self.0.increment(1); } diff --git a/crates/transaction-pool/Cargo.toml b/crates/transaction-pool/Cargo.toml index e9aceb9a9040..45b6d0a57171 100644 --- a/crates/transaction-pool/Cargo.toml +++ b/crates/transaction-pool/Cargo.toml @@ -52,6 +52,7 @@ proptest = { workspace = true, optional = true } [dev-dependencies] reth-primitives = { workspace = true, features = ["arbitrary"] } +reth-provider = { workspace = true, features = ["test-utils"] } paste = "1.0" rand = "0.8" proptest.workspace = true diff --git a/crates/transaction-pool/src/error.rs b/crates/transaction-pool/src/error.rs index 01ced749e2f5..51e0cf22e52c 100644 --- a/crates/transaction-pool/src/error.rs +++ b/crates/transaction-pool/src/error.rs @@ -17,52 +17,65 @@ pub trait PoolTransactionError: std::error::Error + Send + Sync { fn is_bad_transaction(&self) -> bool; } -/// All errors the Transaction pool can throw. +// Needed for `#[error(transparent)]` +impl std::error::Error for Box { + fn source(&self) -> Option<&(dyn std::error::Error + 'static)> { + (**self).source() + } +} + +/// Transaction pool error. #[derive(Debug, thiserror::Error)] -pub enum PoolError { +#[error("[{hash}]: {kind}")] +pub struct PoolError { + /// The transaction hash that caused the error. + pub hash: TxHash, + /// The error kind. + pub kind: PoolErrorKind, +} + +/// Transaction pool error kind. +#[derive(Debug, thiserror::Error)] +pub enum PoolErrorKind { /// Same transaction already imported - #[error("[{0:?}] Already imported")] - AlreadyImported(TxHash), + #[error("already imported")] + AlreadyImported, /// Thrown if a replacement transaction's gas price is below the already imported transaction - #[error("[{0:?}]: insufficient gas price to replace existing transaction.")] - ReplacementUnderpriced(TxHash), + #[error("insufficient gas price to replace existing transaction")] + ReplacementUnderpriced, /// The fee cap of the transaction is below the minimum fee cap determined by the protocol - #[error("[{0:?}] Transaction feeCap {1} below chain minimum.")] - FeeCapBelowMinimumProtocolFeeCap(TxHash, u128), + #[error("transaction feeCap {0} below chain minimum")] + FeeCapBelowMinimumProtocolFeeCap(u128), /// Thrown when the number of unique transactions of a sender exceeded the slot capacity. - #[error("{0:?} identified as spammer. Transaction {1:?} rejected.")] - SpammerExceededCapacity(Address, TxHash), + #[error("rejected due to {0} being identified as a spammer")] + SpammerExceededCapacity(Address), /// Thrown when a new transaction is added to the pool, but then immediately discarded to /// respect the size limits of the pool. - #[error("[{0:?}] Transaction discarded outright due to pool size constraints.")] - DiscardedOnInsert(TxHash), + #[error("transaction discarded outright due to pool size constraints")] + DiscardedOnInsert, /// Thrown when the transaction is considered invalid. - #[error("[{0:?}] {1:?}")] - InvalidTransaction(TxHash, InvalidPoolTransactionError), + #[error(transparent)] + InvalidTransaction(#[from] InvalidPoolTransactionError), /// Thrown if the mutual exclusivity constraint (blob vs normal transaction) is violated. - #[error("[{1:?}] Transaction type {2} conflicts with existing transaction for {0:?}")] - ExistingConflictingTransactionType(Address, TxHash, u8), + #[error("transaction type {1} conflicts with existing transaction for {0}")] + ExistingConflictingTransactionType(Address, u8), /// Any other error that occurred while inserting/validating a transaction. e.g. IO database /// error - #[error("[{0:?}] {1:?}")] - Other(TxHash, Box), + #[error(transparent)] + Other(#[from] Box), } // === impl PoolError === impl PoolError { - /// Returns the hash of the transaction that resulted in this error. - pub fn hash(&self) -> &TxHash { - match self { - PoolError::AlreadyImported(hash) => hash, - PoolError::ReplacementUnderpriced(hash) => hash, - PoolError::FeeCapBelowMinimumProtocolFeeCap(hash, _) => hash, - PoolError::SpammerExceededCapacity(_, hash) => hash, - PoolError::DiscardedOnInsert(hash) => hash, - PoolError::InvalidTransaction(hash, _) => hash, - PoolError::Other(hash, _) => hash, - PoolError::ExistingConflictingTransactionType(_, hash, _) => hash, - } + /// Creates a new pool error. + pub fn new(hash: TxHash, kind: impl Into) -> Self { + Self { hash, kind: kind.into() } + } + + /// Creates a new pool error with the `Other` kind. + pub fn other(hash: TxHash, error: impl Into>) -> Self { + Self { hash, kind: PoolErrorKind::Other(error.into()) } } /// Returns `true` if the error was caused by a transaction that is considered bad in the @@ -79,42 +92,42 @@ impl PoolError { /// erroneous transaction. #[inline] pub fn is_bad_transaction(&self) -> bool { - match self { - PoolError::AlreadyImported(_) => { + match &self.kind { + PoolErrorKind::AlreadyImported => { // already imported but not bad false } - PoolError::ReplacementUnderpriced(_) => { + PoolErrorKind::ReplacementUnderpriced => { // already imported but not bad false } - PoolError::FeeCapBelowMinimumProtocolFeeCap(_, _) => { + PoolErrorKind::FeeCapBelowMinimumProtocolFeeCap(_) => { // fee cap of the tx below the technical minimum determined by the protocol, see // [MINIMUM_PROTOCOL_FEE_CAP](reth_primitives::constants::MIN_PROTOCOL_BASE_FEE) // although this transaction will always be invalid, we do not want to penalize the // sender because this check simply could not be implemented by the client false } - PoolError::SpammerExceededCapacity(_, _) => { + PoolErrorKind::SpammerExceededCapacity(_) => { // the sender exceeded the slot capacity, we should not penalize the peer for // sending the tx because we don't know if all the transactions are sent from the // same peer, there's also a chance that old transactions haven't been cleared yet // (pool lags behind) and old transaction still occupy a slot in the pool false } - PoolError::DiscardedOnInsert(_) => { + PoolErrorKind::DiscardedOnInsert => { // valid tx but dropped due to size constraints false } - PoolError::InvalidTransaction(_, err) => { + PoolErrorKind::InvalidTransaction(err) => { // transaction rejected because it violates constraints err.is_bad_transaction() } - PoolError::Other(_, _) => { + PoolErrorKind::Other(_) => { // internal error unrelated to the transaction false } - PoolError::ExistingConflictingTransactionType(_, _, _) => { + PoolErrorKind::ExistingConflictingTransactionType(_, _) => { // this is not a protocol error but an implementation error since the pool enforces // exclusivity (blob vs normal tx) for all senders false @@ -150,7 +163,7 @@ pub enum Eip4844PoolTransactionError { /// /// This error is thrown on validation if a valid blob transaction arrives with a nonce that /// would introduce gap in the nonce sequence. - #[error("Nonce too high.")] + #[error("nonce too high")] Eip4844NonceGap, } @@ -164,16 +177,16 @@ pub enum InvalidPoolTransactionError { Consensus(#[from] InvalidTransactionError), /// Thrown when a new transaction is added to the pool, but then immediately discarded to /// respect the size limits of the pool. - #[error("Transaction's gas limit {0} exceeds block's gas limit {1}.")] + #[error("transaction's gas limit {0} exceeds block's gas limit {1}")] ExceedsGasLimit(u64, u64), /// Thrown when a new transaction is added to the pool, but then immediately discarded to /// respect the max_init_code_size. - #[error("Transaction's size {0} exceeds max_init_code_size {1}.")] + #[error("transaction's size {0} exceeds max_init_code_size {1}")] ExceedsMaxInitCodeSize(usize, usize), /// Thrown if the input data of a transaction is greater /// than some meaningful limit a user might use. This is not a consensus error /// making the transaction invalid, rather a DOS protection. - #[error("Input data too large")] + #[error("input data too large")] OversizedData(usize, usize), /// Thrown if the transaction's fee is below the minimum fee #[error("transaction underpriced")] @@ -185,7 +198,7 @@ pub enum InvalidPoolTransactionError { #[error(transparent)] Eip4844(#[from] Eip4844PoolTransactionError), /// Any other error that occurred while inserting/validating that is transaction specific - #[error("{0:?}")] + #[error(transparent)] Other(Box), /// The transaction is specified to use less gas than required to start the /// invocation. diff --git a/crates/transaction-pool/src/noop.rs b/crates/transaction-pool/src/noop.rs index 0ba41a6fab42..13efe283cd6a 100644 --- a/crates/transaction-pool/src/noop.rs +++ b/crates/transaction-pool/src/noop.rs @@ -51,7 +51,7 @@ impl TransactionPool for NoopTransactionPool { transaction: Self::Transaction, ) -> PoolResult { let hash = *transaction.hash(); - Err(PoolError::Other(hash, Box::new(NoopInsertError::new(transaction)))) + Err(PoolError::other(hash, Box::new(NoopInsertError::new(transaction)))) } async fn add_transaction( @@ -60,7 +60,7 @@ impl TransactionPool for NoopTransactionPool { transaction: Self::Transaction, ) -> PoolResult { let hash = *transaction.hash(); - Err(PoolError::Other(hash, Box::new(NoopInsertError::new(transaction)))) + Err(PoolError::other(hash, Box::new(NoopInsertError::new(transaction)))) } async fn add_transactions( @@ -72,7 +72,7 @@ impl TransactionPool for NoopTransactionPool { .into_iter() .map(|transaction| { let hash = *transaction.hash(); - Err(PoolError::Other(hash, Box::new(NoopInsertError::new(transaction)))) + Err(PoolError::other(hash, Box::new(NoopInsertError::new(transaction)))) }) .collect()) } @@ -264,7 +264,7 @@ impl Default for MockTransactionValidator { /// An error that contains the transaction that failed to be inserted into the noop pool. #[derive(Debug, Clone, thiserror::Error)] -#[error("Can't insert transaction into the noop pool that does nothing.")] +#[error("can't insert transaction into the noop pool that does nothing")] pub struct NoopInsertError { tx: EthPooledTransaction, } diff --git a/crates/transaction-pool/src/pool/blob.rs b/crates/transaction-pool/src/pool/blob.rs index 65845f965937..4503bf267011 100644 --- a/crates/transaction-pool/src/pool/blob.rs +++ b/crates/transaction-pool/src/pool/blob.rs @@ -9,10 +9,12 @@ use std::{ sync::Arc, }; -/// A set of __all__ validated blob transactions in the pool. +use super::txpool::PendingFees; + +/// A set of validated blob transactions in the pool that are __not pending__. /// -/// The purpose of this pool is keep track of blob transactions that are either pending or queued -/// and to evict the worst blob transactions once the sub-pool is full. +/// The purpose of this pool is keep track of blob transactions that are queued and to evict the +/// worst blob transactions once the sub-pool is full. /// /// This expects that certain constraints are met: /// - blob transactions are always gap less @@ -22,7 +24,7 @@ pub(crate) struct BlobTransactions { /// This way we can determine when transactions were submitted to the pool. submission_id: u64, /// _All_ Transactions that are currently inside the pool grouped by their identifier. - by_id: BTreeMap>>, + by_id: BTreeMap>, /// _All_ transactions sorted by blob priority. all: BTreeSet>, /// Keeps track of the size of this pool. @@ -53,10 +55,10 @@ impl BlobTransactions { // keep track of size self.size_of += tx.size(); - self.by_id.insert(id, tx.clone()); - let ord = BlobOrd { submission_id }; let transaction = BlobTransaction { ord, transaction: tx }; + + self.by_id.insert(id, transaction.clone()); self.all.insert(transaction); } @@ -68,13 +70,12 @@ impl BlobTransactions { // remove from queues let tx = self.by_id.remove(id)?; - // TODO: remove from ordered set - // self.best.remove(&tx); + self.all.remove(&tx); // keep track of size self.size_of -= tx.transaction.size(); - Some(tx) + Some(tx.transaction) } /// Returns all transactions that satisfy the given basefee and blob_fee. @@ -101,6 +102,59 @@ impl BlobTransactions { self.by_id.len() } + /// Returns whether the pool is empty + #[cfg(test)] + #[allow(unused)] + pub(crate) fn is_empty(&self) -> bool { + self.by_id.is_empty() + } + + /// Returns all transactions which: + /// * have a `max_fee_per_blob_gas` greater than or equal to the given `blob_fee`, _and_ + /// * have a `max_fee_per_gas` greater than or equal to the given `base_fee` + fn satisfy_pending_fee_ids(&self, pending_fees: &PendingFees) -> Vec { + let mut transactions = Vec::new(); + { + let mut iter = self.by_id.iter().peekable(); + + while let Some((id, tx)) = iter.next() { + if tx.transaction.max_fee_per_blob_gas() < Some(pending_fees.blob_fee) || + tx.transaction.max_fee_per_gas() < pending_fees.base_fee as u128 + { + // still parked in blob pool -> skip descendant transactions + 'this: while let Some((peek, _)) = iter.peek() { + if peek.sender != id.sender { + break 'this + } + iter.next(); + } + } else { + transactions.push(*id); + } + } + } + transactions + } + + /// Removes all transactions (and their descendants) which: + /// * have a `max_fee_per_blob_gas` greater than or equal to the given `blob_fee`, _and_ + /// * have a `max_fee_per_gas` greater than or equal to the given `base_fee` + /// + /// Note: the transactions are not returned in a particular order. + pub(crate) fn enforce_pending_fees( + &mut self, + pending_fees: &PendingFees, + ) -> Vec>> { + let to_remove = self.satisfy_pending_fee_ids(pending_fees); + + let mut removed = Vec::with_capacity(to_remove.len()); + for id in to_remove { + removed.push(self.remove_transaction(&id).expect("transaction exists")); + } + + removed + } + /// Returns `true` if the transaction with the given id is already included in this pool. #[cfg(test)] #[allow(unused)] @@ -134,6 +188,12 @@ struct BlobTransaction { ord: BlobOrd, } +impl Clone for BlobTransaction { + fn clone(&self) -> Self { + Self { transaction: self.transaction.clone(), ord: self.ord.clone() } + } +} + impl Eq for BlobTransaction {} impl PartialEq for BlobTransaction { @@ -154,7 +214,7 @@ impl Ord for BlobTransaction { } } -#[derive(Debug)] +#[derive(Debug, Clone)] struct BlobOrd { /// Identifier that tags when transaction was submitted in the pool. pub(crate) submission_id: u64, diff --git a/crates/transaction-pool/src/pool/mod.rs b/crates/transaction-pool/src/pool/mod.rs index 6c7a00a05195..55f4cbb1baf7 100644 --- a/crates/transaction-pool/src/pool/mod.rs +++ b/crates/transaction-pool/src/pool/mod.rs @@ -66,7 +66,7 @@ //! category (2.) and become pending. use crate::{ - error::{PoolError, PoolResult}, + error::{PoolError, PoolErrorKind, PoolResult}, identifier::{SenderId, SenderIdentifiers, TransactionId}, pool::{ listener::PoolEventBroadcast, @@ -449,12 +449,12 @@ where TransactionValidationOutcome::Invalid(tx, err) => { let mut listener = self.event_listener.write(); listener.discarded(tx.hash()); - Err(PoolError::InvalidTransaction(*tx.hash(), err)) + Err(PoolError::new(*tx.hash(), err)) } TransactionValidationOutcome::Error(tx_hash, err) => { let mut listener = self.event_listener.write(); listener.discarded(&tx_hash); - Err(PoolError::Other(tx_hash, err)) + Err(PoolError::other(tx_hash, err)) } } } @@ -498,7 +498,7 @@ where .into_iter() .map(|res| match res { Ok(ref hash) if discarded.contains(hash) => { - Err(PoolError::DiscardedOnInsert(*hash)) + Err(PoolError::new(*hash, PoolErrorKind::DiscardedOnInsert)) } other => other, }) diff --git a/crates/transaction-pool/src/pool/parked.rs b/crates/transaction-pool/src/pool/parked.rs index 633e526f7d24..fa741d32f264 100644 --- a/crates/transaction-pool/src/pool/parked.rs +++ b/crates/transaction-pool/src/pool/parked.rs @@ -101,7 +101,7 @@ impl ParkedPool { self.by_id.len() } - /// Whether the pool is empty + /// Returns whether the pool is empty #[cfg(test)] #[allow(unused)] pub(crate) fn is_empty(&self) -> bool { diff --git a/crates/transaction-pool/src/pool/pending.rs b/crates/transaction-pool/src/pool/pending.rs index b4e71484f5c2..31acc91327b9 100644 --- a/crates/transaction-pool/src/pool/pending.rs +++ b/crates/transaction-pool/src/pool/pending.rs @@ -150,6 +150,51 @@ impl PendingPool { self.by_id.values().map(|tx| tx.transaction.clone()) } + /// Updates the pool with the new blob fee. Removes + /// from the subpool all transactions and their dependents that no longer satisfy the given + /// base fee (`tx.max_blob_fee < blob_fee`). + /// + /// Note: the transactions are not returned in a particular order. + /// + /// # Returns + /// + /// Removed transactions that no longer satisfy the blob fee. + pub(crate) fn update_blob_fee( + &mut self, + blob_fee: u128, + ) -> Vec>> { + // Create a collection for removed transactions. + let mut removed = Vec::new(); + + // Drain and iterate over all transactions. + let mut transactions_iter = self.clear_transactions().into_iter().peekable(); + while let Some((id, tx)) = transactions_iter.next() { + if tx.transaction.max_fee_per_blob_gas() < Some(blob_fee) { + // Add this tx to the removed collection since it no longer satisfies the blob fee + // condition. Decrease the total pool size. + removed.push(Arc::clone(&tx.transaction)); + + // Remove all dependent transactions. + 'this: while let Some((next_id, next_tx)) = transactions_iter.peek() { + if next_id.sender != id.sender { + break 'this + } + removed.push(Arc::clone(&next_tx.transaction)); + transactions_iter.next(); + } + } else { + self.size_of += tx.transaction.size(); + if self.ancestor(&id).is_none() { + self.independent_transactions.insert(tx.clone()); + } + self.all.insert(tx.clone()); + self.by_id.insert(id, tx); + } + } + + removed + } + /// Updates the pool with the new base fee. Reorders transactions by new priorities. Removes /// from the subpool all transactions and their dependents that no longer satisfy the given /// base fee (`tx.fee < base_fee`). diff --git a/crates/transaction-pool/src/pool/state.rs b/crates/transaction-pool/src/pool/state.rs index 27a7f14869a4..b7058c7ad3d5 100644 --- a/crates/transaction-pool/src/pool/state.rs +++ b/crates/transaction-pool/src/pool/state.rs @@ -66,7 +66,7 @@ impl TxState { } /// Identifier for the transaction Sub-pool -#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] +#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] #[repr(u8)] pub enum SubPool { /// The queued sub-pool contains transactions that are not ready to be included in the next @@ -190,5 +190,10 @@ mod tests { state.remove(TxState::ENOUGH_BLOB_FEE_CAP_BLOCK); assert!(state.is_blob()); assert!(!state.is_pending()); + + state.insert(TxState::ENOUGH_BLOB_FEE_CAP_BLOCK); + state.remove(TxState::ENOUGH_FEE_CAP_BLOCK); + assert!(state.is_blob()); + assert!(!state.is_pending()); } } diff --git a/crates/transaction-pool/src/pool/txpool.rs b/crates/transaction-pool/src/pool/txpool.rs index 8e5027bff74f..0330deed2f92 100644 --- a/crates/transaction-pool/src/pool/txpool.rs +++ b/crates/transaction-pool/src/pool/txpool.rs @@ -1,7 +1,7 @@ //! The internal transaction pool implementation. use crate::{ config::TXPOOL_MAX_ACCOUNT_SLOTS_PER_SENDER, - error::{Eip4844PoolTransactionError, InvalidPoolTransactionError, PoolError}, + error::{Eip4844PoolTransactionError, InvalidPoolTransactionError, PoolError, PoolErrorKind}, identifier::{SenderId, TransactionId}, metrics::TxPoolMetrics, pool::{ @@ -47,12 +47,14 @@ use std::{ /// B3[(Queued)] /// B1[(Pending)] /// B2[(Basefee)] +/// B4[(Blob)] /// end /// end /// discard([discard]) /// production([Block Production]) /// new([New Block]) /// A[Incoming Tx] --> B[Validation] -->|insert| pool +/// pool --> |if ready + blobfee too low| B4 /// pool --> |if ready| B1 /// pool --> |if ready + basfee too low| B2 /// pool --> |nonce gap or lack of funds| B3 @@ -60,8 +62,11 @@ use std::{ /// B1 --> |best| production /// B2 --> |worst| discard /// B3 --> |worst| discard -/// B1 --> |increased fee| B2 -/// B2 --> |decreased fee| B1 +/// B4 --> |worst| discard +/// B1 --> |increased blob fee| B4 +/// B4 --> |decreased blob fee| B1 +/// B1 --> |increased base fee| B2 +/// B2 --> |decreased base fee| B1 /// B3 --> |promote| B1 /// B3 --> |promote| B2 /// new --> |apply state changes| pool @@ -131,6 +136,8 @@ impl TxPool { basefee_size: self.basefee_pool.size(), queued: self.queued_pool.len(), queued_size: self.queued_pool.size(), + blob: self.blob_transactions.len(), + blob_size: self.blob_transactions.size(), total: self.all_transactions.len(), } } @@ -140,31 +147,108 @@ impl TxPool { BlockInfo { last_seen_block_hash: self.all_transactions.last_seen_block_hash, last_seen_block_number: self.all_transactions.last_seen_block_number, - pending_basefee: self.all_transactions.pending_basefee, - pending_blob_fee: Some(self.all_transactions.pending_blob_fee), + pending_basefee: self.all_transactions.pending_fees.base_fee, + pending_blob_fee: Some(self.all_transactions.pending_fees.blob_fee), } } /// Updates the tracked blob fee - fn update_blob_fee(&mut self, _pending_blob_fee: u128) { - // TODO: std::mem::swap pending_blob_fee - // TODO(mattsse): update blob txs + fn update_blob_fee(&mut self, mut pending_blob_fee: u128, base_fee_update: Ordering) { + std::mem::swap(&mut self.all_transactions.pending_fees.blob_fee, &mut pending_blob_fee); + match (self.all_transactions.pending_fees.blob_fee.cmp(&pending_blob_fee), base_fee_update) + { + (Ordering::Equal, Ordering::Equal) => { + // fee unchanged, nothing to update + } + (Ordering::Greater, Ordering::Equal) | + (Ordering::Equal, Ordering::Greater) | + (Ordering::Greater, Ordering::Greater) => { + // increased blob fee: recheck pending pool and remove all that are no longer valid + let removed = + self.pending_pool.update_blob_fee(self.all_transactions.pending_fees.blob_fee); + for tx in removed { + let to = { + let tx = + self.all_transactions.txs.get_mut(tx.id()).expect("tx exists in set"); + + // we unset the blob fee cap block flag, if the base fee is too high now + tx.state.remove(TxState::ENOUGH_BLOB_FEE_CAP_BLOCK); + tx.subpool = tx.state.into(); + tx.subpool + }; + self.add_transaction_to_subpool(to, tx); + } + } + (Ordering::Less, Ordering::Equal) | (_, Ordering::Less) => { + // decreased blob fee or base fee: recheck blob pool and promote all that are now + // valid + let removed = self + .blob_transactions + .enforce_pending_fees(&self.all_transactions.pending_fees); + for tx in removed { + let to = { + let tx = + self.all_transactions.txs.get_mut(tx.id()).expect("tx exists in set"); + tx.state.insert(TxState::ENOUGH_BLOB_FEE_CAP_BLOCK); + tx.state.insert(TxState::ENOUGH_FEE_CAP_BLOCK); + tx.subpool = tx.state.into(); + tx.subpool + }; + self.add_transaction_to_subpool(to, tx); + } + } + (Ordering::Less, Ordering::Greater) => { + // increased blob fee: recheck pending pool and remove all that are no longer valid + let removed = + self.pending_pool.update_blob_fee(self.all_transactions.pending_fees.blob_fee); + for tx in removed { + let to = { + let tx = + self.all_transactions.txs.get_mut(tx.id()).expect("tx exists in set"); + + // we unset the blob fee cap block flag, if the base fee is too high now + tx.state.remove(TxState::ENOUGH_BLOB_FEE_CAP_BLOCK); + tx.subpool = tx.state.into(); + tx.subpool + }; + self.add_transaction_to_subpool(to, tx); + } + + // decreased blob fee or base fee: recheck blob pool and promote all that are now + // valid + let removed = self + .blob_transactions + .enforce_pending_fees(&self.all_transactions.pending_fees); + for tx in removed { + let to = { + let tx = + self.all_transactions.txs.get_mut(tx.id()).expect("tx exists in set"); + tx.state.insert(TxState::ENOUGH_BLOB_FEE_CAP_BLOCK); + tx.state.insert(TxState::ENOUGH_FEE_CAP_BLOCK); + tx.subpool = tx.state.into(); + tx.subpool + }; + self.add_transaction_to_subpool(to, tx); + } + } + } } /// Updates the tracked basefee /// /// Depending on the change in direction of the basefee, this will promote or demote /// transactions from the basefee pool. - fn update_basefee(&mut self, mut pending_basefee: u64) { - std::mem::swap(&mut self.all_transactions.pending_basefee, &mut pending_basefee); - match self.all_transactions.pending_basefee.cmp(&pending_basefee) { + fn update_basefee(&mut self, mut pending_basefee: u64) -> Ordering { + std::mem::swap(&mut self.all_transactions.pending_fees.base_fee, &mut pending_basefee); + match self.all_transactions.pending_fees.base_fee.cmp(&pending_basefee) { Ordering::Equal => { // fee unchanged, nothing to update + Ordering::Equal } Ordering::Greater => { // increased base fee: recheck pending pool and remove all that are no longer valid let removed = - self.pending_pool.update_base_fee(self.all_transactions.pending_basefee); + self.pending_pool.update_base_fee(self.all_transactions.pending_fees.base_fee); for tx in removed { let to = { let tx = @@ -175,11 +259,13 @@ impl TxPool { }; self.add_transaction_to_subpool(to, tx); } + + Ordering::Greater } Ordering::Less => { // decreased base fee: recheck basefee pool and promote all that are now valid let removed = - self.basefee_pool.enforce_basefee(self.all_transactions.pending_basefee); + self.basefee_pool.enforce_basefee(self.all_transactions.pending_fees.base_fee); for tx in removed { let to = { let tx = @@ -190,6 +276,8 @@ impl TxPool { }; self.add_transaction_to_subpool(to, tx); } + + Ordering::Less } } } @@ -206,10 +294,10 @@ impl TxPool { } = info; self.all_transactions.last_seen_block_hash = last_seen_block_hash; self.all_transactions.last_seen_block_number = last_seen_block_number; - self.update_basefee(pending_basefee); + let basefee_ordering = self.update_basefee(pending_basefee); if let Some(blob_fee) = pending_blob_fee { - self.update_blob_fee(blob_fee) + self.update_blob_fee(blob_fee, basefee_ordering) } } @@ -225,7 +313,7 @@ impl TxPool { basefee: u64, ) -> Box>>> { - match basefee.cmp(&self.all_transactions.pending_basefee) { + match basefee.cmp(&self.all_transactions.pending_fees.base_fee) { Ordering::Equal => { // fee unchanged, nothing to shift Box::new(self.best_transactions()) @@ -240,7 +328,7 @@ impl TxPool { let unlocked = self.basefee_pool.satisfy_base_fee_transactions(basefee); Box::new( self.pending_pool - .best_with_unlocked(unlocked, self.all_transactions.pending_basefee), + .best_with_unlocked(unlocked, self.all_transactions.pending_fees.base_fee), ) } } @@ -253,7 +341,8 @@ impl TxPool { best_transactions_attributes: BestTransactionsAttributes, ) -> Box>>> { - match best_transactions_attributes.basefee.cmp(&self.all_transactions.pending_basefee) { + match best_transactions_attributes.basefee.cmp(&self.all_transactions.pending_fees.base_fee) + { Ordering::Equal => { // fee unchanged, nothing to shift Box::new(self.best_transactions()) @@ -268,12 +357,10 @@ impl TxPool { let unlocked_with_blob = self.blob_transactions.satisfy_attributes(best_transactions_attributes); - Box::new( - self.pending_pool.best_with_unlocked( - unlocked_with_blob, - self.all_transactions.pending_basefee, - ), - ) + Box::new(self.pending_pool.best_with_unlocked( + unlocked_with_blob, + self.all_transactions.pending_fees.base_fee, + )) } } } @@ -414,7 +501,7 @@ impl TxPool { on_chain_nonce: u64, ) -> PoolResult> { if self.contains(tx.hash()) { - return Err(PoolError::AlreadyImported(*tx.hash())) + return Err(PoolError::new(*tx.hash(), PoolErrorKind::AlreadyImported)) } // Update sender info with balance and nonce @@ -452,42 +539,50 @@ impl TxPool { self.metrics.invalid_transactions.increment(1); match err { InsertErr::Underpriced { existing, transaction: _ } => { - Err(PoolError::ReplacementUnderpriced(existing)) + Err(PoolError::new(existing, PoolErrorKind::ReplacementUnderpriced)) + } + InsertErr::FeeCapBelowMinimumProtocolFeeCap { transaction, fee_cap } => { + Err(PoolError::new( + *transaction.hash(), + PoolErrorKind::FeeCapBelowMinimumProtocolFeeCap(fee_cap), + )) } - InsertErr::FeeCapBelowMinimumProtocolFeeCap { transaction, fee_cap } => Err( - PoolError::FeeCapBelowMinimumProtocolFeeCap(*transaction.hash(), fee_cap), - ), InsertErr::ExceededSenderTransactionsCapacity { transaction } => { - Err(PoolError::SpammerExceededCapacity( - transaction.sender(), + Err(PoolError::new( *transaction.hash(), + PoolErrorKind::SpammerExceededCapacity(transaction.sender()), )) } InsertErr::TxGasLimitMoreThanAvailableBlockGas { transaction, block_gas_limit, tx_gas_limit, - } => Err(PoolError::InvalidTransaction( + } => Err(PoolError::new( *transaction.hash(), - InvalidPoolTransactionError::ExceedsGasLimit(block_gas_limit, tx_gas_limit), + PoolErrorKind::InvalidTransaction( + InvalidPoolTransactionError::ExceedsGasLimit( + block_gas_limit, + tx_gas_limit, + ), + ), )), - InsertErr::BlobTxHasNonceGap { transaction } => { - Err(PoolError::InvalidTransaction( - *transaction.hash(), + InsertErr::BlobTxHasNonceGap { transaction } => Err(PoolError::new( + *transaction.hash(), + PoolErrorKind::InvalidTransaction( Eip4844PoolTransactionError::Eip4844NonceGap.into(), - )) - } - InsertErr::Overdraft { transaction } => Err(PoolError::InvalidTransaction( + ), + )), + InsertErr::Overdraft { transaction } => Err(PoolError::new( *transaction.hash(), - InvalidPoolTransactionError::Overdraft, + PoolErrorKind::InvalidTransaction(InvalidPoolTransactionError::Overdraft), )), - InsertErr::TxTypeConflict { transaction } => { - Err(PoolError::ExistingConflictingTransactionType( + InsertErr::TxTypeConflict { transaction } => Err(PoolError::new( + *transaction.hash(), + PoolErrorKind::ExistingConflictingTransactionType( transaction.sender(), - *transaction.hash(), transaction.tx_type(), - )) - } + ), + )), } } } @@ -650,7 +745,7 @@ impl TxPool { self.queued_pool.add_transaction(tx); } SubPool::Pending => { - self.pending_pool.add_transaction(tx, self.all_transactions.pending_basefee); + self.pending_pool.add_transaction(tx, self.all_transactions.pending_fees.base_fee); } SubPool::BaseFee => { self.basefee_pool.add_transaction(tx); @@ -743,8 +838,8 @@ impl TxPool { #[cfg(any(test, feature = "test-utils"))] pub fn assert_invariants(&self) { let size = self.size(); - let actual = size.basefee + size.pending + size.queued; - assert_eq!(size.total, actual, "total size must be equal to the sum of all sub-pools, basefee:{}, pending:{}, queued:{}", size.basefee, size.pending, size.queued); + let actual = size.basefee + size.pending + size.queued + size.blob; + assert_eq!(size.total, actual, "total size must be equal to the sum of all sub-pools, basefee:{}, pending:{}, queued:{}, blob:{}", size.basefee, size.pending, size.queued, size.blob); self.all_transactions.assert_invariants(); self.pending_pool.assert_invariants(); self.basefee_pool.assert_invariants(); @@ -814,10 +909,8 @@ pub(crate) struct AllTransactions { last_seen_block_number: u64, /// The current block hash the pool keeps track of. last_seen_block_hash: B256, - /// Expected base fee for the pending block. - pending_basefee: u64, - /// Expected blob fee for the pending block. - pending_blob_fee: u128, + /// Expected blob and base fee for the pending block. + pending_fees: PendingFees, /// Configured price bump settings for replacements price_bumps: PriceBumpConfig, } @@ -884,9 +977,9 @@ impl AllTransactions { } = block_info; self.last_seen_block_number = last_seen_block_number; self.last_seen_block_hash = last_seen_block_hash; - self.pending_basefee = pending_basefee; + self.pending_fees.base_fee = pending_basefee; if let Some(pending_blob_fee) = pending_blob_fee { - self.pending_blob_fee = pending_blob_fee; + self.pending_fees.blob_fee = pending_blob_fee; } } @@ -977,7 +1070,7 @@ impl AllTransactions { tx.state.insert(TxState::NO_PARKED_ANCESTORS); // Update the first transaction of this sender. - Self::update_tx_base_fee(self.pending_basefee, tx); + Self::update_tx_base_fee(self.pending_fees.base_fee, tx); // Track if the transaction's sub-pool changed. Self::record_subpool_update(&mut updates, tx); @@ -1023,7 +1116,7 @@ impl AllTransactions { has_parked_ancestor = !tx.state.is_pending(); // Update and record sub-pool changes. - Self::update_tx_base_fee(self.pending_basefee, tx); + Self::update_tx_base_fee(self.pending_fees.base_fee, tx); Self::record_subpool_update(&mut updates, tx); // Advance iterator @@ -1368,7 +1461,7 @@ impl AllTransactions { transaction = self.ensure_valid_blob_transaction(transaction, on_chain_balance, ancestor)?; let blob_fee_cap = transaction.transaction.max_fee_per_blob_gas().unwrap_or_default(); - if blob_fee_cap >= self.pending_blob_fee { + if blob_fee_cap >= self.pending_fees.blob_fee { state.insert(TxState::ENOUGH_BLOB_FEE_CAP_BLOCK); } } else { @@ -1390,7 +1483,7 @@ impl AllTransactions { if fee_cap < self.minimal_protocol_basefee as u128 { return Err(InsertErr::FeeCapBelowMinimumProtocolFeeCap { transaction, fee_cap }) } - if fee_cap >= self.pending_basefee as u128 { + if fee_cap >= self.pending_fees.base_fee as u128 { state.insert(TxState::ENOUGH_FEE_CAP_BLOCK); } @@ -1564,13 +1657,27 @@ impl Default for AllTransactions { tx_counter: Default::default(), last_seen_block_number: 0, last_seen_block_hash: Default::default(), - pending_basefee: Default::default(), - pending_blob_fee: BLOB_TX_MIN_BLOB_GASPRICE, + pending_fees: Default::default(), price_bumps: Default::default(), } } } +/// Represents updated fees for the pending block. +#[derive(Debug, Clone)] +pub(crate) struct PendingFees { + /// The pending base fee + pub(crate) base_fee: u64, + /// The pending blob fee + pub(crate) blob_fee: u128, +} + +impl Default for PendingFees { + fn default() -> Self { + PendingFees { base_fee: Default::default(), blob_fee: BLOB_TX_MIN_BLOB_GASPRICE } + } +} + /// Result type for inserting a transaction pub(crate) type InsertResult = Result, InsertErr>; @@ -1744,9 +1851,12 @@ mod tests { let on_chain_balance = U256::MAX; let on_chain_nonce = 0; let mut f = MockTransactionFactory::default(); - let mut pool = AllTransactions { pending_blob_fee: 10_000_000, ..Default::default() }; - pool.pending_blob_fee = 10_000_000; + let mut pool = AllTransactions { + pending_fees: PendingFees { blob_fee: 10_000_000, ..Default::default() }, + ..Default::default() + }; let tx = MockTransaction::eip4844().inc_price().inc_limit(); + pool.pending_fees.blob_fee = tx.max_fee_per_blob_gas().unwrap() + 1; let valid_tx = f.validated(tx); let InsertOk { state, .. } = pool.insert_tx(valid_tx.clone(), on_chain_balance, on_chain_nonce).unwrap(); @@ -1756,6 +1866,321 @@ mod tests { let _ = pool.txs.get(&valid_tx.transaction_id).unwrap(); } + #[test] + fn test_valid_tx_with_decreasing_blob_fee() { + let on_chain_balance = U256::MAX; + let on_chain_nonce = 0; + let mut f = MockTransactionFactory::default(); + let mut pool = AllTransactions { + pending_fees: PendingFees { blob_fee: 10_000_000, ..Default::default() }, + ..Default::default() + }; + let tx = MockTransaction::eip4844().inc_price().inc_limit(); + + pool.pending_fees.blob_fee = tx.max_fee_per_blob_gas().unwrap() + 1; + let valid_tx = f.validated(tx.clone()); + let InsertOk { state, .. } = + pool.insert_tx(valid_tx.clone(), on_chain_balance, on_chain_nonce).unwrap(); + assert!(state.contains(TxState::NO_NONCE_GAPS)); + assert!(!state.contains(TxState::ENOUGH_BLOB_FEE_CAP_BLOCK)); + + let _ = pool.txs.get(&valid_tx.transaction_id).unwrap(); + pool.remove_transaction(&valid_tx.transaction_id); + + pool.pending_fees.blob_fee = tx.max_fee_per_blob_gas().unwrap(); + let InsertOk { state, .. } = + pool.insert_tx(valid_tx.clone(), on_chain_balance, on_chain_nonce).unwrap(); + assert!(state.contains(TxState::NO_NONCE_GAPS)); + assert!(state.contains(TxState::ENOUGH_BLOB_FEE_CAP_BLOCK)); + } + + #[test] + fn test_demote_valid_tx_with_increasing_blob_fee() { + let on_chain_balance = U256::MAX; + let on_chain_nonce = 0; + let mut f = MockTransactionFactory::default(); + let mut pool = TxPool::new(MockOrdering::default(), Default::default()); + let tx = MockTransaction::eip4844().inc_price().inc_limit(); + + // set block info so the tx is initially underpriced w.r.t. blob fee + let mut block_info = pool.block_info(); + block_info.pending_blob_fee = Some(tx.max_fee_per_blob_gas().unwrap()); + pool.set_block_info(block_info); + + let validated = f.validated(tx.clone()); + let id = *validated.id(); + pool.add_transaction(validated, on_chain_balance, on_chain_nonce).unwrap(); + + // assert pool lengths + assert!(pool.blob_transactions.is_empty()); + assert_eq!(pool.pending_pool.len(), 1); + + // check tx state and derived subpool + let internal_tx = pool.all_transactions.txs.get(&id).unwrap(); + assert!(internal_tx.state.contains(TxState::ENOUGH_BLOB_FEE_CAP_BLOCK)); + assert_eq!(internal_tx.subpool, SubPool::Pending); + + // set block info so the pools are updated + block_info.pending_blob_fee = Some(tx.max_fee_per_blob_gas().unwrap() + 1); + pool.set_block_info(block_info); + + // check that the tx is promoted + let internal_tx = pool.all_transactions.txs.get(&id).unwrap(); + assert!(!internal_tx.state.contains(TxState::ENOUGH_BLOB_FEE_CAP_BLOCK)); + assert_eq!(internal_tx.subpool, SubPool::Blob); + + // make sure the blob transaction was promoted into the pending pool + assert_eq!(pool.blob_transactions.len(), 1); + assert!(pool.pending_pool.is_empty()); + } + + #[test] + fn test_promote_valid_tx_with_decreasing_blob_fee() { + let on_chain_balance = U256::MAX; + let on_chain_nonce = 0; + let mut f = MockTransactionFactory::default(); + let mut pool = TxPool::new(MockOrdering::default(), Default::default()); + let tx = MockTransaction::eip4844().inc_price().inc_limit(); + + // set block info so the tx is initially underpriced w.r.t. blob fee + let mut block_info = pool.block_info(); + block_info.pending_blob_fee = Some(tx.max_fee_per_blob_gas().unwrap() + 1); + pool.set_block_info(block_info); + + let validated = f.validated(tx.clone()); + let id = *validated.id(); + pool.add_transaction(validated, on_chain_balance, on_chain_nonce).unwrap(); + + // assert pool lengths + assert!(pool.pending_pool.is_empty()); + assert_eq!(pool.blob_transactions.len(), 1); + + // check tx state and derived subpool + let internal_tx = pool.all_transactions.txs.get(&id).unwrap(); + assert!(!internal_tx.state.contains(TxState::ENOUGH_BLOB_FEE_CAP_BLOCK)); + assert_eq!(internal_tx.subpool, SubPool::Blob); + + // set block info so the pools are updated + block_info.pending_blob_fee = Some(tx.max_fee_per_blob_gas().unwrap()); + pool.set_block_info(block_info); + + // check that the tx is promoted + let internal_tx = pool.all_transactions.txs.get(&id).unwrap(); + assert!(internal_tx.state.contains(TxState::ENOUGH_BLOB_FEE_CAP_BLOCK)); + assert_eq!(internal_tx.subpool, SubPool::Pending); + + // make sure the blob transaction was promoted into the pending pool + assert_eq!(pool.pending_pool.len(), 1); + assert!(pool.blob_transactions.is_empty()); + } + + /// A struct representing a txpool promotion test instance + #[derive(Debug, PartialEq, Eq, Clone, Hash)] + struct PromotionTest { + /// The basefee at the start of the test + basefee: u64, + /// The blobfee at the start of the test + blobfee: u128, + /// The subpool at the start of the test + subpool: SubPool, + /// The basefee update + basefee_update: u64, + /// The blobfee update + blobfee_update: u128, + /// The subpool after the update + new_subpool: SubPool, + } + + impl PromotionTest { + /// Returns the test case for the opposite update + fn opposite(&self) -> Self { + Self { + basefee: self.basefee_update, + blobfee: self.blobfee_update, + subpool: self.new_subpool, + blobfee_update: self.blobfee, + basefee_update: self.basefee, + new_subpool: self.subpool, + } + } + + fn assert_subpool_lengths( + &self, + pool: &TxPool, + failure_message: String, + check_subpool: SubPool, + ) { + match check_subpool { + SubPool::Blob => { + assert_eq!(pool.blob_transactions.len(), 1, "{failure_message}"); + assert!(pool.pending_pool.is_empty(), "{failure_message}"); + assert!(pool.basefee_pool.is_empty(), "{failure_message}"); + assert!(pool.queued_pool.is_empty(), "{failure_message}"); + } + SubPool::Pending => { + assert!(pool.blob_transactions.is_empty(), "{failure_message}"); + assert_eq!(pool.pending_pool.len(), 1, "{failure_message}"); + assert!(pool.basefee_pool.is_empty(), "{failure_message}"); + assert!(pool.queued_pool.is_empty(), "{failure_message}"); + } + SubPool::BaseFee => { + assert!(pool.blob_transactions.is_empty(), "{failure_message}"); + assert!(pool.pending_pool.is_empty(), "{failure_message}"); + assert_eq!(pool.basefee_pool.len(), 1, "{failure_message}"); + assert!(pool.queued_pool.is_empty(), "{failure_message}"); + } + SubPool::Queued => { + assert!(pool.blob_transactions.is_empty(), "{failure_message}"); + assert!(pool.pending_pool.is_empty(), "{failure_message}"); + assert!(pool.basefee_pool.is_empty(), "{failure_message}"); + assert_eq!(pool.queued_pool.len(), 1, "{failure_message}"); + } + } + } + + /// Runs an assertion on the provided pool, ensuring that the transaction is in the correct + /// subpool based on the starting condition of the test, assuming the pool contains only a + /// single transaction. + fn assert_single_tx_starting_subpool(&self, pool: &TxPool) { + self.assert_subpool_lengths( + pool, + format!("pool length check failed at start of test: {self:?}"), + self.subpool, + ); + } + + /// Runs an assertion on the provided pool, ensuring that the transaction is in the correct + /// subpool based on the ending condition of the test, assuming the pool contains only a + /// single transaction. + fn assert_single_tx_ending_subpool(&self, pool: &TxPool) { + self.assert_subpool_lengths( + pool, + format!("pool length check failed at end of test: {self:?}"), + self.new_subpool, + ); + } + } + + #[test] + fn test_promote_blob_tx_with_both_pending_fee_updates() { + // this exhaustively tests all possible promotion scenarios for a single transaction moving + // between the blob and pending pool + let on_chain_balance = U256::MAX; + let on_chain_nonce = 0; + let mut f = MockTransactionFactory::default(); + let tx = MockTransaction::eip4844().inc_price().inc_limit(); + + let max_fee_per_blob_gas = tx.max_fee_per_blob_gas().unwrap(); + let max_fee_per_gas = tx.max_fee_per_gas() as u64; + + // These are all _promotion_ tests or idempotent tests. + let mut expected_promotions = vec![ + PromotionTest { + blobfee: max_fee_per_blob_gas + 1, + basefee: max_fee_per_gas + 1, + subpool: SubPool::Blob, + blobfee_update: max_fee_per_blob_gas + 1, + basefee_update: max_fee_per_gas + 1, + new_subpool: SubPool::Blob, + }, + PromotionTest { + blobfee: max_fee_per_blob_gas + 1, + basefee: max_fee_per_gas + 1, + subpool: SubPool::Blob, + blobfee_update: max_fee_per_blob_gas, + basefee_update: max_fee_per_gas + 1, + new_subpool: SubPool::Blob, + }, + PromotionTest { + blobfee: max_fee_per_blob_gas + 1, + basefee: max_fee_per_gas + 1, + subpool: SubPool::Blob, + blobfee_update: max_fee_per_blob_gas + 1, + basefee_update: max_fee_per_gas, + new_subpool: SubPool::Blob, + }, + PromotionTest { + blobfee: max_fee_per_blob_gas + 1, + basefee: max_fee_per_gas + 1, + subpool: SubPool::Blob, + blobfee_update: max_fee_per_blob_gas, + basefee_update: max_fee_per_gas, + new_subpool: SubPool::Pending, + }, + PromotionTest { + blobfee: max_fee_per_blob_gas, + basefee: max_fee_per_gas + 1, + subpool: SubPool::Blob, + blobfee_update: max_fee_per_blob_gas, + basefee_update: max_fee_per_gas, + new_subpool: SubPool::Pending, + }, + PromotionTest { + blobfee: max_fee_per_blob_gas + 1, + basefee: max_fee_per_gas, + subpool: SubPool::Blob, + blobfee_update: max_fee_per_blob_gas, + basefee_update: max_fee_per_gas, + new_subpool: SubPool::Pending, + }, + PromotionTest { + blobfee: max_fee_per_blob_gas, + basefee: max_fee_per_gas, + subpool: SubPool::Pending, + blobfee_update: max_fee_per_blob_gas, + basefee_update: max_fee_per_gas, + new_subpool: SubPool::Pending, + }, + ]; + + // extend the test cases with reversed updates - this will add all _demotion_ tests + let reversed = expected_promotions.iter().map(|test| test.opposite()).collect::>(); + expected_promotions.extend(reversed); + + // dedup the test cases + let expected_promotions = expected_promotions.into_iter().collect::>(); + + for promotion_test in expected_promotions.iter() { + let mut pool = TxPool::new(MockOrdering::default(), Default::default()); + + // set block info so the tx is initially underpriced w.r.t. blob fee + let mut block_info = pool.block_info(); + + block_info.pending_blob_fee = Some(promotion_test.blobfee); + block_info.pending_basefee = promotion_test.basefee; + pool.set_block_info(block_info); + + let validated = f.validated(tx.clone()); + let id = *validated.id(); + pool.add_transaction(validated, on_chain_balance, on_chain_nonce).unwrap(); + + // assert pool lengths + promotion_test.assert_single_tx_starting_subpool(&pool); + + // check tx state and derived subpool, it should not move into the blob pool + let internal_tx = pool.all_transactions.txs.get(&id).unwrap(); + assert_eq!( + internal_tx.subpool, promotion_test.subpool, + "Subpools do not match at start of test: {promotion_test:?}" + ); + + // set block info with new base fee + block_info.pending_basefee = promotion_test.basefee_update; + block_info.pending_blob_fee = Some(promotion_test.blobfee_update); + pool.set_block_info(block_info); + + // check tx state and derived subpool, it should not move into the blob pool + let internal_tx = pool.all_transactions.txs.get(&id).unwrap(); + assert_eq!( + internal_tx.subpool, promotion_test.new_subpool, + "Subpools do not match at end of test: {promotion_test:?}" + ); + + // assert new pool lengths + promotion_test.assert_single_tx_ending_subpool(&pool); + } + } + #[test] fn test_insert_pending() { let on_chain_balance = U256::MAX; @@ -1828,8 +2253,8 @@ mod tests { let tx = MockTransaction::eip1559().inc_price().inc_limit(); let tx = f.validated(tx); pool.add_transaction(tx.clone(), on_chain_balance, on_chain_nonce).unwrap(); - match pool.add_transaction(tx, on_chain_balance, on_chain_nonce).unwrap_err() { - PoolError::AlreadyImported(_) => {} + match pool.add_transaction(tx, on_chain_balance, on_chain_nonce).unwrap_err().kind { + PoolErrorKind::AlreadyImported => {} _ => unreachable!(), } } @@ -1998,7 +2423,7 @@ mod tests { let on_chain_nonce = 0; let mut f = MockTransactionFactory::default(); let mut pool = AllTransactions::default(); - pool.pending_basefee = pool.minimal_protocol_basefee.checked_add(1).unwrap(); + pool.pending_fees.base_fee = pool.minimal_protocol_basefee.checked_add(1).unwrap(); let tx = MockTransaction::eip1559().inc_nonce().inc_limit(); let first = f.validated(tx.clone()); @@ -2006,7 +2431,7 @@ mod tests { let first_in_pool = pool.get(first.id()).unwrap(); - assert!(tx.get_gas_price() < pool.pending_basefee as u128); + assert!(tx.get_gas_price() < pool.pending_fees.base_fee as u128); // has nonce gap assert!(!first_in_pool.state.contains(TxState::NO_NONCE_GAPS)); diff --git a/crates/transaction-pool/src/traits.rs b/crates/transaction-pool/src/traits.rs index 01162f42759a..7e7db8ec65b2 100644 --- a/crates/transaction-pool/src/traits.rs +++ b/crates/transaction-pool/src/traits.rs @@ -938,7 +938,7 @@ impl PoolTransaction for EthPooledTransaction { /// For EIP-1559 transactions: `min(max_fee_per_gas - base_fee, max_priority_fee_per_gas)`. /// For legacy transactions: `gas_price - base_fee`. fn effective_tip_per_gas(&self, base_fee: u64) -> Option { - self.transaction.effective_tip_per_gas(base_fee) + self.transaction.effective_tip_per_gas(Some(base_fee)) } /// Returns the max priority fee per gas if the transaction is an EIP-1559 transaction, and @@ -1031,6 +1031,10 @@ pub struct PoolSize { pub pending: usize, /// Reported size of transactions in the _pending_ sub-pool. pub pending_size: usize, + /// Number of transactions in the _blob_ pool. + pub blob: usize, + /// Reported size of transactions in the _blob_ pool. + pub blob_size: usize, /// Number of transactions in the _basefee_ pool. pub basefee: usize, /// Reported size of transactions in the _basefee_ sub-pool. @@ -1051,7 +1055,7 @@ impl PoolSize { /// Asserts that the invariants of the pool size are met. #[cfg(test)] pub(crate) fn assert_invariants(&self) { - assert_eq!(self.total, self.pending + self.basefee + self.queued); + assert_eq!(self.total, self.pending + self.basefee + self.queued + self.blob); } } @@ -1109,6 +1113,22 @@ impl NewSubpoolTransactionStream { pub fn new(st: Receiver>, subpool: SubPool) -> Self { Self { st, subpool } } + + /// Tries to receive the next value for this stream. + pub fn try_recv( + &mut self, + ) -> Result, tokio::sync::mpsc::error::TryRecvError> { + loop { + match self.st.try_recv() { + Ok(event) => { + if event.subpool == self.subpool { + return Ok(event) + } + } + Err(e) => return Err(e), + } + } + } } impl Stream for NewSubpoolTransactionStream { diff --git a/crates/transaction-pool/src/validate/eth.rs b/crates/transaction-pool/src/validate/eth.rs index 30500c4f3a18..cb79d0b486ec 100644 --- a/crates/transaction-pool/src/validate/eth.rs +++ b/crates/transaction-pool/src/validate/eth.rs @@ -236,22 +236,9 @@ where } // intrinsic gas checks - let access_list = - transaction.access_list().map(|list| list.flattened()).unwrap_or_default(); let is_shanghai = self.fork_tracker.is_shanghai_activated(); - - if transaction.gas_limit() < - calculate_intrinsic_gas_after_merge( - transaction.input(), - transaction.kind(), - &access_list, - is_shanghai, - ) - { - return TransactionValidationOutcome::Invalid( - transaction, - InvalidPoolTransactionError::IntrinsicGasTooLow, - ) + if let Err(err) = ensure_intrinsic_gas(&transaction, is_shanghai) { + return TransactionValidationOutcome::Invalid(transaction, err) } let mut maybe_blob_sidecar = None; @@ -548,20 +535,13 @@ impl EthTransactionValidatorBuilder { self } - /// Builds a the [EthTransactionValidator] and spawns validation tasks via the - /// [TransactionValidationTaskExecutor] - /// - /// The validator will spawn `additional_tasks` additional tasks for validation. - /// - /// By default this will spawn 1 additional task. - pub fn build_with_tasks( + /// Builds a the [EthTransactionValidator] without spawning validator tasks. + pub fn build( self, client: Client, - tasks: T, blob_store: S, - ) -> TransactionValidationTaskExecutor> + ) -> EthTransactionValidator where - T: TaskSpawner, S: BlobStore, { let Self { @@ -573,9 +553,9 @@ impl EthTransactionValidatorBuilder { eip4844, block_gas_limit, minimum_priority_fee, - additional_tasks, propagate_local_transactions, kzg_settings, + .. } = self; let fork_tracker = @@ -596,6 +576,28 @@ impl EthTransactionValidatorBuilder { _marker: Default::default(), }; + EthTransactionValidator { inner: Arc::new(inner) } + } + + /// Builds a the [EthTransactionValidator] and spawns validation tasks via the + /// [TransactionValidationTaskExecutor] + /// + /// The validator will spawn `additional_tasks` additional tasks for validation. + /// + /// By default this will spawn 1 additional task. + pub fn build_with_tasks( + self, + client: Client, + tasks: T, + blob_store: S, + ) -> TransactionValidationTaskExecutor> + where + T: TaskSpawner, + S: BlobStore, + { + let additional_tasks = self.additional_tasks; + let validator = self.build(client, blob_store); + let (tx, task) = ValidationTask::new(); // Spawn validation tasks, they are blocking because they perform db lookups @@ -615,10 +617,7 @@ impl EthTransactionValidatorBuilder { let to_validation_task = Arc::new(Mutex::new(tx)); - TransactionValidationTaskExecutor { - validator: EthTransactionValidator { inner: Arc::new(inner) }, - to_validation_task, - } + TransactionValidationTaskExecutor { validator, to_validation_task } } } @@ -658,3 +657,75 @@ pub fn ensure_max_init_code_size( Ok(()) } } + +/// Ensures that gas limit of the transaction exceeds the intrinsic gas of the transaction. +/// +/// See also [calculate_intrinsic_gas_after_merge] +pub fn ensure_intrinsic_gas( + transaction: &T, + is_shanghai: bool, +) -> Result<(), InvalidPoolTransactionError> { + let access_list = transaction.access_list().map(|list| list.flattened()).unwrap_or_default(); + if transaction.gas_limit() < + calculate_intrinsic_gas_after_merge( + transaction.input(), + transaction.kind(), + &access_list, + is_shanghai, + ) + { + Err(InvalidPoolTransactionError::IntrinsicGasTooLow) + } else { + Ok(()) + } +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::{ + blobstore::InMemoryBlobStore, CoinbaseTipOrdering, EthPooledTransaction, Pool, + TransactionPool, + }; + use reth_primitives::{ + hex, FromRecoveredPooledTransaction, PooledTransactionsElement, MAINNET, U256, + }; + use reth_provider::test_utils::{ExtendedAccount, MockEthProvider}; + + // + #[tokio::test] + async fn validate_transaction() { + let raw = "0x02f914950181ad84b2d05e0085117553845b830f7df88080b9143a6040608081523462000414576200133a803803806200001e8162000419565b9283398101608082820312620004145781516001600160401b03908181116200041457826200004f9185016200043f565b92602092838201519083821162000414576200006d9183016200043f565b8186015190946001600160a01b03821692909183900362000414576060015190805193808511620003145760038054956001938488811c9816801562000409575b89891014620003f3578190601f988981116200039d575b50899089831160011462000336576000926200032a575b505060001982841b1c191690841b1781555b8751918211620003145760049788548481811c9116801562000309575b89821014620002f457878111620002a9575b5087908784116001146200023e5793839491849260009562000232575b50501b92600019911b1c19161785555b6005556007805460ff60a01b19169055600880546001600160a01b0319169190911790553015620001f3575060025469d3c21bcecceda100000092838201809211620001de57506000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9160025530835282815284832084815401905584519384523093a351610e889081620004b28239f35b601190634e487b7160e01b6000525260246000fd5b90606493519262461bcd60e51b845283015260248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152fd5b0151935038806200013a565b9190601f198416928a600052848a6000209460005b8c8983831062000291575050501062000276575b50505050811b0185556200014a565b01519060f884600019921b161c191690553880808062000267565b86860151895590970196948501948893500162000253565b89600052886000208880860160051c8201928b8710620002ea575b0160051c019085905b828110620002dd5750506200011d565b60008155018590620002cd565b92508192620002c4565b60228a634e487b7160e01b6000525260246000fd5b90607f16906200010b565b634e487b7160e01b600052604160045260246000fd5b015190503880620000dc565b90869350601f19831691856000528b6000209260005b8d8282106200038657505084116200036d575b505050811b018155620000ee565b015160001983861b60f8161c191690553880806200035f565b8385015186558a979095019493840193016200034c565b90915083600052896000208980850160051c8201928c8610620003e9575b918891869594930160051c01915b828110620003d9575050620000c5565b60008155859450889101620003c9565b92508192620003bb565b634e487b7160e01b600052602260045260246000fd5b97607f1697620000ae565b600080fd5b6040519190601f01601f191682016001600160401b038111838210176200031457604052565b919080601f84011215620004145782516001600160401b038111620003145760209062000475601f8201601f1916830162000419565b92818452828287010111620004145760005b8181106200049d57508260009394955001015290565b85810183015184820184015282016200048756fe608060408181526004918236101561001657600080fd5b600092833560e01c91826306fdde0314610a1c57508163095ea7b3146109f257816318160ddd146109d35781631b4c84d2146109ac57816323b872dd14610833578163313ce5671461081757816339509351146107c357816370a082311461078c578163715018a6146107685781638124f7ac146107495781638da5cb5b1461072057816395d89b411461061d578163a457c2d714610575578163a9059cbb146104e4578163c9567bf914610120575063dd62ed3e146100d557600080fd5b3461011c578060031936011261011c57806020926100f1610b5a565b6100f9610b75565b6001600160a01b0391821683526001865283832091168252845220549051908152f35b5080fd5b905082600319360112610338576008546001600160a01b039190821633036104975760079283549160ff8360a01c1661045557737a250d5630b4cf539739df2c5dacb4c659f2488d92836bffffffffffffffffffffffff60a01b8092161786553087526020938785528388205430156104065730895260018652848920828a52865280858a205584519081527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925863092a38554835163c45a015560e01b815290861685828581845afa9182156103dd57849187918b946103e7575b5086516315ab88c960e31b815292839182905afa9081156103dd576044879289928c916103c0575b508b83895196879586946364e329cb60e11b8652308c870152166024850152165af19081156103b6579086918991610389575b50169060065416176006558385541660604730895288865260c4858a20548860085416928751958694859363f305d71960e01b8552308a86015260248501528d60448501528d606485015260848401524260a48401525af1801561037f579084929161034c575b50604485600654169587541691888551978894859363095ea7b360e01b855284015260001960248401525af1908115610343575061030c575b5050805460ff60a01b1916600160a01b17905580f35b81813d831161033c575b6103208183610b8b565b8101031261033857518015150361011c5738806102f6565b8280fd5b503d610316565b513d86823e3d90fd5b6060809293503d8111610378575b6103648183610b8b565b81010312610374578290386102bd565b8580fd5b503d61035a565b83513d89823e3d90fd5b6103a99150863d88116103af575b6103a18183610b8b565b810190610e33565b38610256565b503d610397565b84513d8a823e3d90fd5b6103d79150843d86116103af576103a18183610b8b565b38610223565b85513d8b823e3d90fd5b6103ff919450823d84116103af576103a18183610b8b565b92386101fb565b845162461bcd60e51b81528085018790526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608490fd5b6020606492519162461bcd60e51b8352820152601760248201527f74726164696e6720697320616c7265616479206f70656e0000000000000000006044820152fd5b608490602084519162461bcd60e51b8352820152602160248201527f4f6e6c79206f776e65722063616e2063616c6c20746869732066756e6374696f6044820152603760f91b6064820152fd5b9050346103385781600319360112610338576104fe610b5a565b9060243593303303610520575b602084610519878633610bc3565b5160018152f35b600594919454808302908382041483151715610562576127109004820391821161054f5750925080602061050b565b634e487b7160e01b815260118552602490fd5b634e487b7160e01b825260118652602482fd5b9050823461061a578260031936011261061a57610590610b5a565b918360243592338152600160205281812060018060a01b03861682526020522054908282106105c9576020856105198585038733610d31565b608490602086519162461bcd60e51b8352820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152fd5b80fd5b83833461011c578160031936011261011c57805191809380549160019083821c92828516948515610716575b6020958686108114610703578589529081156106df5750600114610687575b6106838787610679828c0383610b8b565b5191829182610b11565b0390f35b81529295507f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b8284106106cc57505050826106839461067992820101948680610668565b80548685018801529286019281016106ae565b60ff19168887015250505050151560051b8301019250610679826106838680610668565b634e487b7160e01b845260228352602484fd5b93607f1693610649565b50503461011c578160031936011261011c5760085490516001600160a01b039091168152602090f35b50503461011c578160031936011261011c576020906005549051908152f35b833461061a578060031936011261061a57600880546001600160a01b031916905580f35b50503461011c57602036600319011261011c5760209181906001600160a01b036107b4610b5a565b16815280845220549051908152f35b82843461061a578160031936011261061a576107dd610b5a565b338252600160209081528383206001600160a01b038316845290528282205460243581019290831061054f57602084610519858533610d31565b50503461011c578160031936011261011c576020905160128152f35b83833461011c57606036600319011261011c5761084e610b5a565b610856610b75565b6044359160018060a01b0381169485815260209560018752858220338352875285822054976000198903610893575b505050906105199291610bc3565b85891061096957811561091a5733156108cc5750948481979861051997845260018a528284203385528a52039120558594938780610885565b865162461bcd60e51b8152908101889052602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608490fd5b865162461bcd60e51b81529081018890526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608490fd5b865162461bcd60e51b8152908101889052601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606490fd5b50503461011c578160031936011261011c5760209060ff60075460a01c1690519015158152f35b50503461011c578160031936011261011c576020906002549051908152f35b50503461011c578060031936011261011c57602090610519610a12610b5a565b6024359033610d31565b92915034610b0d5783600319360112610b0d57600354600181811c9186908281168015610b03575b6020958686108214610af05750848852908115610ace5750600114610a75575b6106838686610679828b0383610b8b565b929550600383527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b828410610abb575050508261068394610679928201019438610a64565b8054868501880152928601928101610a9e565b60ff191687860152505050151560051b83010192506106798261068338610a64565b634e487b7160e01b845260229052602483fd5b93607f1693610a44565b8380fd5b6020808252825181830181905290939260005b828110610b4657505060409293506000838284010152601f8019910116010190565b818101860151848201604001528501610b24565b600435906001600160a01b0382168203610b7057565b600080fd5b602435906001600160a01b0382168203610b7057565b90601f8019910116810190811067ffffffffffffffff821117610bad57604052565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03908116918215610cde5716918215610c8d57600082815280602052604081205491808310610c3957604082827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef958760209652828652038282205586815220818154019055604051908152a3565b60405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608490fd5b60405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608490fd5b60405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608490fd5b6001600160a01b03908116918215610de25716918215610d925760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925918360005260018252604060002085600052825280604060002055604051908152a3565b60405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608490fd5b60405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608490fd5b90816020910312610b7057516001600160a01b0381168103610b70579056fea2646970667358221220285c200b3978b10818ff576bb83f2dc4a2a7c98dfb6a36ea01170de792aa652764736f6c63430008140033000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000d3fd4f95820a9aa848ce716d6c200eaefb9a2e4900000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000003543131000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000035431310000000000000000000000000000000000000000000000000000000000c001a04e551c75810ffdfe6caff57da9f5a8732449f42f0f4c57f935b05250a76db3b6a046cd47e6d01914270c1ec0d9ac7fae7dfb240ec9a8b6ec7898c4d6aa174388f2"; + + let data = hex::decode(raw).unwrap(); + let tx = PooledTransactionsElement::decode_enveloped(data.into()).unwrap(); + + let transaction = + EthPooledTransaction::from_recovered_transaction(tx.try_into_ecrecovered().unwrap()); + let res = ensure_intrinsic_gas(&transaction, false); + assert!(res.is_ok()); + let res = ensure_intrinsic_gas(&transaction, true); + assert!(res.is_ok()); + + let provider = MockEthProvider::default(); + provider.add_account( + transaction.sender(), + ExtendedAccount::new(transaction.nonce(), U256::MAX), + ); + let blob_store = InMemoryBlobStore::default(); + let validator = EthTransactionValidatorBuilder::new(MAINNET.clone()) + .build(provider, blob_store.clone()); + + let outcome = validator.validate_one(TransactionOrigin::External, transaction.clone()); + + assert!(outcome.is_valid()); + + let pool = + Pool::new(validator, CoinbaseTipOrdering::default(), blob_store, Default::default()); + + let res = pool.add_external_transaction(transaction.clone()).await; + assert!(res.is_ok()); + let tx = pool.get(transaction.hash()); + assert!(tx.is_some()); + } +} diff --git a/crates/transaction-pool/src/validate/mod.rs b/crates/transaction-pool/src/validate/mod.rs index 7df86d51a93d..54eac27875c0 100644 --- a/crates/transaction-pool/src/validate/mod.rs +++ b/crates/transaction-pool/src/validate/mod.rs @@ -59,6 +59,21 @@ impl TransactionValidationOutcome { Self::Error(hash, ..) => *hash, } } + + /// Returns true if the transaction is valid. + pub fn is_valid(&self) -> bool { + matches!(self, Self::Valid { .. }) + } + + /// Returns true if the transaction is invalid. + pub fn is_invalid(&self) -> bool { + matches!(self, Self::Invalid(_, _)) + } + + /// Returns true if validation resulted in an error. + pub fn is_error(&self) -> bool { + matches!(self, Self::Error(_, _)) + } } /// A wrapper type for a transaction that is valid and has an optional extracted EIP-4844 blob @@ -260,6 +275,13 @@ impl ValidPoolTransaction { self.transaction.cost() } + /// Returns the EIP-4844 max blob fee the caller is willing to pay. + /// + /// For non-EIP-4844 transactions, this returns [None]. + pub fn max_fee_per_blob_gas(&self) -> Option { + self.transaction.max_fee_per_blob_gas() + } + /// Returns the EIP-1559 Max base fee the caller is willing to pay. /// /// For legacy transactions this is `gas_price`. @@ -347,6 +369,6 @@ impl fmt::Debug for ValidPoolTransaction { #[derive(thiserror::Error, Debug)] pub enum TransactionValidatorError { /// Failed to communicate with the validation service. - #[error("Validation service unreachable")] + #[error("validation service unreachable")] ValidationServiceUnreachable, } diff --git a/crates/transaction-pool/tests/it/blobs.rs b/crates/transaction-pool/tests/it/blobs.rs index cdcce9de3dad..26b7795d1aa5 100644 --- a/crates/transaction-pool/tests/it/blobs.rs +++ b/crates/transaction-pool/tests/it/blobs.rs @@ -1,7 +1,7 @@ //! Blob transaction tests use reth_transaction_pool::{ - error::PoolError, + error::PoolErrorKind, test_utils::{testing_pool, MockTransaction, MockTransactionFactory}, TransactionOrigin, TransactionPool, }; @@ -29,10 +29,10 @@ async fn blobs_exclusive() { let res = txpool.add_transaction(TransactionOrigin::External, eip1559_tx.clone()).await.unwrap_err(); - match res { - PoolError::ExistingConflictingTransactionType(addr, hash, tx_type) => { + assert_eq!(res.hash, eip1559_tx.get_hash()); + match res.kind { + PoolErrorKind::ExistingConflictingTransactionType(addr, tx_type) => { assert_eq!(addr, eip1559_tx.get_sender()); - assert_eq!(hash, eip1559_tx.get_hash()); assert_eq!(tx_type, eip1559_tx.tx_type()); } _ => unreachable!(), diff --git a/crates/trie/src/trie.rs b/crates/trie/src/trie.rs index ec184d981a62..b4efacac3761 100644 --- a/crates/trie/src/trie.rs +++ b/crates/trie/src/trie.rs @@ -143,7 +143,7 @@ impl<'a, TX: DbTx> StateRoot<'a, TX, &'a TX> { tx: &'a TX, range: RangeInclusive, ) -> Result { - tracing::debug!(target: "loader", "incremental state root"); + tracing::debug!(target: "trie::loader", "incremental state root"); Self::incremental_root_calculator(tx, range)?.root() } @@ -159,7 +159,7 @@ impl<'a, TX: DbTx> StateRoot<'a, TX, &'a TX> { tx: &'a TX, range: RangeInclusive, ) -> Result<(B256, TrieUpdates), StateRootError> { - tracing::debug!(target: "loader", "incremental state root"); + tracing::debug!(target: "trie::loader", "incremental state root"); Self::incremental_root_calculator(tx, range)?.root_with_updates() } @@ -173,7 +173,7 @@ impl<'a, TX: DbTx> StateRoot<'a, TX, &'a TX> { tx: &'a TX, range: RangeInclusive, ) -> Result { - tracing::debug!(target: "loader", "incremental state root with progress"); + tracing::debug!(target: "trie::loader", "incremental state root with progress"); Self::incremental_root_calculator(tx, range)?.root_with_progress() } } @@ -222,7 +222,7 @@ where } fn calculate(self, retain_updates: bool) -> Result { - tracing::debug!(target: "loader", "calculating state root"); + tracing::debug!(target: "trie::loader", "calculating state root"); let mut trie_updates = TrieUpdates::default(); let hashed_account_cursor = self.hashed_cursor_factory.hashed_account_cursor()?; @@ -1138,7 +1138,7 @@ mod tests { #[test] fn account_trie_around_extension_node() { let db = create_test_rw_db(); - let factory = ProviderFactory::new(db.as_ref(), MAINNET.clone()); + let factory = ProviderFactory::new(db.db(), MAINNET.clone()); let tx = factory.provider_rw().unwrap(); let expected = extension_node_trie(&tx); @@ -1164,7 +1164,7 @@ mod tests { fn account_trie_around_extension_node_with_dbtrie() { let db = create_test_rw_db(); - let factory = ProviderFactory::new(db.as_ref(), MAINNET.clone()); + let factory = ProviderFactory::new(db.db(), MAINNET.clone()); let tx = factory.provider_rw().unwrap(); let expected = extension_node_trie(&tx); @@ -1227,7 +1227,7 @@ mod tests { #[test] fn storage_trie_around_extension_node() { let db = create_test_rw_db(); - let factory = ProviderFactory::new(db.as_ref(), MAINNET.clone()); + let factory = ProviderFactory::new(db.db(), MAINNET.clone()); let tx = factory.provider_rw().unwrap(); let hashed_address = B256::random(); diff --git a/docs/crates/discv4.md b/docs/crates/discv4.md index 45ab4a52f84f..f328a95a246c 100644 --- a/docs/crates/discv4.md +++ b/docs/crates/discv4.md @@ -139,7 +139,7 @@ impl Discv4 { let socket = UdpSocket::bind(local_address).await?; let local_addr = socket.local_addr()?; local_node_record.udp_port = local_addr.port(); - trace!( target : "discv4", ?local_addr,"opened UDP socket"); + trace!(target: "discv4", ?local_addr,"opened UDP socket"); let (to_service, rx) = mpsc::channel(100); diff --git a/etc/grafana/dashboards/overview.json b/etc/grafana/dashboards/overview.json index d83cd3aa3270..1a654e9885d0 100644 --- a/etc/grafana/dashboards/overview.json +++ b/etc/grafana/dashboards/overview.json @@ -497,7 +497,6 @@ } }, "mappings": [], - "min": 0, "thresholds": { "mode": "absolute", "steps": [ @@ -523,7 +522,7 @@ "calcs": [], "displayMode": "list", "placement": "bottom", - "showLegend": true + "showLegend": false }, "tooltip": { "mode": "single", @@ -539,7 +538,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "rate(reth_tx_commit_sum{instance=~\"$instance\"}[$__rate_interval]) / rate(reth_tx_commit_count{instance=~\"$instance\"}[$__rate_interval])", + "expr": "avg(rate(reth_database_transaction_close_duration_seconds_sum{instance=~\"$instance\", outcome=\"commit\"}[$__rate_interval]) / rate(reth_database_transaction_close_duration_seconds_count{instance=~\"$instance\", outcome=\"commit\"}[$__rate_interval]) >= 0)", "format": "time_series", "instant": false, "legendFormat": "Commit time", @@ -628,7 +627,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "sum(increase(reth_tx_commit{instance=~\"$instance\"}[$__interval])) by (quantile)", + "expr": "avg(avg_over_time(reth_database_transaction_close_duration_seconds{instance=~\"$instance\", outcome=\"commit\"}[$__interval])) by (quantile)", "format": "time_series", "instant": false, "legendFormat": "{{quantile}}", @@ -639,6 +638,394 @@ "title": "Commit time heatmap", "type": "heatmap" }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The average time a database transaction was open.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic", + "seriesBy": "last" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "points", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 26 + }, + "id": 117, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "9.3.6", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(rate(reth_database_transaction_open_duration_seconds_sum{instance=~\"$instance\", outcome!=\"\"}[$__rate_interval]) / rate(reth_database_transaction_open_duration_seconds_count{instance=~\"$instance\", outcome!=\"\"}[$__rate_interval])) by (outcome, mode)", + "format": "time_series", + "instant": false, + "legendFormat": "{{mode}}, {{outcome}}", + "range": true, + "refId": "A" + } + ], + "title": "Average transaction open time", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximum time the database transaction was open.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "points", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 26 + }, + "id": 116, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "10.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "max(max_over_time(reth_database_transaction_open_duration_seconds{instance=~\"$instance\", outcome!=\"\", quantile=\"1\"}[$__interval])) by (outcome, mode)", + "format": "time_series", + "instant": false, + "legendFormat": "{{mode}}, {{outcome}}", + "range": true, + "refId": "A" + } + ], + "title": "Max transaction open time", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 34 + }, + "id": 119, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "10.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(reth_database_transaction_open_total{instance=~\"$instance\"}) by (mode)", + "format": "time_series", + "instant": false, + "legendFormat": "{{mode}}", + "range": true, + "refId": "A" + } + ], + "title": "Number of open transactions", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The maximum time the database transaction operation which inserts a large value took.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "points", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 34 + }, + "id": 118, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "10.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "max(max_over_time(reth_database_operation_large_value_duration_seconds{instance=~\"$instance\", quantile=\"1\"}[$__interval]) > 0) by (table)", + "format": "time_series", + "instant": false, + "legendFormat": "{{table}}", + "range": true, + "refId": "A" + } + ], + "title": "Max insertion operation time", + "type": "timeseries" + }, { "datasource": { "type": "prometheus", @@ -666,7 +1053,7 @@ "h": 8, "w": 12, "x": 0, - "y": 26 + "y": 42 }, "id": 48, "options": { @@ -776,7 +1163,7 @@ "h": 8, "w": 12, "x": 12, - "y": 26 + "y": 42 }, "id": 52, "options": { @@ -834,7 +1221,7 @@ "h": 8, "w": 12, "x": 0, - "y": 34 + "y": 50 }, "id": 50, "options": { @@ -1002,7 +1389,7 @@ "h": 8, "w": 12, "x": 12, - "y": 34 + "y": 50 }, "id": 58, "options": { @@ -1101,7 +1488,7 @@ "h": 8, "w": 12, "x": 0, - "y": 42 + "y": 58 }, "id": 113, "options": { @@ -1138,7 +1525,7 @@ "h": 1, "w": 24, "x": 0, - "y": 50 + "y": 66 }, "id": 46, "panels": [], @@ -1207,7 +1594,7 @@ "h": 8, "w": 24, "x": 0, - "y": 51 + "y": 67 }, "id": 56, "options": { @@ -1280,7 +1667,7 @@ "h": 1, "w": 24, "x": 0, - "y": 59 + "y": 75 }, "id": 6, "panels": [], @@ -1352,7 +1739,7 @@ "h": 8, "w": 8, "x": 0, - "y": 60 + "y": 76 }, "id": 18, "options": { @@ -1446,7 +1833,7 @@ "h": 8, "w": 8, "x": 8, - "y": 60 + "y": 76 }, "id": 16, "options": { @@ -1566,7 +1953,7 @@ "h": 8, "w": 8, "x": 16, - "y": 60 + "y": 76 }, "id": 8, "options": { @@ -1649,7 +2036,7 @@ "h": 8, "w": 8, "x": 0, - "y": 68 + "y": 84 }, "id": 54, "options": { @@ -1870,7 +2257,7 @@ "h": 8, "w": 14, "x": 8, - "y": 68 + "y": 84 }, "id": 103, "options": { @@ -1907,7 +2294,7 @@ "h": 1, "w": 24, "x": 0, - "y": 76 + "y": 92 }, "id": 24, "panels": [], @@ -2003,7 +2390,7 @@ "h": 8, "w": 12, "x": 0, - "y": 77 + "y": 93 }, "id": 26, "options": { @@ -2135,7 +2522,7 @@ "h": 8, "w": 12, "x": 12, - "y": 77 + "y": 93 }, "id": 33, "options": { @@ -2253,7 +2640,7 @@ "h": 8, "w": 12, "x": 0, - "y": 85 + "y": 101 }, "id": 36, "options": { @@ -2302,7 +2689,7 @@ "h": 1, "w": 24, "x": 0, - "y": 93 + "y": 109 }, "id": 32, "panels": [], @@ -2358,7 +2745,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -2407,7 +2795,7 @@ "h": 8, "w": 12, "x": 0, - "y": 94 + "y": 110 }, "id": 30, "options": { @@ -2558,7 +2946,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null } ] }, @@ -2570,7 +2959,7 @@ "h": 8, "w": 12, "x": 12, - "y": 94 + "y": 110 }, "id": 28, "options": { @@ -2687,7 +3076,7 @@ "h": 8, "w": 12, "x": 0, - "y": 102 + "y": 118 }, "id": 35, "options": { @@ -2810,7 +3199,7 @@ "h": 8, "w": 12, "x": 12, - "y": 102 + "y": 118 }, "id": 73, "options": { @@ -2860,7 +3249,7 @@ "h": 1, "w": 24, "x": 0, - "y": 110 + "y": 126 }, "id": 89, "panels": [], @@ -2932,7 +3321,7 @@ "h": 8, "w": 12, "x": 0, - "y": 111 + "y": 127 }, "id": 91, "options": { @@ -3049,7 +3438,7 @@ "h": 8, "w": 12, "x": 12, - "y": 111 + "y": 127 }, "id": 92, "options": { @@ -3184,7 +3573,7 @@ "h": 8, "w": 12, "x": 0, - "y": 119 + "y": 135 }, "id": 102, "options": { @@ -3303,7 +3692,7 @@ "h": 8, "w": 12, "x": 12, - "y": 119 + "y": 135 }, "id": 94, "options": { @@ -3397,7 +3786,7 @@ "h": 8, "w": 12, "x": 0, - "y": 127 + "y": 143 }, "id": 104, "options": { @@ -3521,7 +3910,7 @@ "h": 8, "w": 12, "x": 12, - "y": 127 + "y": 143 }, "id": 93, "options": { @@ -3664,7 +4053,7 @@ "h": 8, "w": 12, "x": 0, - "y": 135 + "y": 151 }, "id": 95, "options": { @@ -3783,7 +4172,7 @@ "h": 8, "w": 12, "x": 12, - "y": 135 + "y": 151 }, "id": 115, "options": { @@ -3876,7 +4265,7 @@ "h": 1, "w": 24, "x": 0, - "y": 143 + "y": 159 }, "id": 79, "panels": [], @@ -3947,7 +4336,7 @@ "h": 8, "w": 12, "x": 0, - "y": 144 + "y": 160 }, "id": 74, "options": { @@ -4041,7 +4430,7 @@ "h": 8, "w": 12, "x": 12, - "y": 144 + "y": 160 }, "id": 80, "options": { @@ -4135,7 +4524,7 @@ "h": 8, "w": 12, "x": 0, - "y": 152 + "y": 168 }, "id": 81, "options": { @@ -4229,7 +4618,7 @@ "h": 8, "w": 12, "x": 12, - "y": 152 + "y": 168 }, "id": 114, "options": { @@ -4267,7 +4656,7 @@ "h": 1, "w": 24, "x": 0, - "y": 160 + "y": 176 }, "id": 87, "panels": [], @@ -4338,7 +4727,7 @@ "h": 8, "w": 12, "x": 0, - "y": 161 + "y": 177 }, "id": 83, "options": { @@ -4431,7 +4820,7 @@ "h": 8, "w": 12, "x": 12, - "y": 161 + "y": 177 }, "id": 84, "options": { @@ -4536,7 +4925,7 @@ "h": 8, "w": 12, "x": 0, - "y": 169 + "y": 185 }, "id": 85, "options": { @@ -4573,7 +4962,7 @@ "h": 1, "w": 24, "x": 0, - "y": 177 + "y": 193 }, "id": 68, "panels": [], @@ -4644,7 +5033,7 @@ "h": 8, "w": 12, "x": 0, - "y": 178 + "y": 194 }, "id": 60, "options": { @@ -4737,7 +5126,7 @@ "h": 8, "w": 12, "x": 12, - "y": 178 + "y": 194 }, "id": 62, "options": { @@ -4830,7 +5219,7 @@ "h": 8, "w": 12, "x": 0, - "y": 186 + "y": 202 }, "id": 64, "options": { @@ -4867,7 +5256,7 @@ "h": 1, "w": 24, "x": 0, - "y": 194 + "y": 210 }, "id": 97, "panels": [], @@ -4936,7 +5325,7 @@ "h": 8, "w": 12, "x": 0, - "y": 195 + "y": 211 }, "id": 98, "options": { @@ -5096,7 +5485,7 @@ "h": 8, "w": 12, "x": 12, - "y": 195 + "y": 211 }, "id": 101, "options": { @@ -5191,7 +5580,7 @@ "h": 8, "w": 12, "x": 0, - "y": 203 + "y": 219 }, "id": 99, "options": { @@ -5228,7 +5617,7 @@ "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "description": "100% = 1 core", + "description": "", "fieldConfig": { "defaults": { "color": { @@ -5286,7 +5675,7 @@ "h": 8, "w": 12, "x": 12, - "y": 203 + "y": 219 }, "id": 100, "options": { @@ -5324,7 +5713,7 @@ "h": 1, "w": 24, "x": 0, - "y": 211 + "y": 227 }, "id": 105, "panels": [], @@ -5394,7 +5783,7 @@ "h": 8, "w": 12, "x": 0, - "y": 212 + "y": 228 }, "id": 106, "options": { @@ -5489,7 +5878,7 @@ "h": 8, "w": 12, "x": 12, - "y": 212 + "y": 228 }, "id": 107, "options": { @@ -5527,7 +5916,7 @@ "h": 1, "w": 24, "x": 0, - "y": 220 + "y": 236 }, "id": 108, "panels": [], @@ -5550,7 +5939,7 @@ "h": 8, "w": 12, "x": 0, - "y": 221 + "y": 237 }, "hiddenSeries": false, "id": 109, @@ -5638,7 +6027,7 @@ "h": 8, "w": 12, "x": 12, - "y": 221 + "y": 237 }, "hiddenSeries": false, "id": 110, @@ -5735,7 +6124,7 @@ "h": 8, "w": 12, "x": 0, - "y": 229 + "y": 245 }, "id": 111, "maxDataPoints": 25, @@ -5824,7 +6213,7 @@ "h": 8, "w": 12, "x": 12, - "y": 229 + "y": 245 }, "id": 112, "maxDataPoints": 25, @@ -5928,6 +6317,6 @@ "timezone": "", "title": "reth", "uid": "2k8BXz24x", - "version": 10, + "version": 11, "weekStart": "" -} \ No newline at end of file +} diff --git a/examples/Cargo.toml b/examples/Cargo.toml index 89f34438810e..d3a2fd9da8be 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -13,6 +13,7 @@ reth-provider.workspace = true reth-rpc-builder.workspace = true reth-rpc-types.workspace = true +reth-rpc-types-compat.workspace = true reth-revm.workspace = true reth-blockchain-tree.workspace = true diff --git a/examples/beacon-api-sse/Cargo.toml b/examples/beacon-api-sse/Cargo.toml index 8f2f2c611cd0..892c2e229e73 100644 --- a/examples/beacon-api-sse/Cargo.toml +++ b/examples/beacon-api-sse/Cargo.toml @@ -9,6 +9,8 @@ license.workspace = true reth.workspace = true eyre.workspace = true clap.workspace = true +serde.workspace = true +serde_json.workspace = true tracing.workspace = true futures-util.workspace = true tokio = { workspace = true, features = ["time"] } diff --git a/examples/db-access.rs b/examples/db-access.rs index faed7fc1d4da..235193a38f64 100644 --- a/examples/db-access.rs +++ b/examples/db-access.rs @@ -5,6 +5,7 @@ use reth_provider::{ StateProvider, TransactionsProvider, }; use reth_rpc_types::{Filter, FilteredParams}; +use reth_rpc_types_compat::log::from_primitive_log; use std::path::Path; @@ -197,7 +198,8 @@ fn receipts_provider_example