From b2a1adc8673ff2a391e7e08b4e36b7985ed29cca Mon Sep 17 00:00:00 2001 From: cameron Date: Tue, 31 May 2022 10:58:52 +0100 Subject: [PATCH 01/17] fund 9 release --- CHANGELOG.md | 45 +++++++++++++++++++++++++----------------- jcli/Cargo.toml | 2 +- jormungandr/Cargo.toml | 2 +- 3 files changed, 29 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e37ccbef04..90f9a773e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,35 +1,40 @@ # Change Log -## Unreleased +## Release 0.15.0 + +**New features:** + -- fix incorrect keys bech32 HRP by always using the ones provided by the library -- update REST API: add new endpoint AccountVotes (`/api/v1/votes/plan/account-votes/{account_id}`) - Support parallel lanes in spending counters on account outputs. This allows submitting transactions that can spend from the same account without requiring any particular order between the transactions. -- add new setting proposal expiration into the initial config/genesis -- add feature for changing blockchain config during the network run. Add new certificates `UpdateProposal` and `UpdateVote`, updated `jcli` with these new transactions. -- Add new grpc watch service implementation for external (non-node) clients. -- update explorer, add new GraphQL objects as `UpdateProposal`, `UpdateVote`, `ConfigParam` etc. -- update REST API: add new endpoint account based votes count (`/api/v1/votes/plan/accounts-votes-count`) - Add jcli option to specify a spending counter lane in a user-friendly way -- Add CORS config params: allowed headers and allowed methods. -- Update REST API `/api/v0/account/{account_id}`, add new field with the token's state info. -- Vote tally now uses the token in the voteplan instead of the native currency. -- Remove `txPendingCnt` metric and related field in `node/stats` -- Rename `txPendingTotalSize` to `mempoolTotalSize` -- Add `mempoolUsageRatio` metric and related field in `node/stats` to track load on the mempool. -- Change `blockContentSizeAvg` to represent information as a percentage of the block max size. -- Bump ed25519-bip32 from 0.4.0 to 0.4.1 -- Now the tally is incremental and is always available in the rest API. The -- Add standalone explorer crate. +- update REST API: add new endpoint AccountVotes (`/api/v1/votes/plan/account-votes/{account_id}`) +- add feature for changing blockchain config during the network run. Add new certificates `UpdateProposal` and `UpdateVote`, updated `jcli` with these new transactions. + +**Changes:** + - Bump clap from 2.34.0 to 3.1.13 - Bump time from 0.3.7 to 0.3.9 - Bump libc from 0.2.117 to 0.2.124 - Bump rand from 0.8.4 to 0.8.5 - Bump os_info from 3.1.0 to 3.3.0 - Bump log from 0.4.14 to 0.4.17 +- Bump ed25519-bip32 from 0.4.0 to 0.4.1 +- Remove `txPendingCnt` metric and related field in `node/stats` +- Rename `txPendingTotalSize` to `mempoolTotalSize` +- Add `mempoolUsageRatio` metric and related field in `node/stats` to track load on the mempool. +- Change `blockContentSizeAvg` to represent information as a percentage of the block max size. +- Update REST API `/api/v0/account/{account_id}`, add new field with the token's state info. +- Add standalone explorer crate. - Add jcli option to generate and sign EVM mapping certificates. +- add new setting proposal expiration into the initial config/genesis +- Add new grpc watch service implementation for external (non-node) clients. +- update explorer, add new GraphQL objects as `UpdateProposal`, `UpdateVote`, `ConfigParam` etc. +- update REST API: add new endpoint account based votes count (`/api/v1/votes/plan/accounts-votes-count`) +- Add CORS config params: allowed headers and allowed methods. +- Vote tally now uses the token in the voteplan instead of the native currency. +- Now the tally is incremental and is always available in the rest API. The - Add new Ethreum RPC endpoints for getting block info: eth_getBlockByHash, eth_getBlockByNumber, eth_getBlockTransactionCountByHash, eth_getBlockTransactionCountByNumber, eth_getUncleCountByBlockHash, eth_getUncleCountByBlockNumber, eth_blockNumber - Add new Ethreum RPC endpoints for transaction handling: eth_sendTransaction, eth_sendRawTransaction, eth_getTransactionByHash, eth_getTransactionByBlockHashAndIndex, eth_getTransactionByBlockNumberAndIndex, eth_getTransactionReceipt, eth_signTransaction, eth_estimateGas, eth_sign, eth_call - Add new Ethreum RPC endpoints for getting chain info: eth_chainId, eth_syncing, eth_gasPrice, eth_protocolVersion, eth_feeHistory @@ -40,6 +45,10 @@ - Update gas price and block gas limit for EVM params - Add new 'evm' REST API endpoints 'address_mapping/jormungandr_address', 'address_mapping/evm_address` for getting info about address mapping. They are optional for the 'evm' feature. +**Bug fixes:** + +- fix incorrect keys bech32 HRP by always using the ones provided by the library + ## Release 0.13.0 **New features:** diff --git a/jcli/Cargo.toml b/jcli/Cargo.toml index 1f4ea86a0c..102e4b6a27 100644 --- a/jcli/Cargo.toml +++ b/jcli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "jcli" -version = "0.13.0" +version = "0.15.0" authors = [ "dev@iohk.io" ] license = "MIT OR Apache-2.0" repository = "https://github.com/input-output-hk/jormungandr" diff --git a/jormungandr/Cargo.toml b/jormungandr/Cargo.toml index f31eadb34c..6b172059d9 100644 --- a/jormungandr/Cargo.toml +++ b/jormungandr/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "jormungandr" -version = "0.13.0" +version = "0.15.0" authors = [ "dev@iohk.io" ] license = "MIT OR Apache-2.0" repository = "https://github.com/input-output-hk/jormungandr" From 4a98a7718f846d35580e5ba7ca5d4028b0c1110e Mon Sep 17 00:00:00 2001 From: cameron Date: Tue, 31 May 2022 11:09:37 +0100 Subject: [PATCH 02/17] update lock --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f9f8f45a1e..1675de348a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2386,7 +2386,7 @@ checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" [[package]] name = "jcli" -version = "0.13.0" +version = "0.15.0" dependencies = [ "assert_fs", "base64", @@ -2433,7 +2433,7 @@ dependencies = [ [[package]] name = "jormungandr" -version = "0.13.0" +version = "0.15.0" dependencies = [ "arc-swap", "async-trait", From 40c2a96e06bfc67c784f16e533ea8cc9c2c3ab86 Mon Sep 17 00:00:00 2001 From: cameron Date: Tue, 31 May 2022 11:34:19 +0100 Subject: [PATCH 03/17] fix version numbers --- jormungandr-lib/Cargo.toml | 2 +- testing/jormungandr-automation/Cargo.toml | 2 +- testing/jormungandr-integration-tests/Cargo.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/jormungandr-lib/Cargo.toml b/jormungandr-lib/Cargo.toml index a23e6db7fe..72c6b1e501 100644 --- a/jormungandr-lib/Cargo.toml +++ b/jormungandr-lib/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "jormungandr-lib" -version = "0.13.0" +version = "0.15.0" authors = ["dev@iohk.io"] edition = "2021" diff --git a/testing/jormungandr-automation/Cargo.toml b/testing/jormungandr-automation/Cargo.toml index c3b79ff3e2..4e4bd0c2a5 100644 --- a/testing/jormungandr-automation/Cargo.toml +++ b/testing/jormungandr-automation/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "jormungandr-automation" -version = "0.13.0" +version = "0.15.0" authors = ["Nicolas Di Prima "] edition = "2021" diff --git a/testing/jormungandr-integration-tests/Cargo.toml b/testing/jormungandr-integration-tests/Cargo.toml index a46308413a..ea36925fba 100644 --- a/testing/jormungandr-integration-tests/Cargo.toml +++ b/testing/jormungandr-integration-tests/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "jormungandr-integration-tests" -version = "0.13.0" +version = "0.15.0" authors = [ "dev@iohk.io" ] edition = "2021" From eda3ddf73559ea0906adfd5d27ab2572eb330ca5 Mon Sep 17 00:00:00 2001 From: cameron Date: Tue, 31 May 2022 11:37:47 +0100 Subject: [PATCH 04/17] update lock --- Cargo.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1675de348a..835970705a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2495,7 +2495,7 @@ dependencies = [ [[package]] name = "jormungandr-automation" -version = "0.13.0" +version = "0.15.0" dependencies = [ "assert_cmd", "assert_fs", @@ -2558,7 +2558,7 @@ dependencies = [ [[package]] name = "jormungandr-integration-tests" -version = "0.13.0" +version = "0.15.0" dependencies = [ "assert_cmd", "assert_fs", @@ -2609,7 +2609,7 @@ dependencies = [ [[package]] name = "jormungandr-lib" -version = "0.13.0" +version = "0.15.0" dependencies = [ "base64", "bech32 0.8.1", From 14dcc1243b06d8e90916df7b326d6b1017a83a5b Mon Sep 17 00:00:00 2001 From: cameron Date: Mon, 6 Jun 2022 13:03:17 +0100 Subject: [PATCH 05/17] make dependencies use release branch --- explorer/Cargo.toml | 20 ++++++------- jcli/Cargo.toml | 16 +++++------ jormungandr-lib/Cargo.toml | 22 +++++++-------- jormungandr/Cargo.toml | 28 +++++++++---------- modules/blockchain/Cargo.toml | 4 +-- testing/hersir/Cargo.toml | 8 +++--- testing/jormungandr-automation/Cargo.toml | 18 ++++++------ .../jormungandr-integration-tests/Cargo.toml | 12 ++++---- testing/loki/Cargo.toml | 8 +++--- testing/mjolnir/Cargo.toml | 14 +++++----- testing/thor/Cargo.toml | 10 +++---- 11 files changed, 80 insertions(+), 80 deletions(-) diff --git a/explorer/Cargo.toml b/explorer/Cargo.toml index e75f69953d..587a8be897 100644 --- a/explorer/Cargo.toml +++ b/explorer/Cargo.toml @@ -41,16 +41,16 @@ http-zipkin = "0.3.0" jormungandr-lib = {path = "../jormungandr-lib"} -cardano-legacy-address = {git = "https://github.com/input-output-hk/chain-libs.git", branch = "master"} -chain-addr = {git = "https://github.com/input-output-hk/chain-libs.git", branch = "master"} -chain-core = {git = "https://github.com/input-output-hk/chain-libs.git", branch = "master"} -chain-crypto = {git = "https://github.com/input-output-hk/chain-libs.git", branch = "master"} -chain-impl-mockchain = {git = "https://github.com/input-output-hk/chain-libs.git", branch = "master"} -chain-time = {git = "https://github.com/input-output-hk/chain-libs.git", branch = "master"} -chain-vote = {git = "https://github.com/input-output-hk/chain-libs.git", branch = "master"} -chain-ser = {git = "https://github.com/input-output-hk/chain-libs.git", branch = "master"} -chain-network = {git = "https://github.com/input-output-hk/chain-libs.git", branch = "master"} -imhamt = {git = "https://github.com/input-output-hk/chain-libs.git", branch = "master"} +cardano-legacy-address = {git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9"} +chain-addr = {git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9"} +chain-core = {git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9"} +chain-crypto = {git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9"} +chain-impl-mockchain = {git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9"} +chain-time = {git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9"} +chain-vote = {git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9"} +chain-ser = {git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9"} +chain-network = {git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9"} +imhamt = {git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9"} [features] default = [] diff --git a/jcli/Cargo.toml b/jcli/Cargo.toml index 102e4b6a27..7ebce6910c 100644 --- a/jcli/Cargo.toml +++ b/jcli/Cargo.toml @@ -24,13 +24,13 @@ bech32 = "0.8" hex = "0.4.2" rayon = "1.5" base64 = "0.13.0" -chain-core = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master" } -chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master" } -chain-addr = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master" } -chain-crypto = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master" } -chain-time = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master" } -chain-vote = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master" } -chain-evm = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master", optional = true } +chain-core = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } +chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } +chain-addr = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } +chain-crypto = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } +chain-time = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } +chain-vote = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } +chain-evm = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", optional = true } jormungandr-lib = { path = "../jormungandr-lib" } gtmpl = "0.6.0" ed25519-bip32 = "0.4.1" @@ -53,7 +53,7 @@ predicates = "2.0" quickcheck = "0.9" # FIXME required to work with quickcheck 0.9. Remove after migrating another crate or newer quickcheck rand07 = { package = "rand", version = "0.7" } -chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master", features = [ "property-test-api" ] } +chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", features = [ "property-test-api" ] } [build-dependencies] versionisator = "1.0.2" diff --git a/jormungandr-lib/Cargo.toml b/jormungandr-lib/Cargo.toml index a23e6db7fe..dd3a424ef4 100644 --- a/jormungandr-lib/Cargo.toml +++ b/jormungandr-lib/Cargo.toml @@ -9,14 +9,14 @@ description = "Data structures and formats used by Jormungandr node API and conf [dependencies] serde = { version = "1.0", features = ["derive"] } serde_with = { version = "1.12", features = ["macros"] } -chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master" } -chain-addr = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master" } -chain-core = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master" } -chain-crypto = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master" } -chain-time = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master"} -chain-vote = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master" } -cardano-legacy-address = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master" } -typed-bytes = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master" } +chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } +chain-addr = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } +chain-core = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } +chain-crypto = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } +chain-time = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9"} +chain-vote = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } +cardano-legacy-address = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } +typed-bytes = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } rand = "0.8" rand_core = "0.6" rand_chacha = "0.3" @@ -35,9 +35,9 @@ quickcheck = "0.9" quickcheck_macros = "0.9" # FIXME required to work with quickcheck 0.9. Remove after migrating another crate or newer quickcheck rand07 = { package = "rand", version = "0.7" } -chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master", features = [ "property-test-api" ] } -chain-addr = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master", features = [ "property-test-api" ] } -chain-crypto = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master", features = [ "property-test-api" ] } +chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", features = [ "property-test-api" ] } +chain-addr = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", features = [ "property-test-api" ] } +chain-crypto = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", features = [ "property-test-api" ] } ed25519-bip32 = "0.4.1" serde_yaml = "0.8" serde_json = "1.0" diff --git a/jormungandr/Cargo.toml b/jormungandr/Cargo.toml index 6b172059d9..47c366ea6e 100644 --- a/jormungandr/Cargo.toml +++ b/jormungandr/Cargo.toml @@ -12,17 +12,17 @@ Midgard Serpent edition = "2021" [dependencies] -chain-addr = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master" } -chain-core = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master" } -chain-crypto = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master" } -chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master" } -chain-network = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master" } -chain-storage = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master" } -chain-time = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master" } -chain-vote = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master" } -chain-evm = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master", optional = true } -cardano-legacy-address = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master" } -imhamt = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master" } +chain-addr = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } +chain-core = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } +chain-crypto = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } +chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } +chain-network = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } +chain-storage = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } +chain-time = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } +chain-vote = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } +chain-evm = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", optional = true } +cardano-legacy-address = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } +imhamt = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } arc-swap = "^1.5.0" async-trait = "0.1.51" @@ -69,9 +69,9 @@ reqwest = { version = "0.11", default-features = false, features = ["rustls-tls tokio = { version = "^1.15", features = ["full"] } quickcheck = "0.9" quickcheck_macros = "0.9" -chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master", features = [ "property-test-api" ] } -chain-addr = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master", features = [ "property-test-api" ] } -chain-crypto = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master", features = [ "property-test-api" ] } +chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", features = [ "property-test-api" ] } +chain-addr = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", features = [ "property-test-api" ] } +chain-crypto = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", features = [ "property-test-api" ] } criterion = { version = "0.3", features = ["html_reports", "async_tokio"] } [[bench]] diff --git a/modules/blockchain/Cargo.toml b/modules/blockchain/Cargo.toml index 8055e8a43e..d1f0b9bfa1 100644 --- a/modules/blockchain/Cargo.toml +++ b/modules/blockchain/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Nicolas Di Prima "] edition = "2021" [dependencies] -chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master" } -chain-time = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master"} +chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } +chain-time = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9"} thiserror = "1.0.30" lru = "0.7" diff --git a/testing/hersir/Cargo.toml b/testing/hersir/Cargo.toml index f1b578ee6f..70b838532b 100644 --- a/testing/hersir/Cargo.toml +++ b/testing/hersir/Cargo.toml @@ -10,10 +10,10 @@ edition = "2021" assert_fs = "1.0" custom_debug = "0.5" ctrlc = "3.2.1" -chain-core = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master" } -chain-crypto = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master", features = [ "property-test-api" ] } -chain-addr = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master", features = [ "property-test-api" ] } -chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master" } +chain-core = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } +chain-crypto = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", features = [ "property-test-api" ] } +chain-addr = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", features = [ "property-test-api" ] } +chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } indicatif = "0.15" jormungandr-automation = { path = "../jormungandr-automation" } jormungandr-lib = { path = "../../jormungandr-lib" } diff --git a/testing/jormungandr-automation/Cargo.toml b/testing/jormungandr-automation/Cargo.toml index c3b79ff3e2..82819186ff 100644 --- a/testing/jormungandr-automation/Cargo.toml +++ b/testing/jormungandr-automation/Cargo.toml @@ -17,15 +17,15 @@ bech32 = "0.8" bytesize = "1.1.0" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master", features = [ "property-test-api" ] } -chain-addr = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master", features = [ "property-test-api" ] } -chain-core = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master" } -chain-crypto = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master", features = [ "property-test-api" ] } -chain-time = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master" } -chain-storage = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master", features = ["with-bench"] } -chain-vote = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master" } -cardano-legacy-address = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master" } -typed-bytes = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master" } +chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", features = [ "property-test-api" ] } +chain-addr = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", features = [ "property-test-api" ] } +chain-core = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } +chain-crypto = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", features = [ "property-test-api" ] } +chain-time = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } +chain-storage = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", features = ["with-bench"] } +chain-vote = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } +cardano-legacy-address = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } +typed-bytes = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } jormungandr-lib = { path = "../../jormungandr-lib" } jortestkit = { git = "https://github.com/input-output-hk/jortestkit.git", branch = "master" } rand = "0.8" diff --git a/testing/jormungandr-integration-tests/Cargo.toml b/testing/jormungandr-integration-tests/Cargo.toml index a46308413a..127287348a 100644 --- a/testing/jormungandr-integration-tests/Cargo.toml +++ b/testing/jormungandr-integration-tests/Cargo.toml @@ -12,12 +12,12 @@ tokio = { version = "1.15", features = ["macros", "time"] } futures = "0.3.21" base64 = "0.13" hex = "0.4.2" -chain-addr = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master" } -chain-core = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master" } -chain-crypto = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master" } -chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master" } -chain-time = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master" } -chain-vote = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master" } +chain-addr = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } +chain-core = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } +chain-crypto = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } +chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } +chain-time = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } +chain-vote = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } jormungandr-lib = { path = "../../jormungandr-lib" } hersir = { path = "../hersir" } loki = { path = "../loki" } diff --git a/testing/loki/Cargo.toml b/testing/loki/Cargo.toml index 2920aceda4..c1b84db191 100644 --- a/testing/loki/Cargo.toml +++ b/testing/loki/Cargo.toml @@ -7,10 +7,10 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -chain-addr = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master", features = [ "property-test-api" ] } -chain-crypto = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master", features = [ "property-test-api" ] } -chain-core = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master" } -chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master" } +chain-addr = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", features = [ "property-test-api" ] } +chain-crypto = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", features = [ "property-test-api" ] } +chain-core = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } +chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } jormungandr-automation = { path = "../jormungandr-automation" } jormungandr-lib = { path = "../../jormungandr-lib" } thor = {path = "../thor"} diff --git a/testing/mjolnir/Cargo.toml b/testing/mjolnir/Cargo.toml index b02ee46e99..1b4cf857a8 100644 --- a/testing/mjolnir/Cargo.toml +++ b/testing/mjolnir/Cargo.toml @@ -16,13 +16,13 @@ thiserror = "1.0" structopt = "^0.3" assert_fs = "1.0" indicatif = "0.15" -chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master", features = [ "property-test-api" ] } -chain-addr = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master", features = [ "property-test-api" ] } -chain-core = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master" } -chain-crypto = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master", features = [ "property-test-api" ] } -chain-time = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master" } -chain-storage = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master", features = ["with-bench"] } -chain-vote = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master" } +chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", features = [ "property-test-api" ] } +chain-addr = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", features = [ "property-test-api" ] } +chain-core = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } +chain-crypto = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", features = [ "property-test-api" ] } +chain-time = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } +chain-storage = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", features = ["with-bench"] } +chain-vote = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } tokio = { version = "1.15", features = ["macros"] } thor = { path = "../thor" } loki = { path = "../loki" } diff --git a/testing/thor/Cargo.toml b/testing/thor/Cargo.toml index 0197e022bd..d0f06272e7 100644 --- a/testing/thor/Cargo.toml +++ b/testing/thor/Cargo.toml @@ -10,12 +10,12 @@ jcli = { path = "../../jcli" } jormungandr-lib = { path = "../../jormungandr-lib" } jormungandr-automation = { path = "../jormungandr-automation" } jortestkit = { git = "https://github.com/input-output-hk/jortestkit.git", branch = "master" } -chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master", features = [ "property-test-api" ] } -chain-addr = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master", features = [ "property-test-api" ] } -chain-crypto = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master", features = [ "property-test-api" ] } -chain-core = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master" } +chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", features = [ "property-test-api" ] } +chain-addr = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", features = [ "property-test-api" ] } +chain-crypto = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", features = [ "property-test-api" ] } +chain-core = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } assert_fs = "1.0" -chain-vote = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "master" } +chain-vote = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } serde = { version = "1.0", features = ["derive"] } cocoon = { git = "https://github.com/dkijania/cocoon.git" } dirs = "4.0.0" From 47e874c5792bccd2eb073ef65ea89ac5d0525c04 Mon Sep 17 00:00:00 2001 From: cameron Date: Mon, 6 Jun 2022 13:48:14 +0100 Subject: [PATCH 06/17] compiles now --- Cargo.lock | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 835970705a..ed071a6cf6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -568,7 +568,7 @@ dependencies = [ [[package]] name = "cardano-legacy-address" version = "0.1.1" -source = "git+https://github.com/input-output-hk/chain-libs.git?branch=master#c9fba3e1c1c5df4d486c856fddaf2f2da686bfe3" +source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9#1b01f0dbf9282102f394727b4f8637fe4ce1728e" dependencies = [ "cbor_event", "cryptoxide 0.4.2", @@ -639,7 +639,7 @@ dependencies = [ [[package]] name = "chain-addr" version = "0.1.0" -source = "git+https://github.com/input-output-hk/chain-libs.git?branch=master#c9fba3e1c1c5df4d486c856fddaf2f2da686bfe3" +source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9#1b01f0dbf9282102f394727b4f8637fe4ce1728e" dependencies = [ "bech32 0.8.1", "chain-core", @@ -653,7 +653,7 @@ dependencies = [ [[package]] name = "chain-core" version = "0.1.0" -source = "git+https://github.com/input-output-hk/chain-libs.git?branch=master#c9fba3e1c1c5df4d486c856fddaf2f2da686bfe3" +source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9#1b01f0dbf9282102f394727b4f8637fe4ce1728e" dependencies = [ "chain-ser", ] @@ -661,7 +661,7 @@ dependencies = [ [[package]] name = "chain-crypto" version = "0.1.0" -source = "git+https://github.com/input-output-hk/chain-libs.git?branch=master#c9fba3e1c1c5df4d486c856fddaf2f2da686bfe3" +source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9#1b01f0dbf9282102f394727b4f8637fe4ce1728e" dependencies = [ "bech32 0.8.1", "cryptoxide 0.4.2", @@ -683,7 +683,7 @@ dependencies = [ [[package]] name = "chain-evm" version = "0.1.0" -source = "git+https://github.com/input-output-hk/chain-libs.git?branch=master#c9fba3e1c1c5df4d486c856fddaf2f2da686bfe3" +source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9#1b01f0dbf9282102f394727b4f8637fe4ce1728e" dependencies = [ "aurora-bn", "base64", @@ -712,7 +712,7 @@ dependencies = [ [[package]] name = "chain-impl-mockchain" version = "0.1.0" -source = "git+https://github.com/input-output-hk/chain-libs.git?branch=master#c9fba3e1c1c5df4d486c856fddaf2f2da686bfe3" +source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9#1b01f0dbf9282102f394727b4f8637fe4ce1728e" dependencies = [ "cardano-legacy-address", "chain-addr", @@ -744,7 +744,7 @@ dependencies = [ [[package]] name = "chain-network" version = "0.1.0" -source = "git+https://github.com/input-output-hk/chain-libs.git?branch=master#c9fba3e1c1c5df4d486c856fddaf2f2da686bfe3" +source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9#1b01f0dbf9282102f394727b4f8637fe4ce1728e" dependencies = [ "async-trait", "chain-crypto", @@ -761,7 +761,7 @@ dependencies = [ [[package]] name = "chain-ser" version = "0.1.0" -source = "git+https://github.com/input-output-hk/chain-libs.git?branch=master#c9fba3e1c1c5df4d486c856fddaf2f2da686bfe3" +source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9#1b01f0dbf9282102f394727b4f8637fe4ce1728e" dependencies = [ "thiserror", ] @@ -769,7 +769,7 @@ dependencies = [ [[package]] name = "chain-storage" version = "0.1.0" -source = "git+https://github.com/input-output-hk/chain-libs.git?branch=master#c9fba3e1c1c5df4d486c856fddaf2f2da686bfe3" +source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9#1b01f0dbf9282102f394727b4f8637fe4ce1728e" dependencies = [ "criterion", "data-pile", @@ -782,7 +782,7 @@ dependencies = [ [[package]] name = "chain-time" version = "0.1.0" -source = "git+https://github.com/input-output-hk/chain-libs.git?branch=master#c9fba3e1c1c5df4d486c856fddaf2f2da686bfe3" +source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9#1b01f0dbf9282102f394727b4f8637fe4ce1728e" dependencies = [ "chain-core", "chain-ser", @@ -794,9 +794,9 @@ dependencies = [ [[package]] name = "chain-vote" version = "0.1.0" -source = "git+https://github.com/input-output-hk/chain-libs.git?branch=master#c9fba3e1c1c5df4d486c856fddaf2f2da686bfe3" +source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9#1b01f0dbf9282102f394727b4f8637fe4ce1728e" dependencies = [ - "cfg-if 1.0.0", + "cfg-if 0.1.10", "chain-core", "chain-crypto", "const_format", @@ -2261,7 +2261,7 @@ dependencies = [ [[package]] name = "imhamt" version = "0.1.0" -source = "git+https://github.com/input-output-hk/chain-libs.git?branch=master#c9fba3e1c1c5df4d486c856fddaf2f2da686bfe3" +source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9#1b01f0dbf9282102f394727b4f8637fe4ce1728e" dependencies = [ "proptest", "rustc_version", @@ -4705,7 +4705,7 @@ dependencies = [ [[package]] name = "sparse-array" version = "0.1.0" -source = "git+https://github.com/input-output-hk/chain-libs.git?branch=master#c9fba3e1c1c5df4d486c856fddaf2f2da686bfe3" +source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9#1b01f0dbf9282102f394727b4f8637fe4ce1728e" [[package]] name = "spin" @@ -5466,7 +5466,7 @@ dependencies = [ [[package]] name = "typed-bytes" version = "0.1.0" -source = "git+https://github.com/input-output-hk/chain-libs.git?branch=master#c9fba3e1c1c5df4d486c856fddaf2f2da686bfe3" +source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9#1b01f0dbf9282102f394727b4f8637fe4ce1728e" [[package]] name = "typenum" From a7a8bcac06f4963961f78f7ca2c5670c196502cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20Rosales?= Date: Tue, 5 Sep 2023 11:09:51 -0600 Subject: [PATCH 07/17] deps: pin commit for cocoon crate --- Cargo.lock | 2 +- testing/thor/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ed071a6cf6..f83c84a346 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -868,7 +868,7 @@ dependencies = [ [[package]] name = "cocoon" version = "0.3.0" -source = "git+https://github.com/dkijania/cocoon.git#1dfd975c3f0720d51c56fb297e7c92467bc3448a" +source = "git+https://github.com/dkijania/cocoon.git?rev=1dfd975c3f0720d51c56fb297e7c92467bc3448a#1dfd975c3f0720d51c56fb297e7c92467bc3448a" dependencies = [ "aes-gcm", "chacha20poly1305", diff --git a/testing/thor/Cargo.toml b/testing/thor/Cargo.toml index d0f06272e7..e055e58529 100644 --- a/testing/thor/Cargo.toml +++ b/testing/thor/Cargo.toml @@ -17,7 +17,7 @@ chain-core = { git = "https://github.com/input-output-hk/chain-libs.git", b assert_fs = "1.0" chain-vote = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } serde = { version = "1.0", features = ["derive"] } -cocoon = { git = "https://github.com/dkijania/cocoon.git" } +cocoon = { git = "https://github.com/dkijania/cocoon.git", rev = "1dfd975c3f0720d51c56fb297e7c92467bc3448a" } dirs = "4.0.0" serde_yaml = "0.8" structopt = "0.3" From 3002ea5291c12f0b488e9f92ac2830f28841e5ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20Rosales?= Date: Tue, 5 Sep 2023 13:30:47 -0600 Subject: [PATCH 08/17] breaking: remove tx expiry from mempool Brings in changes from commit 92e3746f9017e65a674dcfec6767ddcad87bff35 in catalyst-core repo --- jormungandr/src/fragment/pool.rs | 336 ++++++-------------------- jormungandr/src/fragment/process.rs | 24 +- jormungandr/src/fragment/selection.rs | 15 +- 3 files changed, 82 insertions(+), 293 deletions(-) diff --git a/jormungandr/src/fragment/pool.rs b/jormungandr/src/fragment/pool.rs index 05ecdad84c..811d086fb7 100644 --- a/jormungandr/src/fragment/pool.rs +++ b/jormungandr/src/fragment/pool.rs @@ -25,14 +25,14 @@ use jormungandr_lib::{ }, time::SecondsSinceUnixEpoch, }; +use std::mem; use thiserror::Error; +use tokio::{ + fs::File, + io::{AsyncWriteExt, BufWriter}, +}; use tracing::Instrument; -use std::mem; - -use tokio::fs::File; -use tokio::io::{AsyncWriteExt, BufWriter}; - // It's a pretty big buffer, but common cloud based storage solutions (like EBS or GlusterFS) benefits from // this and it's currently flushed after every request, so the possibility of losing fragments due to a crash // should be minimal. @@ -101,29 +101,12 @@ impl Pool { &mut self, fragment: &Fragment, id: FragmentId, - ledger_settings: &Settings, - block_date: BlockDate, ) -> Result<(), FragmentRejectionReason> { if self.logs.exists(id) { tracing::debug!("fragment is already logged"); return Err(FragmentRejectionReason::FragmentAlreadyInLog); } - if let Some(valid_until) = get_transaction_expiry_date(fragment) { - use chain_impl_mockchain::ledger::check::{valid_transaction_date, TxValidityError}; - match valid_transaction_date(ledger_settings, valid_until, block_date) { - Ok(_) => {} - Err(TxValidityError::TransactionExpired) => { - tracing::debug!("fragment is expired at the time of receiving"); - return Err(FragmentRejectionReason::FragmentExpired); - } - Err(TxValidityError::TransactionValidForTooLong) => { - tracing::debug!("fragment is valid for too long"); - return Err(FragmentRejectionReason::FragmentValidForTooLong); - } - } - } - if !is_fragment_valid(fragment) { tracing::debug!("fragment is invalid, not including to the pool"); return Err(FragmentRejectionReason::FragmentInvalid); @@ -155,7 +138,7 @@ impl Pool { pub async fn insert_and_propagate_all( &mut self, origin: FragmentOrigin, - fragments: Vec<(Fragment, FragmentId)>, + fragments: Vec, fail_fast: bool, ) -> Result { tracing::debug!(origin = ?origin, "received {} fragments", fragments.len()); @@ -163,21 +146,15 @@ impl Pool { let mut filtered_fragments = Vec::new(); let mut rejected = Vec::new(); - let mut fragments = fragments.into_iter(); - - let tip = self.tip.get_ref().await; - let ledger = tip.ledger(); - let ledger_settings = ledger.settings(); - let block_date = get_current_block_date(&tip); + let mut fragments = fragments.into_iter().map(|el| { + let id = el.hash(); + (el, id) + }); for (fragment, id) in fragments.by_ref() { let span = tracing::debug_span!("pool_incoming_fragment", fragment_id=?id); - match self - .filter_fragment(&fragment, id, ledger_settings, block_date) - .instrument(span) - .await - { + match self.filter_fragment(&fragment, id).instrument(span).await { Err(reason @ FragmentRejectionReason::FragmentInvalid) => { rejected.push(RejectedFragmentInfo { id, reason }); if fail_fast { @@ -214,8 +191,10 @@ impl Pool { let mut fragments = filtered_fragments.into_iter(); let new_fragments = self.pool.insert_all(fragments.by_ref()); - let count = new_fragments.len(); - tracing::debug!("{} of the received fragments were added to the pool", count); + tracing::debug!( + count = %new_fragments.len(), + "received fragments were added to the pool" + ); let fragment_logs: Vec<_> = new_fragments .iter() .map(move |(_, id)| FragmentLog::new(*id, origin)) @@ -261,7 +240,7 @@ impl Pool { pub async fn select( &mut self, ledger: ApplyBlockLedger, - ledger_params: LedgerParameters, + ledger_params: &LedgerParameters, selection_alg: FragmentSelectionAlgorithmParams, soft_deadline_future: futures::channel::oneshot::Receiver<()>, hard_deadline_future: futures::channel::oneshot::Receiver<()>, @@ -277,7 +256,7 @@ impl Pool { selection_alg .select( ledger, - &ledger_params, + ledger_params, logs, pool, soft_deadline_future, @@ -297,21 +276,6 @@ impl Pool { self.update_metrics(); } - pub async fn remove_expired_txs(&mut self) { - let tip = self.tip.get_ref().await; - let block_date = get_current_block_date(&tip); - let fragment_ids = self.pool.remove_expired_txs(block_date); - self.metrics.add_tx_rejected_cnt(fragment_ids.len()); - self.logs.modify_all( - fragment_ids, - FragmentStatus::Rejected { - reason: "fragment expired".to_string(), - }, - block_date.into(), - ); - self.update_metrics(); - } - fn update_metrics(&self) { let mempool_usage_ratio = match self.pool.max_entries() { // a little arbitrary, but you could say the mempool is indeed full and it @@ -320,23 +284,7 @@ impl Pool { n => self.pool.len() as f64 / n as f64, }; self.metrics.set_mempool_usage_ratio(mempool_usage_ratio); - self.metrics - .set_mempool_total_size(self.pool.total_size_bytes()); - } -} - -fn get_current_block_date(tip: &Ref) -> BlockDate { - let time = std::time::SystemTime::now(); - let era = tip.epoch_leadership_schedule().era(); - let epoch_position = tip - .time_frame() - .slot_at(&time) - .and_then(|slot| era.from_slot_to_era(slot)) - .expect("the current time and blockchain state should produce a valid blockchain date"); - let block_date: BlockDate = epoch_position.into(); - BlockDate { - slot_id: block_date.slot_id + 1, - ..block_date + self.metrics.set_mempool_total_size(self.pool.len()); } } @@ -370,60 +318,38 @@ fn is_transaction_valid(tx: &Transaction) -> bool { tx.verify_possibly_balanced().is_ok() } -fn get_transaction_expiry_date(fragment: &Fragment) -> Option { - match fragment { - Fragment::Initial(_) => None, - Fragment::OldUtxoDeclaration(_) => None, - Fragment::Evm(_) => None, - Fragment::Transaction(tx) => Some(tx.as_slice().valid_until()), - Fragment::OwnerStakeDelegation(tx) => Some(tx.as_slice().valid_until()), - Fragment::StakeDelegation(tx) => Some(tx.as_slice().valid_until()), - Fragment::PoolRegistration(tx) => Some(tx.as_slice().valid_until()), - Fragment::PoolRetirement(tx) => Some(tx.as_slice().valid_until()), - Fragment::PoolUpdate(tx) => Some(tx.as_slice().valid_until()), - Fragment::UpdateProposal(tx) => Some(tx.as_slice().valid_until()), - Fragment::UpdateVote(tx) => Some(tx.as_slice().valid_until()), - Fragment::VotePlan(tx) => Some(tx.as_slice().valid_until()), - Fragment::VoteCast(tx) => Some(tx.as_slice().valid_until()), - Fragment::VoteTally(tx) => Some(tx.as_slice().valid_until()), - Fragment::MintToken(tx) => Some(tx.as_slice().valid_until()), - Fragment::EvmMapping(tx) => Some(tx.as_slice().valid_until()), - } -} - pub(super) mod internal { use super::*; - use std::{ cmp::Ordering, - collections::{BTreeSet, HashMap}, + collections::HashMap, hash::{Hash, Hasher}, ptr, }; - /// Doubly-linked queue with the possibility to remove elements from the middle of the list by + /// Queue with the possibility to remove elements from the middle of the list by /// their keys. - struct IndexedDeqeue { - head: *mut IndexedDequeueEntry, - tail: *mut IndexedDequeueEntry, + struct IndexedQueue { + head: *mut IndexedQueueEntry, + tail: *mut IndexedQueueEntry, - index: HashMap, Box>>, + index: HashMap, Box>>, } - struct IndexedDequeueEntry { + struct IndexedQueueEntry { key: K, value: V, - prev: *mut IndexedDequeueEntry, - next: *mut IndexedDequeueEntry, + prev: *mut IndexedQueueEntry, + next: *mut IndexedQueueEntry, } /// A wrapper around the pointer to the key of the queue element. This wrapper forwards the /// implementations of `Eq` and `Hash` to `K`. This is required becuase by default the /// implementations of `Eq` and `Hash` from the pointer itself will be used. - struct IndexedDequeueKeyRef(*const K); + struct IndexedQueueKeyRef(*const K); - impl IndexedDeqeue + impl IndexedQueue where K: Eq + Hash, { @@ -437,7 +363,7 @@ pub(super) mod internal { } fn push_front(&mut self, key: K, value: V) { - let mut entry = Box::new(IndexedDequeueEntry { + let mut entry = Box::new(IndexedQueueEntry { key, value, prev: ptr::null_mut(), @@ -451,29 +377,7 @@ pub(super) mod internal { self.head = &mut *entry; if self .index - .insert(IndexedDequeueKeyRef(&entry.key), entry) - .is_some() - { - panic!("inserted an already existing key"); - } - } - - fn push_back(&mut self, key: K, value: V) { - let mut entry = Box::new(IndexedDequeueEntry { - key, - value, - prev: self.tail, - next: ptr::null_mut(), - }); - if let Some(tail) = unsafe { self.tail.as_mut() } { - tail.next = &mut *entry; - } else { - self.head = &mut *entry; - } - self.tail = &mut *entry; - if self - .index - .insert(IndexedDequeueKeyRef(&entry.key), entry) + .insert(IndexedQueueKeyRef(&entry.key), entry) .is_some() { panic!("inserted an already existing key"); @@ -488,12 +392,12 @@ pub(super) mod internal { } else { self.head = ptr::null_mut(); } - let entry = self.index.remove(&IndexedDequeueKeyRef(&tail.key)).unwrap(); + let entry = self.index.remove(&IndexedQueueKeyRef(&tail.key)).unwrap(); Some((entry.key, entry.value)) } fn remove(&mut self, key: &K) -> Option { - let entry = self.index.remove(&IndexedDequeueKeyRef(key))?; + let entry = self.index.remove(&IndexedQueueKeyRef(key))?; if let Some(prev) = unsafe { entry.prev.as_mut() } { prev.next = entry.next; } else { @@ -512,25 +416,25 @@ pub(super) mod internal { } fn contains(&self, key: &K) -> bool { - self.index.contains_key(&IndexedDequeueKeyRef(key)) + self.index.contains_key(&IndexedQueueKeyRef(key)) } } - unsafe impl Send for IndexedDeqeue {} - unsafe impl Sync for IndexedDeqeue {} + unsafe impl Send for IndexedQueue {} + unsafe impl Sync for IndexedQueue {} - unsafe impl Send for IndexedDequeueEntry {} - unsafe impl Send for IndexedDequeueKeyRef {} + unsafe impl Send for IndexedQueueEntry {} + unsafe impl Send for IndexedQueueKeyRef {} - impl PartialEq for IndexedDequeueKeyRef { - fn eq(&self, other: &IndexedDequeueKeyRef) -> bool { + impl PartialEq for IndexedQueueKeyRef { + fn eq(&self, other: &IndexedQueueKeyRef) -> bool { unsafe { (*self.0).eq(&*other.0) } } } - impl Eq for IndexedDequeueKeyRef {} + impl Eq for IndexedQueueKeyRef {} - impl Hash for IndexedDequeueKeyRef { + impl Hash for IndexedQueueKeyRef { fn hash(&self, state: &mut H) { unsafe { (*self.0).hash(state) } } @@ -559,21 +463,15 @@ pub(super) mod internal { } pub struct Pool { - entries: IndexedDeqeue, - timeout_queue: BTreeSet, + entries: IndexedQueue, max_entries: usize, - total_size_bytes: usize, } impl Pool { pub fn new(max_entries: usize) -> Self { Pool { - entries: IndexedDeqeue::new(), - // Using BTreeSet is a nasty hack so that we are able to to efficiently remove items - // out of their order in a queue. BinaryHeap does not allow that. - timeout_queue: BTreeSet::new(), + entries: IndexedQueue::new(), max_entries, - total_size_bytes: 0, } } @@ -582,103 +480,39 @@ pub(super) mod internal { &mut self, fragments: impl IntoIterator, ) -> Vec<(Fragment, FragmentId)> { - let max_fragments = self.max_entries - self.entries.len(); fragments .into_iter() .filter(|(fragment, id)| { if self.entries.contains(id) { false } else { - self.total_size_bytes += fragment.serialized_size(); - self.timeout_queue_insert(fragment, *id); + if self.entries.len() >= self.max_entries && self.entries.len() != 0 { + // Remove an oldest entry from the pool + self.entries.pop_back().expect("entry must exist"); + } self.entries.push_front(*id, fragment.clone()); true } }) - .take(max_fragments) + // Truncate overflowing fragments + .take(self.max_entries) .collect() } pub fn remove_all<'a>(&mut self, fragment_ids: impl IntoIterator) { for fragment_id in fragment_ids { - let maybe_fragment = self.entries.remove(fragment_id); - if let Some(fragment) = maybe_fragment { - self.timeout_queue_remove(&fragment, *fragment_id); - self.total_size_bytes -= fragment.serialized_size(); - } + self.entries.remove(fragment_id); } } pub fn remove_oldest(&mut self) -> Option<(Fragment, FragmentId)> { - let (id, fragment) = self.entries.pop_back().map(|(id, value)| (id, value))?; - self.timeout_queue_remove(&fragment, id); - self.total_size_bytes -= fragment.serialized_size(); - Some((fragment, id)) - } - - pub fn return_to_pool( - &mut self, - fragments: impl IntoIterator, - ) { - for (fragment, id) in fragments.into_iter() { - self.timeout_queue_insert(&fragment, id); - self.total_size_bytes += fragment.serialized_size(); - self.entries.push_back(id, fragment); - } - } - - fn timeout_queue_insert(&mut self, fragment: &Fragment, id: FragmentId) { - if let Some(valid_until) = get_transaction_expiry_date(fragment) { - let item = TimeoutQueueItem { valid_until, id }; - self.timeout_queue.insert(item); - } - } - - fn timeout_queue_remove(&mut self, fragment: &Fragment, id: FragmentId) { - if let Some(valid_until) = get_transaction_expiry_date(fragment) { - let item = TimeoutQueueItem { valid_until, id }; - self.timeout_queue.remove(&item); - } - } - - pub fn remove_expired_txs(&mut self, block_date: BlockDate) -> Vec { - let to_remove: Vec<_> = self - .timeout_queue - .iter() - .take_while(|x| x.valid_until < block_date) - .cloned() - .collect(); - for item in &to_remove { - self.timeout_queue.remove(item); - if let Some(fragment) = self.entries.remove(&item.id) { - self.total_size_bytes -= fragment.serialized_size(); - } - } - to_remove.into_iter().map(|x| x.id).collect() - // TODO convert to something like this when .first() and .pop_first() are stabilized. This does not have unnecessary clones. - // https://github.com/rust-lang/rust/issues/62924 - // loop { - // if let Some(item) = self.timeout_queue.first() { - // if item.valid_until < block_date { - // break; - // } - // } else { - // break; - // } - - // let item = self.timeout_queue.pop_first().unwrap(); - // self.entries.remove(&item.id); - // } + self.entries.pop_back().map(|(id, value)| (value, id)) } pub fn len(&self) -> usize { self.entries.len() } - pub fn total_size_bytes(&self) -> usize { - self.total_size_bytes - } - pub fn max_entries(&self) -> usize { self.max_entries } @@ -688,15 +522,14 @@ pub(super) mod internal { mod tests { use super::*; use chain_core::property::Fragment as _; - use chain_impl_mockchain::transaction::TxBuilder; use quickcheck::TestResult; use quickcheck_macros::quickcheck; use std::collections::HashSet; #[quickcheck] - fn overflowing_pool_should_reject_new_fragments( + fn overflowing_pool_should_remove_oldest_fragments( fragments1_in: (Fragment, Fragment, Fragment), - fragments2_in: (Fragment, Fragment), + fragments2_in: (Fragment, Fragment, Fragment, Fragment, Fragment), ) -> TestResult { let fragments1 = vec![ (fragments1_in.0.clone(), fragments1_in.0.id()), @@ -704,9 +537,13 @@ pub(super) mod internal { (fragments1_in.2.clone(), fragments1_in.2.id()), ]; let fragments2 = vec![ + // duplicated fragment (fragments1_in.2.clone(), fragments1_in.2.id()), (fragments2_in.0.clone(), fragments2_in.0.id()), (fragments2_in.1.clone(), fragments2_in.1.id()), + (fragments2_in.2.clone(), fragments2_in.2.id()), + (fragments2_in.3.clone(), fragments2_in.3.id()), + (fragments2_in.4.clone(), fragments2_in.4.id()), ]; if fragments1 @@ -715,27 +552,25 @@ pub(super) mod internal { .map(|(_, id)| id) .collect::>() .len() - != 5 + != 8 { return TestResult::discard(); } - let fragments2_expected = vec![(fragments2_in.0.clone(), fragments2_in.0.id())]; + let fragments2_expected = vec![ + (fragments2_in.0.clone(), fragments2_in.0.id()), + (fragments2_in.1.clone(), fragments2_in.1.id()), + (fragments2_in.2.clone(), fragments2_in.2.id()), + (fragments2_in.3.clone(), fragments2_in.3.id()), + ]; let final_expected = vec![ - (fragments1_in.0.clone(), fragments1_in.0.id()), - (fragments1_in.1.clone(), fragments1_in.1.id()), - (fragments1_in.2.clone(), fragments1_in.2.id()), (fragments2_in.0.clone(), fragments2_in.0.id()), + (fragments2_in.1.clone(), fragments2_in.1.id()), + (fragments2_in.2.clone(), fragments2_in.2.id()), + (fragments2_in.3.clone(), fragments2_in.3.id()), ]; let mut pool = Pool::new(4); assert_eq!(fragments1, pool.insert_all(fragments1.clone())); - assert_eq!( - pool.total_size_bytes, - fragments1 - .iter() - .map(|(f, _)| f.serialized_size()) - .sum::() - ); assert_eq!(fragments2_expected, pool.insert_all(fragments2)); for expected in final_expected.into_iter() { @@ -743,40 +578,5 @@ pub(super) mod internal { } TestResult::from_bool(pool.remove_oldest().is_none()) } - - #[test] - fn expired_transactions_are_removed() { - let mut pool = Pool::new(1); - - let tx = Fragment::Transaction( - TxBuilder::new() - .set_nopayload() - .set_expiry_date(BlockDate { - epoch: 0, - slot_id: 1, - }) - .set_ios(&[], &[]) - .set_witnesses(&[]) - .set_payload_auth(&()), - ); - - pool.insert_all([(tx.clone(), tx.id())]); - - assert_eq!(pool.entries.len(), 1, "Fragment should be in pool"); - - pool.remove_expired_txs(BlockDate { - epoch: 0, - slot_id: 1, - }); - - assert_eq!(pool.entries.len(), 1, "Fragment has not expired yet"); - - pool.remove_expired_txs(BlockDate { - epoch: 0, - slot_id: 2, - }); - - assert_eq!(pool.entries.len(), 0, "Expired fragment should be removed"); - } } } diff --git a/jormungandr/src/fragment/process.rs b/jormungandr/src/fragment/process.rs index a1e9216706..dc69af416e 100644 --- a/jormungandr/src/fragment/process.rs +++ b/jormungandr/src/fragment/process.rs @@ -8,17 +8,16 @@ use crate::{ task::TokioServiceInfo, }, }; - -use chain_core::property::Fragment; -use std::collections::HashMap; -use std::convert::TryInto; -use std::io; -use std::path::{Path, PathBuf}; -use tokio::fs::{self, File}; - use futures::{future, TryFutureExt}; +use std::{ + collections::HashMap, + convert::TryInto, + io, + path::{Path, PathBuf}, +}; use thiserror::Error; use time::{macros::format_description, Duration, OffsetDateTime, Time}; +use tokio::fs::{self, File}; use tokio_stream::StreamExt; use tracing::{debug_span, span, Level}; use tracing_futures::Instrument; @@ -115,7 +114,6 @@ impl Process { tip, stats_counter.clone() ); - loop { tokio::select! { maybe_msg = input.next() => { @@ -138,10 +136,7 @@ impl Process { async { let stats_counter = stats_counter.clone(); let summary = pool - .insert_and_propagate_all(origin, fragments.into_iter().map(|el| { - let id = el.id(); - (el, id) - }).collect(), fail_fast) + .insert_and_propagate_all(origin, fragments, fail_fast) .await?; stats_counter.add_tx_recv_cnt(summary.accepted.len()); @@ -161,7 +156,6 @@ impl Process { fragment_ids ); pool.remove_added_to_block(fragment_ids, status); - pool.remove_expired_txs().await; }.instrument(span).await } TransactionMsg::GetLogs(reply_handle) => { @@ -198,7 +192,7 @@ impl Process { let contents = pool .select( ledger, - ledger_params, + &ledger_params, selection_alg, soft_deadline_future, hard_deadline_future, diff --git a/jormungandr/src/fragment/selection.rs b/jormungandr/src/fragment/selection.rs index e5688209d8..cb2832355f 100644 --- a/jormungandr/src/fragment/selection.rs +++ b/jormungandr/src/fragment/selection.rs @@ -1,19 +1,15 @@ -use super::logs::Logs; -use super::pool::internal::Pool; +use super::{logs::Logs, pool::internal::Pool}; use crate::{ blockcfg::{ApplyBlockLedger, Contents, ContentsBuilder, LedgerParameters}, fragment::{Fragment, FragmentId}, }; -use chain_core::property::Serialize; -use jormungandr_lib::interfaces::{BlockDate, FragmentStatus}; - use async_trait::async_trait; +use chain_core::property::Serialize; use futures::{channel::oneshot::Receiver, future::Shared, prelude::*}; +use jormungandr_lib::interfaces::{BlockDate, FragmentStatus}; +use std::{error::Error, iter}; use tracing::{debug_span, Instrument}; -use std::error::Error; -use std::iter; - pub enum SelectionOutput { Commit { fragment_id: FragmentId }, RequestSmallerFee, @@ -207,8 +203,7 @@ impl FragmentSelectionAlgorithm for OldestFirst { "finished block creation with {} fragments left in the pool", pool.len() ); - return_to_pool.reverse(); - pool.return_to_pool(return_to_pool); + pool.insert_all(return_to_pool); FragmentSelectionResult { contents: contents_builder.into(), From 3269859cb6a3b15a53f30b3b56865639b0e0c5d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20Rosales?= Date: Tue, 5 Sep 2023 13:34:34 -0600 Subject: [PATCH 09/17] fix: needed for jormungandr-automation --- .../src/jormungandr/rest/raw.rs | 5 +---- .../src/jormungandr/verifier/fragment_log.rs | 14 ++++++-------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/testing/jormungandr-automation/src/jormungandr/rest/raw.rs b/testing/jormungandr-automation/src/jormungandr/rest/raw.rs index 1487cec6a0..7a303ab73b 100644 --- a/testing/jormungandr-automation/src/jormungandr/rest/raw.rs +++ b/testing/jormungandr-automation/src/jormungandr/rest/raw.rs @@ -239,10 +239,7 @@ impl RawRest { fn construct_headers(&self) -> HeaderMap { let mut headers = HeaderMap::new(); - headers.insert( - CONTENT_TYPE, - HeaderValue::from_static("application/octet-stream"), - ); + headers.insert(CONTENT_TYPE, HeaderValue::from_static("application/json")); headers } diff --git a/testing/jormungandr-automation/src/jormungandr/verifier/fragment_log.rs b/testing/jormungandr-automation/src/jormungandr/verifier/fragment_log.rs index 0102f42a79..c3e9753299 100644 --- a/testing/jormungandr-automation/src/jormungandr/verifier/fragment_log.rs +++ b/testing/jormungandr-automation/src/jormungandr/verifier/fragment_log.rs @@ -1,10 +1,8 @@ -use crate::jormungandr::MemPoolCheck; -use crate::jormungandr::{JormungandrRest, RestError}; -use chain_impl_mockchain::fragment::FragmentId; -use chain_impl_mockchain::key::Hash; -use jormungandr_lib::interfaces::FragmentRejectionReason; -use jormungandr_lib::interfaces::FragmentStatus; -use jormungandr_lib::interfaces::FragmentsProcessingSummary; +use crate::jormungandr::{JormungandrRest, MemPoolCheck, RestError}; +use chain_impl_mockchain::{fragment::FragmentId, key::Hash}; +use jormungandr_lib::interfaces::{ + FragmentRejectionReason, FragmentStatus, FragmentsProcessingSummary, +}; pub struct FragmentLogVerifier { rest: JormungandrRest, @@ -19,7 +17,7 @@ impl FragmentLogVerifier { assert_eq!( self.rest.fragment_logs().unwrap().len(), size, - "only 1 transaction should be in fragment log" + "only {size} transactions should be in fragment log" ); self } From 3cb16f00c2c02cf477f12b53e4a158141186de59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20Rosales?= Date: Tue, 5 Sep 2023 14:49:34 -0600 Subject: [PATCH 10/17] fix: mempool integraton test --- .../jormungandr-integration-tests/src/jormungandr/mempool.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/testing/jormungandr-integration-tests/src/jormungandr/mempool.rs b/testing/jormungandr-integration-tests/src/jormungandr/mempool.rs index a5d79dd4fc..014a3e9c49 100644 --- a/testing/jormungandr-integration-tests/src/jormungandr/mempool.rs +++ b/testing/jormungandr-integration-tests/src/jormungandr/mempool.rs @@ -544,7 +544,6 @@ fn pending_transaction_stats() { }, ); - let mut pending_size = 0; let mut pending_cnt = 0; for i in 0..10 { @@ -552,7 +551,6 @@ fn pending_transaction_stats() { .transaction(&alice, bob.address(), i.into()) .unwrap(); - pending_size += transaction.serialized_size(); pending_cnt += 1; let status = @@ -566,7 +564,7 @@ fn pending_transaction_stats() { pending_cnt as f64 / mempool_max_entries as f64, stats.mempool_usage_ratio ); - assert_eq!(pending_size, stats.mempool_total_size as usize); + assert_eq!(pending_cnt, stats.mempool_total_size as usize); } } From d322ab7fdc4bcc61beb11d6789b4f2850555ebe8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20Rosales?= Date: Tue, 5 Sep 2023 14:50:34 -0600 Subject: [PATCH 11/17] patch: Cargo manifest uses catalyst-fund9.1-dev branch --- Cargo.lock | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ Cargo.toml | 14 +++++++++++++ 2 files changed, 74 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index f83c84a346..61533126e4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6023,3 +6023,63 @@ dependencies = [ "cc", "libc", ] + +[[patch.unused]] +name = "cardano-legacy-address" +version = "0.1.1" +source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9.1-dev#efe089af522e424d1099407b6585efe042ad085f" + +[[patch.unused]] +name = "chain-addr" +version = "0.1.0" +source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9.1-dev#efe089af522e424d1099407b6585efe042ad085f" + +[[patch.unused]] +name = "chain-core" +version = "0.1.0" +source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9.1-dev#efe089af522e424d1099407b6585efe042ad085f" + +[[patch.unused]] +name = "chain-crypto" +version = "0.1.0" +source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9.1-dev#efe089af522e424d1099407b6585efe042ad085f" + +[[patch.unused]] +name = "chain-impl-mockchain" +version = "0.1.0" +source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9.1-dev#efe089af522e424d1099407b6585efe042ad085f" + +[[patch.unused]] +name = "chain-network" +version = "0.1.0" +source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9.1-dev#efe089af522e424d1099407b6585efe042ad085f" + +[[patch.unused]] +name = "chain-ser" +version = "0.1.0" +source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9.1-dev#efe089af522e424d1099407b6585efe042ad085f" + +[[patch.unused]] +name = "chain-storage" +version = "0.1.0" +source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9.1-dev#efe089af522e424d1099407b6585efe042ad085f" + +[[patch.unused]] +name = "chain-time" +version = "0.1.0" +source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9.1-dev#efe089af522e424d1099407b6585efe042ad085f" + +[[patch.unused]] +name = "chain-vote" +version = "0.1.0" +source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9.1-dev#efe089af522e424d1099407b6585efe042ad085f" + +[[patch.unused]] +name = "imhamt" +version = "0.1.0" +source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9.1-dev#efe089af522e424d1099407b6585efe042ad085f" + +[[patch.unused]] +name = "typed-bytes" +version = "0.1.0" +source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9.1-dev#efe089af522e424d1099407b6585efe042ad085f" diff --git a/Cargo.toml b/Cargo.toml index 79acbdabc3..915ba7b2de 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,3 +13,17 @@ members = [ "testing/hersir", "testing/thor", ] + +[patch.crates-io] +chain-core = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } +chain-addr = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } +chain-crypto = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } +chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } +chain-time = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } +chain-vote = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } +chain-network = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } +chain-ser = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } +chain-storage = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } +cardano-legacy-address = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } +typed-bytes = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } +imhamt = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } From 9e99b82f0d094bb8fd246aff18d53733fea24937 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20Rosales?= Date: Tue, 5 Sep 2023 15:30:32 -0600 Subject: [PATCH 12/17] deps: update Cargo.lock, pin chain-libs branch in individual crates --- Cargo.lock | 208 +++--------------- Cargo.toml | 14 -- explorer/Cargo.toml | 20 +- jcli/Cargo.toml | 16 +- jormungandr-lib/Cargo.toml | 22 +- jormungandr/Cargo.toml | 28 +-- modules/blockchain/Cargo.toml | 4 +- testing/hersir/Cargo.toml | 8 +- testing/jormungandr-automation/Cargo.toml | 18 +- .../jormungandr-integration-tests/Cargo.toml | 12 +- testing/loki/Cargo.toml | 8 +- testing/mjolnir/Cargo.toml | 14 +- testing/thor/Cargo.toml | 10 +- 13 files changed, 116 insertions(+), 266 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 61533126e4..6d8d1c05ec 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -394,28 +394,16 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" -[[package]] -name = "bitvec" -version = "0.20.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7774144344a4faa177370406a7ff5f1da24303817368584c6206c8303eb07848" -dependencies = [ - "funty 1.1.0", - "radium 0.6.2", - "tap", - "wyz 0.2.0", -] - [[package]] name = "bitvec" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1489fcb93a5bb47da0462ca93ad252ad6af2145cce58d10d46a83931ba9f016b" dependencies = [ - "funty 2.0.0", - "radium 0.7.0", + "funty", + "radium", "tap", - "wyz 0.5.0", + "wyz", ] [[package]] @@ -568,7 +556,7 @@ dependencies = [ [[package]] name = "cardano-legacy-address" version = "0.1.1" -source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9#1b01f0dbf9282102f394727b4f8637fe4ce1728e" +source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9.1-dev#efe089af522e424d1099407b6585efe042ad085f" dependencies = [ "cbor_event", "cryptoxide 0.4.2", @@ -639,7 +627,7 @@ dependencies = [ [[package]] name = "chain-addr" version = "0.1.0" -source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9#1b01f0dbf9282102f394727b4f8637fe4ce1728e" +source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9.1-dev#efe089af522e424d1099407b6585efe042ad085f" dependencies = [ "bech32 0.8.1", "chain-core", @@ -653,7 +641,7 @@ dependencies = [ [[package]] name = "chain-core" version = "0.1.0" -source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9#1b01f0dbf9282102f394727b4f8637fe4ce1728e" +source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9.1-dev#efe089af522e424d1099407b6585efe042ad085f" dependencies = [ "chain-ser", ] @@ -661,7 +649,7 @@ dependencies = [ [[package]] name = "chain-crypto" version = "0.1.0" -source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9#1b01f0dbf9282102f394727b4f8637fe4ce1728e" +source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9.1-dev#efe089af522e424d1099407b6585efe042ad085f" dependencies = [ "bech32 0.8.1", "cryptoxide 0.4.2", @@ -683,7 +671,7 @@ dependencies = [ [[package]] name = "chain-evm" version = "0.1.0" -source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9#1b01f0dbf9282102f394727b4f8637fe4ce1728e" +source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9.1-dev#efe089af522e424d1099407b6585efe042ad085f" dependencies = [ "aurora-bn", "base64", @@ -712,7 +700,7 @@ dependencies = [ [[package]] name = "chain-impl-mockchain" version = "0.1.0" -source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9#1b01f0dbf9282102f394727b4f8637fe4ce1728e" +source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9.1-dev#efe089af522e424d1099407b6585efe042ad085f" dependencies = [ "cardano-legacy-address", "chain-addr", @@ -744,7 +732,7 @@ dependencies = [ [[package]] name = "chain-network" version = "0.1.0" -source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9#1b01f0dbf9282102f394727b4f8637fe4ce1728e" +source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9.1-dev#efe089af522e424d1099407b6585efe042ad085f" dependencies = [ "async-trait", "chain-crypto", @@ -761,7 +749,7 @@ dependencies = [ [[package]] name = "chain-ser" version = "0.1.0" -source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9#1b01f0dbf9282102f394727b4f8637fe4ce1728e" +source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9.1-dev#efe089af522e424d1099407b6585efe042ad085f" dependencies = [ "thiserror", ] @@ -769,7 +757,7 @@ dependencies = [ [[package]] name = "chain-storage" version = "0.1.0" -source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9#1b01f0dbf9282102f394727b4f8637fe4ce1728e" +source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9.1-dev#efe089af522e424d1099407b6585efe042ad085f" dependencies = [ "criterion", "data-pile", @@ -782,7 +770,7 @@ dependencies = [ [[package]] name = "chain-time" version = "0.1.0" -source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9#1b01f0dbf9282102f394727b4f8637fe4ce1728e" +source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9.1-dev#efe089af522e424d1099407b6585efe042ad085f" dependencies = [ "chain-core", "chain-ser", @@ -794,9 +782,9 @@ dependencies = [ [[package]] name = "chain-vote" version = "0.1.0" -source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9#1b01f0dbf9282102f394727b4f8637fe4ce1728e" +source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9.1-dev#efe089af522e424d1099407b6585efe042ad085f" dependencies = [ - "cfg-if 0.1.10", + "cfg-if 1.0.0", "chain-core", "chain-crypto", "const_format", @@ -1396,7 +1384,7 @@ checksum = "11da94e443c60508eb62cf256243a64da87304c2802ac2528847f79d750007ef" dependencies = [ "crunchy", "fixed-hash", - "impl-codec 0.6.0", + "impl-codec", "impl-rlp", "impl-serde", "scale-info", @@ -1413,7 +1401,7 @@ dependencies = [ "ethereum-types", "hash-db", "hash256-std-hasher", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "rlp", "rlp-derive", "scale-info", @@ -1430,10 +1418,10 @@ checksum = "b2827b94c556145446fcce834ca86b7abf0c39a805883fe20e72c5bfdb5a0dc6" dependencies = [ "ethbloom", "fixed-hash", - "impl-codec 0.6.0", + "impl-codec", "impl-rlp", "impl-serde", - "primitive-types 0.11.1", + "primitive-types", "scale-info", "uint", ] @@ -1451,8 +1439,8 @@ dependencies = [ "evm-gasometer", "evm-runtime", "log", - "parity-scale-codec 3.1.2", - "primitive-types 0.11.1", + "parity-scale-codec", + "primitive-types", "rlp", "scale-info", "serde", @@ -1465,8 +1453,8 @@ version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d4537041d3a3438d59b2d01bd950ce89fb1ccb3cf21d9331193c10be12e849f" dependencies = [ - "parity-scale-codec 3.1.2", - "primitive-types 0.11.1", + "parity-scale-codec", + "primitive-types", "scale-info", "serde", ] @@ -1480,7 +1468,7 @@ dependencies = [ "environmental", "evm-core", "evm-runtime", - "primitive-types 0.11.1", + "primitive-types", ] [[package]] @@ -1492,7 +1480,7 @@ dependencies = [ "auto_impl", "environmental", "evm-core", - "primitive-types 0.11.1", + "primitive-types", "sha3", ] @@ -1696,12 +1684,6 @@ dependencies = [ "syn 0.15.44", ] -[[package]] -name = "funty" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" - [[package]] name = "funty" version = "2.0.0" @@ -2261,7 +2243,7 @@ dependencies = [ [[package]] name = "imhamt" version = "0.1.0" -source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9#1b01f0dbf9282102f394727b4f8637fe4ce1728e" +source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9.1-dev#efe089af522e424d1099407b6585efe042ad085f" dependencies = [ "proptest", "rustc_version", @@ -2269,22 +2251,13 @@ dependencies = [ "thiserror", ] -[[package]] -name = "impl-codec" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "161ebdfec3c8e3b52bf61c4f3550a1eea4f9579d10dc1b936f3171ebdcd6c443" -dependencies = [ - "parity-scale-codec 2.3.1", -] - [[package]] name = "impl-codec" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" dependencies = [ - "parity-scale-codec 3.1.2", + "parity-scale-codec", ] [[package]] @@ -3299,20 +3272,6 @@ dependencies = [ "url", ] -[[package]] -name = "parity-scale-codec" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "373b1a4c1338d9cd3d1fa53b3a11bdab5ab6bd80a20f7f7becd76953ae2be909" -dependencies = [ - "arrayvec", - "bitvec 0.20.4", - "byte-slice-cast", - "impl-trait-for-tuples", - "parity-scale-codec-derive 2.3.1", - "serde", -] - [[package]] name = "parity-scale-codec" version = "3.1.2" @@ -3320,25 +3279,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8b44461635bbb1a0300f100a841e571e7d919c81c73075ef5d152ffdb521066" dependencies = [ "arrayvec", - "bitvec 1.0.0", + "bitvec", "byte-slice-cast", "impl-trait-for-tuples", - "parity-scale-codec-derive 3.1.2", + "parity-scale-codec-derive", "serde", ] -[[package]] -name = "parity-scale-codec-derive" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1557010476e0595c9b568d16dcfb81b93cdeb157612726f5170d31aa707bed27" -dependencies = [ - "proc-macro-crate 1.1.0", - "proc-macro2 1.0.36", - "quote 1.0.15", - "syn 1.0.86", -] - [[package]] name = "parity-scale-codec-derive" version = "3.1.2" @@ -3635,17 +3582,6 @@ dependencies = [ "termtree", ] -[[package]] -name = "primitive-types" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05e4722c697a58a99d5d06a08c30821d7c082a4632198de1eaa5a6c22ef42373" -dependencies = [ - "fixed-hash", - "impl-codec 0.5.1", - "uint", -] - [[package]] name = "primitive-types" version = "0.11.1" @@ -3653,7 +3589,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e28720988bff275df1f51b171e1b2a18c30d194c4d2b61defdacecd625a5d94a" dependencies = [ "fixed-hash", - "impl-codec 0.6.0", + "impl-codec", "impl-rlp", "impl-serde", "scale-info", @@ -3739,14 +3675,14 @@ dependencies = [ [[package]] name = "proptest" version = "1.0.0" -source = "git+https://github.com/input-output-hk/proptest.git#38044d47b2e8eeab62408294aa9e78e393f13d6b" +source = "git+https://github.com/input-output-hk/proptest.git#270ea99959dc4c4e5076047d79a9654f5f0ac74a" dependencies = [ "bit-set", "bitflags", "byteorder", "lazy_static", "num-traits", - "primitive-types 0.10.1", + "primitive-types", "quick-error 2.0.1", "rand 0.8.5", "rand_chacha 0.3.1", @@ -3892,12 +3828,6 @@ dependencies = [ "proc-macro2 1.0.36", ] -[[package]] -name = "radium" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "643f8f41a8ebc4c5dc4515c82bb8abd397b527fc20fd681b7c011c2aee5d44fb" - [[package]] name = "radium" version = "0.7.0" @@ -4395,10 +4325,10 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21fe4ca2b2295d5519b364579162b8e18f4902f6c9e8a975e7d05e7ef63622f5" dependencies = [ - "bitvec 1.0.0", + "bitvec", "cfg-if 1.0.0", "derive_more", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "scale-info-derive", ] @@ -4705,7 +4635,7 @@ dependencies = [ [[package]] name = "sparse-array" version = "0.1.0" -source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9#1b01f0dbf9282102f394727b4f8637fe4ce1728e" +source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9.1-dev#efe089af522e424d1099407b6585efe042ad085f" [[package]] name = "spin" @@ -5466,7 +5396,7 @@ dependencies = [ [[package]] name = "typed-bytes" version = "0.1.0" -source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9#1b01f0dbf9282102f394727b4f8637fe4ce1728e" +source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9.1-dev#efe089af522e424d1099407b6585efe042ad085f" [[package]] name = "typenum" @@ -5900,12 +5830,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "wyz" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" - [[package]] name = "wyz" version = "0.5.0" @@ -6023,63 +5947,3 @@ dependencies = [ "cc", "libc", ] - -[[patch.unused]] -name = "cardano-legacy-address" -version = "0.1.1" -source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9.1-dev#efe089af522e424d1099407b6585efe042ad085f" - -[[patch.unused]] -name = "chain-addr" -version = "0.1.0" -source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9.1-dev#efe089af522e424d1099407b6585efe042ad085f" - -[[patch.unused]] -name = "chain-core" -version = "0.1.0" -source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9.1-dev#efe089af522e424d1099407b6585efe042ad085f" - -[[patch.unused]] -name = "chain-crypto" -version = "0.1.0" -source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9.1-dev#efe089af522e424d1099407b6585efe042ad085f" - -[[patch.unused]] -name = "chain-impl-mockchain" -version = "0.1.0" -source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9.1-dev#efe089af522e424d1099407b6585efe042ad085f" - -[[patch.unused]] -name = "chain-network" -version = "0.1.0" -source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9.1-dev#efe089af522e424d1099407b6585efe042ad085f" - -[[patch.unused]] -name = "chain-ser" -version = "0.1.0" -source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9.1-dev#efe089af522e424d1099407b6585efe042ad085f" - -[[patch.unused]] -name = "chain-storage" -version = "0.1.0" -source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9.1-dev#efe089af522e424d1099407b6585efe042ad085f" - -[[patch.unused]] -name = "chain-time" -version = "0.1.0" -source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9.1-dev#efe089af522e424d1099407b6585efe042ad085f" - -[[patch.unused]] -name = "chain-vote" -version = "0.1.0" -source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9.1-dev#efe089af522e424d1099407b6585efe042ad085f" - -[[patch.unused]] -name = "imhamt" -version = "0.1.0" -source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9.1-dev#efe089af522e424d1099407b6585efe042ad085f" - -[[patch.unused]] -name = "typed-bytes" -version = "0.1.0" -source = "git+https://github.com/input-output-hk/chain-libs.git?branch=catalyst-fund9.1-dev#efe089af522e424d1099407b6585efe042ad085f" diff --git a/Cargo.toml b/Cargo.toml index 915ba7b2de..79acbdabc3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,17 +13,3 @@ members = [ "testing/hersir", "testing/thor", ] - -[patch.crates-io] -chain-core = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } -chain-addr = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } -chain-crypto = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } -chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } -chain-time = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } -chain-vote = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } -chain-network = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } -chain-ser = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } -chain-storage = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } -cardano-legacy-address = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } -typed-bytes = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } -imhamt = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } diff --git a/explorer/Cargo.toml b/explorer/Cargo.toml index 587a8be897..5b8123add4 100644 --- a/explorer/Cargo.toml +++ b/explorer/Cargo.toml @@ -41,16 +41,16 @@ http-zipkin = "0.3.0" jormungandr-lib = {path = "../jormungandr-lib"} -cardano-legacy-address = {git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9"} -chain-addr = {git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9"} -chain-core = {git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9"} -chain-crypto = {git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9"} -chain-impl-mockchain = {git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9"} -chain-time = {git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9"} -chain-vote = {git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9"} -chain-ser = {git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9"} -chain-network = {git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9"} -imhamt = {git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9"} +cardano-legacy-address = {git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev"} +chain-addr = {git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev"} +chain-core = {git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev"} +chain-crypto = {git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev"} +chain-impl-mockchain = {git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev"} +chain-time = {git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev"} +chain-vote = {git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev"} +chain-ser = {git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev"} +chain-network = {git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev"} +imhamt = {git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev"} [features] default = [] diff --git a/jcli/Cargo.toml b/jcli/Cargo.toml index 7ebce6910c..b5e51566bc 100644 --- a/jcli/Cargo.toml +++ b/jcli/Cargo.toml @@ -24,13 +24,13 @@ bech32 = "0.8" hex = "0.4.2" rayon = "1.5" base64 = "0.13.0" -chain-core = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } -chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } -chain-addr = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } -chain-crypto = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } -chain-time = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } -chain-vote = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } -chain-evm = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", optional = true } +chain-core = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } +chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } +chain-addr = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } +chain-crypto = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } +chain-time = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } +chain-vote = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } +chain-evm = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev", optional = true } jormungandr-lib = { path = "../jormungandr-lib" } gtmpl = "0.6.0" ed25519-bip32 = "0.4.1" @@ -53,7 +53,7 @@ predicates = "2.0" quickcheck = "0.9" # FIXME required to work with quickcheck 0.9. Remove after migrating another crate or newer quickcheck rand07 = { package = "rand", version = "0.7" } -chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", features = [ "property-test-api" ] } +chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev", features = [ "property-test-api" ] } [build-dependencies] versionisator = "1.0.2" diff --git a/jormungandr-lib/Cargo.toml b/jormungandr-lib/Cargo.toml index 679dc84449..3e411d9b53 100644 --- a/jormungandr-lib/Cargo.toml +++ b/jormungandr-lib/Cargo.toml @@ -9,14 +9,14 @@ description = "Data structures and formats used by Jormungandr node API and conf [dependencies] serde = { version = "1.0", features = ["derive"] } serde_with = { version = "1.12", features = ["macros"] } -chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } -chain-addr = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } -chain-core = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } -chain-crypto = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } -chain-time = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9"} -chain-vote = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } -cardano-legacy-address = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } -typed-bytes = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } +chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } +chain-addr = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } +chain-core = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } +chain-crypto = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } +chain-time = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev"} +chain-vote = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } +cardano-legacy-address = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } +typed-bytes = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } rand = "0.8" rand_core = "0.6" rand_chacha = "0.3" @@ -35,9 +35,9 @@ quickcheck = "0.9" quickcheck_macros = "0.9" # FIXME required to work with quickcheck 0.9. Remove after migrating another crate or newer quickcheck rand07 = { package = "rand", version = "0.7" } -chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", features = [ "property-test-api" ] } -chain-addr = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", features = [ "property-test-api" ] } -chain-crypto = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", features = [ "property-test-api" ] } +chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev", features = [ "property-test-api" ] } +chain-addr = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev", features = [ "property-test-api" ] } +chain-crypto = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev", features = [ "property-test-api" ] } ed25519-bip32 = "0.4.1" serde_yaml = "0.8" serde_json = "1.0" diff --git a/jormungandr/Cargo.toml b/jormungandr/Cargo.toml index 47c366ea6e..fe996d17e1 100644 --- a/jormungandr/Cargo.toml +++ b/jormungandr/Cargo.toml @@ -12,17 +12,17 @@ Midgard Serpent edition = "2021" [dependencies] -chain-addr = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } -chain-core = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } -chain-crypto = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } -chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } -chain-network = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } -chain-storage = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } -chain-time = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } -chain-vote = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } -chain-evm = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", optional = true } -cardano-legacy-address = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } -imhamt = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } +chain-addr = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } +chain-core = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } +chain-crypto = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } +chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } +chain-network = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } +chain-storage = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } +chain-time = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } +chain-vote = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } +chain-evm = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev", optional = true } +cardano-legacy-address = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } +imhamt = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } arc-swap = "^1.5.0" async-trait = "0.1.51" @@ -69,9 +69,9 @@ reqwest = { version = "0.11", default-features = false, features = ["rustls-tls tokio = { version = "^1.15", features = ["full"] } quickcheck = "0.9" quickcheck_macros = "0.9" -chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", features = [ "property-test-api" ] } -chain-addr = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", features = [ "property-test-api" ] } -chain-crypto = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", features = [ "property-test-api" ] } +chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev", features = [ "property-test-api" ] } +chain-addr = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev", features = [ "property-test-api" ] } +chain-crypto = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev", features = [ "property-test-api" ] } criterion = { version = "0.3", features = ["html_reports", "async_tokio"] } [[bench]] diff --git a/modules/blockchain/Cargo.toml b/modules/blockchain/Cargo.toml index d1f0b9bfa1..7b56bde388 100644 --- a/modules/blockchain/Cargo.toml +++ b/modules/blockchain/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Nicolas Di Prima "] edition = "2021" [dependencies] -chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } -chain-time = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9"} +chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } +chain-time = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev"} thiserror = "1.0.30" lru = "0.7" diff --git a/testing/hersir/Cargo.toml b/testing/hersir/Cargo.toml index 70b838532b..37824f56cb 100644 --- a/testing/hersir/Cargo.toml +++ b/testing/hersir/Cargo.toml @@ -10,10 +10,10 @@ edition = "2021" assert_fs = "1.0" custom_debug = "0.5" ctrlc = "3.2.1" -chain-core = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } -chain-crypto = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", features = [ "property-test-api" ] } -chain-addr = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", features = [ "property-test-api" ] } -chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } +chain-core = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } +chain-crypto = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev", features = [ "property-test-api" ] } +chain-addr = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev", features = [ "property-test-api" ] } +chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } indicatif = "0.15" jormungandr-automation = { path = "../jormungandr-automation" } jormungandr-lib = { path = "../../jormungandr-lib" } diff --git a/testing/jormungandr-automation/Cargo.toml b/testing/jormungandr-automation/Cargo.toml index 75475fcfc5..5cb44c5888 100644 --- a/testing/jormungandr-automation/Cargo.toml +++ b/testing/jormungandr-automation/Cargo.toml @@ -17,15 +17,15 @@ bech32 = "0.8" bytesize = "1.1.0" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", features = [ "property-test-api" ] } -chain-addr = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", features = [ "property-test-api" ] } -chain-core = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } -chain-crypto = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", features = [ "property-test-api" ] } -chain-time = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } -chain-storage = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", features = ["with-bench"] } -chain-vote = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } -cardano-legacy-address = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } -typed-bytes = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } +chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev", features = [ "property-test-api" ] } +chain-addr = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev", features = [ "property-test-api" ] } +chain-core = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } +chain-crypto = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev", features = [ "property-test-api" ] } +chain-time = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } +chain-storage = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev", features = ["with-bench"] } +chain-vote = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } +cardano-legacy-address = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } +typed-bytes = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } jormungandr-lib = { path = "../../jormungandr-lib" } jortestkit = { git = "https://github.com/input-output-hk/jortestkit.git", branch = "master" } rand = "0.8" diff --git a/testing/jormungandr-integration-tests/Cargo.toml b/testing/jormungandr-integration-tests/Cargo.toml index d48dbf356d..f9e366c1ec 100644 --- a/testing/jormungandr-integration-tests/Cargo.toml +++ b/testing/jormungandr-integration-tests/Cargo.toml @@ -12,12 +12,12 @@ tokio = { version = "1.15", features = ["macros", "time"] } futures = "0.3.21" base64 = "0.13" hex = "0.4.2" -chain-addr = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } -chain-core = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } -chain-crypto = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } -chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } -chain-time = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } -chain-vote = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } +chain-addr = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } +chain-core = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } +chain-crypto = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } +chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } +chain-time = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } +chain-vote = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } jormungandr-lib = { path = "../../jormungandr-lib" } hersir = { path = "../hersir" } loki = { path = "../loki" } diff --git a/testing/loki/Cargo.toml b/testing/loki/Cargo.toml index c1b84db191..d1409a0d29 100644 --- a/testing/loki/Cargo.toml +++ b/testing/loki/Cargo.toml @@ -7,10 +7,10 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -chain-addr = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", features = [ "property-test-api" ] } -chain-crypto = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", features = [ "property-test-api" ] } -chain-core = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } -chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } +chain-addr = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev", features = [ "property-test-api" ] } +chain-crypto = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev", features = [ "property-test-api" ] } +chain-core = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } +chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } jormungandr-automation = { path = "../jormungandr-automation" } jormungandr-lib = { path = "../../jormungandr-lib" } thor = {path = "../thor"} diff --git a/testing/mjolnir/Cargo.toml b/testing/mjolnir/Cargo.toml index 1b4cf857a8..397c01e57d 100644 --- a/testing/mjolnir/Cargo.toml +++ b/testing/mjolnir/Cargo.toml @@ -16,13 +16,13 @@ thiserror = "1.0" structopt = "^0.3" assert_fs = "1.0" indicatif = "0.15" -chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", features = [ "property-test-api" ] } -chain-addr = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", features = [ "property-test-api" ] } -chain-core = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } -chain-crypto = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", features = [ "property-test-api" ] } -chain-time = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } -chain-storage = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", features = ["with-bench"] } -chain-vote = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } +chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev", features = [ "property-test-api" ] } +chain-addr = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev", features = [ "property-test-api" ] } +chain-core = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } +chain-crypto = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev", features = [ "property-test-api" ] } +chain-time = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } +chain-storage = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev", features = ["with-bench"] } +chain-vote = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } tokio = { version = "1.15", features = ["macros"] } thor = { path = "../thor" } loki = { path = "../loki" } diff --git a/testing/thor/Cargo.toml b/testing/thor/Cargo.toml index e055e58529..ea6acd93f2 100644 --- a/testing/thor/Cargo.toml +++ b/testing/thor/Cargo.toml @@ -10,12 +10,12 @@ jcli = { path = "../../jcli" } jormungandr-lib = { path = "../../jormungandr-lib" } jormungandr-automation = { path = "../jormungandr-automation" } jortestkit = { git = "https://github.com/input-output-hk/jortestkit.git", branch = "master" } -chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", features = [ "property-test-api" ] } -chain-addr = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", features = [ "property-test-api" ] } -chain-crypto = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9", features = [ "property-test-api" ] } -chain-core = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } +chain-impl-mockchain = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev", features = [ "property-test-api" ] } +chain-addr = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev", features = [ "property-test-api" ] } +chain-crypto = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev", features = [ "property-test-api" ] } +chain-core = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } assert_fs = "1.0" -chain-vote = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9" } +chain-vote = { git = "https://github.com/input-output-hk/chain-libs.git", branch = "catalyst-fund9.1-dev" } serde = { version = "1.0", features = ["derive"] } cocoon = { git = "https://github.com/dkijania/cocoon.git", rev = "1dfd975c3f0720d51c56fb297e7c92467bc3448a" } dirs = "4.0.0" From 96a3a784cc9df7395a1135ba5259dccb62da0345 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20Rosales?= Date: Tue, 5 Sep 2023 16:48:45 -0600 Subject: [PATCH 13/17] version: update jormungandr to v0.15.1 --- Cargo.lock | 2 +- jormungandr/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6d8d1c05ec..2bb95ffdd6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2406,7 +2406,7 @@ dependencies = [ [[package]] name = "jormungandr" -version = "0.15.0" +version = "0.15.1" dependencies = [ "arc-swap", "async-trait", diff --git a/jormungandr/Cargo.toml b/jormungandr/Cargo.toml index fe996d17e1..18779ce920 100644 --- a/jormungandr/Cargo.toml +++ b/jormungandr/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "jormungandr" -version = "0.15.0" +version = "0.15.1" authors = [ "dev@iohk.io" ] license = "MIT OR Apache-2.0" repository = "https://github.com/input-output-hk/jormungandr" From 31afbd3091ea42d9a234060dafcada3a2c73d9b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20Rosales?= Date: Tue, 5 Sep 2023 16:56:13 -0600 Subject: [PATCH 14/17] version: update other crates to v0.15.1 --- Cargo.lock | 8 ++++---- jcli/Cargo.toml | 2 +- jormungandr-lib/Cargo.toml | 2 +- testing/jormungandr-automation/Cargo.toml | 2 +- testing/jormungandr-integration-tests/Cargo.toml | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2bb95ffdd6..11914a18e9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2359,7 +2359,7 @@ checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" [[package]] name = "jcli" -version = "0.15.0" +version = "0.15.1" dependencies = [ "assert_fs", "base64", @@ -2468,7 +2468,7 @@ dependencies = [ [[package]] name = "jormungandr-automation" -version = "0.15.0" +version = "0.15.1" dependencies = [ "assert_cmd", "assert_fs", @@ -2531,7 +2531,7 @@ dependencies = [ [[package]] name = "jormungandr-integration-tests" -version = "0.15.0" +version = "0.15.1" dependencies = [ "assert_cmd", "assert_fs", @@ -2582,7 +2582,7 @@ dependencies = [ [[package]] name = "jormungandr-lib" -version = "0.15.0" +version = "0.15.1" dependencies = [ "base64", "bech32 0.8.1", diff --git a/jcli/Cargo.toml b/jcli/Cargo.toml index b5e51566bc..9e34b52a38 100644 --- a/jcli/Cargo.toml +++ b/jcli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "jcli" -version = "0.15.0" +version = "0.15.1" authors = [ "dev@iohk.io" ] license = "MIT OR Apache-2.0" repository = "https://github.com/input-output-hk/jormungandr" diff --git a/jormungandr-lib/Cargo.toml b/jormungandr-lib/Cargo.toml index 3e411d9b53..21b1b46613 100644 --- a/jormungandr-lib/Cargo.toml +++ b/jormungandr-lib/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "jormungandr-lib" -version = "0.15.0" +version = "0.15.1" authors = ["dev@iohk.io"] edition = "2021" diff --git a/testing/jormungandr-automation/Cargo.toml b/testing/jormungandr-automation/Cargo.toml index 5cb44c5888..039b79ea4b 100644 --- a/testing/jormungandr-automation/Cargo.toml +++ b/testing/jormungandr-automation/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "jormungandr-automation" -version = "0.15.0" +version = "0.15.1" authors = ["Nicolas Di Prima "] edition = "2021" diff --git a/testing/jormungandr-integration-tests/Cargo.toml b/testing/jormungandr-integration-tests/Cargo.toml index f9e366c1ec..d3c9ab2792 100644 --- a/testing/jormungandr-integration-tests/Cargo.toml +++ b/testing/jormungandr-integration-tests/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "jormungandr-integration-tests" -version = "0.15.0" +version = "0.15.1" authors = [ "dev@iohk.io" ] edition = "2021" From f657fe94ae80d024d97fab94a1ab9f8eb063b611 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20Rosales?= Date: Tue, 12 Sep 2023 10:26:10 -0600 Subject: [PATCH 15/17] deploy: add earthfile to build docker container fix: remove warnings and unused imports --- Earthfile | 105 ++++++++++++++++++++++++++++ entry.sh | 114 +++++++++++++++++++++++++++++++ jormungandr/src/fragment/pool.rs | 7 +- 3 files changed, 222 insertions(+), 4 deletions(-) create mode 100644 Earthfile create mode 100644 entry.sh diff --git a/Earthfile b/Earthfile new file mode 100644 index 0000000000..6bbf7dd592 --- /dev/null +++ b/Earthfile @@ -0,0 +1,105 @@ +# Set the Earthly version to 0.7 +VERSION 0.7 +FROM debian:stable-slim + +rust-toolchain: + FROM rust:1.70-slim-bullseye + RUN rustup component add rustfmt + +# Installs Cargo chef +install-chef: + FROM +rust-toolchain + RUN cargo install --debug cargo-chef + +# Prepares the local cache +prepare-cache: + FROM +install-chef + COPY --dir jormungandr jormungandr-lib jcli explorer modules testing . + COPY --dir Cargo.lock Cargo.toml . + RUN cargo chef prepare + SAVE ARTIFACT recipe.json + SAVE IMAGE --cache-hint + +# Builds the local cache +build-cache: + FROM +install-chef + COPY +prepare-cache/recipe.json ./ + + # Install build dependencies + RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + build-essential \ + libssl-dev \ + libpq-dev \ + libsqlite3-dev \ + pkg-config \ + protobuf-compiler + + RUN cargo chef cook --release + SAVE ARTIFACT target + SAVE ARTIFACT $CARGO_HOME cargo_home + SAVE IMAGE --cache-hint + +# This is the default builder that all other builders should inherit from +builder: + FROM +rust-toolchain + + WORKDIR /src + + # Install build dependencies + RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + build-essential \ + libssl-dev \ + libpq-dev \ + libsqlite3-dev \ + pkg-config \ + protobuf-compiler + COPY --dir jormungandr jormungandr-lib jcli explorer modules testing . + COPY --dir Cargo.lock Cargo.toml . + COPY +build-cache/cargo_home $CARGO_HOME + COPY +build-cache/target target + SAVE ARTIFACT /src + +build: + FROM +builder + + COPY --dir jormungandr jormungandr-lib jcli explorer modules testing . + COPY Cargo.toml Cargo.lock ./ + + RUN cargo build --locked --release -p jormungandr -p jcli -p explorer + + SAVE ARTIFACT /src/target/release/explorer explorer + SAVE ARTIFACT /src/target/release/jcli jcli + SAVE ARTIFACT /src/target/release/jormungandr jormungandr + SAVE IMAGE --cache-hint + +docker: + FROM debian:stable-slim + + WORKDIR /app + ARG tag="latest" + ARG registry + + # Install voting-node system dependencies + RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + libpq5 \ + openssh-client \ + build-essential \ + libxml2-dev \ + libxslt-dev \ + zlib1g-dev + + ## apt cleanup + RUN apt-get clean && \ + rm -rf /var/lib/apt/lists/* + + COPY +build/jormungandr . + COPY +build/jcli . + COPY entry.sh . + RUN chmod +x entry.sh + + ENV BIN_PATH=/app/jormungandr + ENTRYPOINT ["/app/entry.sh"] + SAVE IMAGE --push ${registry}jormungandr:$tag diff --git a/entry.sh b/entry.sh new file mode 100644 index 0000000000..243b4c662e --- /dev/null +++ b/entry.sh @@ -0,0 +1,114 @@ +#!/bin/bash + +# Enable strict mode +set +x +set -o errexit +set -o pipefail +set -o nounset +set -o functrace +set -o errtrace +set -o monitor +set -o posix +shopt -s dotglob + +echo ">>> Entering entrypoint script..." +# Verify the storage path exists +if [[ ! -d "$STORAGE_PATH" ]]; then + echo "ERROR: storage path does not exist at: $STORAGE_PATH"; + echo ">>> Aborting..." + exit 1 +fi +# Verify config is present +if [[ ! -f "$NODE_CONFIG_PATH" ]]; then + echo "ERROR: node configuration is absent at: $NODE_CONFIG_PATH" + echo ">>> Aborting..." + exit 1 +fi +# Verify genesis block is present +if [[ ! -f "$GENESIS_PATH" ]]; then + echo "ERROR: genesis block is absent at: $GENESIS_PATH" + echo ">>> Aborting..." + exit 1 +fi +# Allow overriding jormungandr binary +if [[ ! -f "$BIN_PATH" ]]; then + echo "ERROR: path to jormungandr binary is absent at: $BIN_PATH" + echo ">>> Aborting..." + exit 1 +fi +echo ">>> Using the following parameters:" +echo "Storage path: $STORAGE_PATH" +echo "Node config: $NODE_CONFIG_PATH" +echo "Genesis block: $GENESIS_PATH" +echo "Binary path: $BIN_PATH" +args=() +args+=("--storage" "$STORAGE_PATH") +args+=("--config" "$NODE_CONFIG_PATH") +args+=("--genesis-block" "$GENESIS_PATH") +if [[ -n "${LEADER:-}" ]]; then + echo ">>> Configuring node as leader..." + # shellcheck disable=SC2153 + if [[ ! -f "$BFT_PATH" ]]; then + echo "ERROR: BFT is absent at: $BFT_PATH" + echo ">>> Aborting..." + exit 1 + fi + echo ">>> Using BFT at: $BFT_PATH" + args+=("--secret" "$BFT_PATH") +fi +# Nodes will fail to start if they cannot resolve the domain names of +# their respective peers. If domains are used for peers, it's necessary +# to wait for them to resolve first before starting the node. +if [[ -n "${DNS_PEERS:-}" ]]; then + for PEER in $DNS_PEERS + do + while ! nslookup "$PEER"; do + echo ">>> Waiting for $PEER to be resolvable..." + sleep 1 + done + echo "Successfully resolved $PEER" + done +fi +# Allows resetting our footprint in persistent storage +if [[ -f "$STORAGE_PATH/reset" ]]; then + echo ">>> Reset file detected at $STORAGE_PATH/reset" + rm -rf "$STORAGE_PATH/reset" + if [[ -d "$STORAGE_PATH/fragments" ]]; then + echo ">>> Deleting $STORAGE_PATH/fragments" + rm -rf "$STORAGE_PATH/fragments" + fi + if [[ -d "$STORAGE_PATH/permanent" ]]; then + echo ">>> Deleting $STORAGE_PATH/permanent" + rm -rf "$STORAGE_PATH/permanent" + fi + if [[ -d "$STORAGE_PATH/volatile" ]]; then + echo ">>> Deleting $STORAGE_PATH/volatile" + rm -rf "$STORAGE_PATH/volatile" + fi + echo ">>> Reset complete" +fi + +# Define the command to be executed +ARGS="${args[*]}" +EXTRA_ARGS=$* +CMD="$BIN_PATH $ARGS $EXTRA_ARGS" +echo ">>> Executing command: $CMD" + +# Wait for DEBUG_SLEEP seconds if the DEBUG_SLEEP environment variable is set +if [ -n "${DEBUG_SLEEP:-}" ]; then + echo "DEBUG_SLEEP is set to $DEBUG_SLEEP. Sleeping..." + sleep "$DEBUG_SLEEP" +fi + +echo "Starting node..." +# Expand the command with arguments and capture the exit code +set +e +eval "$CMD" +EXIT_CODE=$? +set -e + +# If the exit code is 0, the executable returned successfully +if [ $EXIT_CODE -ne 0 ]; then + echo "Error: jormungandr returned with exit code $EXIT_CODE" + exit 1 +fi diff --git a/jormungandr/src/fragment/pool.rs b/jormungandr/src/fragment/pool.rs index 811d086fb7..b2cbe02614 100644 --- a/jormungandr/src/fragment/pool.rs +++ b/jormungandr/src/fragment/pool.rs @@ -1,6 +1,6 @@ use crate::{ blockcfg::{ApplyBlockLedger, LedgerParameters}, - blockchain::{Ref, Tip}, + blockchain::Tip, fragment::{ selection::{ FragmentSelectionAlgorithm, FragmentSelectionAlgorithmParams, FragmentSelectionResult, @@ -13,9 +13,7 @@ use crate::{ utils::async_msg::MessageBox, }; use chain_core::{packer::Codec, property::Serialize}; -use chain_impl_mockchain::{ - block::BlockDate, fragment::Contents, setting::Settings, transaction::Transaction, -}; +use chain_impl_mockchain::{block::BlockDate, fragment::Contents, transaction::Transaction}; use futures::channel::mpsc::SendError; use futures::sink::SinkExt; use jormungandr_lib::{ @@ -44,6 +42,7 @@ pub struct Pool { pool: internal::Pool, network_msg_box: MessageBox, persistent_log: Option>, + #[allow(dead_code)] tip: Tip, metrics: Metrics, } From 478cabc4477c6f2ebcc71fd24561ecab55c0a9d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20Rosales?= Date: Wed, 1 Nov 2023 11:09:27 -0600 Subject: [PATCH 16/17] feat: add prometheus-metrics to default features --- jormungandr/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jormungandr/Cargo.toml b/jormungandr/Cargo.toml index 18779ce920..bd3f306906 100644 --- a/jormungandr/Cargo.toml +++ b/jormungandr/Cargo.toml @@ -87,7 +87,7 @@ libc = "0.2.124" nix = "0.23.0" [features] -default = ["codegen-rustfmt"] +default = ["codegen-rustfmt", "prometheus-metrics"] with-bench = [] codegen-rustfmt = ["chain-network/codegen-rustfmt"] integration-test = [] From 458547566f0d4732747201c562f3a99308d91997 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20Rosales?= Date: Wed, 1 Nov 2023 11:10:54 -0600 Subject: [PATCH 17/17] feat: set default values to 0 in prometheus metrics that need to be initialized --- jormungandr/src/metrics/backends/prometheus_exporter.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/jormungandr/src/metrics/backends/prometheus_exporter.rs b/jormungandr/src/metrics/backends/prometheus_exporter.rs index 21bb5406ff..aab5a639c5 100644 --- a/jormungandr/src/metrics/backends/prometheus_exporter.rs +++ b/jormungandr/src/metrics/backends/prometheus_exporter.rs @@ -80,11 +80,13 @@ impl Default for Prometheus { let tx_recv_cnt = IntCounter::new("txRecvCnt", "txRecvCnt").unwrap(); registry.register(Box::new(tx_recv_cnt.clone())).unwrap(); let mempool_usage_ratio = Gauge::new("mempoolUsageRatio", "mempoolUsageRatio").unwrap(); + mempool_usage_ratio.set(0f64); registry .register(Box::new(mempool_usage_ratio.clone())) .unwrap(); let mempool_size_bytes_total = UIntGauge::new("mempoolSizeBytesTotal", "mempoolSizeBytesTotal").unwrap(); + mempool_size_bytes_total.set(0); registry .register(Box::new(mempool_size_bytes_total.clone())) .unwrap(); @@ -99,15 +101,18 @@ impl Default for Prometheus { let block_recv_cnt = IntCounter::new("blockRecvCnt", "blockRecvCnt").unwrap(); registry.register(Box::new(block_recv_cnt.clone())).unwrap(); let peer_connected_cnt = UIntGauge::new("peerConnectedCnt", "peerConnectedCnt").unwrap(); + peer_connected_cnt.set(0); registry .register(Box::new(peer_connected_cnt.clone())) .unwrap(); let peer_quarantined_cnt = UIntGauge::new("peerQuarantinedCnt", "peerQuarantinedCnt").unwrap(); + peer_quarantined_cnt.set(0); registry .register(Box::new(peer_quarantined_cnt.clone())) .unwrap(); let peer_available_cnt = UIntGauge::new("peerAvailableCnt", "peerAvailableCnt").unwrap(); + peer_available_cnt.set(0); registry .register(Box::new(peer_available_cnt.clone())) .unwrap();