diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..2d363ae --- /dev/null +++ b/Makefile @@ -0,0 +1,13 @@ +.PHONY: help test-rpc test-ws backup + +help: ## Show available targets + @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-15s\033[0m %s\n", $$1, $$2}' + +test-rpc: ## Run RPC connectivity and functionality tests + cd rpc && python3 rpc_test.py + +test-ws: ## Run WebSocket RPC tests + cd rpc && python3 websocket_test.py + +backup: ## Backup validator staking keys + sh chains/backup-validator.sh diff --git a/README.md b/README.md index c207e4b..f53d972 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ Numbers Network is dedicated to preserving digital media provenance and related - [Self-Hosted Faucet](#self-hosted-faucet) - [Wrapped NUM](#wrapped-num) - [Bridge](#bridge) -- [Archieve Node](#archieve-node) +- [Archive Node](#archive-node) ## Mainnet: Jade (玉) @@ -76,6 +76,26 @@ Add Network to MetaMask, [one-click by Chainlist](https://chainlist.org/chain/10 7. VM Genesis: genesis-nativecoin-feemgr-feerecv.json 8. Primary P-Chain Address: `P-fuji1lcztar3x7ra0ajen3dtw4mdhk2cyshfhu2hzgk` +## Fee Configuration + +The following table summarises the key gas fee parameters per environment: + +| Parameter | Mainnet (Jade) | Testnet (Snow) | Devnet | +|---|---|---|---| +| `minBaseFee` | 100,000,000,000 (100 Gwei) | 1,000,000,000 (1 Gwei) | 100,000,000,000 (100 Gwei) | +| `allowFeeRecipients` | `true` | `true` | not set (defaults to `false`) | + +> **Note:** Mainnet `minBaseFee` is 100× higher than testnet. Devnet mirrors the mainnet fee level, not testnet. Keep this in mind when estimating production gas costs from testnet measurements. + +### Fee Recipients + +| Environment | Address | Notes | +|---|---|---| +| Mainnet | `0xe49a1220eE09Fbf0D25CA9e3BB8D5fD356Fc67FF` | `allowFeeRecipients: true` in genesis | +| Testnet | `0xE021c9B8DC3953f4f7f286C44a63f5fF001EF481` | Set in chain config; `allowFeeRecipients: true` in genesis | + +When `allowFeeRecipients` is `false` (or absent), the `feeRecipient` field in the chain config is ignored and all gas fees are burned. + # Avalanche Subnets ## Concepts @@ -161,10 +181,10 @@ created subnet "2fQBahhq3F9eip8KobMgjbvBEahW3153kvAy6YPDrGMTceZcGG" (took 2.0924 Now, time for some config changes on your node(s). -Set --whitelisted-subnets=2fQBahhq3F9eip8KobMgjbvBEahW3153kvAy6YPDrGMTceZcGG and move the compiled VM kmYb53NrmqcW7gfV2FGHBHWXNA6YhhWf7R7LoQeGj9mdD +Set --track-subnets=2fQBahhq3F9eip8KobMgjbvBEahW3153kvAy6YPDrGMTceZcGG and move the compiled VM kmYb53NrmqcW7gfV2FGHBHWXNA6YhhWf7R7LoQeGj9mdD YuaT to /plugins/kmYb53NrmqcW7gfV2FGHBHWXNA6YhhWf7R7LoQeGj9mdDYuaT. When you're finished, restart your node. -✔ Yes, let's continue! I've updated --whitelisted-subnets, built my VM, and restarted my node(s)! +✔ Yes, let's continue! I've updated --track-subnets, built my VM, and restarted my node(s)! 2022-07-11T12:31:13.342Z info client/p.go:294 adding subnet validator {"subnetId": "2fQBahhq3F9eip8KobMgjbvBEahW3153kvAy6YPDrGMTceZcGG", @@ -863,7 +883,7 @@ To bridge native NUM to ERC20/BEP20 NUM, you can use [XY Finance](https://app.xy To know more about NUM token, you can visit the [NUM token website](https://num.numbersprotocol.io/). -# Archieve Node +# Archive Node Archive Node provides full history of the blockchain and does not need to be a validator. diff --git a/chains/testnet/genesis.json b/chains/testnet/genesis.json index a060304..b90426e 100644 --- a/chains/testnet/genesis.json +++ b/chains/testnet/genesis.json @@ -21,7 +21,8 @@ "maxBlockGasCost": 10000000, "targetBlockRate": 2, "blockGasCostStep": 500000 - } + }, + "allowFeeRecipients": true }, "alloc": { "63B7076FC0A914Af543C2e5c201df6C29FCC18c5": { diff --git a/genesis/genesis-nativecoin-feemgr-feerecv.json b/genesis/genesis-nativecoin-feemgr-feerecv.json deleted file mode 100644 index af6ed96..0000000 --- a/genesis/genesis-nativecoin-feemgr-feerecv.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "config": { - "chainId": 10508, - "homesteadBlock": 0, - "eip150Block": 0, - "eip150Hash": "0x2086799aeebeae135c246c65021c82b4e15a2c451340993aacfd2751886514f0", - "eip155Block": 0, - "eip158Block": 0, - "byzantiumBlock": 0, - "constantinopleBlock": 0, - "petersburgBlock": 0, - "istanbulBlock": 0, - "muirGlacierBlock": 0, - "subnetEVMTimestamp": 0, - "feeConfig": { - "gasLimit": 20000000, - "minBaseFee": 1000000000, - "targetGas": 100000000, - "baseFeeChangeDenominator": 48, - "minBlockGasCost": 0, - "maxBlockGasCost": 10000000, - "targetBlockRate": 2, - "blockGasCostStep": 500000 - }, - "allowFeeRecipients": true, - "contractNativeMinterConfig": { - "blockTimestamp": 0, - "adminAddresses": ["0x63B7076FC0A914Af543C2e5c201df6C29FCC18c5"] - }, - "feeManagerConfig": { - "blockTimestamp": 0, - "adminAddresses": ["0x63B7076FC0A914Af543C2e5c201df6C29FCC18c5"] - } - }, - "alloc": { - "63B7076FC0A914Af543C2e5c201df6C29FCC18c5": { - "balance": "0x52B7D2DCC80CD2E4000000" - } - }, - "nonce": "0x0", - "timestamp": "0x0", - "extraData": "0x00", - "gasLimit": "0x1312D00", - "difficulty": "0x0", - "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "0x0000000000000000000000000000000000000000", - "number": "0x0", - "gasUsed": "0x0", - "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000" -} diff --git a/genesis/genesis-nativecoin-feemgr-feerecv.json b/genesis/genesis-nativecoin-feemgr-feerecv.json new file mode 120000 index 0000000..599478a --- /dev/null +++ b/genesis/genesis-nativecoin-feemgr-feerecv.json @@ -0,0 +1 @@ +../chains/testnet/genesis-nativecoin-feemgr-feerecv.json \ No newline at end of file diff --git a/genesis/genesis-nativecoin-feemgr.json b/genesis/genesis-nativecoin-feemgr.json deleted file mode 100644 index 9e94914..0000000 --- a/genesis/genesis-nativecoin-feemgr.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "config": { - "chainId": 10508, - "homesteadBlock": 0, - "eip150Block": 0, - "eip150Hash": "0x2086799aeebeae135c246c65021c82b4e15a2c451340993aacfd2751886514f0", - "eip155Block": 0, - "eip158Block": 0, - "byzantiumBlock": 0, - "constantinopleBlock": 0, - "petersburgBlock": 0, - "istanbulBlock": 0, - "muirGlacierBlock": 0, - "subnetEVMTimestamp": 0, - "feeConfig": { - "gasLimit": 20000000, - "minBaseFee": 1000000000, - "targetGas": 100000000, - "baseFeeChangeDenominator": 48, - "minBlockGasCost": 0, - "maxBlockGasCost": 10000000, - "targetBlockRate": 2, - "blockGasCostStep": 500000 - }, - "contractNativeMinterConfig": { - "blockTimestamp": 0, - "adminAddresses": ["0x63B7076FC0A914Af543C2e5c201df6C29FCC18c5"] - }, - "feeManagerConfig": { - "blockTimestamp": 0, - "adminAddresses": ["0x63B7076FC0A914Af543C2e5c201df6C29FCC18c5"] - } - }, - "alloc": { - "63B7076FC0A914Af543C2e5c201df6C29FCC18c5": { - "balance": "0x52B7D2DCC80CD2E4000000" - } - }, - "nonce": "0x0", - "timestamp": "0x0", - "extraData": "0x00", - "gasLimit": "0x1312D00", - "difficulty": "0x0", - "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "0x0000000000000000000000000000000000000000", - "number": "0x0", - "gasUsed": "0x0", - "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000" -} diff --git a/genesis/genesis-nativecoin-feemgr.json b/genesis/genesis-nativecoin-feemgr.json new file mode 120000 index 0000000..92d887f --- /dev/null +++ b/genesis/genesis-nativecoin-feemgr.json @@ -0,0 +1 @@ +../chains/testnet/genesis-nativecoin-feemgr.json \ No newline at end of file diff --git a/genesis/genesis.json b/genesis/genesis.json deleted file mode 100644 index a060304..0000000 --- a/genesis/genesis.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "config": { - "chainId": 10508, - "homesteadBlock": 0, - "eip150Block": 0, - "eip150Hash": "0x2086799aeebeae135c246c65021c82b4e15a2c451340993aacfd2751886514f0", - "eip155Block": 0, - "eip158Block": 0, - "byzantiumBlock": 0, - "constantinopleBlock": 0, - "petersburgBlock": 0, - "istanbulBlock": 0, - "muirGlacierBlock": 0, - "subnetEVMTimestamp": 0, - "feeConfig": { - "gasLimit": 20000000, - "minBaseFee": 1000000000, - "targetGas": 100000000, - "baseFeeChangeDenominator": 48, - "minBlockGasCost": 0, - "maxBlockGasCost": 10000000, - "targetBlockRate": 2, - "blockGasCostStep": 500000 - } - }, - "alloc": { - "63B7076FC0A914Af543C2e5c201df6C29FCC18c5": { - "balance": "0x52B7D2DCC80CD2E4000000" - } - }, - "nonce": "0x0", - "timestamp": "0x0", - "extraData": "0x00", - "gasLimit": "0x1312D00", - "difficulty": "0x0", - "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "0x0000000000000000000000000000000000000000", - "number": "0x0", - "gasUsed": "0x0", - "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000" -} diff --git a/genesis/genesis.json b/genesis/genesis.json new file mode 120000 index 0000000..729bbd4 --- /dev/null +++ b/genesis/genesis.json @@ -0,0 +1 @@ +../chains/testnet/genesis.json \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..1ed21c7 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +requests +websockets \ No newline at end of file