Smart Contracts
Jonathan to start the refactoring of the smart contract
- Style
- Naming
- snake_case vs. camelCase
- Rename DKGManager —> DKG
- Layout
- Scope of current “sprint” of work
Various IDs in Medusa
-
Suite ID ⇒ represents the cryptographic curve, the parameters of encryption + different encryption schemes (todo)
-
“Request ID + Cipher ID” request id is just a nonce currently
-
“Oracle ID” = oracle contract address (+ chain id + “chain name”)
-
“Protocol ID” ⇒ unique amongst all the chains, all networks, for a given reencryption request.
- protocol_id = H(dkgID, request_id, suite_id, oracle_id)
- This is passed in gossip messages
-
“DKG network ID”
- bytes32 dkgId = keccak256(abi.encode(block.chainid, smart contract address);
- bytes32 dkgId = keccak256(abi.encode(distributed public key));
- PRE-DKG:
- Smart Contract - not a real need
- ID = H(smart contract address + chain id)
- HTTP API -
- POST-DKG:
- in oracle contract, “refer to this DKG ID” → contract/http api where dkg has ran
Only keep “pre-dkg”
Demo plan
- Go with structural changes until 7th of October
- Then Jonathan works on
- Demo website deployment (automatic updates from github master)
- Deployment of the nodes via kubernetes
- Nicolas works on the saving/loading file
- FOllowing is “static” and common for all nodes
- only contains oracle address /maybe dkg/
- Following is per node
- give ethereum key via CLI
- DKG share —> THIS IS TO SAVE/LOAD
- ETHEREUM_KEY=…. testnet node run —oracleAddress 0x… —share share.toml
Example run command with config
testnet node run —config config.toml