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

feat: update addAsset scripts #62

Merged
merged 2 commits into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions src/config/inter/addVault/add-oracle-permit.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,20 @@
"priceAuthority": "priceFeed",
"priceAuthorityAdmin": "priceFeed",
"startGovernedUpgradable": "priceFeed",
"vatAdminSvc": "makeCoreProposalBehavior",
"zoe": "makeCoreProposalBehavior"
"zoe": "priceFeed",
"vatAdminSvc": "makeCoreProposalBehavior"
},
"installation": {},
"instance": {
"produce": "priceFeed"
},
"namedVat": {
"consume": {
"agoricNames": "agoricNames"
}
},
"namedVat": true,
"oracleBrand": {
"produce": "priceFeed"
},
"evaluateBundleCap": "makeCoreProposalBehavior",
"installation": {
"produce": "makeCoreProposalBehavior"
},
Comment on lines +20 to +27
Copy link
Collaborator

Choose a reason for hiding this comment

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

The way we verified this change was that you ran a local a3p chain, right @Chris-Hibbert ?

Do you happen to still have the logs we looked at? The yarn docker:logs output of the stuff executing. It would be about a screenful. Share them in a comment on this PR, please? Timestamps in particular give me warm fuzzies.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I tested both on a local chain and on xnet. This looks like the relevant section from the local chain

agd-1  | 2025-01-28T23:27:46.948Z SwingSet: vat: v1: installation priceAggregator: new Promise
agd-1  | 2025-01-28T23:27:46.963Z SwingSet: vat: v1: installation priceAggregator settled; remaining: []
agd-1  | 2025-01-28T23:27:47.626Z SwingSet: vat: v1: coreProposal: createPriceFeed
agd-1  | 2025-01-28T23:27:47.628Z SwingSet: vat: v1: ----- RunPriceFeed.2  2 createPriceFeed dATOM-USD price feed
agd-1  | 2025-01-28T23:27:47.630Z SwingSet: vat: v1: coreProposal: ensureOracleBrands
agd-1  | 2025-01-28T23:27:47.677Z SwingSet: vat: v1: oracleBrand dATOM: new Promise
agd-1  | 2025-01-28T23:27:47.679Z SwingSet: vat: v1: oracleBrand dATOM settled; remaining: []
agd-1  | 2025-01-28T23:27:53.670Z SwingSet: vat: v1: instance scaledPriceAuthority-dATOM: new Promise
agd-1  | 2025-01-28T23:27:53.676Z SwingSet: vat: v1: instance scaledPriceAuthority-dATOM settled; remaining: [ 'dATOM-USD price feed' ]
agd-1  | 2025-01-28T23:28:05.953Z SwingSet: vat: v1: ----- RunPriceFeed.2  3 distributing invitations [ 'agoric10vjkvkmpp9e356xeh6qqlhrny2htyzp8hf88fk', 'agoric1lw4e4aas9q84tq0q92j85rwjjjapf8dmnllnft', 'agoric1qj07c7vfk3knqdral0sej7fa6eavkdn8vd8etf', 'agoric1ra0g6crtsy6r3qnpu7ruvm7qd4wjnznyzg5nu4', 'agoric1zj6vrrrjq4gsyr9lw7dplv4vyejg3p8j2urm82', 'agoric1ldmtatp24qlllgxmrsjzcpe20fvlkp448zcuce', 'agoric140dmkrz2e42ergjj7gyvejhzmjzurvqeq82ang', 'agoric1w8wktaur4zf8qmmtn3n7x3r0jhsjkjntcm3u6h' ]
agd-1  | 2025-01-28T23:28:05.955Z SwingSet: vat: v1: ----- RunPriceFeed.2  4 createPriceFeed complete
agd-1  | 2025-01-28T23:28:05.957Z SwingSet: vat: v1: instance dATOM-USD price feed settled; remaining: []
agd-1  | 2025-01-28T23:28:06.685Z SwingSet: vat: v73: charter: adding instance dATOM-USD price feed
agd-1  | 2025-01-28T23:28:06.706Z SwingSet: vat: v85: ----- FlxAgg.7  2 makeOracleInvitation agoric10vjkvkmpp9e356xeh6qqlhrny2htyzp8hf88fk
agd-1  | 2025-01-28T23:28:06.715Z SwingSet: vat: v85: ----- FlxAgg.7  3 makeOracleInvitation agoric1lw4e4aas9q84tq0q92j85rwjjjapf8dmnllnft
agd-1  | 2025-01-28T23:28:06.725Z SwingSet: vat: v85: ----- FlxAgg.7  4 makeOracleInvitation agoric1qj07c7vfk3knqdral0sej7fa6eavkdn8vd8etf
agd-1  | 2025-01-28T23:28:06.731Z SwingSet: vat: v85: ----- FlxAgg.7  5 makeOracleInvitation agoric1ra0g6crtsy6r3qnpu7ruvm7qd4wjnznyzg5nu4
agd-1  | 2025-01-28T23:28:06.736Z SwingSet: vat: v85: ----- FlxAgg.7  6 makeOracleInvitation agoric1zj6vrrrjq4gsyr9lw7dplv4vyejg3p8j2urm82
agd-1  | 2025-01-28T23:28:06.746Z SwingSet: vat: v85: ----- FlxAgg.7  7 makeOracleInvitation agoric1ldmtatp24qlllgxmrsjzcpe20fvlkp448zcuce
agd-1  | 2025-01-28T23:28:06.753Z SwingSet: vat: v85: ----- FlxAgg.7  8 makeOracleInvitation agoric140dmkrz2e42ergjj7gyvejhzmjzurvqeq82ang
agd-1  | 2025-01-28T23:28:06.759Z SwingSet: vat: v85: ----- FlxAgg.7  9 makeOracleInvitation agoric1w8wktaur4zf8qmmtn3n7x3r0jhsjkjntcm3u6h
agd-1  | 2025-01-28T23:28:07.586Z SwingSet: vat: v1: awaiting depositFacet for dATOM-USD price feed member agoric10vjkvkmpp9e356xeh6qqlhrny2htyzp8hf88fk
agd-1  | 2025-01-28T23:28:07.591Z SwingSet: vat: v1: awaiting depositFacet for dATOM-USD price feed member agoric1lw4e4aas9q84tq0q92j85rwjjjapf8dmnllnft
agd-1  | 2025-01-28T23:28:07.596Z SwingSet: vat: v1: awaiting depositFacet for dATOM-USD price feed member agoric1qj07c7vfk3knqdral0sej7fa6eavkdn8vd8etf
agd-1  | 2025-01-28T23:28:07.600Z SwingSet: vat: v1: awaiting depositFacet for dATOM-USD price feed member agoric1ra0g6crtsy6r3qnpu7ruvm7qd4wjnznyzg5nu4
agd-1  | 2025-01-28T23:28:07.606Z SwingSet: vat: v1: awaiting depositFacet for dATOM-USD price feed member agoric1zj6vrrrjq4gsyr9lw7dplv4vyejg3p8j2urm82
agd-1  | 2025-01-28T23:28:07.616Z SwingSet: vat: v1: awaiting depositFacet for dATOM-USD price feed member agoric1ldmtatp24qlllgxmrsjzcpe20fvlkp448zcuce
agd-1  | 2025-01-28T23:28:07.630Z SwingSet: vat: v1: awaiting depositFacet for dATOM-USD price feed member agoric140dmkrz2e42ergjj7gyvejhzmjzurvqeq82ang
agd-1  | 2025-01-28T23:28:07.636Z SwingSet: vat: v1: awaiting depositFacet for dATOM-USD price feed member agoric1w8wktaur4zf8qmmtn3n7x3r0jhsjkjntcm3u6h
agd-1  | 2025-01-28T23:28:07.657Z SwingSet: vat: v1: Add Asset after next schedule's endtime: {"absValue":"[1738107162n]","timerBrand":"[Alleged: timerBrand]"}

On XNet, I used this GCloud Query

"modules": {
"utils": {
"runModuleBehaviors": "makeCoreProposalBehavior"
Expand Down
6 changes: 3 additions & 3 deletions src/config/inter/addVault/add-oracle.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

const manifestBundleRef = {
bundleID:
"b1-4fa91236698b96550e441179909297b8df96deea6a53bd3d5ae27415d0cab5cf620b8243a70e82a0c27807da572bf90a2094e169cb872e72fa975988b0a8257c"
"b1-c016d741a13041e8eefbd05fc5f645113e10beba55fdce2d5ed979bbb1c95077cf2edbe359d588e28bf68d837665458e65c1d534d32f090125951458c461a829"
};
const getManifestCall = harden([
"getManifestForPriceFeed",
Expand All @@ -22,7 +22,7 @@ const getManifestCall = harden([
maxSubmissionCount: 1000,
maxSubmissionValue:
115792089237316195423570985008687907853269984665640564039457584007913129639936n,
minSubmissionCount: 3,
minSubmissionCount: 3, // TODO: parameterize
Copy link
Collaborator

Choose a reason for hiding this comment

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

@otoole-brendan this means that minSubmissionCount will be 3 on xnet as well. Please confirm that this is OK.

Choose a reason for hiding this comment

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

Hmm that would mean needing to use 3x gov accounts with oracle rights to change price right? How are we handling this on Emerynet where control oracles with 2x Gov accounts?
I'm not keen on messing with the way we change prices on Emerynet (and Xnet) - that both require Gov1 and Gov 2 alone to do so unless we deem it necessary

Choose a reason for hiding this comment

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

or we adjust setPrice to use all 3 gov accounts as oracles

Copy link
Collaborator

Choose a reason for hiding this comment

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

@otoole-brendan writes elsewhere:

Let’s keep it as a constant across all networks then on the basis we don’t want to do more work by updating the app

minSubmissionValue: 1n,
restartDelay: 1,
timeout: 10,
Expand All @@ -31,7 +31,7 @@ const getManifestCall = harden([
"%%NoracleAddressesN%%"
],
priceAggregatorRef: {
bundleID: "b1-991f5fece438a302e710b2612f67a5bafd23362dc6e1a27228e3b6be3775cb07ef1d1456f3259256dc572effb7c671d8c882a3251b7551bf08e7f93f7d4c71e1",
bundleID: "b1-eca5ebeecb317450e049b450fa6449287844a324b0385cbc73e320adef79a168c71ffe441e95ef4ce7b4d15e62bb01ed87dace27d09646609ae3f20c5496a3e9",
Copy link
Collaborator

Choose a reason for hiding this comment

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

How is this bundle built?

I'd like to verify that I can reproduce it.

This applies to all 4 bundles that need to be uploaded.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

in the branch agoric-upgrade-18, I ran

agoric run packages/builders/scripts/inter-protocol/add-STARS.js

and that generated the four bundles.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I cannot confirm the add-oracle bundle.

the others look ok: priceAggregatorRef, scaledPriceAuthorityRef, add-vault

~/projects/agoric-sdk$ agoric run packages/builders/scripts/inter-protocol/add-STARS.js

~/projects/agoric-sdk$ jq '.bundles[].bundleID' *plan.json
"b1-eca5ebeecb317450e049b450fa6449287844a324b0385cbc73e320adef79a168c71ffe441e95ef4ce7b4d15e62bb01ed87dace27d09646609ae3f20c5496a3e9"
"b1-c016d741a13041e8eefbd05fc5f645113e10beba55fdce2d5ed979bbb1c95077cf2edbe359d588e28bf68d837665458e65c1d534d32f090125951458c461a829"
"b1-f8e2677e8dede9ccf194f31e8ed3183649fcb97cf22a17cb6b99883f27f38e3035bb3bf1d101ee008a9f6625de70b992cda94bd80f8ce5df1b812ace7cc2192e"
"b1-3ac516e8bb37fa0d6d493176649fab362c32b395bc614647aafbbd07b22f35c587c3bc8c6bcaa1a7f7e3606aa10ef695dda037532ce90818cf9d0fa4b2999c21"

~/projects/agoric-sdk$ git log10 -n 1
2024-12-24 23:50 f8c45b8a2e chore: update lockfiles

Copy link
Collaborator

@dckc dckc Jan 30, 2025

Choose a reason for hiding this comment

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

u18 ci (from Agoric/agoric-sdk#10773 , from Agoric/agoric-sdk@f8c45b8a2e) gets what I got:

Tue, 24 Dec 2024 18:58:08 GMT
agoric: run: running /home/runner/work/agoric-sdk/agoric-sdk/packages/builders/scripts/inter-protocol/add-STARS.js
...
    bundleID: 'b1-3ac516e8bb37fa0d6d493176649fab362c32b395bc614647aafbbd07b22f35c587c3bc8c6bcaa1a7f7e3606aa10ef695dda037532ce90818cf9d0fa4b2999c21'
...
    bundleID: 'b1-c016d741a13041e8eefbd05fc5f645113e10beba55fdce2d5ed979bbb1c95077cf2edbe359d588e28bf68d837665458e65c1d534d32f090125951458c461a829'

And it sounds like you can get c01... now too.

},
},
]);
Expand Down
5 changes: 3 additions & 2 deletions src/config/inter/addVault/add-vault-permit.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"consume": {
"mintHolder": true,
"scaledPriceAuthority": true
}
},
"produce": true
},
"instance": {
"produce": true,
Expand All @@ -37,4 +38,4 @@
"runModuleBehaviors": "makeCoreProposalBehavior"
}
}
}
}
4 changes: 2 additions & 2 deletions src/config/inter/addVault/add-vault.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

const manifestBundleRef = {
bundleID:
"b1-c676347a9ebe38af9bcfb6e18616e7faeff31b5ce5cee8e600a0e880587ce733c7ee2afcf01dd2e782c1a57ceb861a262ad96747b8962c055a17090c5609afc5"
"b1-3ac516e8bb37fa0d6d493176649fab362c32b395bc614647aafbbd07b22f35c587c3bc8c6bcaa1a7f7e3606aa10ef695dda037532ce90818cf9d0fa4b2999c21"
};
const getManifestCall = harden([
"getManifestForAddAssetToVault",
Expand All @@ -22,7 +22,7 @@ const getManifestCall = harden([
},
interestRateValue: undefined,
scaledPriceAuthorityRef: {
bundleID: "b1-affe49a2fd32d6f7a7453790f704fbb4e0180e9cba21439f46016c5add3378987a42ac3d540ec587321de52eadc98a19ff72354e1d058744315efced2b11494d",
bundleID: "b1-f8e2677e8dede9ccf194f31e8ed3183649fcb97cf22a17cb6b99883f27f38e3035bb3bf1d101ee008a9f6625de70b992cda94bd80f8ce5df1b812ace7cc2192e",
},
},
]);
Expand Down
Loading