From 71aed06d48019a6f971a224fe540163c746d3001 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matev=C5=BE=20Jekovec?= Date: Tue, 23 Aug 2022 14:37:04 +0200 Subject: [PATCH] common: Fund test entity with 10^15 tokens by default --- .changelog/4902.feature.md | 12 ++++++++++++ go/oasis-node/cmd/common/genesis/staking.go | 4 ++-- go/oasis-test-runner/scenario/e2e/stake_cli.go | 2 +- 3 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 .changelog/4902.feature.md diff --git a/.changelog/4902.feature.md b/.changelog/4902.feature.md new file mode 100644 index 00000000000..114d255561d --- /dev/null +++ b/.changelog/4902.feature.md @@ -0,0 +1,12 @@ +oasis-net-runner: Set default max_allowances, increase test account balance + +The max_allowances staking setting in the default oasis-net-runner fixture has +been changed from 0 to 16 matching the testnet and mainnet setting. This +enables the allowance transactions locally which are required for doing +deposits to runtimes. + +The initial balance of the default test account generated by the +oasis-net-runner was increased from 100 tokens to 1 million. This makes the +account directly suitable for deploying and running confidential smart +contracts (e.g. on the local Cipher instance) with more realistic transaction +fees. diff --git a/go/oasis-node/cmd/common/genesis/staking.go b/go/oasis-node/cmd/common/genesis/staking.go index d6da0cd2092..48408389cc5 100644 --- a/go/oasis-node/cmd/common/genesis/staking.go +++ b/go/oasis-node/cmd/common/genesis/staking.go @@ -35,9 +35,9 @@ func (st *AppendableStakingState) AppendTo(doc *genesis.Document) error { } entAddr := staking.NewAddress(ent.ID) - // Ok then, we hold the world ransom for One Hundred Billion Dollars. + // Ok then, we hold the world ransom for One Million Billion Yen. var q quantity.Quantity - if err = q.FromBigInt(big.NewInt(100000000000)); err != nil { + if err = q.FromBigInt(big.NewInt(1_000_000_000_000_000)); err != nil { return fmt.Errorf("genesis/staking: failed to allocate test entity stake: %w", err) } diff --git a/go/oasis-test-runner/scenario/e2e/stake_cli.go b/go/oasis-test-runner/scenario/e2e/stake_cli.go index ddded8e0f2e..2a163c75e73 100644 --- a/go/oasis-test-runner/scenario/e2e/stake_cli.go +++ b/go/oasis-test-runner/scenario/e2e/stake_cli.go @@ -32,7 +32,7 @@ import ( const ( // Init balance in the genesis block. - initBalance = 100_000_000_000 + initBalance = 1_000_000_000_000_000 // Test transfer amount. transferAmount = 1000