0.1.0 • Published 20 days ago

@agoric/synthetic-chain v0.1.0

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
20 days ago

Synthetic chain tools

Utilities to build a synthetic chain and test running proposals atop it. The chain approximates agoric-3 (Mainnet) using the state from https://github.com/Agoric/agoric-3-proposals (It could trivially support other Agoric chains, if we scale horizontally.)

Usage

build           - build the synthetic-chain "use" images

test [--debug]  - build the "test" images and run them
test -m <name>  - target a particular proposal by substring match

doctor          - diagnostics and quick fixes

Design

It builds images starting from ag0 or an already build synthetic-chain. The build stages sequence is produced by dockerfileGen.ts approximately as so:

---
title: Build Stages
---
flowchart TD
    M{Mode?}
    M -- FromAg0 --> S[START]
    M -- Append --> R[RESUME]
    S --> NP{Proposal type}
    R --> NP
    NP -- Software Upgrade Proposal ----> Pr[PREPARE]
    Pr ----> Exec[EXECUTE]
    Exec ----> Use[USE]
    Use ----> Test[TEST]
    NP -- CoreEvalProposal ----> Eval[EVAL]
    Eval ----> Use
    Test ----> AP{Another proposal?}
    AP -- Yes ----> NP
    AP -- No ----> END[DEFAULT last use]

Development

To depend on @agoric/synthetic-chain that isn't yet published, use npm pack in this package and copy the tgz into the proposal. Then use the file: protocol in the package.json to add it. Finally yarn install in the package to update local node_modules for linting. E.g.,

    "dependencies": {
        "@agoric/synthetic-chain": "file:agoric-synthetic-chain-0.0.1-alpha.tgz",

Debugging proposals

The build will fail if an upgrade proposal fails but a CoreEval has no completion condition the build can wait for. Your TEST stage needs to look for the effects you expect the CoreEval to cause. If it doesn't, try looking in the logs around PROPOSAL_STATUS_PASSED to see if there were any errors. Because Docker CLI scrolls the output in a small viewport, you may need to get the full logs. An easy way to do this in Docker Desktop is enabling “Turn on the Builds view” in Docker Desktop settings under “Features in development”. Then look at the Logs tab for the build in question.

0.1.0

20 days ago

0.0.10

1 month ago

0.0.10-1

1 month ago

0.0.9

1 month ago

0.0.8

2 months ago

0.0.7

3 months ago

0.0.7-5

3 months ago

0.0.7-4

3 months ago

0.0.7-3

3 months ago

0.0.7-2

3 months ago

0.0.7-1

3 months ago

0.0.6-2

3 months ago

0.0.6-1

3 months ago

0.0.6-4

3 months ago

0.0.6-3

3 months ago

0.0.5-4

4 months ago

0.0.5-3

4 months ago

0.0.5-2

4 months ago

0.0.5-1

4 months ago

0.0.4-3

4 months ago

0.0.4-0

4 months ago

0.0.4-2

4 months ago

0.0.4-1

4 months ago

0.0.3

4 months ago

0.0.2

5 months ago

0.0.2-0

5 months ago

0.0.1

5 months ago

0.0.1-rc0

5 months ago