-
Notifications
You must be signed in to change notification settings - Fork 206
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
Proposal to reset fluxAggregator roundIDs for stTIA/stkATOM #9594
Conversation
export const resetRoundId = async ({ | ||
consume: { chainStorage, chainTimerService }, | ||
}) => { | ||
const TOKENS = ['stTIA', 'stkATOM']; |
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.
How hard would it be to make this a proposal option?
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.
done
|
||
export default async (homeP, endowments) => { | ||
const { writeCoreEval } = await makeHelpers(homeP, endowments); | ||
await writeCoreEval('reest-round-ids', defaultProposalBuilder); |
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.
await writeCoreEval('reest-round-ids', defaultProposalBuilder); | |
await writeCoreEval('reset-round-ids', defaultProposalBuilder); |
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.
done
const tokenStorageNode = await makeStorageNodeChild( | ||
priceFeedStorageNode, | ||
name, | ||
); |
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.
I believe the node is in a subchild called latestRound
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.
thanks. Fixed.
Deploying agoric-sdk with Cloudflare Pages
|
tokenStorageNode, | ||
'latestRound', | ||
); | ||
const marshalData = makeMarshal(_val => Fail`data only`); |
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.
Getting a failure here, I believe because of the timer's brand
With slightly different stack as I tweaked a few things on my end:
2024-06-27T06:50:09.257Z SwingSet: vat: v1: coreProposal: resetRoundId
2024-06-27T06:50:09.394Z SwingSet: vat: v1: CORE_EVAL failed: (Error#8)
2024-06-27T06:50:09.395Z SwingSet: vat: v1: Error#8: data only
2024-06-27T06:50:09.396Z SwingSet: vat: v1: Error: data only
at construct ()
at Error (/bundled-source/.../node_modules/ses/src/error/tame-error-constructor.js:56)
at makeError (/bundled-source/.../node_modules/ses/src/error/assert.js:243)
at fail (/bundled-source/.../node_modules/ses/src/error/assert.js:357)
at encodeSlotCommon (.../marshal/src/marshal.js:94)
at encodeSlotToCapData (.../marshal/src/marshal.js:143)
at encodeToCapDataRecur (.../marshal/src/encodeToCapData.js:207)
at (.../marshal/src/encodeToCapData.js:191)
at map ()
at encodeToCapDataRecur (.../marshal/src/encodeToCapData.js:191)
at (.../marshal/src/encodeToCapData.js:191)
at map ()
at encodeToCapDataRecur (.../marshal/src/encodeToCapData.js:191)
at (.../marshal/src/encodeToCapData.js:191)
at map ()
at encodeToCapDataRecur (.../marshal/src/encodeToCapData.js:191)
at encodeToCapData (.../marshal/src/encodeToCapData.js:259)
at toCapData (.../marshal/src/marshal.js:181)
at resetRoundId (.../vats/src/proposals/resetRoundId.js:39)
at ()
at ()
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.
Found where to pickup a better marshaller.
@Chris-Hibbert says this is overtaken by events |
Description
When replacing a priceFeed (see #9044), the oracles find it difficult to reset the roundIDs. We can help by overwriting the vstorage
latestRound
record to reset the roundId to zero.Security Considerations
see upgrade.
Scaling Considerations
No impact.
Documentation Considerations
None.
Testing Considerations
We will test in various test networks to ensure that this is the right thing for the oracles.
Upgrade Considerations
When replacing priceFeeds, we need to make it easy for the oracles to know what the current round is. They can read this from vstorage.