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

BUG: CONTRACT: Cannot publish kread bundles to chain #111

Closed
Pandelissym opened this issue Dec 13, 2023 · 0 comments · Fixed by #112
Closed

BUG: CONTRACT: Cannot publish kread bundles to chain #111

Pandelissym opened this issue Dec 13, 2023 · 0 comments · Fixed by #112
Labels
bug Something isn't working

Comments

@Pandelissym
Copy link
Contributor

Bug description

When trying to run a local chain and deploy kread on it, the process get stuck on the step make start-kread. It keeps jittering in the console and never ends. After some debugging it seems to be at the step of running agoric publish to publish the created bundles.

Repro

Follow the steps of running the contracts on a local chain as described in the ReadME. When you get to the point where you run make clean start-kread or make start-kread observe the console logs.

Expected behavior

The command should not jitter and go through, publishing the bundles to the chain and running the proposal after.

Agoric-sdk version

branch release-mainnet1B

Branch

develop

Screenshots/Videos

➜  agoric git:(develop) ✗ make clean start-kread
rm -rf dist
mkdir -p dist/bundles
touch dist/.keep dist/bundles/.keep
bundles will actually be stored in /Users/pandelissymeonidis/Projects/kread-github/agoric/dist/bundles
rm -rf /Users/pandelissymeonidis/.agoric/cache
ln -s /Users/pandelissymeonidis/Projects/kread-github/agoric/dist/bundles /Users/pandelissymeonidis/.agoric/cache
cd dist && \
                KREAD_ROYALTY_ADDRESS=agoric19rtq0t8rm5ej5eyumgl0qwepzr7t4x50whx9ae \
                KREAD_PLATFORM_ADDRESS=agoric1plt4252p5yu4x0nndfnkumh0gws7pdeksqq33e \
                  agoric run ../contract/src/proposal/start-kread-script.js >start-kread-info.txt
agoric: run: running /Users/pandelissymeonidis/Projects/kread-github/agoric/contract/src/proposal/start-kread-script.js
node contract/scripts/parseProposals.js <dist/start-kread-info.txt >dist/start-kread-info.json \
                || rm dist/start-kread-info.json
jq -r '.bundles[]' dist/start-kread-info.json | sort -u > start-kread-bundles.out
for b in `cat start-kread-bundles.out` ; do \
           agoric publish --node 127.0.0.1:26657 $b --chain-id agoriclocal --home /Users/pandelissymeonidis/Projects/agoric-sdk/packages/cosmic-swingset/t1/8000 ; \
        done
jittering agoric CLI deploy by 2147ms
jittering agoric CLI deploy by 4483ms
jittering agoric CLI deploy by 1486ms
jittering agoric CLI deploy by 2848ms
jittering agoric CLI deploy by 500ms
jittering agoric CLI deploy by 3639ms

Additional info

No response

@Pandelissym Pandelissym added the bug Something isn't working label Dec 13, 2023
Pandelissym added a commit that referenced this issue Dec 18, 2023
## Description

This PR fixes the issue with publishing the kread bundles. To fix it
`agoric published` has been replaced by the `installBundles` script in
the `agoric/contract/scripts/` folder. The script connects to the chain
using Cosmos StargateClient library and sends a transaction to the
correct endpoint with the bundle as payload. This is along the lines of
what happens under the hood of `agoric publish` as well but for some
reason that seems to be broken currently.

For funding the gas fees of the transaction, the same account is used
that funds the transactions to publish the committee bundles and sends
proposals for the kread-committee and kread.

Also, in this PR:
- Added some extra steps to `make kread-committee` (and no-build
version) that fetches the address that is to be funded from the
`AGORIC_SDK_PATH/packages/cosmic-swingset/t1/8000/` folder and funds it.
This way we no longer need to run `kread-committee`, copy the logged
address and fund it.
- Reverted back to the old folder structure where the contract code
lives in `src` instead of the versioned folder structere.

## Related Issues

Fixes #111 

## Checklist

Make sure all items are checked before submitting the pull request.
Remove any items that are not applicable.

- [x] I have used agoric's linter on my code
(Agoric/agoric-sdk#8274)
- [x] I have updated the documentation to reflect the changes (if
applicable).
- [x] I have added/updated unit tests to cover the changes.
- [x] All existing tests pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant