-
Notifications
You must be signed in to change notification settings - Fork 229
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(vm-config): vats/init-core.js
relies on econCommittee
#11056
base: master
Are you sure you want to change the base?
Conversation
Deploying agoric-sdk with
|
Latest commit: |
3dbddef
|
Status: | ✅ Deploy successful! |
Preview URL: | https://e1191434.agoric-sdk.pages.dev |
Branch Preview URL: | https://mfig-devnet-config-steps.agoric-sdk.pages.dev |
8e33f9c
to
4c363ab
Compare
init-core.js
relies on inter-protocol
vats/init-core.js
relies on econCommittee
4c363ab
to
ef30b2a
Compare
ef30b2a
to
272bd32
Compare
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 think some unit tests are worthwhile for the fixes.
And I think there's more to say about Upgrade Considerations.
@@ -50,10 +50,10 @@ export const makeStoreHooks = (store, log = noop) => { | |||
return; | |||
} | |||
if (store.has(name)) { | |||
console.warn('cannot save duplicate:', name); | |||
return; | |||
store.set(name, value); |
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 would this change get to mainnet?
"n/a" doesn't seem to suffice for upgrade considerations.
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 about adding a test in test-promise-space.js
for this fix?
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 do we validate this change in a testnet?" will eventually be asked. If the answer is "it's not cost-effective" then that should go in Testing Considerations.
if (!nameToState.has(name)) { | ||
return; | ||
} |
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 about adding a test in test-promise-space.js
for this fix too?
packages/vats/src/core/utils.js
Outdated
if (present) { | ||
void E.sendOnly(nameAdmin).delete(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.
seems worth a unit test in test-name-hub-published.js
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.
but again... how do we deploy this change to mainnet?
Maybe the answer is "we don't" but that merits something explicit in upgrade considerations.
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.
This change is outdated since I simplified the utils.js
change to just one line.
refs: #11053 #11056 ## Description This PR incorporates the original #11053 fix as installed on agoricdev-25 of [the Agoric devnet](https://devnet.agoric.net). #11056 contains a cleaner fix to be merged with master. ### Security Considerations n/a ### Scaling Considerations Bootstrap only: should not affect resource consumption. ### Documentation Considerations n/a ### Testing Considerations Tested manually and on Agoric devnet. ### Upgrade Considerations Will only affect new devnet chains and followers.
e7b8cf6
to
cab5376
Compare
cab5376
to
3dbddef
Compare
@dckc, I still owe you a few little tests, but now that I've simplified the changes and adequately written up the PR description, I'd appreciate your rereview so I can address all the comments at once during the next push. |
@@ -221,6 +221,7 @@ export const makePromiseSpaceForNameHub = (nameAdmin, log = noop) => { | |||
logHooks.onAddKey(name); | |||
}, | |||
onResolve: (name, valueP) => { | |||
void E(nameAdmin).reserve(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.
interesting solution
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.
upgrade considerations and such look good
I approve presuming the unit tests as discussed.
closes: #11053
Description
A catch-22 was introduced when
vats/init-core.js
andinter-protocol/init-core.js
were separated into different coreProposal steps:startWalletFactory
would not advance to the next step untilprovisionPool
was instantiated with governance, butprovisionPool
was established in a later step.Moving them to the same step was the expedient approach taken by #11058, but breaking the deadlock by decoupling the completion of
startWalletFactory
from theprovisionPool
governance seems cleaner, and less dependent upon subtle@agoric/vm-config
steps.Breaking the deadlock was crucial for solving #11053 , so that smart wallets can be properly provisioned even if
inter-protocol
governance occurs in a later step thanvats/init-core.js
.Also in this PR:
producer.resolve(x)
is called, immediately nameHubAdmin.reserve the key, even if x settles much lateronReset
unlessproducer.reset()
actually modified somethingSecurity Considerations
n/a
Scaling Considerations
No additional resource consumption.
Documentation Considerations
n/a
Testing Considerations
Manually tested as specified in #11053 , but it would be good to test in CI if it can be done without significantly affecting CI duration.
To test this in a testnet, just boot it from genesis, and verify that smart wallets can be successfully provisioned via the faucet (don't forget to send some funds to the
provisionPool
oruist
to the faucet account!).Upgrade Considerations
The bootstrap vat JS code is not upgradable for existing chains, so much of the changes in this PR will not affect those chains. Besides that, the
agoricNames
vat andprovisioning
vat host nameHubs, so theValue for ${key} has been deleted
diagnostic will continue to lack the${key}
until they are upgraded.Future chains booted from genesis will benefit the most from these changes.