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

fix: connect auctioneer governance to EC charter #7305

Merged
merged 2 commits into from
Apr 4, 2023

Conversation

dckc
Copy link
Member

@dckc dckc commented Apr 1, 2023

refs: #7249, #6930, Agoric/dapp-econ-gov#34

Description

To get more frequent auctions for testing (#7249), I tried using governance to change the StartFrequency parameter but discovered a couple gaps that we fill here:

  • feat: introduce auctioneer to econCommitteeCharter
  • feat: publish agoricNames.brand.timer

Security Considerations

closes an important governance gap

Scaling Considerations

none?

Documentation Considerations

agoricNames is an important API. cf. #7229

@michaelfig and talked about agoricNames.timerBrand.blockTime since timerBrand is not an ERTP brand. It's been a while since I added a child to agoricNames, though, so while I look into that, perhaps folks can consider whether this is close enough.

Testing Considerations

more fun with bootstrap tests!

@samsiegart
Copy link
Contributor

samsiegart commented Apr 1, 2023

I don't seem to be able to pause offers when testing this out locally. Repro steps:

  1. Checkout dc-auctioneer-charter and run inter-protocol/scripts/start-local-chain
  2. Open a vault on gov1 to get some IST to bid with.
  3. Place a bid successfully (it shows up in wallet UI as pending) with bin/agops inter bid by-price --price 10 --giveCurrency 10 --wantCollateral 1 --offerId bid-12345
  4. Go to https://pause-liquidations.dapp-econ-gov.pages.dev/?agoricNet=local and in Vaults -> Pause Liquidation Bids make a successful vote:
    image
  5. Try (3) again with a different offerId, observe the bid is placed successfully despite having attempted to pause bids.

Here are the chain logs, if it's helpful to try and rule out an issue with the voting proposal sent by the UI: https://gist.github.com/samsiegart/4b2dae7d02e9f973d3688c6afab0387b

@dckc
Copy link
Member Author

dckc commented Apr 1, 2023

@samsiegart in your logs I see make bid but in the contract I see new bid:

offer with "make bid"
2023-04-01T16:22:38.360Z SwingSet: vat: v25: walletFactory.fromBridge: { blockHeight: 181, blockTime: 1680366153, owner: 'agoric1ldmtatp24qlllgxmrsjzcpe20fvlkp448zcuce', spendAction: '{"body":"{\\"method\\":\\"executeOffer\\",\\"offer\\":{\\"id\\":1680366153492,\\"invitationSpec\\":{\\"source\\":\\"continuing\\",\\"previousOffer\\":1680365959599,\\"invitationMakerName\\":\\"VoteOnPauseOffers\\",\\"invitationArgs\\":[{\\"@qclass\\":\\"slot\\",\\"index\\":0,\\"iface\\":\\"Alleged: InstanceHandle\\"},[\\"make bid\\"],{\\"@qclass\\":\\"bigint\\",\\"digits\\":\\"1680366213\\"}]},\\"proposal\\":{}}}","slots":["board06445"]}', type: 'WALLET_SPEND_ACTION' }

@dckc
Copy link
Member Author

dckc commented Apr 1, 2023

@samsiegart meanwhile, the fact that you were able to get a vote passed using the auctioneer contract instance shows that this PR is doing what it's designed to do.

@samsiegart
Copy link
Contributor

@dckc Perfect, changing to 'new bid' fixes it and I'm seeing Error: not accepting offer with description "new bid"

Comment on lines +307 to +309
brand: {
produce: { timer },
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TimerBrand has a different API from ERTP Brands. Are you sure that no one will try to send getDisplayInfo() to all the brands in this list? I'm suspicious that this should get a different top-level category.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I gave it a try (8ebd8b8), but after a couple hours, it's not working and I can't figure out why.

@ivanlei suggested I timebox it. So I think I'm going ahead without it.


t.log('accept charter invitation');
{
const instance = agoricNamesRemotes.instance.econCommitteeCharter;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not good to have two variables with the same name and overlapping scopes. Can this be committee and the other be auctioneer?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The scopes don't overlap. That's the purpose of the { on 299: to introduce a new scope so that I don't have to think of novel names.

But ok, since you supplied novel names, will do.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can no longer see the code (I thought github was supposed to make it straightforward to look at older versions of a PR) so I can no longer prove it, but I thought what I saw was the second scope was fully contained within the first, which is the "not good" form of overlap I was talking about. Did I mis-read it? Were the scopes fully non-overlapping?

@dckc dckc added the automerge:rebase Automatically rebase updates, then merge label Apr 4, 2023
@mergify mergify bot merged commit e7b9d25 into master Apr 4, 2023
@mergify mergify bot deleted the dc-auctioneer-charter branch April 4, 2023 06:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:rebase Automatically rebase updates, then merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants