Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(parachain/availabilitystore): implement database access functions for availability store subsystem #3640

Merged
merged 25 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
fd683ca
add batches to write data functions, add delete functions
edwardmack Dec 6, 2023
e531bfe
added functions for unfinalized and prune_by_time db tables
edwardmack Dec 7, 2023
b6e0f7e
replace common.Hash with parachaintypes.CandidateHash where needed
edwardmack Dec 8, 2023
b4cb070
WIP - save commit, working on store available data
edwardmack Dec 8, 2023
49bb2b6
wip, save commit, working on understanding erasure branch
edwardmack Dec 11, 2023
0ae3a11
implement branches from chunks for storeAvailableData
edwardmack Dec 12, 2023
dc5db6c
address PR comments
edwardmack Dec 14, 2023
b10929e
address PR comments
edwardmack Jan 2, 2024
9a22b77
unexport unexported vars, add compile-erasure to gossamer build target
edwardmack Jan 8, 2024
6fda41a
update makefile to add compile-erasure to build target
edwardmack Jan 8, 2024
4f69f58
address rebase conflicts
edwardmack Jan 10, 2024
6a978bb
revert Makefile
edwardmack Jan 10, 2024
43cde7b
add compile-erasure dependency to build target
edwardmack Jan 10, 2024
15f4a77
add rust to Dockerfile
edwardmack Jan 10, 2024
7918a6f
add copy erasure target
edwardmack Jan 10, 2024
9ec9337
change copy lib location
edwardmack Jan 10, 2024
19fcc1b
add LD_LIBRARY_PATH env to Dockerfile so erasure lib will be found
edwardmack Jan 11, 2024
92266f9
add compile-erasure to integration test workflow
edwardmack Jan 12, 2024
a741ddd
address formatting comments
edwardmack Jan 16, 2024
f560ed8
Merge branch 'feat/parachain' into ed/availabilityStoreDBAccess
edwardmack Jan 16, 2024
d04d724
fix merge conflict
edwardmack Jan 17, 2024
4f94ed9
refactor how batches are handled
edwardmack Jan 17, 2024
c0fbd8f
Update .gitignore
kishansagathiya Jan 18, 2024
6eb507a
un-export un-exported struct
edwardmack Jan 22, 2024
a0fe4f0
Merge branch 'feat/parachain' into ed/availabilityStoreDBAccess
edwardmack Jan 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading