dsrvlabs / czg-keremony

JavaScript-based client to participate in Ethereum KZG Ceremony
https://dsrv.com
MIT License
13 stars 4 forks source link

Separate steps for air-gapped contribution #35

Closed rootwarp closed 1 year ago

rootwarp commented 1 year ago

Separate the contribution steps for supporting air-gapped contribution.

rootwarp commented 1 year ago

Tested on local and dev sequencer.

rootwarp@Mindhack2021 ~/g/d/dsrv-kzg-ceremony separate > ./index.js try-contribute -s https://kzg-ceremony-sequencer-dev.fly.dev
2023-03-31 18:41:59 [ info ] Start try contribution
? Which method do you prefer for authentication? github
https://github.com/login/oauth/authorize?response_type=code&client_id=3c984b3a235318fe6d23&state=eyJyZWRpcmVjdCI6bnVsbH0&redirect_uri=https%3A%2F%2Fkzg-ceremony-sequencer-dev.fly.dev%2Fauth%2Fcallback%2Fgithub

? Input your session ID:  5f05f72c-7f6a-415c-84d7-fc4966dbacbb
2023-03-31 18:42:15 [ info ] Try and Wait...
2023-03-31 18:42:20 [ info ] Previous contribution is written on contribution_5f05f72c-7f6a-415c-84d7-fc4966dbacbb.json
rootwarp@Mindhack2021 ~/g/d/dsrv-kzg-ceremony separate > ./index.js execute-ceremony -f ./contribution_5f05f72c-7f6a-415c-84d7-fc4966dbacbb.json
2023-03-31 18:42:47 [ info ] Start Execute Ceremony
2023-03-31 18:42:47 [ info ] Run Ceremony...
2023-03-31 18:42:47 [ info ] Decoding contributions....
2023-03-31 18:42:57 [ info ] Update Power of Tau...
2023-03-31 18:42:57 [ info ] Run contribute worker
2023-03-31 18:42:57 [ info ] Run contribute worker
2023-03-31 18:42:57 [ info ] Run contribute worker
2023-03-31 18:42:57 [ info ] Run contribute worker
2023-03-31 18:43:18 [ info ] Receive new contribution
2023-03-31 18:43:31 [ info ] Receive new contribution
2023-03-31 18:44:01 [ info ] Receive new contribution
2023-03-31 18:44:58 [ info ] Receive new contribution
2023-03-31 18:44:58 [ info ] Update Witnesses...
2023-03-31 18:44:58 [ info ] Encoding...
2023-03-31 18:44:58 [ info ] New contribution is written on new_contribution.json
rootwarp@Mindhack2021 ~/g/d/dsrv-kzg-ceremony separate > ./index.js contribute -f ./new_contribution.json --session_id 5f05f72c-7f6a-415c-84d7-fc4966dbacbb
2023-03-31 18:45:11 [ info ] Submit contribution
2023-03-31 18:45:11 [ info ] Send contributions
^C
rootwarp@Mindhack2021 ~/g/d/dsrv-kzg-ceremony separate > ./index.js contribute -f ./new_contribution.json --session_id 5f05f72c-7f6a-415c-84d7-fc4966dbacbb -s https://kzg-ceremony-sequencer-dev.fly.dev
2023-03-31 18:45:28 [ info ] Submit contribution
2023-03-31 18:45:28 [ info ] Send contributions
2023-03-31 18:45:36 [ info ] Successfully contributed!
2023-03-31 18:45:36 [ info ] {
  receipt: '{"identity":"git|9974087|rootwarp","witness":["0xa549da1086523c082c695b7d8493f1a5c7496f5f8f248e7bcd2d8bab428cdaaa6afec72d77ce1cd21e4452f5b5e3b1e815f03a1cdc32707d101ceb5fb466e404f7070c58263eea1a149b3418e4ce17798062a28edd20c26b6d180b3ee0463bb8","0x8c86970986c9d4e209157a68d779f98fb028b443944a817f81e0230b8318387ede16d564dfe28f10db14752671efdf0a096be81f6252b2819335e2c3ea808cd5e8d210c0ea2af4beeee8fdc5d0ea6eec1eacdd617c8bec0946840192d7ab9f0b","0x863e346954dad44423e6c052da698f9fe0ebb140943187ab9112bd92692b9b0ff00d2b5750ec729a79e6b10b673d96f30a0e9afc3eed090e20208f645f4187e63df7d82290a20a393dc26bbec6bd10914ec1c036b85eec84da3c4e3681a252b3","0xa9a77bd62ff54103048ea46e5850439683c55926a9a9102c59309ae47f3131055dc9bf3187a7c0b63ed60891f5c17b050c868de03c44b739b2c19d11c2bdfba8a2a7d5dbcb18be8e21c55d0d588ec68a7e72e801284c1ebe6a7511d35d32b00c"]}',
  signature: '1ccf296ecb18683756fbd56445039dc5c045e58a931eed77f4f9f10326bc20e45462d978caeab01f5c0cb4b76b15f4108bc8d5a934b0bc52a0fc24bd854d98231c'
}
rootwarp@Mindhack2021 ~/g/d/dsrv-kzg-ceremony separate >
kim201212 commented 1 year ago

Tested

hg  ~/workspace/kzg-ceremony/czg-keremony   separate  ./index.js try-contribute -s https://kzg-ceremony-sequencer-dev.fly.dev
2023-04-03 15:07:05 [ info ] Start try contribution
? Which method do you prefer for authentication? github
https://github.com/login/oauth/authorize?response_type=code&client_id=3c984b3a235318fe6d23&state=eyJyZWRpcmVjdCI6bnVsbH0&redirect_uri=https%3A%2F%2Fkzg-ceremony-sequencer-dev.fly.dev%2Fauth%2Fcallback%2Fgithub

? Input your session ID:  1192432f-8f3d-48f3-9954-1cb934f659f3
2023-04-03 15:07:23 [ info ] Try and Wait...
2023-04-03 15:07:25 [ info ] Previous contribution is written on contribution_1192432f-8f3d-48f3-9954-1cb934f659f3.json
 hg  ~/workspace/kzg-ceremony/czg-keremony   separate  ./index.js execute-ceremony -f contribution_1192432f-8f3d-48f3-9954-1cb934f659f3.json
2023-04-03 15:08:06 [ info ] Start Execute Ceremony
2023-04-03 15:08:06 [ info ] Run Ceremony...
2023-04-03 15:08:06 [ info ] Decoding contributions....
2023-04-03 15:08:23 [ info ] Update Power of Tau...
2023-04-03 15:08:23 [ info ] Run contribute worker
2023-04-03 15:08:23 [ info ] Run contribute worker
2023-04-03 15:08:23 [ info ] Run contribute worker
2023-04-03 15:08:23 [ info ] Run contribute worker
2023-04-03 15:08:58 [ info ] Receive new contribution
2023-04-03 15:09:31 [ info ] Receive new contribution
2023-04-03 15:10:28 [ info ] Receive new contribution
2023-04-03 15:12:41 [ info ] Receive new contribution
2023-04-03 15:12:41 [ info ] Update Witnesses...
2023-04-03 15:12:41 [ info ] Encoding...
2023-04-03 15:12:41 [ info ] New contribution is written on new_contribution.json

 ✘ hg  ~/workspace/kzg-ceremony/czg-keremony   separate  ./index.js contribute -f ./new_contribution.json --session_id 1192432f-8f3d-48f3-9954-1cb934f659f3 -s https://kzg-ceremony-sequencer-dev.fly.dev
2023-04-03 15:13:49 [ info ] Submit contribution
2023-04-03 15:13:49 [ info ] Send contributions
2023-04-03 15:14:03 [ info ] Successfully contributed!
2023-04-03 15:14:03 [ info ] {
  receipt: '{"identity":"git|42402378|kim201212","witness":["0xa7390fe366ba2dfebf5d9696be1cc0b00100d7b956d4b2901934bc1e469084066e111376551b37cbe508052ab58ffbd1051f2c1d988ab745528bf047443d4da7980e9f321fe38a247fd4e87adaf60b1a94bdb8ecd575542edd263c99780e979f","0xa67baf224530c6bc9ee1f4038d84084baabe2cb2b1d1c2d6f635ef8ecfc5d9fba600f8f309caac87a90ed55b92057faf05b8267d40d55a1dc6f1a7ff4739eef0793819551dad41d2687e95cb252da1f969992567b92d58a6d3afa11691973521","0x845485213fcd134783abc131f33f715e946d87e366a42b2cb1c7b301d5cdf0ba8a3a072cbae4b3b5438a148831d346210c39b721f1e8986f8eef4dedd9cf3a6ffa5c639071ccb77fb32b4dbfedb498b7cbe4cc6bfa11089e3176a73c1465cf16","0xa9433fb77f8f81e95816f6731aea2d4bfeb1dcb9645a1e70ca6e5d3cdf3e62a62e9d6b347ec329b947805677c5de4faa194327b30b496d1f40a4e981b8222ac7910e51a516651e6f56e59a2f26a273bb42129eb419f25dc0fe7b28f8bdec7068"]}',
  signature: '6089a47309ff110ed22a061944781423fb9e9879a36ad14d846a1a82d4d1bce568dd31b53d4d2b90bcacc7ad554504aa6b87552858d88d6cb1fac71abf4895bb1c'
}