Skip to content

Commit

Permalink
fix compile error and image build error
Browse files Browse the repository at this point in the history
  • Loading branch information
colinlyguo committed Feb 26, 2025
1 parent 6258634 commit b55ccc0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
7 changes: 4 additions & 3 deletions build/dockerfiles/bridgehistoryapi-db-cli.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ FROM base as builder

RUN --mount=target=. \
--mount=type=cache,target=/root/.cache/go-build \
cd /src/bridge-history-api/cmd/db_cli && go build -v -p 4 -o /bin/db_cli
cd /src/bridge-history-api/cmd/db_cli && CGO_LDFLAGS="-ldl" go build -v -p 4 -o /bin/db_cli

# Pull db_cli into a second stage deploy alpine container
FROM alpine:latest
# Pull db_cli into a second stage deploy ubuntu container
FROM ubuntu:20.04
ENV CGO_LDFLAGS="-ldl"
COPY --from=builder /bin/db_cli /bin/
WORKDIR /app
ENTRYPOINT ["db_cli"]
7 changes: 4 additions & 3 deletions build/dockerfiles/db_cli.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ FROM base as builder

RUN --mount=target=. \
--mount=type=cache,target=/root/.cache/go-build \
cd /src/database/cmd && go build -v -p 4 -o /bin/db_cli
cd /src/database/cmd && CGO_LDFLAGS="-ldl" go build -v -p 4 -o /bin/db_cli

# Pull db_cli into a second stage deploy alpine container
FROM alpine:latest
# Pull db_cli into a second stage deploy ubuntu container
FROM ubuntu:20.04
ENV CGO_LDFLAGS="-ldl"
COPY --from=builder /bin/db_cli /bin/
WORKDIR /app
ENTRYPOINT ["db_cli"]
4 changes: 2 additions & 2 deletions rollup/internal/controller/sender/sender.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/holiman/uint256"
"github.com/prometheus/client_golang/prometheus"
"github.com/scroll-tech/go-ethereum/common"
"github.com/scroll-tech/go-ethereum/consensus/misc/eip4844"
"github.com/scroll-tech/go-ethereum/consensus/misc"
gethTypes "github.com/scroll-tech/go-ethereum/core/types"
"github.com/scroll-tech/go-ethereum/crypto/kzg4844"
"github.com/scroll-tech/go-ethereum/ethclient"
Expand Down Expand Up @@ -675,7 +675,7 @@ func (s *Sender) getBlockNumberAndBaseFeeAndBlobFee(ctx context.Context) (uint64

var blobBaseFee uint64
if excess := header.ExcessBlobGas; excess != nil {
blobBaseFee = eip4844.CalcBlobFee(*excess).Uint64()
blobBaseFee = misc.CalcBlobFee(*excess).Uint64()
}
// header.Number.Uint64() returns the pendingBlockNumber, so we minus 1 to get the latestBlockNumber.
return header.Number.Uint64() - 1, baseFee, blobBaseFee, nil
Expand Down
4 changes: 2 additions & 2 deletions rollup/internal/controller/watcher/l1_watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"math/big"

"github.com/prometheus/client_golang/prometheus"
"github.com/scroll-tech/go-ethereum/consensus/misc/eip4844"
"github.com/scroll-tech/go-ethereum/consensus/misc"
gethTypes "github.com/scroll-tech/go-ethereum/core/types"
"github.com/scroll-tech/go-ethereum/ethclient"
"github.com/scroll-tech/go-ethereum/log"
Expand Down Expand Up @@ -80,7 +80,7 @@ func (w *L1WatcherClient) FetchBlockHeader(blockHeight uint64) error {

var blobBaseFee uint64
if excess := block.ExcessBlobGas; excess != nil {
blobBaseFee = eip4844.CalcBlobFee(*excess).Uint64()
blobBaseFee = misc.CalcBlobFee(*excess).Uint64()
}

l1Block := orm.L1Block{
Expand Down

0 comments on commit b55ccc0

Please sign in to comment.