Skip to content

Commit

Permalink
feat(parachain/availabilitystore): implement database access function…
Browse files Browse the repository at this point in the history
…s for availability store subsystem (#3640)

Co-authored-by: Kishan Sagathiya <[email protected]>
  • Loading branch information
edwardmack and kishansagathiya authored Jan 23, 2024
1 parent 19a437a commit 7c94a6f
Show file tree
Hide file tree
Showing 7 changed files with 794 additions and 130 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,8 @@ jobs:
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go-mod

- name: generate a shared library file for erasure
run: make compile-erasure

- name: Run integration tests
run: go test -timeout=45m -tags integration ${{ matrix.packages }}
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ RUN wget -qO- https://deb.nodesource.com/setup_14.x | bash - && \
RUN wget -O /usr/local/bin/subkey https://chainbridge.ams3.digitaloceanspaces.com/subkey-v2.0.0 && \
chmod +x /usr/local/bin/subkey

# Get Rust; NOTE: using sh for better compatibility with other base images
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y

# Add .cargo/bin to PATH
ENV PATH="/root/.cargo/bin:${PATH}"

WORKDIR /go/src/github.com/ChainSafe/gossamer

# Go dependencies
Expand All @@ -26,6 +32,9 @@ RUN go mod download
# Copy gossamer sources
COPY . .

# build erasure lib
RUN cargo build --release --manifest-path=./lib/erasure/rustlib/Cargo.toml

# Build
ARG GO_BUILD_FLAGS
RUN go build \
Expand All @@ -43,5 +52,8 @@ EXPOSE 7001 8546 8540

ENTRYPOINT [ "/gossamer/bin/gossamer" ]

ENV LD_LIBRARY_PATH=/usr/local/lib

COPY chain /gossamer/chain
COPY --from=builder /go/src/github.com/ChainSafe/gossamer/lib/erasure/rustlib/target/release/liberasure.so /usr/local/lib/liberasure.so
COPY --from=builder /go/src/github.com/ChainSafe/gossamer/bin/gossamer /gossamer/bin/gossamer
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ deps:
go mod download

## build: Builds application binary and stores it in `./bin/gossamer`
build:
build: compile-erasure
@echo " > \033[32mBuilding binary...\033[0m "
go build -trimpath -o ./bin/gossamer -ldflags="-s -w" ./cmd/gossamer

Expand Down
Loading

0 comments on commit 7c94a6f

Please sign in to comment.