Compare commits
115 Commits
youarespar
...
pallet-cla
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3234341fed | ||
|
|
b3f85f426c | ||
|
|
ddec108ced | ||
|
|
cd8ad50ac3 | ||
|
|
e09ce03836 | ||
|
|
9f6f4953f7 | ||
|
|
40aba0e3af | ||
|
|
596d9a6ca7 | ||
|
|
39279697f2 | ||
|
|
d3a18e298a | ||
|
|
aede9e6e2e | ||
|
|
9ce57763cb | ||
|
|
eab90d4173 | ||
|
|
bdc094663d | ||
|
|
a22b6f92d2 | ||
|
|
b51c0dffc4 | ||
|
|
eae752a7bf | ||
|
|
346d629f95 | ||
|
|
8a0cbb94b4 | ||
|
|
a2afa3fbbc | ||
|
|
885c519519 | ||
|
|
0d796420f2 | ||
|
|
2298454519 | ||
|
|
fcc2e170f8 | ||
|
|
1fccc49139 | ||
|
|
560ca369cd | ||
|
|
2b53777b41 | ||
|
|
bfb023ad4c | ||
|
|
905ad14b73 | ||
|
|
11c435893d | ||
|
|
054bb23910 | ||
|
|
320ef53b50 | ||
|
|
1b95024dca | ||
|
|
b54c2aee58 | ||
|
|
a04f19558c | ||
|
|
4d7330fd4d | ||
|
|
53d4d9e142 | ||
|
|
f1eca789a4 | ||
|
|
f4c8144c71 | ||
|
|
12e6f98dec | ||
|
|
4c49cf6ad2 | ||
|
|
5738d30fbb | ||
|
|
a9e949d95f | ||
|
|
3fad815039 | ||
|
|
a7cf93b730 | ||
|
|
6aae4ed622 | ||
|
|
e1287e7bab | ||
|
|
941da651a8 | ||
|
|
cd2d52df1c | ||
|
|
8e88ab874f | ||
|
|
925b7d7beb | ||
|
|
edc83e9d20 | ||
|
|
e792c8c113 | ||
|
|
71701ae427 | ||
|
|
a359361c2c | ||
|
|
8d9682d71f | ||
|
|
caada5574d | ||
|
|
c0470b5c2b | ||
|
|
31ca91ff67 | ||
|
|
50214dfb11 | ||
|
|
9d9fd22e1f | ||
|
|
57dad44667 | ||
|
|
c1ba311bbf | ||
|
|
b847ec7f78 | ||
|
|
6f2e4088c1 | ||
|
|
d12ecf15ec | ||
|
|
7591be9d0b | ||
|
|
3e697bf4db | ||
|
|
b88a1fe880 | ||
|
|
75399be704 | ||
|
|
88483fb0f1 | ||
|
|
3be0d87dbc | ||
|
|
eca2f7f26d | ||
|
|
83dc66520e | ||
|
|
b7587a4d4f | ||
|
|
7e37002377 | ||
|
|
4beccec324 | ||
|
|
85a419a90a | ||
|
|
268757a80a | ||
|
|
d1c47db513 | ||
|
|
ade1839d9c | ||
|
|
ae96c4a78f | ||
|
|
b21b128ac7 | ||
|
|
eed94ef8b2 | ||
|
|
57b5687ed5 | ||
|
|
3051a399f2 | ||
|
|
b7b168758d | ||
|
|
d49f73ecf4 | ||
|
|
4dc51af2fd | ||
|
|
7981d2fbab | ||
|
|
198671f68c | ||
|
|
701fcb2aad | ||
|
|
25e747caf7 | ||
|
|
eaa83536b8 | ||
|
|
4aa009f4db | ||
|
|
3e455f23ef | ||
|
|
f28f905777 | ||
|
|
4141fb834e | ||
|
|
27169e8eb6 | ||
|
|
63b17a19a0 | ||
|
|
37bf0b56b4 | ||
|
|
3afca3794f | ||
|
|
88f47b61e5 | ||
|
|
36ee6627f6 | ||
|
|
18c6094e3f | ||
|
|
e182e86590 | ||
|
|
98e65f891e | ||
|
|
8ea9bc57ee | ||
|
|
407bf934a1 | ||
|
|
738482fd80 | ||
|
|
7f1cead55e | ||
|
|
aeebed6fc8 | ||
|
|
74ff7e9f5b | ||
|
|
f9243bc628 | ||
|
|
f529f224dd |
21
Cargo.lock
generated
@@ -1186,7 +1186,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "casper-runtime"
|
name = "casper-runtime"
|
||||||
version = "3.5.18"
|
version = "3.5.20"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"casper-runtime-constants",
|
"casper-runtime-constants",
|
||||||
"frame-benchmarking",
|
"frame-benchmarking",
|
||||||
@@ -1203,7 +1203,6 @@ dependencies = [
|
|||||||
"ghost-networks",
|
"ghost-networks",
|
||||||
"ghost-runtime-common",
|
"ghost-runtime-common",
|
||||||
"ghost-slow-clap",
|
"ghost-slow-clap",
|
||||||
"hex-literal",
|
|
||||||
"log",
|
"log",
|
||||||
"pallet-alliance",
|
"pallet-alliance",
|
||||||
"pallet-authority-discovery",
|
"pallet-authority-discovery",
|
||||||
@@ -3529,7 +3528,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ghost-cli"
|
name = "ghost-cli"
|
||||||
version = "0.7.179"
|
version = "0.7.197"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"clap 4.5.4",
|
"clap 4.5.4",
|
||||||
@@ -3585,7 +3584,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ghost-machine-primitives"
|
name = "ghost-machine-primitives"
|
||||||
version = "0.7.179"
|
version = "0.7.197"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"sc-sysinfo",
|
"sc-sysinfo",
|
||||||
@@ -3594,7 +3593,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ghost-metrics"
|
name = "ghost-metrics"
|
||||||
version = "0.7.179"
|
version = "0.7.197"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"assert_cmd",
|
"assert_cmd",
|
||||||
"bs58 0.5.1",
|
"bs58 0.5.1",
|
||||||
@@ -3649,7 +3648,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ghost-networks"
|
name = "ghost-networks"
|
||||||
version = "0.7.179"
|
version = "0.1.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"frame-benchmarking",
|
"frame-benchmarking",
|
||||||
"frame-support",
|
"frame-support",
|
||||||
@@ -3657,6 +3656,8 @@ dependencies = [
|
|||||||
"ghost-core-primitives",
|
"ghost-core-primitives",
|
||||||
"ghost-traits",
|
"ghost-traits",
|
||||||
"pallet-balances",
|
"pallet-balances",
|
||||||
|
"pallet-staking",
|
||||||
|
"pallet-staking-reward-curve",
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
"scale-info",
|
"scale-info",
|
||||||
"sp-io 30.0.0",
|
"sp-io 30.0.0",
|
||||||
@@ -3666,7 +3667,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ghost-node"
|
name = "ghost-node"
|
||||||
version = "0.7.179"
|
version = "0.7.197"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"assert_cmd",
|
"assert_cmd",
|
||||||
"color-eyre",
|
"color-eyre",
|
||||||
@@ -3697,7 +3698,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ghost-rpc"
|
name = "ghost-rpc"
|
||||||
version = "0.7.179"
|
version = "0.7.197"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ghost-core-primitives",
|
"ghost-core-primitives",
|
||||||
"jsonrpsee",
|
"jsonrpsee",
|
||||||
@@ -3749,7 +3750,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ghost-service"
|
name = "ghost-service"
|
||||||
version = "0.7.179"
|
version = "0.7.197"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"assert_matches",
|
"assert_matches",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
@@ -3833,7 +3834,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ghost-slow-clap"
|
name = "ghost-slow-clap"
|
||||||
version = "0.3.14"
|
version = "0.3.15"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"frame-benchmarking",
|
"frame-benchmarking",
|
||||||
"frame-support",
|
"frame-support",
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ homepage.workspace = true
|
|||||||
[workspace.package]
|
[workspace.package]
|
||||||
license = "GPL-3.0-only"
|
license = "GPL-3.0-only"
|
||||||
authors = ["571nky", "57r37ch", "f4750"]
|
authors = ["571nky", "57r37ch", "f4750"]
|
||||||
version = "0.7.179"
|
version = "0.7.197"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
homepage = "https://ghostchain.io"
|
homepage = "https://ghostchain.io"
|
||||||
repository = "https://git.ghostchain.io/ghostchain/ghost-node"
|
repository = "https://git.ghostchain.io/ghostchain/ghost-node"
|
||||||
|
|||||||
0
LICENSE.md
Executable file → Normal file
572
README.md
Executable file → Normal file
@@ -1 +1,571 @@
|
|||||||
TODO
|
# Notes
|
||||||
|
|
||||||
|
Arrows will mark the places where your input is needed
|
||||||
|
|
||||||
|
# Update system
|
||||||
|
|
||||||
|
Update Your System: Before installing any new software,
|
||||||
|
it's a good practice to update your system's package list and
|
||||||
|
upgrade the existing packages to their latest versions.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo apt update
|
||||||
|
sudo apt upgrade
|
||||||
|
```
|
||||||
|
|
||||||
|
# Firewall
|
||||||
|
|
||||||
|
Install Ubuntu firewall
|
||||||
|
```bash
|
||||||
|
sudo apt install ufw
|
||||||
|
```
|
||||||
|
|
||||||
|
If you want to connect to your node-machine, allow connection to the SSH port
|
||||||
|
```bash
|
||||||
|
sudo ufw allow ssh
|
||||||
|
```
|
||||||
|

|
||||||
|
|
||||||
|
Enable firewall, confirm the operation
|
||||||
|
```bash
|
||||||
|
sudo ufw enable
|
||||||
|
```
|
||||||
|

|
||||||
|
|
||||||
|
Check firewall status. You should see `Status: active`
|
||||||
|
```bash
|
||||||
|
sudo ufw numbered
|
||||||
|
```
|
||||||
|

|
||||||
|
|
||||||
|
# SSH
|
||||||
|
## Install SSH
|
||||||
|
|
||||||
|
Once you have installed the proper Operating System on you machine
|
||||||
|
we recommend that you enable SSH. Most people have a Daily Driver machine.
|
||||||
|
GHOST requires a separate machine. Adding an extra machine to your life could be cumbersome.
|
||||||
|
Chances are you had to use an external monitor to install Ubuntu on GHOST Node,
|
||||||
|
the same screen regularly used by the Daily Driver machine.
|
||||||
|
SSH enables you to manage your GHOST Nodes remotely from the comfort of your Daily Driver.
|
||||||
|
|
||||||
|
Install OpenSSH Server: With your system updated, the next step is to install
|
||||||
|
the OpenSSH server package. This package contains the necessary software to run
|
||||||
|
an SSH server.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo apt install openssh-server
|
||||||
|
```
|
||||||
|
|
||||||
|
Start SSH Service using _systemctl_.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo systemctl start ssh
|
||||||
|
```
|
||||||
|
|
||||||
|
Enable SSH Service to Start on Boot: To ensure that the SSH service automatically
|
||||||
|
starts after a reboot, you need to enable it using _systemctl_.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo systemctl enable ssh
|
||||||
|
```
|
||||||
|
|
||||||
|
To check the status of the SSH service, run the following command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo systemctl status ssh
|
||||||
|
```
|
||||||
|
|
||||||
|
You should be seeing something like this:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Connect by SSH
|
||||||
|
|
||||||
|
With SSH enabled and the firewall configured, you can now connect
|
||||||
|
to your node machine from another computer using SSH.
|
||||||
|
You have to know your username and your local network ip
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ssh [username]@[your_server_ip_OR_hostname]
|
||||||
|
```
|
||||||
|
|
||||||
|
# Install GHOST Application
|
||||||
|
## Allow Ports
|
||||||
|
Allow `port 30333` on GHOST Node:
|
||||||
|
```bash
|
||||||
|
sudo ufw allow 30333
|
||||||
|
```
|
||||||
|

|
||||||
|
|
||||||
|
To ensure that the ports are allowed, run the following command:
|
||||||
|
```bash
|
||||||
|
sudo ufw numbered
|
||||||
|
```
|
||||||
|

|
||||||
|
|
||||||
|
## Install Substrate Libraries
|
||||||
|
Click [here](https://docs.substrate.io/install/linux/) for a detailed Rust guide if you want to dive deep into the documentation. Otherwise let's proceed.
|
||||||
|
|
||||||
|
### Install Dependencies
|
||||||
|
Check the documentation for your operating system for information about
|
||||||
|
the packages that are installed and how to download and install
|
||||||
|
any additional packages you might need. For example,
|
||||||
|
if you use Debian/Ubuntu, you can use the Advanced Packaging Tool (apt)
|
||||||
|
to install packages:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo apt install -y build-essential clang curl git make libssl-dev protobuf-compiler llvm libudev-dev
|
||||||
|
```
|
||||||
|
|
||||||
|
### Rust Install
|
||||||
|
|
||||||
|
Download the rustup installation program and use it to install Rust by running the following command:
|
||||||
|
```bash
|
||||||
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||||
|
```
|
||||||
|
|
||||||
|
Press Enter for using default options:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Update your current shell to include Cargo by running the following command:
|
||||||
|
```bash
|
||||||
|
source $HOME/.cargo/env
|
||||||
|
```
|
||||||
|
|
||||||
|
Verify your installation by running the following command:
|
||||||
|
```bash
|
||||||
|
rustc --version
|
||||||
|
```
|
||||||
|
|
||||||
|
You should see something like this:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Configure the Rust toolchain to default to the latest stable version by running the following commands:
|
||||||
|
```bash
|
||||||
|
rustup default stable
|
||||||
|
```
|
||||||
|
```bash
|
||||||
|
rustup update
|
||||||
|
```
|
||||||
|
|
||||||
|
Add the nightly release and the nightly WebAssembly (wasm) targets
|
||||||
|
to your development environment by running the following commands:
|
||||||
|
```bash
|
||||||
|
rustup update nightly
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
rustup target add wasm32-unknown-unknown --toolchain nightly
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
rustup target add wasm32-unknown-unknown --toolchain stable-x86_64-unknown-linux-gnu
|
||||||
|
```
|
||||||
|
|
||||||
|
If you are trying to install WebAssembly (wasm) on an ARM-based processor like the ones in Raspberry Pi try this instead:
|
||||||
|
```bash
|
||||||
|
rustup target add wasm32-unknown-unknown --toolchain stable-aarch64-unknown-linux-gnu
|
||||||
|
```
|
||||||
|
|
||||||
|
**_IF error try_**
|
||||||
|
```bash
|
||||||
|
rustup target add wasm32-unknown-unknown --toolchain default
|
||||||
|
```
|
||||||
|
|
||||||
|
Verify the configuration of your development environment by running
|
||||||
|
the following command:
|
||||||
|
```bash
|
||||||
|
rustup show
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
rustup +nightly show
|
||||||
|
```
|
||||||
|
|
||||||
|
You should see something like this:
|
||||||
|
|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
|
Now run:
|
||||||
|
```bash
|
||||||
|
rustup component add rust-src --toolchain stable
|
||||||
|
```
|
||||||
|
|
||||||
|
**_IF error try_**
|
||||||
|
```bash
|
||||||
|
rustup component add rust-src --toolchain default
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Install GHOST
|
||||||
|
|
||||||
|
Check if Git is already installed:
|
||||||
|
```bash
|
||||||
|
git --version
|
||||||
|
```
|
||||||
|

|
||||||
|
|
||||||
|
Make a GHOST Directory and go to it:
|
||||||
|
```bash
|
||||||
|
mkdir ghost && cd ghost
|
||||||
|
```
|
||||||
|
|
||||||
|
Clone GHOST Node Git:
|
||||||
|
```bash
|
||||||
|
git clone https://git.ghostchain.io/ghostchain/ghost-node.git
|
||||||
|
```
|
||||||
|
|
||||||
|
Go to ghost-node directory:
|
||||||
|
```bash
|
||||||
|
cd ghost-node
|
||||||
|
```
|
||||||
|
|
||||||
|
Compile the node template by running the following command:
|
||||||
|
```bash
|
||||||
|
cargo build --release
|
||||||
|
```
|
||||||
|
|
||||||
|
The build can take up to 20 minutes depending on the specifications of your machine.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Boot Node Qualification
|
||||||
|
|
||||||
|
## Boot Node Qualification Test
|
||||||
|
|
||||||
|
Becoming a Boot Node on GHOST Chain is an absolute MUST if we want the network
|
||||||
|
to be sufficiently decentralized. However, due to certain ISP limitations
|
||||||
|
some countries make it being a Boot Node easier than others.
|
||||||
|
Hence, the GHOST Dev team came up with a Boot Node Qualification Test.
|
||||||
|
|
||||||
|
First we should install TRACEROUTE:
|
||||||
|
```bash
|
||||||
|
sudo apt install traceroute
|
||||||
|
```
|
||||||
|
|
||||||
|
Then we must determine the public IP for your GHOST Node Machine.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -4 icanhazip.com
|
||||||
|
```
|
||||||
|

|
||||||
|
|
||||||
|
Then type the following command replacing `<YOUR_IP_FROM_PREVIOUS_STEP>` with an actual IP address from previous step:
|
||||||
|
```bash
|
||||||
|
traceroute <YOUR_IP_FROM_PREVIOUS_STEP>
|
||||||
|
```
|
||||||
|
|
||||||
|
If your GHOST Node is **not behind a NAT** your terminal window should look something like this:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
If your GHOST Node is **behind NAT** your terminal window should look something like this:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
If your GHOST Node is NOT behind the NAT then your node can be a Boot Node.
|
||||||
|
If your GHOST Node is behind the NAT then your node CANNOT be a Boot Node
|
||||||
|
and you will have to use some kind of proxy to rectify the situation.
|
||||||
|
|
||||||
|
Afterwards, post the screenshot of your terminal window in the Whales group.
|
||||||
|
Feel free to blur out your IP.
|
||||||
|
|
||||||
|
## Setting Proper Firewall Rules
|
||||||
|
|
||||||
|
You must enable `port 30333` on your router
|
||||||
|
|
||||||
|
Based on prior instructions you may have configured your firewall in way that is
|
||||||
|
no longer needed. For the purpose of GHOST Chain you should only
|
||||||
|
open `port 30333` and close other ports.
|
||||||
|
|
||||||
|
### Checking Firewall
|
||||||
|
|
||||||
|
Check the ports that are opened on your firewall:
|
||||||
|
```bash
|
||||||
|
sudo ufw numbered
|
||||||
|
```
|
||||||
|

|
||||||
|
|
||||||
|
If `port 9945` is opened then close it:
|
||||||
|
```bash
|
||||||
|
sudo ufw deny 9945
|
||||||
|
```
|
||||||
|
|
||||||
|
### Configuring Router
|
||||||
|
|
||||||
|
Enable port forwarding for port 30333 on your router. Be mindful that different networks and routers have different ways of setting this up. It is best to search for portforwarding instruction for the specific router model.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### Checking Ports
|
||||||
|
Simulate a broadcasting node by running a dummy GHOST Node launch command:
|
||||||
|
```bash
|
||||||
|
./target/release/ghost --port=30333 --rpc-port=9945 --chain=dev --node-key=0000000000000000000000000000000000000000000000000000000000000001 --base-path=/tmp/alice --alice --validator --unsafe-rpc-external --no-telemetry --state-pruning=archive
|
||||||
|
```
|
||||||
|
|
||||||
|
To check ports go to [Port Checker Website](https://dnschecker.org/port-scanner.php) and check following ports:
|
||||||
|
```
|
||||||
|
30333, 9945
|
||||||
|
```
|
||||||
|
|
||||||
|
Only `port 30333` should be opened.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Press _CTRL+C_ to stop the node.
|
||||||
|
|
||||||
|
# Launching GHOST TestNet 3.1
|
||||||
|
|
||||||
|
Switch to main GIT branch:
|
||||||
|
```bash
|
||||||
|
git switch main
|
||||||
|
```
|
||||||
|
|
||||||
|
Make sure `ghost-node` is up to date:
|
||||||
|
```bash
|
||||||
|
git pull origin main
|
||||||
|
```
|
||||||
|
|
||||||
|
## Generating keys
|
||||||
|
Create ghost configuration directory:
|
||||||
|
```bash
|
||||||
|
sudo mkdir /etc/ghost
|
||||||
|
```
|
||||||
|
|
||||||
|
Give the user permission to the directory:
|
||||||
|
```bash
|
||||||
|
sudo chown $(whoami) /etc/ghost
|
||||||
|
```
|
||||||
|
|
||||||
|
To generate the node key use the following command:
|
||||||
|
```bash
|
||||||
|
./target/release/ghost key generate-node-key --bin --file=/etc/ghost/node-key
|
||||||
|
```
|
||||||
|
|
||||||
|
Generate Wallet Key file with the following command:
|
||||||
|
```bash
|
||||||
|
./target/release/ghost key generate | grep "Secret seed" | awk '{$1=$2=""; sub(/^[ \t]+/, ""); print}' > /etc/ghost/wallet-key
|
||||||
|
```
|
||||||
|
|
||||||
|
Display the wallet-key on the screen by using cat command:
|
||||||
|
```bash
|
||||||
|
./target/release/ghost key inspect $(cat /etc/ghost/wallet-key)
|
||||||
|
```
|
||||||
|

|
||||||
|
|
||||||
|
Feel free to back the file on a separate storage device.
|
||||||
|
|
||||||
|
Generate Stash Key file with the following command:
|
||||||
|
```bash
|
||||||
|
./target/release/ghost key generate | grep "Secret seed" | awk '{$1=$2=""; sub(/^[ \t]+/, ""); print}' > /etc/ghost/stash-key
|
||||||
|
```
|
||||||
|
|
||||||
|
Display the stash-key on the screen by using cat command:
|
||||||
|
```bash
|
||||||
|
./target/release/ghost key inspect $(cat /etc/ghost/stash-key)
|
||||||
|
```
|
||||||
|

|
||||||
|
|
||||||
|
Generate Session Key file with the following command:
|
||||||
|
```bash
|
||||||
|
./target/release/ghost key generate | grep "Secret seed" | awk '{$1=$2=""; sub(/^[ \t]+/, ""); print}' > /etc/ghost/session-key
|
||||||
|
```
|
||||||
|
You have generates 4 types of Session Keys:
|
||||||
|
|
||||||
|
1. Session Key – AUDI
|
||||||
|
2. Session Key – BABE
|
||||||
|
3. Session Key – SLOW
|
||||||
|
4. Session Key – GRAN
|
||||||
|
|
||||||
|
Now let's display them!
|
||||||
|
|
||||||
|
Display the session-key//audi on the screen by using cat command:
|
||||||
|
```bash
|
||||||
|
./target/release/ghost key inspect "$(cat /etc/ghost/session-key)//audi"
|
||||||
|
```
|
||||||
|

|
||||||
|
|
||||||
|
Display the session-key//babe on the screen by using cat command:
|
||||||
|
```bash
|
||||||
|
./target/release/ghost key inspect "$(cat /etc/ghost/session-key)//babe"
|
||||||
|
```
|
||||||
|

|
||||||
|
|
||||||
|
Display the session-key//slow on the screen by using cat command:
|
||||||
|
```bash
|
||||||
|
./target/release/ghost key inspect "$(cat /etc/ghost/session-key)//slow"
|
||||||
|
```
|
||||||
|

|
||||||
|
|
||||||
|
Display the session-key//gran on the screen by using cat command:
|
||||||
|
```bash
|
||||||
|
./target/release/ghost key inspect "$(cat /etc/ghost/session-key)//gran" --scheme=ed25519
|
||||||
|
```
|
||||||
|

|
||||||
|
|
||||||
|
## Build and start the ghost-node
|
||||||
|
|
||||||
|
Recompile `ghost-node` using `starter.sh` and `--release` flag.
|
||||||
|
Make `ghost-node` service being able to be started by default user
|
||||||
|
using `--make-global`:
|
||||||
|
```bash
|
||||||
|
./scripts/starter.sh --release --make-global
|
||||||
|
```
|
||||||
|
|
||||||
|
We need to recompile so type y and press Enter to proceed:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Recompiling will take some time!
|
||||||
|
|
||||||
|
The script needs higher permissions to write the ghost-node startup file, so it may ask for your user's password
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Check the hash of the build:
|
||||||
|
```bash
|
||||||
|
sha256sum /etc/ghost/casper.json
|
||||||
|
```
|
||||||
|
|
||||||
|
You should see:
|
||||||
|
```
|
||||||
|
ad653233c978bfd00c5e4525b17628632bc4319c5f5f4b4dcc2f050ef3c3d145
|
||||||
|
```
|
||||||
|
|
||||||
|
Create running `ghost-node` service that starts on system boot using `--unit-file` flag.
|
||||||
|
And we must set up the `ghost-node` launch command by setting arguments using
|
||||||
|
`--set-arguments` flag:
|
||||||
|
```bash
|
||||||
|
./scripts/starter.sh --unit-file --set-arguments
|
||||||
|
```
|
||||||
|
|
||||||
|
Only change the defaults if you are advanced otherwise press _Enter_ for
|
||||||
|
the following prompts.
|
||||||
|
|
||||||
|
If this is your first node simply press _Enter_ to proceed with the default.
|
||||||
|
If this is your second node you should type a different port here,
|
||||||
|
for example `30334`, and then you should open this port on your firewall
|
||||||
|
and create a dedicated port forwarding rule on your router as specified
|
||||||
|
in the Testing Connectivity Part:
|
||||||
|
```
|
||||||
|
specify p2p protocol TCP port (default: 30333): 30334
|
||||||
|
```
|
||||||
|
|
||||||
|
To choose default options press Enter here:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Currently, you have to qualify to become a validator node through [GHOST Whales](https://ghostchain.io/whales-apply).
|
||||||
|
If you were NOT included in the [ghosties file](https://git.ghostchain.io/ghostchain/ghost-node/src/branch/main/service/ghosties) then you cannot be a validator node,
|
||||||
|
and you can only be a full node so for `disable validator mode? [y/N]` type `y`.
|
||||||
|
If you were included in the ghosties file you can press Enter:
|
||||||
|
```
|
||||||
|
disable validator mode? [y/N]: y
|
||||||
|
```
|
||||||
|

|
||||||
|
|
||||||
|
Press _Enter_ for reject enabling Prometheus:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
For the following prompt:
|
||||||
|
```
|
||||||
|
list of bootnodes if any:
|
||||||
|
```
|
||||||
|
|
||||||
|
Paste one of available **Boot Node** addresses.
|
||||||
|
|
||||||
|
Official **Boot Node** addresses:
|
||||||
|
```
|
||||||
|
/dns/bootnode69.chain.ghostchain.io/tcp/30334/p2p/12D3KooWF9SWxz9dmy6vfndQhoxqCa7PESaoFWEiF8Jkqh4xKDRf
|
||||||
|
```
|
||||||
|
```
|
||||||
|
/dns/bootnode70.chain.ghostchain.io/tcp/30333/p2p/12D3KooWP3h5dSdqcpvsCr7fp1jyfqDj291QDZ68a4gY6VQ8T1nW
|
||||||
|
```
|
||||||
|
|
||||||
|
A full list of available **Boot Nodes** can be found on [the guide page](https://blog.ghostchain.io/launching-ghost-testnet-3-1/#Boot_Node).
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Press _Enter_:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Changing `unit-file` name is optional, otherwise press _Enter_:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Type `y` and press _Enter_ for create dedicated user for running `ghost-node`:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
**DO NOT start and DO NOT enable** `ghost-node.service` (press _Enter_):
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Now you can check whether or not the keys on your GHOST Node match those
|
||||||
|
in the [ghosties file](https://git.ghostchain.io/ghostchain/ghost-node/src/branch/main/service/ghosties) on GHOST Git.
|
||||||
|
If you are running a **Validator Node** and if you have followed
|
||||||
|
the Generating Keys Part you will see all `[+]`.
|
||||||
|
If you are a running a **Full Node** you will see errors:
|
||||||
|
|
||||||
|
(Press _Enter_ for prompts)
|
||||||
|
```bash
|
||||||
|
./scripts/starter.sh --check-keys
|
||||||
|
```
|
||||||
|
|
||||||
|
Full Node:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Validator Node:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Start `ghost-node`:
|
||||||
|
```bash
|
||||||
|
sudo systemctl start ghost-node
|
||||||
|
```
|
||||||
|
|
||||||
|
Wait 60 seconds!
|
||||||
|
|
||||||
|
Check node is started:
|
||||||
|
```bash
|
||||||
|
sudo systemctl status ghost-node
|
||||||
|
```
|
||||||
|

|
||||||
|
|
||||||
|
For exit press _CTRL+C_
|
||||||
|
|
||||||
|
In order to insert keys run the following flags `--check-keys` `--insert-keys`:
|
||||||
|
```bash
|
||||||
|
./scripts/starter.sh --check-keys --insert-keys
|
||||||
|
```
|
||||||
|
|
||||||
|
Restart `ghost-node`:
|
||||||
|
```bash
|
||||||
|
sudo systemctl restart ghost-node
|
||||||
|
```
|
||||||
|
|
||||||
|
Enable `ghost-node`:
|
||||||
|
```bash
|
||||||
|
sudo systemctl enable ghost-node
|
||||||
|
```
|
||||||
|

|
||||||
|
|
||||||
|
To see the logs produced by your `ghost-node`:
|
||||||
|
```bash
|
||||||
|
journalctl -f -u ghost-node
|
||||||
|
```
|
||||||
|
|
||||||
|
To exit press _CTRL+C_.
|
||||||
|
|
||||||
|
Congratulations! You have an operational GHOST Node.
|
||||||
|
|||||||
2
cli/Cargo.toml
Executable file → Normal file
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "ghost-cli"
|
name = "ghost-cli"
|
||||||
description = "Implementation of a Ghost Client Node in Rust"
|
description = "Implementation of the Ghost Client Node in Rust"
|
||||||
version.workspace = true
|
version.workspace = true
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
authors.workspace = true
|
authors.workspace = true
|
||||||
|
|||||||
0
cli/build.rs
Executable file → Normal file
0
cli/src/cli.rs
Executable file → Normal file
0
cli/src/command.rs
Executable file → Normal file
0
cli/src/error.rs
Executable file → Normal file
0
cli/src/lib.rs
Executable file → Normal file
0
core-primitives/Cargo.toml
Executable file → Normal file
0
core-primitives/src/lib.rs
Executable file → Normal file
0
file_header.txt
Executable file → Normal file
BIN
images/img.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
images/img_1.png
Normal file
|
After Width: | Height: | Size: 8.6 KiB |
BIN
images/img_10.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
images/img_11.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
images/img_12.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
images/img_13.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
images/img_14.png
Normal file
|
After Width: | Height: | Size: 8.7 KiB |
BIN
images/img_15.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
images/img_16.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
images/img_17.png
Normal file
|
After Width: | Height: | Size: 95 KiB |
BIN
images/img_18.png
Normal file
|
After Width: | Height: | Size: 66 KiB |
BIN
images/img_19.png
Normal file
|
After Width: | Height: | Size: 49 KiB |
BIN
images/img_2.png
Normal file
|
After Width: | Height: | Size: 8.5 KiB |
BIN
images/img_20.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
images/img_21.png
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
images/img_22.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
images/img_23.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
images/img_24.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
images/img_25.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
images/img_26.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
images/img_27.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
images/img_28.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
images/img_3.png
Normal file
|
After Width: | Height: | Size: 43 KiB |
BIN
images/img_30.png
Normal file
|
After Width: | Height: | Size: 31 KiB |
BIN
images/img_31.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
images/img_32.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
images/img_33.png
Normal file
|
After Width: | Height: | Size: 6.8 KiB |
BIN
images/img_34.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
images/img_35.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
images/img_36.png
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
images/img_37.png
Normal file
|
After Width: | Height: | Size: 6.2 KiB |
BIN
images/img_38.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
images/img_39.png
Normal file
|
After Width: | Height: | Size: 55 KiB |
BIN
images/img_40.png
Normal file
|
After Width: | Height: | Size: 98 KiB |
BIN
images/img_41.png
Normal file
|
After Width: | Height: | Size: 8.0 KiB |
BIN
images/img_5.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
BIN
images/img_6.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
images/img_7.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
images/img_8.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
images/img_9.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "ghost-claims"
|
name = "ghost-claims"
|
||||||
version = "0.2.2"
|
version = "0.2.3"
|
||||||
description = "Ghost balance and rank claims based on EVM actions"
|
description = "Ghost balance and rank claims based on EVM actions"
|
||||||
license.workspace = true
|
license.workspace = true
|
||||||
authors.workspace = true
|
authors.workspace = true
|
||||||
@@ -37,17 +37,17 @@ serde_json = { workspace = true, default-features = true }
|
|||||||
[features]
|
[features]
|
||||||
default = ["std"]
|
default = ["std"]
|
||||||
std = [
|
std = [
|
||||||
"frame-benchmarking?/std",
|
"frame-benchmarking?/std",
|
||||||
"serde/std",
|
"serde/std",
|
||||||
"codec/std",
|
"codec/std",
|
||||||
"scale-info/std",
|
"scale-info/std",
|
||||||
"libsecp256k1/std",
|
"libsecp256k1/std",
|
||||||
"frame-support/std",
|
"frame-support/std",
|
||||||
"frame-system/std",
|
"frame-system/std",
|
||||||
"sp-core/std",
|
"sp-core/std",
|
||||||
"sp-runtime/std",
|
"sp-runtime/std",
|
||||||
"sp-io/std",
|
"sp-io/std",
|
||||||
"sp-std/std",
|
"sp-std/std",
|
||||||
"pallet-ranked-collective/std",
|
"pallet-ranked-collective/std",
|
||||||
"pallet-vesting/std",
|
"pallet-vesting/std",
|
||||||
"pallet-balances/std",
|
"pallet-balances/std",
|
||||||
@@ -56,19 +56,19 @@ std = [
|
|||||||
runtime-benchmarks = [
|
runtime-benchmarks = [
|
||||||
"libsecp256k1/hmac",
|
"libsecp256k1/hmac",
|
||||||
"libsecp256k1/static-context",
|
"libsecp256k1/static-context",
|
||||||
"frame-benchmarking/runtime-benchmarks",
|
"frame-benchmarking/runtime-benchmarks",
|
||||||
"frame-support/runtime-benchmarks",
|
"frame-support/runtime-benchmarks",
|
||||||
"frame-system/runtime-benchmarks",
|
"frame-system/runtime-benchmarks",
|
||||||
"pallet-ranked-collective/runtime-benchmarks",
|
"pallet-ranked-collective/runtime-benchmarks",
|
||||||
"pallet-vesting/runtime-benchmarks",
|
"pallet-vesting/runtime-benchmarks",
|
||||||
"pallet-balances/runtime-benchmarks",
|
"pallet-balances/runtime-benchmarks",
|
||||||
"sp-runtime/runtime-benchmarks",
|
"sp-runtime/runtime-benchmarks",
|
||||||
]
|
]
|
||||||
try-runtime = [
|
try-runtime = [
|
||||||
"frame-support/try-runtime",
|
"frame-support/try-runtime",
|
||||||
"frame-system/try-runtime",
|
"frame-system/try-runtime",
|
||||||
"pallet-ranked-collective/try-runtime",
|
"pallet-ranked-collective/try-runtime",
|
||||||
"pallet-vesting/try-runtime",
|
"pallet-vesting/try-runtime",
|
||||||
"pallet-balances/try-runtime",
|
"pallet-balances/try-runtime",
|
||||||
"sp-runtime/try-runtime",
|
"sp-runtime/try-runtime",
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -20,8 +20,9 @@ extern crate alloc;
|
|||||||
#[cfg(not(feature = "std"))]
|
#[cfg(not(feature = "std"))]
|
||||||
use alloc::{format, string::String};
|
use alloc::{format, string::String};
|
||||||
|
|
||||||
pub mod weights;
|
mod weights;
|
||||||
pub use crate::weights::WeightInfo;
|
pub use crate::weights::WeightInfo;
|
||||||
|
|
||||||
mod tests;
|
mod tests;
|
||||||
mod mock;
|
mod mock;
|
||||||
mod benchmarking;
|
mod benchmarking;
|
||||||
|
|||||||
@@ -1,9 +1,104 @@
|
|||||||
use frame_support::weights::Weight;
|
// This file is part of Ghost Network.
|
||||||
|
|
||||||
|
// Ghost Network is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
|
||||||
|
// Ghost Network is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with Ghost Network. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
//! Autogenerated weights for `ghost_claims`
|
||||||
|
//!
|
||||||
|
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
|
||||||
|
//! DATE: 2024-08-02, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||||
|
//! WORST CASE MAP SIZE: `1000000`
|
||||||
|
//! HOSTNAME: `ghostown`, CPU: `Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz`
|
||||||
|
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("casper-dev")`, DB CACHE: 1024
|
||||||
|
|
||||||
|
// Executed Command:
|
||||||
|
// ./target/release/ghost
|
||||||
|
// benchmark
|
||||||
|
// pallet
|
||||||
|
// --chain=casper-dev
|
||||||
|
// --steps=50
|
||||||
|
// --repeat=20
|
||||||
|
// --pallet=ghost_claims
|
||||||
|
// --extrinsic=*
|
||||||
|
// --wasm-execution=compiled
|
||||||
|
// --heap-pages=4096
|
||||||
|
// --header=./file_header.txt
|
||||||
|
// --output=./runtime/casper/src/weights/ghost_claims.rs
|
||||||
|
|
||||||
|
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||||
|
#![allow(unused_parens)]
|
||||||
|
#![allow(unused_imports)]
|
||||||
|
#![allow(missing_docs)]
|
||||||
|
|
||||||
|
use frame_support::{
|
||||||
|
traits::Get,
|
||||||
|
weights::{Weight, constants::RocksDbWeight},
|
||||||
|
};
|
||||||
|
use core::marker::PhantomData;
|
||||||
|
|
||||||
|
/// Weight functions needed for `ghost_claims`.
|
||||||
pub trait WeightInfo {
|
pub trait WeightInfo {
|
||||||
fn claim() -> Weight;
|
fn claim() -> Weight;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Weight for ghost_claims using the Substrate node and recommended hardware.
|
||||||
|
pub struct SubstrateWeight<T>(PhantomData<T>);
|
||||||
|
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||||
|
/// Storage: `System::Account` (r:2 w:2)
|
||||||
|
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `GhostClaims::Total` (r:1 w:1)
|
||||||
|
/// Proof: `GhostClaims::Total` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
/// Storage: `CultCollective::Members` (r:2 w:2)
|
||||||
|
/// Proof: `CultCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `CultCollective::MemberCount` (r:6 w:6)
|
||||||
|
/// Proof: `CultCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `CultCollective::IdToIndex` (r:6 w:12)
|
||||||
|
/// Proof: `CultCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `CultCollective::IndexToId` (r:0 w:6)
|
||||||
|
/// Proof: `CultCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
|
||||||
|
fn claim() -> Weight {
|
||||||
|
// Proof Size summary in bytes:
|
||||||
|
// Measured: `896`
|
||||||
|
// Estimated: `16164`
|
||||||
|
// Minimum execution time: 754_086_000 picoseconds.
|
||||||
|
Weight::from_parts(756_147_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 16164))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(17))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(29))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl WeightInfo for () {
|
impl WeightInfo for () {
|
||||||
fn claim() -> Weight { Weight::zero() }
|
/// Storage: `System::Account` (r:2 w:2)
|
||||||
|
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `GhostClaims::Total` (r:1 w:1)
|
||||||
|
/// Proof: `GhostClaims::Total` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
/// Storage: `CultCollective::Members` (r:2 w:2)
|
||||||
|
/// Proof: `CultCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `CultCollective::MemberCount` (r:6 w:6)
|
||||||
|
/// Proof: `CultCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `CultCollective::IdToIndex` (r:6 w:12)
|
||||||
|
/// Proof: `CultCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `CultCollective::IndexToId` (r:0 w:6)
|
||||||
|
/// Proof: `CultCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
|
||||||
|
fn claim() -> Weight {
|
||||||
|
// Proof Size summary in bytes:
|
||||||
|
// Measured: `896`
|
||||||
|
// Estimated: `16164`
|
||||||
|
// Minimum execution time: 754_086_000 picoseconds.
|
||||||
|
Weight::from_parts(756_147_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 16164))
|
||||||
|
.saturating_add(RocksDbWeight::get().reads(17))
|
||||||
|
.saturating_add(RocksDbWeight::get().writes(29))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
40
pallets/networks/Cargo.toml
Executable file → Normal file
@@ -1,8 +1,8 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "ghost-networks"
|
name = "ghost-networks"
|
||||||
|
version = "0.1.2"
|
||||||
license.workspace = true
|
license.workspace = true
|
||||||
authors.workspace = true
|
authors.workspace = true
|
||||||
version.workspace = true
|
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
homepage.workspace = true
|
homepage.workspace = true
|
||||||
repository.workspace = true
|
repository.workspace = true
|
||||||
@@ -14,36 +14,40 @@ codec = { workspace = true, features = ["max-encoded-len"] }
|
|||||||
frame-benchmarking = { workspace = true, optional = true }
|
frame-benchmarking = { workspace = true, optional = true }
|
||||||
frame-support = { workspace = true }
|
frame-support = { workspace = true }
|
||||||
frame-system = { workspace = true }
|
frame-system = { workspace = true }
|
||||||
|
pallet-staking = { workspace = true }
|
||||||
sp-runtime = { workspace = true }
|
sp-runtime = { workspace = true }
|
||||||
sp-std = { workspace = true }
|
sp-std = { workspace = true }
|
||||||
ghost-traits = { workspace = true }
|
ghost-traits = { workspace = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
primitives = { workspace = true }
|
primitives = { workspace = true }
|
||||||
pallet-balances = { workspace = true }
|
|
||||||
sp-io = { workspace = true }
|
sp-io = { workspace = true }
|
||||||
|
pallet-balances = { workspace = true }
|
||||||
|
pallet-staking-reward-curve = { workspace = true }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["std"]
|
default = ["std"]
|
||||||
std = [
|
std = [
|
||||||
"scale-info/std",
|
"scale-info/std",
|
||||||
"codec/std",
|
"codec/std",
|
||||||
"frame-support/std",
|
"frame-support/std",
|
||||||
"frame-system/std",
|
"frame-system/std",
|
||||||
"frame-benchmarking?/std",
|
"frame-benchmarking?/std",
|
||||||
"sp-runtime/std",
|
"sp-runtime/std",
|
||||||
"sp-std/std",
|
"sp-std/std",
|
||||||
"sp-io/std",
|
"sp-io/std",
|
||||||
"ghost-traits/std",
|
"ghost-traits/std",
|
||||||
"pallet-balances/std",
|
"pallet-staking/std",
|
||||||
|
"pallet-balances/std",
|
||||||
]
|
]
|
||||||
runtime-benchmarks = [
|
runtime-benchmarks = [
|
||||||
"frame-benchmarking/runtime-benchmarks",
|
"frame-benchmarking/runtime-benchmarks",
|
||||||
"frame-support/runtime-benchmarks",
|
"frame-support/runtime-benchmarks",
|
||||||
"frame-system/runtime-benchmarks",
|
"frame-system/runtime-benchmarks",
|
||||||
"sp-runtime/runtime-benchmarks",
|
"sp-runtime/runtime-benchmarks",
|
||||||
|
"pallet-staking/runtime-benchmarks",
|
||||||
]
|
]
|
||||||
try-runtime = [
|
try-runtime = [
|
||||||
"frame-support/try-runtime",
|
"frame-support/try-runtime",
|
||||||
"frame-system/try-runtime",
|
"frame-system/try-runtime",
|
||||||
]
|
]
|
||||||
|
|||||||
0
pallets/networks/src/benchmarking.rs
Executable file → Normal file
147
pallets/networks/src/lib.rs
Executable file → Normal file
@@ -4,15 +4,17 @@
|
|||||||
|
|
||||||
use frame_support::{
|
use frame_support::{
|
||||||
pallet_prelude::*,
|
pallet_prelude::*,
|
||||||
storage::PrefixIterator, traits::EnsureOrigin,
|
storage::PrefixIterator, traits::{tokens::fungible::Inspect, EnsureOrigin},
|
||||||
};
|
};
|
||||||
use frame_system::pallet_prelude::*;
|
use frame_system::pallet_prelude::*;
|
||||||
use scale_info::TypeInfo;
|
use scale_info::TypeInfo;
|
||||||
use sp_runtime::{
|
use sp_runtime::{
|
||||||
traits::{AtLeast32BitUnsigned, Member},
|
traits::{CheckedSub, CheckedAdd, AtLeast32BitUnsigned, Member},
|
||||||
|
curve::PiecewiseLinear,
|
||||||
DispatchResult,
|
DispatchResult,
|
||||||
};
|
};
|
||||||
use sp_std::prelude::*;
|
use sp_std::prelude::*;
|
||||||
|
use sp_std::convert::TryInto;
|
||||||
|
|
||||||
pub use ghost_traits::networks::{
|
pub use ghost_traits::networks::{
|
||||||
NetworkDataBasicHandler, NetworkDataInspectHandler,
|
NetworkDataBasicHandler, NetworkDataInspectHandler,
|
||||||
@@ -31,6 +33,10 @@ mod mock;
|
|||||||
#[cfg(all(feature = "std", test))]
|
#[cfg(all(feature = "std", test))]
|
||||||
mod tests;
|
mod tests;
|
||||||
|
|
||||||
|
pub type BalanceOf<T> = <<T as Config>::Currency as Inspect<
|
||||||
|
<T as frame_system::Config>::AccountId,
|
||||||
|
>>::Balance;
|
||||||
|
|
||||||
#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo)]
|
#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo)]
|
||||||
pub enum NetworkType {
|
pub enum NetworkType {
|
||||||
Evm = 0,
|
Evm = 0,
|
||||||
@@ -55,6 +61,48 @@ pub struct NetworkData {
|
|||||||
pub outgoing_fee: u32,
|
pub outgoing_fee: u32,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Default, Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo)]
|
||||||
|
pub struct BridgeAdjustment<Balance> {
|
||||||
|
bridged_out: Balance,
|
||||||
|
bridged_in: Balance,
|
||||||
|
}
|
||||||
|
|
||||||
|
pub struct BridgedInflationCurve<RewardCurve, T>(core::marker::PhantomData<(RewardCurve, T)>);
|
||||||
|
impl<Balance, RewardCurve, T> pallet_staking::EraPayout<Balance> for BridgedInflationCurve<RewardCurve, T>
|
||||||
|
where
|
||||||
|
Balance: Default + AtLeast32BitUnsigned + Clone + Copy + From<u128>,
|
||||||
|
RewardCurve: Get<&'static PiecewiseLinear<'static>>,
|
||||||
|
T: Config,
|
||||||
|
{
|
||||||
|
fn era_payout(
|
||||||
|
total_staked: Balance,
|
||||||
|
total_issuance: Balance,
|
||||||
|
_era_duration_in_millis: u64,
|
||||||
|
) -> (Balance, Balance) {
|
||||||
|
let piecewise_linear = RewardCurve::get();
|
||||||
|
let bridge_adjustment = BridgedImbalance::<T>::get();
|
||||||
|
let accumulated_commission = AccumulatedCommission::<T>::get();
|
||||||
|
|
||||||
|
let bridged_out: u128 = bridge_adjustment.bridged_out.try_into().unwrap_or_default();
|
||||||
|
let bridged_in: u128 = bridge_adjustment.bridged_in.try_into().unwrap_or_default();
|
||||||
|
let accumulated_commission: u128 = accumulated_commission.try_into().unwrap_or_default();
|
||||||
|
|
||||||
|
let accumulated_balance = Balance::from(accumulated_commission);
|
||||||
|
let adjusted_issuance = match bridged_out > bridged_in {
|
||||||
|
true => total_issuance.saturating_add(Balance::from(bridged_out - bridged_in)),
|
||||||
|
false => total_issuance.saturating_sub(Balance::from(bridged_in - bridged_out)),
|
||||||
|
};
|
||||||
|
|
||||||
|
match piecewise_linear
|
||||||
|
.calculate_for_fraction_times_denominator(total_staked, adjusted_issuance)
|
||||||
|
.checked_mul(&accumulated_balance)
|
||||||
|
.and_then(|product| product.checked_div(&adjusted_issuance)) {
|
||||||
|
Some(payout) => (payout, accumulated_balance.saturating_sub(payout)),
|
||||||
|
None => (Balance::default(), Balance::default()),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[frame_support::pallet]
|
#[frame_support::pallet]
|
||||||
pub mod module {
|
pub mod module {
|
||||||
use super::*;
|
use super::*;
|
||||||
@@ -63,6 +111,9 @@ pub mod module {
|
|||||||
pub trait Config: frame_system::Config {
|
pub trait Config: frame_system::Config {
|
||||||
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
|
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
|
||||||
|
|
||||||
|
/// The type used for the internal balance storage.
|
||||||
|
type Currency: Inspect<Self::AccountId>;
|
||||||
|
|
||||||
/// The type used as a unique network id.
|
/// The type used as a unique network id.
|
||||||
type NetworkId: Parameter
|
type NetworkId: Parameter
|
||||||
+ Member
|
+ Member
|
||||||
@@ -114,11 +165,31 @@ pub mod module {
|
|||||||
NetworkRemoved { chain_id: T::NetworkId },
|
NetworkRemoved { chain_id: T::NetworkId },
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[pallet::storage]
|
||||||
|
#[pallet::getter(fn bridged_imbalance)]
|
||||||
|
pub type BridgedImbalance<T: Config> =
|
||||||
|
StorageValue<_, BridgeAdjustment<BalanceOf<T>>, ValueQuery>;
|
||||||
|
|
||||||
|
#[pallet::storage]
|
||||||
|
#[pallet::getter(fn accumulated_commission)]
|
||||||
|
pub type AccumulatedCommission<T: Config> =
|
||||||
|
StorageValue<_, BalanceOf<T>, ValueQuery>;
|
||||||
|
|
||||||
#[pallet::storage]
|
#[pallet::storage]
|
||||||
#[pallet::getter(fn networks)]
|
#[pallet::getter(fn networks)]
|
||||||
pub type Networks<T: Config> =
|
pub type Networks<T: Config> =
|
||||||
StorageMap<_, Twox64Concat, T::NetworkId, NetworkData, OptionQuery>;
|
StorageMap<_, Twox64Concat, T::NetworkId, NetworkData, OptionQuery>;
|
||||||
|
|
||||||
|
#[pallet::storage]
|
||||||
|
#[pallet::getter(fn gatekeeper_amount)]
|
||||||
|
pub type GatekeeperAmount<T: Config> = StorageMap<
|
||||||
|
_,
|
||||||
|
Twox64Concat,
|
||||||
|
T::NetworkId,
|
||||||
|
BalanceOf<T>,
|
||||||
|
ValueQuery,
|
||||||
|
>;
|
||||||
|
|
||||||
#[pallet::genesis_config]
|
#[pallet::genesis_config]
|
||||||
pub struct GenesisConfig<T: Config> {
|
pub struct GenesisConfig<T: Config> {
|
||||||
pub networks: Vec<(T::NetworkId, Vec<u8>)>,
|
pub networks: Vec<(T::NetworkId, Vec<u8>)>,
|
||||||
@@ -527,7 +598,7 @@ impl<T: Config> NetworkDataInspectHandler<NetworkData> for Pallet<T> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T: Config> NetworkDataMutateHandler<NetworkData> for Pallet<T> {
|
impl<T: Config> NetworkDataMutateHandler<NetworkData, BalanceOf<T>> for Pallet<T> {
|
||||||
fn register(chain_id: Self::NetworkId, network: NetworkData) -> DispatchResult {
|
fn register(chain_id: Self::NetworkId, network: NetworkData) -> DispatchResult {
|
||||||
Self::do_register_network(chain_id, network)
|
Self::do_register_network(chain_id, network)
|
||||||
}
|
}
|
||||||
@@ -535,4 +606,74 @@ impl<T: Config> NetworkDataMutateHandler<NetworkData> for Pallet<T> {
|
|||||||
fn remove(chain_id: Self::NetworkId) -> DispatchResult {
|
fn remove(chain_id: Self::NetworkId) -> DispatchResult {
|
||||||
Self::do_remove_network(chain_id)
|
Self::do_remove_network(chain_id)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn increase_gatekeeper_amount(
|
||||||
|
network_id: &T::NetworkId,
|
||||||
|
amount: &BalanceOf<T>,
|
||||||
|
) -> Result<(BalanceOf<T>, BalanceOf<T>), ()> {
|
||||||
|
let new_bridged_in_amount = BridgedImbalance::<T>::mutate(|bridged_imbalance| {
|
||||||
|
match bridged_imbalance.bridged_in.checked_add(amount) {
|
||||||
|
Some(value) => {
|
||||||
|
(*bridged_imbalance).bridged_in = value;
|
||||||
|
Ok(value)
|
||||||
|
},
|
||||||
|
None => Err(())
|
||||||
|
}
|
||||||
|
})?;
|
||||||
|
|
||||||
|
let new_gatekeeper_amount = GatekeeperAmount::<T>::mutate(network_id, |gatekeeper_amount| {
|
||||||
|
match gatekeeper_amount.checked_add(amount) {
|
||||||
|
Some(value) => {
|
||||||
|
*gatekeeper_amount = value;
|
||||||
|
Ok(value)
|
||||||
|
},
|
||||||
|
None => Err(())
|
||||||
|
}
|
||||||
|
})?;
|
||||||
|
|
||||||
|
Ok((new_gatekeeper_amount, new_bridged_in_amount))
|
||||||
|
}
|
||||||
|
|
||||||
|
fn decrease_gatekeeper_amount(
|
||||||
|
network_id: &T::NetworkId,
|
||||||
|
amount: &BalanceOf<T>,
|
||||||
|
) -> Result<(BalanceOf<T>, BalanceOf<T>), ()> {
|
||||||
|
let new_gatekeeper_amount = GatekeeperAmount::<T>::mutate(network_id, |gatekeeper_amount| {
|
||||||
|
match gatekeeper_amount.checked_sub(amount) {
|
||||||
|
Some(value) => {
|
||||||
|
*gatekeeper_amount = value;
|
||||||
|
Ok(value)
|
||||||
|
},
|
||||||
|
None => Err(())
|
||||||
|
}
|
||||||
|
})?;
|
||||||
|
|
||||||
|
let new_bridged_out_amount = BridgedImbalance::<T>::mutate(|bridged_imbalance| {
|
||||||
|
match bridged_imbalance.bridged_out.checked_add(amount) {
|
||||||
|
Some(value) => {
|
||||||
|
(*bridged_imbalance).bridged_out = value;
|
||||||
|
Ok(value)
|
||||||
|
},
|
||||||
|
None => Err(())
|
||||||
|
}
|
||||||
|
})?;
|
||||||
|
|
||||||
|
Ok((new_gatekeeper_amount, new_bridged_out_amount))
|
||||||
|
}
|
||||||
|
|
||||||
|
fn accumulate_commission(commission: &BalanceOf<T>) -> Result<BalanceOf<T>, ()> {
|
||||||
|
AccumulatedCommission::<T>::mutate(|accumulated| {
|
||||||
|
match accumulated.checked_add(commission) {
|
||||||
|
Some(value) => {
|
||||||
|
*accumulated = value;
|
||||||
|
Ok(value)
|
||||||
|
},
|
||||||
|
None => Err(()),
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
fn nullify_commission() {
|
||||||
|
AccumulatedCommission::<T>::set(Default::default());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
32
pallets/networks/src/mock.rs
Executable file → Normal file
@@ -1,19 +1,25 @@
|
|||||||
use crate as ghost_networks;
|
use crate::{self as ghost_networks};
|
||||||
use frame_system::EnsureSignedBy;
|
use frame_system::EnsureSignedBy;
|
||||||
use frame_support::{
|
use frame_support::{
|
||||||
construct_runtime, ord_parameter_types, parameter_types, traits::{ConstU128, ConstU32, Everything}
|
construct_runtime, ord_parameter_types, parameter_types,
|
||||||
|
traits::{ConstU128, ConstU32, Everything},
|
||||||
};
|
};
|
||||||
pub use primitives::{
|
pub use primitives::{
|
||||||
AccountId, Balance, Nonce, BlockNumber, Hash,
|
AccountId, Balance, Nonce, BlockNumber, Hash,
|
||||||
ReserveIdentifier, FreezeIdentifier,
|
ReserveIdentifier, FreezeIdentifier,
|
||||||
};
|
};
|
||||||
use sp_runtime::{
|
use sp_runtime::{
|
||||||
traits::{BlakeTwo256, AccountIdLookup},
|
curve::PiecewiseLinear,
|
||||||
BuildStorage,
|
traits::{AccountIdLookup, BlakeTwo256},
|
||||||
|
BuildStorage
|
||||||
};
|
};
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
pub const BlockHashCount: BlockNumber = 250;
|
pub const BlockHashCount: BlockNumber = 250;
|
||||||
|
pub static SlashDeferDuration: u32 = 0;
|
||||||
|
pub static Period: BlockNumber = 5;
|
||||||
|
pub static Offset: BlockNumber = 0;
|
||||||
|
pub static MaxControllersInDeprecationBatch: u32 = 5_000;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl frame_system::Config for Test {
|
impl frame_system::Config for Test {
|
||||||
@@ -64,6 +70,21 @@ impl pallet_balances::Config for Test {
|
|||||||
type MaxFreezes = ConstU32<50>;
|
type MaxFreezes = ConstU32<50>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pallet_staking_reward_curve::build! {
|
||||||
|
const REWARD_CURVE: PiecewiseLinear<'static> = curve!(
|
||||||
|
min_inflation: 0_006_900,
|
||||||
|
max_inflation: 1_000_000,
|
||||||
|
ideal_stake: 0_690_000,
|
||||||
|
falloff: 0_050_000,
|
||||||
|
max_piece_count: 100,
|
||||||
|
test_precision: 0_005_000,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
parameter_types! {
|
||||||
|
pub const RewardCurve: &'static PiecewiseLinear<'static> = &REWARD_CURVE;
|
||||||
|
}
|
||||||
|
|
||||||
ord_parameter_types! {
|
ord_parameter_types! {
|
||||||
pub const RegistererAccount: AccountId = AccountId::from([1u8; 32]);
|
pub const RegistererAccount: AccountId = AccountId::from([1u8; 32]);
|
||||||
pub const UpdaterAccount: AccountId = AccountId::from([2u8; 32]);
|
pub const UpdaterAccount: AccountId = AccountId::from([2u8; 32]);
|
||||||
@@ -73,6 +94,7 @@ ord_parameter_types! {
|
|||||||
|
|
||||||
impl ghost_networks::Config for Test {
|
impl ghost_networks::Config for Test {
|
||||||
type RuntimeEvent = RuntimeEvent;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
|
type Currency = Balances;
|
||||||
type NetworkId = u32;
|
type NetworkId = u32;
|
||||||
type RegisterOrigin = EnsureSignedBy::<RegistererAccount, AccountId>;
|
type RegisterOrigin = EnsureSignedBy::<RegistererAccount, AccountId>;
|
||||||
type UpdateOrigin = EnsureSignedBy::<UpdaterAccount, AccountId>;
|
type UpdateOrigin = EnsureSignedBy::<UpdaterAccount, AccountId>;
|
||||||
@@ -80,7 +102,7 @@ impl ghost_networks::Config for Test {
|
|||||||
type WeightInfo = crate::weights::SubstrateWeight<Test>;
|
type WeightInfo = crate::weights::SubstrateWeight<Test>;
|
||||||
}
|
}
|
||||||
|
|
||||||
type Block = frame_system::mocking::MockBlockU32<Test>;
|
type Block = frame_system::mocking::MockBlock<Test>;
|
||||||
|
|
||||||
construct_runtime!(
|
construct_runtime!(
|
||||||
pub enum Test {
|
pub enum Test {
|
||||||
|
|||||||
284
pallets/networks/src/tests.rs
Executable file → Normal file
@@ -1,16 +1,16 @@
|
|||||||
use mock::{
|
use mock::{
|
||||||
ExtBuilder, System, RegistererAccount, UpdaterAccount, RemoverAccount,
|
ExtBuilder, System, RegistererAccount, UpdaterAccount, RemoverAccount,
|
||||||
RandomAccount, GhostNetworks, Test, RuntimeEvent, RuntimeOrigin,
|
RandomAccount, GhostNetworks, Test, RuntimeEvent, RuntimeOrigin, RewardCurve,
|
||||||
};
|
};
|
||||||
use frame_support::{assert_err, assert_ok};
|
use frame_support::{assert_err, assert_ok};
|
||||||
use sp_runtime::DispatchError;
|
use sp_runtime::DispatchError;
|
||||||
|
use pallet_staking::EraPayout;
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
fn prepare_network_data() -> (u32, NetworkData) {
|
fn prepare_network_data() -> (u32, NetworkData) {
|
||||||
(1u32, NetworkData {
|
(1u32, NetworkData {
|
||||||
chain_name: "Ethereum".into(),
|
chain_name: "Ethereum".into(),
|
||||||
default_endpoint:
|
default_endpoint: "https:://some-endpoint.my-server.com/v1/my-super-secret-key".into(),
|
||||||
"https:://some-endpoint.my-server.com/v1/my-super-secret-key".into(),
|
|
||||||
finality_delay: Some(69),
|
finality_delay: Some(69),
|
||||||
release_delay: Some(69),
|
release_delay: Some(69),
|
||||||
network_type: NetworkType::Evm,
|
network_type: NetworkType::Evm,
|
||||||
@@ -635,3 +635,281 @@ fn could_not_remove_non_existent_network() {
|
|||||||
assert_eq!(Networks::<Test>::get(chain_id), None);
|
assert_eq!(Networks::<Test>::get(chain_id), None);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn bridge_storage_is_empty_by_default() {
|
||||||
|
ExtBuilder::build()
|
||||||
|
.execute_with(|| {
|
||||||
|
assert_eq!(AccumulatedCommission::<Test>::get(), 0);
|
||||||
|
assert_eq!(BridgedImbalance::<Test>::get(),
|
||||||
|
BridgeAdjustment::default());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn gatekeeper_amount_changes_correctly() {
|
||||||
|
ExtBuilder::build()
|
||||||
|
.execute_with(|| {
|
||||||
|
let chain_id: u32 = 1;
|
||||||
|
let amount_in: u128 = 420;
|
||||||
|
let amount_out: u128 = 69;
|
||||||
|
let result = amount_in - 3 * amount_out;
|
||||||
|
|
||||||
|
assert_eq!(GatekeeperAmount::<Test>::get(&chain_id), 0);
|
||||||
|
assert_eq!(BridgedImbalance::<Test>::get(),
|
||||||
|
BridgeAdjustment::default());
|
||||||
|
|
||||||
|
assert_ok!(GhostNetworks::increase_gatekeeper_amount(&chain_id, &amount_in));
|
||||||
|
assert_ok!(GhostNetworks::decrease_gatekeeper_amount(&chain_id, &amount_out));
|
||||||
|
assert_ok!(GhostNetworks::decrease_gatekeeper_amount(&chain_id, &amount_out));
|
||||||
|
assert_ok!(GhostNetworks::decrease_gatekeeper_amount(&chain_id, &amount_out));
|
||||||
|
|
||||||
|
assert_eq!(GatekeeperAmount::<Test>::get(&chain_id), result);
|
||||||
|
assert_eq!(BridgedImbalance::<Test>::get(), BridgeAdjustment {
|
||||||
|
bridged_out: 3 * amount_out,
|
||||||
|
bridged_in: amount_in });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn commission_accumulation_is_correct() {
|
||||||
|
ExtBuilder::build()
|
||||||
|
.execute_with(|| {
|
||||||
|
let commission_first: u128 = 420;
|
||||||
|
let commission_second: u128 = 69;
|
||||||
|
let result = commission_first + commission_second;
|
||||||
|
|
||||||
|
assert_eq!(AccumulatedCommission::<Test>::get(), 0);
|
||||||
|
assert_ok!(GhostNetworks::accumulate_commission(&commission_first));
|
||||||
|
assert_ok!(GhostNetworks::accumulate_commission(&commission_second));
|
||||||
|
assert_eq!(AccumulatedCommission::<Test>::get(), result);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn commission_overflow_and_underflow_emits_error() {
|
||||||
|
ExtBuilder::build()
|
||||||
|
.execute_with(|| {
|
||||||
|
let commission: u128 = u128::MAX - 69;
|
||||||
|
assert_eq!(AccumulatedCommission::<Test>::get(), 0);
|
||||||
|
assert_ok!(GhostNetworks::accumulate_commission(&commission));
|
||||||
|
assert_err!(GhostNetworks::accumulate_commission(&commission), ());
|
||||||
|
assert_eq!(AccumulatedCommission::<Test>::get(), commission);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn gatekeeper_amount_overflow_and_underflow_emits_error() {
|
||||||
|
ExtBuilder::build()
|
||||||
|
.execute_with(|| {
|
||||||
|
let chain_id: u32 = 1;
|
||||||
|
let commission: u128 = u128::MAX - 69;
|
||||||
|
assert_eq!(GatekeeperAmount::<Test>::get(&chain_id), 0);
|
||||||
|
assert_ok!(GhostNetworks::increase_gatekeeper_amount(
|
||||||
|
&chain_id,
|
||||||
|
&commission,
|
||||||
|
), (commission, commission));
|
||||||
|
assert_err!(GhostNetworks::increase_gatekeeper_amount(
|
||||||
|
&chain_id,
|
||||||
|
&commission,
|
||||||
|
), ());
|
||||||
|
assert_eq!(GatekeeperAmount::<Test>::get(&chain_id), commission);
|
||||||
|
assert_ok!(GhostNetworks::decrease_gatekeeper_amount(
|
||||||
|
&chain_id,
|
||||||
|
&commission,
|
||||||
|
), (0, commission));
|
||||||
|
assert_err!(GhostNetworks::decrease_gatekeeper_amount(
|
||||||
|
&chain_id,
|
||||||
|
&commission,
|
||||||
|
), ());
|
||||||
|
assert_eq!(GatekeeperAmount::<Test>::get(&chain_id), 0);
|
||||||
|
assert_eq!(BridgedImbalance::<Test>::get(), BridgeAdjustment {
|
||||||
|
bridged_out: commission,
|
||||||
|
bridged_in: commission,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn bridged_amount_overflow_and_underflow_emits_error() {
|
||||||
|
ExtBuilder::build()
|
||||||
|
.execute_with(|| {
|
||||||
|
let chain_id_first: u32 = 1;
|
||||||
|
let chain_id_second: u32 = 2;
|
||||||
|
let commission: u128 = u128::MAX - 69;
|
||||||
|
assert_eq!(BridgedImbalance::<Test>::get(), BridgeAdjustment {
|
||||||
|
bridged_out: 0,
|
||||||
|
bridged_in: 0,
|
||||||
|
});
|
||||||
|
assert_ok!(GhostNetworks::increase_gatekeeper_amount(
|
||||||
|
&chain_id_first,
|
||||||
|
&commission,
|
||||||
|
), (commission, commission));
|
||||||
|
assert_err!(GhostNetworks::increase_gatekeeper_amount(
|
||||||
|
&chain_id_second,
|
||||||
|
&commission,
|
||||||
|
), ());
|
||||||
|
assert_err!(GhostNetworks::increase_gatekeeper_amount(
|
||||||
|
&chain_id_first,
|
||||||
|
&u128::MAX,
|
||||||
|
), ());
|
||||||
|
assert_err!(GhostNetworks::increase_gatekeeper_amount(
|
||||||
|
&chain_id_first,
|
||||||
|
&commission,
|
||||||
|
), ());
|
||||||
|
assert_eq!(GatekeeperAmount::<Test>::get(&chain_id_first), commission);
|
||||||
|
assert_eq!(GatekeeperAmount::<Test>::get(&chain_id_second), 0);
|
||||||
|
assert_err!(GhostNetworks::decrease_gatekeeper_amount(
|
||||||
|
&chain_id_second,
|
||||||
|
&commission,
|
||||||
|
), ());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn accumulated_commission_could_be_nullified() {
|
||||||
|
ExtBuilder::build()
|
||||||
|
.execute_with(|| {
|
||||||
|
let commission_first: u128 = 420;
|
||||||
|
let commission_second: u128 = 69;
|
||||||
|
|
||||||
|
assert_eq!(AccumulatedCommission::<Test>::get(), 0);
|
||||||
|
assert_ok!(GhostNetworks::accumulate_commission(
|
||||||
|
&commission_first
|
||||||
|
), commission_first);
|
||||||
|
assert_ok!(GhostNetworks::accumulate_commission(
|
||||||
|
&commission_second,
|
||||||
|
), commission_first + commission_second);
|
||||||
|
assert_eq!(AccumulatedCommission::<Test>::get(),
|
||||||
|
commission_first + commission_second);
|
||||||
|
GhostNetworks::nullify_commission();
|
||||||
|
assert_eq!(AccumulatedCommission::<Test>::get(), 0);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn bridged_inlation_reward_works() {
|
||||||
|
ExtBuilder::build()
|
||||||
|
.execute_with(|| {
|
||||||
|
let chain_id: u32 = 1;
|
||||||
|
let amount: u128 = 1337 * 1_000_000_000;
|
||||||
|
let commission: u128 = amount / 100; // 1% commission
|
||||||
|
let total_staked_ideal: u128 = 69;
|
||||||
|
let total_staked_not_ideal: u128 = 68;
|
||||||
|
let total_issuance: u128 = 100;
|
||||||
|
|
||||||
|
|
||||||
|
assert_eq!(BridgedInflationCurve::<RewardCurve, Test>::era_payout(
|
||||||
|
total_staked_ideal * 1_000,
|
||||||
|
total_issuance * 1_000,
|
||||||
|
0), (0, 0));
|
||||||
|
assert_eq!(BridgedInflationCurve::<RewardCurve, Test>::era_payout(
|
||||||
|
total_staked_ideal * 1_000_000_000_000,
|
||||||
|
total_issuance * 1_000_000_000_000,
|
||||||
|
0), (0, 0));
|
||||||
|
assert_eq!(BridgedInflationCurve::<RewardCurve, Test>::era_payout(
|
||||||
|
total_staked_ideal * 1_000_000_000_000_000_000_000_000,
|
||||||
|
total_issuance * 1_000_000_000_000_000_000_000_000,
|
||||||
|
0), (0, 0));
|
||||||
|
|
||||||
|
assert_eq!(BridgedInflationCurve::<RewardCurve, Test>::era_payout(
|
||||||
|
total_staked_not_ideal * 1_000,
|
||||||
|
total_issuance * 1_000,
|
||||||
|
0), (0, 0));
|
||||||
|
assert_eq!(BridgedInflationCurve::<RewardCurve, Test>::era_payout(
|
||||||
|
total_staked_not_ideal * 1_000_000_000_000,
|
||||||
|
total_issuance * 1_000_000_000_000,
|
||||||
|
0), (0, 0));
|
||||||
|
assert_eq!(BridgedInflationCurve::<RewardCurve, Test>::era_payout(
|
||||||
|
total_staked_not_ideal * 1_000_000_000_000_000_000_000_000,
|
||||||
|
total_issuance * 1_000_000_000_000_000_000_000_000,
|
||||||
|
0), (0, 0));
|
||||||
|
|
||||||
|
assert_eq!(BridgedInflationCurve::<RewardCurve, Test>::era_payout(
|
||||||
|
1, total_issuance * 1_000, 0), (0, 0));
|
||||||
|
assert_eq!(BridgedInflationCurve::<RewardCurve, Test>::era_payout(
|
||||||
|
1, total_issuance * 1_000_000_000_000, 0), (0, 0));
|
||||||
|
assert_eq!(BridgedInflationCurve::<RewardCurve, Test>::era_payout(
|
||||||
|
1, total_issuance * 1_000_000_000_000_000_000_000_000, 0), (0, 0));
|
||||||
|
|
||||||
|
assert_ok!(GhostNetworks::accumulate_commission(&commission));
|
||||||
|
assert_ok!(GhostNetworks::increase_gatekeeper_amount(&chain_id, &amount));
|
||||||
|
|
||||||
|
assert_eq!(BridgedInflationCurve::<RewardCurve, Test>::era_payout(
|
||||||
|
total_staked_ideal * 1_000,
|
||||||
|
total_issuance * 1_000 + amount,
|
||||||
|
0), (commission, 0));
|
||||||
|
assert_eq!(BridgedInflationCurve::<RewardCurve, Test>::era_payout(
|
||||||
|
total_staked_ideal * 1_000_000_000_000,
|
||||||
|
total_issuance * 1_000_000_000_000 + amount,
|
||||||
|
0), (commission, 0));
|
||||||
|
assert_eq!(BridgedInflationCurve::<RewardCurve, Test>::era_payout(
|
||||||
|
total_staked_ideal * 1_000_000_000_000_000_000_000_000,
|
||||||
|
total_issuance * 1_000_000_000_000_000_000_000_000 + amount,
|
||||||
|
0), (commission, 0));
|
||||||
|
|
||||||
|
assert_eq!(BridgedInflationCurve::<RewardCurve, Test>::era_payout(
|
||||||
|
total_staked_not_ideal * 1_000,
|
||||||
|
total_issuance * 1_000 + amount,
|
||||||
|
0), (13177472000, 192528000));
|
||||||
|
assert_eq!(13177472000 + 192528000, commission);
|
||||||
|
assert_eq!(BridgedInflationCurve::<RewardCurve, Test>::era_payout(
|
||||||
|
total_staked_not_ideal * 1_000_000_000_000,
|
||||||
|
total_issuance * 1_000_000_000_000 + amount,
|
||||||
|
0), (13177568884, 192431116));
|
||||||
|
assert_eq!(13177568884 + 192431116, commission);
|
||||||
|
assert_eq!(BridgedInflationCurve::<RewardCurve, Test>::era_payout(
|
||||||
|
total_staked_not_ideal * 1_000_000_000_000_000_000_000_000,
|
||||||
|
total_issuance * 1_000_000_000_000_000_000_000_000 + amount,
|
||||||
|
0), (13177568884, 192431116));
|
||||||
|
assert_eq!(13177568884 + 192431116, commission);
|
||||||
|
|
||||||
|
assert_eq!(BridgedInflationCurve::<RewardCurve, Test>::era_payout(
|
||||||
|
1, total_issuance * 1_000 + amount, 0),
|
||||||
|
(92386700, 13277613300));
|
||||||
|
assert_eq!(92386700 + 13277613300, commission);
|
||||||
|
assert_eq!(BridgedInflationCurve::<RewardCurve, Test>::era_payout(
|
||||||
|
1, total_issuance * 1_000_000_000_000 + amount, 0),
|
||||||
|
(92253000, 13277747000));
|
||||||
|
assert_eq!(92253000 + 13277747000, commission);
|
||||||
|
assert_eq!(BridgedInflationCurve::<RewardCurve, Test>::era_payout(
|
||||||
|
1, total_issuance * 1_000_000_000_000_000_000_000_000 + amount, 0),
|
||||||
|
(92253000, 13277747000));
|
||||||
|
assert_eq!(92253000 + 13277747000, commission);
|
||||||
|
|
||||||
|
GhostNetworks::nullify_commission();
|
||||||
|
|
||||||
|
assert_eq!(BridgedInflationCurve::<RewardCurve, Test>::era_payout(
|
||||||
|
total_staked_ideal * 1_000,
|
||||||
|
total_issuance * 1_000 + amount,
|
||||||
|
0), (0, 0));
|
||||||
|
assert_eq!(BridgedInflationCurve::<RewardCurve, Test>::era_payout(
|
||||||
|
total_staked_ideal * 1_000_000_000_000,
|
||||||
|
total_issuance * 1_000_000_000_000 + amount,
|
||||||
|
0), (0, 0));
|
||||||
|
assert_eq!(BridgedInflationCurve::<RewardCurve, Test>::era_payout(
|
||||||
|
total_staked_ideal * 1_000_000_000_000_000_000_000_000,
|
||||||
|
total_issuance * 1_000_000_000_000_000_000_000_000 + amount,
|
||||||
|
0), (0, 0));
|
||||||
|
|
||||||
|
assert_eq!(BridgedInflationCurve::<RewardCurve, Test>::era_payout(
|
||||||
|
total_staked_not_ideal * 1_000,
|
||||||
|
total_issuance * 1_000 + amount,
|
||||||
|
0), (0, 0));
|
||||||
|
assert_eq!(BridgedInflationCurve::<RewardCurve, Test>::era_payout(
|
||||||
|
total_staked_not_ideal * 1_000_000_000_000,
|
||||||
|
total_issuance * 1_000_000_000_000 + amount,
|
||||||
|
0), (0, 0));
|
||||||
|
assert_eq!(BridgedInflationCurve::<RewardCurve, Test>::era_payout(
|
||||||
|
total_staked_not_ideal * 1_000_000_000_000_000_000_000_000,
|
||||||
|
total_issuance * 1_000_000_000_000_000_000_000_000 + amount,
|
||||||
|
0), (0, 0));
|
||||||
|
|
||||||
|
assert_eq!(BridgedInflationCurve::<RewardCurve, Test>::era_payout(
|
||||||
|
1, total_issuance * 1_000 + amount, 0), (0, 0));
|
||||||
|
assert_eq!(BridgedInflationCurve::<RewardCurve, Test>::era_payout(
|
||||||
|
1, total_issuance * 1_000_000_000_000 + amount, 0), (0, 0));
|
||||||
|
assert_eq!(BridgedInflationCurve::<RewardCurve, Test>::era_payout(
|
||||||
|
1, total_issuance * 1_000_000_000_000_000_000_000_000 + amount, 0), (0, 0));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|||||||
0
pallets/networks/src/weights.rs
Executable file → Normal file
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "ghost-slow-clap"
|
name = "ghost-slow-clap"
|
||||||
version = "0.3.14"
|
version = "0.3.15"
|
||||||
description = "Applause protocol for the EVM bridge"
|
description = "Applause protocol for the EVM bridge"
|
||||||
license.workspace = true
|
license.workspace = true
|
||||||
authors.workspace = true
|
authors.workspace = true
|
||||||
|
|||||||
@@ -1162,16 +1162,22 @@ impl<T: Config> Pallet<T> {
|
|||||||
session_index: SessionIndex,
|
session_index: SessionIndex,
|
||||||
average_claps: u32,
|
average_claps: u32,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
|
if average_claps == 0 {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
let claps_in_session = AuthorityInfoInSession::<T>::get(session_index);
|
let claps_in_session = AuthorityInfoInSession::<T>::get(session_index);
|
||||||
match claps_in_session.get(authority_index) {
|
match claps_in_session.get(authority_index) {
|
||||||
Some(clap_in_session) => {
|
Some(clap_in_session) => {
|
||||||
let number_of_claps = &clap_in_session.actions;
|
let number_of_claps = &clap_in_session.actions;
|
||||||
let authority_deviation = if *number_of_claps < average_claps {
|
let authority_deviation = if *number_of_claps < average_claps {
|
||||||
Perbill::from_rational(*number_of_claps, average_claps)
|
Perbill::from_rational(average_claps - *number_of_claps, average_claps)
|
||||||
} else { Perbill::from_rational(average_claps, *number_of_claps) };
|
} else {
|
||||||
|
Perbill::from_rational(*number_of_claps - average_claps, average_claps)
|
||||||
|
};
|
||||||
authority_deviation < Perbill::from_percent(T::OffenceThreshold::get())
|
authority_deviation < Perbill::from_percent(T::OffenceThreshold::get())
|
||||||
},
|
},
|
||||||
_ => false,
|
None => false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ fn prepare_companion(amount: u64) -> Companion<NetworkIdOf<Runtime>, BalanceOf<R
|
|||||||
Companion {
|
Companion {
|
||||||
network_id: 1,
|
network_id: 1,
|
||||||
receiver: H160::from_low_u64_ne(1337),
|
receiver: H160::from_low_u64_ne(1337),
|
||||||
fee: H256::from_low_u64_ne(40_000),
|
|
||||||
amount: amount,
|
amount: amount,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
0
pallets/traits/Cargo.toml
Executable file → Normal file
0
pallets/traits/src/lib.rs
Executable file → Normal file
13
pallets/traits/src/networks.rs
Executable file → Normal file
@@ -23,7 +23,18 @@ pub trait NetworkDataInspectHandler<Network>: NetworkDataBasicHandler {
|
|||||||
fn iter() -> PrefixIterator<(Self::NetworkId, Network)>;
|
fn iter() -> PrefixIterator<(Self::NetworkId, Network)>;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait NetworkDataMutateHandler<Network>: NetworkDataInspectHandler<Network> {
|
pub trait NetworkDataMutateHandler<Network, Balance>: NetworkDataInspectHandler<Network> {
|
||||||
fn register(chain_id: Self::NetworkId, network: Network) -> DispatchResult;
|
fn register(chain_id: Self::NetworkId, network: Network) -> DispatchResult;
|
||||||
fn remove(chain_id: Self::NetworkId) -> DispatchResult;
|
fn remove(chain_id: Self::NetworkId) -> DispatchResult;
|
||||||
|
|
||||||
|
fn increase_gatekeeper_amount(
|
||||||
|
chain_id: &Self::NetworkId,
|
||||||
|
amount: &Balance,
|
||||||
|
) -> Result<(Balance, Balance), ()>;
|
||||||
|
fn decrease_gatekeeper_amount(
|
||||||
|
chain_id: &Self::NetworkId,
|
||||||
|
amount: &Balance,
|
||||||
|
) -> Result<(Balance, Balance), ()>;
|
||||||
|
fn accumulate_commission(commission: &Balance) -> Result<Balance, ()>;
|
||||||
|
fn nullify_commission();
|
||||||
}
|
}
|
||||||
|
|||||||
0
rpc/Cargo.toml
Executable file → Normal file
0
rpc/src/lib.rs
Executable file → Normal file
3
runtime/casper/Cargo.toml
Executable file → Normal file
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "casper-runtime"
|
name = "casper-runtime"
|
||||||
version = "3.5.18"
|
version = "3.5.20"
|
||||||
build = "build.rs"
|
build = "build.rs"
|
||||||
description = "Runtime of the Casper Network"
|
description = "Runtime of the Casper Network"
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
@@ -17,7 +17,6 @@ codec = { features = ["derive", "max-encoded-len"], workspace = true }
|
|||||||
scale-info = { features = ["derive"], workspace = true }
|
scale-info = { features = ["derive"], workspace = true }
|
||||||
log = { workspace = true }
|
log = { workspace = true }
|
||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
hex-literal = { workspace = true, default-features = true }
|
|
||||||
|
|
||||||
frame-support = { workspace = true }
|
frame-support = { workspace = true }
|
||||||
frame-system = { workspace = true }
|
frame-system = { workspace = true }
|
||||||
|
|||||||
0
runtime/casper/build.rs
Executable file → Normal file
0
runtime/casper/constants/Cargo.toml
Executable file → Normal file
0
runtime/casper/constants/src/lib.rs
Executable file → Normal file
0
runtime/casper/src/cult/mod.rs
Executable file → Normal file
0
runtime/casper/src/cult/origins.rs
Executable file → Normal file
0
runtime/casper/src/cult/tracks.rs
Executable file → Normal file
@@ -214,141 +214,6 @@ fn testnet_config_genesis(
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// staging
|
|
||||||
fn casper_staging_config_genesis() -> serde_json::Value {
|
|
||||||
use hex_literal::hex;
|
|
||||||
use sp_core::crypto::UncheckedInto;
|
|
||||||
|
|
||||||
// Following keys are used in genesis config for testing (casper) chains.
|
|
||||||
// DO NOT use them in production chains such as ghost.
|
|
||||||
let endowed_accounts = vec![
|
|
||||||
// sfErNwRgZ6ypB7wY8M2smXMZjxqUkc2TgUcNvC1JNQJFXS8bw
|
|
||||||
hex!["328d3b7c3046ef7700937d99fb2e98ce2591682c2b5dcf3f562e4da157650237"].into(),
|
|
||||||
// sfEwRjyvEQcpRQ1qbCZum27nEkTggKEt7DtqxwyYQULt9UuUN
|
|
||||||
hex!["3666e4e19f87bb8680495f31864ce1f1c69d4178002cc01911aef2cc7313f203"].into(),
|
|
||||||
// sfHcJxw5cgkvukZZyxcNUMCdbm9e7773orByLrGgAREka81TK
|
|
||||||
hex!["ac871e8bab00dd56ba3a1c0bd289357203dcaf10010b0b04ad7472870cd22a3c"].into(),
|
|
||||||
];
|
|
||||||
|
|
||||||
let initial_authorities: Vec<(
|
|
||||||
AccountId,
|
|
||||||
AccountId,
|
|
||||||
BabeId,
|
|
||||||
GrandpaId,
|
|
||||||
AuthorityDiscoveryId,
|
|
||||||
SlowClapId,
|
|
||||||
)> = vec![
|
|
||||||
(
|
|
||||||
// sfFXZmnDVnkQ781J2gbqUpi7K5KgMWMdM4eeii74xxGgKYnNN
|
|
||||||
hex!["507045c82be367f95408466cd054ca39bfa52697a3ef22809af14cf9de304f02"].into(),
|
|
||||||
// sfFXZmnDVnkQ781J2gbqUpi7K5KgMWMdM4eeii74xxGgKYnNN
|
|
||||||
hex!["507045c82be367f95408466cd054ca39bfa52697a3ef22809af14cf9de304f02"].into(),
|
|
||||||
// sfJeojACBa7WiH6tBwikBKAMU2oKmseEBD1GYUYATvfWuLcPa
|
|
||||||
hex!["daaaaab6a6e574099e24ae9bb75b543610edef9d374fa85a378edb573b47615f"].unchecked_into(),
|
|
||||||
// sfFdtzNxJdeEkgHxvk144rJKxf7wcYvgX5tqfgZRutW9YvAKE
|
|
||||||
hex!["55446f9a7aa99ced06b317c80ce90d56b84e56526775683af2525969e8da0b64"].unchecked_into(),
|
|
||||||
// sfE8gsMYAjAJHk5gyYZN7AW6pfmJ7V9H7xxWto24nmhzCUXaQ
|
|
||||||
hex!["12c14850562021eb99f58f90ab624fb6cfaf3ac9228a92f8b60115fe6a6af15a"].unchecked_into(),
|
|
||||||
// sfE3GKSrKZzrZpdapJ2VGRpPor45T4D4i8QBZNumSNGqGv7PX
|
|
||||||
hex!["0e9e698c7b2bf5ce3861cb4bc4ddf9e200237c282025b093ada850d764d12a35"].unchecked_into(),
|
|
||||||
),
|
|
||||||
(
|
|
||||||
// sfHLqWNC4hMKHhwvPWmWcxZsDPhCTQKgh1Ap7pm3qML5GBTBa
|
|
||||||
hex!["a0ba0196e6ee7e6b5b0553035c5cb5c04e9725001b5732839d0529cbc00c9600"].into(),
|
|
||||||
// sfHLqWNC4hMKHhwvPWmWcxZsDPhCTQKgh1Ap7pm3qML5GBTBa
|
|
||||||
hex!["a0ba0196e6ee7e6b5b0553035c5cb5c04e9725001b5732839d0529cbc00c9600"].into(),
|
|
||||||
// sfGA6tPPF8dAc8QpMCMjxitG3j8sXPhkdpm5bwz4UsXAApUiw
|
|
||||||
hex!["6c4dd88b43e2011cf9a6a73d53446336ac9e04cdd4ca23587df63187ac455e49"].unchecked_into(),
|
|
||||||
// sfGxQZXFUQH1AXv82rpjiJHFs7YsdEuVGdyvKiS2Tajpvw6Se
|
|
||||||
hex!["8f9ea20bf4a807a8e710f7559dece86e94672b5b361de157bdaa5c1f37849f8d"].unchecked_into(),
|
|
||||||
// sfGz2enFUR22cQ5ey61MdtPqbCeEWZA1wsCFFSLGaK7vKnv8C
|
|
||||||
hex!["90db5ed339a559ed157995a48d781f44c7df972dfba4bc855e4b59fa46438e17"].unchecked_into(),
|
|
||||||
// sfEtwe5BoroNjkdLsvnjnMemUKiw8MS1X4YW8bepbbGvhS4LZ
|
|
||||||
hex!["3481cdcbcf37a4669c29a78cf9ceb39383a10ef0a18b36b92d149fdd0c24ae00"].unchecked_into(),
|
|
||||||
),
|
|
||||||
(
|
|
||||||
// sfGq75CrCrkcfqNzyyidu3D4jW3AoJSzL5tKKuv1UbS16ezzy
|
|
||||||
hex!["8a0d0b66e827bf20e79f9a499317e73925ce4f422371067edfab690e43857f13"].into(),
|
|
||||||
// sfGq75CrCrkcfqNzyyidu3D4jW3AoJSzL5tKKuv1UbS16ezzy
|
|
||||||
hex!["8a0d0b66e827bf20e79f9a499317e73925ce4f422371067edfab690e43857f13"].into(),
|
|
||||||
// sfJo2ogBpssRAU9ZPTvuXFZEdmJw9pKsPydLjXe8DypRScjzT
|
|
||||||
hex!["e0f0a776ecc9fa5e1f22e2fa001fe3fba5aea52b9444bc894b45589d42132475"].unchecked_into(),
|
|
||||||
// sfHq3EVT1sqY7o5ki3zA6LEdRDfdFc29YaZN3w2Thhz6JD5ZF
|
|
||||||
hex!["b63c5a0cf342b9b04931bc8ed74d7d0165ab99ab5f8a4514797d4b299a4501fe"].unchecked_into(),
|
|
||||||
// sfEj3wrDy9EDLCAodyEdQEYxJpNnM8Etaj3RJ5bCBRzdaDced
|
|
||||||
hex!["2cf69452e9f2a8457119139408884941ed50f590c0fc0f2b044c4d82c69e4245"].unchecked_into(),
|
|
||||||
// sfE32RmBp1xX4KRTphVGLUJBxLGPN3Dzg9BwCJktxMf3iEwck
|
|
||||||
hex!["0e6fa6934f9e99fa84874f2ed9318825a0d5443a0ced984acfbd24ece72ba55e"].unchecked_into(),
|
|
||||||
),
|
|
||||||
];
|
|
||||||
|
|
||||||
let ghost_accounts: Vec<(AccountId, u128, u8)> = casper_testnet_evm_accounts();
|
|
||||||
let evm_networks = casper_testnet_evm_networks();
|
|
||||||
|
|
||||||
const ENDOWMENT: u128 = 5_000 * CSPR;
|
|
||||||
const STASH: u128 = 500 * CSPR;
|
|
||||||
|
|
||||||
serde_json::json!({
|
|
||||||
"balances": {
|
|
||||||
"balances": endowed_accounts
|
|
||||||
.iter()
|
|
||||||
.map(|k: &AccountId| (k.clone(), ENDOWMENT))
|
|
||||||
.chain(initial_authorities.iter().map(|x| (x.0.clone(), STASH)))
|
|
||||||
.collect::<Vec<_>>(),
|
|
||||||
},
|
|
||||||
"session": {
|
|
||||||
"keys": initial_authorities
|
|
||||||
.iter()
|
|
||||||
.map(|x| {
|
|
||||||
(
|
|
||||||
x.0.clone(),
|
|
||||||
x.0.clone(),
|
|
||||||
casper_session_keys(
|
|
||||||
x.2.clone(),
|
|
||||||
x.3.clone(),
|
|
||||||
x.4.clone(),
|
|
||||||
x.5.clone(),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
})
|
|
||||||
.collect::<Vec<_>>(),
|
|
||||||
},
|
|
||||||
"staking": {
|
|
||||||
"validatorCount": 50,
|
|
||||||
"minimumValidatorCount": 4,
|
|
||||||
"stakers": initial_authorities
|
|
||||||
.iter()
|
|
||||||
.map(|x| {
|
|
||||||
(
|
|
||||||
x.0.clone(),
|
|
||||||
x.0.clone(),
|
|
||||||
STASH,
|
|
||||||
StakerStatus::<AccountId>::Validator,
|
|
||||||
)
|
|
||||||
})
|
|
||||||
.collect::<Vec<_>>(),
|
|
||||||
"invulnerables": initial_authorities.iter().map(|x| x.0.clone()).collect::<Vec<_>>(),
|
|
||||||
"forceEra": Forcing::ForceNone,
|
|
||||||
"slashRewardFraction": Perbill::from_percent(10)
|
|
||||||
},
|
|
||||||
"babe": {
|
|
||||||
"epochConfig": Some(BABE_GENESIS_EPOCH_CONFIG),
|
|
||||||
},
|
|
||||||
"ghostNetworks": {
|
|
||||||
"networks": evm_networks,
|
|
||||||
},
|
|
||||||
"ghostClaims": {
|
|
||||||
"total": ghost_accounts
|
|
||||||
.iter()
|
|
||||||
.fold(0, |acc, k| acc + k.1),
|
|
||||||
"membersAndRanks": ghost_accounts
|
|
||||||
.iter()
|
|
||||||
.map(|k| (k.0.clone(), k.2.clone()))
|
|
||||||
.collect::<Vec<_>>(),
|
|
||||||
},
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// development
|
// development
|
||||||
fn casper_development_config_genesis() -> serde_json::Value {
|
fn casper_development_config_genesis() -> serde_json::Value {
|
||||||
testnet_config_genesis(
|
testnet_config_genesis(
|
||||||
@@ -372,7 +237,6 @@ fn casper_local_config_genesis() -> serde_json::Value {
|
|||||||
pub fn get_preset(id: &sp_genesis_builder::PresetId) -> Option<sp_std::vec::Vec<u8>> {
|
pub fn get_preset(id: &sp_genesis_builder::PresetId) -> Option<sp_std::vec::Vec<u8>> {
|
||||||
let patch = match id.try_into() {
|
let patch = match id.try_into() {
|
||||||
Ok("development") => casper_development_config_genesis(),
|
Ok("development") => casper_development_config_genesis(),
|
||||||
Ok("staging") => casper_staging_config_genesis(),
|
|
||||||
Ok("local_testnet") => casper_local_config_genesis(),
|
Ok("local_testnet") => casper_local_config_genesis(),
|
||||||
_ => return None,
|
_ => return None,
|
||||||
};
|
};
|
||||||
@@ -386,6 +250,5 @@ pub fn preset_names() -> Vec<sp_genesis_builder::PresetId> {
|
|||||||
Vec::from([
|
Vec::from([
|
||||||
sp_genesis_builder::PresetId::from("local_testnet"),
|
sp_genesis_builder::PresetId::from("local_testnet"),
|
||||||
sp_genesis_builder::PresetId::from("development"),
|
sp_genesis_builder::PresetId::from("development"),
|
||||||
sp_genesis_builder::PresetId::from("staging"),
|
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
|||||||
10
runtime/casper/src/lib.rs
Executable file → Normal file
@@ -473,9 +473,9 @@ impl pallet_bags_list::Config<VoterBagsListInstance> for Runtime {
|
|||||||
|
|
||||||
pallet_staking_reward_curve::build! {
|
pallet_staking_reward_curve::build! {
|
||||||
const REWARD_CURVE: PiecewiseLinear<'static> = curve!(
|
const REWARD_CURVE: PiecewiseLinear<'static> = curve!(
|
||||||
min_inflation: 0_025_000,
|
min_inflation: 0_006_900,
|
||||||
max_inflation: 0_100_000,
|
max_inflation: 0_690_000,
|
||||||
ideal_stake: 0_750_000,
|
ideal_stake: 0_690_000,
|
||||||
falloff: 0_050_000,
|
falloff: 0_050_000,
|
||||||
max_piece_count: 40,
|
max_piece_count: 40,
|
||||||
test_precision: 0_005_000,
|
test_precision: 0_005_000,
|
||||||
@@ -484,8 +484,8 @@ pallet_staking_reward_curve::build! {
|
|||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
pub const SessionsPerEra: sp_staking::SessionIndex = prod_or_fast!(6, 1);
|
pub const SessionsPerEra: sp_staking::SessionIndex = prod_or_fast!(6, 1);
|
||||||
pub const BondingDuration: sp_staking::EraIndex = prod_or_fast!(28, 28);
|
pub const BondingDuration: sp_staking::EraIndex = prod_or_fast!(1, 1);
|
||||||
pub const SlashDeferDuration: sp_staking::EraIndex = prod_or_fast!(27, 27);
|
pub const SlashDeferDuration: sp_staking::EraIndex = prod_or_fast!(0, 0);
|
||||||
pub const RewardCurve: &'static PiecewiseLinear<'static> = &REWARD_CURVE;
|
pub const RewardCurve: &'static PiecewiseLinear<'static> = &REWARD_CURVE;
|
||||||
pub const MaxExposurePageSize: u32 = 512;
|
pub const MaxExposurePageSize: u32 = 512;
|
||||||
pub const MaxNominators: u32 = 512;
|
pub const MaxNominators: u32 = 512;
|
||||||
|
|||||||
0
runtime/common/Cargo.toml
Executable file → Normal file
0
runtime/common/src/impls.rs
Executable file → Normal file
2
runtime/common/src/lib.rs
Executable file → Normal file
@@ -21,7 +21,7 @@ use static_assertions::const_assert;
|
|||||||
pub use pallet_balances::Call as BalancesCall;
|
pub use pallet_balances::Call as BalancesCall;
|
||||||
#[cfg(feature = "std")]
|
#[cfg(feature = "std")]
|
||||||
pub use pallet_staking::StakerStatus;
|
pub use pallet_staking::StakerStatus;
|
||||||
pub use pallet_timestamp::{Call as TimestampCall};
|
pub use pallet_timestamp::Call as TimestampCall;
|
||||||
use pallet_transaction_payment::{Multiplier, TargetedFeeAdjustment};
|
use pallet_transaction_payment::{Multiplier, TargetedFeeAdjustment};
|
||||||
pub use sp_runtime::traits::Bounded;
|
pub use sp_runtime::traits::Bounded;
|
||||||
#[cfg(any(feature = "std", test))]
|
#[cfg(any(feature = "std", test))]
|
||||||
|
|||||||
0
runtime/common/src/weights/block_weights.rs
Executable file → Normal file
0
runtime/common/src/weights/extrinsic.rs
Executable file → Normal file
0
runtime/common/src/weights/mod.rs
Executable file → Normal file
@@ -1,6 +1,7 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Ghost Node
|
Description=Ghost Node
|
||||||
After=network.target
|
After=network-online.target
|
||||||
|
Requires=network-online.target
|
||||||
Documentation=https://git.ghostchain.io/ghostchain/ghost-node
|
Documentation=https://git.ghostchain.io/ghostchain/ghost-node
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
|
|||||||
2
scripts/patch.sh
Executable file
@@ -0,0 +1,2 @@
|
|||||||
|
SCRIPT_DIR=$(dirname "$0")
|
||||||
|
bash "$SCRIPT_DIR/patches/patch-1.sh"
|
||||||
32
scripts/patches/patch-1.sh
Executable file
@@ -0,0 +1,32 @@
|
|||||||
|
DEFAULT_SERVICE_NAME="ghost-node.service"
|
||||||
|
|
||||||
|
check_unit_file_validity() {
|
||||||
|
SERVICE_NAME=$1
|
||||||
|
if [[ "$SERVICE_NAME" != *.service ]]; then
|
||||||
|
SERVICE_NAME="${SERVICE_NAME}.service"
|
||||||
|
fi
|
||||||
|
|
||||||
|
SERVICE_FULL_PATH="/etc/systemd/system/$SERVICE_NAME"
|
||||||
|
if [[ -e "$SERVICE_FULL_PATH" ]]; then
|
||||||
|
NETWORK_ONLINE_EXISTS=$(grep -Fx "After=network-online.target" "$SERVICE_FULL_PATH")
|
||||||
|
NETWORK_EXISTS=$(grep -Fx "After=network.target" "$SERVICE_FULL_PATH")
|
||||||
|
|
||||||
|
if [[ -z "$NETWORK_ONLINE_EXISTS" && -n "$NETWORK_EXISTS" ]]
|
||||||
|
then
|
||||||
|
echo "[-] WARNING: missing network-online.target dependency in $SERVICE_FULL_PATH, trying to replace"
|
||||||
|
sudo sed -i "s/After=network.target/After=network-online.target\nRequires=network-online.target/g" "$SERVICE_FULL_PATH"
|
||||||
|
else
|
||||||
|
echo "[+] INFO: network-online.target is set correctly for $SERVICE_FULL_PATH"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "[-] No serivce found at $SERVICE_FULL_PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
check_unit_file_validity $DEFAULT_SERVICE_NAME
|
||||||
|
read -p "[?] Enter names for the node service, separated by commas (default: ghost-node): " -a SERVICE_NAMES
|
||||||
|
for NAME in "${SERVICE_NAMES[@]}"; do
|
||||||
|
check_unit_file_validity $NAME
|
||||||
|
done
|
||||||
|
sudo systemctl daemon-reload
|
||||||
@@ -7,6 +7,7 @@ INSERT_KEYS=false
|
|||||||
UNIT_FILE=false
|
UNIT_FILE=false
|
||||||
SKIP_BUILD=false
|
SKIP_BUILD=false
|
||||||
SET_ENVIRONMENT=false
|
SET_ENVIRONMENT=false
|
||||||
|
VALIDATE=false
|
||||||
EXECUTABLE_PATH="/usr/bin/"
|
EXECUTABLE_PATH="/usr/bin/"
|
||||||
SPECIFICATION_PATH="/etc/ghost/"
|
SPECIFICATION_PATH="/etc/ghost/"
|
||||||
BASE_PATH="/var/lib/ghost"
|
BASE_PATH="/var/lib/ghost"
|
||||||
@@ -88,6 +89,7 @@ help() {
|
|||||||
echo -e "-k, --check-keys\n\tCheck if your keys are already included in 'ghosties' file."
|
echo -e "-k, --check-keys\n\tCheck if your keys are already included in 'ghosties' file."
|
||||||
echo -e "-y, --insert-keys\n\tInsert session keys to the keystore via JSON RPC."
|
echo -e "-y, --insert-keys\n\tInsert session keys to the keystore via JSON RPC."
|
||||||
echo -e "-r, --release\n\tCompile node with '--release' flag."
|
echo -e "-r, --release\n\tCompile node with '--release' flag."
|
||||||
|
echo -e "-v, --validate\n\tManipulate '--validate' flag in CLI_ARGS."
|
||||||
echo -e "-p, --profile\n\tCompile node with '--profile [PROFILE]' flag."
|
echo -e "-p, --profile\n\tCompile node with '--profile [PROFILE]' flag."
|
||||||
echo -e "-f, --features\n\tCompilation features '--features=\"FEATURE1,FEATURE2\"'"
|
echo -e "-f, --features\n\tCompilation features '--features=\"FEATURE1,FEATURE2\"'"
|
||||||
echo -e "-e, --executable-path\n\tPath to the executable ('/usr/lib/' is default)."
|
echo -e "-e, --executable-path\n\tPath to the executable ('/usr/lib/' is default)."
|
||||||
@@ -107,7 +109,7 @@ echo "| |_| | | | | (_) \__ \ |_ | |\ | (_) | (_| | __/"
|
|||||||
echo " \____|_| |_|\___/|___/\__| |_| \_|\___/ \__,_|\___|"
|
echo " \____|_| |_|\___/|___/\__| |_| \_|\___/ \__,_|\___|"
|
||||||
echo -e "\nCreated by st1nky (stinky@ghostchain.io)"
|
echo -e "\nCreated by st1nky (stinky@ghostchain.io)"
|
||||||
echo -e "Repository: https://git.ghostchain.io/ghostchain/ghost-node"
|
echo -e "Repository: https://git.ghostchain.io/ghostchain/ghost-node"
|
||||||
echo -e "Usage: local-builder.sh [OPTION]\n"
|
echo -e "Usage: starter.sh [OPTION]\n"
|
||||||
|
|
||||||
while [ $# -gt 0 ]; do
|
while [ $# -gt 0 ]; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
@@ -133,6 +135,9 @@ while [ $# -gt 0 ]; do
|
|||||||
RELEASE="--release"
|
RELEASE="--release"
|
||||||
TARGET="release"
|
TARGET="release"
|
||||||
;;
|
;;
|
||||||
|
--validate|-v)
|
||||||
|
VALIDATE=true
|
||||||
|
;;
|
||||||
--profile*|-p*)
|
--profile*|-p*)
|
||||||
if [[ "$1" != *=* ]]; then shift; fi
|
if [[ "$1" != *=* ]]; then shift; fi
|
||||||
RELEASE="--profile=${1#*=}"
|
RELEASE="--profile=${1#*=}"
|
||||||
@@ -263,6 +268,32 @@ if [[ ! -z $RELEASE ]]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ $VALIDATE = true ]]; then
|
||||||
|
cli_args=$(cat /etc/default/ghost)
|
||||||
|
if prompt "[?] turn on validator mode?"; then
|
||||||
|
if [[ $cli_args == *"--validator"* ]]; then
|
||||||
|
echo "[+] '--validator' flag already exists in CLI_ARGS, check /etc/default/ghost"
|
||||||
|
else
|
||||||
|
cli_args="${cli_args%?} --validator\""
|
||||||
|
echo "[+] '--validator' flag inserted to CLI_ARGS, check /etc/default/ghost"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
cli_args=${cli_args// --validator/}
|
||||||
|
echo "[+] '--validator' flag removed"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "[+] trying to store CLI updated arguments to '/etc/default/ghost'"
|
||||||
|
echo "$cli_args" | sudo tee /etc/default/ghost > /dev/null
|
||||||
|
echo "[+] updated CLI arguments stored in '/etc/default/ghost'"
|
||||||
|
|
||||||
|
if prompt "[?] do you want to restart 'ghost-node.service' now?"; then
|
||||||
|
sudo systemctl status ghost-node.service
|
||||||
|
echo "[+] 'ghost-node.service' succefully restarted, new CLI_ARGS applied"
|
||||||
|
else
|
||||||
|
echo "[+] don't forget to restart ghost node service manually"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $MAKE_GLOBAL = true ]]; then
|
if [[ $MAKE_GLOBAL = true ]]; then
|
||||||
cd $PROJECT_FOLDER
|
cd $PROJECT_FOLDER
|
||||||
echo "[+] trying to copy executable to '$EXECUTABLE_PATH'"
|
echo "[+] trying to copy executable to '$EXECUTABLE_PATH'"
|
||||||
@@ -273,51 +304,6 @@ if [[ $MAKE_GLOBAL = true ]]; then
|
|||||||
echo "[+] specification '$SPECIFICATION_NAME.json' copied to '$SPECIFICATION_PATH'"
|
echo "[+] specification '$SPECIFICATION_NAME.json' copied to '$SPECIFICATION_PATH'"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $UNIT_FILE = true ]; then
|
|
||||||
cd $SCRIPT_FOLDER
|
|
||||||
read -p "[?] name for the unit file (default: ghost-node.service) " unit_name
|
|
||||||
if [ -z $unit_name ]; then
|
|
||||||
unit_name="ghost-node"
|
|
||||||
fi
|
|
||||||
unit_name=$(echo "$unit_name" | sed -e "s/.service//g")
|
|
||||||
unit_name="$unit_name.service"
|
|
||||||
|
|
||||||
user_name="ghost"
|
|
||||||
if id $user_name > /dev/null 2>&1; then
|
|
||||||
echo "[+] user ghost found, continue for the user ghost"
|
|
||||||
else
|
|
||||||
echo "[!] user ghost not found"
|
|
||||||
if prompt "[?] do you want to create ghost user? (NOT RECOMMENDED: current $(whoami))"; then
|
|
||||||
sudo useradd --system --create-home $user_name
|
|
||||||
if [ ! -d $BASE_PATH ]; then
|
|
||||||
echo "[+] create folder for the node at '$BASE_PATH'"
|
|
||||||
sudo mkdir $BASE_PATH
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
user_name=$(whoami)
|
|
||||||
fi
|
|
||||||
echo "[+] make $user_name owner of $BASE_PATH"
|
|
||||||
sudo chown -R "$user_name:" $BASE_PATH
|
|
||||||
fi
|
|
||||||
|
|
||||||
cp packaging/template.service /tmp/$unit_name
|
|
||||||
sed -i -e "s/User=ghost/User=$user_name/g" /tmp/$unit_name
|
|
||||||
sed -i -e "s#/ReadWritePaths=/var/lib/ghost#/ReadWritePaths=$BASE_PATH#g" /tmp/$unit_name
|
|
||||||
|
|
||||||
echo "[+] prepare unit file for the $unit_name"
|
|
||||||
sudo cp packaging/template.service /etc/systemd/system/$unit_name
|
|
||||||
echo "[+] reloading systemd because of updated unit file"
|
|
||||||
sudo systemctl daemon-reload
|
|
||||||
|
|
||||||
if prompt "[?] do you want to start the $unit_name?"; then
|
|
||||||
sudo systemctl restart $unit_name
|
|
||||||
fi
|
|
||||||
|
|
||||||
if prompt "[?] do you want to enable the $unit_name?"; then
|
|
||||||
sudo systemctl enable $unit_name
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ $ARGUMENTS = true ]]; then
|
if [[ $ARGUMENTS = true ]]; then
|
||||||
echo "[+] setting-up default CLI arguments"
|
echo "[+] setting-up default CLI arguments"
|
||||||
CLI_ARGS=()
|
CLI_ARGS=()
|
||||||
@@ -351,20 +337,25 @@ if [[ $ARGUMENTS = true ]]; then
|
|||||||
CLI_ARGS+=("--no-prometheus")
|
CLI_ARGS+=("--no-prometheus")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
read -p "[?] list of bootnodes if any: " bootnodes
|
read -p "[?] bootnode if any: " bootnodes
|
||||||
if [ ! -z $bootnodes ]; then
|
if [ ! -z $bootnodes ]; then
|
||||||
CLI_ARGS+=("--bootnodes=$bootnodes")
|
CLI_ARGS+=("--bootnodes=$bootnodes")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
read -p "[?] address that other nodes will use to connect: (default: current ip)" public_addr
|
||||||
|
if [ ! -z $public_addr ]; then
|
||||||
|
CLI_ARGS+=("--public-addr=$public_addr")
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# default for now
|
# default for now
|
||||||
|
CLI_ARGS+=("--telemetry-url='wss://telemetry.ghostchain.io/submit/ 9'")
|
||||||
CLI_ARGS+=("--base-path=$BASE_PATH")
|
CLI_ARGS+=("--base-path=$BASE_PATH")
|
||||||
CLI_ARGS+=("--state-pruning=archive")
|
CLI_ARGS+=("--state-pruning=archive")
|
||||||
CLI_ARGS+=("--blocks-pruning=archive")
|
CLI_ARGS+=("--blocks-pruning=archive")
|
||||||
CLI_ARGS+=("--rpc-methods=auto")
|
CLI_ARGS+=("--rpc-methods=auto")
|
||||||
CLI_ARGS+=("--no-telemetry")
|
|
||||||
CLI_ARGS+=("--no-private-ip")
|
CLI_ARGS+=("--no-private-ip")
|
||||||
CLI_ARGS+=("--no-mdns")
|
CLI_ARGS+=("--no-mdns")
|
||||||
CLI_ARGS+=("--no-hardware-benchmarks")
|
|
||||||
|
|
||||||
echo "[+] trying to save new node arguments"
|
echo "[+] trying to save new node arguments"
|
||||||
echo "GHOST_CLI_ARGS=\"$(IFS=' '; echo "${CLI_ARGS[*]}")\"" > /tmp/ghost
|
echo "GHOST_CLI_ARGS=\"$(IFS=' '; echo "${CLI_ARGS[*]}")\"" > /tmp/ghost
|
||||||
@@ -408,3 +399,51 @@ if [ $CHECK_KEYS = true ]; then
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ $UNIT_FILE = true ]; then
|
||||||
|
cd $SCRIPT_FOLDER
|
||||||
|
read -p "[?] name for the unit file (default: ghost-node.service) " unit_name
|
||||||
|
if [ -z $unit_name ]; then
|
||||||
|
unit_name="ghost-node"
|
||||||
|
fi
|
||||||
|
unit_name=$(echo "$unit_name" | sed -e "s/.service//g")
|
||||||
|
unit_name="$unit_name.service"
|
||||||
|
|
||||||
|
user_name="ghost"
|
||||||
|
if id $user_name > /dev/null 2>&1; then
|
||||||
|
echo "[+] user ghost found, continue for the user ghost"
|
||||||
|
else
|
||||||
|
echo "[!] user ghost not found"
|
||||||
|
if prompt "[?] do you want to create ghost user? (NOT RECOMMENDED: current $(whoami))"; then
|
||||||
|
sudo useradd --system --create-home $user_name
|
||||||
|
else
|
||||||
|
user_name=$(whoami)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d $BASE_PATH ]; then
|
||||||
|
echo "[+] create folder for the node at '$BASE_PATH'"
|
||||||
|
sudo mkdir $BASE_PATH
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$(stat -c "%U %G" $BASE_PATH | grep $user_name)" ]; then
|
||||||
|
echo "[+] make $user_name owner of $BASE_PATH"
|
||||||
|
sudo chown -R "$user_name:" $BASE_PATH
|
||||||
|
fi
|
||||||
|
|
||||||
|
cp packaging/template.service /tmp/$unit_name
|
||||||
|
sed -i -e "s/User=ghost/User=$user_name/g" /tmp/$unit_name
|
||||||
|
sed -i -e "s#/ReadWritePaths=/var/lib/ghost#/ReadWritePaths=$BASE_PATH#g" /tmp/$unit_name
|
||||||
|
|
||||||
|
echo "[+] prepare unit file for the $unit_name"
|
||||||
|
sudo cp packaging/template.service /etc/systemd/system/$unit_name
|
||||||
|
echo "[+] reloading systemd because of updated unit file"
|
||||||
|
sudo systemctl daemon-reload
|
||||||
|
|
||||||
|
if prompt "[?] do you want to start the $unit_name?"; then
|
||||||
|
sudo systemctl restart $unit_name
|
||||||
|
fi
|
||||||
|
|
||||||
|
if prompt "[?] do you want to enable the $unit_name?"; then
|
||||||
|
sudo systemctl enable $unit_name
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|||||||
0
service/Cargo.toml
Executable file → Normal file
444
service/chain-specs/casper-tmp.json
Normal file
117
service/ghosties
@@ -1,12 +1,13 @@
|
|||||||
|
|
||||||
### TEMPLATE ###
|
### TEMPLATE ###
|
||||||
Local identity : ./PATH_TO_GHOST/ghost key inspect-node-key --bin --file PATH_TO_NODE_KEY
|
Local identity : ./PATH_TO_GHOST/ghost key inspect-node-key --bin --file PATH_TO_NODE_KEY
|
||||||
Public key (hex) wallet : ./PATH_TO_GHOST/ghost key inspect $(cat PATH_TO_WALLET_KEY)
|
Public key (hex) wallet : ./PATH_TO_GHOST/ghost key inspect $(cat PATH_TO_WALLET_KEY)
|
||||||
==================================================================================================================
|
==================================================================================================================
|
||||||
Public key (hex) stash : ./PATH_TO_GHOST/ghost key inspect --scheme=sr25519 $(cat PATH_TO_STASH_KEY)
|
Public key (hex) for stash : ./PATH_TO_GHOST/ghost key inspect --scheme=sr25519 $(cat PATH_TO_STASH_KEY)
|
||||||
Public key (hex) audi : ./PATH_TO_GHOST/ghost key inspect --scheme=sr25519 "$(cat PATH_TO_SESSION_KEY)//audi"
|
Public key (hex) for audi : ./PATH_TO_GHOST/ghost key inspect --scheme=sr25519 "$(cat PATH_TO_SESSION_KEY)//audi"
|
||||||
Public key (hex) babe : ./PATH_TO_GHOST/ghost key inspect --scheme=sr25519 "$(cat PATH_TO_SESSION_KEY)//babe"
|
Public key (hex) for babe : ./PATH_TO_GHOST/ghost key inspect --scheme=sr25519 "$(cat PATH_TO_SESSION_KEY)//babe"
|
||||||
Public key (hex) slow : ./PATH_TO_GHOST/ghost key inspect --scheme=sr25519 "$(cat PATH_TO_SESSION_KEY)//slow"
|
Public key (hex) for slow : ./PATH_TO_GHOST/ghost key inspect --scheme=sr25519 "$(cat PATH_TO_SESSION_KEY)//slow"
|
||||||
Public key (hex) gran : ./PATH_TO_GHOST/ghost key inspect --scheme=ed25519 "$(cat PATH_TO_SESSION_KEY)//gran"
|
Public key (hex) for gran : ./PATH_TO_GHOST/ghost key inspect --scheme=ed25519 "$(cat PATH_TO_SESSION_KEY)//gran"
|
||||||
|
|
||||||
### str3tch aka Pierre ###
|
### str3tch aka Pierre ###
|
||||||
Local identity : 12D3KooWFMiBom4mrJ57CaJZBxKWD1eDLYUyWLZzcjTaQW5crcNQ
|
Local identity : 12D3KooWFMiBom4mrJ57CaJZBxKWD1eDLYUyWLZzcjTaQW5crcNQ
|
||||||
@@ -38,12 +39,102 @@ Public key (hex) for babe : 0xe0f0a776ecc9fa5e1f22e2fa001fe3fba5aea52b9444bc894
|
|||||||
Public key (hex) for slow : 0x0e6fa6934f9e99fa84874f2ed9318825a0d5443a0ced984acfbd24ece72ba55e
|
Public key (hex) for slow : 0x0e6fa6934f9e99fa84874f2ed9318825a0d5443a0ced984acfbd24ece72ba55e
|
||||||
Public key (hex) for gran : 0xb63c5a0cf342b9b04931bc8ed74d7d0165ab99ab5f8a4514797d4b299a4501fe
|
Public key (hex) for gran : 0xb63c5a0cf342b9b04931bc8ed74d7d0165ab99ab5f8a4514797d4b299a4501fe
|
||||||
|
|
||||||
### My Submission for Genesis Code - youaresparta ###
|
### Neptune 2 ###
|
||||||
Local identity : 12D3KooWSHS1YCJvxck3Dcpk92ZiEW5ZrhTDrGQMHhjEErTxCxzZ
|
Local identity : 12D3KooWPQXpz8UM9uBsB7pcv12pLCLbYdk8W3SHrZBgiju2fbAs
|
||||||
Public key (hex) wallet : 0xea1c01ff56725c6fdd62efaa119b704a2f467fd21d20a3c2117668bfeba02e76
|
Public key (hex) wallet : 0x425ccd7bda4f5c76788ba23bc0381d7a2e496179c93301208c57501c80a4232a
|
||||||
===============================================================================================
|
===============================================================================================
|
||||||
Public key (hex) for stash : 0x909ab2271d3fc8df9e8556232a29eea7cf1cfdf8c89603a602779daa6484f011
|
Public key (hex) for stash : 0x6c0283f4c688f0e75ad546c790bbd5961c1a6931543aa589f368f8272c44b758
|
||||||
Public key (hex) for audi : 0x0eef8f5d5d3bf5b5986bdd76ee6feba013171ab6c76bd38b3aa556e7fad4ea6c
|
Public key (hex) for audi : 0x00946618c353e4c6546b87f9ca1089b846b0ea4658ee8e6d9d1200c24cb5ee27
|
||||||
Public key (hex) for babe : 0x00623f9d2ca673af3ec6d5c0077a7314c0fa92ec5fa853015b189daa12a2e02a
|
Public key (hex) for babe : 0x74fa7381a7a74b316afb6793a00387eed9d95d46a69866cbb316b5d9c918af0e
|
||||||
Public key (hex) for slow : 0x9ef7278866ed6015bd3055e3ef2cc77c62e796667f250a42d832846534a16743
|
Public key (hex) for slow : 0x520e74f8c5853ec8577932327ad3247656db25b74c79ad09adb431b271002401
|
||||||
Public key (hex) for gran : 0x47acf609aefff57c8b3680d862df19f11a9d5970e0e9be3606781f430790e94c
|
Public key (hex) for gran : 0x236d2fa03f4ed8cb65de7e514d7540159b328f1c170dd402b094ad7fbf547218
|
||||||
|
|
||||||
|
### Doctor K ###
|
||||||
|
Local identity : 12D3KooWP3h5dSdqcpvsCr7fp1jyfqDj291QDZ68a4gY6VQ8T1nW
|
||||||
|
Public key (hex) wallet : 0x927a98dcf8f721103005f168476c24b91d7d10d580f457006a908e10e62c7729
|
||||||
|
===============================================================================================
|
||||||
|
Public key (hex) for stash : 0xb24feb55b2cac4b365a9245c2a97525b01bd1a594d2d42b91f6bc38c9c2e6517
|
||||||
|
Public key (hex) for audi : 0xa8e828d10cf7b74481b6e746e5532d4740ea8014a0d3d856540a59847f8a6b76
|
||||||
|
Public key (hex) for babe : 0x3c944c704cae203619b9e7a5a4b6742736da6a8e76c762291bebdc7652cfec2f
|
||||||
|
Public key (hex) for slow : 0x2645f1f6820dd3a917eebbdab033088d8862477c1c14759b218685f9a0893377
|
||||||
|
Public key (hex) for gran : 0x0aa3a88f6b777c95c3dfe7e997b76798413f16aa325f34824cae0c9102b281d5
|
||||||
|
|
||||||
|
### starman ###
|
||||||
|
Local identity : 12D3KooWMikWyNweALKadEN8KMEhLs5JnNqCBecydAtP8d5UzVgs
|
||||||
|
Public key (hex) wallet : 0xac9e227e30a63ce6eeb55cfbb1fb832aa7e1d3fad2bcb3f663de4a91d744fd50
|
||||||
|
===============================================================================================
|
||||||
|
Public key (hex) for stash : 0x44376f8fa786be1f16fcb45232cfb07300cea845b2fc6e30dde61952de3e5e33
|
||||||
|
Public key (hex) for audi : 0x3271915dc67eba8ad2759a30c2537702f4fbf45647cba565e3a464ab75b91f05
|
||||||
|
Public key (hex) for babe : 0xec981eb1ef1ddbc8ded2db16198cb03667b4b39a8ea58f28ad469ddfaf256161
|
||||||
|
Public key (hex) for slow : 0x6e9426dc78fba9eeb264dcab98be86daf3d8cf510ecfb2acddec370295ff8176
|
||||||
|
Public key (hex) for gran : 0x15b9a867891cf449584b108e512d60b945b1a065bec1703c4c5709ee5093c03d
|
||||||
|
|
||||||
|
### Kitsune1 ###
|
||||||
|
Local identity : 12D3KooWR5JJQ9mALPpnSxfZm5M23AByitSfxpei9ZDghU1NLNeW
|
||||||
|
Public key (hex) wallet : 0x46c78fcacffd80abc9cca4917ef8369a37e21a1691ca11e7a3b53f80be745313
|
||||||
|
===============================================================================================
|
||||||
|
Public key (hex) for stash : 0x4a5596e97c602e7846d54fae81dcdc5a553b7422231e32f9567ac30a6b7c743a
|
||||||
|
Public key (hex) for audi : 0x241bfc05caa2d3e53e671df7261599c13f069a37f6cc4be10b5d49502c3a1e1c
|
||||||
|
Public key (hex) for babe : 0xceb63298b1b7a1277fddf6eee735dbbf9921fd5ebaac0132eee1963e22cf5935
|
||||||
|
Public key (hex) for slow : 0x7ce0c80ee65fb00e229d8c8fa5484144eca3d45d733165fbffcdb4de24c14951
|
||||||
|
Public key (hex) for gran : 0x95f73a6271b517f2016fa91411bdeeb990158066c95f106a79697446ba9f78b4
|
||||||
|
|
||||||
|
### ajruecker (scientio) ###
|
||||||
|
Local identity : 12D3KooWEiC9wp3rHF8JcDiadqtwdWvtUXLBbZhKuao1SwPy2m52
|
||||||
|
Public key (hex) wallet : 0xfa5e5a295ec74c3dda81118d9240db1552b28f831838465ae0712e97e78a6728
|
||||||
|
===============================================================================================
|
||||||
|
Public key (hex) for stash : 0x2021a16182e3af39a79d20021a1b8755d589c04292d361d6b387411f7e975602
|
||||||
|
Public key (hex) for audi : 0x9eb1063afcaf568e7a62458ef33237a41ca500c89e084f7a5dd75bf5d89b105a
|
||||||
|
Public key (hex) for babe : 0x64e9968f3af2e1a86ee8d4be9ad77a1d66f50138527988bf93ede25baaf2e671
|
||||||
|
Public key (hex) for slow : 0x2e77fde21162d1f21ca371846d70c3b75931329074101ee668e614336d25c120
|
||||||
|
Public key (hex) for gran : 0x45e28f333bf0d4a9956ae20341cd07db8d471c4b482ed15d5cf7edd70201670d
|
||||||
|
|
||||||
|
### Kitsune_2 ###
|
||||||
|
Local identity : 12D3KooWDs4i6VoK4dpwGSUVtZENzSmsbQk3tF63gYT745x7eAb2
|
||||||
|
Public key (hex) wallet : 0x4078ddb1ba1388f768fe6aa40ba9124a72692ecbcc83dc088fa86c735e4dc128
|
||||||
|
===============================================================================================
|
||||||
|
Public key (hex) for stash : 0xb624cb291f7464773f3b449ee2252165f3934ace08b1e10611a53e174766fc73
|
||||||
|
Public key (hex) for audi : 0xc2403683be24a92ae8489e28fb502e2bab16d815c4f6c865c50ffb34430a8d7c
|
||||||
|
Public key (hex) for babe : 0xca72b6ea2c83f9e429479bf51c324ea90cbf01e08d2850ced2590c8796cfe222
|
||||||
|
Public key (hex) for slow : 0xeabb3463e300f357b9886683d5a240a395f6bd41182057f03b0e9697a8b3465e
|
||||||
|
Public key (hex) for gran : 0x4ec8584ca9da16d8c60e1770e98fbca8bec648e13c69601e3dfdc1330bf1f999
|
||||||
|
|
||||||
|
### Proxmio ###
|
||||||
|
Local identity : 12D3KooWHZDmyvNFF31PCVVrwDSmUPyC7kgvfpC6wTTDevFcX4dH
|
||||||
|
Public key (hex) wallet : 0x5e1456904c40192cd3a18183df7dffea90d97739830a902cabb702ecdae4f649
|
||||||
|
===============================================================================================
|
||||||
|
Public key (hex) for stash : 0xda6875e9df9a7894e065ef5befcde567dec4dc2c0b73a6ad5514dcca26a90702
|
||||||
|
Public key (hex) for audi : 0x1496150847d512e0491899eba72ee36f76b882ae29fccf18201fd9fbd5bfd300
|
||||||
|
Public key (hex) for babe : 0x8006e3f6e3d92c4c5f2e2f001452e4993e6d5c2b1136f2ae6060c6e9c9523b4a
|
||||||
|
Public key (hex) for slow : 0xaaa41b6ade4c30b5792aa6e5604c444e424900ddf649b23eed4bd0d7f5d3a34f
|
||||||
|
Public key (hex) for gran : 0x86ee138c9e7e67c1c2e157c0ba888761a122d8b9aa6a8653e886ac329e34255d
|
||||||
|
|
||||||
|
### Osiris-3 ###
|
||||||
|
Local identity : 12D3KooWSDL7dwYgExExi7vuxzMJFyLrsyx4oLJCejv9Q2gste93
|
||||||
|
Public key (hex) wallet : 0x64f685baa838323c0ef8c45259a3036b3e2bc54edf6553ce323e25b5e37a3721
|
||||||
|
===============================================================================================
|
||||||
|
Public key (hex) for stash : 0x40eef1c6c8d8242ccbd3f03144bd4ea1a7374cbd8219e2849d3a3ee78f1da045
|
||||||
|
Public key (hex) for audi : 0x8c3e730f6e6ecfb96581091e71556175384f077bee31b0199f13321df018427d
|
||||||
|
Public key (hex) for babe : 0x3a145fb664353e473f1937058c881b14ed150285f3cec1aff348c5209d56d96d
|
||||||
|
Public key (hex) for slow : 0xceb294227950d177b63e6c1d10a66131f5da3792428b03f5b83be84a33db215f
|
||||||
|
Public key (hex) for gran : 0x0c0891a518270014530061bd217606269686abdf3c1d237a3c6a3db308fc2d0d
|
||||||
|
|
||||||
|
### Ogenkido ###
|
||||||
|
Local identity : 12D3KooW9zt8De3STX4TC8mALfDn8oJw1Qw6dBhRwu2aTabroBBr
|
||||||
|
Public key (hex) wallet : 0xa0a87a75dba18037aa2e7b8036ce951e8d8356104758e15c9f44e2fd7d1bbc41
|
||||||
|
===============================================================================================
|
||||||
|
Public key (hex) for stash : 0x422e16b0c58f03af378d1638fe56127f337abf1d1a4a740c3371714616abd43d
|
||||||
|
Public key (hex) for audi : 0x52fe2b63b03a0d439923967278442418a2d1f0d250bcab26f85f12ea212cbd3e
|
||||||
|
Public key (hex) for babe : 0x78f612068566eb6cc5cb5d9f1fda92c5dc3e3888eb61eb1af27af6855365ba3c
|
||||||
|
Public key (hex) for slow : 0x027dd852bf20bef53545afd1e08bf8760abb6b1af1df6c17e73f4cf88210ee46
|
||||||
|
Public key (hex) for gran : 0xdba3613933d60ca248ee024deac42bc9c8c2d9fe8734b6052cd9a148978cbedb
|
||||||
|
|
||||||
|
### Youconnect ###
|
||||||
|
Local identity : 12D3KooWJXBYA7cUQLLenEfT7hmCjBJ6fyikDy8YhNz4aLfwbBC8
|
||||||
|
Public key (hex) wallet : 0x6e4429a8fa85cfe2a60488af446d57e719207831b2579b937325645e110bb666
|
||||||
|
===============================================================================================
|
||||||
|
Public key (hex) for stash : 0x3a6626211a2dd35683fd7cb5f2f343d75f2b698d6c48c2d6eb1cdbe116e32315
|
||||||
|
Public key (hex) for audi : 0x86676ad3cd2d970b86dee2f25d4318f9bba40455111f16300e114e7f00c58706
|
||||||
|
Public key (hex) for babe : 0x6c0aec49974aaff08ff962a2d8d7857227d027ed27a272cbc4acaa1ee937db0f
|
||||||
|
Public key (hex) for slow : 0x009712519ba7dad1c682c871b94573ccaba8b7d530f7194fb16bf553fd7ae67d
|
||||||
|
Public key (hex) for gran : 0x935becdfb2e0d4fcd46ba82e680cfc447180de6b85ec42d17f1396a520b0c04f
|
||||||
|
|||||||
320
service/src/chain_spec.rs
Executable file → Normal file
@@ -13,7 +13,7 @@ use pallet_staking::Forcing;
|
|||||||
#[cfg(feature = "casper-native")]
|
#[cfg(feature = "casper-native")]
|
||||||
use casper_runtime as casper;
|
use casper_runtime as casper;
|
||||||
#[cfg(feature = "casper-native")]
|
#[cfg(feature = "casper-native")]
|
||||||
use casper_runtime_constants::currency::CSPR;
|
use casper_runtime_constants::currency::{CSPR, STRH};
|
||||||
use sc_chain_spec::ChainSpecExtension;
|
use sc_chain_spec::ChainSpecExtension;
|
||||||
#[cfg(feature = "casper-native")]
|
#[cfg(feature = "casper-native")]
|
||||||
use sc_chain_spec::ChainType;
|
use sc_chain_spec::ChainType;
|
||||||
@@ -288,6 +288,148 @@ fn casper_staging_config_genesis() -> serde_json::Value {
|
|||||||
use hex_literal::hex;
|
use hex_literal::hex;
|
||||||
use sp_core::crypto::UncheckedInto;
|
use sp_core::crypto::UncheckedInto;
|
||||||
|
|
||||||
|
// Endowments for the whales from previous testnet.
|
||||||
|
let whales_endowments = [
|
||||||
|
// sfHXFVNvLVp8uSZauMyMijqXfoods8kkkik2MKnmr5MTdsweh
|
||||||
|
(hex!["a8ab31b36aae0dc29d2b92714cee75ee2784037c6f150d759d9aa757ab5a4666"].into(), 25 * CSPR),
|
||||||
|
// sfEtW9ijdwbU17oderTmwseMV84c7c9Xi1JW7T94rBbYKMMZq
|
||||||
|
(hex!["342c0035531136ff50d8488eb4d4772dfd10e565f6a5d28c7298b354d33f2dfe"].into(), 14 * CSPR),
|
||||||
|
// sfJtE2J5yVQBHdzwmXhzTwQZLtS853MFkUVYv5AfnB7TEVp2E
|
||||||
|
(hex!["e4e6a493d23633bf72b16ead89ab1451611b08311a9a49cc874a92e6ac4f5b1d"].into(), 31 * CSPR),
|
||||||
|
// sfFf48EnVLjD4wMecZh7meP5RWwYXZr54QiW2xQyPKPjxsxNo
|
||||||
|
(hex!["56266f27a02869f9498a113cbd4d1507ae5f4b8c91a6b8ccecda3331c21fd67f"].into(), 6 * CSPR),
|
||||||
|
// sfHxHVmMKZfUUzXRzKrV3oXSSynG1uAJ7c6dhFSq4CwE8qLn3
|
||||||
|
(hex!["bbc31594a2338e91c248aba474d892f41811a072c7e7c692fcae07fdb398b89f"].into(), 3 * CSPR),
|
||||||
|
// sfGvSkgfv99AndiEuhmL6t49ekbb2og2aYVRisAeNMPHueACW
|
||||||
|
(hex!["8e1f85cc6bb89182bc473859287b82fc2b9c89f461431090c2246a1a8d92d911"].into(), 14 * CSPR),
|
||||||
|
// sfHfByscdWfjzQNXc5g2q2ScMhop5pr5TiqiZosKxtMit1bRy
|
||||||
|
(hex!["aeb95893ab118bf02f5cd80ebab71ba58490c645e4302773fdc90b659f5c5e22"].into(), 11 * CSPR),
|
||||||
|
// sfGh1jtdTwWEco2N6cymxKgaoAJwYFMj2K2tdEbuML5LjUprc
|
||||||
|
(hex!["83e120fa3994efedc51092a8d90882803997f39f552a37699e3acb06c1f8158d"].into(), 28 * CSPR),
|
||||||
|
// sfJHvJDgdKdo1ZFXB146jhKVgngDrDeKTKF3GV5Eyvg1tJqTq
|
||||||
|
(hex!["cabca1450cbdc5769fa8f7b80d5bfd00df35b65613d8694e02517c9415fc5462"].into(), 12 * CSPR),
|
||||||
|
// sfE4SvLvh66FSThDnrTx5Qf5vHNCmBkrAJy8Zt8pMPN8h6dzw
|
||||||
|
(hex!["0f85589e37f3c0859ba7c055dec527a63796d6285b73cf8bd4657da052ff893c"].into(), 2 * CSPR),
|
||||||
|
// sfHJF1dYfzCpjJ8QHRBexNMfvSfsJvE75eCzgosrB6PwFXmpz
|
||||||
|
(hex!["9ebf64b6bc73baf1428da1cfcf36fde9695be0a56a855ddabb5612a70b10e447"].into(), 6 * CSPR),
|
||||||
|
// sfEEixqLWYct7au1PWkQAKbyso5VQhrgXQ2RXVW5TjcBm3vZ6
|
||||||
|
(hex!["175bce3674e24ec942112d91df594ba551b329ae7183b0faaef79fa051a85948"].into(), 21 * CSPR),
|
||||||
|
// sfH5nCFu2wNXnfD1Fic1weyLHncxHb7qpa8yXXQuNbQRUm9HH
|
||||||
|
(hex!["953e2cdbf7a66e34c50c51d199ad8970b1b2233da5604eb79a1de8d277c03061"].into(), 10 * CSPR),
|
||||||
|
// sfJnVLd4PMfoABtQiPmifeqkpQQKoV4wbXyAzhXKdSDHfi1bY
|
||||||
|
(hex!["e086ba892126243d6ef1c2b9132790e4455a3b1271baac8033306d55c8473af4"].into(), 30 * CSPR),
|
||||||
|
// sfECamJamifU5XyHH27ekuWY3MHAwj1z3rDcV2rpWdeGdAe2Y
|
||||||
|
(hex!["15b9b710a589968804e6e00f2ccb576ded431627a733b7f9fa0845f59e73f5cc"].into(), 31 * CSPR),
|
||||||
|
// sfEAhZrKxxChBR5SHQML6gNDJCK2FTMnRZZ2s2KVCFRxqFFTG
|
||||||
|
(hex!["144a1fa97fdba679efd2a36696a0d40f585b649143bb7da5cbd7458ea4a0f674"].into(), 2 * CSPR),
|
||||||
|
// sfDrDchmoxEfzyyPFWGX2fekP4mic99D6inhPnRvwokRZCbv5
|
||||||
|
(hex!["06319d9539108995233c48032bda04d50115fe829a2c4b5b23e54a4d17188606"].into(), 14 * CSPR),
|
||||||
|
// sfEb6NRc4ZbcuWUGJAnBkvEoacoXLbHZSM1asLpHiXqeY6YkE
|
||||||
|
(hex!["26e4c66dab5d9df3cb196ce320314e2565489f7d56b9868299a68cc4a1b4c917"].into(), 24 * CSPR),
|
||||||
|
// sfHfQMwpzNaA3D1uRGrzNPwZDeFbdXQDBJMay1oFDmD7C2RLn
|
||||||
|
(hex!["aee305cf2e015ef860c96815bb34ff9ac7df36db95f0587b6ded75218ae0d526"].into(), 22 * CSPR),
|
||||||
|
// sfKPnkuxV9u7AEk6bqU4i83NpAeG5w6VjcXYER5yfoojkkcN4
|
||||||
|
(hex!["fb72f46bd61ce821d12f5bdd6dc587afe5ae5821632b7e4b09464ea9e04111e3"].into(), 4 * CSPR),
|
||||||
|
// sfJGyU6k2gPVhmQJvgtY3iaVsakKQuD56jdgKZTGRLwjkHcbQ
|
||||||
|
(hex!["ca040e9167e0e7675ea2163506706cb7883a601a9ece1ba702fd253446f69e5d"].into(), 19 * CSPR),
|
||||||
|
// sfF8tAs7Z9R3GU8AnWgHEubxbwGt4zk7V6gSBeJJSqvt1xs8e
|
||||||
|
(hex!["3f238fbe70fdf9df12ed42416be91fa556802e7be7ea43c4de33314f5fb2da53"].into(), 22 * CSPR),
|
||||||
|
// sfHtQ3XxjAc3fbr4rxnx5P5ejV7LPXnN8nXwxevJ5MZwPJFCa
|
||||||
|
(hex!["b8cc24f449bd14c9903431b710842e1398a83d2ced33c5ea8fa4b75461db2f1f"].into(), 28 * CSPR),
|
||||||
|
// sfG5KDhmeKs6jXC2Jt1otffwHQyLR58dMGHwJCizUJHr4a7pU
|
||||||
|
(hex!["68a722b719350846a1f5a83143e01fdf18422d0d3d489877510062498ba74e5b"].into(), 17 * CSPR),
|
||||||
|
// sfH28MB4HFrE8YmtAcj95oTyMsQ9GgYWqxVtisWPqV5SwSMVS
|
||||||
|
(hex!["9275098141352f7e4fb3a4be9b2e50269947b7f54ecf2a493454955dd327274a"].into(), 28 * CSPR),
|
||||||
|
// sfEBNrjumQ8GLJTxeu3HvUDqHki3UxHCoSzg1x8SDJkfWfhWc
|
||||||
|
(hex!["14ce63bf285ad88594a93af2f1b8fd822c4db73030ae0783836083201876cb71"].into(), 14 * CSPR),
|
||||||
|
// sfFMYowKRoik3N9tYoSaPZ4vGPaPrDaezXiTVGZUBGWEwSKWQ
|
||||||
|
(hex!["48cc93d26f56df01cbd642e2d6eca745a9e2b84616e7f3b405411963c9aefa2f"].into(), 11 * CSPR),
|
||||||
|
// sfHPg4uVcq3s3TnfqHcsT6nEmeKJuNiJCW2eHk8Uk5aRfS7jr
|
||||||
|
(hex!["a2e3f7cfc7d8b7992a17b7aa8a85b47f1e0d254f3f0b760764f79af5a8349b33"].into(), 22 * CSPR),
|
||||||
|
// sfFo97CYcVqhjeiQiu6umcDggkNRWNjNu3XA6pU67F2C4Zs7g
|
||||||
|
(hex!["5c512b2cdb7da57ac056d6573ae3d1ae027bcec1b3b3d4dd79dc50160b24101b"].into(), 3 * CSPR),
|
||||||
|
// sfGxyWHjTMDVfmScYXjRFwXuVLyPj6XB8nzVjeZTLZ8RQkXQU
|
||||||
|
(hex!["900d88832e0748670c2358f2238bd34aaf49e070aa41aba84d931a0d1fef0978"].into(), 15 * CSPR),
|
||||||
|
// sfJHHLnAf9kbZz1PL4ESDpEMuAw7GXfFigC9wJD7ZArqRPwVG
|
||||||
|
(hex!["ca4039b68f9924c12399808da77247f2f45b0a9e397de94a33104c610cd8287f"].into(), 1 * CSPR),
|
||||||
|
// sfHqoR2AnJgWckgFY4HE2p5SK5gf6mUZGCXV5S3Ck7mnpTWps
|
||||||
|
(hex!["b6d11481813a6968a1d056794e6f0b85408480c5e8a6056769fbec9b5424314d"].into(), 18 * CSPR),
|
||||||
|
// sfJCVDhbVQzg7Y9JTm9mYiowUg2SuGQLLKGPwtstLVgtrcnmu
|
||||||
|
(hex!["c697fbb0ecf8069a0f88292d0a2097ba24b8c6998d04d21a02d92f6a23a65b43"].into(), 11 * CSPR),
|
||||||
|
// sfFFc7sBndJG1sZpxXfzti9K4Z7cNNfW8EQtEzsX9B1BWXoBv
|
||||||
|
(hex!["44443e9670b7f6decd4da7b042b6c9f740bd6b82e564fd51c1453fa442f0192f"].into(), 15 * CSPR),
|
||||||
|
// sfJbxCLF7tdMQRqzVgTiGyJQ2V2tEJXeC9pmeZqRaH3kNqYFA
|
||||||
|
(hex!["d87d702b99b8b3d58d8a48e5d750f40338b3a3d43fab09c23c50036226ba5325"].into(), 28 * CSPR),
|
||||||
|
// sfDrr9Vh9k3hC8JnpN4BG15z5yJPfMhHuPwFsZrd3S62b5U2Y
|
||||||
|
(hex!["06ac96e99519ae0a38f2475edfda3e432d3ae8d1f889a82e9ded1f1ccc850505"].into(), 15 * CSPR),
|
||||||
|
// sfJq7W4AboVKNgeG33y2oCE5o6h3eJaG6cyoKwtqjTkjSZXs4
|
||||||
|
(hex!["e286f428cd368ae7249d4ea76ad17df9350b0dcb437eadbf60053177769fbc5a"].into(), 14 * CSPR),
|
||||||
|
// sfG8ERVrJaoaJZdxT8tt9ZBRH4y1q9RHkyW1juiQBFjfqNm5s
|
||||||
|
(hex!["6ae0b990e482c499d93382e6183c0d2f3e8228e603de7c154ffb93e2299f152a"].into(), 14 * CSPR),
|
||||||
|
// sfG7q2arcyPyzNWrEZRoFvrf6go5PuhwofYVcthR3Mpu8dHgz
|
||||||
|
(hex!["6a91f855ff00e83c9b03cc222291cd6d098be0318eb60b88e6c167ce9e513a50"].into(), 11 * CSPR),
|
||||||
|
// sfFoee91wxv2u9LRFxCv9pzpM9L9YWGX2CPZveLFWbntrq6zd
|
||||||
|
(hex!["5cb4964925c2061492b88ff8daea2804b5770c044946c4ff0ac5a170eab1422c"].into(), 26 * CSPR),
|
||||||
|
// sfGkHJcQDaqeagPGrpaNFKR1kdRShUZH4Ec8iYMj6kyH8M2Tg
|
||||||
|
(hex!["865f4233b54d0903f5fdad05b0ec715b0ad9613fc69df18df4a013d3c7d3ab73"].into(), 2 * CSPR),
|
||||||
|
// sfFXJNrot6ou3UAmcynzSrD1RZnZzyhKM4gdMPfuDLUhCPyDs
|
||||||
|
(hex!["503c72a0f2c549a62d876dea81aa2e597b88503fa639ab0e9b65db599785f61d"].into(), 26 * CSPR),
|
||||||
|
// sfJyW71FYeFRb3YSQSVJAEp3CjPpNcUmzkw7riKMSkCiBEAs6
|
||||||
|
(hex!["e8ed0109c607d78aec9d8aa3575a565e34d65b399a5bd0e0102032d807ea0975"].into(), 5 * CSPR),
|
||||||
|
// sfKCXSvdcMTWyJDXDdZ2QP88ZsHDiwnGPfDVRPetf6KQfDAKY
|
||||||
|
(hex!["f2dbb77f0f922e5e92d98de7d43612d2f0b0d503aff20607d6c771fe8ee4a623"].into(), 31 * CSPR),
|
||||||
|
// sfJjXxYZNuXNirgQFE4MxuJ1w2ekxXHvXtowqUqEN52BNRryW
|
||||||
|
(hex!["de45cf59f588af5ee252c0ee0c805be8fa1ce172f8a6187d3b63dce1dc9c0b60"].into(), 8 * CSPR),
|
||||||
|
// sfGZf5wgfaLUq3h3JwHgZ52Fg2P27JYn2tSCgjosp4gL2Mdpx
|
||||||
|
(hex!["7e44e1ede822621cc9f618480433fe002bb8edde02d2fcd4fcf406409e154e68"].into(), 28 * CSPR),
|
||||||
|
// sfETREDdpH8vyT6zHEfcF5qdJhNw8iJVFeSfspKHv2BeUGQg5
|
||||||
|
(hex!["210a4b979e39c3136be105df1974fc036f4fe9b035936c149bdb94a3f4820487"].into(), 6 * CSPR),
|
||||||
|
// sfHA9NkB5Bb5hgt1f58jf1UminCdrmyu94VGoKB3jo9YRoPjW
|
||||||
|
(hex!["98927535310e1b910ca19860e1539a15c5dc02df780a66a22f5796cec3768812"].into(), 12 * CSPR),
|
||||||
|
// sfJeYC8LPe41yBP8WptgSzkYgfM39y3derRV4YeYXkpEysT7b
|
||||||
|
(hex!["da765f0ad9bedffdc9aa88da6fdacf4afa4463395785b6e03acb0811395a8f5d"].into(), 20 * CSPR),
|
||||||
|
// sfEu7ZzgjwEuhS1EkebXfkvH3wMyxpSgcvH8btDi6EMqG4goQ
|
||||||
|
(hex!["34a33af049f4f1b65d518e51f38c7afb0cd973c649588808b2ba0211f4ada535"].into(), 5 * CSPR),
|
||||||
|
// sfHZx1bZK6aoJKfQ1XQfpRD5VZBXZM1uREGcBsnKJdTZDnDod
|
||||||
|
(hex!["aaba173e1cd257c1ba67afbed0fbf2c4aadbfac329f129f12c4941b8b6bc5865"].into(), 5 * CSPR),
|
||||||
|
// sfJHhyq2r19nHEbKbVn3NEWqkDWnK53rU9mpRVPEYh7dqkCwU
|
||||||
|
(hex!["ca932abf1648393d722ad23c2cd97515a436840d905d3dd2b4d1913989abbc12"].into(), 2 * CSPR),
|
||||||
|
// sfE8Hv37BNfZfdj6aKC8XuBPQRG6eLRJPuRqEmrCfPGF4F7Ag
|
||||||
|
(hex!["1274036453f19a410d99cd7a13235422062ff5b0d2dbd608d87ad33b9b7b544c"].into(), 17 * CSPR),
|
||||||
|
// sfJHHALMCEmBTJHEdHkgMbUt2XMFP4K2AcYPiwgtz429YUqWv
|
||||||
|
(hex!["ca3f9e8480f200b6afe9661cb96a30259fc88b947c3ab466bd2b8e902a859719"].into(), 2 * CSPR),
|
||||||
|
// sfKTaDy3Yw6eXz4GFfXLRx9LnDf8qEt4JpqnPJc8bQVAu6kET
|
||||||
|
(hex!["fe55bea13108c5f9e070689c96d63c40ca79db709bebe921289003e56a1fdf27"].into(), 3 * CSPR),
|
||||||
|
// sfJ4NLMc92S6gSvQLsxUvhh4zXwde1yHYJCBu2WFjwL1Hxgfh
|
||||||
|
(hex!["c066d79465a7bd3138c770f52c1ad160272705e98f9b3dacc22bc70f010a1564"].into(), 12 * CSPR),
|
||||||
|
// sfJcMpW8ESzTzpmftos8MoJ7pUyRbxPabxPHSuigfxQxy8GBR
|
||||||
|
(hex!["d8ccf65eb5e93fdf7af47e9c6962a6822c7f0e8ed14d84f2bebdae0c5623e62b"].into(), 16 * CSPR),
|
||||||
|
// sfESZE2fNkkRCR2bSmmKZ5VzmMGHFh8eUdE2isdjne7JGW9AU
|
||||||
|
(hex!["2061f823e814d8c6b524da2f26ba2bfa048bbce57a1186e560b84c47a162b927"].into(), 1 * CSPR),
|
||||||
|
// sfFSxdDQWSnuF2zJ3tRv3B9Xxzu8boEkByCSXkq1T1F6vRky5
|
||||||
|
(hex!["4cecf92b37e6954f086002cf7b6a61ac7d9ba40c83ef963005e3cacfb5c1e13f"].into(), 21 * CSPR),
|
||||||
|
// sfEivpTTfp6Xh7nHaco1sxXQiy163pT474cS2dj8d8MREaJ2x
|
||||||
|
(hex!["2cde961358bf934533495f186755eb538a925aaa19ab4bad097f9d23665a9553"].into(), 24 * CSPR),
|
||||||
|
// sfJHPU8JPeCg35QvgTwZ2iFAwiavxem4McAYtgvTKpePSnUrw
|
||||||
|
(hex!["ca54d983c77c48c948fa9a6f9261ce2d9c4f20abf6632e28da3ec41d4752d519"].into(), 8 * CSPR),
|
||||||
|
// sfDyruPst6vv93A1pUYtmNQa95iypWhMw1n4PWDfpP9g1WHTQ
|
||||||
|
(hex!["0c05daf23268fdae4efd5bc1211f662c63399be10666ad3bdc75f3470a5b3378"].into(), 11 * CSPR),
|
||||||
|
// sfG5dZrh8trJRWewe1THxhvCTdR1Qq6NDUkoGuQg4VA6iAm2z
|
||||||
|
(hex!["68e4e6131e6a7aaf5ab2629d2ee721031df2e2a6573701862508fa3dc5765f5c"].into(), 4 * CSPR),
|
||||||
|
// sfHNVjWNHs6fwPpHmmPj4nJQ7evN35qr9KkJVeiJjmyf3fGxj
|
||||||
|
(hex!["a1fdef07d92813b10b15914afe763aa16bbf3feca8db73fabf1422cd48e05db0"].into(), 16 * CSPR),
|
||||||
|
// sfEYCLQnQzp8EYfqqhWmB1mtWNPX9AmVLGiwhVpFVQ5JuuGmu
|
||||||
|
(hex!["24af1eab02801a2d1afe16c75baa55f930138d58229f02f2840f387241529424"].into(), 18 * CSPR),
|
||||||
|
// sfDwQQ2Zy16Hx5qnHQbsXw8reMewJ684yUydmTXT7E3Y489se
|
||||||
|
(hex!["0a2622dc4be5606375d3a47e56e2580636b0057c46ec85bd44e149bff55fb943"].into(), 27 * CSPR),
|
||||||
|
// sfFMhheEBKGwDcJ9aqpYvVsAAq3tu2tEcVaRd66zfxY8qaShs
|
||||||
|
(hex!["48ea8240144388abb847a7b2c52f6290aeb77f1b6d8e10cda7d14a2f48b05035"].into(), 3 * CSPR),
|
||||||
|
// sfE66BLe2b6wM9dWctMnizM7yzadJrzGtTDC64cMTmJxZqGG1
|
||||||
|
(hex!["10c603d5a51516d1ee97212cf0b79f106332439750673b8605a527ffe1d45c50"].into(), 3 * CSPR),
|
||||||
|
// sfEiXa1R4CGPDZcdJ7oEnTuwiicA5Dhtny8z7aYhSrbDQNygK
|
||||||
|
(hex!["2c90529d502a1f3c51fcf487782b4defa09bd0e7470d1d080e44da713058241c"].into(), 24 * CSPR),
|
||||||
|
];
|
||||||
|
|
||||||
// Following keys are used in genesis config for testing (casper) chains.
|
// Following keys are used in genesis config for testing (casper) chains.
|
||||||
// DO NOT use them in production chains such as ghost.
|
// DO NOT use them in production chains such as ghost.
|
||||||
let endowed_accounts = vec![
|
let endowed_accounts = vec![
|
||||||
@@ -297,6 +439,26 @@ fn casper_staging_config_genesis() -> serde_json::Value {
|
|||||||
hex!["3666e4e19f87bb8680495f31864ce1f1c69d4178002cc01911aef2cc7313f203"].into(),
|
hex!["3666e4e19f87bb8680495f31864ce1f1c69d4178002cc01911aef2cc7313f203"].into(),
|
||||||
// sfHcJxw5cgkvukZZyxcNUMCdbm9e7773orByLrGgAREka81TK
|
// sfHcJxw5cgkvukZZyxcNUMCdbm9e7773orByLrGgAREka81TK
|
||||||
hex!["ac871e8bab00dd56ba3a1c0bd289357203dcaf10010b0b04ad7472870cd22a3c"].into(),
|
hex!["ac871e8bab00dd56ba3a1c0bd289357203dcaf10010b0b04ad7472870cd22a3c"].into(),
|
||||||
|
// sfFD7KSRi2aSREJWc9X75sVTN4a5pbPM5VSSJefmPvMuiVbPr
|
||||||
|
hex!["425ccd7bda4f5c76788ba23bc0381d7a2e496179c93301208c57501c80a4232a"].into(),
|
||||||
|
// sfH29zyFYtoFj6fSXskAEXG5XyyMCa5YycahJkYMwSUz8CcEU
|
||||||
|
hex!["927a98dcf8f721103005f168476c24b91d7d10d580f457006a908e10e62c7729"].into(),
|
||||||
|
// sfHcRoUmrL8GDmWxUcPcZEWVfJbnaXyjWuaBxu5pNtdW5nERK
|
||||||
|
hex!["ac9e227e30a63ce6eeb55cfbb1fb832aa7e1d3fad2bcb3f663de4a91d744fd50"].into(),
|
||||||
|
// sfFJuDxqSc3skWaNUQgqmtCDYvcRj9c56urEky7ByD26aXQEW
|
||||||
|
hex!["46c78fcacffd80abc9cca4917ef8369a37e21a1691ca11e7a3b53f80be745313"].into(),
|
||||||
|
// sfKNNbANdBuBpA4n1sXwPBhV57HBgV2y3R3YjHz1S1uWKfKAy
|
||||||
|
hex!["fa5e5a295ec74c3dda81118d9240db1552b28f831838465ae0712e97e78a6728"].into(),
|
||||||
|
// sfFAdZQQVdbCTA7eWomTrJXe5L8ZcwZRfkyyRkMQZftDqbcMg
|
||||||
|
hex!["4078ddb1ba1388f768fe6aa40ba9124a72692ecbcc83dc088fa86c735e4dc128"].into(),
|
||||||
|
// sfFqT8fmF15Ddshio5rnucmqzMxtUoHZVh7qSALSdAaM7Y6zb
|
||||||
|
hex!["5e1456904c40192cd3a18183df7dffea90d97739830a902cabb702ecdae4f649"].into(),
|
||||||
|
// sfFzUcPxuourb6JtdiudRkrsbnkxne1KEcpksVMJYGau5BVTG
|
||||||
|
hex!["64f685baa838323c0ef8c45259a3036b3e2bc54edf6553ce323e25b5e37a3721"].into(),
|
||||||
|
// sfHLkJNKVyAsVMC4bQQwsm1EMyWgKLQH8FFnZzLC78dYJDqSp
|
||||||
|
hex!["a0a87a75dba18037aa2e7b8036ce951e8d8356104758e15c9f44e2fd7d1bbc41"].into(),
|
||||||
|
// sfGCg772bqKp3wH23EQbgSbCQ5Q8BCwmCJ39XjR3xLwq6foYD
|
||||||
|
hex!["6e4429a8fa85cfe2a60488af446d57e719207831b2579b937325645e110bb666"].into(),
|
||||||
];
|
];
|
||||||
|
|
||||||
let initial_authorities: Vec<(
|
let initial_authorities: Vec<(
|
||||||
@@ -349,13 +511,153 @@ fn casper_staging_config_genesis() -> serde_json::Value {
|
|||||||
// sfE32RmBp1xX4KRTphVGLUJBxLGPN3Dzg9BwCJktxMf3iEwck
|
// sfE32RmBp1xX4KRTphVGLUJBxLGPN3Dzg9BwCJktxMf3iEwck
|
||||||
hex!["0e6fa6934f9e99fa84874f2ed9318825a0d5443a0ced984acfbd24ece72ba55e"].unchecked_into(),
|
hex!["0e6fa6934f9e99fa84874f2ed9318825a0d5443a0ced984acfbd24ece72ba55e"].unchecked_into(),
|
||||||
),
|
),
|
||||||
|
(
|
||||||
|
// sfG9iWUS7AKBzvqdz3uDZv7f1t79vvSTYL1VxzYPHjhmLnQVn
|
||||||
|
hex!["6c0283f4c688f0e75ad546c790bbd5961c1a6931543aa589f368f8272c44b758"].into(),
|
||||||
|
// sfG9iWUS7AKBzvqdz3uDZv7f1t79vvSTYL1VxzYPHjhmLnQVn
|
||||||
|
hex!["6c0283f4c688f0e75ad546c790bbd5961c1a6931543aa589f368f8272c44b758"].into(),
|
||||||
|
// sfGMUYXSjHgwGBpbGiHFoqT1DdJwZdHk49H5ViaQM7HUnayvZ
|
||||||
|
hex!["74fa7381a7a74b316afb6793a00387eed9d95d46a69866cbb316b5d9c918af0e"].unchecked_into(),
|
||||||
|
// sfEWYhczV6PbmeNXZTcA4LvhpzvCfNMatYoSNKvDphmNaQzqB
|
||||||
|
hex!["236d2fa03f4ed8cb65de7e514d7540159b328f1c170dd402b094ad7fbf547218"].unchecked_into(),
|
||||||
|
// sfDirg32ityDvrjxh4822unhP4qm4S9yTqN99gesN322swn7h
|
||||||
|
hex!["00946618c353e4c6546b87f9ca1089b846b0ea4658ee8e6d9d1200c24cb5ee27"].unchecked_into(),
|
||||||
|
// sfFZgp1Z5diFAZ16swuQD5GojGCsMMFVR19uWnCrppMLuYjRv
|
||||||
|
hex!["520e74f8c5853ec8577932327ad3247656db25b74c79ad09adb431b271002401"].unchecked_into(),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
// sfHjtrXFzRmxwjE4rjVxFJXpvVv7furjdymZS7PQRFiANpodz
|
||||||
|
hex!["b24feb55b2cac4b365a9245c2a97525b01bd1a594d2d42b91f6bc38c9c2e6517"].into(),
|
||||||
|
// sfHjtrXFzRmxwjE4rjVxFJXpvVv7furjdymZS7PQRFiANpodz
|
||||||
|
hex!["b24feb55b2cac4b365a9245c2a97525b01bd1a594d2d42b91f6bc38c9c2e6517"].into(),
|
||||||
|
// sfF5XWwvNPjZEsBz1HWs5Ys5zcE85UHnN1BV8TBBectqFQZRm
|
||||||
|
hex!["3c944c704cae203619b9e7a5a4b6742736da6a8e76c762291bebdc7652cfec2f"].unchecked_into(),
|
||||||
|
// sfDx3gj4wFHg3cK6bopnypHQ6TxW1VgyPsYVbXKhRHtLDLxQb
|
||||||
|
hex!["0aa3a88f6b777c95c3dfe7e997b76798413f16aa325f34824cae0c9102b281d5"].unchecked_into(),
|
||||||
|
// sfHXZbnZV3YWwnH28q2xumm7stvuC8LweYYxPNuHGonnX7QHL
|
||||||
|
hex!["a8e828d10cf7b74481b6e746e5532d4740ea8014a0d3d856540a59847f8a6b76"].unchecked_into(),
|
||||||
|
// sfEaHBrBgeMhRTA3WHE9Nbyvn3h7xkhYKi7go4yo81L88o9zJ
|
||||||
|
hex!["2645f1f6820dd3a917eebbdab033088d8862477c1c14759b218685f9a0893377"].unchecked_into(),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
// sfFFYKBEwmJAQEJR73Q4Gfs1sH1c8wyuBGnHc1UdzWucAYrKC
|
||||||
|
hex!["44376f8fa786be1f16fcb45232cfb07300cea845b2fc6e30dde61952de3e5e33"].into(),
|
||||||
|
// sfFFYKBEwmJAQEJR73Q4Gfs1sH1c8wyuBGnHc1UdzWucAYrKC
|
||||||
|
hex!["44376f8fa786be1f16fcb45232cfb07300cea845b2fc6e30dde61952de3e5e33"].into(),
|
||||||
|
// sfK4K5bS7M6bHeKHoGec9bw1PMngNyzhTx9YZq6hkqibos4LJ
|
||||||
|
hex!["ec981eb1ef1ddbc8ded2db16198cb03667b4b39a8ea58f28ad469ddfaf256161"].unchecked_into(),
|
||||||
|
// sfECakKMW2xf5dK8Ut55tnwadoKTNGKdRLh5E7dYRmV6sW812
|
||||||
|
hex!["15b9a867891cf449584b108e512d60b945b1a065bec1703c4c5709ee5093c03d"].unchecked_into(),
|
||||||
|
// sfErEin4Ljy11VGnYtTYJZ9LLcDP4fvsKV6f9LXYRwRXtrNqa
|
||||||
|
hex!["3271915dc67eba8ad2759a30c2537702f4fbf45647cba565e3a464ab75b91f05"].unchecked_into(),
|
||||||
|
// sfGD5sHSa1h8NGpUD29ZogBJW6fatg8Sg6Pzg9Q7RPUm24Mkr
|
||||||
|
hex!["6e9426dc78fba9eeb264dcab98be86daf3d8cf510ecfb2acddec370295ff8176"].unchecked_into(),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
// sfFPZZNrhDuY9MKJCBHyBCkgJecgDqPJBPSjA37be4czdX6t3
|
||||||
|
hex!["4a5596e97c602e7846d54fae81dcdc5a553b7422231e32f9567ac30a6b7c743a"].into(),
|
||||||
|
// sfFPZZNrhDuY9MKJCBHyBCkgJecgDqPJBPSjA37be4czdX6t3
|
||||||
|
hex!["4a5596e97c602e7846d54fae81dcdc5a553b7422231e32f9567ac30a6b7c743a"].into(),
|
||||||
|
// sfJP8aW6eSUs14AfUG6ZDFFjtyJxDed5Ubk1CFh7dNmL69rbx
|
||||||
|
hex!["ceb63298b1b7a1277fddf6eee735dbbf9921fd5ebaac0132eee1963e22cf5935"].unchecked_into(),
|
||||||
|
// sfH6jAeHqDpwtYGv9KJWNJ8aom8ivSvVztRSwAHw4bXd1isoP
|
||||||
|
hex!["95f73a6271b517f2016fa91411bdeeb990158066c95f106a79697446ba9f78b4"].unchecked_into(),
|
||||||
|
// sfEXSdKyx6uQBzgR3a7oH53XSCLrjUM2B7fbcvUvm21b5J6Uf
|
||||||
|
hex!["241bfc05caa2d3e53e671df7261599c13f069a37f6cc4be10b5d49502c3a1e1c"].unchecked_into(),
|
||||||
|
// sfGXqJTwJTkh3bwhECju7XCdgvJXYJZUtYSEJ2PbfpXGak42s
|
||||||
|
hex!["7ce0c80ee65fb00e229d8c8fa5484144eca3d45d733165fbffcdb4de24c14951"].unchecked_into(),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
// sfESE7VifnknxVe71z3zsqC3xiirXyzHurKjdQoD537WpwJjW
|
||||||
|
hex!["2021a16182e3af39a79d20021a1b8755d589c04292d361d6b387411f7e975602"].into(),
|
||||||
|
// sfESE7VifnknxVe71z3zsqC3xiirXyzHurKjdQoD537WpwJjW
|
||||||
|
hex!["2021a16182e3af39a79d20021a1b8755d589c04292d361d6b387411f7e975602"].into(),
|
||||||
|
// sfFzQmYYckD8XLV7XGU1pJAyt1K3foCpPumpKBqdb5sJGHXrc
|
||||||
|
hex!["64e9968f3af2e1a86ee8d4be9ad77a1d66f50138527988bf93ede25baaf2e671"].unchecked_into(),
|
||||||
|
// sfFHjCLzWetvQJQzNwxeWcrkHmnPS1mVz7gT63yiRdvxFZ9T8
|
||||||
|
hex!["45e28f333bf0d4a9956ae20341cd07db8d471c4b482ed15d5cf7edd70201670d"].unchecked_into(),
|
||||||
|
// sfHJAk4HiVuMjXqaXoFEKTCF6938Lta7qd9w3zbyyuWCs1T5L
|
||||||
|
hex!["9eb1063afcaf568e7a62458ef33237a41ca500c89e084f7a5dd75bf5d89b105a"].unchecked_into(),
|
||||||
|
// sfEm2SME5H6GiezhYokZWmrZLMTUNFbLV7xwgKrMXz3NwppKb
|
||||||
|
hex!["2e77fde21162d1f21ca371846d70c3b75931329074101ee668e614336d25c120"].unchecked_into(),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
// sfHpvEbP79MrDMVw4GhTvgLSU987ZSJ21VAsDWiJdgjG3ijse
|
||||||
|
hex!["b624cb291f7464773f3b449ee2252165f3934ace08b1e10611a53e174766fc73"].into(),
|
||||||
|
// sfHpvEbP79MrDMVw4GhTvgLSU987ZSJ21VAsDWiJdgjG3ijse
|
||||||
|
hex!["b624cb291f7464773f3b449ee2252165f3934ace08b1e10611a53e174766fc73"].into(),
|
||||||
|
// sfJHYLgjoHotvKi46URmtaVoG4p54SPE2ASTrauym99WxFcAn
|
||||||
|
hex!["ca72b6ea2c83f9e429479bf51c324ea90cbf01e08d2850ced2590c8796cfe222"].unchecked_into(),
|
||||||
|
// sfFVPqgCsDQe3k4qhGmUH4UoZaxsGb9majPgoH3WaYCZjFhTf
|
||||||
|
hex!["4ec8584ca9da16d8c60e1770e98fbca8bec648e13c69601e3dfdc1330bf1f999"].unchecked_into(),
|
||||||
|
// sfJ6nxM1SvcdbV2Gmf8WKkPKeX6rRYaEmSj7V9r64799acqHV
|
||||||
|
hex!["c2403683be24a92ae8489e28fb502e2bab16d815c4f6c865c50ffb34430a8d7c"].unchecked_into(),
|
||||||
|
// sfK1sQY3GL8waX2htW9EaBo9MjWGuy4VGeiUfP4NCq5tCjt37
|
||||||
|
hex!["eabb3463e300f357b9886683d5a240a395f6bd41182057f03b0e9697a8b3465e"].unchecked_into(),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
// sfJeU4TBQyuGxfsCqNDPax1TcfAseEmBDPqx5YEm7kXUvnnPa
|
||||||
|
hex!["da6875e9df9a7894e065ef5befcde567dec4dc2c0b73a6ad5514dcca26a90702"].into(),
|
||||||
|
// sfJeU4TBQyuGxfsCqNDPax1TcfAseEmBDPqx5YEm7kXUvnnPa
|
||||||
|
hex!["da6875e9df9a7894e065ef5befcde567dec4dc2c0b73a6ad5514dcca26a90702"].into(),
|
||||||
|
// sfGbxmQAD2jbktjRkq6NsJxHKHWnkdtvoR14fFPAX85t148ej
|
||||||
|
hex!["8006e3f6e3d92c4c5f2e2f001452e4993e6d5c2b1136f2ae6060c6e9c9523b4a"].unchecked_into(),
|
||||||
|
// sfGm1jJagueW5dCng6xKCDx3FX2JohtsYMuNjf2tJGXN5ePUL
|
||||||
|
hex!["86ee138c9e7e67c1c2e157c0ba888761a122d8b9aa6a8653e886ac329e34255d"].unchecked_into(),
|
||||||
|
// sfEB68auUQmSCK8M3Zr7WuzRSipj9sQ5ykfDmvLmT8FDY5bg6
|
||||||
|
hex!["1496150847d512e0491899eba72ee36f76b882ae29fccf18201fd9fbd5bfd300"].unchecked_into(),
|
||||||
|
// sfHZqUptNXpRNGPHKn2Tfv8K1RjFGJ9XCdSw41nPAw9ZXM37T
|
||||||
|
hex!["aaa41b6ade4c30b5792aa6e5604c444e424900ddf649b23eed4bd0d7f5d3a34f"].unchecked_into(),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
// sfFBEdrB1J7jLJKQp3fABEiHkwec1gCgGeTxMVyVm4UjWwvRs
|
||||||
|
hex!["40eef1c6c8d8242ccbd3f03144bd4ea1a7374cbd8219e2849d3a3ee78f1da045"].into(),
|
||||||
|
// sfFBEdrB1J7jLJKQp3fABEiHkwec1gCgGeTxMVyVm4UjWwvRs
|
||||||
|
hex!["40eef1c6c8d8242ccbd3f03144bd4ea1a7374cbd8219e2849d3a3ee78f1da045"].into(),
|
||||||
|
// sfF2FRJSuQSCidfbpu8DwpsHwezCcBJcZfh7Pds5vqtEF3Rbw
|
||||||
|
hex!["3a145fb664353e473f1937058c881b14ed150285f3cec1aff348c5209d56d96d"].unchecked_into(),
|
||||||
|
// sfDysi9h3PJoA5BGeJ2vfAkx3wXS9oK7yTDUyuJG2CRMJvXnh
|
||||||
|
hex!["0c0891a518270014530061bd217606269686abdf3c1d237a3c6a3db308fc2d0d"].unchecked_into(),
|
||||||
|
// sfGsyqzBAT7a9oBGdDBykyRwF95wRBL4yaGs4QFWznXHw5xsF
|
||||||
|
hex!["8c3e730f6e6ecfb96581091e71556175384f077bee31b0199f13321df018427d"].unchecked_into(),
|
||||||
|
// sfJP7W9aZe2F6G5w7xZtHhzSUCg86SvUcur4GPm2LMs7N2f5w
|
||||||
|
hex!["ceb294227950d177b63e6c1d10a66131f5da3792428b03f5b83be84a33db215f"].unchecked_into(),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
// sfFCsSaJrPqkCZMdkm7WoyHP7w3UbNaC3aCHQfWbUaLbDqfdR
|
||||||
|
hex!["422e16b0c58f03af378d1638fe56127f337abf1d1a4a740c3371714616abd43d"].into(),
|
||||||
|
// sfFCsSaJrPqkCZMdkm7WoyHP7w3UbNaC3aCHQfWbUaLbDqfdR
|
||||||
|
hex!["422e16b0c58f03af378d1638fe56127f337abf1d1a4a740c3371714616abd43d"].into(),
|
||||||
|
// sfGShS9zKf8nzDr71qPv9LZJtK1LCMxPV4QUMYG8jvZhVe9pS
|
||||||
|
hex!["78f612068566eb6cc5cb5d9f1fda92c5dc3e3888eb61eb1af27af6855365ba3c"].unchecked_into(),
|
||||||
|
// sfJg5cPBkyrcu7zZaKaUkjp2vDVGfpGNjjT1sn8fS6qjv9mDU
|
||||||
|
hex!["dba3613933d60ca248ee024deac42bc9c8c2d9fe8734b6052cd9a148978cbedb"].unchecked_into(),
|
||||||
|
// sfFav2ALRGkJtmEHEpz2LiRmshGPzn4aWdAZeFUyKA56LqDDF
|
||||||
|
hex!["52fe2b63b03a0d439923967278442418a2d1f0d250bcab26f85f12ea212cbd3e"].unchecked_into(),
|
||||||
|
// sfDmN4zoicQ54R5MmSpCf9ojg8zE2eD3x39pnba412oDivkBc
|
||||||
|
hex!["027dd852bf20bef53545afd1e08bf8760abb6b1af1df6c17e73f4cf88210ee46"].unchecked_into(),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
// sfF2fiFe2PteoYe286cZNJpxaT1omCPuTgwHjB1Z8tqjsLxRn
|
||||||
|
hex!["3a6626211a2dd35683fd7cb5f2f343d75f2b698d6c48c2d6eb1cdbe116e32315"].into(),
|
||||||
|
// sfF2fiFe2PteoYe286cZNJpxaT1omCPuTgwHjB1Z8tqjsLxRn
|
||||||
|
hex!["3a6626211a2dd35683fd7cb5f2f343d75f2b698d6c48c2d6eb1cdbe116e32315"].into(),
|
||||||
|
// sfG9m1LEV1sjUwyLwp1UQPUGnuMGF1oaCjSC4PVx9q4zgJRMr
|
||||||
|
hex!["6c0aec49974aaff08ff962a2d8d7857227d027ed27a272cbc4acaa1ee937db0f"].unchecked_into(),
|
||||||
|
// sfH3JwHTbimvG3SZLd5d8Ad8Ztvgb8NVSwxxzxYfArpXVYqFD
|
||||||
|
hex!["935becdfb2e0d4fcd46ba82e680cfc447180de6b85ec42d17f1396a520b0c04f"].unchecked_into(),
|
||||||
|
// sfGkKjBX5UdujuTrbxyepUzdU4Jew7DvgNs1UUM2HBLj4xNM5
|
||||||
|
hex!["86676ad3cd2d970b86dee2f25d4318f9bba40455111f16300e114e7f00c58706"].unchecked_into(),
|
||||||
|
// sfDisU5wryao4kcd4WuHyZZB6LfJrDuoQoU14cTiiJqD7Whoc
|
||||||
|
hex!["009712519ba7dad1c682c871b94573ccaba8b7d530f7194fb16bf553fd7ae67d"].unchecked_into(),
|
||||||
|
),
|
||||||
];
|
];
|
||||||
|
|
||||||
let ghost_accounts: Vec<(AccountId, u128, u8)> = casper_testnet_evm_accounts();
|
let ghost_accounts: Vec<(AccountId, u128, u8)> = casper_testnet_evm_accounts();
|
||||||
let evm_networks = casper_testnet_evm_networks();
|
let evm_networks = casper_testnet_evm_networks();
|
||||||
|
|
||||||
const ENDOWMENT: u128 = 5_000 * CSPR;
|
const ENDOWMENT: u128 = 31 * CSPR;
|
||||||
const STASH: u128 = 500 * CSPR;
|
const STASH: u128 = 69 * CSPR;
|
||||||
|
|
||||||
serde_json::json!({
|
serde_json::json!({
|
||||||
"balances": {
|
"balances": {
|
||||||
@@ -363,6 +665,7 @@ fn casper_staging_config_genesis() -> serde_json::Value {
|
|||||||
.iter()
|
.iter()
|
||||||
.map(|k: &AccountId| (k.clone(), ENDOWMENT))
|
.map(|k: &AccountId| (k.clone(), ENDOWMENT))
|
||||||
.chain(initial_authorities.iter().map(|x| (x.0.clone(), STASH)))
|
.chain(initial_authorities.iter().map(|x| (x.0.clone(), STASH)))
|
||||||
|
.chain(whales_endowments)
|
||||||
.collect::<Vec<_>>(),
|
.collect::<Vec<_>>(),
|
||||||
},
|
},
|
||||||
"session": {
|
"session": {
|
||||||
@@ -383,8 +686,8 @@ fn casper_staging_config_genesis() -> serde_json::Value {
|
|||||||
.collect::<Vec<_>>(),
|
.collect::<Vec<_>>(),
|
||||||
},
|
},
|
||||||
"staking": {
|
"staking": {
|
||||||
"validatorCount": 50,
|
"validatorCount": 500,
|
||||||
"minimumValidatorCount": 2,
|
"minimumValidatorCount": 3,
|
||||||
"stakers": initial_authorities
|
"stakers": initial_authorities
|
||||||
.iter()
|
.iter()
|
||||||
.map(|x| {
|
.map(|x| {
|
||||||
@@ -396,9 +699,10 @@ fn casper_staging_config_genesis() -> serde_json::Value {
|
|||||||
)
|
)
|
||||||
})
|
})
|
||||||
.collect::<Vec<_>>(),
|
.collect::<Vec<_>>(),
|
||||||
"invulnerables": initial_authorities.iter().map(|x| x.0.clone()).collect::<Vec<_>>(),
|
"forceEra": Forcing::NotForcing,
|
||||||
"forceEra": Forcing::ForceNone,
|
"slashRewardFraction": Perbill::from_percent(10),
|
||||||
"slashRewardFraction": Perbill::from_percent(10)
|
"minNominatorBond": 6_900 * STRH,
|
||||||
|
"minValidatorBond": 6_900 * STRH,
|
||||||
},
|
},
|
||||||
"babe": {
|
"babe": {
|
||||||
"epochConfig": Some(casper::BABE_GENESIS_EPOCH_CONFIG),
|
"epochConfig": Some(casper::BABE_GENESIS_EPOCH_CONFIG),
|
||||||
|
|||||||
0
service/src/lib.rs
Executable file → Normal file
200
service/tmp_ghosties
Normal file
@@ -0,0 +1,200 @@
|
|||||||
|
|
||||||
|
### TEMPLATE ###
|
||||||
|
Local identity : ./PATH_TO_GHOST/ghost key inspect-node-key --bin --file PATH_TO_NODE_KEY
|
||||||
|
Public key (hex) wallet : ./PATH_TO_GHOST/ghost key inspect $(cat PATH_TO_WALLET_KEY)
|
||||||
|
==================================================================================================================
|
||||||
|
Public key (hex) for stash : ./PATH_TO_GHOST/ghost key inspect --scheme=sr25519 $(cat PATH_TO_STASH_KEY)
|
||||||
|
Public key (hex) for audi : ./PATH_TO_GHOST/ghost key inspect --scheme=sr25519 "$(cat PATH_TO_SESSION_KEY)//audi"
|
||||||
|
Public key (hex) for babe : ./PATH_TO_GHOST/ghost key inspect --scheme=sr25519 "$(cat PATH_TO_SESSION_KEY)//babe"
|
||||||
|
Public key (hex) for slow : ./PATH_TO_GHOST/ghost key inspect --scheme=sr25519 "$(cat PATH_TO_SESSION_KEY)//slow"
|
||||||
|
Public key (hex) for gran : ./PATH_TO_GHOST/ghost key inspect --scheme=ed25519 "$(cat PATH_TO_SESSION_KEY)//gran"
|
||||||
|
|
||||||
|
### str3tch aka Pierre ###
|
||||||
|
Local identity : 12D3KooWFMiBom4mrJ57CaJZBxKWD1eDLYUyWLZzcjTaQW5crcNQ
|
||||||
|
Public key (hex) wallet : 0x328d3b7c3046ef7700937d99fb2e98ce2591682c2b5dcf3f562e4da157650237
|
||||||
|
===============================================================================================
|
||||||
|
Public key (hex) for stash : 0x507045c82be367f95408466cd054ca39bfa52697a3ef22809af14cf9de304f02
|
||||||
|
Public key (hex) for audi : 0x12c14850562021eb99f58f90ab624fb6cfaf3ac9228a92f8b60115fe6a6af15a
|
||||||
|
Public key (hex) for babe : 0xdaaaaab6a6e574099e24ae9bb75b543610edef9d374fa85a378edb573b47615f
|
||||||
|
Public key (hex) for slow : 0x0e9e698c7b2bf5ce3861cb4bc4ddf9e200237c282025b093ada850d764d12a35
|
||||||
|
Public key (hex) for gran : 0x55446f9a7aa99ced06b317c80ce90d56b84e56526775683af2525969e8da0b64
|
||||||
|
|
||||||
|
### ghost_7 ###
|
||||||
|
Local identity : 12D3KooWNZYbA3Ty1h8BqfMjzKVeJ83UTJxKUXj9zqnSirJZ51KR
|
||||||
|
Public key (hex) wallet : 0x3666e4e19f87bb8680495f31864ce1f1c69d4178002cc01911aef2cc7313f203
|
||||||
|
===============================================================================================
|
||||||
|
Public key (hex) for stash : 0xa0ba0196e6ee7e6b5b0553035c5cb5c04e9725001b5732839d0529cbc00c9600
|
||||||
|
Public key (hex) for audi : 0x90db5ed339a559ed157995a48d781f44c7df972dfba4bc855e4b59fa46438e17
|
||||||
|
Public key (hex) for babe : 0x6c4dd88b43e2011cf9a6a73d53446336ac9e04cdd4ca23587df63187ac455e49
|
||||||
|
Public key (hex) for slow : 0x3481cdcbcf37a4669c29a78cf9ceb39383a10ef0a18b36b92d149fdd0c24ae00
|
||||||
|
Public key (hex) for gran : 0x8f9ea20bf4a807a8e710f7559dece86e94672b5b361de157bdaa5c1f37849f8d
|
||||||
|
|
||||||
|
### Neptune ###
|
||||||
|
Local identity : 12D3KooWF9SWxz9dmy6vfndQhoxqCa7PESaoFWEiF8Jkqh4xKDRf
|
||||||
|
Public key (hex) wallet : 0xac871e8bab00dd56ba3a1c0bd289357203dcaf10010b0b04ad7472870cd22a3c
|
||||||
|
===============================================================================================
|
||||||
|
Public key (hex) for stash : 0x8a0d0b66e827bf20e79f9a499317e73925ce4f422371067edfab690e43857f13
|
||||||
|
Public key (hex) for audi : 0x2cf69452e9f2a8457119139408884941ed50f590c0fc0f2b044c4d82c69e4245
|
||||||
|
Public key (hex) for babe : 0xe0f0a776ecc9fa5e1f22e2fa001fe3fba5aea52b9444bc894b45589d42132475
|
||||||
|
Public key (hex) for slow : 0x0e6fa6934f9e99fa84874f2ed9318825a0d5443a0ced984acfbd24ece72ba55e
|
||||||
|
Public key (hex) for gran : 0xb63c5a0cf342b9b04931bc8ed74d7d0165ab99ab5f8a4514797d4b299a4501fe
|
||||||
|
|
||||||
|
### Neptune 2 ###
|
||||||
|
Local identity : 12D3KooWPQXpz8UM9uBsB7pcv12pLCLbYdk8W3SHrZBgiju2fbAs
|
||||||
|
Public key (hex) wallet : 0x425ccd7bda4f5c76788ba23bc0381d7a2e496179c93301208c57501c80a4232a
|
||||||
|
===============================================================================================
|
||||||
|
Public key (hex) for stash : 0x6c0283f4c688f0e75ad546c790bbd5961c1a6931543aa589f368f8272c44b758
|
||||||
|
Public key (hex) for audi : 0x00946618c353e4c6546b87f9ca1089b846b0ea4658ee8e6d9d1200c24cb5ee27
|
||||||
|
Public key (hex) for babe : 0x74fa7381a7a74b316afb6793a00387eed9d95d46a69866cbb316b5d9c918af0e
|
||||||
|
Public key (hex) for slow : 0x520e74f8c5853ec8577932327ad3247656db25b74c79ad09adb431b271002401
|
||||||
|
Public key (hex) for gran : 0x236d2fa03f4ed8cb65de7e514d7540159b328f1c170dd402b094ad7fbf547218
|
||||||
|
|
||||||
|
### Doctor K ###
|
||||||
|
Local identity : 12D3KooWP3h5dSdqcpvsCr7fp1jyfqDj291QDZ68a4gY6VQ8T1nW
|
||||||
|
Public key (hex) wallet : 0x927a98dcf8f721103005f168476c24b91d7d10d580f457006a908e10e62c7729
|
||||||
|
===============================================================================================
|
||||||
|
Public key (hex) for stash : 0xb24feb55b2cac4b365a9245c2a97525b01bd1a594d2d42b91f6bc38c9c2e6517
|
||||||
|
Public key (hex) for audi : 0xa8e828d10cf7b74481b6e746e5532d4740ea8014a0d3d856540a59847f8a6b76
|
||||||
|
Public key (hex) for babe : 0x3c944c704cae203619b9e7a5a4b6742736da6a8e76c762291bebdc7652cfec2f
|
||||||
|
Public key (hex) for slow : 0x2645f1f6820dd3a917eebbdab033088d8862477c1c14759b218685f9a0893377
|
||||||
|
Public key (hex) for gran : 0x0aa3a88f6b777c95c3dfe7e997b76798413f16aa325f34824cae0c9102b281d5
|
||||||
|
|
||||||
|
### starman ###
|
||||||
|
Local identity : 12D3KooWMikWyNweALKadEN8KMEhLs5JnNqCBecydAtP8d5UzVgs
|
||||||
|
Public key (hex) wallet : 0xac9e227e30a63ce6eeb55cfbb1fb832aa7e1d3fad2bcb3f663de4a91d744fd50
|
||||||
|
===============================================================================================
|
||||||
|
Public key (hex) for stash : 0x44376f8fa786be1f16fcb45232cfb07300cea845b2fc6e30dde61952de3e5e33
|
||||||
|
Public key (hex) for audi : 0x3271915dc67eba8ad2759a30c2537702f4fbf45647cba565e3a464ab75b91f05
|
||||||
|
Public key (hex) for babe : 0xec981eb1ef1ddbc8ded2db16198cb03667b4b39a8ea58f28ad469ddfaf256161
|
||||||
|
Public key (hex) for slow : 0x6e9426dc78fba9eeb264dcab98be86daf3d8cf510ecfb2acddec370295ff8176
|
||||||
|
Public key (hex) for gran : 0x15b9a867891cf449584b108e512d60b945b1a065bec1703c4c5709ee5093c03d
|
||||||
|
|
||||||
|
### IBN ###
|
||||||
|
Local identity : 12D3KooWQtgCKVcoSkbAcxXdXQFQBpHkriaeXkdMeLUyddjVugwD
|
||||||
|
Public key (hex) wallet : 0x5ebcc2d213e482d00e2a27e2031abda6ecbe49eb30709113c6142aa4d7395134
|
||||||
|
===============================================================================================
|
||||||
|
Public key (hex) for stash : 0x42dbb785808c7b22eb3a57605b4676e370620c79d768a9e8f1f93ad3137b751c
|
||||||
|
Public key (hex) for audi : 0xe28dd330cc0daee36806b6b9209547fd65a6916f6e3cc3c2647417ff67bcb065
|
||||||
|
Public key (hex) for babe : 0x56bde237ae958813482ec69ac5734f64c271c7c5b3d1af45daa4d4d43c051e34
|
||||||
|
Public key (hex) for slow : 0x5eff55ed5111e7430d0acb23aee45e04d389f4d3f72019cda302bb2176485578
|
||||||
|
Public key (hex) for gran : 0x03562f5fa0b39c4f85b8692be4aa2447203b8ba5a95f9ba3d1e43d52ba8d1254
|
||||||
|
|
||||||
|
### My Submission for Genesis Code - youaresparta ###
|
||||||
|
Local identity : 12D3KooWSHS1YCJvxck3Dcpk92ZiEW5ZrhTDrGQMHhjEErTxCxzZ
|
||||||
|
Public key (hex) wallet : 0xea1c01ff56725c6fdd62efaa119b704a2f467fd21d20a3c2117668bfeba02e76
|
||||||
|
===============================================================================================
|
||||||
|
Public key (hex) for stash : 0x909ab2271d3fc8df9e8556232a29eea7cf1cfdf8c89603a602779daa6484f011
|
||||||
|
Public key (hex) for audi : 0x0eef8f5d5d3bf5b5986bdd76ee6feba013171ab6c76bd38b3aa556e7fad4ea6c
|
||||||
|
Public key (hex) for babe : 0x00623f9d2ca673af3ec6d5c0077a7314c0fa92ec5fa853015b189daa12a2e02a
|
||||||
|
Public key (hex) for slow : 0x9ef7278866ed6015bd3055e3ef2cc77c62e796667f250a42d832846534a16743
|
||||||
|
Public key (hex) for gran : 0x47acf609aefff57c8b3680d862df19f11a9d5970e0e9be3606781f430790e94c
|
||||||
|
|
||||||
|
### Kitsune1 ###
|
||||||
|
Local identity : 12D3KooWR5JJQ9mALPpnSxfZm5M23AByitSfxpei9ZDghU1NLNeW
|
||||||
|
Public key (hex) wallet : 0x46c78fcacffd80abc9cca4917ef8369a37e21a1691ca11e7a3b53f80be745313
|
||||||
|
===============================================================================================
|
||||||
|
Public key (hex) for stash : 0x4a5596e97c602e7846d54fae81dcdc5a553b7422231e32f9567ac30a6b7c743a
|
||||||
|
Public key (hex) for audi : 0x241bfc05caa2d3e53e671df7261599c13f069a37f6cc4be10b5d49502c3a1e1c
|
||||||
|
Public key (hex) for babe : 0xceb63298b1b7a1277fddf6eee735dbbf9921fd5ebaac0132eee1963e22cf5935
|
||||||
|
Public key (hex) for slow : 0x7ce0c80ee65fb00e229d8c8fa5484144eca3d45d733165fbffcdb4de24c14951
|
||||||
|
Public key (hex) for gran : 0x95f73a6271b517f2016fa91411bdeeb990158066c95f106a79697446ba9f78b4
|
||||||
|
|
||||||
|
### mridkwya ###
|
||||||
|
Local identity : 12D3KooWQHiwqRokC3BmDrZ9LszxwFj7vjJ2adJDZPVQvRJXSA42
|
||||||
|
Public key (hex) wallet : 0xaaba173e1cd257c1ba67afbed0fbf2c4aadbfac329f129f12c4941b8b6bc5865
|
||||||
|
===============================================================================================
|
||||||
|
Public key (hex) for stash : 0x56bbe4fddb35ccdfbc59fad45f011c0bd0869fe42b34396804c060dc963bf866
|
||||||
|
Public key (hex) for audi : 0x5ce0221a8ee8b7e093ef9ca48f08b890d65c6ef98185010c5013d7a0e108452d
|
||||||
|
Public key (hex) for babe : 0x50fd46be1d746a5d355018615bacef98ac280dbed490ef2a26c1aefd06ec4f1c
|
||||||
|
Public key (hex) for slow : 0x46735b00d80e2e32c4eb652729c791d32f83f5f423a3d963c3c226ab0d131129
|
||||||
|
Public key (hex) for gran : 0x210a4b979e39c3136be105df1974fc036f4fe9b035936c149bdb94a3f4820487
|
||||||
|
|
||||||
|
### ajruecker (scientio) ###
|
||||||
|
Local identity : 12D3KooWEiC9wp3rHF8JcDiadqtwdWvtUXLBbZhKuao1SwPy2m52
|
||||||
|
Public key (hex) wallet : 0xfa5e5a295ec74c3dda81118d9240db1552b28f831838465ae0712e97e78a6728
|
||||||
|
===============================================================================================
|
||||||
|
Public key (hex) for stash : 0x2021a16182e3af39a79d20021a1b8755d589c04292d361d6b387411f7e975602
|
||||||
|
Public key (hex) for audi : 0x9eb1063afcaf568e7a62458ef33237a41ca500c89e084f7a5dd75bf5d89b105a
|
||||||
|
Public key (hex) for babe : 0x64e9968f3af2e1a86ee8d4be9ad77a1d66f50138527988bf93ede25baaf2e671
|
||||||
|
Public key (hex) for slow : 0x2e77fde21162d1f21ca371846d70c3b75931329074101ee668e614336d25c120
|
||||||
|
Public key (hex) for gran : 0x45e28f333bf0d4a9956ae20341cd07db8d471c4b482ed15d5cf7edd70201670d
|
||||||
|
|
||||||
|
### Kitsune_2 ###
|
||||||
|
Local identity : 12D3KooWDs4i6VoK4dpwGSUVtZENzSmsbQk3tF63gYT745x7eAb2
|
||||||
|
Public key (hex) wallet : 0x4078ddb1ba1388f768fe6aa40ba9124a72692ecbcc83dc088fa86c735e4dc128
|
||||||
|
===============================================================================================
|
||||||
|
Public key (hex) for stash : 0xb624cb291f7464773f3b449ee2252165f3934ace08b1e10611a53e174766fc73
|
||||||
|
Public key (hex) for audi : 0xc2403683be24a92ae8489e28fb502e2bab16d815c4f6c865c50ffb34430a8d7c
|
||||||
|
Public key (hex) for babe : 0xca72b6ea2c83f9e429479bf51c324ea90cbf01e08d2850ced2590c8796cfe222
|
||||||
|
Public key (hex) for slow : 0xeabb3463e300f357b9886683d5a240a395f6bd41182057f03b0e9697a8b3465e
|
||||||
|
Public key (hex) for gran : 0x4ec8584ca9da16d8c60e1770e98fbca8bec648e13c69601e3dfdc1330bf1f999
|
||||||
|
|
||||||
|
### Proxmio ###
|
||||||
|
Local identity : 12D3KooWHZDmyvNFF31PCVVrwDSmUPyC7kgvfpC6wTTDevFcX4dH
|
||||||
|
Public key (hex) wallet : 0x5e1456904c40192cd3a18183df7dffea90d97739830a902cabb702ecdae4f649
|
||||||
|
===============================================================================================
|
||||||
|
Public key (hex) for stash : 0xda6875e9df9a7894e065ef5befcde567dec4dc2c0b73a6ad5514dcca26a90702
|
||||||
|
Public key (hex) for audi : 0x1496150847d512e0491899eba72ee36f76b882ae29fccf18201fd9fbd5bfd300
|
||||||
|
Public key (hex) for babe : 0x8006e3f6e3d92c4c5f2e2f001452e4993e6d5c2b1136f2ae6060c6e9c9523b4a
|
||||||
|
Public key (hex) for slow : 0xaaa41b6ade4c30b5792aa6e5604c444e424900ddf649b23eed4bd0d7f5d3a34f
|
||||||
|
Public key (hex) for gran : 0x86ee138c9e7e67c1c2e157c0ba888761a122d8b9aa6a8653e886ac329e34255d
|
||||||
|
|
||||||
|
### Zoom ###
|
||||||
|
Local identity : 12D3KooWLxCLSGuDVHePoXEuyBVFfRPzYXiSVngpYSTVDEwxX49S
|
||||||
|
Public key (hex) wallet : 0xfc00ebab85e7271d8436b9258a4b80700f655810af632b3647109965f8b8e639
|
||||||
|
===============================================================================================
|
||||||
|
Public key (hex) for stash : 0x1040c71fc62c08d520f04bff23814cf9a19673e385142f7ea910c7fbaa910e06
|
||||||
|
Public key (hex) for audi : 0x60a07df1236d676011eb5a49c2e01a04f734a05599e0df51208899bfd746a23e
|
||||||
|
Public key (hex) for babe : 0xf425e0965fc1b6593288a5d100396028217f5931f1bdebaf491358485dfa7f29
|
||||||
|
Public key (hex) for slow : 0x10559a32c870d6087db5367f31c6828d5615effa8f0334362ec444666908ba59
|
||||||
|
Public key (hex) for gran : 0x489b5c32c26dbb04ebaa41695d043934120cdb5794ecb9c51748a9e0edfb9286
|
||||||
|
|
||||||
|
### Tyrone-Overit ###
|
||||||
|
Local identity : 12D3KooWReS7ezsKuuttK4FuGqCJycH9bJEccsBhKb4YuDMhaVZ
|
||||||
|
Public key (hex) wallet : 0x50c8a6b85ae6c3aebf402dbc98f0f09dad4758d37d63f3e39e4d9127eece9360
|
||||||
|
===============================================================================================
|
||||||
|
Public key (hex) for stash : 0xfa6bad513351346342177594080c851e5ac91ebebe708cf368a1044972582f53
|
||||||
|
Public key (hex) for audi : 0x528860f091ca1634af2919472880b93f1788532c2d6779ef940a900c5abc1a26
|
||||||
|
Public key (hex) for babe : 0xc2ee8058909f4880a068190a9cff3b9fa570cdec110334f174b16d9e7d720056
|
||||||
|
Public key (hex) for slow : 0x1ee11e06d7a61e49d61636d1be7c2a58ba26dd87110806ce8573b973f5f6892a
|
||||||
|
Public key (hex) for gran : 0x635308cf5fae9b94271b09a4987064319d57c93abea88671841a84e41be5a83f
|
||||||
|
|
||||||
|
### My Submission for Genesis Code - Satoshi ###
|
||||||
|
Local identity : 12D3KooWPvdyWvTrTpkBKoGZ8KBMjEumrSwWHThoTNg416mVakWJ
|
||||||
|
Public key (hex) wallet : 0x80932904b805be74fa163be7474390633c96f319163f7466adf9844e9b4fa038
|
||||||
|
===============================================================================================
|
||||||
|
Public key (hex) for stash : 0x7291cffd9a948e4a8f7ea9015faae5c9f2384821c34e831d5afaec3284a7c563
|
||||||
|
Public key (hex) for audi : 0x9a4a2cfc28b9196eea423b6177252f7598e93c5e40396a91d214e0bc6c4aca73
|
||||||
|
Public key (hex) for babe : 0xfa517486ef74d8cedbabc8fe4470b3e79c9afd44fca7e5c639e1612c026d2c3d
|
||||||
|
Public key (hex) for slow : 0x58a9b312e847a5bdd1d92d603c07fc3fb5af8d241c482c41e5a30db6240a4779
|
||||||
|
Public key (hex) for gran : 0xffd30acb4b7b4563585618fa0e35f0d64a512387fabe6db931e726e44d0e6726
|
||||||
|
|
||||||
|
### Youconnect ###
|
||||||
|
Local identity : 12D3KooWJXBYA7cUQLLenEfT7hmCjBJ6fyikDy8YhNz4aLfwbBC8
|
||||||
|
Public key (hex) wallet : 0x6e4429a8fa85cfe2a60488af446d57e719207831b2579b937325645e110bb666
|
||||||
|
===============================================================================================
|
||||||
|
Public key (hex) for stash : 0x3a6626211a2dd35683fd7cb5f2f343d75f2b698d6c48c2d6eb1cdbe116e32315
|
||||||
|
Public key (hex) for audi : 0x86676ad3cd2d970b86dee2f25d4318f9bba40455111f16300e114e7f00c58706
|
||||||
|
Public key (hex) for babe : 0x6c0aec49974aaff08ff962a2d8d7857227d027ed27a272cbc4acaa1ee937db0f
|
||||||
|
Public key (hex) for slow : 0x009712519ba7dad1c682c871b94573ccaba8b7d530f7194fb16bf553fd7ae67d
|
||||||
|
Public key (hex) for gran : 0x935becdfb2e0d4fcd46ba82e680cfc447180de6b85ec42d17f1396a520b0c04f
|
||||||
|
|
||||||
|
### pietro0hz ###
|
||||||
|
Local identity : 12D3KooWEcJAQHs59gD3hDWU5UXxc9nNQcS6dPe3cnFtL8bBuEnw
|
||||||
|
Public key (hex) wallet : 0x3aed46c45d1db596ba68c171f58cd0c34178c410ec2485dc9ecaa52f1af75320
|
||||||
|
===============================================================================================
|
||||||
|
Public key (hex) for stash : 0x445208ab2cd2f9169f1a011bc9d53dd6bc11b139b27caef3bbb1342609931738
|
||||||
|
Public key (hex) for audi : 0x9a12223615fe9cb2967c2b19eb2a4571dcb38a6e059b746c68d58cd00d408b17
|
||||||
|
Public key (hex) for babe : 0x90be1b9c74b38458219433533456b85100727a7f7d5718f0f5aa2145583d4e09
|
||||||
|
Public key (hex) for slow : 0xc051db0753ad038264d823a71e5c5552e456231b9a1c4e1e7584c6d1c854d44b
|
||||||
|
Public key (hex) for gran : 0x6453e432623c915705afc09e0da19b05b58005d4269838b643f11f5df7524b02
|
||||||
|
|
||||||
|
### Fujisan-1 ###
|
||||||
|
Local identity : 12D3KooWDWU21S6yxDapSnKAS3JnhaQBkT4iNTNQ8NpB4QgNUzxr
|
||||||
|
Public key (hex) wallet : 0xe0a13fb6efe591216ca3f2c5a495b9653a5255d0344b17cf02584c40b5b57043
|
||||||
|
===============================================================================================
|
||||||
|
Public key (hex) for stash : 0xa00bd3284a6824ad7f757d98a2646c055126c5dd6450be383760b4f6c0193e40
|
||||||
|
Public key (hex) for audi : 0x3680593818dfa5ed287de4320f730ae22f2a9c05ebebfad931322411ec508961
|
||||||
|
Public key (hex) for babe : 0x3477d5cb7f3dffb8d76a33f32bcbcb5669f992d56ab222cfa0ab496b5b8bff12
|
||||||
|
Public key (hex) for slow : 0x1cf9b6843abd08eee9f99c5db2c9546fa72ef603a5db0e3c9372e63ec6bb6a06
|
||||||
|
Public key (hex) for gran : 0x3a539da581ced44fe567f9dee8a037fbd6cbe5027afe0c1099e3df0a621f030a
|
||||||