Skip to content

Commit 967131c

Browse files
committed
Use experimental g2 point loading
Signed-off-by: litt3 <[email protected]>
1 parent b7b2d4c commit 967131c

File tree

14 files changed

+30
-27
lines changed

14 files changed

+30
-27
lines changed

.env.example.holesky

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ EIGENDA_PROXY_EIGENDA_CONFIRMATION_DEPTH=6
2727
# Directory path to g1.point file
2828
EIGENDA_PROXY_EIGENDA_TARGET_KZG_G1_PATH=resources/g1.point
2929

30-
# Directory path to g2.point.powerOf2 file
31-
EIGENDA_PROXY_EIGENDA_TARGET_KZG_G2_POWER_OF_2_PATH=resources/g2.point.powerOf2
30+
# Directory path to g2.powerOf2.point file
31+
EIGENDA_PROXY_EIGENDA_TARGET_KZG_G2_POWER_OF_2_PATH=resources/g2.powerOf2.point
3232

3333
# Disable point verification mode. This mode performs IFFT on data before writing and FFT on data after reading. Disabling requires supplying the entire blob for verification against the KZG commitment.
3434
EIGENDA_PROXY_EIGENDA_DISABLE_POINT_VERIFICATION_MODE=false

.gitattributes

-1
This file was deleted.

.github/workflows/per-pr.yml

-13
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v3
17-
with:
18-
lfs: true
1917
- uses: actions/setup-go@v3
2018
with:
2119
go-version: ${{ env.GO_VERSION}}
@@ -33,8 +31,6 @@ jobs:
3331
runs-on: ubuntu-latest
3432
steps:
3533
- uses: actions/checkout@v3
36-
with:
37-
lfs: true
3834
- uses: actions/setup-go@v3
3935
with:
4036
go-version: ${{ env.GO_VERSION}}
@@ -47,7 +43,6 @@ jobs:
4743
- uses: actions/checkout@v3
4844
with:
4945
submodules: true
50-
lfs: true
5146
- uses: actions/setup-go@v3
5247
with:
5348
go-version: ${{ env.GO_VERSION }}
@@ -60,7 +55,6 @@ jobs:
6055
- uses: actions/checkout@v3
6156
with:
6257
submodules: true
63-
lfs: true
6458
- uses: actions/setup-go@v3
6559
with:
6660
go-version: ${{ env.GO_VERSION }}
@@ -73,7 +67,6 @@ jobs:
7367
- uses: actions/checkout@v3
7468
with:
7569
submodules: true
76-
lfs: true
7770
- uses: actions/setup-go@v3
7871
with:
7972
go-version: ${{ env.GO_VERSION }}
@@ -89,7 +82,6 @@ jobs:
8982
- uses: actions/checkout@v3
9083
with:
9184
submodules: true
92-
lfs: true
9385
- uses: actions/setup-go@v3
9486
with:
9587
go-version: ${{ env.GO_VERSION }}
@@ -105,7 +97,6 @@ jobs:
10597
- uses: actions/checkout@v3
10698
with:
10799
submodules: true
108-
lfs: true
109100
- uses: actions/setup-go@v3
110101
with:
111102
go-version: ${{ env.GO_VERSION }}
@@ -116,8 +107,6 @@ jobs:
116107
runs-on: ubuntu-latest
117108
steps:
118109
- uses: actions/checkout@v3
119-
with:
120-
lfs: true
121110
- uses: actions/setup-go@v3
122111
with:
123112
go-version: ${{ env.GO_VERSION }}
@@ -127,8 +116,6 @@ jobs:
127116
runs-on: ubuntu-latest
128117
steps:
129118
- uses: actions/checkout@v3
130-
with:
131-
lfs: true
132119
- uses: docker/build-push-action@v5
133120
with:
134121
push: false

.vscode/launch.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
"ENV_PATH": "../../.env",
1414
"EIGENDA_PROXY_EIGENDA_CERT_VERIFICATION_DISABLED": "true",
1515
"EIGENDA_PROXY_EIGENDA_TARGET_KZG_G1_PATH": "../../resources/g1.point",
16-
"EIGENDA_PROXY_EIGENDA_TARGET_KZG_G2_POWER_OF_2_PATH": "../../resources/g2.point.powerOf2",
17-
"EIGENDA_PROXY_EIGENDA_TARGET_KZG_G2_PATH": "../../resources/g2.point"
16+
"EIGENDA_PROXY_EIGENDA_TARGET_KZG_G2_POWER_OF_2_PATH": "../../resources/g2.powerOf2.point",
17+
"EIGENDA_PROXY_EIGENDA_TARGET_KZG_G2_PATH": "../../resources/g2.point",
18+
"EIGENDA_PROXY_EIGENDA_TARGET_KZG_G2_TRAILING_PATH": "../../resources/g2.trailing.point"
1819
},
1920
"program": "cmd/server"
2021
}

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.22.0
55
toolchain go1.22.7
66

77
require (
8-
github.com/Layr-Labs/eigenda v0.9.0-rc.0.0.20250315175023-0b2c9efcb638
8+
github.com/Layr-Labs/eigenda v0.9.0-rc.0.0.20250318164348-233cb1edefeb
99
github.com/Layr-Labs/eigenda-proxy/clients v0.0.0-00010101000000-000000000000
1010
github.com/Layr-Labs/eigensdk-go v0.2.0-beta.1.0.20250118004418-2a25f31b3b28
1111
github.com/avast/retry-go/v4 v4.6.0

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ github.com/DataDog/zstd v1.5.6-0.20230824185856-869dae002e5e h1:ZIWapoIRN1VqT8GR
2424
github.com/DataDog/zstd v1.5.6-0.20230824185856-869dae002e5e/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw=
2525
github.com/Layr-Labs/cerberus-api v0.0.2-0.20250117193600-e69c5e8b08fd h1:prMzW4BY6KZtWEanf5EIsyHzIZKCNV2mVIXrE6glRRM=
2626
github.com/Layr-Labs/cerberus-api v0.0.2-0.20250117193600-e69c5e8b08fd/go.mod h1:Lm4fhzy0S3P7GjerzuseGaBFVczsIKmEhIjcT52Hluo=
27-
github.com/Layr-Labs/eigenda v0.9.0-rc.0.0.20250315175023-0b2c9efcb638 h1:DSgj7g6LOWUK5YrzLSJpjh6hoCgAXd76STgHEofgwN4=
28-
github.com/Layr-Labs/eigenda v0.9.0-rc.0.0.20250315175023-0b2c9efcb638/go.mod h1:MO3EyBXCmhzttrmmgqmIkzDg4gtqWjU+0fxSN0Q1EmM=
27+
github.com/Layr-Labs/eigenda v0.9.0-rc.0.0.20250318164348-233cb1edefeb h1:L7roAwRZZ9Zt+hPkoD9m2WCjoDn/KcWj4LXqVqFh07Y=
28+
github.com/Layr-Labs/eigenda v0.9.0-rc.0.0.20250318164348-233cb1edefeb/go.mod h1:MO3EyBXCmhzttrmmgqmIkzDg4gtqWjU+0fxSN0Q1EmM=
2929
github.com/Layr-Labs/eigensdk-go v0.2.0-beta.1.0.20250118004418-2a25f31b3b28 h1:Wig5FBBizIB5Z/ZcXJlm7KdOLnrXc6E3DjO63uWRzQM=
3030
github.com/Layr-Labs/eigensdk-go v0.2.0-beta.1.0.20250118004418-2a25f31b3b28/go.mod h1:YNzORpoebdDNv0sJLm/H9LTx72M85zA54eBSXI5DULw=
3131
github.com/Layr-Labs/eigensdk-go/signer v0.0.0-20250118004418-2a25f31b3b28 h1:rhIC2XpFpCcRkv4QYczIUe/fXvE4T+0B1mF9f6NJCuo=

resources/g2.point

32 MB
Binary file not shown.

resources/g2.point.powerOf2

-1.75 KB
Binary file not shown.

resources/g2.powerOf2.point

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:4d5ed827f742e1270f22b4a39129bf1d25445821b15824e2eb3a709a16f64518
3+
size 1792

resources/g2.trailing.point

32 MB
Binary file not shown.

store/generated_key/memstore/memstore_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ func TestGetSet(t *testing.T) {
4141

4242
kzgConfig := kzg.KzgConfig{
4343
G1Path: "../../../resources/g1.point",
44-
G2PowerOf2Path: "../../../resources/g2.point.powerOf2",
44+
G2PowerOf2Path: "../../../resources/g2.powerOf2.point",
4545
G2Path: "../../../resources/g2.point",
46+
G2TrailingPath: "../../../resources/g2.trailing.point",
4647
CacheDir: "../../../resources/SRSTables",
4748
SRSOrder: 3000,
4849
SRSNumberToLoad: 3000,

testutils/env_vars.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,8 @@ func getKZGEnvVars() []EnvVar {
195195
envVars := []EnvVar{
196196
{verify.G1PathFlagName, "../resources/g1.point"},
197197
{verify.G2PathFlagName, "../resources/g2.point"},
198-
{verify.G2PowerOf2PathFlagName, "../resources/g2.point.powerOf2"},
198+
{verify.G2TrailingPathFlagName, "../resources/g2.trailing.point"},
199+
{verify.G2PowerOf2PathFlagName, "../resources/g2.powerOf2.point"},
199200
{verify.ReadG2PointsFlagName, "false"},
200201
{verify.CachePathFlagName, "../resources/SRSTables"},
201202
}

verify/cli.go

+11-2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ var (
1616
// kzg flags
1717
G1PathFlagName = withFlagPrefix("g1-path")
1818
G2PathFlagName = withFlagPrefix("g2-path")
19+
G2TrailingPathFlagName = withFlagPrefix("g2-path-trailing")
1920
ReadG2PointsFlagName = withFlagPrefix("read-g2-points")
2021
G2PowerOf2PathFlagName = withFlagPrefix("g2-power-of-2-path")
2122
CachePathFlagName = withFlagPrefix("cache-path")
@@ -60,6 +61,13 @@ func CLIFlags(envPrefix, category string) []cli.Flag {
6061
Value: "resources/g2.point",
6162
Category: category,
6263
},
64+
&cli.StringFlag{
65+
Name: G2TrailingPathFlagName,
66+
Usage: "path to g2.trailing.point file.",
67+
EnvVars: []string{withEnvPrefix(envPrefix, "TARGET_KZG_G2_TRAILING_PATH")},
68+
Value: "resources/g2.trailing.point",
69+
Category: category,
70+
},
6371
&cli.BoolFlag{
6472
Name: ReadG2PointsFlagName,
6573
Usage: "Whether to read in G2 SRS points.",
@@ -69,9 +77,9 @@ func CLIFlags(envPrefix, category string) []cli.Flag {
6977
},
7078
&cli.StringFlag{
7179
Name: G2PowerOf2PathFlagName,
72-
Usage: "path to g2.point.powerOf2 file. This resource is not currently used, but needed because of the shared eigenda KZG library that we use. We will eventually fix this.",
80+
Usage: "path to g2.powerOf2.point file. This resource is not currently used, but needed because of the shared eigenda KZG library that we use. We will eventually fix this.",
7381
EnvVars: []string{withEnvPrefix(envPrefix, "TARGET_KZG_G2_POWER_OF_2_PATH")},
74-
Value: "resources/g2.point.powerOf2",
82+
Value: "resources/g2.powerOf2.point",
7583
Category: category,
7684
},
7785
&cli.StringFlag{
@@ -89,6 +97,7 @@ func ReadKzgConfig(ctx *cli.Context, maxBlobSizeBytes uint64) kzg.KzgConfig {
8997
G1Path: ctx.String(G1PathFlagName),
9098
G2PowerOf2Path: ctx.String(G2PowerOf2PathFlagName),
9199
G2Path: ctx.String(G2PathFlagName),
100+
G2TrailingPath: ctx.String(G2TrailingPathFlagName),
92101
LoadG2Points: ctx.Bool(ReadG2PointsFlagName),
93102
CacheDir: ctx.String(CachePathFlagName),
94103
SRSOrder: eigendaflags.SrsOrder,

verify/verify_test.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@ func TestCommitmentVerification(t *testing.T) {
3232

3333
kzgConfig := kzg.KzgConfig{
3434
G1Path: "../resources/g1.point",
35-
G2PowerOf2Path: "../resources/g2.point.powerOf2",
35+
G2PowerOf2Path: "../resources/g2.powerOf2.point",
3636
G2Path: "../resources/g2.point",
37+
G2TrailingPath: "../resources/g2.trailing.point",
3738
CacheDir: "../resources/SRSTables",
3839
SRSOrder: 3000,
3940
SRSNumberToLoad: 3000,
@@ -70,8 +71,9 @@ func TestCommitmentWithTooLargeBlob(t *testing.T) {
7071

7172
kzgConfig := kzg.KzgConfig{
7273
G1Path: "../resources/g1.point",
73-
G2PowerOf2Path: "../resources/g2.point.powerOf2",
74+
G2PowerOf2Path: "../resources/g2.powerOf2.point",
7475
G2Path: "../resources/g2.point",
76+
G2TrailingPath: "../resources/g2.trailing.point",
7577
CacheDir: "../resources/SRSTables",
7678
SRSOrder: 3000,
7779
SRSNumberToLoad: 3000,

0 commit comments

Comments
 (0)