-
Notifications
You must be signed in to change notification settings - Fork 215
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
deploy runStake to devnet (agoricdev-8) by cosmos governance #4348
Comments
It seems to work! I went over a bunch of screenshots with @dtribble and @michaelfig and a few others:
raw materials: https://github.com/Agoric/agoric-sdk/tree/4348-gov-demo 20a1513 I put the screenshots and a rought start at a slide deck in an internal drive: connection to voting dappalternatives:
|
1.1MB
|
size | file |
---|---|
155289 | compartment-map.json |
39751 | @agoric/store-v0.6.10-n180/src/patterns/patternMatchers.js |
24982 | @agoric/store-v0.6.10-n180/src/types.js |
21529 | @agoric/governance-v0.4.3-n175/src/types.js |
18411 | @endo/marshal-v0.6.3-n40/src/marshal.js |
18275 | @agoric/store-v0.6.10-n180/src/keys/checkKey.js |
17084 | @agoric/store-v0.6.10-n180/src/patterns/rankOrder.js |
15902 | @agoric/ertp-v0.13.3-n172/src/types.js |
15258 | @agoric/ertp-v0.13.3-n172/src/amountMath.js |
15076 | @agoric/zoe-v0.21.3-n186/src/contractSupport/zoeHelpers.js |
14567 | @agoric/store-v0.6.10-n180/src/patterns/encodePassable.js |
13466 | @agoric/governance-v0.4.3-n175/src/contractGovernance/paramManager.js |
13141 | @agoric/ertp-v0.13.3-n172/src/paymentLedger.js |
12468 | @agoric/run-protocol-v0.8.0-n178/src/runStake/runStakeKit.js |
11418 | @agoric/store-v0.6.10-n180/src/keys/merge-set-operators.js |
11366 | @agoric/zoe-v0.21.3-n186/src/contractSupport/priceAuthority.js |
10964 | @agoric/zoe-v0.21.3-n186/src/contractSupport/ratio.js |
10475 | @agoric/store-v0.6.10-n180/src/keys/merge-bag-operators.js |
10420 | @agoric/run-protocol-v0.8.0-n178/src/runStake/attestation.js |
10122 | @agoric/assert-v0.3.16-n174/src/types.js |
9864 | @agoric/zoe-v0.21.3-n186/src/internal-types.js |
9249 | @agoric/governance-v0.4.3-n175/src/contractGovernor.js |
9005 | @agoric/zoe-v0.21.3-n186/src/zoeService/types.js |
8782 | @agoric/zoe-v0.21.3-n186/src/contractFacet/types.js |
8287 | @agoric/notifier-v0.3.35-n176/src/notifier.js |
8252 | @agoric/notifier-v0.3.35-n176/src/asyncIterableAdaptor.js |
8091 | @endo/marshal-v0.6.3-n40/src/helpers/remotable.js |
7923 | @agoric/governance-v0.4.3-n175/src/binaryVoteCounter.js |
7822 | @agoric/store-v0.6.10-n180/src/keys/compareKeys.js |
7767 | @endo/marshal-v0.6.3-n40/src/passStyleOf.js |
7678 | @agoric/store-v0.6.10-n180/src/index.js |
7579 | @agoric/governance-v0.4.3-n175/src/question.js |
7563 | @agoric/run-protocol-v0.8.0-n178/src/runStake/runStakeManager.js |
7555 | @agoric/run-protocol-v0.8.0-n178/src/runStake/runStake.js |
7536 | @agoric/zoe-v0.21.3-n186/src/contractSupport/bondingCurves.js |
7535 | @agoric/run-protocol-v0.8.0-n178/src/interest.js |
7252 | @agoric/zoe-v0.21.3-n186/src/cleanProposal.js |
6652 | @endo/marshal-v0.6.3-n40/src/make-far.js |
6527 | @agoric/zoe-v0.21.3-n186/src/contracts/loan/types.js |
6194 | @agoric/store-v0.6.10-n180/src/stores/scalarMapStore.js |
6115 | @agoric/governance-v0.4.3-n175/src/contractGovernance/governParam.js |
5541 | @agoric/governance-v0.4.3-n175/src/contractHelper.js |
5473 | @agoric/notifier-v0.3.35-n176/src/types.js |
5092 | @agoric/zoe-v0.21.3-n186/tools/types.js |
5033 | @endo/marshal-v0.6.3-n40/src/helpers/symbol.js |
5020 | @endo/marshal-v0.6.3-n40/src/helpers/passStyle-helpers.js |
4982 | @agoric/governance-v0.4.3-n175/src/contractGovernance/typedParamManager.js |
4975 | @agoric/store-v0.6.10-n180/src/stores/scalarWeakMapStore.js |
4943 | @agoric/store-v0.6.10-n180/src/keys/copyBag.js |
4915 | @agoric/governance-v0.4.3-n175/src/contractGovernance/governApi.js |
4865 | @agoric/ertp-v0.13.3-n172/src/typeGuards.js |
4743 | @endo/marshal-v0.6.3-n40/src/helpers/error.js |
4505 | @agoric/zoe-v0.21.3-n186/src/contractSupport/index.js |
4235 | @agoric/store-v0.6.10-n180/src/stores/scalarSetStore.js |
4140 | @endo/marshal-v0.6.3-n40/src/typeGuards.js |
4139 | @agoric/store-v0.6.10-n180/src/keys/copySet.js |
4106 | @agoric/governance-v0.4.3-n175/src/index.js |
3996 | @endo/marshal-v0.6.3-n40/index.js |
3988 | @agoric/zoe-v0.21.3-n186/src/contractFacet/offerSafety.js |
3959 | @agoric/zoe-v0.21.3-n186/src/objArrayConversion.js |
3900 | @agoric/notifier-v0.3.35-n176/src/subscriber.js |
3706 | @agoric/store-v0.6.10-n180/src/stores/scalarWeakSetStore.js |
3683 | @agoric/ertp-v0.13.3-n172/src/issuerKit.js |
3598 | @endo/eventual-send-v0.14.8-n35/src/track-turns.js |
3335 | @agoric/zoe-v0.21.3-n186/src/contracts/priceAggregatorTypes.js |
3308 | @endo/marshal-v0.6.3-n40/src/deeplyFulfilled.js |
3251 | @endo/eventual-send-v0.14.8-n35/src/E.js |
3195 | @agoric/zoe-v0.21.3-n186/src/contractSupport/types.js |
3130 | @agoric/vat-data-v0.1.0-n182/src/index.js |
3091 | @agoric/swingset-vat-v0.25.1-n173/src/vats/timer/types.js |
3074 | @endo/nat-v4.1.8-n41/src/index.js |
3054 | @agoric/store-v0.6.10-n180/src/legacy/legacyMap.js |
3011 | @agoric/nat-v4.1.0-n2/dist/nat.esm.js |
2948 | @agoric/zoe-v0.21.3-n186/src/contracts/types.js |
2839 | @agoric/ertp-v0.13.3-n172/src/displayInfo.js |
2814 | @agoric/ertp-v0.13.3-n172/src/purse.js |
2749 | @agoric/governance-v0.4.3-n175/src/validators.js |
2633 | @agoric/store-v0.6.10-n180/src/stores/store-utils.js |
2564 | @agoric/governance-v0.4.3-n175/src/contractGovernance/assertions.js |
2531 | @agoric/run-protocol-v0.8.0-n178/src/contractSupport.js |
2492 | @agoric/zoe-v0.21.3-n186/src/typeGuards.js |
2487 | @endo/promise-kit-v0.2.37-n43/index.js |
2314 | @endo/marshal-v0.6.3-n40/src/helpers/iter-helpers.js |
2237 | @agoric/run-protocol-v0.8.0-n178/src/interest-math.js |
2198 | @endo/marshal-v0.6.3-n40/src/helpers/copyRecord.js |
1940 | @agoric/store-v0.6.10-n180/src/patterns/internal-types.js |
1922 | @agoric/ertp-v0.13.3-n172/src/mathHelpers/setMathHelpers.js |
1911 | @agoric/store-v0.6.10-n180/src/legacy/legacyWeakMap.js |
1890 | @endo/marshal-v0.6.3-n40/src/helpers/tagged.js |
1889 | @endo/marshal-v0.6.3-n40/src/helpers/copyArray.js |
1865 | @agoric/notifier-v0.3.35-n176/src/index.js |
1777 | @agoric/zoe-v0.21.3-n186/src/contracts/callSpread/types.js |
1775 | @agoric/assert-v0.3.16-n174/src/assert.js |
1707 | @agoric/zoe-v0.21.3-n186/src/types.js |
1652 | @endo/marshal-v0.6.3-n40/src/marshal-stringify.js |
1567 | @agoric/ertp-v0.13.3-n172/src/mathHelpers/natMathHelpers.js |
1422 | @agoric/zoe-v0.21.3-n186/src/contractSupport/statistics.js |
1389 | @agoric/ertp-v0.13.3-n172/src/mathHelpers/copySetMathHelpers.js |
1369 | @agoric/ertp-v0.13.3-n172/src/mathHelpers/copyBagMathHelpers.js |
1213 | @agoric/zoe-v0.21.3-n186/src/contractSupport/priceQuote.js |
1160 | @agoric/zoe-v0.21.3-n186/src/contractSupport/stateMachine.js |
1080 | @endo/marshal-v0.6.3-n40/src/makeTagged.js |
1033 | @agoric/ertp-v0.13.3-n172/src/brand.js |
1002 | @agoric/zoe-v0.21.3-n186/src/contractSupport/safeMath.js |
997 | @agoric/run-protocol-v0.8.0-n178/src/makeTracer.js |
968 | @agoric/zoe-v0.21.3-n186/src/makeHandle.js |
881 | @agoric/governance-v0.4.3-n175/src/constants.js |
866 | @agoric/zoe-v0.21.3-n186/exported.js |
839 | @agoric/ertp-v0.13.3-n172/src/payment.js |
746 | @agoric/governance-v0.4.3-n175/src/closingRule.js |
637 | @endo/far-v0.1.9-n36/src/index.js |
467 | @endo/eventual-send-v0.14.8-n35/src/no-shim.js |
426 | @agoric/zoe-v0.21.3-n186/src/contracts/exported.js |
410 | @agoric/ertp-v0.13.3-n172/src/index.js |
348 | @agoric/store-v0.6.10-n180/exported.js |
292 | @agoric/swingset-vat-v0.25.1-n173/exported.js |
270 | @agoric/notifier-v0.3.35-n176/exported.js |
270 | @agoric/ertp-v0.13.3-n172/exported.js |
230 | @endo/marshal-v0.6.3-n40/src/types.js |
I told @michaelfig that I did not want to do fragmentation and reassembly of bundles... but based on some bundle handling clues from @kriskowal , I figured maybe it would be fun after all. It seems to be working... https://github.com/Agoric/agoric-sdk/tree/dc-installInPieces daae934
|
It's out for votes! txhash: |
@arirubinstein suggested I do a demo of getting RUN with staked BLD using the REPL. @samsiegart I'd like to test whether the front end can work with this contract, but I kinda doubt it. In particular, I didn't re-arrange the notifiers. |
Another idea: show how to verify the correspondence between the contract in the proposal with a git hash in this repo. |
nice to have:
|
runStake is deployed to devnetWe verified this in office hours today:
|
Verified: borrowed RUN against staked BLDI was running with my client on a branch with special wallet support:
We start with an address of agoric1yumvyl7f5nkalss7w59gs6n3jtqv5gmarudx55 and 0 BLD:
Then we use the faucet to give ourselves some BLD in tx 9317B7EE...
Then stake 12 in tx 7389036...
Now in the wallet REPL, our account state shows 12 BLD bonded. We then get an attestation for a lien on 2:
Now we get the runStake instance (called
The amount of the attestation is a semi-fungible token bearing the address and the number of tokens:
Now we organize the RUN brand and purse (from the wallet admin facet):
Now we make an offer including a proposal and attestation payment:
The result includes a vault with invitationMakers and a couple notifiers:
Let's look at the payouts. An empty Attestation payout is not surprising. And lo! half a RUN!
And now our account state shows 2 BLD liened:
|
These would be nice to have, but I'm going to call them out of scope and close this:
p.s. I worked on this 7 different days, so that's between 7 and 14 chunks vs. the estimated 2. |
What is the Problem Being Solved?
In A Look at Our Recent Public Sale 22 Jan, we see:
How do the BLD holders launch the contracts? In particular, RUNstake (#3788), known as getRUN in the Feb 15 Deep Dive into Agoric: JavaScript Smart Contracts:
How do these contracts get access to closely held objects such as the RUN mint after bootstrap?
Description of the Design
In #4165 we arranged for "core" bootstrap, which consists of a collection of behaviors that produce and consume objects in named slots, and a manifest / permit system to declaratively specify which behaviors should get access to which objects. (Note: we recorded a 9 March bootstrap walkthrough as part of the Restival RUN protocol "purple team" security review.)
In #4642 we introduced a cosmos governance proposal type called
swingset-core-eval
, which consists of one or more additional behaviors, in source form, along with their permits. If the proposal passes, the code is evaluated and the resulting behavior is run with access to the permitted core bootstrap objects.Security Considerations
It's critical to correctly apply the Principle of Least Authority to objects such as:
Test Plan
Demonstrate
swingset-core-eval
governance in alocal-solo
single-node chain: boot gov demo recording - 10min passcode:Tis6#D9M
Feb 27agoric start local-chain
agoric start local-solo
clientswingset-core-eval
governance proposal to start the RUN protocolgovernance proposal to devnet: https://devnet.explorer.agoric.net/proposals/2 Start RUNstake
txhash: ACA4515A108C094B1F49893C29D85434A40EEC96FB058CDC7DC16DA98F30740F
2022-04-05T01:17:19Z
true
wildcard. For follow-up, see RUN bootstrap packaging does not support post-genesis deployment #5029.)Note: The 4348-gov-demo branch thru 20a1513 was a spike; the parts worth keeping are now elsewhere.
Options
Nice to have:
The text was updated successfully, but these errors were encountered: