Skip to content

Commit

Permalink
Merge branch 'master' into arb-ts-staging
Browse files Browse the repository at this point in the history
  • Loading branch information
DZGoldman authored Oct 21, 2021
2 parents 4e25db3 + 6d41397 commit b4e28e5
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 7 deletions.
42 changes: 42 additions & 0 deletions .circleci/images/dist-base/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
### --------------------------------------------------------------------
### Dockerfile
### dist-base
### --------------------------------------------------------------------

FROM debian:bullseye-slim as debian-base

RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y curl cmake git gcc g++ libboost-dev libboost-filesystem-dev \
lcov make libgmp-dev libssl-dev libusb-dev sudo netcat-openbsd nodejs \
autotools-dev dh-autoreconf pkg-config libjemalloc-dev \
libgflags-dev libsnappy-dev zlib1g-dev libbz2-dev libzstd-dev && \
curl -L https://github.com/facebook/rocksdb/archive/refs/tags/v6.20.3.tar.gz --output rocksdb-6.20.3.tar.gz && \
tar xf rocksdb-6.20.3.tar.gz && \
cd rocksdb-6.20.3 && \
PREFIX=/usr make shared_lib install-shared

FROM debian:bullseye-slim as debian

RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y curl \
node-ws vim-tiny libatomic1 python3 \
libgmp10 libssl1.1 \
libjemalloc2 \
libgflags2.2 libsnappy1v5 libzstd1 && \
rm -rf /var/lib/apt/lists/* /usr/share/doc/* && \
useradd -ms /bin/bash user

COPY --from=0 /usr/lib/librocksdb.so.6.20.3 /usr/lib/librocksdb.so.6.20.3

RUN ln -s librocksdb.so.6.20.3 /usr/lib/librocksdb.so.6.20 && \
ln -s librocksdb.so.6.20.3 /usr/lib/librocksdb.so.6 && \
ln -s librocksdb.so.6.20.3 /usr/lib/librocksdb.so

USER user
WORKDIR /home/user/
ENV PATH="/home/user/go/bin:/home/user/bin:/home/user/.local/bin:/usr/local/go/bin:/home/user/.npm-global/bin:/home/user/.yarn/bin:${PATH}"
RUN export GOROOT=/usr/local/go && \
mkdir bin && curl -s https://codecov.io/bash > ~/bin/codecovbash && \
chmod +x /home/user/bin/codecovbash
2 changes: 1 addition & 1 deletion docs/Bridging_Assets.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ Follow the following steps to get your token set up to use the Generic Custom Ga

**0. Have an L1 token**

- You token on L1 should conform to the [ICustomToken](./sol_contract_docs/md_docs/arb-bridge-peripherals/tokenbridge/libraries/gateway/ICustomGateway.md) interface; (see [TestCustomTokenL1](https://github.com/OffchainLabs/arbitrum/blob/master/packages/arb-bridge-peripherals/contracts/tokenbridge/test/TestCustomTokenL1.sol) for an example implementation). Crucially, it must have an `isArbitrumEnabled` method in its interface.
- Your token on L1 should conform to the [ICustomToken](./sol_contract_docs/md_docs/arb-bridge-peripherals/tokenbridge/ethereum/ICustomToken.md) interface; (see [TestCustomTokenL1](https://github.com/OffchainLabs/arbitrum/blob/master/packages/arb-bridge-peripherals/contracts/tokenbridge/test/TestCustomTokenL1.sol) for an example implementation). Crucially, it must have an `isArbitrumEnabled` method in its interface.

**1. Deploy your token on Arbitrum**

Expand Down
10 changes: 5 additions & 5 deletions packages/arb-node.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### --------------------------------------------------------------------
### Dockerfile
### arb-validator
### arb-node
### Note: run depends on mounting `/home/user/contract.ao` as a volume
### --------------------------------------------------------------------

Expand Down Expand Up @@ -36,7 +36,7 @@ RUN cd arb-avm-cpp/build && \
cmake .. && \
cmake --build . -j $(nproc)

FROM offchainlabs/backend-base:0.3.6 as arb-validator-builder
FROM offchainlabs/backend-base:0.3.6 as arb-node-builder

# Build dependencies
COPY --chown=user arb-avm-cpp/go.* /home/user/arb-avm-cpp/
Expand All @@ -63,14 +63,14 @@ COPY --from=arb-avm-cpp /home/user/arb-avm-cpp/build/lib /home/user/arb-avm-cpp/
COPY --from=arb-avm-cpp /home/user/arb-avm-cpp/cmachine/flags.go /home/user/arb-avm-cpp/cmachine/
COPY --from=arb-avm-cpp /home/user/.hunter /home/user/.hunter

# Build arb-validator
# Build arb-node
RUN cd arb-node-core && go install -v ./cmd/arb-validator && go install -v ./cmd/arb-relay && \
cd ../arb-rpc-node && go install -v ./cmd/arb-node && go install -v ./cmd/arb-dev-node

FROM offchainlabs/cpp-base:0.3.6 as arb-validator
FROM offchainlabs/dist-base:0.3.6 as arb-node
# Export binary

COPY --chown=user --from=arb-validator-builder /home/user/go/bin /home/user/go/bin
COPY --chown=user --from=arb-node-builder /home/user/go/bin /home/user/go/bin
COPY --chown=user arb-os/arb_os/arbos.mexe /home/user/arb-os/arb_os/
RUN mkdir -p /home/user/.arbitrum && \
chown 1000:1000 /home/user/.arbitrum && \
Expand Down
2 changes: 1 addition & 1 deletion packages/arb-rpc-node/txdb/txdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ func (db *TxDB) LatestBlock() (*machine.BlockInfo, error) {
if err != nil {
return nil, err
}
if blockData.BlockLog < totalLogCount {
if blockData != nil && blockData.BlockLog < totalLogCount {
return blockData, nil
}
blockCount--
Expand Down

0 comments on commit b4e28e5

Please sign in to comment.