Skip to content

Commit

Permalink
feat(light-client): Update contract to trusted setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimo99 committed Nov 3, 2024
1 parent 2f65ced commit b145cff
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ contract Groth16Verifier {
uint256 constant gammax2 = 10857046999023057135944570762232829481370756359578518086990519993285655852781;
uint256 constant gammay1 = 4082367875863433681332203403145435568316851327593401208105741076214120093531;
uint256 constant gammay2 = 8495653923123431417604973247489272438418190587263600148770280649306958101930;
uint256 constant deltax1 = 11559732032986387107991004021392285783925812861821192530917403151452391805634;
uint256 constant deltax2 = 10857046999023057135944570762232829481370756359578518086990519993285655852781;
uint256 constant deltay1 = 4082367875863433681332203403145435568316851327593401208105741076214120093531;
uint256 constant deltay2 = 8495653923123431417604973247489272438418190587263600148770280649306958101930;
uint256 constant deltax1 = 2343236923834963358037492110423434801285275176030641534786585479610777991492;
uint256 constant deltax2 = 7354734418275536777818704753730665460248350105717340249623478132690757632061;
uint256 constant deltay1 = 14156031723817663434631995261455976608108837842676842217057543351737739467454;
uint256 constant deltay2 = 20646074624478348418892142743169842075310032726102859617297640617605155938039;


uint256 constant IC0x = 15885245864077738868080438953982725331851392259561989715709451737775650751499;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ for key in ${keys}; do

# Use jq to extract pi_a, pi_b, pi_c, and public
extracted_proof=$(echo "${json_data}" | jq '.proof | {pi_a, pi_b, pi_c}')
extracted_public=$(echo "${json_data}" | jq '.public')
extracted_public=$(echo "${json_data}" | jq '.proof.public')

# Extract update data from proofInput
nextHeaderHash_bin=$(echo "${json_data}" | jq -r '.proofInput.nextHeaderHash // empty | map(.) | join("")')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { getFilesInDir, Proof } from './utils';
import { convertProofToSolidityCalldata } from '@dendreth/utils/ts-utils/zk-utils';
import { getGenericLogger } from '@dendreth/utils/ts-utils/logger';

import INITIAL_UPDATE from '../../../vendor/eth2-light-client-updates/mainnet/deneb-update-284/update_9265121_9273312.json';
import INITIAL_UPDATE from '../../../vendor/eth2-light-client-updates/mainnet/trusted-setup/update_6069888_6078433.json';

const logger = getGenericLogger();

Expand All @@ -26,7 +26,7 @@ describe('BeaconLightClientReadyProofs', async function () {
'vendor',
'eth2-light-client-updates',
'mainnet',
'deneb-update-284',
'trusted-setup',
);

proofs = getFilesInDir(dir, 'proof*.json').map(p =>
Expand All @@ -43,9 +43,9 @@ describe('BeaconLightClientReadyProofs', async function () {
});

beforeEach(async function () {
const FORK_VERSION = '0x04000000';
const FORK_VERSION = '0x90000073';
const genesis_validators_root =
'0x4b363db94e286120d76eb905340fdd4e54bfe9f06bf33ff6cf5ad27f511bfe95';
'0xd8ea171f3c94aea21ebc42a1ed61052acf3f9209c00e4efbaaddac09ed9b8078';
const DOMAIN_SYNC_COMMITTEE = '0x07000000';

let result = sha256(
Expand Down
2 changes: 1 addition & 1 deletion relay/process-compose-scripts/download-zk-and-dat-files.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

ZKEY_B3SUM_SUM='7bd1baf6e4aa1bb97933df06f68b26f8aa034e6743ff52c4dd7f6097d6e7d104'
ZKEY_B3SUM_SUM='e5cb635fd494414d599fb22fc132f8ff9ecbc811d7cfc2557b1d8af55165fdad'
DAT_B3SUM_SUM='c94eb86af7c0451a4277a7bdfc90232a9db75c192d6852ad18baa9a46e1e52e5'

source "${GIT_ROOT}/.env"
Expand Down
2 changes: 1 addition & 1 deletion vendor/eth2-light-client-updates
Submodule eth2-light-client-updates updated 60 files
+26 −0 mainnet/trusted-setup/proof_6069888_6078433.json
+26 −0 mainnet/trusted-setup/proof_6078433_6086624.json
+26 −0 mainnet/trusted-setup/proof_6086624_6094817.json
+26 −0 mainnet/trusted-setup/proof_6094817_6103008.json
+26 −0 mainnet/trusted-setup/proof_6103008_6111200.json
+26 −0 mainnet/trusted-setup/proof_6111200_6119392.json
+26 −0 mainnet/trusted-setup/proof_6119392_6127585.json
+26 −0 mainnet/trusted-setup/proof_6127585_6135776.json
+26 −0 mainnet/trusted-setup/proof_6135776_6143969.json
+26 −0 mainnet/trusted-setup/proof_6143969_6152161.json
+26 −0 mainnet/trusted-setup/proof_6152161_6160352.json
+26 −0 mainnet/trusted-setup/proof_6160352_6168544.json
+26 −0 mainnet/trusted-setup/proof_6168544_6176736.json
+26 −0 mainnet/trusted-setup/proof_6176736_6184928.json
+26 −0 mainnet/trusted-setup/proof_6184928_6193120.json
+26 −0 mainnet/trusted-setup/proof_6193120_6200672.json
+26 −0 mainnet/trusted-setup/proof_6200672_6200704.json
+26 −0 mainnet/trusted-setup/proof_6200704_6200736.json
+26 −0 mainnet/trusted-setup/proof_6200736_6200768.json
+26 −0 mainnet/trusted-setup/proof_6200768_6200800.json
+4 −0 mainnet/trusted-setup/public_6069888_6078433.json
+4 −0 mainnet/trusted-setup/public_6078433_6086624.json
+4 −0 mainnet/trusted-setup/public_6086624_6094817.json
+4 −0 mainnet/trusted-setup/public_6094817_6103008.json
+4 −0 mainnet/trusted-setup/public_6103008_6111200.json
+4 −0 mainnet/trusted-setup/public_6111200_6119392.json
+4 −0 mainnet/trusted-setup/public_6119392_6127585.json
+4 −0 mainnet/trusted-setup/public_6127585_6135776.json
+4 −0 mainnet/trusted-setup/public_6135776_6143969.json
+4 −0 mainnet/trusted-setup/public_6143969_6152161.json
+4 −0 mainnet/trusted-setup/public_6152161_6160352.json
+4 −0 mainnet/trusted-setup/public_6160352_6168544.json
+4 −0 mainnet/trusted-setup/public_6168544_6176736.json
+4 −0 mainnet/trusted-setup/public_6176736_6184928.json
+4 −0 mainnet/trusted-setup/public_6184928_6193120.json
+4 −0 mainnet/trusted-setup/public_6193120_6200672.json
+4 −0 mainnet/trusted-setup/public_6200672_6200704.json
+4 −0 mainnet/trusted-setup/public_6200704_6200736.json
+4 −0 mainnet/trusted-setup/public_6200736_6200768.json
+4 −0 mainnet/trusted-setup/public_6200768_6200800.json
+6 −0 mainnet/trusted-setup/update_6069888_6078433.json
+6 −0 mainnet/trusted-setup/update_6078433_6086624.json
+6 −0 mainnet/trusted-setup/update_6086624_6094817.json
+6 −0 mainnet/trusted-setup/update_6094817_6103008.json
+6 −0 mainnet/trusted-setup/update_6103008_6111200.json
+6 −0 mainnet/trusted-setup/update_6111200_6119392.json
+6 −0 mainnet/trusted-setup/update_6119392_6127585.json
+6 −0 mainnet/trusted-setup/update_6127585_6135776.json
+6 −0 mainnet/trusted-setup/update_6135776_6143969.json
+6 −0 mainnet/trusted-setup/update_6143969_6152161.json
+6 −0 mainnet/trusted-setup/update_6152161_6160352.json
+6 −0 mainnet/trusted-setup/update_6160352_6168544.json
+6 −0 mainnet/trusted-setup/update_6168544_6176736.json
+6 −0 mainnet/trusted-setup/update_6176736_6184928.json
+6 −0 mainnet/trusted-setup/update_6184928_6193120.json
+6 −0 mainnet/trusted-setup/update_6193120_6200672.json
+6 −0 mainnet/trusted-setup/update_6200672_6200704.json
+6 −0 mainnet/trusted-setup/update_6200704_6200736.json
+6 −0 mainnet/trusted-setup/update_6200736_6200768.json
+6 −0 mainnet/trusted-setup/update_6200768_6200800.json

0 comments on commit b145cff

Please sign in to comment.