hindley-milner-systems / dapp-ertp-airdrop

0 stars 2 forks source link

Resolve E2E Deployment Issues #53

Closed tgrecojs closed 6 months ago

tgrecojs commented 6 months ago

PR Draft until this issue is resolved.

Steps to reproduce

# cd into contract directory
/ $ cd contract
/contract $ docker-compose up
# run the following commands in a new terminal
/contract $ make clean && make start-contract 

From here you can inspect the shell that is running the docker container and see what issues arise. @dckc and I have worked through a handful of issues to get to the current point which is shown in the logs below.

agd-1  | Approving proposals: null
agd-1  | 2024-04-27T18:20:45.414Z block-manager: block 1409 begin
agd-1  | Error: proposal-id null not a valid int, please input a valid proposal-id
agd-1  | 2024-04-27T18:20:45.681Z SwingSet: vat: v1: brandAuxPublisher: new Promise
agd-1  | 2024-04-27T18:20:45.686Z SwingSet: vat: v1: installation airdrop: new Promise
agd-1  | Usage:
agd-1  |   agd tx gov vote [proposal-id] [option] [flags]
agd-1  |
agd-1  | Flags:
agd-1  |   -a, --account-number uint      The account number of the signing account (offline mode only)
agd-1  |       --aux                      Generate aux signer data instead of sending a tx
agd-1  |   -b, --broadcast-mode string    Transaction broadcasting mode (sync|async|block) (default "sync")
agd-1  |       --dry-run                  ignore the --gas flag and perform a simulation of a transaction, but don't broadcast it (when enabled, the local Keybase is not accessible)
agd-1  |       --fee-granter string       Fee granter grants fees for the transaction
agd-1  |       --fee-payer string         Fee payer pays fees for the transaction instead of deducting from the signer
agd-1  |       --fees string              Fees to pay along with transaction; eg: 10uatom
agd-1  |       --from string              Name or address of private key with which to sign
agd-1  |       --gas string               gas limit to set per-transaction; set to "auto" to calculate sufficient gas automatically. Note: "auto" option doesn't always report accurate results. Set a valid coin value to adjust the result. Can be used instead of "fees". (default 200000)
agd-1  |       --gas-adjustment float     adjustment factor to be multiplied against the estimate returned by the tx simulation; if the gas limit is set manually this flag is ignored  (default 1)
agd-1  |       --gas-prices string        Gas prices in decimal format to determine the transaction fee (e.g. 0.1uatom)
agd-1  |       --generate-only            Build an unsigned transaction and write it to STDOUT (when enabled, the local Keybase only accessed when providing a key name)
agd-1  |   -h, --help                     help for vote
agd-1  |       --keyring-backend string   Select keyring's backend (os|file|kwallet|pass|test|memory) (default "os")
agd-1  |       --keyring-dir string       The client Keyring directory; if omitted, the default 'home' directory will be used
agd-1  |       --ledger                   Use a connected Ledger device
agd-1  |       --metadata string          Specify metadata of the vote
agd-1  |       --node string              <host>:<port> to tendermint rpc interface for this chain (default "tcp://localhost:26657")
agd-1  |       --note string              Note to add a description to the transaction (previously --memo)
agd-1  |       --offline                  Offline mode (does not allow any online functionality)
agd-1  |   -o, --output string            Output format (text|json) (default "json")
agd-1  |   -s, --sequence uint            The sequence number of the signing account (offline mode only)
agd-1  |       --sign-mode string         Choose sign mode (direct|amino-json|direct-aux), this is an advanced feature
agd-1  |       --timeout-height uint      Set a block timeout height to prevent the tx from being committed past a certain height
agd-1  |       --tip string               Tip is the amount that is going to be transferred to the fee payer on the target chain. This flag is only valid when used with --aux, and is ignored if the target chain didn't enable the TipDecorator
agd-1  |   -y, --yes                      Skip tx broadcasting prompt confirmation
agd-1  |
agd-1  | Global Flags:
agd-1  |       --chain-id string     The network chain ID
agd-1  |       --home string         directory for config and data (default "/root/.agoric")
agd-1  |       --log_format string   The logging format (json|plain) (default "plain")
agd-1  |       --log_level string    The logging level (trace|debug|info|warn|error|fatal|panic) (default "info")
agd-1  |       --trace               print out full stack trace on errors
agd-1  |
agd-1  | make: *** [Makefile:55: vote] Error 1
agd-1  | 2024-04-27T18:20:45.722Z SwingSet: vat: v1: core eval for airdrop
agd-1  | 2024-04-27T18:20:46.049Z SwingSet: vat: v1: airdrop (re-)installed as b1-daab9
agd-1  | 2024-04-27T18:20:46.063Z SwingSet: vat: v1: installation airdrop settled; remaining: []
agd-1  | 2024-04-27T18:20:47.323Z SwingSet: vat: v1: CORE_EVAL failed: (TypeError#3)
agd-1  | 2024-04-27T18:20:47.339Z SwingSet: vat: v1: TypeError#3: startAirdropCampaignContract: no function
agd-1  | 2024-04-27T18:20:47.343Z SwingSet: vat: v1: TypeError: startAirdropCampaignContract: no function
agd-1  |  at startAirdropCampaignContract (#9819:214)
agd-1  |  at ()
agd-1  |  at ()
agd-1  |
agd-1  | 2024-04-27T18:20:47.352Z SwingSet: xsnap: v1: TypeError#3 ERROR_NOTE: Sent as error:liveSlots:v1#70001
agd-1  | 2024-04-27T18:20:47.360Z SwingSet: ls: v1: Logging sent error stack (TypeError#3)
agd-1  | 2024-04-27T18:20:47.497Z SwingSet: xsnap: v10: UnhandledPromiseRejectionWarning: (RemoteTypeError(error:liveSlots:v1#70001)#4)
agd-1  | 2024-04-27T18:20:47.502Z SwingSet: xsnap: v10: RemoteTypeError(error:liveSlots:v1#70001)#4: startAirdropCampaignContract: no function
agd-1  | 2024-04-27T18:20:47.504Z SwingSet: xsnap: v10: TypeError: startAirdropCampaignContract: no function
agd-1  |  at makeError (/bundled-source/.../node_modules/ses/src/error/assert.js:243)
agd-1  |  at decodeErrorCommon (/bundled-source/.../node_modules/@endo/marshal/src/marshal.js:281)
agd-1  |  at decodeFromSmallcaps (/bundled-source/.../node_modules/@endo/marshal/src/encodeToSmallcaps.js:434)
agd-1  |  at fromCapData (/bundled-source/.../node_modules/@endo/marshal/src/marshal.js:356)
agd-1  |  at notifyOnePromise (/bundled-source/.../packages/swingset-liveslots/src/liveslots.js:1225)
agd-1  |  at notify (/bundled-source/.../packages/swingset-liveslots/src/liveslots.js:1249)
agd-1  |  at dispatchToUserspace (/bundled-source/.../packages/swingset-liveslots/src/liveslots.js:1514)
agd-1  |  at runWithoutMetering (/bundled-source/.../packages/swingset-xsnap-supervisor/lib/supervisor-subprocess-xsnap.js:60)
agd-1  |  at ()
agd-1  |
agd-1  | 2024-04-27T18:20:50.651Z block-manager: block 1409 commit
agd-1  | 2024-04-27T18:20:51.002Z block-manager: block 1410 begin
agd-1  | 2024-04-27T18:20:51.051Z block-manager: block 1410 commit
agd-1  | 2024-04-27T18:20:52.012Z block-manager: block 1411 begin
agd-1  | 2024-04-27T18:20:52.067Z block-manager: block 1411 commit
agd-1  | 2024-04-27T18:20:53.034Z block-manager: block 1412 begin
agd-1  | 2024-04-27T18:20:53.084Z block-manager: block 1412 commit
agd-1  | 2024-04-27T18:20:54.056Z block-manager: block 1413 begin
agd-1  | 2024-04-27T18:20:54.104Z block-manager: block 1413 commit
agd-1  | 2024-04-27T18:20:55.076Z block-manager: block 1414 begin
agd-1  | 2024-04-27T18:20:55.120Z block-manager: block 1414 commit
agd-1  | 2024-04-27T18:20:56.098Z block-manager: block 1415 begin
agd-1  | 2024-04-27T18:20:56.143Z block-manager: block 1415 commit

Refs: #31

dckc commented 6 months ago

what's left to land this PR? the contract can be deployed, right?

maybe you want to test the deployment in ci?

tgrecojs commented 6 months ago

Nope, this is ready to go. The contract can be deployed correctly.

I'm going to open up a separate issue for fixing the errors showing when the repo's github actions are run