dsrvlabs / czg-keremony Goto Github PK
View Code? Open in Web Editor NEWJavaScript-based client to participate in Ethereum KZG Ceremony
Home Page: https://dsrv.com
License: MIT License
JavaScript-based client to participate in Ethereum KZG Ceremony
Home Page: https://dsrv.com
License: MIT License
The signing of contributions with Ethereum ECDSA keys and BLS signing the user's identity is RECOMMENDED.
x
as a private key to sign the user's encoded identity.TypedData
JSON object as per contributionSigning.mdweb3.eth.signTypedData()
to sign the messagedef sign_identity(contribution: Contribution, x: int, identity: str) -> Contribution:
encoded_identity = b''
if identity[:2] == '0x':
# Identity is a Ethereum address
encoded_identity = eth_address_to_identity(identity).encode()
else:
# Identity is an GitHub ID
encoded_identity = github_handle_to_identity(identity).encode()
signature = bls.Sign(x, encoded_identity)
contribution.bls_signature = signature
def sign_contribution(batch_contribution: BatchContribution, ethereum_address: Optional[str]) -> BatchContribution:
typed_data = contribution_to_typed_data_str(batch_contribution) # function defined in contributionSigning.md
batch_contribution.ecdsa_signature = web3.eth.sign_typed_data(ethereum_address, json.loads(typed_data))
return batch_contribution
contribution contents from try_contribute
contributions: [
{
numG1Powers: 4096,
numG2Powers: 65,
powersOfTau: [Object],
potPubkey: '0x93e02b6052719f607dacd3a088274f65596bd0d09920b61ab5da61bbdc7f5049334cf11213945d57e5ac7d055d042b7e024aa2b2f08f0a91260805272dc51051c6e47ad4fa403b02b4510b647ae3d1770bac0326a805bbefd48056c8c121bdb8',
blsSignature: ''
},
{
numG1Powers: 8192,
numG2Powers: 65,
powersOfTau: [Object],
potPubkey: '0x93e02b6052719f607dacd3a088274f65596bd0d09920b61ab5da61bbdc7f5049334cf11213945d57e5ac7d055d042b7e024aa2b2f08f0a91260805272dc51051c6e47ad4fa403b02b4510b647ae3d1770bac0326a805bbefd48056c8c121bdb8',
blsSignature: ''
},
{
numG1Powers: 16384,
numG2Powers: 65,
powersOfTau: [Object],
potPubkey: '0x93e02b6052719f607dacd3a088274f65596bd0d09920b61ab5da61bbdc7f5049334cf11213945d57e5ac7d055d042b7e024aa2b2f08f0a91260805272dc51051c6e47ad4fa403b02b4510b647ae3d1770bac0326a805bbefd48056c8c121bdb8',
blsSignature: ''
},
{
numG1Powers: 32768,
numG2Powers: 65,
powersOfTau: [Object],
potPubkey: '0x93e02b6052719f607dacd3a088274f65596bd0d09920b61ab5da61bbdc7f5049334cf11213945d57e5ac7d055d042b7e024aa2b2f08f0a91260805272dc51051c6e47ad4fa403b02b4510b647ae3d1770bac0326a805bbefd48056c8c121bdb8',
blsSignature: ''
}
],
ecdsaSignature: ''
Current single thread implementation takes about 5 minutes to complete the ceremony.
Multi-thread approach is required to reduce this.
Separate decode and power of tau calculation.
Power of tau calculation will be handled on another isseu.
From #3, the new commitment seems successfully submitted.
So, let's step forward.
./join_ceremony
The randomness that each participant contributes to a set of Powers of Tau is in the form of an integer in the range (1, bls.r)
.
The participant MUST generate 4 different secrets from a cryptographically-secure pseudo-random number generator (CSPRNG) of their choosing.
Each secret MUST meet the following requirements:
Furthermore, each secret SHOULD meet the following requirements:
bls.r
).KeyGen
A good method for meeting the above requirements would be to make use of the KeyGen
function offered by all compliant BLS libraries. This function takes in a seed of at least 32 bytes and returns a uniformly sampled integer of
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.