-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #234 from Concordium/genesis-tool-changes
Genesis creator support for P8.
- Loading branch information
Showing
9 changed files
with
313 additions
and
13 deletions.
There are no files selected for viewing
Submodule concordium-rust-sdk
updated
25 files
+22 −0 | CHANGELOG.md | |
+1 −1 | concordium-base | |
+1 −1 | examples/find-account.rs | |
+1 −1 | examples/transfer-indexer.rs | |
+123 −0 | examples/update-validator-score-param.rs | |
+1 −0 | examples/v2_update_exchange_rate.rs | |
+0 −1 | src/cis0.rs | |
+1 −1 | src/cis2/mod.rs | |
+9 −7 | src/cis3.rs | |
+1 −1 | src/cis4.rs | |
+1 −0 | src/constants.rs | |
+24 −17 | src/contract_client.rs | |
+2 −0 | src/endpoints.rs | |
+12 −41 | src/lib.rs | |
+1,183 −0 | src/signatures.rs | |
+1 −1 | src/smart_contracts/mod.rs | |
+88 −4 | src/types/mod.rs | |
+5 −0 | src/types/queries.rs | |
+0 −1 | src/types/smart_contracts.rs | |
+26 −0 | src/types/summary_helper.rs | |
+94 −0 | src/v2/conversions.rs | |
+734 −11 | src/v2/generated/concordium.v2.rs | |
+158 −10 | src/v2/mod.rs | |
+1 −1 | src/v2/proto_schema_version.rs | |
+10 −2 | src/web3id.rs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
# An example genesis configuration file to construct a protocol 8 genesis. | ||
# This creates a genesis with | ||
# - 5 bakers | ||
# - one additional foundation account | ||
# - genesis time set to the time when the tool runs | ||
# - minimum block time set to 1s | ||
|
||
protocolVersion = "8" | ||
|
||
[out] | ||
updateKeys = "./update-keys" | ||
accountKeys = "./accounts" | ||
bakerKeys = "./bakers" | ||
identityProviders = "./idps" | ||
anonymityRevokers = "./ars" | ||
genesis = "./genesis.dat" | ||
cryptographicParameters = "./global" | ||
deleteExisting = true | ||
genesisHash = "./genesis_hash" | ||
|
||
[cryptographicParameters] | ||
kind = "generate" | ||
genesisString = "Test genesis parameters." | ||
|
||
[[anonymityRevokers]] | ||
kind = "fresh" | ||
id = 1 | ||
repeat = 3 | ||
|
||
[[identityProviders]] | ||
kind = "fresh" | ||
id = 0 | ||
repeat = 3 | ||
|
||
[[accounts]] | ||
kind = "fresh" | ||
balance = "1000000000000000" | ||
stake = "500000000000000" | ||
template = "baker" | ||
identityProvider = 0 | ||
numKeys = 1 | ||
threshold = 1 | ||
repeat = 5 | ||
|
||
[[accounts]] | ||
kind = "fresh" | ||
balance = "1000000000000000" | ||
template = "foundation" | ||
identityProvider = 0 | ||
numKeys = 1 | ||
threshold = 1 | ||
repeat = 1 | ||
foundation = true | ||
|
||
[updates] | ||
root = { threshold = 5, keys = [{kind = "fresh", repeat = 7}]} | ||
level1 = { threshold = 7, keys = [{kind = "fresh", repeat = 15}]} | ||
|
||
[updates.level2] | ||
keys = [{kind = "fresh", repeat = 15}] | ||
emergency = {authorizedKeys = [0,1,2,3,4,5,6], threshold = 7} | ||
protocol = {authorizedKeys = [0,1,2,3,4,5,6], threshold = 7} | ||
electionDifficulty = {authorizedKeys = [0,1,2,3,4,5,6], threshold = 7} | ||
euroPerEnergy = {authorizedKeys = [0,1,2,3,4,5,6], threshold = 7} | ||
microCCDPerEuro = {authorizedKeys = [0,1,2,3,4,5,6], threshold = 7} | ||
foundationAccount = {authorizedKeys = [0,1,2,3,4,5,6], threshold = 7} | ||
mintDistribution = {authorizedKeys = [0,1,2,3,4,5,6], threshold = 7} | ||
transactionFeeDistribution = {authorizedKeys = [0,1,2,3,4,5,6], threshold = 7} | ||
gasRewards = {authorizedKeys = [0,1,2,3,4,5,6], threshold = 7} | ||
poolParameters = {authorizedKeys = [0,1,2,3,4,5,6], threshold = 7} | ||
addAnonymityRevoker = {authorizedKeys = [0,1,2,3,4,5,6], threshold = 7} | ||
addIdentityProvider = {authorizedKeys = [0,1,2,3,4,5,6], threshold = 7} | ||
cooldownParameters = {authorizedKeys = [0,1,2,3,4,5,6], threshold = 7} | ||
timeParameters = {authorizedKeys = [0,1,2,3,4,5,6], threshold = 7} | ||
|
||
[parameters] | ||
# genesisTime = "2022-06-24T11:12:43Z" # Falls back to use the current time for genesis time. | ||
leadershipElectionNonce = "d1bc8d3ba4afc7e109612cb73acbdddac052c93025aa1f82942edabb7deb82a1" | ||
epochDuration = "1h" # Meaning 1 hour. | ||
signatureThreshold = {numerator = 2, denominator = 3} # Must be between 2/3 and 1. | ||
|
||
[parameters.chain] | ||
minBlockTime = "1s" # Meaning 1 second. | ||
blockEnergyLimit = 3_000_000 | ||
euroPerEnergy = 0.00002 | ||
microCCDPerEuro = 500_000 | ||
accountCreationLimit = 10 | ||
|
||
[parameters.chain.timeoutParameters] | ||
base = "2s" # Meaning 2 seconds | ||
increase = 1.25 # Must be greater than 1. | ||
decrease = 0.8 # Must be between 0 and 1. | ||
|
||
[parameters.chain.finalizationCommitteeParameters] | ||
minFinalizers = 4 | ||
maxFinalizers = 12 | ||
finalizersRelativeStakeThreshold = 200 # parts per hundred thousand (n / 100000). | ||
|
||
[parameters.chain.timeParameters] | ||
rewardPeriodLength = 4 # 4 epochs | ||
mintPerPayday = 2.61157877e-4 | ||
|
||
[parameters.chain.poolParameters] | ||
passiveFinalizationCommission = 1.0 | ||
passiveBakingCommission = 0.12 | ||
passiveTransactionCommission = 0.12 | ||
finalizationCommissionRange = {max = 1.0, min = 1.0} | ||
bakingCommissionRange = {max = 0.1, min = 0.1} | ||
transactionCommissionRange = {max = 0.1, min = 0.1} | ||
minimumEquityCapital = "1000" | ||
capitalBound = 0.1 | ||
leverageBound = {denominator = 1, numerator = 3} | ||
|
||
[parameters.chain.cooldownParameters] | ||
poolOwnerCooldown = 800 # in seconds | ||
delegatorCooldown = 1000 # in seconds | ||
|
||
[parameters.chain.rewardParameters] | ||
mintDistribution = { bakingReward = 0.85, finalizationReward = 0.05 } | ||
transactionFeeDistribution = { baker = 0.45, gasAccount = 0.45 } | ||
gASRewards = { baker = 0.25, accountCreation = 0.02, chainUpdate = 0.005 } | ||
|
||
[parameters.chain.validatorScoreParameters] | ||
maxMissedRounds = 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.