-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement V5 with separate Zebra setup
- Loading branch information
1 parent
767b0a1
commit b0275c9
Showing
7 changed files
with
164 additions
and
36 deletions.
There are no files selected for viewing
This file contains 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,20 @@ | ||
FROM rust:1.81.0 | ||
|
||
# Set up Rust and cargo | ||
RUN apt-get update && apt-get install git build-essential clang -y | ||
|
||
# Checkout and build custom branch of the zebra repository | ||
ARG branch=zsa-integration-demo | ||
ADD https://api.github.com/repos/QED-it/zebra/git/refs/heads/$branch version.json | ||
RUN git clone -b $branch --single-branch https://github.com/QED-it/zebra.git | ||
|
||
WORKDIR zebra | ||
|
||
RUN cargo build --release --package zebrad --bin zebrad --features="getblocktemplate-rpcs" | ||
|
||
EXPOSE 18232 | ||
|
||
COPY regtest-config-nu5.toml regtest-config-nu5.toml | ||
|
||
# Run the zebra node | ||
ENTRYPOINT ["target/release/zebrad", "-c", "regtest-config-nu5.toml"] |
This file contains 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 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,22 @@ | ||
[mining] | ||
miner_address = 'tmLTZegcJN5zaufWQBARHkvqC62mTumm3jR' | ||
|
||
[network] | ||
network = "Regtest" | ||
|
||
# This section may be omitted when testing only Canopy | ||
[network.testnet_parameters.activation_heights] | ||
# Configured activation heights must be greater than or equal to 1, | ||
# block height 0 is reserved for the Genesis network upgrade in Zebra | ||
NU5 = 1 | ||
|
||
# This section may be omitted if a persistent Regtest chain state is desired | ||
[state] | ||
ephemeral = true | ||
|
||
# This section may be omitted if it's not necessary to send transactions to Zebra's mempool | ||
[rpc] | ||
listen_addr = "0.0.0.0:18232" | ||
|
||
# disable cookie auth | ||
enable_cookie_auth = false |
This file contains 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 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 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 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,27 @@ | ||
use zcash_primitives::consensus::{BlockHeight, NetworkType, NetworkUpgrade, Parameters}; | ||
|
||
#[derive(PartialEq, Eq, Copy, Clone, Debug)] | ||
pub struct RegtestNetworkV5; | ||
|
||
pub const REGTEST_NETWORK_V5: RegtestNetworkV5 = RegtestNetworkV5; | ||
|
||
impl Parameters for RegtestNetworkV5 { | ||
fn network_type(&self) -> NetworkType { | ||
NetworkType::Regtest | ||
} | ||
|
||
fn activation_height(&self, nu: NetworkUpgrade) -> Option<BlockHeight> { | ||
match nu { | ||
NetworkUpgrade::Overwinter => Some(BlockHeight::from_u32(1)), | ||
NetworkUpgrade::Sapling => Some(BlockHeight::from_u32(1)), | ||
NetworkUpgrade::Blossom => Some(BlockHeight::from_u32(1)), | ||
NetworkUpgrade::Heartwood => Some(BlockHeight::from_u32(1)), | ||
NetworkUpgrade::Canopy => Some(BlockHeight::from_u32(1)), | ||
NetworkUpgrade::Nu5 => Some(BlockHeight::from_u32(1)), | ||
NetworkUpgrade::Nu6 => None, | ||
NetworkUpgrade::Nu7 => None, | ||
#[cfg(zcash_unstable = "zfuture")] | ||
NetworkUpgrade::ZFuture => None, | ||
} | ||
} | ||
} |