mirror of
https://github.com/serai-dex/serai.git
synced 2024-11-16 17:07:35 +00:00
Misc formatting fixes
This commit is contained in:
parent
cc917a217d
commit
d32c865c9a
8 changed files with 41 additions and 42 deletions
|
@ -59,7 +59,7 @@ fn digest_yield<D: Digest, F: PrimeField>(digest: D, i: usize) -> F {
|
|||
))
|
||||
}
|
||||
|
||||
/// Aggregate Schnorr signature as defined in https://eprint.iacr.org/2021/350.
|
||||
/// Aggregate Schnorr signature as defined in <https://eprint.iacr.org/2021/350>.
|
||||
#[allow(non_snake_case)]
|
||||
#[derive(Clone, PartialEq, Eq, Debug, Zeroize)]
|
||||
pub struct SchnorrAggregate<C: Ciphersuite> {
|
||||
|
|
|
@ -7,18 +7,17 @@ ENV BITCOIN_DATA=/home/bitcoin/.bitcoin
|
|||
|
||||
WORKDIR /home/bitcoin
|
||||
|
||||
|
||||
RUN apk update \
|
||||
&& apk --no-cache add ca-certificates gnupg bash su-exec
|
||||
&& apk --no-cache add ca-certificates gnupg bash su-exec
|
||||
|
||||
# Get Binary
|
||||
# TODO: When bitcoin.org publishes 23.0, retrieve checksums from there.
|
||||
RUN wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}-x86_64-linux-gnu.tar.gz \
|
||||
&& wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS \
|
||||
&& wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS.asc
|
||||
&& wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS \
|
||||
&& wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS.asc
|
||||
|
||||
# Verify Binary
|
||||
# For the PGP keys of builders and developers, refer to
|
||||
# For the PGP keys of builders and developers, refer to
|
||||
# https://github.com/bitcoin/bitcoin/tree/master/contrib/builder-keys
|
||||
# Serai recognizes the builder keys for 16/17 signatures
|
||||
# from the 23.0 release
|
||||
|
@ -27,10 +26,10 @@ ENV KEYS2 4DAF18FE948E7A965B30F9457E296D555E7F63A7 28E72909F1717FE9607754F8A7BEB
|
|||
|
||||
# Use hardcoded prints to get keys from servers. 2 Different servers used.
|
||||
RUN gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys ${KEYS} \
|
||||
&& gpg --keyserver hkp://keys.openpgp.org:80 --recv-keys ${KEYS2}
|
||||
&& gpg --keyserver hkp://keys.openpgp.org:80 --recv-keys ${KEYS2}
|
||||
|
||||
# verify all sigs and check for valid signature from laanwj -- 71A3
|
||||
RUN gpg --verify --status-fd 1 --verify SHA256SUMS.asc SHA256SUMS | grep "^\[GNUPG:\] VALIDSIG.*71A3B16735405025D447E8F274810B012346C9A6"
|
||||
RUN gpg --verify --status-fd 1 --verify SHA256SUMS.asc SHA256SUMS | grep "^\[GNUPG:\] VALIDSIG.*71A3B16735405025D447E8F274810B012346C9A6"
|
||||
|
||||
RUN grep bitcoin-${BITCOIN_VERSION}-x86_64-linux-gnu.tar.gz SHA256SUMS | sha256sum -c
|
||||
|
||||
|
|
|
@ -13,8 +13,8 @@ bitcoind -regtest -txindex -fallbackfee=0.000001 -rpcuser=$RPC_USER -rpcpassword
|
|||
# give time to bitcoind to start
|
||||
while true
|
||||
do
|
||||
bitcoin-cli -regtest -rpcuser=$RPC_USER -rpcpassword=$RPC_PASS generatetoaddress 100 $MINER && break
|
||||
sleep 5
|
||||
bitcoin-cli -regtest -rpcuser=$RPC_USER -rpcpassword=$RPC_PASS generatetoaddress 100 $MINER && break
|
||||
sleep 5
|
||||
done
|
||||
|
||||
bitcoin-cli -regtest -rpcuser=$RPC_USER -rpcpassword=$RPC_PASS createwallet "miner" false false $RPC_PASS false false true &&
|
||||
|
@ -24,6 +24,6 @@ bitcoin-cli -regtest -rpcuser=$RPC_USER -rpcpassword=$RPC_PASS importprivkey $PR
|
|||
# mine a new block every BLOCK_TIME
|
||||
while true
|
||||
do
|
||||
bitcoin-cli -regtest -rpcuser=$RPC_USER -rpcpassword=$RPC_PASS generatetoaddress 1 $MINER
|
||||
sleep $BLOCK_TIME
|
||||
bitcoin-cli -regtest -rpcuser=$RPC_USER -rpcpassword=$RPC_PASS generatetoaddress 1 $MINER
|
||||
sleep $BLOCK_TIME
|
||||
done
|
||||
|
|
|
@ -6,11 +6,11 @@ ENV GETH_VERSION=1.10.23-d901d853
|
|||
WORKDIR /home/ethereum
|
||||
|
||||
RUN apk update \
|
||||
&& apk --no-cache add ca-certificates gnupg bash su-exec
|
||||
&& apk --no-cache add ca-certificates gnupg bash su-exec
|
||||
|
||||
# Get Binary
|
||||
RUN wget https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-${GETH_VERSION}.tar.gz\
|
||||
&& wget https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-${GETH_VERSION}.tar.gz.asc
|
||||
&& wget https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-${GETH_VERSION}.tar.gz.asc
|
||||
|
||||
# Verify Binary
|
||||
# refer to https://geth.ethereum.org/downloads/#openpgp_signatures
|
||||
|
|
|
@ -4,7 +4,7 @@ FROM alpine:latest as builder
|
|||
# Verification will fail if MONERO_VERSION doesn't match the latest
|
||||
# due to the way monero publishes releases. They overwrite a single hashes.txt file
|
||||
# each release, meaning we can only grab the SHA256 of the latest release.
|
||||
# Most publish a asc file for each release / build architecture ¯\_(ツ)_/¯
|
||||
# Most publish a asc file for each release / build architecture ¯\_(ツ)_/¯
|
||||
ENV MONERO_VERSION=0.18.1.0
|
||||
# monero-linux-x64-v0.18.1.0.tar.bz2 - https://github.com/monero-project/monero-site/commit/9dda1e3ccb84aa14dc09ed598a6d438c18363833
|
||||
ENV GLIBC_VERSION=2.28-r0
|
||||
|
@ -12,7 +12,7 @@ ENV GLIBC_VERSION=2.28-r0
|
|||
WORKDIR /home/monero
|
||||
|
||||
RUN apk update \
|
||||
&& apk --no-cache add ca-certificates gnupg bash su-exec
|
||||
&& apk --no-cache add ca-certificates gnupg bash su-exec
|
||||
|
||||
# Get Binary
|
||||
RUN wget https://downloads.getmonero.org/cli/monero-linux-x64-v${MONERO_VERSION}.tar.bz2
|
||||
|
@ -23,7 +23,7 @@ RUN gpg --keyserver hkp://keyserver.ubuntu.com:80 --keyserver-options no-self-si
|
|||
|
||||
ADD ./temp/hashes-v${MONERO_VERSION}.txt .
|
||||
RUN gpg --verify hashes-v${MONERO_VERSION}.txt \
|
||||
&& cat hashes-v${MONERO_VERSION}.txt | grep "$(sha256sum monero-linux-x64-v${MONERO_VERSION}.tar.bz2 | cut -c 1-64)"
|
||||
&& cat hashes-v${MONERO_VERSION}.txt | grep "$(sha256sum monero-linux-x64-v${MONERO_VERSION}.tar.bz2 | cut -c 1-64)"
|
||||
|
||||
# Cleanup
|
||||
RUN tar -xvjf monero-linux-x64-v${MONERO_VERSION}.tar.bz2 --strip-components=1
|
||||
|
|
|
@ -7,12 +7,12 @@ BLOCK_TIME=${BLOCK_TIME:=5}
|
|||
# Run Monero
|
||||
# TODO: Restore Auth
|
||||
monerod --regtest --rpc-access-control-origins * --confirm-external-bind \
|
||||
--rpc-bind-ip=0.0.0.0 --offline --fixed-difficulty=1 \
|
||||
--non-interactive --mining-threads 1 --detach
|
||||
--rpc-bind-ip=0.0.0.0 --offline --fixed-difficulty=1 \
|
||||
--non-interactive --mining-threads 1 --detach
|
||||
|
||||
# give time to monerod to start
|
||||
while true; do
|
||||
sleep 5
|
||||
sleep 5
|
||||
done
|
||||
|
||||
# Create wallet from PRIV_KEY in monero wallet
|
||||
|
|
|
@ -19,31 +19,31 @@ RUN rustup update
|
|||
|
||||
# Install Solc @ 0.8.16
|
||||
RUN --mount=type=cache,target=/root/.cache/ \
|
||||
--mount=type=cache,target=/root/.local/ \
|
||||
--mount=type=cache,target=/root/.solc-select \
|
||||
pip3 install solc-select==0.2.1
|
||||
--mount=type=cache,target=/root/.local/ \
|
||||
--mount=type=cache,target=/root/.solc-select \
|
||||
pip3 install solc-select==0.2.1
|
||||
RUN --mount=type=cache,target=/root/.cache/ \
|
||||
--mount=type=cache,target=/root/.local/ \
|
||||
--mount=type=cache,target=/root/.solc-select \
|
||||
solc-select install 0.8.16
|
||||
--mount=type=cache,target=/root/.local/ \
|
||||
--mount=type=cache,target=/root/.solc-select \
|
||||
solc-select install 0.8.16
|
||||
RUN --mount=type=cache,target=/root/.cache/ \
|
||||
--mount=type=cache,target=/root/.local/ \
|
||||
--mount=type=cache,target=/root/.solc-select \
|
||||
solc-select use 0.8.16
|
||||
--mount=type=cache,target=/root/.local/ \
|
||||
--mount=type=cache,target=/root/.solc-select \
|
||||
solc-select use 0.8.16
|
||||
|
||||
# Mount cargo and serai cache for Cache & Build
|
||||
RUN --mount=type=cache,target=/root/.local/ \
|
||||
--mount=type=cache,target=/root/.solc-select \
|
||||
--mount=type=cache,target=/root/.cache/ \
|
||||
--mount=type=cache,target=/usr/local/cargo/git \
|
||||
--mount=type=cache,target=/usr/local/cargo/registry \
|
||||
--mount=type=cache,target=/serai/target/release/build \
|
||||
--mount=type=cache,target=/serai/target/release/deps \
|
||||
--mount=type=cache,target=/serai/target/release/.fingerprint \
|
||||
--mount=type=cache,target=/serai/target/release/incremental \
|
||||
--mount=type=cache,target=/serai/target/release/wbuild \
|
||||
--mount=type=cache,target=/serai/target/release/lib* \
|
||||
cargo build --release
|
||||
--mount=type=cache,target=/root/.solc-select \
|
||||
--mount=type=cache,target=/root/.cache/ \
|
||||
--mount=type=cache,target=/usr/local/cargo/git \
|
||||
--mount=type=cache,target=/usr/local/cargo/registry \
|
||||
--mount=type=cache,target=/serai/target/release/build \
|
||||
--mount=type=cache,target=/serai/target/release/deps \
|
||||
--mount=type=cache,target=/serai/target/release/.fingerprint \
|
||||
--mount=type=cache,target=/serai/target/release/incremental \
|
||||
--mount=type=cache,target=/serai/target/release/wbuild \
|
||||
--mount=type=cache,target=/serai/target/release/lib* \
|
||||
cargo build --release
|
||||
|
||||
# Prepare Image
|
||||
FROM ubuntu:latest as image
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
export GENESIS=$(cat /temp/genesis)
|
||||
if [[ -z $VALIDATOR ]]; then
|
||||
serai-node --tmp --chain $CHAIN --name $NAME
|
||||
serai-node --tmp --chain $CHAIN --name $NAME
|
||||
else
|
||||
serai-node --tmp --chain $CHAIN --$NAME
|
||||
serai-node --tmp --chain $CHAIN --$NAME
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue