diff --git a/Cargo.lock b/Cargo.lock index a81e124a4a..0f2d80d4f3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -18,7 +18,7 @@ version = "0.4.2" source = "git+https://github.com/encointer/substrate-api-client.git?branch=v0.9.42-tag-v0.14.0-retracted-check-metadata-hash#84655ae1c4cf0ea7f45aee7ce7935dae027f9ae6" dependencies = [ "ac-primitives", - "log 0.4.20", + "log 0.4.22", "maybe-async", ] @@ -33,7 +33,7 @@ dependencies = [ "either", "frame-metadata", "hex", - "log 0.4.20", + "log 0.4.22", "parity-scale-codec", "scale-bits", "scale-decode", @@ -360,7 +360,7 @@ version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "hash-db 0.16.0", - "log 0.4.20", + "log 0.4.22", ] [[package]] @@ -487,7 +487,7 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb5b05133427c07c4776906f673ccf36c21b102c9829c641a5b56bd151d44fd6" dependencies = [ - "log 0.4.20", + "log 0.4.22", "parity-scale-codec", "scale-info", "serde 1.0.193", @@ -1219,7 +1219,7 @@ version = "0.1.0" source = "git+https://github.com/integritee-network/pallets.git?branch=sdk-v0.13.0-polkadot-v0.9.42#abf29acd41a0fca9cd7025b297b6a9fa272a122f" dependencies = [ "common-primitives", - "log 0.4.20", + "log 0.4.22", "parity-scale-codec", "scale-info", "serde 1.0.193", @@ -1246,7 +1246,7 @@ checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" dependencies = [ "atty", "humantime", - "log 0.4.20", + "log 0.4.22", "regex 1.9.5", "termcolor", ] @@ -1259,7 +1259,7 @@ checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" dependencies = [ "humantime", "is-terminal", - "log 0.4.20", + "log 0.4.22", "regex 1.9.5", "termcolor", ] @@ -1365,7 +1365,7 @@ dependencies = [ "evm-core", "evm-gasometer", "evm-runtime", - "log 0.4.20", + "log 0.4.22", "parity-scale-codec", "primitive-types", "rlp", @@ -1483,7 +1483,7 @@ dependencies = [ "either", "futures 0.3.28", "futures-timer", - "log 0.4.20", + "log 0.4.22", "num-traits 0.2.16", "parity-scale-codec", "parking_lot 0.12.1", @@ -1581,7 +1581,7 @@ dependencies = [ "hex", "impl-serde", "libsecp256k1", - "log 0.4.20", + "log 0.4.22", "parity-scale-codec", "scale-info", "serde 1.0.193", @@ -1621,7 +1621,7 @@ dependencies = [ "frame-support-procedural", "frame-system", "linregress", - "log 0.4.20", + "log 0.4.22", "parity-scale-codec", "paste", "scale-info", @@ -1676,7 +1676,7 @@ dependencies = [ "frame-support-procedural", "impl-trait-for-tuples", "k256", - "log 0.4.20", + "log 0.4.22", "once_cell 1.18.0", "parity-scale-codec", "paste", @@ -1742,7 +1742,7 @@ version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "frame-support", - "log 0.4.20", + "log 0.4.22", "parity-scale-codec", "scale-info", "serde 1.0.193", @@ -2059,7 +2059,7 @@ dependencies = [ "aho-corasick", "bstr", "fnv 1.0.7", - "log 0.4.20", + "log 0.4.22", "regex 1.9.5", ] @@ -2305,7 +2305,7 @@ name = "http_req" version = "0.8.1" source = "git+https://github.com/integritee-network/http_req?branch=master#3723e88235f2b29bc1a31835853b072ffd0455fd" dependencies = [ - "log 0.4.20", + "log 0.4.22", "rustls 0.19.1", "unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "webpki 0.21.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2317,7 +2317,7 @@ name = "http_req" version = "0.8.1" source = "git+https://github.com/integritee-network/http_req#3723e88235f2b29bc1a31835853b072ffd0455fd" dependencies = [ - "log 0.4.20", + "log 0.4.22", "rustls 0.19.0 (git+https://github.com/mesalock-linux/rustls?branch=mesalock_sgx)", "sgx_tstd", "unicase 2.6.0 (git+https://github.com/mesalock-linux/unicase-sgx)", @@ -2397,7 +2397,7 @@ dependencies = [ "ct-logs", "futures-util 0.3.28", "hyper", - "log 0.4.20", + "log 0.4.22", "rustls 0.19.1", "rustls-native-certs", "tokio", @@ -2578,7 +2578,7 @@ dependencies = [ "itp-types", "itp-utils", "its-primitives", - "log 0.4.20", + "log 0.4.22", "pallet-balances", "pallet-enclave-bridge", "pallet-evm", @@ -2650,7 +2650,7 @@ dependencies = [ "its-test", "jsonrpsee", "lazy_static", - "log 0.4.20", + "log 0.4.22", "mockall", "pallet-balances", "parity-scale-codec", @@ -2757,7 +2757,7 @@ dependencies = [ "itp-enclave-metrics", "itp-ocall-api", "lazy_static", - "log 0.4.20", + "log 0.4.22", "parity-scale-codec", "serde 1.0.193", "sgx_tstd", @@ -2788,7 +2788,7 @@ dependencies = [ "itp-top-pool-author", "itp-types", "itp-utils", - "log 0.4.20", + "log 0.4.22", "parity-scale-codec", "regex 1.9.5", "sgx_tstd", @@ -2803,7 +2803,7 @@ version = "0.1.0" dependencies = [ "hex", "itp-types", - "log 0.4.20", + "log 0.4.22", ] [[package]] @@ -2852,7 +2852,7 @@ dependencies = [ "itp-storage", "itp-types", "itp-utils", - "log 0.4.20", + "log 0.4.22", "pallet-balances", "pallet-notes", "pallet-parentchain", @@ -2880,7 +2880,7 @@ dependencies = [ "itp-utils", "jsonrpc-core 18.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpc-core 18.0.0 (git+https://github.com/scs/jsonrpc?branch=no_std_v18)", - "log 0.4.20", + "log 0.4.22", "parity-scale-codec", "serde_json 1.0.103", "sgx_tstd", @@ -2903,7 +2903,7 @@ dependencies = [ "itp-test", "itp-top-pool-author", "itp-types", - "log 0.4.20", + "log 0.4.22", "parity-scale-codec", "sgx_tstd", "sp-io 7.0.0", @@ -2932,7 +2932,7 @@ dependencies = [ "itc-parentchain-block-importer", "itp-import-queue", "itp-types", - "log 0.4.20", + "log 0.4.22", "sgx_tstd", "sgx_types", "thiserror 1.0.44", @@ -2950,7 +2950,7 @@ dependencies = [ "itp-stf-executor", "itp-stf-interface", "itp-types", - "log 0.4.20", + "log 0.4.22", "parity-scale-codec", "sgx_tstd", "sgx_types", @@ -2978,7 +2978,7 @@ dependencies = [ "itp-test", "itp-top-pool-author", "itp-types", - "log 0.4.20", + "log 0.4.22", "parity-scale-codec", "sgx_tstd", "sgx_types", @@ -3000,7 +3000,7 @@ dependencies = [ "itp-storage", "itp-test", "itp-types", - "log 0.4.20", + "log 0.4.22", "parity-scale-codec", "sgx_tstd", "sgx_types", @@ -3027,7 +3027,7 @@ dependencies = [ "http 0.2.9", "http_req 0.8.1 (git+https://github.com/integritee-network/http_req?branch=master)", "http_req 0.8.1 (git+https://github.com/integritee-network/http_req)", - "log 0.4.20", + "log 0.4.22", "serde 1.0.193", "serde_json 1.0.103", "sgx_tstd", @@ -3049,7 +3049,7 @@ dependencies = [ "itp-rpc", "itp-types", "itp-utils", - "log 0.4.20", + "log 0.4.22", "openssl", "parity-scale-codec", "parking_lot 0.12.1", @@ -3076,7 +3076,7 @@ dependencies = [ "its-storage", "its-test", "jsonrpsee", - "log 0.4.20", + "log 0.4.22", "parity-scale-codec", "sp-core", "tokio", @@ -3089,7 +3089,7 @@ dependencies = [ "bit-vec", "chrono 0.4.26", "env_logger 0.9.3", - "log 0.4.20", + "log 0.4.22", "mio 0.6.21", "mio 0.6.23", "mio-extras 2.0.6 (git+https://github.com/integritee-network/mio-extras-sgx?rev=963234b)", @@ -3147,7 +3147,7 @@ version = "0.9.0" dependencies = [ "itp-api-client-types", "itp-types", - "log 0.4.20", + "log 0.4.22", "sp-consensus-grandpa", "sp-runtime", "substrate-api-client", @@ -3180,7 +3180,7 @@ dependencies = [ "itp-sgx-crypto", "itp-sgx-io", "itp-time-utils", - "log 0.4.20", + "log 0.4.22", "num-bigint 0.2.5", "parity-scale-codec", "rustls 0.19.0 (git+https://github.com/mesalock-linux/rustls?rev=sgx_1.1.3)", @@ -3231,7 +3231,7 @@ dependencies = [ "itp-stf-interface", "itp-storage", "itp-types", - "log 0.4.20", + "log 0.4.22", "parity-scale-codec", "serde_json 1.0.103", "sgx_crypto_helper", @@ -3414,7 +3414,7 @@ dependencies = [ "derive_more", "itp-sgx-io", "itp-sgx-temp-dir", - "log 0.4.20", + "log 0.4.22", "ofb", "parity-scale-codec", "serde_json 1.0.103", @@ -3433,7 +3433,7 @@ dependencies = [ "derive_more", "environmental 1.1.3", "itp-hashing", - "log 0.4.20", + "log 0.4.22", "parity-scale-codec", "postcard", "serde 1.0.193", @@ -3488,7 +3488,7 @@ dependencies = [ "itp-top-pool", "itp-top-pool-author", "itp-types", - "log 0.4.20", + "log 0.4.22", "parity-scale-codec", "sgx_tstd", "sgx_types", @@ -3535,7 +3535,7 @@ dependencies = [ "itp-stf-state-observer", "itp-time-utils", "itp-types", - "log 0.4.20", + "log 0.4.22", "parity-scale-codec", "rust-base58 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "rust-base58 0.0.4 (git+https://github.com/mesalock-linux/rust-base58-sgx?rev=sgx_1.1.3)", @@ -3551,7 +3551,7 @@ name = "itp-stf-state-observer" version = "0.9.0" dependencies = [ "itp-types", - "log 0.4.20", + "log 0.4.22", "sgx_tstd", "thiserror 1.0.44", "thiserror 1.0.9", @@ -3594,7 +3594,7 @@ dependencies = [ "itp-time-utils", "itp-types", "jsonrpc-core 18.0.0 (git+https://github.com/scs/jsonrpc?branch=no_std_v18)", - "log 0.4.20", + "log 0.4.22", "parity-scale-codec", "sgx_crypto_helper", "sgx_tstd", @@ -3627,7 +3627,7 @@ dependencies = [ "jsonrpc-core 18.0.0 (git+https://github.com/scs/jsonrpc?branch=no_std_v18)", "linked-hash-map 0.5.2", "linked-hash-map 0.5.6", - "log 0.4.20", + "log 0.4.22", "parity-scale-codec", "parity-util-mem", "serde 1.0.193", @@ -3653,7 +3653,7 @@ dependencies = [ "itp-types", "jsonrpc-core 18.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpc-core 18.0.0 (git+https://github.com/scs/jsonrpc?branch=no_std_v18)", - "log 0.4.20", + "log 0.4.22", "parity-scale-codec", "sgx_crypto_helper", "sgx_tstd", @@ -3707,7 +3707,7 @@ dependencies = [ "itp-types", "its-primitives", "its-state", - "log 0.4.20", + "log 0.4.22", "parity-scale-codec", "sgx_tstd", "sgx_types", @@ -3737,7 +3737,7 @@ dependencies = [ "itp-utils", "its-primitives", "its-test", - "log 0.4.20", + "log 0.4.22", "sgx_tstd", "sp-consensus-slots", "sp-core", @@ -3779,7 +3779,7 @@ dependencies = [ "its-state", "its-test", "its-validateer-fetch", - "log 0.4.20", + "log 0.4.22", "parity-scale-codec", "sgx_tstd", "sp-core", @@ -3811,7 +3811,7 @@ dependencies = [ "its-primitives", "its-state", "its-test", - "log 0.4.20", + "log 0.4.22", "parity-scale-codec", "sgx_tstd", "sgx_types", @@ -3836,7 +3836,7 @@ dependencies = [ "its-primitives", "its-test", "lazy_static", - "log 0.4.20", + "log 0.4.22", "parity-scale-codec", "sgx_tstd", "sp-consensus-slots", @@ -3859,7 +3859,7 @@ dependencies = [ "its-storage", "its-test", "jsonrpsee", - "log 0.4.20", + "log 0.4.22", "serde 1.0.193", "serde_json 1.0.103", "thiserror 1.0.44", @@ -3894,7 +3894,7 @@ dependencies = [ "its-primitives", "jsonrpc-core 18.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpc-core 18.0.0 (git+https://github.com/scs/jsonrpc?branch=no_std_v18)", - "log 0.4.20", + "log 0.4.22", "parity-scale-codec", "rust-base58 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "rust-base58 0.0.4 (git+https://github.com/mesalock-linux/rust-base58-sgx?rev=sgx_1.1.3)", @@ -3924,7 +3924,7 @@ dependencies = [ "itp-sgx-externalities", "itp-storage", "its-primitives", - "log 0.4.20", + "log 0.4.22", "parity-scale-codec", "sgx_tstd", "sp-core", @@ -3943,7 +3943,7 @@ dependencies = [ "itp-types", "its-primitives", "its-test", - "log 0.4.20", + "log 0.4.22", "mockall", "parity-scale-codec", "parking_lot 0.12.1", @@ -3974,7 +3974,7 @@ dependencies = [ "itp-test", "itp-types", "its-primitives", - "log 0.4.20", + "log 0.4.22", "parity-scale-codec", "sp-core", "sp-runtime", @@ -4008,7 +4008,7 @@ dependencies = [ "futures 0.3.28", "futures-executor 0.3.28", "futures-util 0.3.28", - "log 0.4.20", + "log 0.4.22", "serde 1.0.193", "serde_derive 1.0.193", "serde_json 1.0.103", @@ -4053,7 +4053,7 @@ dependencies = [ "hyper-rustls", "jsonrpsee-types", "jsonrpsee-utils", - "log 0.4.20", + "log 0.4.22", "serde 1.0.193", "serde_json 1.0.103", "thiserror 1.0.44", @@ -4073,7 +4073,7 @@ dependencies = [ "jsonrpsee-types", "jsonrpsee-utils", "lazy_static", - "log 0.4.20", + "log 0.4.22", "serde 1.0.193", "serde_json 1.0.103", "socket2", @@ -4106,7 +4106,7 @@ dependencies = [ "futures-channel 0.3.28", "futures-util 0.3.28", "hyper", - "log 0.4.20", + "log 0.4.22", "serde 1.0.193", "serde_json 1.0.103", "soketto", @@ -4123,7 +4123,7 @@ dependencies = [ "futures-util 0.3.28", "hyper", "jsonrpsee-types", - "log 0.4.20", + "log 0.4.22", "parking_lot 0.11.2", "rand 0.8.5", "rustc-hash", @@ -4142,7 +4142,7 @@ dependencies = [ "fnv 1.0.7", "futures 0.3.28", "jsonrpsee-types", - "log 0.4.20", + "log 0.4.22", "pin-project", "rustls 0.19.1", "rustls-native-certs", @@ -4166,7 +4166,7 @@ dependencies = [ "futures-util 0.3.28", "jsonrpsee-types", "jsonrpsee-utils", - "log 0.4.20", + "log 0.4.22", "rustc-hash", "serde 1.0.193", "serde_json 1.0.103", @@ -4392,9 +4392,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.20" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "lz4-sys" @@ -4577,7 +4577,7 @@ dependencies = [ "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys", "libc", - "log 0.4.20", + "log 0.4.22", "miow", "net2 0.2.39", "slab 0.4.8", @@ -4602,7 +4602,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19" dependencies = [ "lazycell", - "log 0.4.20", + "log 0.4.22", "mio 0.6.23", "slab 0.4.8", ] @@ -4613,7 +4613,7 @@ version = "2.0.6" source = "git+https://github.com/integritee-network/mio-extras-sgx?rev=963234b#963234bf55e44f9efff921938255126c48deef3a" dependencies = [ "lazycell", - "log 0.4.20", + "log 0.4.22", "mio 0.6.21", "mio 0.6.23", "sgx_tstd", @@ -4671,7 +4671,7 @@ dependencies = [ "futures-util 0.3.28", "http 0.2.9", "httparse 1.8.0", - "log 0.4.20", + "log 0.4.22", "memchr 2.6.3", "mime", "spin 0.9.8", @@ -4738,7 +4738,7 @@ checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" dependencies = [ "lazy_static", "libc", - "log 0.4.20", + "log 0.4.22", "openssl", "openssl-probe", "openssl-sys", @@ -5149,7 +5149,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "log 0.4.20", + "log 0.4.22", "parity-scale-codec", "scale-info", "sp-runtime", @@ -5164,7 +5164,7 @@ dependencies = [ "enclave-bridge-primitives", "frame-support", "frame-system", - "log 0.4.20", + "log 0.4.22", "pallet-teerex", "pallet-timestamp", "parity-scale-codec", @@ -5191,7 +5191,7 @@ dependencies = [ "frame-system", "hex", "impl-trait-for-tuples", - "log 0.4.20", + "log 0.4.22", "parity-scale-codec", "rlp", "scale-info", @@ -5209,7 +5209,7 @@ dependencies = [ "frame-support", "frame-system", "itp-randomness", - "log 0.4.20", + "log 0.4.22", "pallet-balances", "pallet-timestamp", "parity-scale-codec", @@ -5231,7 +5231,7 @@ dependencies = [ "frame-system", "ita-stf", "itp-randomness", - "log 0.4.20", + "log 0.4.22", "pallet-balances", "pallet-timestamp", "parity-scale-codec", @@ -5251,7 +5251,7 @@ dependencies = [ "env_logger 0.9.3", "frame-support", "frame-system", - "log 0.4.20", + "log 0.4.22", "pallet-balances", "parity-scale-codec", "scale-info", @@ -5272,7 +5272,7 @@ dependencies = [ "frame-system", "ita-stf", "itp-randomness", - "log 0.4.20", + "log 0.4.22", "pallet-balances", "pallet-timestamp", "parity-scale-codec", @@ -5293,7 +5293,7 @@ dependencies = [ "enclave-bridge-primitives", "frame-support", "frame-system", - "log 0.4.20", + "log 0.4.22", "pallet-enclave-bridge", "pallet-teerex", "pallet-timestamp", @@ -5329,7 +5329,7 @@ source = "git+https://github.com/integritee-network/pallets.git?branch=sdk-v0.13 dependencies = [ "frame-support", "frame-system", - "log 0.4.20", + "log 0.4.22", "pallet-teerex", "parity-scale-codec", "scale-info", @@ -5350,7 +5350,7 @@ dependencies = [ "frame-support", "frame-system", "hex", - "log 0.4.20", + "log 0.4.22", "pallet-timestamp", "parity-scale-codec", "rustls-webpki", @@ -5372,7 +5372,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "log 0.4.20", + "log 0.4.22", "parity-scale-codec", "scale-info", "sp-inherents", @@ -6148,7 +6148,7 @@ dependencies = [ "hyper-tls", "ipnet", "js-sys", - "log 0.4.20", + "log 0.4.22", "mime", "native-tls", "once_cell 1.18.0", @@ -6195,7 +6195,7 @@ source = "git+https://github.com/betrusted-io/ring-xous?branch=0.16.20-cleanup#4 dependencies = [ "cc", "libc", - "log 0.4.20", + "log 0.4.22", "once_cell 1.18.0", "rkyv", "spin 0.5.2", @@ -6392,7 +6392,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" dependencies = [ "base64 0.13.1", - "log 0.4.20", + "log 0.4.22", "ring 0.16.20", "sct 0.6.1", "webpki 0.21.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -6833,7 +6833,7 @@ dependencies = [ "frame-support", "hex", "hex-literal", - "log 0.4.20", + "log 0.4.22", "parity-scale-codec", "ring 0.16.20", "rustls-webpki", @@ -7200,7 +7200,7 @@ dependencies = [ "bytes 1.4.0", "futures 0.3.28", "httparse 1.8.0", - "log 0.4.20", + "log 0.4.22", "rand 0.8.5", "sha-1 0.9.8", ] @@ -7211,7 +7211,7 @@ version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "hash-db 0.16.0", - "log 0.4.20", + "log 0.4.22", "parity-scale-codec", "scale-info", "sp-api-proc-macro", @@ -7273,7 +7273,7 @@ source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.4 dependencies = [ "async-trait", "futures 0.3.28", - "log 0.4.20", + "log 0.4.22", "sp-core", "sp-inherents", "sp-runtime", @@ -7305,7 +7305,7 @@ version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "finality-grandpa", - "log 0.4.20", + "log 0.4.22", "parity-scale-codec", "scale-info", "serde 1.0.193", @@ -7347,7 +7347,7 @@ dependencies = [ "impl-serde", "lazy_static", "libsecp256k1", - "log 0.4.20", + "log 0.4.22", "merlin", "parity-scale-codec", "parking_lot 0.12.1", @@ -7440,7 +7440,7 @@ version = "7.0.0" dependencies = [ "itp-sgx-externalities", "libsecp256k1", - "log 0.4.20", + "log 0.4.22", "parity-scale-codec", "sgx_tstd", "sp-core", @@ -7456,7 +7456,7 @@ dependencies = [ "ed25519-dalek", "futures 0.3.28", "libsecp256k1", - "log 0.4.20", + "log 0.4.22", "parity-scale-codec", "rustversion", "secp256k1", @@ -7526,7 +7526,7 @@ dependencies = [ "either", "hash256-std-hasher", "impl-trait-for-tuples", - "log 0.4.20", + "log 0.4.22", "parity-scale-codec", "paste", "rand 0.8.5", @@ -7589,7 +7589,7 @@ version = "0.13.0" source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" dependencies = [ "hash-db 0.16.0", - "log 0.4.20", + "log 0.4.22", "parity-scale-codec", "parking_lot 0.12.1", "rand 0.8.5", @@ -7628,7 +7628,7 @@ source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.4 dependencies = [ "async-trait", "futures-timer", - "log 0.4.20", + "log 0.4.22", "parity-scale-codec", "sp-inherents", "sp-runtime", @@ -7706,7 +7706,7 @@ source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.4 dependencies = [ "anyhow", "impl-trait-for-tuples", - "log 0.4.20", + "log 0.4.22", "parity-scale-codec", "sp-std", "wasmi", @@ -7834,7 +7834,7 @@ dependencies = [ "frame-metadata", "frame-support", "hex", - "log 0.4.20", + "log 0.4.22", "maybe-async", "parity-scale-codec", "serde 1.0.193", @@ -7955,7 +7955,7 @@ source = "git+https://github.com/integritee-network/pallets.git?branch=sdk-v0.13 dependencies = [ "common-primitives", "derive_more", - "log 0.4.20", + "log 0.4.22", "parity-scale-codec", "scale-info", "serde 1.0.193", @@ -8186,7 +8186,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54319c93411147bced34cb5609a80e0a8e44c5999c93903a81cd866630ec0bfd" dependencies = [ "futures-util 0.3.28", - "log 0.4.20", + "log 0.4.22", "tokio", "tungstenite 0.18.0", ] @@ -8201,7 +8201,7 @@ dependencies = [ "futures-core 0.3.28", "futures-io 0.3.28", "futures-sink 0.3.28", - "log 0.4.20", + "log 0.4.22", "pin-project-lite", "tokio", ] @@ -8250,7 +8250,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ "cfg-if 1.0.0", - "log 0.4.20", + "log 0.4.22", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -8284,7 +8284,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" dependencies = [ "lazy_static", - "log 0.4.20", + "log 0.4.22", "tracing-core", ] @@ -8328,7 +8328,7 @@ checksum = "767abe6ffed88a1889671a102c2861ae742726f52e0a5a425b92c9fbfa7e9c85" dependencies = [ "hash-db 0.16.0", "hashbrown 0.13.2", - "log 0.4.20", + "log 0.4.22", "rustc-hex", "smallvec 1.11.0", ] @@ -8397,7 +8397,7 @@ dependencies = [ "bytes 1.4.0", "http 0.2.9", "httparse 1.8.0", - "log 0.4.20", + "log 0.4.22", "rand 0.8.5", "rustls 0.19.1", "sha-1 0.9.8", @@ -8419,7 +8419,7 @@ dependencies = [ "bytes 1.4.0", "http 0.2.9", "httparse 1.8.0", - "log 0.4.20", + "log 0.4.22", "native-tls", "rand 0.8.5", "sha1 0.10.5", @@ -8667,7 +8667,7 @@ dependencies = [ "headers", "http 0.2.9", "hyper", - "log 0.4.20", + "log 0.4.22", "mime", "mime_guess", "multer", @@ -8721,7 +8721,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" dependencies = [ "bumpalo", - "log 0.4.20", + "log 0.4.22", "once_cell 1.18.0", "proc-macro2", "quote", @@ -8824,7 +8824,7 @@ dependencies = [ "cfg-if 1.0.0", "indexmap 1.9.3", "libc", - "log 0.4.20", + "log 0.4.22", "object 0.29.0", "once_cell 1.18.0", "paste", @@ -8857,7 +8857,7 @@ dependencies = [ "cranelift-entity", "gimli 0.26.2", "indexmap 1.9.3", - "log 0.4.20", + "log 0.4.22", "object 0.29.0", "serde 1.0.193", "target-lexicon", @@ -8878,7 +8878,7 @@ dependencies = [ "cfg-if 1.0.0", "cpp_demangle", "gimli 0.26.2", - "log 0.4.20", + "log 0.4.22", "object 0.29.0", "rustc-demangle", "serde 1.0.193", @@ -8920,7 +8920,7 @@ dependencies = [ "cfg-if 1.0.0", "indexmap 1.9.3", "libc", - "log 0.4.20", + "log 0.4.22", "mach", "memfd", "memoffset 0.6.5", @@ -9239,7 +9239,7 @@ dependencies = [ "byteorder 1.4.3", "bytes 0.4.12", "httparse 1.8.0", - "log 0.4.20", + "log 0.4.22", "mio 0.6.23", "mio-extras 2.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "openssl", @@ -9295,7 +9295,7 @@ version = "0.1.50" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03e07c190c743d6d9e076f715333e94c48de41b99078343d174c707803df28c7" dependencies = [ - "log 0.4.20", + "log 0.4.22", "num-derive", "num-traits 0.2.16", "xous", @@ -9308,7 +9308,7 @@ version = "0.9.52" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32d8361077e67966d25922056284d17d042cbb1c96a7ebc2584eb8181427cbb0" dependencies = [ - "log 0.4.20", + "log 0.4.22", "num-derive", "num-traits 0.2.16", "rkyv", diff --git a/app-libs/parentchain-interface/src/event_subscriber.rs b/app-libs/parentchain-interface/src/event_subscriber.rs index de5765340f..c4f662c28e 100644 --- a/app-libs/parentchain-interface/src/event_subscriber.rs +++ b/app-libs/parentchain-interface/src/event_subscriber.rs @@ -19,9 +19,9 @@ use alloc::sync::Arc; use core::sync::atomic::{AtomicBool, Ordering}; use itp_api_client_types::ParentchainApi; use itp_types::parentchain::{AddedSgxEnclave, BalanceTransfer, ExtrinsicFailed, ParentchainId}; -use log::warn; +use log::{debug, warn}; use sp_runtime::DispatchError; -use substrate_api_client::SubscribeEvents; +use substrate_api_client::{ac_primitives::Header, GetChainInfo, SubscribeEvents}; pub fn subscribe_to_parentchain_events( api: &ParentchainApi, @@ -32,6 +32,17 @@ pub fn subscribe_to_parentchain_events( let mut subscription = api.subscribe_events().unwrap(); while !shutdown_flag.load(Ordering::Relaxed) { let events = subscription.next_events_from_metadata().unwrap().unwrap(); + if let Some(header) = api.get_header(None).unwrap() { + let maybe_finalized_number = + api.get_header(api.get_finalized_head().unwrap()).unwrap().map(|h| h.number); + debug!( + "[{}] New block {} {} (finalized: {:?})", + parentchain_id, + header.number, + header.hash(), + maybe_finalized_number + ); + }; for event in events.iter() { let event = event.unwrap(); @@ -68,6 +79,8 @@ pub fn subscribe_to_parentchain_events( _ => continue, }, "ParaInclusion" => continue, + "Session" => continue, + "Grandpa" => continue, "MessageQueue" => continue, "TransactionPayment" => continue, "Treasury" => continue, diff --git a/app-libs/parentchain-interface/src/target_b/event_handler.rs b/app-libs/parentchain-interface/src/target_b/event_handler.rs index 39a5555973..b4218eb9e5 100644 --- a/app-libs/parentchain-interface/src/target_b/event_handler.rs +++ b/app-libs/parentchain-interface/src/target_b/event_handler.rs @@ -15,27 +15,71 @@ */ +use codec::Encode; pub use ita_sgx_runtime::{Balance, Index}; -use ita_stf::TrustedCallSigned; +use ita_stf::{Getter, TrustedCall, TrustedCallSigned}; use itc_parentchain_indirect_calls_executor::error::Error; -use itp_stf_primitives::traits::IndirectExecutor; -use itp_types::parentchain::{AccountId, FilterEvents, HandleParentchainEvents}; +use itp_stf_primitives::{traits::IndirectExecutor, types::TrustedOperation}; +use itp_types::parentchain::{ + AccountId, FilterEvents, HandleParentchainEvents, ParentchainError, ParentchainId, +}; +use itp_utils::hex::hex_encode; use log::*; pub struct ParentchainEventHandler {} +impl ParentchainEventHandler { + fn shield_funds>( + executor: &Executor, + account: &AccountId, + amount: Balance, + ) -> Result<(), Error> { + trace!("[TargetB] shielding for {:?} amount {}", account, amount,); + let shard = executor.get_default_shard(); + // todo: ensure this parentchain is assigned for the shard vault! + let trusted_call = TrustedCall::balance_shield( + executor.get_enclave_account()?, + account.clone(), + amount, + ParentchainId::TargetB, + ); + let signed_trusted_call = executor.sign_call_with_self(&trusted_call, &shard)?; + let trusted_operation = + TrustedOperation::::indirect_call(signed_trusted_call); + + let encrypted_trusted_call = executor.encrypt(&trusted_operation.encode())?; + executor.submit_trusted_call(shard, encrypted_trusted_call); + + Ok(()) + } +} + impl HandleParentchainEvents for ParentchainEventHandler where Executor: IndirectExecutor, { fn handle_events( - _executor: &Executor, - _events: impl FilterEvents, - _vault_account: &AccountId, + executor: &Executor, + events: impl FilterEvents, + vault_account: &AccountId, ) -> Result<(), Error> { - debug!("not handling any events for target B"); + let filter_events = events.get_transfer_events(); + trace!( + "[TargetB] filtering transfer events to shard vault account: {}", + hex_encode(vault_account.encode().as_slice()) + ); + if let Ok(events) = filter_events { + events + .iter() + .filter(|&event| event.to == *vault_account) + .try_for_each(|event| { + info!("[TargetB] found transfer event to shard vault account: {} will shield to {}", event.amount, hex_encode(event.from.encode().as_ref())); + Self::shield_funds(executor, &event.from, event.amount) + }) + .map_err(|_| ParentchainError::ShieldFundsFailure)?; + } Ok(()) } } diff --git a/app-libs/stf/src/trusted_call.rs b/app-libs/stf/src/trusted_call.rs index 27efaafcbc..8c5dc89043 100644 --- a/app-libs/stf/src/trusted_call.rs +++ b/app-libs/stf/src/trusted_call.rs @@ -42,10 +42,7 @@ use ita_sgx_runtime::{ ParentchainIntegritee, Runtime, SessionProxyCredentials, SessionProxyRole, System, }; use itp_node_api::metadata::{provider::AccessNodeMetadata, NodeMetadataTrait}; -use itp_node_api_metadata::{ - pallet_balances::BalancesCallIndexes, pallet_enclave_bridge::EnclaveBridgeCallIndexes, - pallet_proxy::ProxyCallIndexes, -}; +use itp_node_api_metadata::{pallet_balances::BalancesCallIndexes, pallet_proxy::ProxyCallIndexes}; use itp_stf_interface::ExecuteCall; use itp_stf_primitives::{ error::StfError, @@ -63,7 +60,6 @@ use sp_core::{ crypto::{AccountId32, UncheckedFrom}, ed25519, }; -use sp_io::hashing::blake2_256; use sp_runtime::{traits::Verify, MultiAddress, MultiSignature}; use std::{format, prelude::v1::*, sync::Arc, vec}; @@ -275,7 +271,6 @@ where // todo! spending limits according to role https://github.com/integritee-network/worker/issues/1656 let sender = self.call.sender_account().clone(); - let call_hash = blake2_256(&self.call.encode()); let system_nonce = System::account_nonce(&sender); ensure!(self.nonce == system_nonce, Self::Error::InvalidNonce(self.nonce, system_nonce)); @@ -419,22 +414,6 @@ where std::println!("⣿STF⣿ 🛡 will shield to {}", account_id_to_string(&who)); shield_funds(&who, value)?; store_note(&enclave_account, self.call, vec![who])?; - - // Send proof of execution on chain. - let mortality = - get_mortality(parentchain_id, 32).unwrap_or_else(GenericMortality::immortal); - calls.push(ParentchainCall::Integritee { - call: OpaqueCall::from_tuple(&( - node_metadata_repo - .get_from_metadata(|m| m.publish_hash_call_indexes()) - .map_err(|_| StfError::InvalidMetadata)? - .map_err(|_| StfError::InvalidMetadata)?, - call_hash, - Vec::::new(), - b"shielded some funds!".to_vec(), - )), - mortality, - }); Ok(()) }, TrustedCall::timestamp_set(enclave_account, now, parentchain_id) => { diff --git a/core/parentchain/block-import-dispatcher/src/triggered_dispatcher.rs b/core/parentchain/block-import-dispatcher/src/triggered_dispatcher.rs index 712fcc724d..dea1aa2ca2 100644 --- a/core/parentchain/block-import-dispatcher/src/triggered_dispatcher.rs +++ b/core/parentchain/block-import-dispatcher/src/triggered_dispatcher.rs @@ -21,6 +21,7 @@ use crate::{ error::{Error, Result}, DispatchBlockImport, }; +use core::cmp::min; use itc_parentchain_block_importer::ImportParentchainBlocks; use itp_import_queue::{PeekQueue, PopFromQueue, PushToQueue}; use log::trace; @@ -182,18 +183,18 @@ where let blocks_to_import = self.import_queue.pop_until(predicate).map_err(Error::ImportQueue)?; - let events_to_import = self - .events_queue - .pop_from_front_until(blocks_to_import.len()) - .map_err(Error::ImportQueue)?; + let depth = min(self.events_queue.peek_queue_size().unwrap_or(0), blocks_to_import.len()); + let events_to_import = + self.events_queue.pop_from_front_until(depth).map_err(Error::ImportQueue)?; let latest_imported_block = blocks_to_import.last().map(|b| (*b).clone()); let parentchain_id = self.block_importer.parentchain_id(); trace!( - "[{:?}] Import of parentchain blocks and events has been triggered, importing {} blocks and {} events from queue", + "[{:?}] Import of parentchain blocks and events has been triggered, importing {} blocks and {} events of {} blocks from queue", parentchain_id, blocks_to_import.len(), events_to_import.len(), + depth ); self.block_importer diff --git a/core/parentchain/block-importer/src/block_importer.rs b/core/parentchain/block-importer/src/block_importer.rs index 5681ec6a91..f22d06fd59 100644 --- a/core/parentchain/block-importer/src/block_importer.rs +++ b/core/parentchain/block-importer/src/block_importer.rs @@ -148,7 +148,8 @@ impl< if let Some(creation_block) = self.shard_creation_info.for_parentchain(id) { if signed_block.block.header().number < creation_block.number { trace!( - "fast-syncing block import, ignoring any invocations before block {:}", + "[{:?}] fast-syncing block import, ignoring any invocations before block {:}", + id, creation_block.number ); continue @@ -180,7 +181,8 @@ impl< }; calls.push((opaque_call, mortality)); }, - Ok(None) => trace!("omitting confirmation call to non-integritee parentchain"), + Ok(None) => + trace!("[{:?}] omitting confirmation call to non-integritee parentchain", id), Err(e) => error!("[{:?}] Error executing relevant extrinsics: {:?}", id, e), }; diff --git a/core/parentchain/light-client/src/io.rs b/core/parentchain/light-client/src/io.rs index 204daa50c6..b96635deac 100644 --- a/core/parentchain/light-client/src/io.rs +++ b/core/parentchain/light-client/src/io.rs @@ -156,7 +156,7 @@ impl LightClientSealing fs::File::open(self.db_path()) .or_else(|e| { warn!( - "can't open db at {:?}. error: {:?}. trying restore backup at {:?}", + "can't open db at {:?}. reason: {:?}. trying restore backup at {:?}", self.db_path(), e, self.backup_path() diff --git a/enclave-runtime/src/attestation.rs b/enclave-runtime/src/attestation.rs index b7803f2e2b..9fafa6dc1a 100644 --- a/enclave-runtime/src/attestation.rs +++ b/enclave-runtime/src/attestation.rs @@ -48,7 +48,7 @@ use itp_node_api::metadata::{ }; use itp_node_api_metadata::NodeMetadata; use itp_settings::worker::MR_ENCLAVE_SIZE; -use itp_types::OpaqueCall; +use itp_types::{parentchain::ParentchainId, OpaqueCall}; use itp_utils::write_slice_and_whitespace_pad; use log::*; use sgx_types::*; @@ -393,7 +393,7 @@ pub fn generate_ias_skip_ra_extrinsic_from_der_cert_internal( fn create_extrinsics(call: OpaqueCall) -> EnclaveResult { let extrinsics_factory = get_extrinsic_factory_from_integritee_solo_or_parachain()?; let ocall_api = GLOBAL_OCALL_API_COMPONENT.get()?; - let mortality = try_mortality(64, &ocall_api); + let mortality = try_mortality(64, &ocall_api, ParentchainId::Integritee); let extrinsics = extrinsics_factory.create_extrinsics(&[(call, mortality)], None)?; Ok(extrinsics[0].clone()) diff --git a/enclave-runtime/src/shard_config.rs b/enclave-runtime/src/shard_config.rs index a6c5eafc9d..352af0c8ae 100644 --- a/enclave-runtime/src/shard_config.rs +++ b/enclave-runtime/src/shard_config.rs @@ -58,7 +58,7 @@ pub(crate) fn init_shard_config(shard: ShardIdentifier) -> EnclaveResult<()> { let opaque_call = OpaqueCall::from_tuple(&(call, shard, shard_config, BlockNumber::from(0u8))); debug!("encoded call: {}", hex_encode(opaque_call.encode().as_slice())); let ocall_api = GLOBAL_OCALL_API_COMPONENT.get()?; - let mortality = try_mortality(64, &ocall_api); + let mortality = try_mortality(64, &ocall_api, ParentchainId::Integritee); let xts = extrinsics_factory .create_extrinsics(&[(opaque_call, mortality)], None) .map_err(|e| Error::Other(e.into()))?; diff --git a/enclave-runtime/src/shard_vault.rs b/enclave-runtime/src/shard_vault.rs index a79cd476f7..8598f8726a 100644 --- a/enclave-runtime/src/shard_vault.rs +++ b/enclave-runtime/src/shard_vault.rs @@ -189,7 +189,7 @@ pub(crate) fn init_proxied_shard_vault_internal( )); info!("[{:?}] vault funding call: 0x{}", parentchain_id, hex::encode(call.0.clone())); - let mortality = try_mortality(64, &ocall_api); + let mortality = try_mortality(64, &ocall_api, parentchain_id); let xts = enclave_extrinsics_factory.create_extrinsics(&[(call, mortality)], None)?; //this extrinsic must be included in a block before we can move on. otherwise the next will fail @@ -213,7 +213,7 @@ pub(crate) fn init_proxied_shard_vault_internal( )); info!("[{:?}] add proxy call: 0x{}", parentchain_id, hex::encode(call.0.clone())); - let mortality = try_mortality(64, &ocall_api); + let mortality = try_mortality(64, &ocall_api, parentchain_id); let xts = vault_extrinsics_factory.create_extrinsics(&[(call, mortality)], None)?; ocall_api.send_to_parentchain(xts, &parentchain_id, false)?; @@ -268,7 +268,7 @@ pub(crate) fn add_shard_vault_proxy( )); info!("proxied add proxy call: 0x{}", hex::encode(call.0.clone())); - let mortality = try_mortality(64, &ocall_api); + let mortality = try_mortality(64, &ocall_api, parentchain_id); let xts = enclave_extrinsics_factory.create_extrinsics(&[(call, mortality)], None)?; ocall_api.send_to_parentchain(xts, &ParentchainId::Integritee, false)?; diff --git a/enclave-runtime/src/teeracle/mod.rs b/enclave-runtime/src/teeracle/mod.rs index 4f7ba17571..df4a3b8985 100644 --- a/enclave-runtime/src/teeracle/mod.rs +++ b/enclave-runtime/src/teeracle/mod.rs @@ -38,7 +38,10 @@ use ita_oracle::{ use itp_component_container::ComponentGetter; use itp_extrinsics_factory::CreateExtrinsics; use itp_node_api::metadata::{pallet_teeracle::TeeracleCallIndexes, provider::AccessNodeMetadata}; -use itp_types::{parentchain::GenericMortality, OpaqueCall}; +use itp_types::{ + parentchain::{GenericMortality, ParentchainId}, + OpaqueCall, +}; use itp_utils::write_slice_and_whitespace_pad; use log::*; use sgx_types::sgx_status_t; @@ -50,7 +53,7 @@ fn update_weather_data_internal(weather_info: WeatherInfo) -> Result = Vec::new(); - let mortality = try_mortality(16, &ocall_api); + let mortality = try_mortality(16, &ocall_api, ParentchainId::Integritee); let open_meteo_weather_oracle = create_open_meteo_weather_oracle(ocall_api); match get_longitude(weather_info, open_meteo_weather_oracle) { @@ -212,7 +215,7 @@ fn update_market_data_internal( let ocall_api = GLOBAL_OCALL_API_COMPONENT.get()?; let mut extrinsic_calls: Vec<(OpaqueCall, GenericMortality)> = Vec::new(); - let mortality = try_mortality(16, &ocall_api); + let mortality = try_mortality(16, &ocall_api, ParentchainId::Integritee); // Get the exchange rate let trading_pair = TradingPair { crypto_currency, fiat_currency }; diff --git a/enclave-runtime/src/utils.rs b/enclave-runtime/src/utils.rs index 81c175a007..0cc95d7729 100644 --- a/enclave-runtime/src/utils.rs +++ b/enclave-runtime/src/utils.rs @@ -308,12 +308,13 @@ pub(crate) fn get_stf_enclave_signer_from_solo_or_parachain() -> Result GenericMortality { +pub(crate) fn try_mortality( + blocks_to_live: u64, + ocall_api: &OcallApi, + parentchain_id: ParentchainId, +) -> GenericMortality { let response: Option>> = ocall_api - .worker_request( - [WorkerRequest::LatestParentchainHeaderUnverified].into(), - &ParentchainId::Integritee, - ) + .worker_request([WorkerRequest::LatestParentchainHeaderUnverified].into(), &parentchain_id) .ok() .iter() .filter_map(|r| r.first().cloned()) diff --git a/service/src/account_funding.rs b/service/src/account_funding.rs index affbaf815f..e184166bac 100644 --- a/service/src/account_funding.rs +++ b/service/src/account_funding.rs @@ -131,7 +131,7 @@ pub fn setup_reasonable_account_funding( let free = api.get_free_balance(accountid)?; let missing_funds = needed.saturating_sub(free); - if missing_funds < needed * 2 / 3 { + if missing_funds < needed / 10 { return Ok(()) } diff --git a/service/src/main_impl.rs b/service/src/main_impl.rs index dcfe995493..6cec422441 100644 --- a/service/src/main_impl.rs +++ b/service/src/main_impl.rs @@ -815,7 +815,7 @@ where }); // we attempt to set shard creation for this parentchain in case it hasn't been done before - let api_head = node_api.get_header(None).unwrap().unwrap(); + let api_head = node_api.get_header(node_api.get_finalized_head().unwrap()).unwrap().unwrap(); // TODO: #1451: Fix api-client type hacks let head = Header::decode(&mut api_head.encode().as_slice()) .expect("Can decode previously encoded header; qed"); diff --git a/service/src/ocall_bridge/worker_on_chain_ocall.rs b/service/src/ocall_bridge/worker_on_chain_ocall.rs index b6ece561c2..927203b1ac 100644 --- a/service/src/ocall_bridge/worker_on_chain_ocall.rs +++ b/service/src/ocall_bridge/worker_on_chain_ocall.rs @@ -37,7 +37,7 @@ use std::{ }; use substrate_api_client::{ ac_primitives, - ac_primitives::{serde_impls::StorageKey, SubstrateHeader}, + ac_primitives::{serde_impls::StorageKey, Header, SubstrateHeader}, GetAccountInformation, GetChainInfo, GetStorage, SubmitAndWatch, SubmitExtrinsic, XtStatus, }; @@ -91,7 +91,7 @@ where request: Vec, parentchain_id: Vec, ) -> OCallBridgeResult> { - debug!(" Entering ocall_worker_request"); + debug!("[{:?}] Entering ocall_worker_request", parentchain_id); let requests: Vec = Decode::decode(&mut request.as_slice())?; if requests.is_empty() { @@ -109,10 +109,18 @@ where { header } else { - warn!("failed to fetch parentchain header. can't answer WorkerRequest"); + warn!( + "[{:?}] failed to fetch parentchain header. can't answer WorkerRequest", + parentchain_id + ); return Ok(Vec::::new().encode()) }; - + trace!( + "[{:?}] Last finalized header {} {:?}", + parentchain_id, + header.number, + header.hash() + ); let resp: Vec>> = requests .into_iter() .map(|req| match req { diff --git a/service/src/parentchain_handler.rs b/service/src/parentchain_handler.rs index 2fd175af57..0bd65b362d 100644 --- a/service/src/parentchain_handler.rs +++ b/service/src/parentchain_handler.rs @@ -217,7 +217,7 @@ where let max_blocknumber_in_chunk = block_chunk_to_sync.last().map_or_else(|| 0, |b| b.block.header.number()); if max_blocknumber_in_chunk < creation_block.number { - trace!("skipping invocations for fast-sync for blocks older than shard creation: {} < {}", max_blocknumber_in_chunk, creation_block.number); + trace!("[{:?}] skipping invocations for fast-sync for blocks older than shard creation: {} < {}", id, max_blocknumber_in_chunk, creation_block.number); true } else { false diff --git a/sidechain/consensus/slots/src/lib.rs b/sidechain/consensus/slots/src/lib.rs index af06fcfba3..14c404beb6 100644 --- a/sidechain/consensus/slots/src/lib.rs +++ b/sidechain/consensus/slots/src/lib.rs @@ -251,7 +251,7 @@ pub trait SimpleSlotWorker { Ok(Some(peeked_header)) => Some(peeked_header), Ok(None) => slot_info.maybe_last_imported_target_b_parentchain_head.clone(), Err(e) => { - debug!("Failed to peek latest target_a_parentchain block header: {:?}", e); + debug!("Failed to peek latest target_b_parentchain block header: {:?}", e); None }, };