wip: adapt duniter genesis config to latest runtime

This commit is contained in:
poka 2023-11-18 19:57:38 +01:00
parent b3fc3e7a8b
commit 0c562bb5ab
5 changed files with 111 additions and 84 deletions

View File

@ -0,0 +1,39 @@
{
"ud": 1000,
"first_ud": 6000,
"first_ud_reeval": 600000,
"parameters": {
"babe_epoch_duration": 30,
"cert_period": 15,
"cert_max_by_issuer": 10,
"cert_min_received_cert_to_issue_cert": 2,
"cert_validity_period": 1000,
"idty_confirm_period": 40,
"idty_creation_period": 50,
"membership_period": 1000,
"pending_membership_period": 500,
"ud_creation_period": 10,
"ud_reeval_period": 50,
"smith_cert_period": 15,
"smith_cert_max_by_issuer": 8,
"smith_cert_min_received_cert_to_issue_cert": 2,
"smith_cert_validity_period": 1000,
"smith_membership_period": 1000,
"smith_pending_membership_period": 500,
"smith_wot_first_cert_issuable_on": 4,
"smith_wot_min_cert_for_membership": 3,
"wot_first_cert_issuable_on": 0,
"wot_min_cert_for_create_idty_right": 3,
"wot_min_cert_for_membership": 3
},
"clique_smiths": [
{ "name": "test1" },
{ "name": "test2" },
{ "name": "test3" },
{ "name": "test4" },
{ "name": "Alice" }
],
"sudo_key": "5FeggKqw2AbnGZF9Y9WPM2QTgzENS3Hit94Ewgmzdg5a3LNa",
"treasury_funder_address": "5FeggKqw2AbnGZF9Y9WPM2QTgzENS3Hit94Ewgmzdg5a3LNa",
"technical_committee": ["test1", "test2", "test3", "Alice"]
}

View File

@ -0,0 +1,65 @@
{
"initial_monetary_mass": 50100,
"identities": {
"test1": {
"index": 0,
"balance": 10000,
"membership_expire_on": 1705509948,
"next_cert_issuable_on": 1668347505,
"certs_received": {
"test2": 1727758466,
"test3": 1727758466,
"test4": 1727758466
},
"owner_pubkey": "BgC76sdA6zxPSAMW6sZ1e3NEntLrkLT8DY3z2MEmJJgK"
},
"test2": {
"index": 1,
"balance": 10000,
"membership_expire_on": 1705509948,
"next_cert_issuable_on": 1668347505,
"certs_received": {
"test1": 1727758466,
"test3": 1727758466,
"test4": 1727758466
},
"owner_pubkey": "6xNFhRFHKyx9iZ3ucc3AFf5cjsWw5jH3p6EnFXw3D8T6"
},
"test3": {
"index": 2,
"balance": 10000,
"membership_expire_on": 1705509948,
"next_cert_issuable_on": 1668347505,
"certs_received": {
"test1": 1727758466,
"test2": 1727758466,
"test4": 1727758466
},
"owner_pubkey": "BpSSPEVE1yze9wrfjkU4wfnFa7WgKNysHxe3H9iT9fvx"
},
"test4": {
"index": 3,
"balance": 10000,
"membership_expire_on": 1705509948,
"next_cert_issuable_on": 1668347505,
"certs_received": {
"test1": 1727758466,
"test2": 1727758466,
"test3": 1727758466
},
"owner_pubkey": "5LqbvutJtRTHvnforyndwPbkC4Kf5cJtdRQaDcHoMi8S"
},
"testCesium1": {
"index": 4,
"balance": 10000,
"membership_expire_on": 1705509948,
"next_cert_issuable_on": 1668347505,
"certs_received": {
"test1": 1727758466,
"test2": 1727758466,
"test3": 1727758466
},
"owner_pubkey": "DCovzCEnQm9GUWe6mr8u42JR1JAuoj3HbQUGdCkfTzSr"
}
}
}

View File

@ -1,79 +0,0 @@
{
"first_ud": 10000,
"first_ud_reeval": 50,
"genesis_parameters": {
"genesis_certs_expire_on": 10,
"genesis_certs_min_received": 3,
"genesis_memberships_expire_on": 1051200,
"genesis_smith_certs_expire_on": 2102400,
"genesis_smith_certs_min_received": 3,
"genesis_smith_memberships_expire_on": 1051200
},
"identities": {
"test1": {
"balance": 10000,
"certs": ["test2", "test3", "test4"],
"pubkey": "5FeggKqw2AbnGZF9Y9WPM2QTgzENS3Hit94Ewgmzdg5a3LNa"
},
"test2": {
"balance": 10000,
"certs": ["test1", "test3", "test4"],
"pubkey": "5E4i8vcNjnrDp21Sbnp32WHm2gz8YP3GGFwmdpfg5bHd8Whb"
},
"test3": {
"balance": 10000,
"certs": ["test1", "test2", "test4"],
"pubkey": "5FhTLzXLNBPmtXtDBFECmD7fvKmTtTQDtvBTfVr97tachA1p"
},
"test4": {
"balance": 10000,
"certs": ["test1", "test2", "test3"],
"pubkey": "5DXJ4CusmCg8S1yF6JGVn4fxgk5oFx42WctXqHZ17mykgje5"
},
"testCesium1": {
"balance": 10000,
"certs": ["test1", "test2", "test3"],
"pubkey": "5GAT6CJW8yVKwUuQc7sM5Kk9GZVTpbZYk9PfjNXtvnNgAJZ1"
}
},
"parameters": {
"babe_epoch_duration": 30,
"cert_period": 15,
"cert_max_by_issuer": 10,
"cert_min_received_cert_to_issue_cert": 2,
"cert_validity_period": 1000,
"idty_confirm_period": 40,
"idty_creation_period": 50,
"membership_period": 1000,
"pending_membership_period": 500,
"ud_creation_period": 10,
"ud_reeval_period": 50,
"smith_cert_period": 15,
"smith_cert_max_by_issuer": 8,
"smith_cert_min_received_cert_to_issue_cert": 2,
"smith_cert_validity_period": 1000,
"smith_membership_period": 1000,
"smith_pending_membership_period": 500,
"smiths_wot_first_cert_issuable_on": 4,
"smiths_wot_min_cert_for_membership": 3,
"wot_first_cert_issuable_on": 0,
"wot_min_cert_for_create_idty_right": 3,
"wot_min_cert_for_membership": 3
},
"smiths": {
"test1": {
"certs": ["test2", "test3", "test4"]
},
"test2": {
"certs": ["test1", "test3", "test4"]
},
"test3": {
"certs": ["test1", "test2", "test4"]
},
"test4": {
"certs": ["test1", "test2", "test3"]
}
},
"sudo_key": "5FeggKqw2AbnGZF9Y9WPM2QTgzENS3Hit94Ewgmzdg5a3LNa",
"technical_committee": ["test1", "test2", "test3"]
}

View File

@ -3,8 +3,9 @@ version: "3.5"
services:
duniter-v2s-gecko-tests:
container_name: duniter-v2s-gecko-tests
image: duniter/duniter-v2s:debug-sha-4d5e08be
command: --sealing=manual
# image: duniter/duniter-v2s:debug-sha-4d5e08be
image: duniter/duniter-v2s:debug-sha-44b09061
# command: --sealing=manual
ports:
- "127.0.0.1:9615:9615"
- "127.0.0.1:9933:9933"
@ -12,7 +13,8 @@ services:
- "30333:30333"
environment:
DUNITER_INSTANCE_NAME: "gecko_tests"
DUNITER_CHAIN_NAME: "dev"
DUNITER_GENESIS_CONFIG: "/var/lib/duniter/gecko_tests.json"
DUNITER_CHAIN_NAME: "gdev_dev"
DUNITER_GENESIS_CONFIG: "/var/lib/duniter/gecko_config.json"
DUNITER_GENESIS_DATA: "/var/lib/duniter/gecko_data.json"
volumes:
- ./data:/var/lib/duniter

View File

@ -611,7 +611,7 @@ class SubstrateSdk with ChangeNotifier {
if (resNode != null) {
nodeConnected = true;
// await getSs58Prefix();
// Subscribe bloc number
sdk.api.setting.subscribeBestNumber((res) {
blocNumber = int.parse(res.toString());