Commit 53963e6 1 parent cf42026 commit 53963e6 Copy full SHA for 53963e6
File tree 4 files changed +70
-2
lines changed
rollup/circuitcapacitychecker
4 files changed +70
-2
lines changed Original file line number Diff line number Diff line change
1
+ # Support setting various labels on the final image
2
+ ARG COMMIT=""
3
+ ARG VERSION=""
4
+ ARG BUILDNUM=""
5
+
6
+ # Build Geth in a stock Go builder container
7
+ FROM scrolltech/go-rust-builder:go-1.19-rust-nightly-2022-12-10 as builder
8
+
9
+ ADD . /go-ethereum
10
+ RUN cd /go-ethereum && env GO111MODULE=on go run build/ci.go install ./cmd/geth
11
+
12
+ # Pull Geth into a second stage deploy alpine container
13
+ FROM ubuntu:20.04
14
+
15
+ COPY --from=builder /go-ethereum/build/bin/geth /usr/local/bin/
16
+
17
+ EXPOSE 8545 8546 30303 30303/udp
18
+ ENTRYPOINT ["geth"]
19
+
20
+ # Add some metadata labels to help programatic image consumption
21
+ ARG COMMIT=""
22
+ ARG VERSION=""
23
+ ARG BUILDNUM=""
24
+
25
+ LABEL commit="$COMMIT" version="$VERSION" buildnum="$BUILDNUM"
Original file line number Diff line number Diff line change
1
+ # Support setting various labels on the final image
2
+ ARG COMMIT=""
3
+ ARG VERSION=""
4
+ ARG BUILDNUM=""
5
+
6
+ # Build Geth in a stock Go builder container
7
+ FROM golang:1.18-alpine as builder
8
+
9
+ RUN apk add --no-cache gcc musl-dev linux-headers git
10
+
11
+ ADD . /go-ethereum
12
+ RUN cd /go-ethereum && go run build/ci.go install ./cmd/geth
13
+
14
+ # Pull Geth into a second stage deploy alpine container
15
+ FROM alpine:latest
16
+
17
+ RUN apk add --no-cache ca-certificates
18
+ COPY --from=builder /go-ethereum/build/bin/geth /usr/local/bin/
19
+
20
+ EXPOSE 8545 8546 30303 30303/udp
21
+ ENTRYPOINT ["geth"]
22
+
23
+ # Add some metadata labels to help programatic image consumption
24
+ ARG COMMIT=""
25
+ ARG VERSION=""
26
+ ARG BUILDNUM=""
27
+
28
+ LABEL commit="$COMMIT" version="$VERSION" buildnum="$BUILDNUM"
Original file line number Diff line number Diff line change @@ -60,3 +60,12 @@ devtools:
60
60
env GOBIN= go install ./cmd/abigen
61
61
@type " solc" 2> /dev/null || echo ' Please install solc'
62
62
@type " protoc" 2> /dev/null || echo ' Please install protoc'
63
+
64
+ docker :
65
+ docker build --platform linux/x86_64 -t scrolltech/l2geth:latest ./ -f Dockerfile
66
+
67
+ mockccc_docker :
68
+ docker build --platform linux/x86_64 -t scrolltech/l2geth:latest ./ -f Dockerfile.mockccc
69
+
70
+ mockccc_alpine_docker :
71
+ docker build --platform linux/x86_64 -t scrolltech/l2geth:latest ./ -f Dockerfile.mockccc.alpine
Original file line number Diff line number Diff line change @@ -20,9 +20,15 @@ func (ccc *CircuitCapacityChecker) Reset() {
20
20
}
21
21
22
22
func (ccc * CircuitCapacityChecker ) ApplyTransaction (traces * types.BlockTrace ) (* types.RowConsumption , error ) {
23
- return nil , nil
23
+ return & types.RowConsumption {types.SubCircuitRowUsage {
24
+ Name : "mock" ,
25
+ RowNumber : 1 ,
26
+ }}, nil
24
27
}
25
28
26
29
func (ccc * CircuitCapacityChecker ) ApplyBlock (traces * types.BlockTrace ) (* types.RowConsumption , error ) {
27
- return nil , nil
30
+ return & types.RowConsumption {types.SubCircuitRowUsage {
31
+ Name : "mock" ,
32
+ RowNumber : 2 ,
33
+ }}, nil
28
34
}
You can’t perform that action at this time.
0 commit comments