Skip to content

Commit

Permalink
algonet: use lower value of LastPartKeyRound for bootstrappedScenario (
Browse files Browse the repository at this point in the history
…#3865)

* add set -x to create_and_deploy_recipe.sh

* change last bootstrappedScenario partkey round from 3M to 10K

* increase bootstrappedScenario LastPartKeyRound to 20K and print out timing

* change LastPartKeyRound to 50K to match scenario1/2/3
  • Loading branch information
cce authored Apr 12, 2022
1 parent 51d8eaf commit 2186649
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion gen/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
"sort"
"sync"
"sync/atomic"
"time"

"github.com/algorand/go-deadlock"

Expand Down Expand Up @@ -301,6 +302,7 @@ func generateGenesisFiles(outDir string, protoVersion protocol.ConsensusVersion,
}()
}

createStart := time.Now()
creatingWalletsWaitGroup.Add(concurrentWalletGenerators)
for routinesCounter := 0; routinesCounter < concurrentWalletGenerators; routinesCounter++ {
go createWallet()
Expand Down Expand Up @@ -375,7 +377,7 @@ func generateGenesisFiles(outDir string, protoVersion protocol.ConsensusVersion,
err = ioutil.WriteFile(filepath.Join(outDir, config.GenesisJSONFile), append(jsonData, '\n'), 0666)

if (verbose) && (rootKeyCreated > 0 || partKeyCreated > 0) {
fmt.Printf("Created %d new rootkeys and %d new partkeys.\n", rootKeyCreated, partKeyCreated)
fmt.Printf("Created %d new rootkeys and %d new partkeys in %s.\n", rootKeyCreated, partKeyCreated, time.Since(createStart))
fmt.Printf("NOTICE: Participation keys are valid for a period of %d rounds. After this many rounds the network will stall unless new keys are registered.\n", lastWalletValid-firstWalletValid)
}

Expand Down
1 change: 1 addition & 0 deletions scripts/create_and_deploy_recipe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
# directory as the recipe file path.

set -e
set -x

if [[ "${AWS_ACCESS_KEY_ID}" = "" || "${AWS_SECRET_ACCESS_KEY}" = "" ]]; then
echo "You need to export your AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY for this to work"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"VersionModifier": "",
"ConsensusProtocol": "",
"FirstPartKeyRound": 0,
"LastPartKeyRound": 3000000,
"LastPartKeyRound": 50000,
"PartKeyDilution": 0,
"Wallets": [
{
Expand Down

0 comments on commit 2186649

Please sign in to comment.