diff --git a/end2end-tests/cucumber-features/account_creation.feature b/end2end-tests/cucumber-features/account_creation.feature index dd39150d7d2d47d43ff041c65f0bba14cca978fa..2ea18058aac3e6e286257b0255ed105540813890 100644 --- a/end2end-tests/cucumber-features/account_creation.feature +++ b/end2end-tests/cucumber-features/account_creation.feature @@ -1,4 +1,4 @@ -Feature: Balance transfer +Feature: Account creation Scenario: Create a new account with enough funds When alice sends 5 ÄžD to dave @@ -29,8 +29,10 @@ Feature: Balance transfer @ignoreErrors Scenario: Create a new account without any funds Then eve should have 0 ÄžD + # Alice is treasury funder for 1 ÄžD + Then alice should have 9 ÄžD When eve send 0 ÄžD to alice - Then alice should have 10 ÄžD + Then alice should have 9 ÄžD When alice send 5 ÄžD to eve Then eve should have 5 ÄžD When 1 block later diff --git a/end2end-tests/cucumber-features/identity_creation.feature b/end2end-tests/cucumber-features/identity_creation.feature index 56a7404dffbd9390f1560fb547259c540fcfaa1a..fa27f97d5a3979651284d7ab9e3ef71cf9b970f9 100644 --- a/end2end-tests/cucumber-features/identity_creation.feature +++ b/end2end-tests/cucumber-features/identity_creation.feature @@ -6,11 +6,14 @@ Feature: Identity creation # - existential deposit (2 ÄžD) # - transaction fees (below 1 ÄžD) When alice sends 7 ÄžD to dave + # Alice is treasury funder for 1 ÄžD => 10-1-7 = 2 + Then alice should have 2 ÄžD When bob sends 750 cÄžD to dave When charlie sends 6 ÄžD to eve # alice last certification is counted from block zero # then next cert can be done after cert_period, which is 15 When 15 block later +# Then alice should have 1202 cÄžD When alice creates identity for dave Then dave identity should be created Then dave should be certified by alice diff --git a/end2end-tests/cucumber-features/monetary_mass.feature b/end2end-tests/cucumber-features/monetary_mass.feature index 0b5675d8ffca9ebce2533dd30c9ebda1050c73ad..1a1d9468f63e6b6ee5347ed5c7cca8fbd22b1d60 100644 --- a/end2end-tests/cucumber-features/monetary_mass.feature +++ b/end2end-tests/cucumber-features/monetary_mass.feature @@ -1,4 +1,4 @@ -Feature: Balance transfer +Feature: Monetary mass Scenario: After 10 blocks, the monetary mass should be 60 ÄžD Then Monetary mass should be 30.00 ÄžD diff --git a/end2end-tests/cucumber-features/oneshot_account.feature b/end2end-tests/cucumber-features/oneshot_account.feature index f3d74b7906b9892d0933d86f29dba00c3b9ff6ef..462847fa0086085c4765c98c21465a8a7d557f3f 100644 --- a/end2end-tests/cucumber-features/oneshot_account.feature +++ b/end2end-tests/cucumber-features/oneshot_account.feature @@ -2,7 +2,8 @@ Feature: Oneshot account Scenario: Simple oneshot consumption When alice sends 7 ÄžD to oneshot dave - Then alice should have 3 ÄžD + # Alice is treasury funder for 1 ÄžD + Then alice should have 2 ÄžD Then dave should have oneshot 7 ÄžD When oneshot dave consumes into account bob Then dave should have oneshot 0 ÄžD @@ -11,7 +12,8 @@ Feature: Oneshot account Scenario: Double oneshot consumption When alice sends 7 ÄžD to oneshot dave - Then alice should have 3 ÄžD + # Alice is treasury funder for 1 ÄžD + Then alice should have 2 ÄžD Then dave should have oneshot 7 ÄžD When oneshot dave consumes 4 ÄžD into account bob and the rest into oneshot charlie Then dave should have oneshot 0 ÄžD diff --git a/end2end-tests/cucumber-features/transfer_all.feature b/end2end-tests/cucumber-features/transfer_all.feature index 23b516ee4733765aa80ef9932fbda193168e4728..c282ea0dc13e8bada0c7cc114ab1468952ac1714 100644 --- a/end2end-tests/cucumber-features/transfer_all.feature +++ b/end2end-tests/cucumber-features/transfer_all.feature @@ -5,10 +5,10 @@ Feature: Balance transfer all When bob sends all her ÄžDs to dave """ Bob is a member, as such he is not allowed to empty his account completely, - if he tries to do so, the existence deposit (2 ÄžD) must remain. + if he tries to do so, the existence deposit (1 ÄžD) must remain. """ - Then bob should have 2 ÄžD + Then bob should have 1 ÄžD """ - 10 ÄžD (initial Bob balance) - 2 ÄžD (Existential deposit) - 0.02 ÄžD (transaction fees) + 10 ÄžD (initial Bob balance) - 1 ÄžD (Existential deposit) - 0.02 ÄžD (transaction fees) """ - Then dave should have 798 cÄžD + Then dave should have 898 cÄžD diff --git a/node/src/chain_spec/gdev.rs b/node/src/chain_spec/gdev.rs index a1cf40f193c580d71c6c9a8ce267753091d73dda..e48e27b5a60cdec39220a852be94f61a8fbb63ef 100644 --- a/node/src/chain_spec/gdev.rs +++ b/node/src/chain_spec/gdev.rs @@ -360,7 +360,7 @@ fn genesis_data_to_gdev_genesis_conf( .collect(), }, cert: CertConfig { - apply_cert_period_at_genesis: true, + apply_cert_period_at_genesis: false, certs_by_receiver, }, membership: MembershipConfig { memberships }, diff --git a/node/src/chain_spec/gen_genesis_data.rs b/node/src/chain_spec/gen_genesis_data.rs index 2ed46474a53134e60ea98cddf5005051538f669b..dc2d70bef0b55f0a47e73e182db1407e17f1445b 100644 --- a/node/src/chain_spec/gen_genesis_data.rs +++ b/node/src/chain_spec/gen_genesis_data.rs @@ -442,9 +442,16 @@ where } // Forced authority gets its required certs from first "minCert" WoT identities (fake certs) let mut new_certs: HashMap<String, u32> = HashMap::new(); + let certs_of_authority = &identities_v2.get(name).unwrap().certs_received; identities_v2 .keys() - .filter(|issuer| issuer != &name) + // Identities which are not the authority and have not already certified her + .filter(|issuer| { + issuer != &name + && !certs_of_authority + .iter() + .any(|(authority_issuer, _)| issuer == &authority_issuer) + }) .take(common_parameters.min_cert as usize) .map(String::clone) .for_each(|issuer| {