Repository: mintlayer/mintlayer-core
Pull request #704 (2023-02-15 15:33:06)

Specify Rust version in Cargo.toml
Nail down the minimal supported rust compiler version and edition.


Patch:
diff --git a/Cargo.toml b/Cargo.toml
index b04887e80..852f02bd2 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -79,6 +79,10 @@ serialization = { path = "serialization"}
 storage = { path = "storage"}
 utxo = { path = "utxo"}
 
+[workspace.package]
+edition = "2021"
+rust-version = "1.67"
+
 [workspace.dependencies]
 async-trait = "0.1"
 futures = "0.3"
diff --git a/accounting/Cargo.toml b/accounting/Cargo.toml
index 7578be75d..2f512e46c 100644
--- a/accounting/Cargo.toml
+++ b/accounting/Cargo.toml
@@ -2,7 +2,8 @@
 name = "accounting"
 license = "MIT"
 version = "0.1.0"
-edition = "2021"
+edition.workspace = true
+rust-version.workspace = true
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
 
diff --git a/blockprod/Cargo.toml b/blockprod/Cargo.toml
index 5570c3252..6bab77c2e 100644
--- a/blockprod/Cargo.toml
+++ b/blockprod/Cargo.toml
@@ -1,7 +1,8 @@
 [package]
 name = "blockprod"
 version = "0.1.0"
-edition = "2021"
+edition.workspace = true
+rust-version.workspace = true
 license = "MIT"
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
diff --git a/chainstate/Cargo.toml b/chainstate/Cargo.toml
index a44e37b5c..79464ef66 100644
--- a/chainstate/Cargo.toml
+++ b/chainstate/Cargo.toml
@@ -1,5 +1,6 @@
 [package]
-edition = "2021"
+edition.workspace = true
+rust-version.workspace = true
 license = "MIT"
 name = "chainstate"
 version = "0.1.0"
diff --git a/chainstate/launcher/Cargo.toml b/chainstate/launcher/Cargo.toml
index ed6167716..98f9552ee 100644
--- a/chainstate/launcher/Cargo.toml
+++ b/chainstate/launcher/Cargo.toml
@@ -2,7 +2,8 @@
 name = "chainstate-launcher"
 license = "MIT"
 version = "0.1.0"
-edition = "2021"
+edition.workspace = true
+rust-version.workspace = true
 
 [dependencies]
 
diff --git a/chainstate/storage/Cargo.toml b/chainstate/storage/Cargo.toml
index 0c06ec544..d207b0947 100644
--- a/chainstate/storage/Cargo.toml
+++ b/chainstate/storage/Cargo.toml
@@ -1,7 +1,8 @@
 [package]
 name = "chainstate-storage"
 version = "0.1.0"
-edition = "2021"
+edition.workspace = true
+rust-version.workspace = true
 license = "MIT"
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
diff --git a/chainstate/tx-verifier/Cargo.toml b/chainstate/tx-verifier/Cargo.toml
index d58382ed2..995bd9830 100644
--- a/chainstate/tx-verifier/Cargo.toml
+++ b/chainstate/tx-verifier/Cargo.toml
@@ -1,7 +1,8 @@
 [package]
 name = "tx-verifier"
 version = "0.1.0"
-edition = "2021"
+edition.workspace = true
+rust-version.workspace = true
 license = "MIT"
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
diff --git a/chainstate/types/Cargo.toml b/chainstate/types/Cargo.toml
index 304fdb155..b764a656d 100644
--- a/chainstate/types/Cargo.toml
+++ b/chainstate/types/Cargo.toml
@@ -1,7 +1,8 @@
 [package]
 name = "chainstate-types"
 version = "0.1.0"
-edition = "2021"
+edition.workspace = true
+rust-version.workspace = true
 license = "MIT"
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
diff --git a/common/Cargo.toml b/common/Cargo.toml
index 36306264e..0a3d01041 100644
--- a/common/Cargo.toml
+++ b/common/Cargo.toml
@@ -1,7 +1,8 @@
 [package]
 name = "common"
 version = "0.1.0"
-edition = "2021"
+edition.workspace = true
+rust-version.workspace = true
 license = "MIT"
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
diff --git a/consensus/Cargo.toml b/consensus/Cargo.toml
index 8ed775f14..5ad3e883d 100644
--- a/consensus/Cargo.toml
+++ b/consensus/Cargo.toml
@@ -1,5 +1,6 @@
 [package]
-edition = "2021"
+edition.workspace = true
+rust-version.workspace = true
 license = "MIT"
 name = "consensus"
 version = "0.1.0"
diff --git a/crypto/Cargo.toml b/crypto/Cargo.toml
index 63d02549e..2025dee72 100644
--- a/crypto/Cargo.toml
+++ b/crypto/Cargo.toml
@@ -1,7 +1,8 @@
 [package]
 name = "crypto"
 version = "0.1.0"
-edition = "2021"
+edition.workspace = true
+rust-version.workspace = true
 license = "MIT"
 authors = ["Samer Afach <samer.afach@mintlayer.org>", "Ben Marsh <benjamin.marsh@mintlayer.org>", "Enrico Rubboli <enrico.rubboli@mintlayer.org>"]
 
diff --git a/dns_server/Cargo.toml b/dns_server/Cargo.toml
index 607c22327..46ce1e414 100644
--- a/dns_server/Cargo.toml
+++ b/dns_server/Cargo.toml
@@ -1,7 +1,8 @@
 [package]
 name = "dns_server"
 version = "0.1.0"
-edition = "2021"
+edition.workspace = true
+rust-version.workspace = true
 license = "MIT"
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
diff --git a/logging/Cargo.toml b/logging/Cargo.toml
index 5edd4b408..e1e27751e 100644
--- a/logging/Cargo.toml
+++ b/logging/Cargo.toml
@@ -1,7 +1,8 @@
 [package]
 name = "logging"
 version = "0.1.0"
-edition = "2021"
+edition.workspace = true
+rust-version.workspace = true
 license = "MIT"
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
diff --git a/mempool/Cargo.toml b/mempool/Cargo.toml
index c0e98475f..152ab2dd6 100644
--- a/mempool/Cargo.toml
+++ b/mempool/Cargo.toml
@@ -1,7 +1,8 @@
 [package]
 name = "mempool"
 version = "0.1.0"
-edition = "2021"
+edition.workspace = true
+rust-version.workspace = true
 license = "MIT"
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
diff --git a/node/Cargo.toml b/node/Cargo.toml
index e93991aff..8ca084314 100644
--- a/node/Cargo.toml
+++ b/node/Cargo.toml
@@ -1,7 +1,8 @@
 [package]
 name = "node"
 version = "0.1.0"
-edition = "2021"
+edition.workspace = true
+rust-version.workspace = true
 license = "MIT"
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
diff --git a/p2p/Cargo.toml b/p2p/Cargo.toml
index c70e652f4..1196cc25e 100644
--- a/p2p/Cargo.toml
+++ b/p2p/Cargo.toml
@@ -1,7 +1,8 @@
 [package]
 name = "p2p"
 version = "0.1.0"
-edition = "2021"
+edition.workspace = true
+rust-version.workspace = true
 license = "MIT"
 
 [features]
diff --git a/pos_accounting/Cargo.toml b/pos_accounting/Cargo.toml
index 088ddbf6b..13266197c 100644
--- a/pos_accounting/Cargo.toml
+++ b/pos_accounting/Cargo.toml
@@ -2,7 +2,8 @@
 name = "pos_accounting"
 license = "MIT"
 version = "0.1.0"
-edition = "2021"
+edition.workspace = true
+rust-version.workspace = true
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
 
diff --git a/rpc/Cargo.toml b/rpc/Cargo.toml
index 68a853e71..b413d6f9b 100644
--- a/rpc/Cargo.toml
+++ b/rpc/Cargo.toml
@@ -1,7 +1,8 @@
 [package]
 name = "rpc"
 version = "0.1.0"
-edition = "2021"
+edition.workspace = true
+rust-version.workspace = true
 license = "MIT"
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
diff --git a/script/Cargo.toml b/script/Cargo.toml
index dcba2c715..5099dfa5e 100644
--- a/script/Cargo.toml
+++ b/script/Cargo.toml
@@ -1,7 +1,8 @@
 [package]
 name = "script"
 version = "0.1.0"
-edition = "2021"
+edition.workspace = true
+rust-version.workspace = true
 license = "MIT"
 
 [dependencies]
diff --git a/serialization/Cargo.toml b/serialization/Cargo.toml
index c914f26e9..2e15e65d3 100644
--- a/serialization/Cargo.toml
+++ b/serialization/Cargo.toml
@@ -1,7 +1,8 @@
 [package]
 name = "serialization"
 version = "0.1.0"
-edition = "2021"
+edition.workspace = true
+rust-version.workspace = true
 license = "MIT"
 
 [dependencies]
diff --git a/serialization/core/Cargo.toml b/serialization/core/Cargo.toml
index ae6f3e283..c51940687 100644
--- a/serialization/core/Cargo.toml
+++ b/serialization/core/Cargo.toml
@@ -1,7 +1,8 @@
 [package]
 name = "serialization-core"
 version = "0.1.0"
-edition = "2021"
+edition.workspace = true
+rust-version.workspace = true
 license = "MIT"
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
diff --git a/serialization/tagged/Cargo.toml b/serialization/tagged/Cargo.toml
index 7b604bd63..c4da0d296 100644
--- a/serialization/tagged/Cargo.toml
+++ b/serialization/tagged/Cargo.toml
@@ -1,7 +1,8 @@
 [package]
 name = "serialization-tagged"
 version = "0.1.0"
-edition = "2021"
+edition.workspace = true
+rust-version.workspace = true
 license = "MIT"
 
 [dependencies]
diff --git a/serialization/tagged/derive/Cargo.toml b/serialization/tagged/derive/Cargo.toml
index cf2da8c95..8172e9fcc 100644
--- a/serialization/tagged/derive/Cargo.toml
+++ b/serialization/tagged/derive/Cargo.toml
@@ -1,7 +1,8 @@
 [package]
 name = "serialization-tagged-derive"
 version = "0.1.0"
-edition = "2021"
+edition.workspace = true
+rust-version.workspace = true
 license = "MIT"
 
 [lib]
diff --git a/storage/Cargo.toml b/storage/Cargo.toml
index 2ddea0c08..81503dc8d 100644
--- a/storage/Cargo.toml
+++ b/storage/Cargo.toml
@@ -1,7 +1,8 @@
 [package]
 name = "storage"
 version = "0.1.0"
-edition = "2021"
+edition.workspace = true
+rust-version.workspace = true
 license = "MIT"
 
 [features]
diff --git a/storage/core/Cargo.toml b/storage/core/Cargo.toml
index 95f5f9059..aebeea97b 100644
--- a/storage/core/Cargo.toml
+++ b/storage/core/Cargo.toml
@@ -1,7 +1,8 @@
 [package]
 name = "storage-core"
 version = "0.1.0"
-edition = "2021"
+edition.workspace = true
+rust-version.workspace = true
 license = "MIT"
 
 [dependencies]
diff --git a/storage/inmemory/Cargo.toml b/storage/inmemory/Cargo.toml
index cf7490a6a..669b42efb 100644
--- a/storage/inmemory/Cargo.toml
+++ b/storage/inmemory/Cargo.toml
@@ -1,7 +1,8 @@
 [package]
 name = "storage-inmemory"
 version = "0.1.0"
-edition = "2021"
+edition.workspace = true
+rust-version.workspace = true
 license = "MIT"
 
 [dependencies]
diff --git a/storage/lmdb/Cargo.toml b/storage/lmdb/Cargo.toml
index 6acf5552b..a2a816f8d 100644
--- a/storage/lmdb/Cargo.toml
+++ b/storage/lmdb/Cargo.toml
@@ -1,7 +1,8 @@
 [package]
 name = "storage-lmdb"
 version = "0.1.0"
-edition = "2021"
+edition.workspace = true
+rust-version.workspace = true
 license = "MIT"
 
 [dependencies]
diff --git a/storage/sqlite/Cargo.toml b/storage/sqlite/Cargo.toml
index cf1757c5d..850ceeeb2 100644
--- a/storage/sqlite/Cargo.toml
+++ b/storage/sqlite/Cargo.toml
@@ -1,7 +1,8 @@
 [package]
 name = "storage-sqlite"
 version = "0.1.0"
-edition = "2021"
+edition.workspace = true
+rust-version.workspace = true
 license = "MIT"
 
 [dependencies]
diff --git a/subsystem/Cargo.toml b/subsystem/Cargo.toml
index 77372acaf..34bb18ef9 100644
--- a/subsystem/Cargo.toml
+++ b/subsystem/Cargo.toml
@@ -1,7 +1,8 @@
 [package]
 name = "subsystem"
 version = "0.1.0"
-edition = "2021"
+edition.workspace = true
+rust-version.workspace = true
 license = "MIT"
 
 [features]
diff --git a/utils/Cargo.toml b/utils/Cargo.toml
index 4368cf703..14c28f54f 100644
--- a/utils/Cargo.toml
+++ b/utils/Cargo.toml
@@ -1,7 +1,8 @@
 [package]
 name = "utils"
 version = "0.1.0"
-edition = "2021"
+edition.workspace = true
+rust-version.workspace = true
 license = "MIT"
 
 [dependencies]
diff --git a/utils/typename-derive/Cargo.toml b/utils/typename-derive/Cargo.toml
index c2912104b..17afc68b7 100644
--- a/utils/typename-derive/Cargo.toml
+++ b/utils/typename-derive/Cargo.toml
@@ -1,7 +1,8 @@
 [package]
 name = "typename-derive"
 version = "0.1.0"
-edition = "2021"
+edition.workspace = true
+rust-version.workspace = true
 license = "MIT"
 
 [lib]
diff --git a/utils/typename/Cargo.toml b/utils/typename/Cargo.toml
index 9f4c9e36d..f922ab659 100644
--- a/utils/typename/Cargo.toml
+++ b/utils/typename/Cargo.toml
@@ -1,7 +1,8 @@
 [package]
 name = "typename"
 version = "0.1.0"
-edition = "2021"
+edition.workspace = true
+rust-version.workspace = true
 license = "MIT"
 
 [dependencies]
diff --git a/utxo/Cargo.toml b/utxo/Cargo.toml
index 534a74679..2affd1f8f 100644
--- a/utxo/Cargo.toml
+++ b/utxo/Cargo.toml
@@ -1,7 +1,8 @@
 [package]
 name = "utxo"
 version = "0.1.0"
-edition = "2021"
+edition.workspace = true
+rust-version.workspace = true
 license = "MIT"
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
diff --git a/wallet/Cargo.toml b/wallet/Cargo.toml
index 906348409..d6c8a4b3f 100644
--- a/wallet/Cargo.toml
+++ b/wallet/Cargo.toml
@@ -1,7 +1,8 @@
 [package]
 name = "wallet"
 version = "0.1.0"
-edition = "2021"
+edition.workspace = true
+rust-version.workspace = true
 license = "MIT"
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
diff --git a/wallet/storage/Cargo.toml b/wallet/storage/Cargo.toml
index 26d3ab801..5c9aa1823 100644
--- a/wallet/storage/Cargo.toml
+++ b/wallet/storage/Cargo.toml
@@ -1,7 +1,8 @@
 [package]
 name = "wallet-storage"
 version = "0.1.0"
-edition = "2021"
+edition.workspace = true
+rust-version.workspace = true
 license = "MIT"
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html


Test patch:
diff --git a/chainstate/test-framework/Cargo.toml b/chainstate/test-framework/Cargo.toml
index 197468a59..d8d2d834a 100644
--- a/chainstate/test-framework/Cargo.toml
+++ b/chainstate/test-framework/Cargo.toml
@@ -1,7 +1,8 @@
 [package]
 name = "chainstate-test-framework"
 version = "0.1.0"
-edition = "2021"
+edition.workspace = true
+rust-version.workspace = true
 license = "MIT"
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
diff --git a/chainstate/test-suite/Cargo.toml b/chainstate/test-suite/Cargo.toml
index 95715736f..bb143850c 100644
--- a/chainstate/test-suite/Cargo.toml
+++ b/chainstate/test-suite/Cargo.toml
@@ -1,7 +1,8 @@
 [package]
 name = "chainstate-test-suite"
 version = "0.1.0"
-edition = "2021"
+edition.workspace = true
+rust-version.workspace = true
 license = "MIT"
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
diff --git a/p2p/backend-test-suite/Cargo.toml b/p2p/backend-test-suite/Cargo.toml
index 22c8e8927..fa24ac8d8 100644
--- a/p2p/backend-test-suite/Cargo.toml
+++ b/p2p/backend-test-suite/Cargo.toml
@@ -1,7 +1,8 @@
 [package]
 name = "p2p-backend-test-suite"
 version = "0.1.0"
-edition = "2021"
+edition.workspace = true
+rust-version.workspace = true
 license = "MIT"
 
 [dependencies]
diff --git a/p2p/p2p-test-utils/Cargo.toml b/p2p/p2p-test-utils/Cargo.toml
index 6b9b73daa..9960e44c1 100644
--- a/p2p/p2p-test-utils/Cargo.toml
+++ b/p2p/p2p-test-utils/Cargo.toml
@@ -1,7 +1,8 @@
 [package]
 name = "p2p-test-utils"
 version = "0.1.0"
-edition = "2021"
+edition.workspace = true
+rust-version.workspace = true
 license = "MIT"
 
 [dependencies]
diff --git a/storage/backend-test-suite/Cargo.toml b/storage/backend-test-suite/Cargo.toml
index e34e4c55f..0ee855f1b 100644
--- a/storage/backend-test-suite/Cargo.toml
+++ b/storage/backend-test-suite/Cargo.toml
@@ -1,7 +1,8 @@
 [package]
 name = "storage-backend-test-suite"
 version = "0.1.0"
-edition = "2021"
+edition.workspace = true
+rust-version.workspace = true
 license = "MIT"
 
 [dependencies]
diff --git a/test-utils/Cargo.toml b/test-utils/Cargo.toml
index 8093aae82..7ce9a9444 100644
--- a/test-utils/Cargo.toml
+++ b/test-utils/Cargo.toml
@@ -1,7 +1,8 @@
 [package]
 name = "test-utils"
 version = "0.1.0"
-edition = "2021"
+edition.workspace = true
+rust-version.workspace = true
 license = "MIT"
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
diff --git a/test/Cargo.toml b/test/Cargo.toml
index 4c8bb6872..b78af3136 100644
--- a/test/Cargo.toml
+++ b/test/Cargo.toml
@@ -1,7 +1,8 @@
 [package]
 name = "mintlayer-test"
 version = "0.1.0"
-edition = "2021"
+edition.workspace = true
+rust-version.workspace = true
 homepage = "https://github.com/mintlayer/mintlayer-core/issues"
 license = "MIT"