Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker environment for testing cross-chain orchestration #8896

Closed
1 task done
Tracked by #8863
turadg opened this issue Feb 12, 2024 · 7 comments · Fixed by #9534
Closed
1 task done
Tracked by #8863

Docker environment for testing cross-chain orchestration #8896

turadg opened this issue Feb 12, 2024 · 7 comments · Fixed by #9534
Assignees

Comments

@turadg
Copy link
Member

turadg commented Feb 12, 2024

As a contract developer, I need a docker environment with simulated Osmosis, Cosmos, Agoric, IBC Relayers, and test tokens.

  • Candidates: interchaintest (ivan has experience) + Starship (patrick demoed)
  • Considerations:
    • IBC versions (we need IBC v6, most docs geared at v7)
    • we need contracts/state on other chains (needs swap contracts + assets)
    • faucet for tokens, or mnemonics preloaded with funds.

Dependencies

  1. michaelfig
@LuqiPan
Copy link
Contributor

LuqiPan commented Apr 29, 2024

As discussed in the project management meeting, @0xpatrickdev will come back with a list of things that are missing from Agoric chain at genesis that need to be added to starship and then we'll regroup and find the owners to address those missing things

@dckc
Copy link
Member

dckc commented May 9, 2024

@dckc
Copy link
Member

dckc commented May 9, 2024

@0xpatrickdev
Copy link
Member

starship-demo#700a5f68 contains changes implemented by the cosmology team to integrate an agoric chain image via agoric-3-proposals. The chain starts successfully, but from a new genesis state instead of the simulated state from agoric-3-proposals.

In starship-demo repo#07e7ddf, the latest head, the agoric configuration implements the custom scripts directives available for building the chain. Presumably, these could be modified to preserve the existing genesis state and send tokens to the starship genesis account to allow it validate. So far my attempts at this have been unsuccessful, but I can share my attempts which may give someone else a head start.

An alternative approach might involve executing core proposals on top of the new genesis state. I explored this path today (init-network.js, init-localchain.js, init-orchestration.js) but faced some headwinds:

2024-05-14T19:11:32.928Z SwingSet: xsnap: v17: UnhandledPromiseRejectionWarning: (RangeError#1)
2024-05-14T19:11:32.937Z SwingSet: xsnap: v1: RemoteError(error:liveSlots:v2#70003)#3 ERROR_NOTE: Sent as error:liveSlots:v1#70002
2024-05-14T19:11:32.940Z SwingSet: xsnap: v10: UnhandledPromiseRejectionWarning: (RemoteError(error:liveSlots:v1#70002)#2)
2024-05-14T19:11:32.940Z SwingSet: xsnap: v10: RemoteError(error:liveSlots:v1#70002)#2: Vat Creation Error: Error: RangeError: Expected (an undefined) is same as (a string)
2024-05-14T19:11:32.940Z SwingSet: xsnap: v10: Error: Vat Creation Error: Error: RangeError: Expected (an undefined) is same as (a string)

@dckc
Copy link
Member

dckc commented May 14, 2024

... but faced some headwinds:

2024-05-14T19:11:32.940Z SwingSet: xsnap: v10: RemoteError(error:liveSlots:v1#70002)#2: Vat Creation Error: Error: RangeError: Expected (an undefined) is same as (a string)

@0xpatrickdev and I managed to get just a little more info: Expected undefined is same as Interface at which point I recognized this as symptoms of building bundles with an incompatible endo version (#8826).

@LuqiPan LuqiPan assigned raphdev and unassigned 0xpatrickdev May 15, 2024
@0xpatrickdev
Copy link
Member

0xpatrickdev commented May 15, 2024

Here is a comparison of vats available in starship-demo repo#07e7ddf versus a normal a3p:

normal
# ps aux | grep xsnap | awk '{print $12}' | sort -t: -k1.2n
xsnap
v1:bootstrap
v2:vatAdmin
v4:vattp
v5:timer
v6:agoricNames
v7:board
v8:priceAuthority
v9:zoe
v10:bridge
v11:provisioning
v13:zcf-mintHolder-BLD
v14:bank
v15:zcf-b1-2371d-econCommitteeCharter
v16:zcf-mintHolder-ATOM
v17:zcf-mintHolder-USDC_axl
v18:zcf-mintHolder-USDC_grv
v19:zcf-mintHolder-USDT_axl
v20:zcf-mintHolder-USDT_grv
v21:zcf-mintHolder-DAI_axl
v22:zcf-mintHolder-DAI_grv
v23:zcf-b1-e9e0b-feeDistributor
v24:zcf-b1-941ef-economicCommittee
v25:zcf-b1-9f877-provisionPool-governor
v26:zcf-b1-9f877-ATOM-USD_price_feed-governor
v36:zcf-b1-92c07-reserve
v45:zcf-b1-a5683-auctioneer
v48:zcf-b1-6c08a-vaultFactory
v55:zcf-mintHolder-stATOM
v57:zcf-b1-4522b-stATOM-USD_price_feed
v58:zcf-b1-0b217-scaledPriceAuthority-stATOM
starship
xsnap
v1:bootstrap
v2:vatAdmin
v4:vattp
v5:timer
v6:agoricNames
v7:board
v8:priceAuthority
v9:zoe
v10:bridge
v11:provisioning
v13:zcf-mintHolder-BLD
v14:bank

The diff is only v15 onwards, which only seems to be inter economy dependencies. I don't think these are completely necessary, and was surprised to see some behavior like smart wallets not working as expected. Provisioning a smart wallet results in unexpected behavior. When attempting to first add 10_000_000uist to the provision pool addr, agoric1megzytg65cyrgzs6fvzxgrcqvwwl7ugpt62346, I am met with the same results. In vstorage:

egress: Failed to parse: {"nickname":"my-wallet","peer":"agoric15xddzse9lq74cyt6ev9d7wywxerenxdgxsdc3m","powerFlags":["SMART_WALLET"]}
vstorage screenshot Screenshot 2024-05-15 at 6 06 56 PM

Still figuring out how to set DEBUG: "SwingSet:ls,SwingSet:vat" for meaningful swingset logs in this env.

Here is the beginning section of the validator logs:

starship validator logs
10:30PM INF agd delegating to JS executable args=["ag-chain-cosmos","--home","/root/.agoric","start"] binary=/usr/src/agoric-sdk/packages/cosmic-swingset/src/entrypoint.js
Removing intrinsics.Symbol.dispose
Removing intrinsics.Symbol.asyncDispose
10:30PM INF starting node with ABCI Tendermint in-process
10:30PM INF service start impl=multiAppConn module=proxy msg={}
10:30PM INF service start connection=query impl=committingClient module=abci-client msg={}
10:30PM INF service start connection=snapshot impl=committingClient module=abci-client msg={}
10:30PM INF service start connection=mempool impl=committingClient module=abci-client msg={}
10:30PM INF service start connection=consensus impl=committingClient module=abci-client msg={}
10:30PM INF service start impl=EventBus module=events msg={}
10:30PM INF service start impl=PubSub module=pubsub msg={}
10:30PM INF service start impl=IndexerService module=txindex msg={}
10:30PM INF ABCI Handshake App Info hash= height=0 module=consensus protocol-version=0 software-version=0.35.0-u14.1
10:30PM INF ABCI Replay Blocks appHeight=0 module=consensus stateHeight=0 storeHeight=0
10:30PM INF initializing blockchain state from genesis.json
10:30PM INF created new capability module=ibc name=ports/transfer
10:30PM INF port binded module=x/ibc/port port=transfer
10:30PM INF claimed capability capability=1 module=transfer name=ports/transfer
10:30PM INF created new capability module=ibc name=ports/icahost
10:30PM INF port binded module=x/ibc/port port=icahost
10:30PM INF claimed capability capability=2 module=icahost name=ports/icahost
Loading slog sender modules: @agoric/telemetry/src/slog-file.js @agoric/telemetry/src/flight-recorder.js
2024-05-15T22:30:26.882Z launch-chain: Launching SwingSet kernel
2024-05-15T22:31:08.152Z launch-chain: Launched SwingSet kernel
2024-05-15T22:31:08.154Z block-manager: block bootstrap
10:31PM INF Completed ABCI Handshake - CometBFT and App are synced appHash="���B��\x1c\x14���șo�$'�A�d��L���\x1bxR�U" appHeight=0 module=consensus
10:31PM INF Version info abci=0.17.0 block=11 cmtbft_version=0.34.30 commit_hash= p2p=8
10:31PM INF This node is a validator addr=3F1738D7F374F8CFD2DFFCD596B5C3B57BBD9513 module=consensus pubKey=N95XLNvWYako/TGXKS4A92GZHxKdHp7UslnUDNjJwQE=
10:31PM INF P2P Node ID ID=79142527a2677ace2d32ad30876806326b09a372 file=/root/.agoric/config/node_key.json module=p2p
10:31PM INF Adding persistent peers addrs=[] module=p2p
10:31PM INF Adding unconditional peer ids ids=[] module=p2p
10:31PM INF Add our address to book addr={"id":"79142527a2677ace2d32ad30876806326b09a372","ip":"0.0.0.0","port":26656} book=/root/.agoric/config/addrbook.json module=p2p
10:31PM INF service start impl=Node msg={}
10:31PM INF Starting pprof server laddr=localhost:6060
10:31PM INF service start impl="P2P Switch" module=p2p msg={}
10:31PM INF service start impl=BlockchainReactor module=blockchain msg={}
10:31PM INF service start impl=ConsensusReactor module=consensus msg={}
10:31PM INF Reactor  module=consensus waitSync=false
10:31PM INF service start impl=ConsensusState module=consensus msg={}
10:31PM INF serve module=rpc-server msg={}
10:31PM INF service start impl=baseWAL module=consensus msg={} wal=/root/.agoric/data/cs.wal/wal
10:31PM INF service start impl=Group module=consensus msg={} wal=/root/.agoric/data/cs.wal/wal
10:31PM INF service start impl=TimeoutTicker module=consensus msg={}
10:31PM INF Searching for height height=1 max=0 min=0 module=consensus wal=/root/.agoric/data/cs.wal/wal
10:31PM INF Searching for height height=0 max=0 min=0 module=consensus wal=/root/.agoric/data/cs.wal/wal
10:31PM INF Found height=0 index=0 module=consensus wal=/root/.agoric/data/cs.wal/wal
10:31PM INF Catchup by replaying consensus messages height=1 module=consensus
10:31PM INF Replay: Done module=consensus
10:31PM INF service start impl=Evidence module=evidence msg={}
10:31PM INF service start impl=StateSync module=statesync msg={}
10:31PM INF service start impl=PEX module=pex msg={}
10:31PM INF service start book=/root/.agoric/config/addrbook.json impl=AddrBook module=p2p msg={}
10:31PM INF Saving AddrBook to file book=/root/.agoric/config/addrbook.json module=p2p size=0
10:31PM INF Ensure peers module=pex numDialing=0 numInPeers=0 numOutPeers=0 numToDial=10
10:31PM INF No addresses to dial. Falling back to seeds module=pex
10:31PM INF serve module=api-server msg={}
10:31PM INF Timed out dur=792.698083 height=1 module=consensus round=0 step=1
10:31PM INF received proposal module=consensus proposal={"Type":32,"block_id":{"hash":"4899148FD09F715727324088E3DA144417E2A080AFFB5815F1A5FE987886F56E","parts":{"hash":"DF68A321CF48246BFEE2C669A4B89A9B8CE12F9FF0010305345D16207CAC96BC","total":1}},"height":1,"pol_round":-1,"round":0,"signature":"nEG9NW/eGC3buYUkQfA7wj59Lt3JmtJCr6ssU+4kQQnv0HBdPziBWmzjw5IJGVYr+8t+hv6Tf931Ljp0A/pbDw==","timestamp":"2024-05-15T22:31:21.80795234Z"} proposer=3F1738D7F374F8CFD2DFFCD596B5C3B57BBD9513
10:31PM INF received complete proposal block hash=4899148FD09F715727324088E3DA144417E2A080AFFB5815F1A5FE987886F56E height=1 module=consensus
10:31PM INF finalizing commit of block hash={} height=1 module=consensus num_txs=0 root=E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855
10:31PM INF minted coins from module account amount=8238904ubld from=mint module=x/bank
2024-05-15T22:31:21.849Z block-manager: block 1 begin
10:31PM INF executed block height=1 module=state num_invalid_txs=0 num_valid_txs=0
2024-05-15T22:31:21.869Z block-manager: block 1 commit
10:31PM INF Timed out dur=400 height=1 module=consensus round=0 step=3
10:31PM INF commit synced commit=436F6D6D697449447B5B323532203234302031323820323620323530203234352031333220323337203430203135362032203134362031313320323320323034203133342031353520323438203234302031393320353320313633203231372034312031393720393220313831203232392032323020382033332035345D3A317D
10:31PM INF committed state app_hash=FCF0801AFAF584ED289C02927117CC869BF8F0C135A3D929C55CB5E5DC082136 height=1 module=state num_txs=0
10:31PM INF indexed block events height=1 module=txindex
10:31PM INF Timed out dur=326.159666 height=2 module=consensus round=0 step=1
10:31PM INF received proposal module=consensus proposal={"Type":32,"block_id":{"hash":"0D3208AD5FA90D1C69BF8A91E6EECA8EB4E7099CF33A4A29B218233AF5A23C98","parts":{"hash":"C533C5CEB827EAD492CB29C577638D89B32E547F36F8AF7B91060541C914FCC4","total":1}},"height":2,"pol_round":-1,"round":0,"signature":"9pfINSDO8cxkaJCHmW3rRsOPWbTeABpqpak/lf7+1W4mmuXwaw9bU6O4o6SC4UgK/ZtahZ61Tles+ynEDJ4mCw==","timestamp":"2024-05-15T22:31:22.688775883Z"} proposer=3F1738D7F374F8CFD2DFFCD596B5C3B57BBD9513
10:31PM INF received complete proposal block hash=0D3208AD5FA90D1C69BF8A91E6EECA8EB4E7099CF33A4A29B218233AF5A23C98 height=2 module=consensus
10:31PM INF finalizing commit of block hash={} height=2 module=consensus num_txs=0 root=FCF0801AFAF584ED289C02927117CC869BF8F0C135A3D929C55CB5E5DC082136
10:31PM INF minted coins from module account amount=8238905ubld from=mint module=x/bank
2024-05-15T22:31:22.806Z block-manager: block 2 begin

It seems like Cosmosvisor is being used , but I'm not seeing the repoconfig.sh: No such file or directory error.

Edit: ah, provisionPool is part of the inter economy bits: v25:zcf-b1-9f877-provisionPool-governor

@0xpatrickdev
Copy link
Member

Still figuring out how to set DEBUG: "SwingSet:ls,SwingSet:vat" for meaningful swingset logs in this env.

Example of this is here: 0xpatrickdev/starship-demo#5

@aj-agoric aj-agoric assigned 0xpatrickdev and unassigned raphdev Jun 3, 2024
@turadg turadg mentioned this issue Jun 11, 2024
mergify bot added a commit that referenced this issue Jun 11, 2024
refs: #9063

## Description

More progress on,
- #9063


### Security Considerations

Sources chain network data from chain-registry.

### Scaling Considerations

Writes each chain info node or edge to one vstorage node.

### Documentation Considerations
none

### Testing Considerations

We'll also have to solve making it work in Starship but I think that's a
concern for #8896 or a new
ticket.


### Upgrade Considerations

Not yet released. When we do want to update the chain info in
agoricNames we'll need new work.
mergify bot added a commit that referenced this issue Jun 13, 2024
closes: #XXXX
refs: #8896

## Description

- Creates `@agoric/multichain-testing` package outside of the yarn workspace
- Provides a containerized, multi-chain testing environment for local and CI testing using [cosmology-tech/starship](https://github.com/cosmology-tech/starship/tree/devnet-0.2.2)
    - The current `config.yaml` includes agoric, osmosis, cosmos, and hermes relayers between each. A chain registry (served over http), faucet, and block explorer are also provided).
- Provides an ava test setup for accessing a chain registry, creating wallets, and requesting faucet funds
- Ports utilities from `@agoric/synthetic-chain` and `dapp-agoric-basics` that help towards a smart wallet client that can execute offers.

### Security Considerations

### Scaling Considerations

Taking on some tech debt here wrt smart wallet utilities and being DRY, but we plan to address this in future. See #8963

### Documentation Considerations

README.md documentation for running the service is provided.

### Testing Considerations

The goal of this PR is to build greater confidence in our software via automated testing with fully-simulated chains.

### Upgrade Considerations
mergify bot added a commit that referenced this issue Jun 15, 2024
refs: #8896 

## Description

The current `stakeIca.contract.js` bundle is ~4.5 MB uncompressed. Any attempted installation resulted in **400 Bad Request: request body too large** .

This change adjusts `app.toml` and `config.toml` params like `max_body_bytes`, `max_header_bytes`, `max_txs_bytes`, `max_tx_bytes`, and `rpc-max-body-bytes`.

### Security Considerations

### Scaling Considerations

The settings may not match other environments, and developers may find their bundles are too large to install if they are only developing against this environment.

### Documentation Considerations

The `update-config.sh` is long and mostly copied from `cosmology-tech/starship`. I've added a note about its source and a separate commit for the adjustments made to it.

### Testing Considerations

Manually tested the parameters in the course of #9042. Expect a test to be checked in with the completion of #9042.

Running the **Multichain E2E Testing** job and ensuring the `Setup Starship Infrastructure` step passes should give us confidence the overrides are also working in CI.

### Upgrade Considerations
mergify bot added a commit that referenced this issue Jun 21, 2024
refs: #8896

## Description

Extracted from #9534 to focus that PR on multichain and lighten the review. Also it had merge conflicts with master that this resolves.

### Security Considerations
nothing new

### Scaling Considerations
no

### Documentation Considerations
none

### Testing Considerations
new coverage

### Upgrade Considerations
none
@mergify mergify bot closed this as completed in #9534 Jul 3, 2024
@mergify mergify bot closed this as completed in bfa47d1 Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants