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 Crabble proposal #41

Closed
wants to merge 4 commits into from
Closed

Conversation

anilhelvaci
Copy link
Contributor

@anilhelvaci anilhelvaci commented Dec 12, 2023

@anilhelvaci
Copy link
Contributor Author

cc @turadg @dckc

@dckc
Copy link
Member

dckc commented Dec 12, 2023

I've requested some docs to help us verify that we can generate these assets.

@dckc
Copy link
Member

dckc commented Dec 12, 2023

struggling to reproduce assets

I downloaded the assets from the release; I can confirm that they're the same as here in 7101185, but I'm not able to reproduce them from source.

oops... using wrong agoric sdk

Using agoric-11-wf I did agoric install and then prepare-evals, but when I compare the downloaded assets to my results, I get:

$ diff -ur assets ~/Desktop/cr/ | cut -c 1-200
diff -ur assets/bundle-contract.json /home/connolly/Desktop/cr/bundle-contract.json
--- assets/bundle-contract.json 2023-12-12 11:18:33.699608485 -0600
+++ /home/connolly/Desktop/cr/bundle-contract.json      2023-12-12 11:18:59.043118352 -0600
@@ -1 +1 @@
-{"moduleFormat":"endoZipBase64","endoZipBase64":"UEsDBAoAAAAAAAAAAAA1+bjbbrsBAG67AQAUAAAAY29tcGFydG1lbnQtbWFwLmpzb257CiAgInRhZ3MiOiBbXSwKICAiZW50cnkiOiB7CiAgICAiY29tcGFydG1lbnQiOiAiY3JhYmJsZS1jb250cm
\ No newline at end of file
+{"moduleFormat":"endoZipBase64","endoZipBase64":"UEsDBAoAAAAAAAAAAACD1Z0k0aQBANGkAQAUAAAAY29tcGFydG1lbnQtbWFwLmpzb257CiAgImVudHJ5IjogewogICAgImNvbXBhcnRtZW50IjogImNyYWJibGUtY29udHJhY3QtdjAuMS4wIiwKIC
\ No newline at end of file
diff -ur assets/bundle-governor.json /home/connolly/Desktop/cr/bundle-governor.json
--- assets/bundle-governor.json 2023-12-12 11:18:33.699608485 -0600
+++ /home/connolly/Desktop/cr/bundle-governor.json      2023-12-12 11:19:13.438840099 -0600
@@ -1 +1 @@
-{"moduleFormat":"endoZipBase64","endoZipBase64":"UEsDBAoAAAAAAAAAAAAgUHPvY2ABAGNgAQAUAAAAY29tcGFydG1lbnQtbWFwLmpzb257CiAgInRhZ3MiOiBbXSwKICAiZW50cnkiOiB7CiAgICAiY29tcGFydG1lbnQiOiAiY3JhYmJsZS1jb250cm
\ No newline at end of file
+{"moduleFormat":"endoZipBase64","endoZipBase64":"UEsDBAoAAAAAAAAAAACpqYjYYkQBAGJEAQAUAAAAY29tcGFydG1lbnQtbWFwLmpzb257CiAgImVudHJ5IjogewogICAgImNvbXBhcnRtZW50IjogImNyYWJibGUtY29udHJhY3QtdjAuMS4wIiwKIC
\ No newline at end of file
diff -ur assets/crabbleCoreEval.js /home/connolly/Desktop/cr/crabbleCoreEval.js
--- assets/crabbleCoreEval.js   2023-12-12 11:18:33.695608562 -0600
+++ /home/connolly/Desktop/cr/crabbleCoreEval.js        2023-12-12 11:19:20.246708548 -0600
@@ -130,8 +130,8 @@
  * }>} committeeInfoP
  */
 const startCrabble = async (powers, config, crabbleNode, committeeInfoP) => {
-  const contractBundleID = "b1-3444d93fafc0ac644511e9f51580e39ffd5bac156a391e30d9d61ce23b3d60a6dbaefcf29167d98241a5809518a272850d011844366178f2472b82e6849fd5bb";
-  const governorBundleID = "b1-f28401e9faa212dc3fda38aee6fd1003f7d1a6cf19dcd704a441c6323b321cf4e458e39f1fb07358f9a75ddd5dbc2b65d2631659671c8d2a9fd630fedbe24d94";
+  const contractBundleID = "b1-145f84363c784c96bc5a5d456edf1853bf2bb04388a250f010a53234b333af46d8d08e3c58d6e3bac61c45b18e82a09199938466616016a22d9191448f8e505c";
+  const governorBundleID = "b1-d67b9ac5100bf45a3369d393fe2cb38e0718f770cac936292a18270ed331865ffa817719f5c6ceacdb1a580572d71084db0545e8e13efaee38c7df76f51f756c";
 
   const {
     consume: {

For reference, prepare-evals output looks like...

$ make prepare-evals
node /home/connolly/projects/crabbleProtocol/source_code/contract/src/proposals/prepareCoreEval.js
{
  OUT_DIR_ROOT: '/home/connolly/projects/crabbleProtocol/source_code',
  RENDER_EVALS: undefined
}
{
  value: [
    'agoric1ag5a8lhn00h4u9h2shpfpjpaq6v4kku54zk69m',
    'agoric140y0mqnq7ng5vvxxwpfe67988e5vqar9whg309',
    'agoric1wqfu6hu5q2qtey9jtjapaae4df9zd492z4448k'
  ]
}
{ value: 3 }
{ value: 'CrabbleCommittee' }
[bundleTool] /home/connolly/projects/crabbleProtocol/source_code/bundles bundle-crabble.js valid: 208 files bundled at 2023-12-12T17:18:32.528Z with size 1636461 
[bundleTool] /home/connolly/projects/crabbleProtocol/source_code/bundles bundle-crabbleGovernor.js valid: 143 files bundled at 2023-12-12T17:18:33.692Z with size 1181781 
DONE

Copy link
Member

@dckc dckc left a comment

Choose a reason for hiding this comment

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

I can't reproduce the bundled assets.

oops... was using the wrong agoric-sdk

Comment on lines 133 to 134
const contractBundleID = "b1-145f84363c784c96bc5a5d456edf1853bf2bb04388a250f010a53234b333af46d8d08e3c58d6e3bac61c45b18e82a09199938466616016a22d9191448f8e505c";
const governorBundleID = "b1-d67b9ac5100bf45a3369d393fe2cb38e0718f770cac936292a18270ed331865ffa817719f5c6ceacdb1a580572d71084db0545e8e13efaee38c7df76f51f756c";
Copy link
Member

Choose a reason for hiding this comment

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

As noted in #41 (comment) , I'm not able to reproduce these bundle hashes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here's how everything happened when I tried it:

anil@Anils-MacBook-Pro source_code % make prepare-evals
node /Users/anil/WebstormProjects/agoric-samples/a3p-bundle-experiment/crabbleProtocol/source_code/contract/src/proposals/prepareCoreEval.js
{
  OUT_DIR_ROOT: '/Users/anil/WebstormProjects/agoric-samples/a3p-bundle-experiment/crabbleProtocol/source_code',
  RENDER_EVALS: undefined
}
{
  value: [
    'agoric1ag5a8lhn00h4u9h2shpfpjpaq6v4kku54zk69m',
    'agoric140y0mqnq7ng5vvxxwpfe67988e5vqar9whg309',
    'agoric1wqfu6hu5q2qtey9jtjapaae4df9zd492z4448k'
  ]
}
{ value: 3 }
{ value: 'CrabbleCommittee' }
[bundleTool] /Users/anil/WebstormProjects/agoric-samples/a3p-bundle-experiment/crabbleProtocol/source_code/bundles add: crabble from /Users/anil/WebstormProjects/agoric-samples/a3p-bundle-experiment/crabbleProtocol/source_code/contract/src/crabble.js 
[bundleTool] /Users/anil/WebstormProjects/agoric-samples/a3p-bundle-experiment/crabbleProtocol/source_code/bundles bundled 205 files in bundle-crabble.js at 2023-12-12T20:07:51.192Z 
[bundleTool] /Users/anil/WebstormProjects/agoric-samples/a3p-bundle-experiment/crabbleProtocol/source_code/bundles add: crabbleGovernor from /Users/anil/WebstormProjects/agoric-samples/a3p-bundle-experiment/crabbleProtocol/source_code/contract/src/crabbleGovernor.js 
[bundleTool] /Users/anil/WebstormProjects/agoric-samples/a3p-bundle-experiment/crabbleProtocol/source_code/bundles bundled 137 files in bundle-crabbleGovernor.js at 2023-12-12T20:07:52.208Z 
DONE
anil@Anils-MacBook-Pro source_code % diff -ur assets ../../../crabbleProtocol/source_code/assets
anil@Anils-MacBook-Pro source_code % diff -ur assets ../../../crabbleProtocol/source_code/assets | cut -c 1-200
anil@Anils-MacBook-Pro source_code % jq ".endoZipBase64Sha512" assets/bundle-contract.json
"145f84363c784c96bc5a5d456edf1853bf2bb04388a250f010a53234b333af46d8d08e3c58d6e3bac61c45b18e82a09199938466616016a22d9191448f8e505c"
anil@Anils-MacBook-Pro source_code % jq ".endoZipBase64Sha512" assets/bundle-governor.json 
"d67b9ac5100bf45a3369d393fe2cb38e0718f770cac936292a18270ed331865ffa817719f5c6ceacdb1a580572d71084db0545e8e13efaee38c7df76f51f756c"

Is there any chance you forgot to check out the commit hash I provided in the release docs? @dckc

git checkout 0cb86ed3ce19f211ee033fcad9fa95ce2097e0d3

@dckc
Copy link
Member

dckc commented Dec 12, 2023

Also, per naming, the directory should start with a letter, not 63:. Until it goes on chain, we can't be sure that this will be proposal #63. In particular, upgrade13 might go first.

@anilhelvaci
Copy link
Contributor Author

Also, per naming, the directory should start with a letter, not 63:. Until it goes on chain, we can't be sure that this will be proposal #63. In particular, upgrade13 might go first.

Sure will fix that!

@dckc
Copy link
Member

dckc commented Dec 12, 2023

In discussion with Anil, I realized I had the 11wf version of agoric-sdk checked out, but the CLI I was using wasn't pointing to it.

I have now reproduced the bundles in 7101185 from crabble v 0cb86ed and agoric-sdk v e669bb12f

@dckc
Copy link
Member

dckc commented Dec 12, 2023

I'm standing by for an update to this PR based on crabble v 122c775

Copy link
Member

@dckc dckc left a comment

Choose a reason for hiding this comment

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

@dckc
Copy link
Member

dckc commented Dec 12, 2023

I'm inclined to enable automerge, but I'm not sure whether to go with merge, squash, or rebase. @turadg , opinions?

@turadg turadg enabled auto-merge (squash) December 12, 2023 23:00
@turadg turadg mentioned this pull request Dec 13, 2023
@turadg
Copy link
Member

turadg commented Dec 13, 2023

Failing now on,

ERROR: failed to solve: failed to push ghcr.io/agoric/agoric-3-proposals:pr-41: unexpected status from POST request to https://ghcr.io/v2/agoric/agoric-3-proposals/blobs/uploads/: 403 Forbidden

We're running into this: https://github.com/orgs/community/discussions/27348

https://docs.github.com/en/actions/learn-github-actions/contexts#github-context explains under github.actor,

The username of the user that triggered the initial workflow run. If the workflow run is a re-run, this value may differ from github.triggering_actor. Any workflow re-runs will use the privileges of github.actor, even if the actor initiating the re-run (github.triggering_actor) has different privileges.

So my re-runs were re-using Anil's prviledges, which are read-only on GHCR. Maybe it would work if I pushed to the branch, but it's on https://github.com/anilhelvaci/agoric-3-proposals so I don't have permission. To expedite getting this into main, I'll just start a new PR with this proposal.

@turadg turadg closed this in #45 Dec 13, 2023
auto-merge was automatically disabled December 13, 2023 16:37

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deploy Crabble in a3p Add deployment test
3 participants