-
Notifications
You must be signed in to change notification settings - Fork 6
Conversation
Useful tip from Will: ❯ docker exec -it ipc-node-0-daemon eudico wallet list
Address Balance Nonce Default
t1ah7phdlf5eg2nf25trxvvddzzde7w6ehtrfz2yi 1 FIL 0
t1cp4q4lqsdhob23ysywffg2tvbmar5cshia4rweq 4998.998985909661230076 FIL 2 X |
3e0147f
to
ba81bc3
Compare
9003b2c
to
26e508d
Compare
Here's an example log from setting up the simple topology: setup-log.txt It actually fails at the end while setting up the sub-subnet with |
This is because whatever address you are using for some operation doesn't have enough funds and consequently its account actors hasn't been yet initialized in the chain (thus the error) |
We are improving this after this PR, and instead of crashing the validator polls to see if it can start mining on a subnet or not. consensus-shipyard/lotus#166 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢 This a perfect first iteration of what we wanted for the integration test. I think it can really reduce the debugging time. Let's get this merged :)
e | ||
) | ||
} | ||
r.with_context(|| format!("error processing command {:?}", args.command)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really helpful, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like I said the other change I would make (one that would probably break the scripts) is to log to stderr (which the agent does at the moment already) and use simple println to output results. That would make it easier to automate.
1749ce3
to
d951b8e
Compare
Thanks! Just needs an approval. |
* Fix typo * IPC-91: Test env (Part 1) (#157) * IPC-91: Fix infra directory mkdir. Exit on fail. * IPC-91: Update init config command * IPC-91: Makefile to build the agent and eudico * IPC-91: Allow empty subnets list * IPC-91: Create agent docker-compose, up and down * IPC-91: make clean * IPC-91: Trying to get a eudico node going * IPC-91: Separate daemon and validator * IPC-91: Docs and clean * IPC-91: Fix API address for the validator * IPC-91: Remove volumes * IPC-91: Copy the infra scripts that needed modification. * IPC-91: Connect script. Fix clean * IPC-91: Try reload the agent config * IPC-91: Fix host to accept connections * IPC-91: Sleep after wait. Fix finding files and config when no subnets yet * IPC-91: Tab to spaces * IPC-91: Spaces to tabs * IPC-91: Config not needed to call reload * IPC-91: Test environment (Part 2) (#161) * IPC-91: make wallet * IPC-91: Create a wallet for a child node * IPC-91: Keep just one subnet-validator script * IPC-91: Create new subnet * IPC-91: Refer to the wallet key rather than copy. * IPC-91: Start agent by number * IPC-91: Create topology * IPC-91: Fixes, stop on error * IPC-91: Fix target in setup * IPC-91: Remove agent NR from node env * IPC-91: Comments and docs * IPC-91: Simpler subnet to demonstrate the error * IPC-91: Trying to fund the wallet created * IPC-91: Copy genesis files. Use the one with funds in root * IPC-91: Allow adding subnet variables to the topology * IPC-91: Move wallet out of genesis directory * IPC-91: Various fixes * IPC-91: Rename to topologies * IPC-91: Join subnet * IPC-91: Trying to fund the subnet * IPC-91: Add explicit step tombstones so funding only happens once * IPC-91: Add explicit step tombstone to the agent as well. * IPC-91: Join first, then fund * IPC-91: Add env var to construct agent URL to the node * IPC-91: Fix CLI to exit with error code * IPC-91: Fix equality check * IPC-91: Get rid of the wallet address from the validator net addr. * IPC-91: Fix address in root * IPC-91: Give the validator another chance to start * IPC-91: Remove any newlines after docker capture * IPC-91: Fix shadowing of env vars * IPC-91: Ephasize topologies * IPC-91: Remove leftover script * migrate bottom up checkpoint * add get validators and submit * Update src/lotus/client.rs Co-authored-by: adlrocha <adlrocha@tutamail.com> * Update src/lotus/mod.rs Co-authored-by: adlrocha <adlrocha@tutamail.com> * make obtain validator common * handle error responses * abstract common methods * more logs and concurrent futures * add pre submission checks: * make lint * remove unused method * Migrate top down (#184) * wip * merge with bottom up * merge with bottom up * Update src/manager/checkpoint/manager/topdown.rs Co-authored-by: adlrocha <adlrocha@tutamail.com> * Update src/manager/checkpoint/manager/topdown.rs Co-authored-by: adlrocha <adlrocha@tutamail.com> * Update src/manager/checkpoint/manager/topdown.rs Co-authored-by: adlrocha <adlrocha@tutamail.com> * Integrate new checkpoint (#185) * integrate new checkpoint system * format code * add error logging * add more logging * add epoch of fund and release * add more logging * update info * update bottom up * update comment * update log * update logging * remove subsystem file --------- Co-authored-by: adlrocha <adlrocha@tutamail.com> * remove default gateway address const (#188) --------- Co-authored-by: Jorge Soares <547492+jsoares@users.noreply.github.com> Co-authored-by: Akosh Farkash <aakoshh@gmail.com> Co-authored-by: adlrocha <adlrocha@tutamail.com>
* refactored code * add sleep * update sleep sec * reorg code * simplify * migrate bottom up checkpoint (#182) * Fix typo * IPC-91: Test env (Part 1) (#157) * IPC-91: Fix infra directory mkdir. Exit on fail. * IPC-91: Update init config command * IPC-91: Makefile to build the agent and eudico * IPC-91: Allow empty subnets list * IPC-91: Create agent docker-compose, up and down * IPC-91: make clean * IPC-91: Trying to get a eudico node going * IPC-91: Separate daemon and validator * IPC-91: Docs and clean * IPC-91: Fix API address for the validator * IPC-91: Remove volumes * IPC-91: Copy the infra scripts that needed modification. * IPC-91: Connect script. Fix clean * IPC-91: Try reload the agent config * IPC-91: Fix host to accept connections * IPC-91: Sleep after wait. Fix finding files and config when no subnets yet * IPC-91: Tab to spaces * IPC-91: Spaces to tabs * IPC-91: Config not needed to call reload * IPC-91: Test environment (Part 2) (#161) * IPC-91: make wallet * IPC-91: Create a wallet for a child node * IPC-91: Keep just one subnet-validator script * IPC-91: Create new subnet * IPC-91: Refer to the wallet key rather than copy. * IPC-91: Start agent by number * IPC-91: Create topology * IPC-91: Fixes, stop on error * IPC-91: Fix target in setup * IPC-91: Remove agent NR from node env * IPC-91: Comments and docs * IPC-91: Simpler subnet to demonstrate the error * IPC-91: Trying to fund the wallet created * IPC-91: Copy genesis files. Use the one with funds in root * IPC-91: Allow adding subnet variables to the topology * IPC-91: Move wallet out of genesis directory * IPC-91: Various fixes * IPC-91: Rename to topologies * IPC-91: Join subnet * IPC-91: Trying to fund the subnet * IPC-91: Add explicit step tombstones so funding only happens once * IPC-91: Add explicit step tombstone to the agent as well. * IPC-91: Join first, then fund * IPC-91: Add env var to construct agent URL to the node * IPC-91: Fix CLI to exit with error code * IPC-91: Fix equality check * IPC-91: Get rid of the wallet address from the validator net addr. * IPC-91: Fix address in root * IPC-91: Give the validator another chance to start * IPC-91: Remove any newlines after docker capture * IPC-91: Fix shadowing of env vars * IPC-91: Ephasize topologies * IPC-91: Remove leftover script * migrate bottom up checkpoint * add get validators and submit * Update src/lotus/client.rs Co-authored-by: adlrocha <adlrocha@tutamail.com> * Update src/lotus/mod.rs Co-authored-by: adlrocha <adlrocha@tutamail.com> * make obtain validator common * handle error responses * abstract common methods * more logs and concurrent futures * add pre submission checks: * make lint * remove unused method * Migrate top down (#184) * wip * merge with bottom up * merge with bottom up * Update src/manager/checkpoint/manager/topdown.rs Co-authored-by: adlrocha <adlrocha@tutamail.com> * Update src/manager/checkpoint/manager/topdown.rs Co-authored-by: adlrocha <adlrocha@tutamail.com> * Update src/manager/checkpoint/manager/topdown.rs Co-authored-by: adlrocha <adlrocha@tutamail.com> * Integrate new checkpoint (#185) * integrate new checkpoint system * format code * add error logging * add more logging * add epoch of fund and release * add more logging * update info * update bottom up * update comment * update log * update logging * remove subsystem file --------- Co-authored-by: adlrocha <adlrocha@tutamail.com> * remove default gateway address const (#188) --------- Co-authored-by: Jorge Soares <547492+jsoares@users.noreply.github.com> Co-authored-by: Akosh Farkash <aakoshh@gmail.com> Co-authored-by: adlrocha <adlrocha@tutamail.com> * update comments * Bottom up checkpoint proof (#199) * add bottom up proof * format proof * wrap inner proof * update comment * Update src/manager/checkpoint/proof/mod.rs Co-authored-by: adlrocha <adlrocha@tutamail.com> * update proof state * Update src/manager/checkpoint/proof/v1.rs --------- Co-authored-by: adlrocha <adlrocha@tutamail.com> * update mem push method * update response * share key store * add subnet to lotus client * fix docs --------- Co-authored-by: Jorge Soares <547492+jsoares@users.noreply.github.com> Co-authored-by: Akosh Farkash <aakoshh@gmail.com> Co-authored-by: adlrocha <adlrocha@tutamail.com>
* refactored code * add sleep * update sleep sec * reorg code * simplify * migrate bottom up checkpoint (#182) * Fix typo * IPC-91: Test env (Part 1) (#157) * IPC-91: Fix infra directory mkdir. Exit on fail. * IPC-91: Update init config command * IPC-91: Makefile to build the agent and eudico * IPC-91: Allow empty subnets list * IPC-91: Create agent docker-compose, up and down * IPC-91: make clean * IPC-91: Trying to get a eudico node going * IPC-91: Separate daemon and validator * IPC-91: Docs and clean * IPC-91: Fix API address for the validator * IPC-91: Remove volumes * IPC-91: Copy the infra scripts that needed modification. * IPC-91: Connect script. Fix clean * IPC-91: Try reload the agent config * IPC-91: Fix host to accept connections * IPC-91: Sleep after wait. Fix finding files and config when no subnets yet * IPC-91: Tab to spaces * IPC-91: Spaces to tabs * IPC-91: Config not needed to call reload * IPC-91: Test environment (Part 2) (#161) * IPC-91: make wallet * IPC-91: Create a wallet for a child node * IPC-91: Keep just one subnet-validator script * IPC-91: Create new subnet * IPC-91: Refer to the wallet key rather than copy. * IPC-91: Start agent by number * IPC-91: Create topology * IPC-91: Fixes, stop on error * IPC-91: Fix target in setup * IPC-91: Remove agent NR from node env * IPC-91: Comments and docs * IPC-91: Simpler subnet to demonstrate the error * IPC-91: Trying to fund the wallet created * IPC-91: Copy genesis files. Use the one with funds in root * IPC-91: Allow adding subnet variables to the topology * IPC-91: Move wallet out of genesis directory * IPC-91: Various fixes * IPC-91: Rename to topologies * IPC-91: Join subnet * IPC-91: Trying to fund the subnet * IPC-91: Add explicit step tombstones so funding only happens once * IPC-91: Add explicit step tombstone to the agent as well. * IPC-91: Join first, then fund * IPC-91: Add env var to construct agent URL to the node * IPC-91: Fix CLI to exit with error code * IPC-91: Fix equality check * IPC-91: Get rid of the wallet address from the validator net addr. * IPC-91: Fix address in root * IPC-91: Give the validator another chance to start * IPC-91: Remove any newlines after docker capture * IPC-91: Fix shadowing of env vars * IPC-91: Ephasize topologies * IPC-91: Remove leftover script * migrate bottom up checkpoint * add get validators and submit * Update src/lotus/client.rs Co-authored-by: adlrocha <adlrocha@tutamail.com> * Update src/lotus/mod.rs Co-authored-by: adlrocha <adlrocha@tutamail.com> * make obtain validator common * handle error responses * abstract common methods * more logs and concurrent futures * add pre submission checks: * make lint * remove unused method * Migrate top down (#184) * wip * merge with bottom up * merge with bottom up * Update src/manager/checkpoint/manager/topdown.rs Co-authored-by: adlrocha <adlrocha@tutamail.com> * Update src/manager/checkpoint/manager/topdown.rs Co-authored-by: adlrocha <adlrocha@tutamail.com> * Update src/manager/checkpoint/manager/topdown.rs Co-authored-by: adlrocha <adlrocha@tutamail.com> * Integrate new checkpoint (#185) * integrate new checkpoint system * format code * add error logging * add more logging * add epoch of fund and release * add more logging * update info * update bottom up * update comment * update log * update logging * remove subsystem file --------- Co-authored-by: adlrocha <adlrocha@tutamail.com> * remove default gateway address const (#188) --------- Co-authored-by: Jorge Soares <547492+jsoares@users.noreply.github.com> Co-authored-by: Akosh Farkash <aakoshh@gmail.com> Co-authored-by: adlrocha <adlrocha@tutamail.com> * update comments * Bottom up checkpoint proof (#199) * add bottom up proof * format proof * wrap inner proof * update comment * Update src/manager/checkpoint/proof/mod.rs Co-authored-by: adlrocha <adlrocha@tutamail.com> * update proof state * Update src/manager/checkpoint/proof/v1.rs --------- Co-authored-by: adlrocha <adlrocha@tutamail.com> * update mem push method * update response * share key store * add subnet to lotus client * fix docs * load config should not crash programme * load config should not crash programme * wait for config reload * Update mod.rs --------- Co-authored-by: Jorge Soares <547492+jsoares@users.noreply.github.com> Co-authored-by: Akosh Farkash <aakoshh@gmail.com> Co-authored-by: adlrocha <adlrocha@tutamail.com>
Part of consensus-shipyard/ipc#443
Continuing down the README from where #157 left off.
New commands in this PR:
make topologies/<name>.sh
to turntopologies/<name>.yaml
into a runnable scriptmake setup/<name>
to compile and run a topology scriptmake wallet
creates a new walletmake subnet
creates a new subnetmake wallet/fund
sends tokens to the walletmake subnet/fund
sends tokens to the subnet, executed on the parent nodemake subnet/join
makes the validator join the subnet , executed on the parent nodeThe only sane way to run these is e.g.
make setup/simple
.Notes
It's not expected to start a validator before joining a subnet, yet it's done to simplify starting the containers with docker-compose. The validator will crash the first time it's started, but it's given a kick again in the
post-up
step, after joining; at that point it runs.