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

frequent liquidation timing for testing #7249

Closed
2 tasks done
Tracked by #6930
dckc opened this issue Mar 27, 2023 · 3 comments
Closed
2 tasks done
Tracked by #6930

frequent liquidation timing for testing #7249

dckc opened this issue Mar 27, 2023 · 3 comments
Assignees
Labels
auction enhancement New feature or request Inter-protocol Overarching Inter Protocol test vaults_triage DO NOT USE
Milestone

Comments

@dckc
Copy link
Member

dckc commented Mar 27, 2023

What is the Problem Being Solved?

When testing, we (@arirubinstein , @turadg ...) don't want to wait a full hour for liquidation auctions.

For my local chain, I used this kludge:
#7132 (comment)

Description of the Design

Tasks

  1. automerge:rebase
  2. automerge:rebase

#7256 includes agops ec ... support for changing StartFrequency, ClockStep, etc.

road not taken:

  • config file support

Our production config (#7311 ) won't include these parameters because the vaults contract is deployed post-bootstrap (#3947)

Security Considerations

Scaling Considerations

Test Plan

@dckc dckc added enhancement New feature or request test Inter-protocol Overarching Inter Protocol labels Mar 27, 2023
@dckc dckc changed the title CLI support for changing auctionParams frequent liquidation timing for testing Mar 28, 2023
@dckc dckc added the auction label Mar 30, 2023
@dckc
Copy link
Member Author

dckc commented Apr 2, 2023

progress: I manage to set the StartFrequency to 300sec once on a local chain with these shell functions.
https://gist.github.com/dckc/7bf4df2ecf3f5a4722cba663abcca208

I'm having trouble reproducing it, though. Sigh.

I'm using a merge of a few branches...

2023-04-01 16:08 ea4c56a Merge branch 'dc-bid-cli' into dc-auctioneer-charter
2023-03-31 22:49 944b198 fixup! feat: publish agoricNames.brand.timer
2023-03-31 20:03 9ccc069 feat: introduce auctioneer to econCommitteeCharter

@dckc dckc self-assigned this Apr 2, 2023
@dckc
Copy link
Member Author

dckc commented Apr 2, 2023

EC CLI UX

With 52cce88 (WIP), govTools.sh is much simpler:

acceptGovInvitations () {
    agops ec charter --send-from gov1
    agops ec committee --send-from gov1
    agops ec committee --send-from gov2 --voter 1
}

Accepting invitations is idempotent: if it's already done, it bails and tells you.

Voting automatically looks up the continuing invitation id:

    agops ec vote --forPosition 0 --send-from gov1
    agops ec vote --forPosition 0 --send-from gov2

For other commands that still need --charterAcceptOfferId, I added an agops ec find-continuing-ids command:

    gov1propose=$(agops ec find-continuing-ids --from gov1 |
        jq -r 'select(.instanceName =="econCommitteeCharter") | .offerId ')

    agops auctioneer proposeParamChange \
        --charterAcceptOfferId ${gov1propose} \
        --start-frequency "$freq" >|"$offer"

Set auction start frequency with 1 shell function

Seems reliable now, on this WIP dc-auction-ec-ux branch.

$ setStartFreq 300
Now use `agoric wallet send ...` to sign and broadcast the offer.
Executing  [...propose-1680413811514 ... VoteOnParamChange... StartFrequency :{timerBrand: slot(0), relValue:300n...]
Deadline: Sun Apr 2 12:37:52 AM CDT 2023
waiting a couple blocks for the question to post...
2023-04-02T05:36:58.491482137Z tx not in block 634 retrying...
wallet action is broadcast:
{"timestamp":"2023-04-02T05:37:03Z","height":"635","offerId":"ecVote-1680413827647","txhash":"D9087C5DA2AA53A0EAED12DA8CC1D04D590822E79D1CC5899D8B8CDBE437F9B7"}

2023-04-02T05:37:03.499990853Z offer not yet in block 635 retrying...
2023-04-02T05:37:08.512835484Z offer not yet in block 636 retrying...
offer accepted in block
{"time":"2023-04-02T05:37:08.512835484Z","height":"636"}
2023-04-02T05:37:08.512835484Z tx not in block 636 retrying...
wallet action is broadcast:
{"timestamp":"2023-04-02T05:37:13Z","height":"637","offerId":"ecVote-1680413837470","txhash":"6B9060BE4533EF9938D39E98BD7889785D2346275FE3E8C4CB7C7067DDFA6459"}

2023-04-02T05:37:13.524093814Z offer not yet in block 637 retrying...
offer accepted in block
{"time":"2023-04-02T05:37:18.537768699Z","height":"638"}
Deadline: Sun Apr 2 12:37:52 AM CDT 2023
{
  "type": "relativeTime",
  "value": {
    "relValue": "3600",
    "timerBrand": "[Alleged: SEVERED: timerBrand {}]"
  }
}
{
  "type": "relativeTime",
  "value": {
    "relValue": "300",
    "timerBrand": "[Alleged: SEVERED: timerBrand {}]"
  }
}
^C

then...

$ setStartFreq 400
Now use `agoric wallet send ...` to sign and broadcast the offer.
Executing  [... StartFrequency: {timerBrand, relValue: 400n }...]
Deadline: Sun Apr 2 12:40:35 AM CDT 2023
waiting a couple blocks for the question to post...
2023-04-02T05:39:43.911489494Z tx not in block 667 retrying...
2023-04-02T05:39:48.924171689Z tx not in block 668 retrying...
wallet action is broadcast:
{"timestamp":"2023-04-02T05:39:48Z","height":"668","offerId":"ecVote-1680413991029","txhash":"25AAB9A4C19194EA34005F21A254B941AAC1C095112BFFD4CD4BE95DC472947F"}
2023-04-02T05:39:48.924171689Z offer not yet in block 668 retrying...
offer accepted in block
{"time":"2023-04-02T05:39:53.939187575Z","height":"669"}
2023-04-02T05:39:53.939187575Z tx not in block 669 retrying...
2023-04-02T05:39:58.948166111Z tx not in block 670 retrying...
wallet action is broadcast:
{"timestamp":"2023-04-02T05:39:58Z","height":"670","offerId":"ecVote-1680414000893","txhash":"B0EC53B1F5878FF8FEE0B53597B08C2E781BABC658CC8B3F49A2736D13147945"}
2023-04-02T05:39:58.948166111Z offer not yet in block 670 retrying...
offer accepted in block
{"time":"2023-04-02T05:40:03.960581356Z","height":"671"}
Deadline: Sun Apr 2 12:40:35 AM CDT 2023
{
  "type": "relativeTime",
  "value": {
    "relValue": "300",
    "timerBrand": "[Alleged: SEVERED: timerBrand {}]"
  }
}
{
  "type": "relativeTime",
  "value": {
    "relValue": "400",
    "timerBrand": "[Alleged: SEVERED: timerBrand {}]"
  }
}
^C

git history needs clean-up

2023-04-02 00:38 52cce88 WIP: agops ec: integrated sign, broadcast, await
2023-04-02 00:37 6a62443 WIP: keyring type tweak
2023-04-02 00:37 907370d fixup! WIP: agops auction proposeParamChange command
2023-04-01 16:08 ea4c56a Merge branch 'dc-bid-cli' into dc-auctioneer-charter
2023-03-31 22:49 944b198 fixup! feat: publish agoricNames.brand.timer
2023-03-31 20:03 9ccc069 feat: introduce auctioneer to econCommitteeCharter

@dckc
Copy link
Member Author

dckc commented Apr 17, 2023

fixed in #7256

@dckc dckc closed this as completed Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auction enhancement New feature or request Inter-protocol Overarching Inter Protocol test vaults_triage DO NOT USE
Projects
None yet
Development

No branches or pull requests

2 participants