Skip to content

Commit

Permalink
Merge pull request #76 from Agoric/dc-fix-race-sig
Browse files Browse the repository at this point in the history
  • Loading branch information
dckc authored Apr 18, 2024
2 parents 341dc37 + e925caf commit f72117b
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 25 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ jobs:
run: yarn build
- name: yarn start:contract
run: yarn start:contract
- name: verify contracts started onchain
run: |
curl http://localhost:1317/agoric/vstorage/data/published.agoricNames.instance | grep offerUp

- name: Install linux deps
run: |
Expand Down
2 changes: 1 addition & 1 deletion contract/scripts/install-bundles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ cd /workspace/contract

# wait for blocks to start being produced
# avoid collision with run-chain.sh who is also migrating keys
waitForBlock 4
waitForBlock 2
set -x

# TODO: try `agoric publish` to better track outcome
Expand Down
13 changes: 13 additions & 0 deletions contract/scripts/propose-start-contract.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,16 @@ agd tx gov submit-proposal swingset-core-eval "$PERMIT" "$SCRIPT" \
set +x # not so noisy for this part
. /usr/src/upgrade-test-scripts/env_setup.sh
voteLatestProposalAndWait

# Give the core-eval script a block or two to run.
waitForBlock 2

parseInstances() {
# extract latest value; parse smallCaps; yield 1 line per entry
jq -c '.value | fromjson | .values[-1] | fromjson | .body[1:] | fromjson | .[]'
}

# check that the contract was actually started
api=http://localhost:1317
curl $api/agoric/vstorage/data/published.agoricNames.instance \
| parseInstances | grep offerUp
20 changes: 1 addition & 19 deletions contract/scripts/run-chain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,11 @@

. /usr/src/upgrade-test-scripts/env_setup.sh

approveProposals() {
while true; do
proposals=$(make -s -C /workspace/contract gov-voting-q 2>/dev/null)
exit_status=$?
if [ $exit_status -eq 0 ]; then
echo "Approving proposals: $proposals"
printf $proposals | xargs -I {} make -s -C /workspace/contract vote PROPOSAL={}
else
echo "No proposals to approve, continuing..."
fi

sleep 10
done
}

# Start the chain in the background
/usr/src/upgrade-test-scripts/start_agd.sh &

# wait for blocks to start being produced
waitForBlock 2

# Approve any proposals forever in the background.
approveProposals &
waitForBlock 1

make -C /workspace/contract mint100
make -C /workspace/contract lower-bundle-cost
Expand Down
2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3.5'

services:
agd:
# cf. https://github.com/Agoric/agoric-3-proposals
Expand Down

0 comments on commit f72117b

Please sign in to comment.