Skip to content

Commit 60ccf1b

Browse files
authored
feat: init qustream (#4)
* build with --locked flag * init - produces blocks and has balances * rename SS58Prefix and collator name * update chain spec ID * update readme * disable inflation
1 parent 8002c5e commit 60ccf1b

14 files changed

Lines changed: 95 additions & 157 deletions

File tree

.cargo/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ moonbase = " build --release -p moonbeam --no-default-features --features moonba
33
moonbase-rococo = " build --release -p moonbeam --no-default-features --features moonbase-native,rococo-native"
44
moonriver = " build --release -p moonbeam --no-default-features --features moonriver-native"
55
moonriver-rococo = " build --release -p moonbeam --no-default-features --features moonriver-native,rococo-native"
6-
moonbeam = " build --release -p moonbeam --no-default-features --features moonbeam-native"
6+
moonbeam = " build --release --locked -p moonbeam --no-default-features --features moonbeam-native"
77
moonbeam-rococo = " build --release -p moonbeam --no-default-features --features moonbeam-native,rococo-native"
88

99
#

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ZOMBIENET_BIN := zombienet
1515
POLKADOT_BIN := polkadot
1616
POLKADOT_EXECUTE_WORKER_BIN := polkadot-execute-worker
1717
POLKADOT_PREPARE_WORKER_BIN := polkadot-prepare-worker
18-
MOONBEAM_RELEASE_BIN := target/release/moonbeam
18+
MOONBEAM_RELEASE_BIN := target/release/qustream
1919

2020
UNAME_S := $(shell uname -s)
2121
ifeq ($(UNAME_S),Linux)
@@ -41,7 +41,7 @@ BINARIES := $(ZOMBIENET_BIN) $(BRIDGE_RELAY_BIN) $(POLKADOT_BIN) $(POLKADOT_EXEC
4141

4242
all: setup-moonbeam download-binaries
4343

44-
setup-moonbeam: zombienet/bin/moonbeam
44+
setup-moonbeam: zombienet/bin/qustream
4545

4646
download-binaries: $(BINARIES:%=zombienet/bin/%)
4747

@@ -65,7 +65,7 @@ zombienet/bin/${POLKADOT_BIN}%:
6565
@curl -L -o "zombienet/bin/${POLKADOT_BIN}$*" "${POLKADOT_DOWNLOAD_URL}/${POLKADOT_BIN}$*${POLKADOT_BIN_POSTFIX}"
6666
@chmod +x "zombienet/bin/${POLKADOT_BIN}$*"
6767

68-
zombienet/bin/moonbeam:
68+
zombienet/bin/qustream:
6969
@if [ ! -L "$@" ]; then \
7070
echo "Creating symlink: $@ -> ${MOONBEAM_RELEASE_BIN}"; \
7171
ln -s "../../${MOONBEAM_RELEASE_BIN}" "$@"; \
@@ -76,10 +76,10 @@ zombienet/bin/moonbeam:
7676
fi
7777

7878
release-build:
79-
@cargo build --release
79+
@cargo build --release --locked
8080

8181
export PATH = $(ZOMBINET_PATHS)
82-
start-zombienet-moonbeam: all
82+
start-zombienet-qustream: all
8383
@zombienet/bin/${ZOMBIENET_BIN} spawn zombienet/configs/moonbeam-polkadot.toml
8484

8585
export PATH = $(ZOMBINET_PATHS)

README.md

Lines changed: 25 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,19 @@
1-
# ![Moonbeam](media/Banner.jpg)
2-
3-
# Information
4-
5-
[![Tests](https://github.com/moonbeam-foundation/moonbeam/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/moonbeam-foundation/moonbeam/actions/workflows/build.yml?query=branch:master)
1+
# QuStream Network
62

73
**An Ethereum compatible [Parachain](https://polkadot.com/rollups) built with the [Polkadot-SDK](https://github.com/paritytech/polkadot-sdk).**
84

9-
👉 _Discover the Moonbeam project at [moonbeam.network](https://moonbeam.network)._<br>
10-
👉 _Learn to [use the Moonbeam network](https://docs.moonbeam.network/) with our technical docs._<br>
11-
👉 _Reference our [crate-level docs (rustdocs)](https://moonbeam-foundation.github.io/moonbeam) to contribute._
12-
13-
## Run Moonbeam with zombienet
14-
```bash
15-
# Start Polkadot relay with Moonbeam parachain
16-
make start-zombienet-moonbeam
17-
# Start Kusama relay with Moonriver parachain
18-
make start-zombienet-moonriver
19-
```
20-
21-
## Run a Moonbase Alpha (Moonbeam TestNet) Node with Docker
22-
23-
Docker images are published for every tagged release. Learn more with `moonbeam --help`.
24-
25-
```bash
26-
# Join the public testnet
27-
docker run --network="host" moonbeamfoundation/moonbeam:v0.46.0 --chain alphanet
28-
```
29-
30-
You can find more detailed instructions to [run a full node in our TestNet](https://docs.moonbeam.network/node-operators/networks/run-a-node/overview/)
5+
👉 _Discover the QuStreamNetwork project at [qustream.com](https://qustream.com)._<br>
316

32-
## Run a Local Development Node with Docker
33-
34-
Developers who are building dApps to run on Moonbeam, may want a lightweight node to work with
35-
locally. You can quickly set up a single node without a relay chain backing it using the development service.
7+
## Run QuStreamNetwork with zombienet for local development
368

379
```bash
38-
# Run a dev service node
39-
docker run --network="host" moonbeamfoundation/moonbeam:v0.46.0 --dev
40-
```
41-
42-
For more information, see our detailed instructions to [run a development node](https://docs.moonbeam.network/builders/get-started/networks/moonbeam-dev/)
43-
44-
### Sealing Options
45-
46-
The above command will start the node in instant seal mode. It creates a block when a transaction arrives, similar to Ganache's auto-mine. You can also choose to author blocks at a regular interval, or control authoring manually through the RPC.
47-
48-
```bash
49-
# Author a block every 6 seconds.
50-
docker run --network="host" moonbeamfoundation/moonbeam:v0.46.0 --dev --sealing 6000
51-
52-
# Manually control the block authorship and finality
53-
docker run --network="host" moonbeamfoundation/moonbeam:v0.46.0 --dev --sealing manual
10+
# Start Polkadot relay with QuStreamNetwork parachain
11+
make start-zombienet-qustream
5412
```
5513

5614
### Prefunded Development Addresses
5715

58-
Running Moonbeam in development mode will pre-fund several well-known addresses that (mostly) contain the letters "th" in their names to remind you that they are for ethereum-compatible usage. These addresses are derived from
16+
Running QuStreamNetwork in development mode will pre-fund several well-known addresses that (mostly) contain the letters "th" in their names to remind you that they are for ethereum-compatible usage. These addresses are derived from
5917
Substrate's canonical mnemonic: `bottom drive obey lake curtain smoke basket hold race lonely fit walk`
6018

6119
```
@@ -108,26 +66,26 @@ Additionally, the prefunded default account for testing purposes is as follows:
10866
- PrivKey: 0x99b3c12287537e38c90a9219d4cb074a89a16e9cdb20bf85728ebd97c343e342
10967
```
11068

111-
## Build the Moonbeam Node
69+
## Build the QuStreamNetwork Node
11270

113-
To build Moonbeam, a proper Substrate development environment is required. If you're new to working with Substrate-based blockchains, consider starting with the [Getting Started with a Moonbeam Development Node](https://docs.moonbeam.network/builders/get-started/networks/moonbeam-dev/) documentation.
71+
To build QuStreamNetwork, a proper Substrate development environment is required. If you're new to working with Substrate-based blockchains, consider starting with the [Getting Started with a Moonbeam Development Node](https://docs.moonbeam.network/builders/get-started/networks/moonbeam-dev/) documentation.
11472

11573
If you need a refresher setting up your Substrate environment, see [Substrate's Getting Started Guide](https://substrate.dev/docs/en/knowledgebase/getting-started/).
11674

117-
Please note that cloning the master branch might result in an unstable build. If you want a stable version, check out the [latest releases](https://github.com/moonbeam-foundation/moonbeam/releases).
75+
Please note that cloning the qustream branch might result in an unstable build. If you want a stable version, check out the [latest releases](https://github.com/Asphere-xyz/QuStreamNetwork/releases).
11876

11977
```bash
12078
# Fetch the code
121-
git clone https://github.com/moonbeam-foundation/moonbeam
122-
cd moonbeam
79+
git clone https://github.com/Asphere-xyz/QuStreamNetwork
80+
cd QuStreamNetwork
12381

12482
# Build the node (The first build will be long (~30min))
125-
cargo build --release
83+
cargo build --release --locked
12684
```
12785

12886
## Run Tests
12987

130-
Moonbeam incorporates Rust unit tests and TypeScript integration tests, which are executed in CI and can also be run locally.
88+
QuStreamNetwork incorporates Rust unit tests and TypeScript integration tests, which are executed in CI and can also be run locally.
13189

13290
```bash
13391
# Run the Rust unit tests
@@ -150,32 +108,28 @@ make run-bridge-integration-tests
150108

151109
## Chain IDs
152110

153-
The Ethereum specification describes a numeric Chain Id. The Moonbeam mainnet will have a Chain Id
154-
of 1284, symbolizing the 1284 milliseconds it takes for a Moonbeam to reach Earth.
111+
The Ethereum specification describes a numeric Chain Id. The QuStream mainnet will have a Chain Id
112+
of 5041.
155113

156-
Moonbeam nodes support a variety of public chains and testnets, each with their respective Chain Ids as follows:
114+
QuStream nodes support both mainnet and testnet, each with their respective Chain Ids as follows:
157115

158116
| Network Description | Chain ID | Target Relay Runtime |
159117
| ---------------------------------- | ----------- | -------------------- |
160-
| Local Parachain TestNet | 1280 | |
161-
| Local Development TestNet | 1281 | |
162-
| Reserved for other TestNets | 1282 - 1283 | |
163-
| Moonbeam | 1284 | Polkadot |
164-
| Moonriver | 1285 | Kusama |
165-
| Moonrock | 1286 | Rococo |
166-
| Moonbase Alpha TestNet | 1287 | Westend |
167-
| Reserved for other public networks | 1288 - 1289 | |
118+
| Local Parachain TestNet | 5041 | |
119+
| Local Development TestNet | 5041 | |
120+
| QuStream Mainnet | 5041 | Polkadot |
121+
| QuStream Testnet | 5042 | Polkadot |
168122

169123
Note that the runtimes can also be configured to target different relay networks.
170124

171125
## Runtime Architecture
172126

173-
The Moonbeam Runtime, built using FRAME, comprises pallets from Polkadot-SDK, Frontier, and the `pallets/` directory.
127+
The QuStreamNetwork Runtime, built using FRAME, comprises pallets from Polkadot-SDK, Frontier, and the `pallets/` directory.
174128

175129
From Polkadot-SDK:
176130

177131
- _Utility_: Allows users to use derivative accounts, and batch calls
178-
- _Balances_: Tracks GLMR token balances
132+
- _Balances_: Tracks QST token balances
179133
- _Sudo_: Allows a privileged account to make arbitrary runtime changes. This will be removed before launch.
180134
- _Timestamp_: On-Chain notion of time
181135
- _Transaction Payment_: Transaction payment (fee) management
@@ -185,25 +139,18 @@ From Polkadot-SDK:
185139

186140
From Frontier:
187141

188-
- _EVM Chain Id_: A place to store the chain id for each Moonbeam network
142+
- _EVM Chain Id_: A place to store the chain id for each QuStream network
189143
- _EVM_: Encapsulates execution logic for an Ethereum Virtual Machine
190144
- _Ethereum_: Ethereum-style data encoding and access for the EVM.
191145

192-
The following pallets are stored in `pallets/`. They are designed for Moonbeam's specific requirements:
146+
The following pallets are stored in `pallets/`. They are designed for QuStream's specific requirements:
193147

194148
- _Author Inherent_: Allows block authors to include their identity in a block via an inherent.
195149
- _Parachain Staking_: Minimal staking pallet that selects collators by total amount at stake
196150

197151
When modifying the git repository for these dependencies, a tool called [diener](https://github.com/bkchr/diener) can be used to replace the git URL and branch for each reference in all `Cargo.toml` files with a single command. This alleviates a lot of the repetitive modifications necessary when changing dependency versions.
198152

199-
## Rustdocs
200-
201-
Rustdocs for the Moonbeam codebase are automatically generated and published
202-
[here](https://moonbeam-foundation.github.io/moonbeam/moonbeam_runtime/index.html).
203-
204153
## Contribute
205154

206-
Moonbeam is open-source under the terms of the GPL3, and we welcome contributions.. Please review our
155+
QuStreamNetwork is open-source under the terms of the GPL3, and we welcome contributions.. Please review our
207156
[CONTRIBUTIONS.md](CONTRIBUTIONS.md) document for more information.
208-
209-
Example of version bumping PR (runtime and node): https://github.com/moonbeam-foundation/moonbeam/pull/601/files

node/Cargo.toml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,27 @@ license = "GPL-3.0-only"
88
version = "0.47.2"
99

1010
[[bin]]
11-
name = 'moonbeam'
11+
name = 'qustream'
1212
path = 'src/main.rs'
1313

1414
[dependencies]
1515

1616
moonbeam-cli = { workspace = true }
1717

1818
[features]
19-
default = [ "moonbase-native", "moonbeam-native", "moonriver-native", "lazy-loading" ]
19+
default = [
20+
"moonbase-native",
21+
"moonbeam-native",
22+
"moonriver-native",
23+
"lazy-loading",
24+
]
2025

21-
moonbase-native = [ "moonbeam-cli/moonbase-native" ]
22-
moonbeam-native = [ "moonbeam-cli/moonbeam-native" ]
23-
moonriver-native = [ "moonbeam-cli/moonriver-native" ]
26+
moonbase-native = ["moonbeam-cli/moonbase-native"]
27+
moonbeam-native = ["moonbeam-cli/moonbeam-native"]
28+
moonriver-native = ["moonbeam-cli/moonriver-native"]
2429

2530
lazy-loading = ["moonbeam-cli/lazy-loading"]
2631

2732
metadata-hash = ["moonbeam-cli/metadata-hash"]
2833

29-
runtime-benchmarks = [
30-
"moonbeam-cli/runtime-benchmarks"
31-
]
34+
runtime-benchmarks = ["moonbeam-cli/runtime-benchmarks"]

node/cli-opt/src/account_key.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ impl Network {
3636
/// Returns the coin type for the derivation path
3737
pub fn coin_type(&self) -> u32 {
3838
match self {
39-
Network::Moonbeam => 1284,
39+
Network::Moonbeam => 5041,
4040
Network::Moonriver => 1285,
4141
Network::Moonbase => 1287,
4242
Network::Ethereum => 60,

node/cli/src/command.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ fn load_spec(
114114

115115
impl SubstrateCli for Cli {
116116
fn impl_name() -> String {
117-
"Moonbeam Parachain Collator".into()
117+
"QuStream Parachain Collator".into()
118118
}
119119

120120
fn impl_version() -> String {
@@ -123,7 +123,7 @@ impl SubstrateCli for Cli {
123123

124124
fn description() -> String {
125125
format!(
126-
"Moonbase Parachain Collator\n\nThe command-line arguments provided first will be \
126+
"QuStream Parachain Collator\n\nThe command-line arguments provided first will be \
127127
passed to the parachain node, while the arguments provided after -- will be passed \
128128
to the relaychain node.\n\n\
129129
{} [parachain-args] -- [relaychain-args]",
@@ -154,7 +154,7 @@ impl Cli {
154154
#[cfg(feature = "moonriver-native")]
155155
spec if spec.is_moonriver() => return &moonbeam_service::moonriver_runtime::VERSION,
156156
#[cfg(feature = "moonbeam-native")]
157-
spec if spec.is_moonbeam() => return &moonbeam_service::moonbeam_runtime::VERSION,
157+
spec if spec.is_qustream() => return &moonbeam_service::moonbeam_runtime::VERSION,
158158
#[cfg(feature = "moonbase-native")]
159159
_ => return &moonbeam_service::moonbase_runtime::VERSION,
160160
#[cfg(not(feature = "moonbase-native"))]
@@ -165,15 +165,15 @@ impl Cli {
165165

166166
impl SubstrateCli for RelayChainCli {
167167
fn impl_name() -> String {
168-
"Moonbeam Parachain Collator".into()
168+
"QuStream Parachain Collator".into()
169169
}
170170

171171
fn impl_version() -> String {
172172
env!("SUBSTRATE_CLI_IMPL_VERSION").into()
173173
}
174174

175175
fn description() -> String {
176-
"Moonbeam Parachain Collator\n\nThe command-line arguments provided first will be \
176+
"QuStream Parachain Collator\n\nThe command-line arguments provided first will be \
177177
passed to the parachain node, while the arguments provided after -- will be passed \
178178
to the relaychain node.\n\n\
179179
parachain-collator [parachain-args] -- [relaychain-args]"
@@ -235,7 +235,7 @@ pub fn run() -> Result<()> {
235235
let runner = cli.create_runner(&params.base)?;
236236
runner.sync_run(|config| {
237237
if params.mnemonic.is_some() || params.accounts.is_some() {
238-
if config.chain_spec.is_moonbeam() {
238+
if config.chain_spec.is_qustream() {
239239
params.base.run(
240240
Box::new(chain_spec::moonbeam::development_chain_spec(
241241
params.mnemonic.clone(),
@@ -382,7 +382,7 @@ pub fn run() -> Result<()> {
382382
))
383383
}),
384384
#[cfg(feature = "moonbeam-native")]
385-
spec if spec.is_moonbeam() => runner.async_run(|mut config| {
385+
spec if spec.is_qustream() => runner.async_run(|mut config| {
386386
let params = moonbeam_service::new_partial::<
387387
moonbeam_service::moonbeam_runtime::RuntimeApi,
388388
moonbeam_service::MoonbeamCustomizations,
@@ -446,7 +446,7 @@ pub fn run() -> Result<()> {
446446
output_buf
447447
}
448448
#[cfg(feature = "moonbeam-native")]
449-
chain_spec if chain_spec.is_moonbeam() => {
449+
chain_spec if chain_spec.is_qustream() => {
450450
let block: moonbeam_service::moonbeam_runtime::Block =
451451
generate_genesis_block(&*chain_spec, state_version)?;
452452
let raw_header = block.header().encode();
@@ -521,7 +521,7 @@ pub fn run() -> Result<()> {
521521
})
522522
}
523523
#[cfg(feature = "moonbeam-native")]
524-
spec if spec.is_moonbeam() => {
524+
spec if spec.is_qustream() => {
525525
return runner.sync_run(|config| {
526526
cmd.run_with_spec::<HashingFor<moonbeam_runtime::Block>, HostFunctions>(
527527
Some(config.chain_spec),
@@ -566,7 +566,7 @@ pub fn run() -> Result<()> {
566566
})
567567
}
568568
#[cfg(feature = "moonbeam-native")]
569-
spec if spec.is_moonbeam() => {
569+
spec if spec.is_qustream() => {
570570
return runner.sync_run(|mut config| {
571571
let params = moonbeam_service::new_partial::<
572572
moonbeam_service::moonbeam_runtime::RuntimeApi,
@@ -631,7 +631,7 @@ pub fn run() -> Result<()> {
631631
})
632632
}
633633
#[cfg(feature = "moonbeam-native")]
634-
spec if spec.is_moonbeam() => {
634+
spec if spec.is_qustream() => {
635635
return runner.sync_run(|mut config| {
636636
let params = moonbeam_service::new_partial::<
637637
moonbeam_service::moonbeam_runtime::RuntimeApi,
@@ -713,7 +713,7 @@ pub fn run() -> Result<()> {
713713
Ok((cmd.run(backend, config.chain_spec), task_manager))
714714
}
715715
#[cfg(feature = "moonbeam-native")]
716-
spec if spec.is_moonbeam() => {
716+
spec if spec.is_qustream() => {
717717
let PartialComponents {
718718
task_manager,
719719
backend,
@@ -810,7 +810,7 @@ pub fn run() -> Result<()> {
810810
.await
811811
.map_err(Into::into),
812812
#[cfg(feature = "moonbeam-native")]
813-
spec if spec.is_moonbeam() => moonbeam_service::new_dev::<
813+
spec if spec.is_qustream() => moonbeam_service::new_dev::<
814814
moonbeam_service::moonbeam_runtime::RuntimeApi,
815815
moonbeam_service::MoonbeamCustomizations,
816816
sc_network::NetworkWorker<_, _>,
@@ -937,7 +937,7 @@ pub fn run() -> Result<()> {
937937
.map(|r| r.0)
938938
.map_err(Into::into),
939939
#[cfg(feature = "moonbeam-native")]
940-
spec if spec.is_moonbeam() => moonbeam_service::start_node::<
940+
spec if spec.is_qustream() => moonbeam_service::start_node::<
941941
moonbeam_service::moonbeam_runtime::RuntimeApi,
942942
moonbeam_service::MoonbeamCustomizations,
943943
>(

0 commit comments

Comments
 (0)