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

add proposal 87 Fast USDC Beta #220

Merged
merged 6 commits into from
Feb 19, 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
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*.json
proposals/87:fast-usdc-beta/submission/
3 changes: 3 additions & 0 deletions proposals/87:fast-usdc-beta/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# intermediate files on the way to finding the tx
proposer.json
proposer-tx-hist.json
1 change: 1 addition & 0 deletions proposals/87:fast-usdc-beta/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
42 changes: 42 additions & 0 deletions proposals/87:fast-usdc-beta/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# This Makefile is here to help you find out what went on the
# chain for a CoreEval proposal such as #76 for vaults / auctions.
PROPOSAL=87

##
# Find the proposal transaction

# To find the transaction, let's start with: Who proposed 76?
proposer.json:
agd --node $(ARCHIVE_NODE) query gov proposer $(PROPOSAL) -o json >$@

# Get proposer's tranasction history.
Copy link
Member

Choose a reason for hiding this comment

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

transaction

proposer-tx-hist.json: proposer.json
PROPOSER="$$(jq -r .proposer $<)"; \
agd --node $(ARCHIVE_NODE) query txs --events="message.sender=$$PROPOSER" -o json >$@

# pick out their most recent CoreEvalProposal
tx.json: proposer-tx-hist.json
jq '.txs | .[] | select(.tx.body.messages[0].content["@type"] == "/agoric.swingset.CoreEvalProposal")' \
$< >$@

# A CoreEval proposal has a sequence of json_permits,js_code pairs.
# We happen to know there were 2 in this case, and we have
# been using certain filenames for them.

EVALS=submission/start-fast-usdc-permit.json submission/start-fast-usdc.js

core-evals: $(EVALS)

# Now pick out their contents from the transaction.
submission/start-fast-usdc-permit.json: tx.json
jq -r '.tx.body.messages[0].content.evals[0].json_permits' $< >$@
submission/start-fast-usdc.js: tx.json
jq -r '.tx.body.messages[0].content.evals[0].js_code' $< >$@

# clean up locally computed files
clean:
rm -f $(EVALS)

# clean up files cached from the network as well
realclean: clean
rm -f tx.json proposer.json tx-hist-proposer.json
6 changes: 6 additions & 0 deletions proposals/87:fast-usdc-beta/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# CoreEvalProposal to upgrade vaults and auctions
Copy link
Member

Choose a reason for hiding this comment

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

revise


The `submission` permit and script are extracted from proposal 87 submitted to mainNet. (see `Makefile`)

Matching bundles are available from:
https://github.com/Agoric/agoric-sdk/releases/tag/fast-usdc-beta-1 0303d15
7 changes: 7 additions & 0 deletions proposals/87:fast-usdc-beta/eval.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
set -e

echo "[$PROPOSAL] Running proposal declared in package.json"
# copy to run in the proposal package so the dependencies can be resolved
cp /usr/src/upgrade-test-scripts/eval_submission.js .
Copy link
Member

Choose a reason for hiding this comment

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

this file shouldn't be necessary. it's doing the same as happens if it's absent.

# newer proposals declare a submission
echo "[$PROPOSAL] Running proposal declared in package.json"
# copy to run in the proposal package so the dependencies can be resolved
cp /usr/src/upgrade-test-scripts/eval_submission.js .
./eval_submission.js
fi

./eval_submission.js
23 changes: 23 additions & 0 deletions proposals/87:fast-usdc-beta/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"agoricProposal": {
"type": "/agoric.swingset.CoreEvalProposal",
"releaseNotes": "https://github.com/Agoric/agoric-sdk/releases/tag/fast-usdc-beta-1"
},
"type": "module",
"license": "Apache-2.0",
"dependencies": {
"@agoric/synthetic-chain": "~0.5.2",
"ava": "^5.3.1"
},
"ava": {
"concurrency": 1,
"timeout": "2m",
"files": [
"!submission"
]
},
"scripts": {
"agops": "yarn --cwd /usr/src/agoric-sdk/ --silent agops"
},
"packageManager": "yarn@4.2.2"
}

Large diffs are not rendered by default.

Large diffs are not rendered by default.

46 changes: 46 additions & 0 deletions proposals/87:fast-usdc-beta/submission/start-fast-usdc-permit.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"produce": {
"fastUsdcKit": true
},
"consume": {
"bankManager": true,
"chainStorage": true,
"chainTimerService": true,
"localchain": true,
"cosmosInterchainService": true,
"startUpgradable": true,
"zoe": "makeCoreProposalBehavior",
"agoricNames": true,
"namesByAddress": true,
"board": true,
"agoricNamesAdmin": "makeCoreProposalBehavior",
"vatAdminSvc": "makeCoreProposalBehavior"
},
"issuer": {
"produce": {
"FastLP": true
}
},
"brand": {
"produce": {
"FastLP": true
}
},
"instance": {
"produce": {
"fastUsdc": true
}
},
"installation": {
"consume": {
"fastUsdc": true
},
"produce": "makeCoreProposalBehavior"
},
"evaluateBundleCap": "makeCoreProposalBehavior",
"modules": {
"utils": {
"runModuleBehaviors": "makeCoreProposalBehavior"
}
}
}
Loading