-
Notifications
You must be signed in to change notification settings - Fork 5
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
chore: never mind background voting loop #76
Conversation
avoid: WARN[0000] .../dapp-offer-up/docker-compose.yml: `version` is obsolete
@@ -20,3 +20,15 @@ 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 | |||
|
|||
sleep 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this sleep working around (I have PTSD anytime I see a delay in tests that is not looking for a trigger)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
voteLatestProposalAndWait
finishes when the core-eval proposal passes. This gives it time to execute before we check to see if it worked (i.e. check to see if the contract instance is visible via vstorage). IOU a comment.
The check was introduced a while ago without this delay, so I think it's not actually essential.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it not be better to wait 2 blocks instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some question about error handling.
jq -c '.value | fromjson | .values[-1] | fromjson | .body[1:] | fromjson | .[]' | ||
} | ||
|
||
# check that the contract was actually started |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hard for me to track this down right now, but will a failure of this check result in the yarn start:contract
to fail? I don't see any exit
here if that were the case, but I also don't know of the error code would bubble all the way back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, the error code does bubble all the way back.
If I chage it to grep offerUpXXX
:
$ yarn start:docker && yarn start:contract
yarn run v1.22.21
$ cd contract && docker compose up -d
[+] Running 1/2
⠹ Network dapp-offer-up_default Created 0.3s
✔ Container dapp-offer-up-agd-1 Started 0.2s
Done in 0.35s.
yarn run v1.22.21
$ cd contract && yarn start
$ yarn docker:make clean start-contract
$ docker compose exec agd make -C /workspace/contract clean start-contract
...
Waiting for proposal to pass (status=PROPOSAL_STATUS_VOTING_PERIOD)
waiting for block...
2
block produced
block produced
done
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 5077 0 5077 0 0 4958k 0 --:--:-- --:--:-- --:--:-- 4958k
make: *** [Makefile:101: start-contract] Error 1
make: Leaving directory '/workspace/contract'
error Command failed with exit code 2.
$ echo $?
2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh right, if grep doesn't find a match, it's a pipe fail. No need to explicitly exit.
@@ -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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're we already trying to approve on this side before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exactly.
jq -c '.value | fromjson | .values[-1] | fromjson | .body[1:] | fromjson | .[]' | ||
} | ||
|
||
# check that the contract was actually started |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh right, if grep doesn't find a match, it's a pipe fail. No need to explicitly exit.
@dckc how is the voting happening now to approve the proposal? |
The voting loop is redundant and it occasionally results in:
as in Agoric/agoric-sdk#9250
https://github.com/Agoric/agoric-sdk/actions/runs/8727691415/job/23957208797