mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 10:01:17 +00:00
Delete staking miner (#1480)
* Delete staking miner New repo should be used instead https://github.com/paritytech/staking-miner-v2 Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Remove staking-miner CI jobs Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
committed by
GitHub
parent
6df8909d94
commit
4b8bd9060e
@@ -1,37 +0,0 @@
|
||||
# staking-miner container image
|
||||
|
||||
## Build using the Builder
|
||||
|
||||
```
|
||||
./build.sh
|
||||
```
|
||||
|
||||
## Build the injected Image
|
||||
|
||||
You first need a valid Linux binary to inject. Let's assume this binary is located in `BIN_FOLDER`.
|
||||
|
||||
```
|
||||
./build-injected.sh "$BIN_FOLDER"
|
||||
```
|
||||
|
||||
## Test
|
||||
|
||||
Here is how to test the image. We can generate a valid seed but the staking-miner will quickly notice that our
|
||||
account is not funded and "does not exist".
|
||||
|
||||
You may pass any ENV supported by the binary and must provide at least a few such as `SEED` and `URI`:
|
||||
```
|
||||
ENV SEED=""
|
||||
ENV URI="wss://rpc.polkadot.io:443"
|
||||
ENV RUST_LOG="info"
|
||||
```
|
||||
|
||||
```
|
||||
export SEED=$(subkey generate -n polkadot --output-type json | jq -r .secretSeed)
|
||||
podman run --rm -it \
|
||||
-e URI="wss://rpc.polkadot.io:443" \
|
||||
-e RUST_LOG="info" \
|
||||
-e SEED \
|
||||
localhost/parity/staking-miner \
|
||||
dry-run seq-phragmen
|
||||
```
|
||||
@@ -1,13 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Sample call:
|
||||
# $0 /path/to/folder_with_staking-miner_binary
|
||||
# This script replace the former dedicated staking-miner "injected" Dockerfile
|
||||
# and shows how to use the generic binary_injected.dockerfile
|
||||
|
||||
PROJECT_ROOT=`git rev-parse --show-toplevel`
|
||||
|
||||
export BINARY=staking-miner
|
||||
export ARTIFACTS_FOLDER=$1
|
||||
|
||||
$PROJECT_ROOT/docker/scripts/build-injected.sh
|
||||
@@ -1,13 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Sample call:
|
||||
# $0 /path/to/folder_with_staking-miner_binary
|
||||
# This script replace the former dedicated staking-miner "injected" Dockerfile
|
||||
# and shows how to use the generic binary_injected.dockerfile
|
||||
|
||||
PROJECT_ROOT=`git rev-parse --show-toplevel`
|
||||
ENGINE=podman
|
||||
|
||||
echo "Building the staking-miner using the Builder image"
|
||||
echo "PROJECT_ROOT=$PROJECT_ROOT"
|
||||
$ENGINE build -t staking-miner -f "${PROJECT_ROOT}/docker/dockerfiles/staking-miner/staking-miner_builder.Dockerfile" "$PROJECT_ROOT"
|
||||
@@ -1,3 +0,0 @@
|
||||
# Staking-miner Docker image
|
||||
|
||||
## [GitHub](https://github.com/paritytech/polkadot/tree/master/utils/staking-miner)
|
||||
@@ -1,43 +0,0 @@
|
||||
FROM paritytech/ci-linux:production as builder
|
||||
|
||||
# metadata
|
||||
ARG VCS_REF
|
||||
ARG BUILD_DATE
|
||||
ARG IMAGE_NAME="staking-miner"
|
||||
ARG PROFILE=production
|
||||
|
||||
LABEL description="This is the build stage. Here we create the binary."
|
||||
|
||||
WORKDIR /app
|
||||
COPY . /app
|
||||
RUN cargo build --locked --profile $PROFILE --package staking-miner
|
||||
|
||||
# ===== SECOND STAGE ======
|
||||
|
||||
FROM docker.io/parity/base-bin:latest
|
||||
LABEL description="This is the 2nd stage: a very small image where we copy the binary."
|
||||
LABEL io.parity.image.authors="devops-team@parity.io" \
|
||||
io.parity.image.vendor="Parity Technologies" \
|
||||
io.parity.image.title="${IMAGE_NAME}" \
|
||||
io.parity.image.description="${IMAGE_NAME} for substrate based chains" \
|
||||
io.parity.image.source="https://github.com/paritytech/polkadot/blob/${VCS_REF}/scripts/ci/dockerfiles/${IMAGE_NAME}/${IMAGE_NAME}_builder.Dockerfile" \
|
||||
io.parity.image.revision="${VCS_REF}" \
|
||||
io.parity.image.created="${BUILD_DATE}" \
|
||||
io.parity.image.documentation="https://github.com/paritytech/polkadot/"
|
||||
|
||||
ARG PROFILE=release
|
||||
COPY --from=builder /app/target/$PROFILE/staking-miner /usr/local/bin
|
||||
|
||||
# show backtraces
|
||||
ENV RUST_BACKTRACE 1
|
||||
|
||||
USER parity
|
||||
|
||||
ENV SEED=""
|
||||
ENV URI="wss://rpc.polkadot.io"
|
||||
ENV RUST_LOG="info"
|
||||
|
||||
# check if the binary works in this container
|
||||
RUN /usr/local/bin/staking-miner --version
|
||||
|
||||
ENTRYPOINT [ "/usr/local/bin/staking-miner" ]
|
||||
@@ -1,18 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
TMP=$(mktemp -d)
|
||||
ENGINE=${ENGINE:-podman}
|
||||
|
||||
# You need to build an injected image first
|
||||
|
||||
# Fetch some binaries
|
||||
$ENGINE run --user root --rm -i \
|
||||
-v "$TMP:/export" \
|
||||
--entrypoint /bin/bash \
|
||||
parity/staking-miner -c \
|
||||
'cp "$(which staking-miner)" /export'
|
||||
|
||||
echo "Checking binaries we got:"
|
||||
tree $TMP
|
||||
|
||||
./build-injected.sh $TMP
|
||||
Reference in New Issue
Block a user