Skip to content

Commit

Permalink
Merge pull request #542 from input-output-hk/to-chain-deps
Browse files Browse the repository at this point in the history
move to chain-deps
  • Loading branch information
vincenthz authored Jun 19, 2019
2 parents 52d6f0c + f91b31d commit 1ad7e8e
Show file tree
Hide file tree
Showing 18 changed files with 53 additions and 388 deletions.
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "cardano-deps"]
path = cardano-deps
url = https://github.com/input-output-hk/rust-cardano
[submodule "chain-deps"]
path = chain-deps
url = https://github.com/input-output-hk/chain-libs
31 changes: 3 additions & 28 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ members = [
"jormungandr-integration-tests",
]

exclude = [ "cardano-deps" ]
exclude = [
"chain-deps",
]
1 change: 0 additions & 1 deletion cardano-deps
Submodule cardano-deps deleted from a52e4b
1 change: 1 addition & 0 deletions chain-deps
Submodule chain-deps added at 30644e
20 changes: 9 additions & 11 deletions jcli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,15 @@ native-tls = "0.2.2"
regex = "1.1.2"
bech32 = "0.6"
hex = { path = "../hex" }
chain-core = { path = "../cardano-deps/chain-core" }
chain-impl-mockchain = { path = "../cardano-deps/chain-impl-mockchain" }
chain-storage = { path = "../cardano-deps/chain-storage" }
chain-storage-sqlite = { path = "../cardano-deps/chain-storage-sqlite" }
chain-addr = { path = "../cardano-deps/chain-addr" }
chain-crypto = { path = "../cardano-deps/chain-crypto" }
chain-time = { path = "../cardano-deps/chain-time" }
network-core = { path = "../cardano-deps/network-core" }
network-grpc = { path = "../cardano-deps/network-grpc" }
cardano = { path = "../cardano-deps/cardano", features = [ "generic-serialization" ] }
cardano-storage = { path = "../cardano-deps/storage" }
chain-core = { path = "../chain-deps/chain-core" }
chain-impl-mockchain = { path = "../chain-deps/chain-impl-mockchain" }
chain-storage = { path = "../chain-deps/chain-storage" }
chain-storage-sqlite = { path = "../chain-deps/chain-storage-sqlite" }
chain-addr = { path = "../chain-deps/chain-addr" }
chain-crypto = { path = "../chain-deps/chain-crypto" }
chain-time = { path = "../chain-deps/chain-time" }
network-core = { path = "../chain-deps/network-core" }
network-grpc = { path = "../chain-deps/network-grpc" }
poldercast = { version = "0.3.1", features = [ "serde_derive" ] }
reqwest = "0.9.11"
custom_error = "1.6"
Expand Down
8 changes: 4 additions & 4 deletions jcli/src/jcli_app/block/DOCUMENTED_EXAMPLE.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ initial:
- cert: cert1qgqqqqqqqqqqqqqqqqqqq0p5avfqqmgurpe7s9k7933q0wj420jl5xqvx8lywcu5jcr7fwqa9qmdn93q4nm7c4fsay3mzeqgq3c0slnut9kns08yn2qn80famup7nvgtfuyszqzqrd4lxlt5ylplfu76p8f6ks0ggprzatp2c8rn6ev3hn9dgr38tzful4h0udlwa0536vyrrug7af9ujmrr869afs0yw9gj5x7z24l8sps3zzcmv

# Initial deposits present in the blockchain
- legacy_fund:
# Legacy Cardano address
address: 48mDfYyQn21iyEPzCfkATEHTwZBcZJqXhRJezmswfvc6Ne89u1axXsiazmgd7SwT8VbafbVnCvyXhBSMhSkPiCezMkqHC4dmxRahRC86SknFu6JF6hwSg8
value: 123
# - legacy_fund:
# # Legacy Cardano address
# address: 48mDfYyQn21iyEPzCfkATEHTwZBcZJqXhRJezmswfvc6Ne89u1axXsiazmgd7SwT8VbafbVnCvyXhBSMhSkPiCezMkqHC4dmxRahRC86SknFu6JF6hwSg8
# value: 123
16 changes: 5 additions & 11 deletions jcli/src/jcli_app/block/yaml.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ struct InitialUTxO {
#[derive(Clone, Serialize, Deserialize)]
#[serde(deny_unknown_fields)]
struct LegacyUTxO {
pub address: OldAddress,
//pub address: OldAddress,
#[serde(with = "serde::value")]
pub value: Value,
}
Expand Down Expand Up @@ -319,8 +319,8 @@ fn extend_inits_with_legacy_utxo(initials: &mut Vec<Initial>, utxo_decl: &UtxoDe
let inits_iter = utxo_decl
.addrs
.iter()
.map(|(address, value)| LegacyUTxO {
address: address.clone(),
.map(|(_address, value)| LegacyUTxO {
//address: address.clone(),
value: value.clone(),
})
.map(Initial::LegacyFund);
Expand Down Expand Up @@ -369,7 +369,7 @@ impl<'a> From<&'a InitialCertificate> for Message {
impl<'a> From<&'a LegacyUTxO> for Message {
fn from(utxo: &'a LegacyUTxO) -> Message {
Message::OldUtxoDeclaration(UtxoDeclaration {
addrs: vec![(utxo.address.clone(), utxo.value)],
addrs: vec![], // vec![(utxo.address.clone(), utxo.value)],
})
}
}
Expand Down Expand Up @@ -440,15 +440,9 @@ blockchain_configuration:
kes_update_speed: 43200
initial:
- cert: cert1qgqqqqqqqqqqqqqqqqqqq0p5avfqqmgurpe7s9k7933q0wj420jl5xqvx8lywcu5jcr7fwqa9qmdn93q4nm7c4fsay3mzeqgq3c0slnut9kns08yn2qn80famup7nvgtfuyszqzqrd4lxlt5ylplfu76p8f6ks0ggprzatp2c8rn6ev3hn9dgr38tzful4h0udlwa0536vyrrug7af9ujmrr869afs0yw9gj5x7z24l8sps3zzcmv
- legacy_fund:
address: 48mDfYyQn21iyEPzCfkATEHTwZBcZJqXhRJezmswfvc6Ne89u1axXsiazmgd7SwT8VbafbVnCvyXhBSMhSkPiCezMkqHC4dmxRahRC86SknFu6JF6hwSg8
value: 123
- fund:
address: {}
value: 10000
- legacy_fund:
address: 48mDfYyQn21iyEPzCfkATEHTwZBcZJqXhRJezmswfvc6Ne89u1axXsiazmgd7SwT8VbafbVnCvyXhBSMhSkPiCezMkqHC4dmxRahRC86SknFu6JF6hwSg8
value: 456"#, leader_1_pk, leader_2_pk, initial_funds_address);
value: 10000"#, leader_1_pk, leader_2_pk, initial_funds_address);
let genesis: Genesis =
serde_yaml::from_str(genesis_yaml.as_str()).expect("Failed to deserialize YAML");

Expand Down
1 change: 0 additions & 1 deletion jcli/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
extern crate bech32;
extern crate cardano;
extern crate chain_addr;
extern crate chain_core;
extern crate chain_crypto;
Expand Down
6 changes: 3 additions & 3 deletions jormungandr-integration-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ authors = ["Nicolas Di Prima <[email protected]>"]
edition = "2018"

[dependencies]
chain-crypto = { path = "../cardano-deps/chain-crypto" }
chain-addr = { path = "../cardano-deps/chain-addr" }
chain-crypto = { path = "../chain-deps/chain-crypto" }
chain-addr = { path = "../chain-deps/chain-addr" }
jormungandr-lib = { path = "../jormungandr-lib" }
rand = "0.6"
rand_chacha = "0.1"
Expand All @@ -28,4 +28,4 @@ jormungandr = { path = "../jormungandr" }
jcli = { path = "../jcli" }

[features]
soak-test = []
soak-test = []
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ impl GenesisYaml {
let leader_1_pk = leader_1.public_key().to_bech32_str();
let leader_2_pk = leader_2.public_key().to_bech32_str();
let funds = initial_funds.into_iter().flatten().map(Initial::Fund);
let legacy = legacy_funds.into_iter().flatten().map(Initial::LegacyFund);
let legacy = vec![]; // legacy_funds.into_iter().flatten().map(Initial::LegacyFund);
GenesisYaml {
blockchain_configuration: BlockchainConfig {
block0_date: Some(1554185140),
Expand Down
8 changes: 4 additions & 4 deletions jormungandr-lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ edition = "2018"
bech32 = "0.6"
serde = { version = "1.0", features = ["derive"] }
custom_error = "1.6"
chain-impl-mockchain = { path = "../cardano-deps/chain-impl-mockchain" }
chain-addr = { path = "../cardano-deps/chain-addr" }
chain-crypto = { path = "../cardano-deps/chain-crypto" }
chain-impl-mockchain = { path = "../chain-deps/chain-impl-mockchain" }
chain-addr = { path = "../chain-deps/chain-addr" }
chain-crypto = { path = "../chain-deps/chain-crypto" }
rand_core = "0.3"
chrono = { version = "0.4", features = ["serde"] }
humantime = "1.2"

[dev-dependencies]
rand = "0.6"
quickcheck = "0.8"
chain-crypto = { path = "../cardano-deps/chain-crypto", features = [ "property-test-api" ] }
chain-crypto = { path = "../chain-deps/chain-crypto", features = [ "property-test-api" ] }
serde_yaml = "0.8"
bincode = "1.1"
8 changes: 4 additions & 4 deletions jormungandr-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ edition = "2018"

[dependencies]
bech32 = "0.6"
chain-core = { path = "../cardano-deps/chain-core" }
chain-addr = { path = "../cardano-deps/chain-addr" }
chain-crypto = { path = "../cardano-deps/chain-crypto" }
chain-impl-mockchain = { path = "../cardano-deps/chain-impl-mockchain" }
chain-core = { path = "../chain-deps/chain-core" }
chain-addr = { path = "../chain-deps/chain-addr" }
chain-crypto = { path = "../chain-deps/chain-crypto" }
chain-impl-mockchain = { path = "../chain-deps/chain-impl-mockchain" }
humantime = "1.2"
serde = "1.0"
custom_error = "1.6"
20 changes: 9 additions & 11 deletions jormungandr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,15 @@ native-tls = "0.2.2"
regex = "1.1.2"
bech32 = "0.6"
hex = { path = "../hex" }
chain-core = { path = "../cardano-deps/chain-core" }
chain-impl-mockchain = { path = "../cardano-deps/chain-impl-mockchain" }
chain-storage = { path = "../cardano-deps/chain-storage" }
chain-storage-sqlite = { path = "../cardano-deps/chain-storage-sqlite" }
chain-addr = { path = "../cardano-deps/chain-addr" }
chain-crypto = { path = "../cardano-deps/chain-crypto" }
chain-time = { path = "../cardano-deps/chain-time" }
network-core = { path = "../cardano-deps/network-core" }
network-grpc = { path = "../cardano-deps/network-grpc" }
cardano = { path = "../cardano-deps/cardano", features = [ "generic-serialization" ] }
cardano-storage = { path = "../cardano-deps/storage" }
chain-core = { path = "../chain-deps/chain-core" }
chain-impl-mockchain = { path = "../chain-deps/chain-impl-mockchain" }
chain-storage = { path = "../chain-deps/chain-storage" }
chain-storage-sqlite = { path = "../chain-deps/chain-storage-sqlite" }
chain-addr = { path = "../chain-deps/chain-addr" }
chain-crypto = { path = "../chain-deps/chain-crypto" }
chain-time = { path = "../chain-deps/chain-time" }
network-core = { path = "../chain-deps/network-core" }
network-grpc = { path = "../chain-deps/network-grpc" }
poldercast = { version = "0.3.1", features = [ "serde_derive" ] }
reqwest = "0.9.11"
custom_error = "1.6"
Expand Down
2 changes: 0 additions & 2 deletions jormungandr/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ extern crate actix_web;
extern crate bech32;
extern crate bincode;
extern crate bytes;
extern crate cardano;
extern crate cardano_storage;
extern crate cbor_event;
extern crate chain_addr;
extern crate chain_core;
Expand Down
2 changes: 0 additions & 2 deletions jormungandr/src/network/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

mod client;
mod grpc;
// TODO: to be ported
//mod ntt;
pub mod p2p;
mod service;
mod subscription;
Expand Down
Loading

0 comments on commit 1ad7e8e

Please sign in to comment.