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

Proposal to reset fluxAggregator roundIDs for stTIA/stkATOM #9594

Closed
wants to merge 3 commits into from

Conversation

Chris-Hibbert
Copy link
Contributor

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.

@Chris-Hibbert Chris-Hibbert self-assigned this Jun 26, 2024
@Chris-Hibbert Chris-Hibbert added Testnet operational a task that needs to be done labels Jun 26, 2024
export const resetRoundId = async ({
consume: { chainStorage, chainTimerService },
}) => {
const TOKENS = ['stTIA', 'stkATOM'];
Copy link
Member

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?

Copy link
Contributor Author

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);
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
await writeCoreEval('reest-round-ids', defaultProposalBuilder);
await writeCoreEval('reset-round-ids', defaultProposalBuilder);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Comment on lines 22 to 25
const tokenStorageNode = await makeStorageNodeChild(
priceFeedStorageNode,
name,
);
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks. Fixed.

Copy link

cloudflare-workers-and-pages bot commented Jun 26, 2024

Deploying agoric-sdk with  Cloudflare Pages  Cloudflare Pages

Latest commit: ddf1118
Status: ✅  Deploy successful!
Preview URL: https://9275fca3.agoric-sdk.pages.dev
Branch Preview URL: https://cth-resetroundids.agoric-sdk.pages.dev

View logs

tokenStorageNode,
'latestRound',
);
const marshalData = makeMarshal(_val => Fail`data only`);
Copy link
Member

@mhofman mhofman Jun 27, 2024

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 ()

Copy link
Contributor Author

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.

@dckc
Copy link
Member

dckc commented Aug 13, 2024

@Chris-Hibbert says this is overtaken by events

@dckc dckc closed this Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
operational a task that needs to be done Testnet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants