Dev sandbox with additional accounts

Hi, I would like to use the dev configuration for sandbox, but with more than the three default accounts. I modified the DevModeNetwork.json files to include more wallets -respecting the global stake limit of 100, but firing up the sandbox stalls at feeding up the accounts.

What is the correct way to increment the number of default accounts in dev sandbox? Thanks.

I got this far:

Starting sandbox for: dev
* docker-compose up -d
Building algod
[+] Building 21.9s (9/11)
 => [internal] load build definition from Dockerfile                                                                                                                                    0.1s
 => => transferring dockerfile: 38B                                                                                                                                                     0.0s
 => [internal] load .dockerignore                                                                                                                                                       0.0s
 => => transferring context: 34B                                                                                                                                                        0.0s
 => [internal] load metadata for docker.io/library/golang:1.17.5                                                                                                                        3.1s
 => [internal] load build context                                                                                                                                                       0.0s
 => => transferring context: 1.20kB                                                                                                                                                     0.0s
 => [1/7] FROM docker.io/library/golang:1.17.5@sha256:c72fa9afc50b3303e8044cf28fb358b48032a548e1825819420fd40155a131cb                                                                  0.0s
 => CACHED [2/7] RUN echo "Installing from source. https://github.com/algorand/go-algorand -- master"                                                                                   0.0s
 => CACHED [3/7] RUN apt-get update && apt-get install -y apt-utils curl git git-core bsdmainutils python3                                                                              0.0s
 => CACHED [4/7] COPY . /tmp                                                                                                                                                            0.0s
 => CACHED [5/7] RUN /tmp/images/algod/install.sh     -d "/node"     -c ""     -u "https://github.com/algorand/go-algorand"     -b "master"     -s ""                                   0.0s
 => [6/7] RUN /tmp/images/algod/setup.py  --bin-dir "/node"  --data-dir "/opt/data"  --start-script "/opt/start_algod.sh"  --network-dir "/opt/testnetwork"  --network-template "//tm  18.5s
 => => # Created new rootkey: /opt/testnetwork/Wallet1.rootkey
 => => # Generating Wallet1's keys for a period of 3000000 rounds
 => => # Generating Wallet4's keys for a period of 3000000 rounds
 => => # Generating Wallet5's keys for a period of 3000000 rounds
 => => # Generating Wallet2's keys for a period of 3000000 rounds
 => => # Generating Wallet3's keys for a period of 3000000 rounds

I would recommend to just manually run a script to create accounts and then move Algos to these new accounts.

To do it manually, first get the first account:

./sandbox goal account list

Now:

./sandbox goal account new

to create a new account

and then move funds from the first account above to the new account using ./sandbox goal clerk send.

You can automate this using bash + awk/sed/…

You can also do it fully in Python which may be simpler.
See smart-contracts/sandbox_accounts.py at fabrice/upenn · fabrice102/smart-contracts · GitHub for an example of script getting the list of accounts (inspired from smart-contracts/sandbox.py at master · algorand/smart-contracts · GitHub). Adding new accounts is easy from there.

1 Like