Skip to content

Commit

Permalink
Merge pull request #241 from kroma-network/dev
Browse files Browse the repository at this point in the history
feat!: merge `dev` to `main` for `v1.1.0`
  • Loading branch information
0xHansLee authored Jan 4, 2024
2 parents 5fb28e1 + 4135a45 commit 0dfa632
Show file tree
Hide file tree
Showing 616 changed files with 13,752 additions and 17,405 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ jobs:
with:
fetch-depth: 0

- name: Setup Go 1.19
- name: Setup Go 1.21
uses: actions/setup-go@v4
with:
go-version: '1.19'
go-version: '1.21'
- run: go mod download

- name: Setup Node.js 16.x
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
context: .
file: ./Dockerfile
platforms: linux/arm64,linux/amd64
target: kroma-node
target: op-node
push: true
tags: kromanetwork/node:${{ needs.prepare.outputs.docker-tag }}

Expand Down Expand Up @@ -166,7 +166,7 @@ jobs:
context: .
file: ./Dockerfile
platforms: linux/arm64,linux/amd64
target: kroma-batcher
target: op-batcher
push: true
tags: kromanetwork/batcher:${{ needs.prepare.outputs.docker-tag }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
with:
fetch-depth: 0

- name: Setup Go 1.19
- name: Setup Go 1.21
uses: actions/setup-go@v4
with:
go-version: '1.19'
go-version: '1.21'
- run: go mod download

- name: Setup Node.js 16.x
Expand Down
33 changes: 18 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,30 @@
FROM golang:1.19.7-alpine3.17 as builder
FROM --platform=$BUILDPLATFORM golang:1.21.1-alpine3.18 as builder
RUN apk add --no-cache gcc git make musl-dev

COPY ./go.mod /app/go.mod
COPY ./go.sum /app/go.sum
COPY ./Makefile /app/Makefile

COPY ./bindings /app/bindings
COPY ./components /app/components
COPY ./utils /app/utils
COPY ./op-node /app/op-node
COPY ./op-chain-ops /app/op-chain-ops
COPY ./op-service /app/op-service
COPY ./op-batcher /app/op-batcher
COPY ./op-bindings /app/op-bindings
COPY ./kroma-validator /app/kroma-validator

COPY ./.git /app/.git
WORKDIR /app
RUN make build

FROM alpine:3.17 as runner
FROM alpine:3.18 as runner

RUN addgroup user && \
adduser -G user -s /bin/sh -h /home/user -D user

USER user
WORKDIR /home/user/

FROM alpine:3.17 as runner-with-kroma-log
FROM alpine:3.18 as runner-with-kroma-log

RUN addgroup user && \
adduser -G user -s /bin/sh -h /home/user -D user
Expand All @@ -33,22 +36,22 @@ USER user
WORKDIR /home/user/

# Node
FROM runner-with-kroma-log as kroma-node
COPY --from=builder /app/bin/kroma-node /usr/local/bin
FROM runner-with-kroma-log as op-node
COPY --from=builder /app/bin/op-node /usr/local/bin

ENTRYPOINT ["kroma-node"]
ENTRYPOINT ["op-node"]

# Stateviz
FROM runner-with-kroma-log as kroma-stateviz
COPY --from=builder /app/bin/kroma-stateviz /usr/local/bin
FROM runner-with-kroma-log as op-stateviz
COPY --from=builder /app/bin/op-stateviz /usr/local/bin

CMD ["kroma-stateviz"]
CMD ["op-stateviz"]

# Batcher
FROM runner as kroma-batcher
COPY --from=builder /app/bin/kroma-batcher /usr/local/bin
FROM runner as op-batcher
COPY --from=builder /app/bin/op-batcher /usr/local/bin

ENTRYPOINT ["kroma-batcher"]
ENTRYPOINT ["op-batcher"]

# Validator
FROM runner as kroma-validator
Expand Down
42 changes: 0 additions & 42 deletions FORK.md

This file was deleted.

23 changes: 13 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,24 @@ LD_FLAGS_ARGS +=-X main.Meta=$(GIT_COMMIT)
LD_FLAGS := -ldflags "$(LD_FLAGS_ARGS)"

build:
GO111MODULE=on go build -v $(LD_FLAGS) -o bin/kroma-node ./components/node/cmd/main.go
GO111MODULE=on go build -v $(LD_FLAGS) -o bin/kroma-stateviz ./components/node/cmd/stateviz/main.go
GO111MODULE=on go build -v $(LD_FLAGS) -o bin/kroma-batcher ./components/batcher/cmd/main.go
GO111MODULE=on go build -v $(LD_FLAGS) -o bin/kroma-validator ./components/validator/cmd/main.go
GO111MODULE=on go build -v $(LD_FLAGS) -o bin/op-node ./op-node/cmd/main.go
GO111MODULE=on go build -v $(LD_FLAGS) -o bin/op-stateviz ./op-node/cmd/stateviz/main.go
GO111MODULE=on go build -v $(LD_FLAGS) -o bin/op-batcher ./op-batcher/cmd/main.go
GO111MODULE=on go build -v $(LD_FLAGS) -o bin/kroma-validator ./kroma-validator/cmd/main.go
.PHONY: build

clean:
@rm -rf bin/*
.PHONY: clean

test:
go test ./bindings/...
go test ./components/...
go test ./utils/...
go test ./e2e/... -timeout 30m # requires a minimum of 30min in a CI
go test ./op-bindings/...
go test ./op-batcher/...
go test ./op-node/...
go test ./op-service/...
go test ./op-chain-ops/...
go test ./kroma-validator/...
go test ./op-e2e/... -timeout 30m # requires a minimum of 30min in a CI
yarn test
.PHONY: test

Expand All @@ -30,8 +33,8 @@ lint:
.PHONY: lint

bindings:
make -C ./bindings
.PHONY: bindings
make -C ./op-bindings
.PHONY: op-bindings

contracts-snapshot:
@(cd ./packages/contracts && yarn gas-snapshot && yarn storage-snapshot)
Expand Down
3,333 changes: 0 additions & 3,333 deletions bindings/bindings/kromagovernor.go

This file was deleted.

25 changes: 0 additions & 25 deletions bindings/bindings/kromagovernor_more.go

This file was deleted.

3,291 changes: 0 additions & 3,291 deletions bindings/bindings/kromaguardiantoken.go

This file was deleted.

25 changes: 0 additions & 25 deletions bindings/bindings/kromaguardiantoken_more.go

This file was deleted.

2,382 changes: 0 additions & 2,382 deletions bindings/bindings/kromatimelock.go

This file was deleted.

25 changes: 0 additions & 25 deletions bindings/bindings/kromatimelock_more.go

This file was deleted.

31 changes: 0 additions & 31 deletions bindings/bindings/registry.go

This file was deleted.

160 changes: 0 additions & 160 deletions components/batcher/batch_submitter.go

This file was deleted.

Loading

0 comments on commit 0dfa632

Please sign in to comment.