-
Notifications
You must be signed in to change notification settings - Fork 4
Add Battlepass pallet #231
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
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
c4868d3
Add Battlepass pallet
FiberMan 16291ca
Add battlepass to the subzero-dev runtime
b2bf914
Update gamedao-protocol submodule version
9b65514
Add subzero-dev dockerfile
c6b4444
Bump runtime version 63->64
a188e25
Bump version to 3.2.66
FiberMan 9534d2b
Fix benchmark build.
FiberMan a51615f
Reuse rmrk_core constants.
FiberMan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| # Note: We don't use Alpine and its packaged Rust/Cargo | ||
| # because they're too often out of date, | ||
| # preventing them from being used to build subzero/Polkadot. | ||
|
|
||
| FROM phusion/baseimage:focal-1.2.0 as baseimage | ||
| ENV DEBIAN_FRONTEND=noninteractive | ||
|
|
||
|
|
||
| RUN apt-get update && \ | ||
| apt-get dist-upgrade -y -o Dpkg::Options::="--force-confold" && \ | ||
| apt-get install -y cmake pkg-config libssl-dev git clang | ||
|
|
||
| WORKDIR /subzero | ||
| COPY . /subzero | ||
|
|
||
| RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \ | ||
| export PATH="$PATH:$HOME/.cargo/bin" && \ | ||
| rustup toolchain install nightly-2022-06-24 && \ | ||
| rustup target add wasm32-unknown-unknown --toolchain nightly-2022-06-24 && \ | ||
| rustup default nightly-2022-06-24 &&\ | ||
| rustup show | ||
|
|
||
| # ===== STAGE 2 ====== | ||
|
|
||
| FROM baseimage as builder | ||
| ARG PROFILE=release | ||
|
|
||
| RUN export PATH="$PATH:$HOME/.cargo/bin" && \ | ||
| cargo build "--$PROFILE" | ||
|
|
||
| # ===== STAGE 3 ====== | ||
|
|
||
| FROM phusion/baseimage:focal-1.2.0 | ||
| LABEL maintainer="devops@zero.io" | ||
| LABEL description="This is the 2nd stage: a very small image where we copy the subzero binary." | ||
| ARG PROFILE=release | ||
|
|
||
| RUN mv /usr/share/ca* /tmp && \ | ||
| rm -rf /usr/share/* && \ | ||
| mv /tmp/ca-certificates /usr/share/ && \ | ||
| useradd -m -u 1000 -U -s /bin/sh -d /subzero subzero && \ | ||
| mkdir -p /subzero/.local/share/subzero && \ | ||
| chown -R subzero:subzero /subzero/.local && \ | ||
| ln -s /subzero/.local/share/subzero /data | ||
|
|
||
| COPY --from=builder /subzero/target/$PROFILE/subzero-dev /usr/local/bin | ||
| COPY --from=builder /subzero/.docker/chainspec /chainspec | ||
|
|
||
| # checks | ||
| RUN ldd /usr/local/bin/subzero-dev && \ | ||
| /usr/local/bin/subzero-dev --version | ||
|
|
||
| # Shrinking | ||
| # RUN rm -rf /usr/lib/python* && \ | ||
| # rm -rf /usr/bin /usr/sbin /usr/share/man | ||
|
|
||
| USER subzero | ||
| EXPOSE 30333 9933 9944 9615 | ||
| VOLUME ["/data"] | ||
|
|
||
| CMD ["/usr/local/bin/subzero-dev"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule gamedao-protocol
updated
19 files
| +59 −0 | battlepass/Cargo.toml | |
| +142 −0 | battlepass/readme.md | |
| +341 −0 | battlepass/src/lib.rs | |
| +37 −0 | battlepass/src/types.rs | |
| +3 −3 | control/Cargo.toml | |
| +19 −3 | control/src/benchmarking.rs | |
| +76 −47 | control/src/lib.rs | |
| +5 −3 | control/src/tests.rs | |
| +38 −23 | control/src/weights.rs | |
| +4 −3 | flow/Cargo.toml | |
| +48 −46 | flow/src/lib.rs | |
| +0 −1 | flow/src/tests.rs | |
| +1 −0 | sense/Cargo.toml | |
| +3 −15 | sense/src/lib.rs | |
| +5 −0 | sense/src/tests.rs | |
| +2 −2 | signal/Cargo.toml | |
| +56 −54 | signal/src/lib.rs | |
| +0 −2 | signal/src/tests.rs | |
| +15 −7 | signal/src/types.rs |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are no benchmarks defined for this pallet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not yet, will add benchmarks in separate PR.