Skip to content

Commit 5ef88c9

Browse files
authored
Revert "go.mod, build: upgrade c-kzg-4844 (ethereum#27907)"
This reverts commit 136f846.
1 parent f60b046 commit 5ef88c9

File tree

6 files changed

+17
-28
lines changed

6 files changed

+17
-28
lines changed

build/ci.go

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -200,24 +200,19 @@ func doInstall(cmdline []string) {
200200
staticlink = flag.Bool("static", false, "Create statically-linked executable")
201201
)
202202
flag.CommandLine.Parse(cmdline)
203-
env := build.Env()
204203

205204
// Configure the toolchain.
206205
tc := build.GoToolchain{GOARCH: *arch, CC: *cc}
207206
if *dlgo {
208207
csdb := build.MustLoadChecksums("build/checksums.txt")
209208
tc.Root = build.DownloadGo(csdb, dlgoVersion)
210209
}
211-
212-
// Disable CLI markdown doc generation in release builds.
213-
buildTags := []string{"urfave_cli_no_docs"}
214-
215-
// Enable linking the CKZG library since we can make it work with additional flags.
216-
if env.UbuntuVersion != "trusty" {
217-
buildTags = append(buildTags, "ckzg")
218-
}
210+
// Disable CLI markdown doc generation in release builds and enable linking
211+
// the CKZG library since we can make it portable here.
212+
buildTags := []string{"urfave_cli_no_docs", "ckzg"}
219213

220214
// Configure the build.
215+
env := build.Env()
221216
gobuild := tc.Go("build", buildFlags(env, *staticlink, buildTags)...)
222217

223218
// arm64 CI builders are memory-constrained and can't handle concurrent builds,
@@ -303,14 +298,10 @@ func doTest(cmdline []string) {
303298
csdb := build.MustLoadChecksums("build/checksums.txt")
304299
tc.Root = build.DownloadGo(csdb, dlgoVersion)
305300
}
306-
gotest := tc.Go("test")
307-
301+
gotest := tc.Go("test", "-tags=ckzg")
308302
// CI needs a bit more time for the statetests (default 10m).
309303
gotest.Args = append(gotest.Args, "-timeout=20m")
310304

311-
// Enable CKZG backend in CI.
312-
gotest.Args = append(gotest.Args, "-tags=ckzg")
313-
314305
// Test a single package at a time. CI builders are slow
315306
// and some tests run into timeouts under load.
316307
gotest.Args = append(gotest.Args, "-p", "1")

build/deb/ethereum/deb.rules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ override_dh_auto_build:
2828
mv .mod $(GOPATH)/pkg/mod
2929

3030
# A fresh Go was built, all dependency downloads faked, hope build works now
31-
../.go/bin/go run build/ci.go install -git-commit={{.Env.Commit}} -git-branch={{.Env.Branch}} -git-tag={{.Env.Tag}} -buildnum={{.Env.Buildnum}} -pull-request={{.Env.IsPullRequest}} -ubuntu {{.Distro}}
31+
../.go/bin/go run build/ci.go install -git-commit={{.Env.Commit}} -git-branch={{.Env.Branch}} -git-tag={{.Env.Tag}} -buildnum={{.Env.Buildnum}} -pull-request={{.Env.IsPullRequest}}
3232

3333
override_dh_auto_test:
3434

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ require (
1919
github.com/deckarep/golang-set/v2 v2.1.0
2020
github.com/docker/docker v1.6.2
2121
github.com/dop251/goja v0.0.0-20230605162241-28ee0ee714f3
22-
github.com/ethereum/c-kzg-4844 v0.3.1
22+
github.com/ethereum/c-kzg-4844 v0.3.0
2323
github.com/fatih/color v1.7.0
2424
github.com/fjl/gencodec v0.0.0-20230517082657-f9840df7b83e
2525
github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m
125125
github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
126126
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
127127
github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw=
128-
github.com/ethereum/c-kzg-4844 v0.3.1 h1:sR65+68+WdnMKxseNWxSJuAv2tsUrihTpVBTfM/U5Zg=
129-
github.com/ethereum/c-kzg-4844 v0.3.1/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0=
128+
github.com/ethereum/c-kzg-4844 v0.3.0 h1:3Y3hD6l5i0dEYsBL50C+Om644kve3pNqoAcvE26o9zI=
129+
github.com/ethereum/c-kzg-4844 v0.3.0/go.mod h1:WI2Nd82DMZAAZI1wV2neKGost9EKjvbpQR9OqE5Qqa8=
130130
github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8=
131131
github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys=
132132
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=

internal/build/env.go

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,12 @@ import (
2828

2929
var (
3030
// These flags override values in build env.
31-
GitCommitFlag = flag.String("git-commit", "", `Overrides git commit hash embedded into executables`)
32-
GitBranchFlag = flag.String("git-branch", "", `Overrides git branch being built`)
33-
GitTagFlag = flag.String("git-tag", "", `Overrides git tag being built`)
34-
BuildnumFlag = flag.String("buildnum", "", `Overrides CI build number`)
35-
PullRequestFlag = flag.Bool("pull-request", false, `Overrides pull request status of the build`)
36-
CronJobFlag = flag.Bool("cron-job", false, `Overrides cron job status of the build`)
37-
UbuntuVersionFlag = flag.String("ubuntu", "", `Sets the ubuntu version being built for`)
31+
GitCommitFlag = flag.String("git-commit", "", `Overrides git commit hash embedded into executables`)
32+
GitBranchFlag = flag.String("git-branch", "", `Overrides git branch being built`)
33+
GitTagFlag = flag.String("git-tag", "", `Overrides git tag being built`)
34+
BuildnumFlag = flag.String("buildnum", "", `Overrides CI build number`)
35+
PullRequestFlag = flag.Bool("pull-request", false, `Overrides pull request status of the build`)
36+
CronJobFlag = flag.Bool("cron-job", false, `Overrides cron job status of the build`)
3837
)
3938

4039
// Environment contains metadata provided by the build environment.
@@ -44,7 +43,6 @@ type Environment struct {
4443
Repo string // name of GitHub repo
4544
Commit, Date, Branch, Tag string // Git info
4645
Buildnum string
47-
UbuntuVersion string // Ubuntu version being built for
4846
IsPullRequest bool
4947
IsCronJob bool
5048
}

internal/build/gotool.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ func (g *GoToolchain) Go(command string, args ...string) *exec.Cmd {
5454
tool.Env = append(tool.Env, "CC="+os.Getenv("CC"))
5555
}
5656
// CKZG by default is not portable, append the necessary build flags to make
57-
// it not rely on modern CPU instructions and enable linking against.
58-
tool.Env = append(tool.Env, "CGO_CFLAGS=-O2 -g -D__BLST_PORTABLE__")
57+
// it not rely on modern CPU instructions and enable linking against
58+
tool.Env = append(tool.Env, "CGO_CFLAGS=-D__BLST_PORTABLE__")
5959

6060
return tool
6161
}

0 commit comments

Comments
 (0)