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

Unable to use setPrice in CLI to reliably change ATOM and stATOM price (for testing) #8281

Closed
otoole-brendan opened this issue Aug 30, 2023 · 6 comments · Fixed by #8258 or #8457
Closed
Assignees
Labels
bug Something isn't working

Comments

@otoole-brendan
Copy link
Contributor

Describe the bug

Product rely on CLI commands on testnets in order to test core vaults user flows such as liquidations - this requires us to be able to change the price on demand to trigger liquidations.

setPrice is a function that allows this but has not been reliable (or is broken since adding second collateral type - @dckc please add accurate details).

To Reproduce

Steps to reproduce the behavior:

  1. Open CLI terminal for on Ollinet with latest Agoric SDK etc.
  2. Attempt to change price of an asset with for example 'agops oracle setPrice --keys gov1,gov2 --pair stATOM.USD --price 7.7 --keyring-backend test'
  3. Monitor in Vaults UI (or elsewhere) if price change (it does not reliably do so)

Expected behavior

The price of should change to 7.7 for stATOM in this case.

@otoole-brendan otoole-brendan added the bug Something isn't working label Aug 30, 2023
@otoole-brendan
Copy link
Contributor Author

@dckc
Copy link
Member

dckc commented Aug 30, 2023

We saw odd setPrice behavior (details below). In the logs of an agoricollinet-dev-1 validator, I found:

2023-08-30T03:07:07.148Z SwingSet: ls: v52: Error#2: invalid round to report

@turadg I don't quite understand that.

setPrice attempt
% agops oracle setPrice --keys gov1,gov2 --pair ATOM.USD --price 4 --keyring-backend test
ATOM-USD_price_feed: before setPrice
cannot get ATOM-USD_price_feed (Error#1)
Error#1: error code 6 reading data of published.priceFeed.ATOM-USD_price_feed: could not get vstorage path: unknown request
 at packages/agoric-cli/src/lib/rpc.js:82:17
 at async Object.readLatest (packages/agoric-cli/src/lib/rpc.js:105:19)
 at async Command.<anonymous> (packages/agoric-cli/src/commands/oracle.js:280:24)
Choose lead oracle operator order based on latestRound...
(Error#2)
Error#2: error code 6 reading data of published.priceFeed.ATOM-USD_price_feed.latestRound: could not get vstorage path: unknown request
 at packages/agoric-cli/src/lib/rpc.js:82:17
 at async Object.readLatest (packages/agoric-cli/src/lib/rpc.js:105:19)
pushPrice from each: [
 'agoric1ldmtatp24qlllgxmrsjzcpe20fvlkp448zcuce',
 'agoric140dmkrz2e42ergjj7gyvejhzmjzurvqeq82ang'
]
{"from":"agoric1ldmtatp24qlllgxmrsjzcpe20fvlkp448zcuce","oracleAdminAcceptOfferId":"1"}
2023-08-30T03:06:55.428774052Z tx not in block 306768 retrying...
2023-08-30T03:06:55.428774052Z tx not in block 306768 retrying...
pushPrice 4 offer broadcast
{"timestamp":"2023-08-30T03:07:00Z","height":"306769","offerId":"pushPrice-1693364820683","txhash":"A2968282EB5994C3DC0E9DE042C6E59EB3A34C307EA247BDDE2E7FB23260FABC"}
pushPrice 4 offer satisfied
{"error":"Error: invalid round to report","id":"pushPrice-1693364820683","invitationSpec":{"invitationArgs":[{"unitPrice":"4000000"}],"invitationMakerName":"PushPrice","previousOffer":"1","source":"continuing"},"numWantsSatisfied":1,"payouts":{},"proposal":{}}
{"from":"agoric140dmkrz2e42ergjj7gyvejhzmjzurvqeq82ang","oracleAdminAcceptOfferId":"1"}
2023-08-30T03:07:00.833833271Z tx not in block 306769 retrying...
2023-08-30T03:07:06.308613763Z tx not in block 306770 retrying...
pushPrice 4 offer broadcast
{"timestamp":"2023-08-30T03:07:06Z","height":"306770","offerId":"pushPrice-1693364829042","txhash":"6D35B3117DD5EB7C4DB038AE5012A7A04FFE8C31AD663386C9E77B6ECC0A2B1D"}
pushPrice 4 offer satisfied
{"id":"pushPrice-1693364829042","invitationSpec":{"invitationArgs":[{"unitPrice":"4000000"}],"invitationMakerName":"PushPrice","previousOffer":"1","source":"continuing"},"numWantsSatisfied":1,"payouts":{},"proposal":{}}
cannot get ATOM-USD_price_feed (Error#3)
Error#3: error code 6 reading data of published.priceFeed.ATOM-USD_price_feed: could not get vstorage path: unknown request
 at packages/agoric-cli/src/lib/rpc.js:82:17
 at async Object.readLatest (packages/agoric-cli/src/lib/rpc.js:105:19)
 at async Command.<anonymous> (packages/agoric-cli/src/commands/oracle.js:342:23)

@dckc
Copy link
Member

dckc commented Oct 14, 2023

@0xpatrickdev and I hit similar symptoms today.
@rowgraus likewise.

@otoole-brendan
Copy link
Contributor Author

What needs to happen for me to confirm/test this? or do I assume it'll be in Emerynet/mainnet clone to test for next upgrade i.e. WF, 13, crabble or other

@dckc
Copy link
Member

dckc commented Dec 1, 2023

What needs to happen for me to confirm/test this?

update / re-install your agoric-sdk stuff. cd agoric-sdk; git checkout master; git pull might suffice.

Then do the stuff in To Reproduce again.

do I assume it'll be in Emerynet/mainnet clone to test ...

Addressing this issue did not involve any on-chain changes.

@otoole-brendan
Copy link
Contributor Author

I have successfully tested setPrice as described on Emerynet

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
3 participants