├── .gitignore
├── 184_patch
├── patch.md
└── patch.sh
├── README.md
├── README_CN.md
├── README_CN_testnet.md
├── README_testnet.md
├── alert
└── alertmanager.yml.tmpl
├── archive-node.md
├── changelog
├── README.md
├── evm-istanbul.md
├── sync-interval.png
├── v1.1-release-note.md
├── v1.10.0-release-note.md
├── v1.10.1-release-note.md
├── v1.11.0-release-note.md
├── v1.11.1-release-note.md
├── v1.11.2-release-note.md
├── v1.12.0-release-note.md
├── v1.12.1-release-note.md
├── v1.13.0-release-note.md
├── v1.13.1-release-note.md
├── v1.14.0-release-note.md
├── v1.14.1-release-note.md
├── v1.14.2-release-note.md
├── v1.2-instruction.md
├── v1.2-release-note.md
├── v1.3-release-note.md
├── v1.4-release-note.md
├── v1.5-release-note.md
├── v1.6-release-note.md
├── v1.7-release-note.md
├── v1.8-release-note.md
├── v1.9.0-release-note.md
├── v1.9.1-release-note.md
├── v1.9.2-release-note.md
├── v2.0.0-release-note.md
├── v2.0.1-release-note.md
├── v2.0.2-release-note.md
├── v2.0.3-release-note.md
├── v2.0.4-release-note.md
├── v2.1.0-release-note.md
└── v2.1.2-release-note.md
├── claim_reward_distribute_voters.md
├── claim_reward_distribute_voters_CN.md
├── config_archive_mainnet.yaml
├── config_mainnet.yaml
├── config_testnet.yaml
├── deployment
└── contracts.md
├── designdoc
├── blockdao.jpg
└── blockdao.md
├── genesis_mainnet.yaml
├── genesis_testnet.yaml
├── get_elected_testnet.md
├── infra
├── infra.png
├── infraguide.md
├── infraguide_CN.md
├── monitoring
│ ├── README.md
│ ├── grafana_01.png
│ ├── grafana_02.png
│ ├── iotex-grafana.json
│ ├── iotex_metric.png
│ └── iotex_targets.png
├── security_practice.md
└── security_practice_CN.md
├── launch_playbook_mainnet.md
├── launch_playbook_mainnet_CN.md
├── monitor
├── .env
├── alert.rules
├── docker-compose.yml
├── docker-compose.yml.gateway
├── docker-compose.yml.marketplace
├── example
│ ├── example_IoTeX.json
│ ├── example_dashboards.yaml
│ ├── example_datasource.yaml
│ ├── example_monitor_dockerfile
│ └── example_run.sh
└── prometheus.yml
├── native-to-erc20.abi
├── pharos.md
├── pharos
└── pharos.md
├── poll
├── community-poll.md
└── poll.abi
├── postmortem
├── 2019-04-23.md
├── 2019-06-11.md
├── 2019-06-25.md
├── 2019-10-30.md
├── 2020-01-29.md
└── 2020-03-17.md
├── release_flow.md
├── rollbacks
└── testnet-2021-05-08.md
├── scripts
├── get_systemstat.sh
├── setup_fullnode.sh
├── setup_fullnode_marketplace.sh
├── setup_monitor_alert.sh
├── stop_fullnode.sh
└── update_silence.sh
├── tools
└── auto-update
│ ├── LICENSE
│ ├── Makefile
│ ├── README.md
│ ├── auto-update
│ ├── auto-update_darwin-amd64
│ ├── auto-update_linux-amd64
│ ├── go.mod
│ ├── go.sum
│ └── main.go
├── trie.db.patch
└── tube
├── e2n.abi
├── erc20-to-native.md
├── n2e.abi
├── native-to-erc20.md
└── tube.md
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea
2 | data/
3 | etc/
4 | log/
--------------------------------------------------------------------------------
/184_patch/patch.md:
--------------------------------------------------------------------------------
1 | # v1.8.4 patch
2 | In the past 2 weeks certain IoTeX nodes run into an issue of failing to sync with
3 | most recent blocks. After careful analysis it was root-caused to an incorrect state
4 | in memory storage, which may occur when a node restarts.
5 |
6 | ## Impact
7 | A node could be affected by this issue if it has restarted sometime between Sep 30
8 | and Oct 08, 2022. It will get stuck on a certain height if it happens.
9 |
10 | ## Solution
11 | This issue has been fixed in the v1.8.4 release. A script tool has been provided
12 | to download a patch file, which would correctly restore the internal state.
13 |
14 | This fix is **not** a hard-fork, and is **only** needed one-time. After applying
15 | the patch, the node will be able to successfully restart and continue to run. It
16 | does **not** need to rely on this patch in the future restarts.
17 |
18 | Follow steps below to apply the patch and upgrade to v1.8.4.
19 |
20 | ## Apply the patch
21 | 1. First, stop your IoTeX node and remove the docker container. This is **needed**
22 | to ensure that the patch fix can be applied correctly and the node can successfully
23 | restart later.
24 | 2. Download the patch script:
25 | ```
26 | curl https://raw.githubusercontent.com/iotexproject/iotex-bootstrap/v1.8.4/184_patch/patch.sh > ./patch.sh
27 | ```
28 | 3. `chmod a+x ./patch.sh`
29 | 4. Make sure you have the `$IOTEX_HOME` environment variable properly set. It is
30 | the full-node home directory containing all node settings and data files in the
31 | `/etc`, `/data`, `/log` sub-directories. By default, it is `/iotex-var`, you can
32 | check it by `echo $IOTEX_HOME`. If it is not set, when you run the script in the
33 | next step you will be asked to input it, make sure you enter the right directory
34 | using absolute path.
35 | 5. Run the script `./patch.sh`, it will download the proper patch file, you will
36 | see message like:
37 | ```
38 | download /iotex-var/data/19901069.patch success, please upgrade to v1.8.4 and restart iotex-server
39 | ```
40 |
41 | ## Upgrade to v1.8.4
42 | Now with the correct path file in place, it's time to upgrade to v1.8.4.
43 | ```
44 | docker pull iotex/iotex-core:v1.8.4
45 | ```
46 | Restart your node as usual, but use `iotex/iotex-core:v1.8.4` image in the docker
47 | script/commandline. Your node should apply the patch file, and then continue to
48 | run normally.
49 |
--------------------------------------------------------------------------------
/184_patch/patch.sh:
--------------------------------------------------------------------------------
1 | read -p "Please confirm that the iotex server process has been stopped [yes/no] (Default: no)" check
2 |
3 | if [ "${check}"X != "yes"X ];then
4 | echo "the iotex server process is not stopped. Please stop the process first"
5 | exit 1
6 | fi
7 |
8 | #check IOTEX_HOME variable & statedb path
9 | if [ ! $IOTEX_HOME ] || [ ! -f ${IOTEX_HOME}/data/trie.db ];then
10 | read -p "Input your \$IOTEX_HOME : " inputdir
11 | IOTEX_HOME=${inputdir}
12 | fi
13 |
14 | echo "IOTEX_HOME : $IOTEX_HOME"
15 |
16 |
17 | cd $IOTEX_HOME
18 |
19 | #download readtip file
20 | curl https://storage.googleapis.com/blockchain-archive/readtip > $IOTEX_HOME/readtip
21 |
22 | if [ ! -f $IOTEX_HOME/readtip ];then
23 | echo "$IOTEX_HOME/readtip does not exist"
24 | exit 1
25 | fi
26 |
27 | chmod a+x $IOTEX_HOME/readtip
28 |
29 | tipHeight=`$IOTEX_HOME/readtip -state-db-path=$IOTEX_HOME/data/trie.db`
30 |
31 | if [ ! $tipHeight ];then
32 | echo "can't get $tipHeight"
33 | exit 1
34 | fi
35 |
36 | echo "tip height : $tipHeight"
37 |
38 | #download the patch file
39 | if [ $tipHeight -gt 19778036 ];then
40 | ServerIP='patch.iotex.io'
41 | patchUrl=`curl https://$ServerIP/$tipHeight`
42 | echo "the patch url: $patchUrl"
43 |
44 | patchFile=$IOTEX_HOME/data/$tipHeight.patch
45 | curl $patchUrl >$patchFile
46 |
47 | if [ ! -f $patchFile ];then
48 | echo "$patchFile does not exist"
49 | exit 1
50 | fi
51 | fi
52 |
53 | echo "download $patchFile success, please upgrade to v1.8.4 and restart iotex-server"
54 |
--------------------------------------------------------------------------------
/alert/alertmanager.yml.tmpl:
--------------------------------------------------------------------------------
1 | templates:
2 | - '/alertmanager/template/*.tmpl'
3 |
4 | route:
5 | group_by: ['alertname']
6 | group_wait: 10s
7 | group_interval: 10s
8 | repeat_interval: 10m
9 | receiver: 'email-receiver'
10 |
11 | receivers:
12 | - name: 'email-receiver'
13 | email_configs:
14 | - to: '_EMAIL_'
15 | from: '_EMAIL_'
16 | smarthost: '_SMTP_HOST_:_SMTP_PORT_'
17 | auth_username: '_EMAIL_'
18 | auth_password: '_PASSWORD_'
19 | headers: { Subject: "IOTEX NODE Alert" }
20 |
--------------------------------------------------------------------------------
/changelog/README.md:
--------------------------------------------------------------------------------
1 | - We have upgraded testnet and mainnet to `v1.1.1`. A improvement to blocksync request handling is introduced. That version doesn't have a activation height.
2 | - We have upgraded testnet and mainnet to `v1.1.0`. The breaking changes which will be activated on mainnet at block height 6544441.
3 | - We have upgraded testnet and mainnet to `v1.0.0`. The breaking changes which will be activated on mainnet at block height 5157001.
4 | - We have upgraded testnet to `v1.0.0-rc`. This version introduces native staking on IoTeX chain.
5 | - We have upgraded testnet and mainnet to `v0.11.1`. A blocker indexer racing issue is fixed. The breaking changes which will still be activated on mainnet at block height 4478761.
6 | - We have upgraded testnet and mainnet to `v0.11.0`. This version introduces delegates probation. It contains breaking changes which will be activated on mainnet at block height 4478761.
7 | - We have upgraded testnet to `v0.11.0-rc`. This version introduces probation.
8 | - We added auto upgrade feature in our upgrader. Auto upgrade will check if there is an avilable upgrade every 3 days and automactilly doing the upgrade.
9 | - We have upgraded testnet and mainnet to `v0.10.3`. This version improve stability on reading native staking buckets.
10 | - We have upgraded mainnet to `v0.10.2`. It contains breaking changes which will be activated on block height 3238921. Delegates must upgrade your node to the new version before that.
11 | - We have upgraded testnet to `v0.10.2`. This version correct a gas limit issue for reading native vote bucket.
12 | - We have upgraded mainnet to `v0.10.0`. It contains breaking changes which will be activated on block height 1816201. Delegates must upgrade your node to the new version before that.
13 | - We have upgraded testnet to `v0.10.0`. This version reduce block interval to 5s.
14 | - We found a bug in `v0.9.0` which may cause the nodes not agree on the delegates list. We already pushed out a build `v0.9.2` to address this issue.
15 | - `v0.9.0` is released, so that delegates should upgrade their softwares to this new version. The fork will happen at block height 1641601. Before restarting with `v0.9.0` docker image, please re-pull the up-to-date mainnet genesis config file first. It's a MUST step for this upgrade. In addtion, note that this upgrade will result in db migration upon restart which could takes 30min to 1hr to complete. Therefore, please upgrade when the delegate node is not in the active consensus epoch.
16 | - We have reset testnet, and deployed `v0.8.3`, and finally upgraded it to `v0.9.0`. The genesis config file has been updated as well.
17 | - We have upgraded mainnet to `v0.8.3`. It contains breaking changes which will be activated on block height 1512001. Delegates must upgrade your node to the new version before that.
18 | - We have upgraded testnet to `v0.8.4`.
19 | - We have upgraded testnet to `v0.8.3`, which contains the new error code, and consensus improvement.
20 |
--------------------------------------------------------------------------------
/changelog/evm-istanbul.md:
--------------------------------------------------------------------------------
1 | # EVM Istanbul upgrade
2 |
3 | Starting v1.3 the IoTeX blockchain supports EVM Istanbul, which brings upgrades
4 | that improve denial-of-service attack resilience, and adjust gas costs for EVM
5 | storage and zk-SNARKs and zk-STARKs, allowing privacy applications based on
6 | SNARK and STARK to scale at a cheaper cost.
7 |
8 | Here's the list of EIP adopted in the Istanbul upgrade:
9 |
10 | - [EIP-152](https://eips.ethereum.org/EIPS/eip-152) -- precompiled Blake2b to
11 | facilitate Zcash
12 | - [EIP-1108](https://eips.ethereum.org/EIPS/eip-1108) -- better bn256 library
13 | for faster EC computation and reduced gas cost
14 | - [EIP-1344](https://eips.ethereum.org/EIPS/eip-1344) -- adds the CHAINID opcode
15 | to return current chain's EIP-155 unique identifier inside smart contract
16 | - [EIP-1884](https://eips.ethereum.org/EIPS/eip-1884) -- repricing for trie-size
17 | -dependent opcodes
18 | - [EIP-2028](https://eips.ethereum.org/EIPS/eip-2028) -- transaction data gas cost
19 | reduction
20 | - [EIP-2200](https://eips.ethereum.org/EIPS/eip-2200) -- cost reduction of storage
21 | in the EVM
22 |
23 | ## Gas cost change
24 | Here's a summary of gas cost change as a result of these EIPs
25 |
26 | | Precompiled contract | Address | Current gas cost | Updated gas cost |
27 | | --- | --- | --- | --- |
28 | | ECADD | 0x06 | 500 | 150 |
29 | | ECMUL | 0x07 | 40000 | 6000 |
30 | | Pairing check | 0x08 | 80000*k* + 100000 | 34000*k* + 45000 |
31 |
32 | *k* is the number of pairings being computed
33 |
34 | | Opcode | Address | Current gas cost | Updated gas cost |
35 | | --- | --- | --- | --- |
36 | | SLOAD | 0x54 | 200 | 800 |
37 | | BALANCE | 0x31 | 400 | 700 |
38 | | EXTCODEHASH | 0x3F | 400 | 700 |
39 | | SELFBALANCE | 0x47 | n/a | 5 |
40 | | Calldata | n/a | 68 per byte | 16 per byte |
41 |
42 |
--------------------------------------------------------------------------------
/changelog/sync-interval.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iotexproject/iotex-bootstrap/b27aef5305b38c4af2cebe9df5d6703fc8498289/changelog/sync-interval.png
--------------------------------------------------------------------------------
/changelog/v1.1-release-note.md:
--------------------------------------------------------------------------------
1 | # v1.1 Release Note
2 |
3 | ### v1.1.3 Release Note
4 | 1. support of getAllLogs and GetActPoolActions APIs
5 | 2. `ioctl` support HD wallet, `ioctl contract` improvement
6 | 3. bug fixes and test coverage improved
7 |
8 | ### v1.1.2 Release Note
9 | 1. Improve transaction log APIs
10 | 2. fixed issue where staking protocol account data height is not accurate
11 | 3. Add configuration to allow node to split chain db file and apply data compression using Snappy on chain db data
12 | In order to turn the compression on, you will need to set the following setting in your config.yaml:
13 | ```
14 | db:
15 | v2BlocksToSplitDB: 1000000
16 | ```
17 | 1,000,000 is the maximum number of blocks a splitted chain db file may contain(the estimated size of resulting chain db file is about 4GB). You can change to another number that fits your needs best.
18 |
19 |
20 | ### v1.1.1 Release Note
21 | 1. Improve node stability on poor blocksync request handling
22 | 2. Fix a nill ptr issue on blockmeta API when gateway is turned off
23 |
24 |
25 | ### v1.1.0 Release Note
26 |
27 | 1. Support of Reclaim Buckets
28 | One can now transfer the ownership of a bucket that is previously staked by a private key in Ethereum hardware wallet to another designated IoTeX address
29 | - One signs a message using the hardware wallet to prove one's ownership of the original bucket and designation of a new address, and upon protocol's verification, that bucket will be transferred to the new address on IoTeX blockchain.
30 | - To use it, go to https://member.iotex.io/reclaim-bucket/, or download the latest ioctl tool, type in "ioctl stake2 reclaim", and follow the instruction.
31 |
32 | 2. New Transaction Log
33 | One important aspect of blockchain is record of all transactions involving token change-hand for accounting/auditing purpose. This release has added this capability by providing two new gRPC APIs as below. Please refer to https://github.com/iotexproject/iotex-proto/tree/v0.4.0 for details about latest API.
34 | - "GetTransactionLogByActionHash": query transaction logs by action hash
35 | - "GetTransactionLogByBlockHeight": query transaction logs by block height
36 |
37 | 3. Visibility about Staking
38 | The protocol and the latest ioctl tool provide support of visibility of the native staking. The new commands can be used as below:
39 | - "ioctl account balance io000000000000000000000000stakingprotocol": this shows the total amount of staked token
40 | - "ioctl account balance io0000000000000000000000rewardingprotocol": this shows the total amount of available rewards
41 |
42 | 4. Optimize Docker Image
43 | v1.1.0 brings more lean and secure binaries by switching the docker base image to Alpine, a lightweight and secure Linux distribution. As a result, the image size reduced from 1.99GB to only 93.9MB, which enables a faster download and easier installation.
44 |
45 | 5. Misc
46 | - Upgrade of Protobuf
47 | - Improvement of ioctl
48 | - Improve the performance of trie
49 | - Bug fixes
50 |
--------------------------------------------------------------------------------
/changelog/v1.10.0-release-note.md:
--------------------------------------------------------------------------------
1 | # v1.10.0 Release Note
2 |
3 | ## Summary
4 | **v1.10.0 has a hardfork, which will be activated at block height
5 | 22,991,401 (ETA is around 04/04/2023 11pm UTC) on IoTeX mainnet.**
6 |
7 | All nodes **must** upgrade to this release, or otherwise the node won't be able
8 | to sync with the IoTeX blockchain after the activation block.
9 |
10 | Also we'll use this release opportunity to disable the auto-upgrader, since the
11 | auto-upgrader is a fixed script that cannot adapt perfectly well to each release
12 | scenario, and has caused a couple of failed upgrades in the past.
13 |
14 | In the past, if you use the one-line upgrader tool to run your IoTeX node, please
15 | continue to use it to do the v1.10.0 upgrade. This time the script will turn off
16 | the auto-upgrader (if it was turned on before). Run the script below just as before.
17 | ```bash
18 | sudo bash # If your docker requires root privilege
19 | bash <(curl -s https://raw.githubusercontent.com/iotexproject/iotex-bootstrap/master/scripts/setup_fullnode.sh)
20 | ```
21 |
22 | If you use the very long `docker run` command (like below) to run your IoTeX node,
23 | don't worry about the auto-upgrader since it is **not** turned on. Continue to
24 | upgrade your node using the v1.10.0 image:
25 | ```
26 | docker stop iotex
27 | docker rm iotex
28 | docker run -d --restart on-failure --name iotex \
29 | -p 4689:4689 \
30 | -p 8080:8080 \
31 | -v=$IOTEX_HOME/data:/var/data:rw \
32 | -v=$IOTEX_HOME/log:/var/log:rw \
33 | -v=$IOTEX_HOME/etc/config.yaml:/etc/iotex/config_override.yaml:ro \
34 | -v=$IOTEX_HOME/etc/genesis.yaml:/etc/iotex/genesis.yaml:ro \
35 | iotex/iotex-core:v1.10.0 \
36 | iotex-server \
37 | -config-path=/etc/iotex/config_override.yaml \
38 | -genesis-path=/etc/iotex/genesis.yaml
39 | ```
40 |
41 | ## Breaking Changes
42 | v1.10.0 enables 2 important features:
43 | 1. Claim reward via web3.js protocol
44 | 2. Node status monitoring by p2p messaging
45 |
46 | ### Claim reward via web3.js protocol
47 | Similar to how we enabled sending transfer and staking actions via web3.js protocol,
48 | in v1.10.0 claim reward is enabled as well. Delegates can now send claim reward action
49 | using Metamask.
50 |
51 | ### Node status monitoring by p2p messaging
52 | Currently, the IoTeX node is relying on a pre-defined HTTP port to collect the
53 | real-time running status, such as the software version and blockchain height.
54 | This means that delegate nodes need to open up that HTTP port which might be a
55 | security risk, especially for nodes running on clour service provider. It also
56 | requires delegate nodes to expose their public IP address, which is not preferred
57 | due to both security and privacy concerns, and creates additional maintenance
58 | burden to manually update the IP address in case it changes.
59 |
60 | In v1.10.0, a new node status monitoring solution is implemented based on the
61 | existing p2p network. By exchanging messages about their running status using
62 | the p2p network, delegate nodes no longer have to publicize their IP address nor
63 | open that specific HTTP port. In addition, the external IP address of a node can
64 | now freely change (like being assigned a new IP address after reboot) without
65 | worrying about status reporting/collection.
66 |
67 | Also in upcoming new releases, we'll introduce more advanced node status monitor
68 | functionalities. For instance, an automatic alert service where delegates can
69 | register a webhook and receive notification when the node is becoming offline or
70 | entering probation.
71 |
72 | ## Upgrade Priority
73 | v1.10.0 comes with a hardfork, so all nodes **must** upgrade in order to keep
74 | syncing with the IoTeX blockchain
75 |
76 | | Node type | Action |
77 | | ---------- | ------------ |
78 | | Delegate | Must upgrade |
79 | | Fullnode | Must upgrade |
80 |
81 | ## Important Commits (not a complete list)
82 | 1. [genesis] set Palau to activate at 04-04-2023 11pm UTC [#3823](https://github.com/iotexproject/iotex-core/pull/3823)
83 | 2. [nodeinfo] keep updating broadcast list [#3818](https://github.com/iotexproject/iotex-core/pull/3818)
84 | 3. [config] enable web3 staking and broadcast node info at Palau height [#3810](https://github.com/iotexproject/iotex-core/pull/3810)
85 | 4. [API] add batch size limit for jsonrpc [#3805](https://github.com/iotexproject/iotex-core/pull/3805)
86 | 5. implement isDelegate() in nodeinfo [#3804](https://github.com/iotexproject/iotex-core/pull/3804)
87 | 6. [nodeinfo] broadcast node's height info into p2p network [#3744](https://github.com/iotexproject/iotex-core/pull/3744)
88 | 7. [goMod] Upgrade iotex-proto to 0.5.13 [#3799](https://github.com/iotexproject/iotex-core/pull/3799)
89 | 8. [state] Remove receipt checking after runAction [#3780](https://github.com/iotexproject/iotex-core/pull/3780)
90 | 9. [pkg] Introduce batchWriter [#3581](https://github.com/iotexproject/iotex-core/pull/3581)
91 | 10. [action] Clean code in handleTransfer [#3761](https://github.com/iotexproject/iotex-core/pull/3761)
92 | 11. [state] Return err if receipt is nil [#3759](https://github.com/iotexproject/iotex-core/pull/3759)
93 | 12. [block] deprecate ConvertToBlockHeaderPb() [#3774](https://github.com/iotexproject/iotex-core/pull/3774)
94 | 13. [db] Optimize memory relocation in writeinfo [#3763](https://github.com/iotexproject/iotex-core/pull/3763)
95 | 14. [rewarding] add active web3 rewarding settings [#3740](https://github.com/iotexproject/iotex-core/pull/3740)
96 | 15. update docker build command [#3751](https://github.com/iotexproject/iotex-core/pull/3751)
97 | 16. complete web3 intergrity test [#3743](https://github.com/iotexproject/iotex-core/pull/3743)
98 | 17. [config] move config.API to api package [#3739](https://github.com/iotexproject/iotex-core/pull/3739)
99 | 18. [config] move config.Blocksync to blocksync package [#3736](https://github.com/iotexproject/iotex-core/pull/3736)
100 | 19. [action] validate candidate name [#3705](https://github.com/iotexproject/iotex-core/pull/3705)
101 | 20. [config] move config.Consensus to consensus package [#3735](https://github.com/iotexproject/iotex-core/pull/3735)
102 | 21. [api] web3 rewarding action [#3691](https://github.com/iotexproject/iotex-core/pull/3691)
103 | 22. [tests] add more cases for gas refund [#3707](https://github.com/iotexproject/iotex-core/pull/3707)
104 | 23. use config.GasStation instead of config.API [#3721](https://github.com/iotexproject/iotex-core/pull/3721)
105 | 24. remove nonce field [#3714](https://github.com/iotexproject/iotex-core/pull/3714)
106 | 25. move IsValidCandidateName to action package [#3706](https://github.com/iotexproject/iotex-core/pull/3706)
107 |
--------------------------------------------------------------------------------
/changelog/v1.10.1-release-note.md:
--------------------------------------------------------------------------------
1 | # v1.10.1 Release Note
2 |
3 | ## Summary
4 | v1.10.1 is a maintenance release, with couple of improvements:
5 |
6 | 1. Added ChatGPT code review, leveraging the latest AI technology to safeguard
7 | the code quality.
8 | 2. Implemented 2 web3js API: `debug_traceCall` and `debug_traceTransaction` which
9 | further increased our chain's compatibility with the Ethereum ecosystem.
10 | 3. Limited batch size for web3 API request, to help rate-limit the API endpoint and
11 | protect against potential DDoS attack.
12 |
13 | ## Upgrade Priority
14 | Upgrade is not necessary, nodes can continue to run normally.
15 |
16 | | Node type | Action |
17 | | ---------- | ------------ |
18 | | Delegate | Not required |
19 | | Fullnode | Not required |
20 |
21 | ## Commits In This Release
22 | 1. [context] remove EnableWeb3Rewarding flag [#3852](https://github.com/iotexproject/iotex-core/pull/3852)
23 | 2. [context] remove FixRewardErroCheckPosition flag [#3851](https://github.com/iotexproject/iotex-core/pull/3851)
24 | 3. [api] ServerV2.Stop() use correct context [#3837](https://github.com/iotexproject/iotex-core/pull/3837)
25 | 4. add chatgpt code review [#3824](https://github.com/iotexproject/iotex-core/pull/3824)
26 | 5. [API] add limit batch request for web3 API [#3822](https://github.com/iotexproject/iotex-core/pull/3822)
27 | 6. [API] implement web3 API debug_traceCall [#3813](https://github.com/iotexproject/iotex-core/pull/3813)
28 | 7. [consensus] Add proposer role [#3814](https://github.com/iotexproject/iotex-core/pull/3814)
29 | 8. [API] implement web3 API debug_traceTransaction [#3779](https://github.com/iotexproject/iotex-core/pull/3779)
30 | 9. [state] remove unnecessary new(big.Int) [#3778](https://github.com/iotexproject/iotex-core/pull/3778)
31 |
--------------------------------------------------------------------------------
/changelog/v1.11.1-release-note.md:
--------------------------------------------------------------------------------
1 | # v1.11.1 Release Note
2 |
3 | ## Summary
4 | **v1.11.1 is an important maintenance release, which fixes a bug in the system
5 | staking contract.** The issue was discovered in a pro-active manner, and
6 | precautionary actions are taken to make sure that no actual harm/damage is done
7 | to the system staking.
8 |
9 | All nodes **must** upgrade to this release, otherwise the node runs the risk of
10 | not being able to sync with the IoTeX blockchain after other nodes have upgraded.
11 |
12 | **Note:**
13 | There's no change to the latest config.yaml and genesis.yaml. You only need to
14 | restart the node with the new image.
15 |
16 | ## Other Improvements
17 | v1.11.1 release also comes with a couple of improvements:
18 | 1. Enforce height check for system staking indexer to increase error detection
19 | and handling robustness
20 | 2. Fix revert message in eth_call
21 | 3. Fix panic: concurrent write to websocket connection
22 | 4. Fix staking action ToEthTx() panic
23 | 5. `ioctl] action transfer` now supports 0x address format
24 | 6. Added a new `ioctl ins register` command for INS service
25 |
26 | ## Upgrade Priority
27 | v1.11.1 contains a mandatory bug fix, so all nodes **must** upgrade in order to
28 | keep syncing with the IoTeX blockchain
29 |
30 | | Node type | Action |
31 | | ---------- | ------------ |
32 | | Delegate | Must upgrade |
33 | | Fullnode | Must upgrade |
34 |
35 | ## Important Commits (not a complete list)
36 | 1. [blockindex] return empty result before contract deploy height [#3928](https://github.com/iotexproject/iotex-core/pull/3928)
37 | 2. [blockindex] restrict height for sgdindexer during write and read operation [#3926](https://github.com/iotexproject/iotex-core/pull/3926)
38 | 3. [blockindex] restrict height for contract_staking_indexer during read operation [#3927](https://github.com/iotexproject/iotex-core/pull/3927)
39 | 4. [contractstaking] fix transaction for merge after create bucket [#3924](https://github.com/iotexproject/iotex-core/pull/3924)
40 | 5. [blockindex] introduce indexergroup [#3906](https://github.com/iotexproject/iotex-core/pull/3906)
41 | 6. [api] fix revert message in eth_call [#3922](https://github.com/iotexproject/iotex-core/pull/3922)
42 | 7. [ioctl] action transfer supports 0x address [#3917](https://github.com/iotexproject/iotex-core/pull/3917)
43 | 8. [action] simplify address generation [#3913](https://github.com/iotexproject/iotex-core/pull/3913)
44 | 9. [chainservice] build contract staking indexer only when staking protocol enabled [#3886](https://github.com/iotexproject/iotex-core/pull/3886)
45 | 10. [api] fix panic: concurrent write to websocket connection [#3908](https://github.com/iotexproject/iotex-core/pull/3908)
46 | 11. [staking] fix ToEthTx() panic [#3910](https://github.com/iotexproject/iotex-core/pull/3910)
47 | 12. [ioctl] support querying delegate by operator address [#3904](https://github.com/iotexproject/iotex-core/pull/3904)
48 | 13. [ioctl] Add INS register cmd [#3903](https://github.com/iotexproject/iotex-core/pull/3903)
49 | 14. [staking] make contract staking indexer nullable [#3883](https://github.com/iotexproject/iotex-core/pull/3883)
50 | 15. [iip15] improve sgd indexer test coverage [#3893](https://github.com/iotexproject/iotex-core/pull/3893)
51 |
52 |
--------------------------------------------------------------------------------
/changelog/v1.11.2-release-note.md:
--------------------------------------------------------------------------------
1 | # v1.11.2 Release Note
2 |
3 | ## Summary
4 | v1.11.2 is a minor release, which fixes a format issue in the return data of
5 | eth_getTransactionByHash API call.
6 |
7 | Only API nodes need to upgrade to this release. Delegate nodes can continue to
8 | run v1.11.1 normally, and are **NOT** required to upgrade.
9 |
10 | ## Bug Fix
11 | 1. TransactionByHash returns error [#3932](https://github.com/iotexproject/iotex-core/issues/3932)
12 |
13 | ## Upgrade Priority
14 | v1.11.2 contains fix for an API return data format issue. Only API nodes need to
15 | upgrade to this release.
16 |
17 | | Node type | Action |
18 | | ---------- | ------------ |
19 | | Delegate | Not needed |
20 | | API node | Recommended |
21 |
22 | ## Commits in This Release
23 | 1. [api] fix json unmarshal error when calling TransactionByHash via ethclient [#3933](https://github.com/iotexproject/iotex-core/pull/3933)
24 |
--------------------------------------------------------------------------------
/changelog/v1.12.0-release-note.md:
--------------------------------------------------------------------------------
1 | # v1.12.0 Release Note
2 |
3 | ## Summary
4 | **v1.12.0 has a hardfork, which will be activated at block height
5 | 26,704,441 (ETA is around 11/05/2023 23:59pm UTC) on IoTeX mainnet.**
6 |
7 | All nodes **must** upgrade to this release, otherwise the node runs the risk of
8 | not being able to sync with the IoTeX blockchain after other nodes have upgraded.
9 |
10 | **Note:**
11 | There's no change to the mainnet config.yaml and genesis.yaml. You only need to
12 | restart your node with the new image.
13 |
14 | v1.12.0 marks a substantial advancement by upgrading the EVM to the Bellatrix
15 | release, surpassing the previous London release. Furthermore, our team is actively
16 | preparing for the imminent Shanghai release, with more desired features planned
17 | for subsequent releases.
18 |
19 | v1.12.0 has also enabled weighted vote counting for the Staking Bucket NFT, a
20 | feature newly launched in July with version 1.11.0. As a result, buckets created
21 | under this new feature will now enjoy an equal voting power and receive identical
22 | rewards as those of native buckets with equal balances.
23 |
24 | ## Other Improvements
25 | v1.12.0 release also comes with a couple of improvements:
26 | 1. Add `ioctl bc delegate` command, allowing users to conveniently access the
27 | detailed information of any delegate by name or operator address
28 | 2. Fix json unmarshal error when calling `eth_getTransactionByHash` via ethclient
29 |
30 | ## Upgrade Priority
31 | v1.12.0 comes with a hardfork, so all nodes **must** upgrade in order to keep
32 | syncing with the IoTeX blockchain
33 |
34 | | Node type | Action |
35 | | ---------- | ------------ |
36 | | Delegate | Must upgrade |
37 | | Fullnode | Must upgrade |
38 |
39 | ## Important Commits (not a complete list)
40 | 1. [genesis] set Redsea to activate at 11-05-2023 23:59pm UTC [#3949](https://github.com/iotexproject/iotex-core/pull/3949)
41 | 2. [emv] enable Bellatrix at Redsea height [#3942](https://github.com/iotexproject/iotex-core/pull/3942)
42 | 3. [staking] fix weighted votes of contract staking bucket [#3936](https://github.com/iotexproject/iotex-core/pull/3936)
43 | 4. [config] Add RedseaHeight [#3934](https://github.com/iotexproject/iotex-core/pull/3934)
44 | 5. [api] fix json unmarshal error when calling TransactionByHash via ethclient [#3933](https://github.com/iotexproject/iotex-core/pull/3933)
45 |
--------------------------------------------------------------------------------
/changelog/v1.12.1-release-note.md:
--------------------------------------------------------------------------------
1 | # v1.12.1 Release Note
2 |
3 | ## Summary
4 | v1.12.1 is the first maintenance release after the latest release v1.12.0. It
5 | comes with several important improvements and fixes for the API functionality.
6 | This release introduces a significant enhancement to the transaction pool
7 | functionality. First, pending transactions that can soon be included in upcoming
8 | blocks will no longer be expired. Secondly, a mechanism has been implemented to
9 | replace less favorable pending transactions with more promising ones when the
10 | transaction pool approaches its capacity limit. This helps to ensure a higher
11 | likelihood of executing more successful transactions on the blockchain. With these
12 | improvement, we anticipate a relatively more stable block size, and legitimate
13 | transactions with higher gas prices stand a better chance of being swiftly processed
14 | on the blockchain, thereby enhancing the end user's experience.
15 |
16 | ## Major Improvements
17 | 1. Correct signature's V value in returned web3 transaction, to fix the transaction
18 | hash calculation
19 | 2. Support "input" field in web3 request params to increase the compatibility with
20 | latest web3js standard
21 | 3. Set gRPC MaxConnectionIdle time to 5 minutes to improve the API server performance
22 | and responsiveness
23 |
24 | ## Upgrade Priority
25 | v1.12.1 does not have a hardfork, but contains important feature improvements to boost
26 | the transaction pool functionality. All delegate nodes and API nodes are strongly
27 | recommended to upgrade to v1.12.1 in order to provide the best up-to-date service
28 |
29 | | Node type | Action |
30 | | ---------- | ------------ |
31 | | Delegate | Recommended |
32 | | Fullnode | Not required |
33 | | API node | Recommended |
34 |
35 | ## Important Commits (not a complete list)
36 | 1. [api] correct signature's V value in returned web3 transaction [#3952](https://github.com/iotexproject/iotex-core/pull/3952)
37 | 2. [api] fix typo should use EVMNetworkID() [#3960](https://github.com/iotexproject/iotex-core/pull/3960)
38 | 3. [log] fix JSON log, better trace log [#3914](https://github.com/iotexproject/iotex-core/pull/3914)
39 | 4. [evm] refactor evm parameters [#3958](https://github.com/iotexproject/iotex-core/pull/3958)
40 | 5. [util] implement block time calculator [#3951](https://github.com/iotexproject/iotex-core/pull/3951)
41 | 6. remove ValidateRewardProtocol flag [#3946](https://github.com/iotexproject/iotex-core/pull/3946)
42 | 7. [config] add SumatraHeight [#3962](https://github.com/iotexproject/iotex-core/pull/3962)
43 | 8. [action] add NewEthSigner() and pass Signer as input to rlpRawHash() and rlpSignedHash() [#3967](https://github.com/iotexproject/iotex-core/pull/3967)
44 | 9. fix Dockerfile [#3970](https://github.com/iotexproject/iotex-core/pull/3970)
45 | 10. [api] support "input" field in web3 request params [#3971](https://github.com/iotexproject/iotex-core/pull/3971)
46 | 11. set gprc MaxConnectionIdle to 5 min [#4023](https://github.com/iotexproject/iotex-core/pull/4023)
--------------------------------------------------------------------------------
/changelog/v1.13.0-release-note.md:
--------------------------------------------------------------------------------
1 | # v1.13.0 Release Note
2 |
3 | ## Summary
4 | **v1.13.0 has a hardfork, which will be activated at block height 28,516,681
5 | (ETA is around 02/19/2024 00:58am UTC) on IoTeX mainnet.**
6 |
7 | All nodes **must** upgrade to this release, otherwise the node runs the risk of
8 | not being able to sync with the IoTeX blockchain after other nodes have upgraded.
9 |
10 | **Note:**
11 | There's no change to the mainnet config.yaml and genesis.yaml. You only need to
12 | restart your node with the new v1.13.0 image.
13 |
14 | v1.13.0 marks a substantial advancement by upgrading IoTeX network's EVM to the
15 | latest Shanghai version. This upgrade brings in the new opcodes and improvements
16 | in Shanghai EVM, reducing gas cost with enhanced efficiency and reliability of
17 | smart contract execution, ultimately leading to a smoother and more cost-effective
18 | experience on the IoTeX network.
19 |
20 | We are also excited to announce that v1.13.0 has enabled deterministic deployment
21 | functionality on the IoTeX network! This feature would deploy a proxy contract
22 | at a fixed address (same for all blockchains), and then it can be used to deploy
23 | any contract to a deterministic address using CREATE2. This ensures that any
24 | contract could be deployed consistently across different blockchain platforms to
25 | the same address, eliminates possible variations, and greatly enhance the
26 | predictability and reliability of smart contract deployment processes, providing
27 | developers with greater confidence in their deployments and facilitating seamless
28 | integration with other systems and protocols.
29 |
30 | ## Other Improvements
31 | v1.13.0 release also comes with a couple of improvements:
32 | 1. Supported javascript tracing for web3 api `debug_traceCall`
33 | 2. `ioctl` commandline tool added more w3bstream project commands, and set
34 | default endpoint to IoTeX mainnet
35 | 3. Add operator address into node's metrics reporting
36 | 4. Updated gas station logic to give a dynamic gas price suggestion
37 | 5. Increase max code deployment size to 48kB, same as Ethereum's limit
38 |
39 | ## Upgrade Priority
40 | v1.13.0 comes with a hardfork, so all nodes **must** upgrade in order to keep
41 | syncing with the IoTeX blockchain
42 |
43 | | Node type | Action |
44 | | ---------- | ------------ |
45 | | Delegate | Must upgrade |
46 | | Fullnode | Must upgrade |
47 |
48 | ## Important Commits (not a complete list)
49 | 1. [actpool] skip adding accounts if pending acts is empty [#4027](https://github.com/iotexproject/iotex-core/pull/4027)
50 | 2. [action] Define CandidateSelfStake Action [#4007](https://github.com/iotexproject/iotex-core/pull/4007)
51 | 3. feat(ioctl): upgrade ws apis [#4021](https://github.com/iotexproject/iotex-core/pull/4021)
52 | 4. [actpool] fix typo for worker queue [#4028](https://github.com/iotexproject/iotex-core/pull/4028)
53 | 5. feat(ioctl): project register contract addr config [#4039](https://github.com/iotexproject/iotex-core/pull/4039)
54 | 6. feat(ioctl): ipfs endpoint and ipfs gateway config [#4038](https://github.com/iotexproject/iotex-core/pull/4038)
55 | 7. feat(ioctl): optimize w3bstream project subcommand [#4013](https://github.com/iotexproject/iotex-core/pull/4013)
56 | 8. [staking] Define Endorsement State [#4017](https://github.com/iotexproject/iotex-core/pull/4017)
57 | 9. [action] Define CandidateEndorsement Action [#4016](https://github.com/iotexproject/iotex-core/pull/4016)
58 | 10. [evm] remove NotCheckPutStateErrorOption() [#4040](https://github.com/iotexproject/iotex-core/pull/4040)
59 | 11. Bump golang.org/x/crypto from 0.14.0 to 0.17.0 [#4022](https://github.com/iotexproject/iotex-core/pull/4022)
60 | 12. feat(ioctl): bc version [#4005](https://github.com/iotexproject/iotex-core/pull/4005)
61 | 13. update github [#4048](https://github.com/iotexproject/iotex-core/pull/4048)
62 | 14. [api] web3 api debug_traceCall support javascript tracing [#3931](https://github.com/iotexproject/iotex-core/pull/3931)
63 | 15. [api] Get Pending Action by eth_getTransactionByHash [#4025](https://github.com/iotexproject/iotex-core/pull/4025)
64 | 16. [ioctl] set default endpoint to iotex mainnet [#4050](https://github.com/iotexproject/iotex-core/pull/4050)
65 | 17. [ioctl] ioctl ws code cmd support project config version [#4042](https://github.com/iotexproject/iotex-core/pull/4042)
66 | 18. [server] add operator address into node's metrics [#4056](https://github.com/iotexproject/iotex-core/pull/4056)
67 | 19. Improve action pool [#4030](https://github.com/iotexproject/iotex-core/pull/4030)
68 | 20. feat(ioctl): ioctl ws message with did vc token [#4052](https://github.com/iotexproject/iotex-core/pull/4052)
69 | 21. feat(ioctl): use ipfs cid as project config url [#4053](https://github.com/iotexproject/iotex-core/pull/4053)
70 | 22. chore: change default ws register contract address [#4054](https://github.com/iotexproject/iotex-core/pull/4054)
71 | 23. [log] mute some user request related logs [#4033](https://github.com/iotexproject/iotex-core/pull/4033)
72 | 24. Replace with sort.Slice [#4034](https://github.com/iotexproject/iotex-core/pull/4034)
73 | 25. [state] convert clean address to zero-nonce type [#3991](https://github.com/iotexproject/iotex-core/pull/3991)
74 | 26. [genesis] whitelist replay deployer [#4009](https://github.com/iotexproject/iotex-core/pull/4009)
75 | 27. [gasstation] Update gas station logic [#4035](https://github.com/iotexproject/iotex-core/pull/4035)
76 | 28. replace golint with go vet [#4058](https://github.com/iotexproject/iotex-core/pull/4058)
77 | 29. enable 48kB execution data limit, EIP-2930 tx, and deterministic deployment at Sumatra height [#4070](https://github.com/iotexproject/iotex-core/pull/4070)
78 | 30. [action] check calldata size instead of total size for 48kB init code limit [#4075](https://github.com/iotexproject/iotex-core/pull/4075)
79 | 31. [action] defer access list tx enabling [#4129](https://github.com/iotexproject/iotex-core/pull/4129)
80 | 32. [genesis] set Sumatra to activate at 02-19-2024 00:58AM UTC [#4128](https://github.com/iotexproject/iotex-core/pull/4128)
81 |
--------------------------------------------------------------------------------
/changelog/v1.13.1-release-note.md:
--------------------------------------------------------------------------------
1 | # v1.13.1 Release Note
2 |
3 | ## Summary
4 | v1.13.1 is the first maintenance release after the latest release v1.13.0. It
5 | comes with a bug fix and improvement of ioctl commandline tool.
6 |
7 | ## Bug fix
8 | With the launch of v1.13.0 some user reported issue with old wallet address (
9 | see issue [#4156](https://github.com/iotexproject/iotex-core/issues/4156) for
10 | details). The issue is quickly identified to relate to nonce calculation for
11 | certain wallet address, and is properly fixed in this release.
12 |
13 | ## Other Improvements
14 | In v1.13.1, the ioctl commandline tool has enabled querying delegate's reward
15 | amount by name. As of now you can only query the reward amount by the actual
16 | reward address. With the functionality of querying by name, it makes delegate
17 | more convinient to check their reward and improves user experience.
18 |
19 | ## Upgrade Priority
20 | v1.13.1 does not have a hardfork, but contains a bug fix to ensure prompt transaction
21 | processing. All delegate nodes and API nodes are recommended to upgrade to v1.13.1
22 | in order to provide the best up-to-date service
23 |
24 | | Node type | Action |
25 | | ---------- | ------------ |
26 | | Delegate | Recommended |
27 | | Fullnode | Not required |
28 | | API node | Recommended |
29 |
30 | ## Important Commits (not a complete list)
31 | 1. [actpool] fix bug in worker.Reset() [#4159](https://github.com/iotexproject/iotex-core/pull/4159)
32 | 2. [ioctl] node reward unclaimed support name query [#4150](https://github.com/iotexproject/iotex-core/pull/4150)
33 |
--------------------------------------------------------------------------------
/changelog/v1.14.1-release-note.md:
--------------------------------------------------------------------------------
1 | # v1.14.1 Release Note
2 |
3 | ## Summary
4 | v1.14.1 is the first maintenance release after the latest release v1.14.0. It
5 | comes with enhancements across various components such as blockdao, staking,
6 | API. Also, ioctl commandline tool has a fresh upgrade that supports two new
7 | powerful functions: ioID and w3bstream. The ioID function enables seamless
8 | integration and management of decentralized identities on the IoTeX blockchain.
9 | The w3bstream functions allows for efficient management of w3bstream project
10 | on the chain, from project creation, device registration, to message operation
11 | and prover management.
12 |
13 | ## Bug Fix and Performance Improvements:
14 | 1. bumped go version to 1.21
15 | 2. Resolved an issue where the blockdao process could become unresponsive while
16 | checking the indexer. This fix ensures that the node process can receive the
17 | break signal and exit if needed.
18 | 3. Fixed an issue where the response ID type in the JSON-RPC API did not match
19 | the request type. This ensures consistency and reliability in web3js API.
20 | 4. Enhanced the deserialization process when retrieving block receipts, resulting
21 | in faster access and improved overall performance of the blockdao component.
22 | 5. Fixed wrong cache for API readState at tip height, now the cache always returns
23 | most accurate and latest result.
24 |
25 | ## New Features and Enhancements
26 | 1. Added endorsement details to the bucket fetch APIs, providing more comprehensive
27 | information for stakeholders and improving transparency within the staking process.
28 | 2. Implemented rate limiting for the WebSocket API to prevent abuse and ensure
29 | fair usage. This enhancement protects the network from potential overload and
30 | improves service stability.
31 | 3. Enabled the ToEthTx function for grantReward action, allowing it to be processed
32 | as an Ethereum-compatible transaction. This improvement facilitates interoperability
33 | and expands the utility of the IoTeX blockchain.
34 | 4. Added 2 new commands `ioid` and `ws` to ioctl commandline tool. Enables the ioID
35 | management and w3bstream project functions.
36 |
37 | ## Upgrade Priority
38 | v1.14.1 does not have a hardfork, but contains several bug fixes, performance
39 | improvements, and new feature enhancements. All delegate nodes and API nodes are
40 | recommended to upgrade to v1.14.1 in order to provide the best up-to-date service
41 |
42 | | Node type | Action |
43 | | ---------- | ------------ |
44 | | Delegate | Recommended |
45 | | Fullnode | Not required |
46 | | API node | Recommended |
47 |
48 | ## Important Commits (not a complete list)
49 | 1. [ioctl] Add CandidateEndorsement and CandidateActivate action [#4194](https://github.com/iotexproject/iotex-core/pull/4194)
50 | 2. [blockdao] Fix program unstopable when blockdao is checking indexer [#4217](https://github.com/iotexproject/iotex-core/pull/4217)
51 | 3. [blockdao] Optimize derialization when retrieving receipts [#4221](https://github.com/iotexproject/iotex-core/pull/4221)
52 | 4. [staking] Add endorsement info in bucket fetch apis [#4207](https://github.com/iotexproject/iotex-core/pull/4207)
53 | 5. [api] Support for tracer and tracerConfig in debug_traceTransaction API [#4216](https://github.com/iotexproject/iotex-core/pull/4216)
54 | 6. [api] fix JsonRPC api response id type doesn't match request type [#4168](https://github.com/iotexproject/iotex-core/pull/4168)
55 | 7. [api] Add ratelimit for websocket API [#4031](https://github.com/iotexproject/iotex-core/pull/4031)
56 | 8. [action] Add grantReward ToEthTx() [#4047](https://github.com/iotexproject/iotex-core/pull/4047)
57 | 9. [api] Fix wrong cache for api readState at tip height [#4253](https://github.com/iotexproject/iotex-core/pull/4253)
58 | 10. feat(wsctl): add project configuration cmd [#4195](https://github.com/iotexproject/iotex-core/pull/4195)
59 | 11. [ioctl]: update ws project format [#4224](https://github.com/iotexproject/iotex-core/pull/4224)
60 | 12. feat(ioctl/ws): sync latest w3bstream contract abis and generate go code [#4279](https://github.com/iotexproject/iotex-core/pull/4279)
61 | 13. [ioctl][ws][#2] add w3bstream contracts address configurations [#4280](https://github.com/iotexproject/iotex-core/pull/4280)
62 | 14. [ioctl][ws][#3] project sub command to support interaction with ws contracts [#4281](https://github.com/iotexproject/iotex-core/pull/4281)
63 | 15. [ioctl][ws][#4] prover sub commands to support interaction with ws contracts [#4282](https://github.com/iotexproject/iotex-core/pull/4282)
64 | 16. [ioctl][ws][#5] project device sub commands to support interaction with ws contracts [#4283](https://github.com/iotexproject/iotex-core/pull/4283)
65 | 17. [ioctl][ioid][#1] ioid sub commands [#4284](https://github.com/iotexproject/iotex-core/pull/4284)
66 | 18. [ioctl][ws] update ws default value [#4285](https://github.com/iotexproject/iotex-core/pull/4285)
67 |
68 |
69 |
--------------------------------------------------------------------------------
/changelog/v1.14.2-release-note.md:
--------------------------------------------------------------------------------
1 | # v1.14.2 Release Note
2 |
3 | ## Summary
4 | v1.14.2 comes with new feature for ioID function.
5 |
6 | ## Bug Fix and Performance Improvements:
7 | 1. fixed an issue of not properly closing file.
8 |
9 | ## New Features and Enhancements
10 | 1. Added new function to set project name for the `ioctl ioid` commandline tool.
11 |
12 | ## Upgrade Priority
13 | v1.14.2 release is primarily for the new `ioctl ioid` command. Delegate nodes
14 | and API nodes are not required to upgrade to v1.14.2
15 |
16 | | Node type | Action |
17 | | ---------- | ------------ |
18 | | Delegate | Not required |
19 | | Fullnode | Not required |
20 | | API node | Not required |
21 |
22 | ## Important Commits (not a complete list)
23 | 1. [patchstore] fix close files [#4268](https://github.com/iotexproject/iotex-core/pull/4268)
24 | 2. Update README.md [#4269](https://github.com/iotexproject/iotex-core/pull/4269)
25 | 3. refactor ioID cmd [#4287](https://github.com/iotexproject/iotex-core/pull/4287)
26 | 4. [ioctl] ioID setName [#4293](https://github.com/iotexproject/iotex-core/pull/4293)
27 |
--------------------------------------------------------------------------------
/changelog/v1.2-instruction.md:
--------------------------------------------------------------------------------
1 |
2 | ## Instruction for Mainnet v1.2.0 Upgrade
3 | First, go to the `iotex-var` folder on your node (where it has 3 sub-folders `etc`, `data`, `log`)
4 | ```
5 | export IOTEX_HOME=$PWD
6 | ```
7 | stop the running node:
8 | ```
9 | docker stop iotex
10 | docker rm iotex
11 | ```
12 |
13 | #### Option 1 - if you are running the node WITHOUT API gateway enabled
14 | Check files under `$IOTEX_HOME/data`, if you don't see a file named `index.db`,
15 | then your node is **not** running as gateway. In this case, simply start the
16 | node using image v1.2.0.
17 | ```
18 | docker run -d --restart on-failure --name iotex \
19 | -p 4689:4689 \
20 | -p 8080:8080 \
21 | -v=$IOTEX_HOME/data:/var/data:rw \
22 | -v=$IOTEX_HOME/log:/var/log:rw \
23 | -v=$IOTEX_HOME/etc/config.yaml:/etc/iotex/config_override.yaml:ro \
24 | -v=$IOTEX_HOME/etc/genesis.yaml:/etc/iotex/genesis.yaml:ro \
25 | iotex/iotex-core:v1.2.0 \
26 | iotex-server \
27 | -config-path=/etc/iotex/config_override.yaml \
28 | -genesis-path=/etc/iotex/genesis.yaml
29 | ```
30 | Verify the node is up and running by:
31 | ```
32 | docker logs iotex --tail=100
33 | ```
34 | You should see log output from the node.
35 |
36 | **If your node is syncing blocks very slow, see [here](#slow-sync)**
37 |
38 | #### Option 2 - if you are running the node WITH API gateway enabled
39 | In this case, you'll need to wipe out the data and start from latest snapshot, due to index file in v1.2 is not backward-compatible.
40 | ```
41 | rm -rf $IOTEX_HOME/data
42 | curl -L https://t.iotex.me/mainnet-data-with-idx-latest > $IOTEX_HOME/data.tar.gz
43 | tar -xzf data.tar.gz
44 | ```
45 | then start the node using image v1.2.0
46 | ```
47 | docker run -d --restart on-failure --name iotex \
48 | -p 4689:4689 \
49 | -p 14014:14014 \
50 | -p 8080:8080 \
51 | -v=$IOTEX_HOME/data:/var/data:rw \
52 | -v=$IOTEX_HOME/log:/var/log:rw \
53 | -v=$IOTEX_HOME/etc/config.yaml:/etc/iotex/config_override.yaml:ro \
54 | -v=$IOTEX_HOME/etc/genesis.yaml:/etc/iotex/genesis.yaml:ro \
55 | iotex/iotex-core:v1.2.0 \
56 | iotex-server \
57 | -config-path=/etc/iotex/config_override.yaml \
58 | -genesis-path=/etc/iotex/genesis.yaml \
59 | -plugin=gateway
60 | ```
61 | Since downloading and extracting data may take quite some time, we **strongly**
62 | recommend you do the upgrade in an epoch when the node is not chosen as active
63 | delegate. This would prevent your node from being possibly probated and lose
64 | productivity.
65 |
66 | Verify the node is up and running by:
67 | ```
68 | docker logs iotex --tail=100
69 | ```
70 | You should see log output from the node.
71 |
72 | **If your node is syncing blocks very slow, see [here](#slow-sync)**
73 |
74 | ## Instruction for Testnet v1.2.0 Upgrade
75 | To upgrade to testnet v1.2.0, the procedure is same as that of mainnet, except these 2:
76 |
77 | 1. Download the snapshot from `https://t.iotex.me/testnet-data-with-idx-latest` if needed
78 | 2. Update the config and genesis files like below
79 |
80 | * Save the private key and external IP address, i.e., the `producerPrivKey:` and `externalHost` line in file `$IOTEX_HOME/etc/config.yaml`
81 |
82 | * Get the new config and genesis files
83 | ```
84 | curl https://raw.githubusercontent.com/iotexproject/iotex-bootstrap/v1.2.0/config_testnet.yaml > $IOTEX_HOME/etc/config.yaml
85 | curl https://raw.githubusercontent.com/iotexproject/iotex-bootstrap/v1.2.0/genesis_testnet.yaml > $IOTEX_HOME/etc/genesis.yaml
86 | ```
87 |
88 | * Set the private key and external IP back into `$IOTEX_HOME/etc/config.yaml`
89 |
90 |
91 | **If your node is syncing blocks very slow, see [here](#slow-sync)**
92 |
93 | ### Troubleshoot for Slow Sync
94 |
95 | Under certain network conditions, the node may sync slower as it should be. Follow the steps below to config it the sync mechanism to be more aggresive.
96 |
97 | 1. stop the node
98 | ```
99 | docker stop iotex
100 | ```
101 | 2. open file `$IOTEX_HOME/etc/config.yaml`, add the following line under
102 | `blockSync:`
103 |
104 | 
105 |
106 | 3. restart the node
107 | ```
108 | docker restart iotex
109 | ```
110 |
--------------------------------------------------------------------------------
/changelog/v1.2-release-note.md:
--------------------------------------------------------------------------------
1 | # v1.2 Release Note
2 |
3 | ### v1.2.0 Release Note
4 | **Note that v1.2.0 has a hardfork, which will be activated at block height 11,267,641 (5/24/2021 ~9am PDT) on IoTeX mainnet.**
5 | 1. web3js compatibility. With v1.2 user can connect their favorite tools in the
6 | Ethereum eco-system (such as Metamask, Subgraph) to IoTeX blockchain simply by
7 | setting up RPC endpoint to IoTeX endpoint
8 | 2. Support multiple chain DB files. v1.2 will now generate 1 db file for every
9 | 1,000,000 accumulated blocks added to the blockchain. This prevents one single
10 | overly large db file in the long run, and opens up possibility for faster and
11 | incremental download (only need to download new latest db files)
12 | 3. Reduced DB file size. Together with the multiple DB files feature, the DB file
13 | itself has been overhaualed by using an improved block storage with better
14 | compression. The estimated storage saving is about 30~40% when enabling v1.2
15 | 4. Added EVM revert message in transaction receipt. For contract calls that get
16 | reverted in the middle, we can now see the actual revert error message from the
17 | transaction receipt
18 | 5. Improved transaction indexing scheme. As a result, certain API queries (for
19 | example, pull all transactions from an address within a block range) now get a
20 | much faster response
21 | 6. Improved p2p connection reliability and network robustness
22 | 7. Fix ioctl crashes in Ubuntu when creating an action
23 |
--------------------------------------------------------------------------------
/changelog/v1.3-release-note.md:
--------------------------------------------------------------------------------
1 | # v1.3 Release Note
2 |
3 | ## v1.3.0 Release Note
4 | **Note that v1.3.0 has a hardfork, which will be activated at block height
5 | 12,289,321 (ETA is 7/22/2021 around 2pm UTC-7:00) on IoTeX mainnet.**
6 | 1. v1.3 has upgraded to latest EVM version so user can confidently deploy their
7 | DApps to IoTeX blockchain. This EVM upgrade supports the ChainID opcode to
8 | prevent relay attacks and enable cross-chain transparency, and has optimized gas
9 | costs of certain opcodes, especially privacy and zk computations. See below for
10 | details
11 | 2. Optimized block sync strategy to make it more robust
12 | 3. Fixed a bug that API query needs to wait a little while to return the latest
13 | committed block
14 | 4. Fixed a bug that node stops working after network connectivity is lost. Now
15 | the node can detect the network loss/reconnect event, and automatically resume
16 | working after network connectivity is restored
17 |
18 | ## EVM upgrade
19 | Starting v1.3 the IoTeX blockchain supports EVM Istanbul, which brings upgrades
20 | that improve denial-of-service attack resilience, and adjust gas costs for EVM
21 | storage and zk-SNARKs and zk-STARKs, allowing privacy applications based on
22 | SNARK and STARK to scale at a cheaper cost.
23 |
24 | Here's the list of EIP adopted in the Istanbul upgrade:
25 |
26 | - [EIP-152](https://eips.ethereum.org/EIPS/eip-152) -- precompiled Blake2b to
27 | facilitate Zcash
28 | - [EIP-1108](https://eips.ethereum.org/EIPS/eip-1108) -- better bn256 library
29 | for faster EC computation and reduced gas cost
30 | - [EIP-1344](https://eips.ethereum.org/EIPS/eip-1344) -- adds the CHAINID opcode
31 | to return current chain's EIP-155 unique identifier inside smart contract
32 | - [EIP-1884](https://eips.ethereum.org/EIPS/eip-1884) -- repricing for trie-size
33 | -dependent opcodes
34 | - [EIP-2028](https://eips.ethereum.org/EIPS/eip-2028) -- transaction data gas cost
35 | reduction
36 | - [EIP-2200](https://eips.ethereum.org/EIPS/eip-2200) -- cost reduction of storage
37 | in the EVM
38 |
39 | ### Gas cost change
40 | Here's a summary of gas cost change as a result of these EIPs
41 |
42 | | Precompiled contract | Address | Current gas cost | Updated gas cost |
43 | | --- | --- | --- | --- |
44 | | ECADD | 0x06 | 500 | 150 |
45 | | ECMUL | 0x07 | 40000 | 6000 |
46 | | Pairing check | 0x08 | 80000*k* + 100000 | 34000*k* + 45000 |
47 |
48 | *k* is the number of pairings being computed
49 |
50 | | Opcode | Address | Current gas cost | Updated gas cost |
51 | | --- | --- | --- | --- |
52 | | SLOAD | 0x54 | 200 | 800 |
53 | | BALANCE | 0x31 | 400 | 700 |
54 | | EXTCODEHASH | 0x3F | 400 | 700 |
55 | | SELFBALANCE | 0x47 | n/a | 5 |
56 | | Calldata | n/a | 68 per byte | 16 per byte |
57 |
58 |
--------------------------------------------------------------------------------
/changelog/v1.4-release-note.md:
--------------------------------------------------------------------------------
1 | # v1.4 Release Note
2 |
3 | ## v1.4.0 Release Note
4 | **Note that v1.4.0 has a hardfork, which will be activated at block height
5 | 13,685,401 (ETA is 10/11/2021 around 10pm UTC) on IoTeX mainnet.**
6 | 1. Incorporated the fix for the [consensus bug](https://github.com/ethereum/go-ethereum/blob/master/docs/postmortems/2021-08-22-split-postmortem.md)
7 | that caused the minority chain split on Ethereum at Aug 17, 2021
8 | 2. More detailed error reporting for contract execution failure
9 | 3. Improved block sync speed by setting the proper target range
10 | 4. Fixed API gas estimation inconsistency by honoring the input's gas limit
11 | and price
12 |
--------------------------------------------------------------------------------
/changelog/v1.5-release-note.md:
--------------------------------------------------------------------------------
1 | # v1.5 Release Note
2 |
3 | ## v1.5.0 Release Note
4 | **Note that v1.5.0 has a hardfork, which will be activated at block height
5 | 13,816,441 (ETA is 10/19/2021 around 1pm UTC) on IoTeX mainnet.**
6 | 1. Approved the long-awaited community proposal to extend foundation bonus
7 | for another year starting from v1.5 activation
8 | 2. Improved the action indexer performance, smart contract query has become
9 | faster as a result
10 |
--------------------------------------------------------------------------------
/changelog/v1.6-release-note.md:
--------------------------------------------------------------------------------
1 | # v1.6 Release Note
2 |
3 | ## v1.6.0 Release Note
4 | **Note that v1.6.0 has a hardfork, which will be activated at block height
5 | 13,979,161 (ETA is 10/28/2021 around 11pm UTC) on IoTeX mainnet.**
6 | 1. Added API tracing functionality, which enables measuring and visualizing the
7 | break-down of API call timing. We'll work on API performance improvement based
8 | on the observability this tool provides in future releases
9 | 2. Exposed gRPC health check point in the API server
10 | 3. Fixed contract read issue for certain smart contracts we've seen earlier
11 | 4. ioctl tool can export private key from HDWallet now
12 |
13 | ## v1.6.1 Release Note
14 | 1. Separated the p2p network for Mainnet and Testnet, this reduces the network
15 | traffic interference and noise between 2 networks
16 | 2. Rectified transaction error message to be compatible with chainlink
17 | 3. API service added ReadContractStorage() interface
18 |
19 | ## v1.6.2 Release Note
20 | 1. fixed EVM calldata dump issue
21 |
22 | ## v1.6.3 Release Note
23 | 1. Implemented HTTP server to support [Ethereum's JSON-RPC protocol](https://eth.wiki/json-rpc/API)
24 | inside iotex-core (this removes the need of intermediate Babel bridge/service)
25 | 2. Added `eth_getStorageAt` method
26 | 3. Instrumented tracing to measure timing on critical code path
27 | 4. Enabled EVM tracing to collect calling stacks inside EVM
28 | 5. Performance improvement of ActPool
29 | 6. Enabled log rotate
30 | 7. Corrected nested context usage in transaction processing loop
31 |
32 | ## v1.6.4 Release Note
33 | 1. Fixed certain hardcode values in original babel service ([#3038](https://github.com/iotexproject/iotex-core/pull/3038))
34 | 2. Correctly handle array in web3 request ([#3050](https://github.com/iotexproject/iotex-core/pull/3050))
35 | 3. Added more tracing for slow API ([#3057](https://github.com/iotexproject/iotex-core/pull/3057))
36 | 4. Fixed log query (with large block range) causing high memory usage ([#3062](https://github.com/iotexproject/iotex-core/pull/3062))
37 | 5. Added gasFee info into GetActions() API ([#3063](https://github.com/iotexproject/iotex-core/pull/3063))
38 |
--------------------------------------------------------------------------------
/changelog/v1.7-release-note.md:
--------------------------------------------------------------------------------
1 | # v1.7 Release Note
2 |
3 | ## v1.7.0 Release Note
4 | **Note that v1.7.0 has a hardfork, which will be activated at block height
5 | 16,509,241 (ETA is 03/24/2022 around 11pm UTC) on IoTeX mainnet.**
6 |
7 | 1. Corrected the GetHashFunc implementation in EVM ([#2998](https://github.com/iotexproject/iotex-core/pull/2998))
8 | 2. The transaction receipt and EVM log now bear correct index values ([#2923](https://github.com/iotexproject/iotex-core/pull/2923))
9 | 3. When transaction is reverted, the corresponding logs are also removed ([#3014](https://github.com/iotexproject/iotex-core/pull/3014))
10 |
11 | ## v1.7.1 Release Note
12 | 1. Improved snapshot performance ([#3125](https://github.com/iotexproject/iotex-core/pull/3125))
13 | 2. Faster DB operation using sorted list and saving hash value ([#3143](https://github.com/iotexproject/iotex-core/pull/3143),
14 | [#3160](https://github.com/iotexproject/iotex-core/pull/3160), [#3170](https://github.com/iotexproject/iotex-core/pull/3170),
15 | [#3172](https://github.com/iotexproject/iotex-core/pull/3172))
16 | 3. Added crash log functionality ([#3185](https://github.com/iotexproject/iotex-core/pull/3185))
17 |
--------------------------------------------------------------------------------
/changelog/v1.8-release-note.md:
--------------------------------------------------------------------------------
1 | # v1.8 Release Note
2 |
3 | ## v1.8.0 Release Note
4 | **Note that v1.8.0 has a hardfork, which will be activated at block height
5 | 17,662,681 (ETA is 05/30/2022 around 11pm UTC) on IoTeX mainnet.**
6 |
7 | 1. Added chain ID into transaction for enhanced transaction security ([#3188](https://github.com/iotexproject/iotex-core/pull/3188))
8 | 2. Supported staking transactions via web3 protocol ([#3209](https://github.com/iotexproject/iotex-core/pull/3209))
9 | 3. Improved p2p connection robustness ([#3371](https://github.com/iotexproject/iotex-core/pull/3371))
10 | 4. Multiple API improvements ([#3073](https://github.com/iotexproject/iotex-core/pull/3073), [#3174](https://github.com/iotexproject/iotex-core/pull/3174),
11 | [#3205](https://github.com/iotexproject/iotex-core/pull/3205), [#3217](https://github.com/iotexproject/iotex-core/pull/3217))
12 | 5. Introduced chainservice builder to better manage service start-up and shut-down ([#3235](https://github.com/iotexproject/iotex-core/pull/3235),
13 | [#3364](https://github.com/iotexproject/iotex-core/pull/3364) )
14 |
15 | ## v1.8.1 Release Note
16 | v1.8.1 is a regular maintenance release
17 |
18 | 1. Added websocket support for web3.js protocol ([#3252](https://github.com/iotexproject/iotex-core/pull/3252),
19 | [#3298](https://github.com/iotexproject/iotex-core/pull/3298))
20 | 2. Cleaned up protection code for v1.8.0 hard-fork ([#3188](https://github.com/iotexproject/iotex-core/pull/3188),
21 | [#3390](https://github.com/iotexproject/iotex-core/pull/3390),[#3436](https://github.com/iotexproject/iotex-core/pull/3436))
22 | 3. Implemented crash log ([#3456](https://github.com/iotexproject/iotex-core/pull/3456))
23 | 4. Added ChainID metrics ([#3438](https://github.com/iotexproject/iotex-core/pull/3438)), and multiple API improvements
24 | ([#3347](https://github.com/iotexproject/iotex-core/pull/3347), [#3426](https://github.com/iotexproject/iotex-core/pull/3426),
25 | [#3484](https://github.com/iotexproject/iotex-core/pull/3484))
26 | 5. Code refactor and improvements ([#3397](https://github.com/iotexproject/iotex-core/pull/3397),
27 | [#3400](https://github.com/iotexproject/iotex-core/pull/3400),[#3404](https://github.com/iotexproject/iotex-core/pull/3404))
28 |
29 | ## v1.8.2 Release Note
30 | v1.8.2 is a regular maintenance release
31 |
32 | 1. Enhanced p2p network robustness by adding GroupID to DHT protocol in peer discovery ([#3409](https://github.com/iotexproject/iotex-core/pull/3409),
33 | [#3580](https://github.com/iotexproject/iotex-core/pull/3580))
34 | 2. Multiple API improvments and code refactor ([#3303](https://github.com/iotexproject/iotex-core/pull/3303),
35 | [#3432](https://github.com/iotexproject/iotex-core/pull/3432),[#3433](https://github.com/iotexproject/iotex-core/pull/3433),
36 | [#3434](https://github.com/iotexproject/iotex-core/pull/3434),[#3441](https://github.com/iotexproject/iotex-core/pull/3441),
37 | [#3442](https://github.com/iotexproject/iotex-core/pull/3442),[#3443](https://github.com/iotexproject/iotex-core/pull/3443),
38 | [#3485](https://github.com/iotexproject/iotex-core/pull/3485))
39 | 3. Remove the global config.EVMNetworkID() ([#3431](https://github.com/iotexproject/iotex-core/pull/3431),
40 | [#3437](https://github.com/iotexproject/iotex-core/pull/3437),[#3460](https://github.com/iotexproject/iotex-core/pull/3460),
41 | [#3491](https://github.com/iotexproject/iotex-core/pull/3491))
42 | 4. Use internal caching to speed up action.Address(), action.Hash(), and action.SenderAddress() ([#3420](https://github.com/iotexproject/iotex-core/pull/3420),
43 | [#3446](https://github.com/iotexproject/iotex-core/pull/3446))
44 | 5. Clean-up of certain obsolete code ([#3453](https://github.com/iotexproject/iotex-core/pull/3453),
45 | [#3463](https://github.com/iotexproject/iotex-core/pull/3463),[#3464](https://github.com/iotexproject/iotex-core/pull/3464),
46 | [#3465](https://github.com/iotexproject/iotex-core/pull/3465))
47 |
48 | ## v1.8.4 Release Note
49 | v1.8.4 is a hot-fix release, see [here](https://github.com/iotexproject/iotex-bootstrap/blob/v1.8.4/184_patch/patch.md)
50 | for details and upgrade instruction.
51 |
--------------------------------------------------------------------------------
/changelog/v1.9.1-release-note.md:
--------------------------------------------------------------------------------
1 | # v1.9.1 Release Note
2 |
3 | ## Summary
4 | v1.9.1 is a maintenance release, with 2 fixes:
5 |
6 | 1. Certain build config is accidently deleted, causing git version and commit_id
7 | being missed from the software binary. This is a quick fix to restore that info
8 | so delegate nodes can correctly report the binary version they are running.
9 | 2. `ioctl node delegate` command can correctly show all probated delegates now.
10 |
11 | ## Upgrade Priority
12 | All delegate nodes **must** upgrade in order to correctly report the binary version
13 | they are running.
14 |
15 | | Node type | Action |
16 | | ---------- | ------------ |
17 | | Delegate | Must upgrade |
18 | | Fullnode | Not required |
19 |
20 | ## Commits In This Release
21 | 1. update docker build command [#3751](https://github.com/iotexproject/iotex-core/pull/3751)
22 | 2. [ioctl] use candidate.OperatorAddress to show probated delegates [#3727](https://github.com/iotexproject/iotex-core/pull/3727)
23 |
--------------------------------------------------------------------------------
/changelog/v1.9.2-release-note.md:
--------------------------------------------------------------------------------
1 | # v1.9.2 Release Note
2 |
3 | ## Summary
4 | v1.9.2 is a maintenance release, with the following fix:
5 |
6 | 1. Limit the maximum size of RPC response data to prevent node from running out
7 | of memory.
8 |
9 | ## Upgrade Priority
10 | If your node is running as gateway, it is recommended to upgrade to v1.9.2 to
11 | better protect it from potential out-of-memory attack.
12 |
13 | | Node type | Action |
14 | | ---------- | ------------ |
15 | | Delegate | Not required |
16 | | Gateway | Recommended |
17 | | Fullnode | Not required |
18 |
19 | ## Commits In This Release
20 | 1. [API] add batch size limit for jsonrpc [#3805](https://github.com/iotexproject/iotex-core/pull/3805)
21 |
--------------------------------------------------------------------------------
/changelog/v2.0.1-release-note.md:
--------------------------------------------------------------------------------
1 | # v2.0.1 Release Note
2 |
3 | ## Summary
4 | v2.0.1 is the first maintenance release after the latest release v2.0.0. It
5 | comes with several API fixes to maintain backward-compatibility with existing
6 | ioPay and web staking portal.
7 |
8 | ## Bug Fix and Performance Improvements:
9 | 1. Corrected return data of readCandidates API to maintain backward-compatibility
10 | with existing ioPay and web staking portal.
11 | 2. Fixed the issue of log loss when querying the latest logs by eth_getLogs.
12 | 3. Fixed the issue of not cleaning up the self-stake bucket after the bucket is
13 | unstaked.
14 | 4. Fixed invalid contract address causing SimulateExecution to panic.
15 |
16 | ## Upgrade Priority
17 | v2.0.1 does not have a hardfork, but contains several API fixes. All API nodes are
18 | recommended to upgrade to v2.0.1 in order to provide the best up-to-date service
19 |
20 | | Node type | Action |
21 | | ---------- | ------------ |
22 | | Delegate | Not required |
23 | | Fullnode | Not required |
24 | | API node | Recommended |
25 |
26 | ## Important Commits (not a complete list)
27 | 1. [api] correct candidate selfstake in api [#4335](https://github.com/iotexproject/iotex-core/pull/4335)
28 | 2. [api] fix inaccurate result of getLogs [#4334](https://github.com/iotexproject/iotex-core/pull/4334)
29 | 3. [evm] fix invalid contract address causing SimulateExecution panic [#4333](https://github.com/iotexproject/iotex-core/pull/4333)
30 | 4. [staking] candidates v1 compatability [#4332](https://github.com/iotexproject/iotex-core/pull/4332)
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/changelog/v2.0.2-release-note.md:
--------------------------------------------------------------------------------
1 | # v2.0.2 Release Note
2 |
3 | ## Summary
4 | v2.0.2 is the second maintenance release after the latest release v2.0.0. It
5 | comes with an API fix to return correct number of total votes for delegate,
6 | and two ioctl command improvements.
7 |
8 | ## Bug Fix and Performance Improvements:
9 | 1. Corrected delegate's total votes for ioctl and API query.
10 | 2. Fixed the issue that certain ioctl commands are missing transaction hash in
11 | the send result display.
12 | 3. Showed delegate's ID in `ioctl bc delegate` command output.
13 |
14 | ## Upgrade Priority
15 | v2.0.2 does not have a hardfork, but contains several API and ioctl command fixes.
16 | All API nodes are recommended to upgrade to v2.0.2 in order to provide the most
17 | up-to-date results and service
18 |
19 | | Node type | Action |
20 | | ---------- | ------------ |
21 | | Delegate | Not required |
22 | | Fullnode | Not required |
23 | | API node | Recommended |
24 |
25 | ## Important Commits (not a complete list)
26 | 1. [ioctl] add ID into candidate display [#4348](https://github.com/iotexproject/iotex-core/pull/4348)
27 | 2. [ioctl] print act hash when execute act [#4347](https://github.com/iotexproject/iotex-core/pull/4347)
28 | 3. [api] Fix nft bucket votes counting [#4346](https://github.com/iotexproject/iotex-core/pull/4346)
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/changelog/v2.0.3-release-note.md:
--------------------------------------------------------------------------------
1 | # v2.0.3 Release Note
2 |
3 | ## Summary
4 | v2.0.3 is also an maintenance release after the latest release v2.0.0. It
5 | comes with an API fix.
6 |
7 | ## Bug Fix and Performance Improvements:
8 | 1. fix logs mismatched in `eth_getLogs` API
9 |
10 | ## Upgrade Priority
11 | v2.0.3 does not have a hardfork, but contains an API fix.
12 | All API nodes are recommended to upgrade to v2.0.3 in order to provide the most
13 | up-to-date results and service
14 |
15 | | Node type | Action |
16 | | ---------- | ------------ |
17 | | Delegate | Not required |
18 | | Fullnode | Not required |
19 | | API node | Recommended |
20 |
21 | ## Important Commits (not a complete list)
22 | 1. [api] Fix parsing of log filter [#4376](https://github.com/iotexproject/iotex-core/pull/4376)
23 |
--------------------------------------------------------------------------------
/changelog/v2.0.4-release-note.md:
--------------------------------------------------------------------------------
1 | # v2.0.3 Release Note
2 |
3 | ## Summary
4 | v2.0.4 is also an maintenance release after the latest release v2.0.3. It
5 | comes with two API fixes.
6 |
7 | ## Bug Fix and Performance Improvements:
8 | 1. [API] increase limit for `eth_subscribe` (#4374)
9 | 2. [API] fix estimateGas for migrateStake transaction (#4377)
10 |
11 | ## Upgrade Priority
12 | v2.0.4 does not have a hardfork, but contains an API fix.
13 | All API nodes are recommended to upgrade to v2.0.4 in order to provide the most
14 | up-to-date results and service
15 |
16 | | Node type | Action |
17 | | ---------- | ------------ |
18 | | Delegate | Not required |
19 | | Fullnode | Not required |
20 | | API node | Recommended |
21 |
22 | ## Important Commits (not a complete list)
23 | 1. [API] increase api listener limit [#4374](https://github.com/iotexproject/iotex-core/pull/4374)
24 | 2. [api] fix estimateGas for migrateStake [#4377](https://github.com/iotexproject/iotex-core/pull/4377)
25 |
--------------------------------------------------------------------------------
/changelog/v2.1.0-release-note.md:
--------------------------------------------------------------------------------
1 | # v2.1.0 Release Note
2 |
3 | ## Summary
4 | **v2.1.0 has a hardfork, which will be activated at block height 33,730,921
5 | (ETA is around 12/17/2024 02:20:40 AM +UTC) on IoTeX L1 mainnet.**
6 |
7 | All nodes **must** upgrade to this release, otherwise the node runs the risk of
8 | not being able to sync with the IoTeX blockchain after other nodes have upgraded.
9 |
10 | **Note:**
11 | There's no change to the mainnet config.yaml and genesis.yaml. You only need to
12 | restart your node with the new v2.1.0 image.
13 |
14 | This release introduces support for the Cancun EVM upgrade, bringing compatibility
15 | with the latest opcodes and Solidity compiler, and enabling more advanced smart
16 | contract functionality. A key highlight is the integration of EIP-4844, which
17 | supports BlobTx transactions. This allows users to send transactions with blob
18 | data that is stored on-chain for at least 20 days, optimizing data availability
19 | and on-chain storage. Additional improvements includes staking enhancements,
20 | network stability, and overall transaction processing efficiency.
21 |
22 | ## Key Features and Enhancements
23 |
24 | 1. Cancun EVM Compatibility: Implements the latest EVM opcodes, allowing developers
25 | to compile contracts with the most recent Solidity compiler and take advantage of
26 | the newest protocol capabilities.
27 | 2. Support for EIP-4844 Blob Transactions: Enables users to send transactions
28 | containing blob data, which is verified and stored on-chain for a minimum of 20
29 | days, optimizing data availability and chain storage efficiency.
30 | 3. Support for EIP-1559 Dynamic Fee Transactions: Allows users to send transactions
31 | with dynamic fees, where the priority fee is rewarded directly to the block miner,
32 | ensuring fair and efficient fee allocation.
33 | 4. Support for EIP-2930 Access List Transactions: Reduces gas consumption by allowing
34 | users to specify an access list in transactions, making execution more cost-effective.
35 |
36 | ## Bug Fix and Performance Improvements:
37 | 1. Staking Bucket Reset: Resolved an issue where staking bucket amounts were not
38 | properly cleared after an unstake, ensuring accurate tracking.
39 | 2. Fix for Unlimited Native Staking Duration: Corrected the staking duration limit
40 | for native assets to prevent indefinite staking periods.
41 | 3. LibP2P Upgrade: Enhanced the P2P network by upgrading LibP2P, leading to improved
42 | connectivity and network stability.
43 | 4. Consistency Between Minting and Validation: Standardized behavior between minting
44 | and validation processes to prevent potential discrepancies and ensure stable operation.
45 |
46 | ## Upgrade Priority
47 | v2.1.0 comes with a hardfork, so all nodes **must** upgrade in order to keep
48 | syncing with the IoTeX blockchain
49 |
50 | | Node type | Action |
51 | | ---------- | ------------ |
52 | | Delegate | Must upgrade |
53 | | Fullnode | Must upgrade |
54 | | API node | Must upgrade |
55 |
56 | ## Commits
57 | https://github.com/iotexproject/iotex-core/compare/v2.0.8...v2.1.0
--------------------------------------------------------------------------------
/changelog/v2.1.2-release-note.md:
--------------------------------------------------------------------------------
1 | # v2.1.2 Release Note
2 |
3 | ## Summary
4 | **v2.1.2 is a major maintenance release to improve IoTeX network stability and
5 | robustness, and expanding API support.**
6 |
7 | All nodes are **strongly recommended** to upgrade to this release, to make sure
8 | the node is update-to-date with latest release and ensure smooth block producing.
9 |
10 | **Note:**
11 | There's no change to the mainnet config.yaml and genesis.yaml. You only need to
12 | restart your node with the new v2.1.2 image.
13 |
14 | This release introduces key enhancements to improve p2p network robustness, expand
15 | Ethereum API compatibility, and refine API service readiness for better system
16 | reliability.
17 |
18 | ## Key Features and Enhancements
19 |
20 | 1. p2p robustness enhancement: add a rate-limit mechanism at p2p netowrk level.
21 | This helps to regulate network traffic effectively, mitigate potential congestion,
22 | and enhance security by reducing the risk of malicious attacks.
23 | 2. implementation of 2 new Ethereum-Compatible APIs:
24 | `eth_blobBaseFee`: returns the base fee per gas for blob transactions (EIP-4844).
25 | `eth_feeHistory`: provides historical gas fee data for improved fee estimation.
26 | 3. API service readiness refinement: during the start-up, the API will wait all
27 | necessary internal components are fully initialized and ready before start accepting
28 | requests, reducing potential API error after service restart
29 |
30 | ## Upgrade Priority
31 | v2.1.2 comes with an important functional upgrade, all nodes are **strongly recommended**
32 | to upgrade in order to keep update-to-date with latest release and ensure smooth block
33 | producing.
34 |
35 | | Node type | Action |
36 | | ---------- | ------------ |
37 | | Delegate | Recommended |
38 | | Fullnode | Recommended |
39 | | API node | Recommended |
40 |
41 | ## Commits
42 | https://github.com/iotexproject/iotex-core/compare/v2.1.0...v2.1.2
--------------------------------------------------------------------------------
/claim_reward_distribute_voters.md:
--------------------------------------------------------------------------------
1 | This doc will guide you how to claim rewards and distribute to your voters. Here's a sneak peek of all the topics this guide will cover:
2 | * [Prerequisite](#prerequisite)
3 | * [Claim Rewards](#claim-rewards)
4 | * [Swap to Ethereum ERC20 Token](#swap-to-ethereum-erc20-token)
5 | * [Distribution to Voters](#distribution-to-voters)
6 |
7 | # Prerequisite
8 |
9 | Before moving onto any of the following sections, please install our `ioctl` commandline tool
10 |
11 | ## Install ioctl Tool
12 |
13 | `ioctl` is a tool to create/manage IoTeX address and interact with our mainnet Blockchain. For more details, please refer to [How to install ioctl](https://github.com/iotexproject/iotex-bootstrap#interact-with-blockchain)
14 |
15 | After installation, be sure to point to our mainnet secure endpoint `api.iotex.one:443` by running the following in terminal:
16 |
17 | ```ioctl config set endpoint api.iotex.one:443```
18 |
19 | ### Import Your Account
20 |
21 | **We recommend that you use the ioctl tool to create your IoTeX Rewards/Beneficiary address.** If your IoTeX address is created using the ioctl tool, skip the rest in this subsection. Otherwise, if your IoTeX address is mapped from your ETH address, you need to import the ETH address's private key in order to manage the IoTeX address.
22 |
23 | Rest assured that the `ioctl` tool does not store your private key in cleartext, the key is imported in an encrypted format using Ethereum's keystore package and protected by a password set by you. To import your account, run the following command in the terminal:
24 |
25 | ```ioctl account import ${account_name}```
26 |
27 | For example, if you want to name your account as `my_primary_account`, you can type:
28 |
29 | ```ioctl account import my_primary_account```
30 |
31 | After hitting `Enter`, you will be prompted to enter your private key. Copy your ETH private key (a hex string) and paste it (it won't show up on the screen); hit `Enter` you will be prompted to set password. Enter a strong password, hit `Enter` you will be prompted to re-enter password, enter the same password, hit Enter you will see
32 |
33 | ```New account #my_primary_account is created. Keep your password, or you will lose your private key.```
34 |
35 | ### Check Your Balance
36 |
37 | Run the following command in terminal to query the balance in your address:
38 |
39 | ```ioctl account balance ${io_address|account_name}```
40 |
41 | For example, you can use the following command to check the balance of your account `my_primary_account`:
42 |
43 | ```ioctl account balance my_primary_account```
44 |
45 | You will find your balance in IOTX in the output.
46 |
47 | ---
48 |
49 | # Claim Rewards
50 |
51 | All `Delegate Rewards` (block rewards, epoch bonus reward, foundation bonus) will be sent to your rewards address as “unclaimed rewards”. You must claim these rewards from the blockchain before you can swap/distribute them. The rewards will remain “unclaimed” until you claim them with the following steps.
52 |
53 | ## Query Your Unclaimed Rewards
54 |
55 | Run the following command in terminal to query the unclaimed rewards in your account:
56 |
57 | ```ioctl node reward ${io_address|account_name}```
58 |
59 | You will find the unclaimed reward amount in IOTX in the output.
60 |
61 | ## Claim Your Rewards
62 |
63 | To claim your reward, run in terminal:
64 |
65 | ```ioctl action claim ${amount_in_iotx} -l 10000 -p 1 -s ${io_address|name}```
66 |
67 | For example, if you want ot claim 1200 IOTX from your account `my_primary_account`, you can type the following command:
68 |
69 | ```ioctl action claim 1200 -l 10000 -p 1 -s my_primary_account```
70 |
71 | If your claim is successful, you will notice an increase of the balance in your account.
72 |
73 | ---
74 |
75 | # Swap to Ethereum ERC20 Token
76 |
77 | We provide a service to swap the IoTeX mainnet coin to the [IoTeX Network ERC20 token](https://etherscan.io/token/0x6fb3e0a217407efff7ca062d46c26e5d60a14d69) via a lock contract **io1p99pprm79rftj4r6kenfjcp8jkp6zc6mytuah5**.
78 | ```
79 | ioctl action invoke io1p99pprm79rftj4r6kenfjcp8jkp6zc6mytuah5 ${amountInIOTX} -s ${ioAddress|alias} -l 400000 -p 1 -b d0e30db0
80 | ```
81 | We recommend that you use our [web portal](https://member.iotex.io/tools/iotex) to do the swap. Click [IoTeX Tube docs](https://github.com/iotexproject/iotex-bootstrap/blob/master/tube/tube.md) for detailed documentation of the tube service.
82 |
83 | ---
84 |
85 | # Distribution to Voters
86 |
87 | To distribute rewards to your voters, you need to first export the distribution with `bookkeeping`, and then send out tokens with some multi-send tool or send them one by one.
88 |
89 | ## Export Distribution with `bookkeeping` GraphQL web interface
90 | You can use our GraphQL interface tool to get the reward distributions. The usage is:
91 |
92 | ```
93 | query {
94 | delegate(startEpoch: START_EPOCH_NUMBER, epochCount: EPOCH_COUNT, delegateName: DELEGATE_NAME){
95 | bookkeeping(percentage: PERCENTAGE_OF_DISTRIBUTION, includeFoundationBonus: WHETHER_DISTRIBUTE_FOUNDATION_BONUS){
96 | exist
97 | rewardDistribution(pagination: {skip: START_INDEX_OF_DISPLAYING_REWARD_DISTRIBUTION_LIST, first: NUMBER_OF_REWARD_DISTRIBUTIONS_TO_DISPLAY}){
98 | voterEthAddress
99 | voterIotexAddress
100 | amount
101 | }
102 | count
103 | }
104 | }
105 | }
106 | ```
107 |
108 | Note that you can add the optional return field **exist** as above to check wether the delegate has bookkeeping information within the specified epoch range. Specifying the optional argument **pagination** would only show you part of the reward distribution list while the optional return field **count** would tell the total number of reward distributions. If you don't specify **pagination** argument, by default you will get the complete reward distribution list sorted by voter's ETH address.
109 |
110 | Once you specify all the arguments and return information, click the PLAY button, and you will see the reward information on the right.
111 |
112 |
113 | You can find the GraphQL web tool [here](https://analytics.iotexscan.io/).
114 |
115 | ## Send ERC20 Tokens to Voters
116 |
117 | To send tokens to your voters, you may choose one of the following tools
118 |
119 | ### IoTeX MultiSend Tool
120 |
121 | [multi-send](https://member.iotex.io/tools/multi-send) is a tool developed by __IoTeX Foundation__ to send IOTX tokens on Ethereum to multi accounts. To use this tool, you need to sign into Metamask. After that, paste the csv file from the above step into "Recipients and Amounts". After clicking the button "Distribute ERC-20 IOTX", follow instructions from Metamask to finish sending tokens.
122 |
123 | > Note: A fee in ETH will be charged automatically.
124 |
125 | ### Third Party MultiSend Tool
126 |
127 | You can also try some third party multi-send tools, e.g., https://multisender.app.
128 |
--------------------------------------------------------------------------------
/claim_reward_distribute_voters_CN.md:
--------------------------------------------------------------------------------
1 | 本文档将指导您如何领取奖励并分发给您的投票者。以下是本指南将涵盖的所有主题的预览:
2 | * [必要条件](#prerequisite)
3 | * [领取奖励](#claim-rewards)
4 | * [转换到ETH-erc20代币](#swap-to-ethereum-erc20-token)
5 | * [分发给投票者](#distribution-to-voters)
6 |
7 | # 必要条件
8 |
9 | 在进行以下任何一个步骤之前,请安装我们的`ioctl`命令行工具
10 |
11 | ##安装ioctl工具
12 |
13 | `ioctl` 是一个创建/管理IoTeX地址并与我们的主网区块链交互的工具。如要了解更多细节,请参阅[如何安装ioctl](https://github.com/iotexproject/iotex-bootstrap#interact-with-blockchain)
14 |
15 | 在安装之后,确保ioctl指向我们的主网安全端点 `api.iotex.one:443` 您可以使用如下命令设置:
16 |
17 | `ioctl config set endpoint api.iotex.one:443`
18 |
19 | ### 导入您的账户
20 |
21 | **我们推荐您使用ioctl工具创建您的IoTeX奖励地址。**如果您的IoTeX地址是使用ioctl工具创建的,请跳过本小节中的其余部分。否则,如果您使用通过ETH地址映射IoTeX地址,则需要导入ETH地址的私钥以管理IoTeX地址。
22 |
23 | 请放心,`ioctl`工具不会将您的私钥存储为明文,密钥是使用以太坊的密钥库包以加密格式导入的,并受您设置的密码保护。要导入您的帐户,请在终端中运行以下命令:
24 |
25 | ```ioctl account import ${account_name}```
26 |
27 | 例如,您如果想命名您的账户为 `my_primary_account`, 你可以输入:
28 |
29 | ```ioctl account import my_primary_account```
30 |
31 | 点击`Enter`后,系统将提示您输入私钥。复制您的ETH私钥(十六进制字符串)并粘贴它(它不会显示在屏幕上);按`Enter`,系统将提示您设置密码。输入一个强密码,点击`Enter`,系统会提示您重新输入密码,输入相同的密码,按Enter键即可看到。
32 |
33 | ```New account #my_primary_account is created. Keep your password, or you will lose your private key.```
34 |
35 | ### 核查您的余额
36 |
37 | 在终端中运行以下命令以查询地址中的余额:
38 |
39 | ```ioctl account balance ${io_address|account_name}```
40 |
41 | 例如,您可以使用以下命令核查您的帐户`my_primary_account`的余额:
42 |
43 | ```ioctl account balance my_primary_account```
44 |
45 | 您将在输出中找到IOTX中的余额。
46 |
47 | ---
48 |
49 | # 领取奖励
50 |
51 | 所有节点奖励(block rewards, epoch bonus reward, foundation bonus)将作为“未被领取的奖励”发送到您的奖励地址。在交换/分发区块链之前,您必须从区块链中获得这些奖励。您将通过如下步骤领取。
52 |
53 | ## 查询您的奖励
54 |
55 | 在终端中运行以下命令以查询帐户中的奖励:
56 |
57 | ```ioctl node reward ${io_address|account_name}```
58 |
59 | 您将在输出中找到IOTX中未被领取的奖励金额。
60 |
61 | ## 领取您的奖励
62 |
63 | 为了领取您的奖励,在终端中输入以下命令:
64 |
65 | ```ioctl action claim ${amount_in_iotx} -l 10000 -p 1 -s ${io_address|name}```
66 |
67 | 例如,如果您希望从帐户`my_primary_account`中提取1200 IOTX,则可以输入以下命令:
68 |
69 | ```ioctl action claim 1200 -l 10000 -p 1 -s my_primary_account```
70 |
71 | 如果您领取成功,您会发现帐户余额有所增加。
72 |
73 | ---
74 |
75 | # 交换为ETH ERC代币
76 | 我们提供服务,通过固定合约将IoTeX主网代币交换到[IoTeX网络ERC20令牌](https://etherscan.io/token/0x6fb3e0a217407efff7ca062d46c26e5d60a14d69)
77 | **io1p99pprm79rftj4r6kenfjcp8jkp6zc6mytuah5**
78 |
79 | ## 转换IOTX代币到固定合约
80 |
81 | 要调用固定合约,请在终端中运行以下命令:
82 |
83 | ```ioctl action invoke io1p99pprm79rftj4r6kenfjcp8jkp6zc6mytuah5 ${amount} -s ${io_address|account_name} -l 400000 -p 1 -b d0e30db0```
84 |
85 | 命令中的`amount`应该等于您要交换的金额加上费用(20 IOTX)。例如,如果要从帐户`my_primary_account`交换30000 IOTX,则可以输入:
86 |
87 | ```ioctl action invoke io1p99pprm79rftj4r6kenfjcp8jkp6zc6mytuah5 30020 -s my_primary_account -l 400000 -p 1 -b d0e30db0```
88 |
89 | 系统将提示您输入密码,然后输入`yes`进行确认。
90 |
91 | >注意:固定合约规定最低金额为1020,最高金额为1,000,020 IOTX。不在此范围内的金额将自动被拒绝。合约将收取20个代币作为每次交易的手续费,因此最小/最大范围是帮助用户以经济的方式进行交换。
92 |
93 | 由于这个原因,不要转移IoTeX地址中的全部余额,这将被拒绝(因为这不会留下足够的余额来支付手续费)。我们建议在IoTeX地址留下大约100个代币,这样您就可以有足够的余额来支付手续费并在下次使用它。
94 |
95 | 请保留您的转移的交易代号以供将来核查,尤其是在一些少见的情况下,例如ERC20代币转账失败并且您要求重新执行。
96 |
97 | ## 核查您收到的ERC20代币
98 | 每个IoTeX地址本身与ETH地址相关联,共享相同的私钥。
99 |
100 | 使用ioctl命令行工具获取与IoTeX地址关联的ETH地址,在终端中运行以下命令:
101 |
102 | ```ioctl account ethaddr ${io_address|account_name}```
103 |
104 | 例如,要获取帐户`my_primary_account`的ETH地址:
105 |
106 | ```ioctl account ethaddr my_primary_account```
107 |
108 | 您将在输出中找到您的IoTeX地址和相应的ETH地址。然后,您可以在https://etherscan.io上查看ETH地址,以验证您收到的IoTeX Network ERC20代币。
109 |
110 | ---
111 |
112 | #分发给投票者
113 |
114 | 要向投票者分发奖励,您需要首先使用`bookkeeping`导出分发明细,然后使用一些多重发送工具发送代币或逐个发送。
115 |
116 | ## 使用`bookkeeping`GraphQL网页工具导出分发明细
117 | 您可以使用bookkeeping GraphQL工具计算投票者的奖励。用法是:
118 |
119 | ```
120 | query {
121 | delegate(startEpoch: START_EPOCH_NUMBER, epochCount: EPOCH_COUNT, delegateName: DELEGATE_NAME){
122 | bookkeeping(percentage: PERCENTAGE_OF_DISTRIBUTION, includeFoundationBonus: WHETHER_DISTRIBUTE_FOUNDATION_BONUS){
123 | exist
124 | rewardDistribution(pagination: {skip: START_INDEX_OF_DISPLAYING_REWARD_DISTRIBUTION_LIST, first: NUMBER_OF_REWARD_DISTRIBUTIONS_TO_DISPLAY}){
125 | voterEthAddress
126 | voterIotexAddress
127 | amount
128 | }
129 | count
130 | }
131 | }
132 | }
133 | ```
134 |
135 | 如上所示,您可以通过添加可选返回项**exist**来查看节点在周期范围内是否拥有奖励分发所需的数据记录。您可以通过设置可选参数**pagination**来获取部分奖励分发明细。与此同时,添加可选返回项**count**以用来返回奖励分发的个数。如果选择不设置参数**pagination**,您将会默认收到按投票人以太坊地址排序的完整奖励明细列表。
136 |
137 | 当您设置好所有参数和返回项后,点击PLAY按钮,奖励明细会出现在界面右边。
138 |
139 |
140 | 您可以在[这里](https://analytics.iotexscan.io/)找到GraphQL网页工具。
141 |
142 |
143 | ## 发送ERC20代币到投票者
144 |
145 | 要向您的选民发送代币,您可以选择以下工具之一
146 |
147 | ### IoTeX MultiSend 工具
148 |
149 | [multi-send](https://member.iotex.io/multi-send) 是由__IoTeX Foundation__开发的工具,用于将以太坊上的IOTX令牌发送到多个帐户。要使用此工具,您需要登录Metamask。之后,将上述步骤中的csv文件粘贴到“收件人和金额”中。单击“分发ERC-20 IOTX”按钮后,按照Metamask中的说明完成发送代币。
150 |
151 | >注意:将自动收取ETH费用。
152 |
153 | ### 第三方Multisend工具
154 |
155 | 您还可以尝试一些第三方多发送工具,例如:https://multisender.app
156 |
157 |
158 |
--------------------------------------------------------------------------------
/config_archive_mainnet.yaml:
--------------------------------------------------------------------------------
1 | network:
2 | # externalHost: SET YOUR EXTERNAL IP HERE (e.g., 12.34.56.78)
3 | externalPort: 4689
4 | bootstrapNodes:
5 | - /dns4/bootnode-0.mainnet.iotex.one/tcp/4689/p2p/12D3KooWPfQDF8ASjd4r7jS9e7F1wn6zod7Mf4ERr8etoY6ctQp5
6 | - /dns4/bootnode-1.mainnet.iotex.one/tcp/4689/p2p/12D3KooWN4TQ1CWRA7yvJdQCdti1qARLXXu2UEHJfycn3XbnAnRh
7 | - /dns4/bootnode-2.mainnet.iotex.one/tcp/4689/p2p/12D3KooWSiktocuUke16bPoW9zrLawEBaEc1UriaPRwm82xbr2BQ
8 | - /dns4/bootnode-3.mainnet.iotex.one/tcp/4689/p2p/12D3KooWEsmwaorbZX3HRCnhkMPjMAHzwu3om1pdGrtVm2QaM35n
9 | - /dns4/bootnode-4.mainnet.iotex.one/tcp/4689/p2p/12D3KooWHRcgNim4Nau73EEu7aKJZRZPZ21vQ7BE3fG6vENXkduB
10 | - /dns4/bootnode-5.mainnet.iotex.one/tcp/4689/p2p/12D3KooWGeHkVDQQFxXpTX1WpPhuuuWYTxPYDUTmaLWWSYx5rmUY
11 |
12 | chain:
13 | # If you are a delegate, make sure producerPrivKey is the key for the operator address you have registered.
14 | # producerPrivKey: SET YOUR PRIVATE KEY HERE (e.g., 96f0aa5e8523d6a28dc35c927274be4e931e74eaa720b418735debfcbfe712b8)
15 | enableStakingIndexer: true
16 | chainDBPath: "/var/iotex-archive/data/chain.db"
17 | trieDBPatchFile: "/var/iotex-archive/data/trie.db.patch"
18 | trieDBPath: "/var/iotex-archive/data/archive.db"
19 | stakingPatchDir: "/var/iotex-archive/data",
20 | indexDBPath: "/var/iotex-archive/data/index.db"
21 | blobStoreDBPath: "/var/iotex-archive/data/blob.db"
22 | bloomfilterIndexDBPath: "/var/iotex-archive/data/bloomfilter.index.db"
23 | candidateIndexDBPath: "/var/iotex-archive/data/candidate.index.db"
24 | stakingIndexDBPath: "/var/iotex-archive/data/staking.index.db"
25 | contractStakingIndexDBPath: "/var/iotex-archive/data/contractstaking.index.db"
26 | enableArchiveMode: true
27 | maxCacheSize: 1000
28 | committee:
29 | gravityChainAPIs:
30 | # please change the infura key to your key (e.g., https://mainnet.infura.io/v3/YOUR_KEY)
31 | - https://mainnet.infura.io/v3/b355cae6fafc4302b106b937ee6c15af
32 | numOfRetries: 20
33 | paginationSize: 255
34 | cacheSize: 1000
35 | gravityChainDB:
36 | dbPath: "/var/iotex-archive/data/poll.db"
37 | numRetries: 8
38 |
39 | actPool:
40 | minGasPrice: "1000000000000"
41 | store:
42 | datadir: "/var/iotex-archive/data/actpool.cache"
43 |
44 | api:
45 | gasStation:
46 | defaultGas: 1000000000000
47 |
48 | consensus:
49 | scheme: ROLLDPOS
50 | rollDPoS:
51 | fsm:
52 | unmatchedEventTTL: 3s
53 | unmatchedEventInterval: 100ms
54 | acceptBlockTTL: 4s
55 | acceptProposalEndorsementTTL: 2s
56 | acceptLockEndorsementTTL: 2s
57 | delay: 10s
58 | consensusDBPath: "/var/iotex-archive/data/consensus.db"
59 |
60 | blockSync:
61 | interval: 2s
62 | bufferSize: 400
63 | maxRepeat: 3
64 | repeatDecayStep: 3
65 |
66 | log:
67 | zap:
68 | level: info
69 | encoding: json
70 | disableStacktrace: true
71 | outputPaths: ["stderr", "stdout"]
72 | errorOutputPaths: ["stderr"]
73 | stderrRedirectFile: /var/iotex-archive/log/s.log
74 | stdLogRedirect: true
75 |
--------------------------------------------------------------------------------
/config_mainnet.yaml:
--------------------------------------------------------------------------------
1 | network:
2 | # externalHost: SET YOUR EXTERNAL IP HERE (e.g., 12.34.56.78)
3 | externalPort: 4689
4 | bootstrapNodes:
5 | - /dns4/bootnode-0.mainnet.iotex.one/tcp/4689/p2p/12D3KooWPfQDF8ASjd4r7jS9e7F1wn6zod7Mf4ERr8etoY6ctQp5
6 | - /dns4/bootnode-1.mainnet.iotex.one/tcp/4689/p2p/12D3KooWN4TQ1CWRA7yvJdQCdti1qARLXXu2UEHJfycn3XbnAnRh
7 | - /dns4/bootnode-2.mainnet.iotex.one/tcp/4689/p2p/12D3KooWSiktocuUke16bPoW9zrLawEBaEc1UriaPRwm82xbr2BQ
8 | - /dns4/bootnode-3.mainnet.iotex.one/tcp/4689/p2p/12D3KooWEsmwaorbZX3HRCnhkMPjMAHzwu3om1pdGrtVm2QaM35n
9 | - /dns4/bootnode-4.mainnet.iotex.one/tcp/4689/p2p/12D3KooWHRcgNim4Nau73EEu7aKJZRZPZ21vQ7BE3fG6vENXkduB
10 | - /dns4/bootnode-5.mainnet.iotex.one/tcp/4689/p2p/12D3KooWGeHkVDQQFxXpTX1WpPhuuuWYTxPYDUTmaLWWSYx5rmUY
11 |
12 | chain:
13 | # If you are a delegate, make sure producerPrivKey is the key for the operator address you have registered.
14 | # producerPrivKey: SET YOUR PRIVATE KEY HERE (e.g., 96f0aa5e8523d6a28dc35c927274be4e931e74eaa720b418735debfcbfe712b8)
15 | chainDBPath: "/var/data/chain.db"
16 | trieDBPath: "/var/data/trie.db"
17 | indexDBPath: "/var/data/index.db"
18 | bloomfilterIndexDBPath: "/var/data/bloomfilter.index.db"
19 | candidateIndexDBPath: "/var/data/candidate.index.db"
20 | stakingIndexDBPath: "/var/data/staking.index.db"
21 | contractStakingIndexDBPath: "/var/data/contractstaking.index.db"
22 | sgdIndexDBPath: "/var/data/sgd.index.db"
23 | maxCacheSize: 1000
24 | committee:
25 | gravityChainAPIs:
26 | # please change the infura key to your key (e.g., https://mainnet.infura.io/v3/YOUR_KEY)
27 | - https://mainnet.infura.io/v3/b355cae6fafc4302b106b937ee6c15af
28 | numOfRetries: 20
29 | paginationSize: 255
30 | cacheSize: 1000
31 | gravityChainDB:
32 | dbPath: "/var/data/poll.db"
33 | numRetries: 8
34 |
35 | actPool:
36 | minGasPrice: "1000000000000"
37 | maxNumActsPerAcct: 100
38 | maxNumActsPerPool: 32000
39 | maxGasLimitPerPool: 320000000
40 | actionExpiry: 5m
41 |
42 | api:
43 | gasStation:
44 | defaultGas: 1000000000000
45 |
46 | consensus:
47 | scheme: ROLLDPOS
48 | rollDPoS:
49 | fsm:
50 | unmatchedEventTTL: 3s
51 | unmatchedEventInterval: 100ms
52 | acceptBlockTTL: 4s
53 | acceptProposalEndorsementTTL: 2s
54 | acceptLockEndorsementTTL: 2s
55 | delay: 10s
56 | consensusDBPath: "/var/data/consensus.db"
57 |
58 | blockSync:
59 | interval: 10s
60 | bufferSize: 400
61 | maxRepeat: 3
62 | repeatDecayStep: 3
63 |
64 | log:
65 | zap:
66 | level: info
67 | encoding: json
68 | disableStacktrace: true
69 | outputPaths: ["stderr", "stdout"]
70 | errorOutputPaths: ["stderr"]
71 | stderrRedirectFile: /var/log/s.log
72 | stdLogRedirect: true
73 |
--------------------------------------------------------------------------------
/config_testnet.yaml:
--------------------------------------------------------------------------------
1 | network:
2 | # externalHost: SET YOUR EXTERNAL IP HERE (e.g., 12.34.56.78)
3 | externalPort: 4689
4 | bootstrapNodes:
5 | - /dns4/bootnode-0.testnet.iotex.one/tcp/4689/ipfs/12D3KooWFnaTYuLo8Mkbm3wzaWHtUuaxBRe24Uiopu15Wr5EhD3o
6 | - /dns4/bootnode-1.testnet.iotex.one/tcp/4689/ipfs/12D3KooWS7hkdFozeUqriUxv7zw8Y6NCeV8E5HUbgmVkGJUv4jHS
7 |
8 | chain:
9 | # producerPrivKey: SET YOUR PRIVATE KEY HERE (e.g., 96f0aa5e8523d6a28dc35c927274be4e931e74eaa720b418735debfcbfe712b8)
10 | id: 2
11 | evmNetworkID: 4690
12 | chainDBPath: "/var/data/chain.db"
13 | trieDBPath: "/var/data/trie.db"
14 | trieDBPatchFile: ""
15 | indexDBPath: "/var/data/index.db"
16 | bloomfilterIndexDBPath: "/var/data/bloomfilter.index.db"
17 | candidateIndexDBPath: "/var/data/candidate.index.db"
18 | stakingIndexDBPath: "/var/data/staking.index.db"
19 | contractStakingIndexDBPath: "/var/data/contractstaking.index.db"
20 | maxCacheSize: 1000
21 | committee:
22 | gravityChainAPIs:
23 | # please change the infura key to your key (e.g., https://mainnet.infura.io/v3/YOUR_KEY)
24 | - https://mainnet.infura.io/v3/b355cae6fafc4302b106b937ee6c15af
25 | numOfRetries: 20
26 | paginationSize: 255
27 | cacheSize: 1000
28 | gravityChainDB:
29 | dbPath: "/var/data/poll.db"
30 | numRetries: 8
31 | persistStakingPatchBlock: 18446744073709551615
32 |
33 | actPool:
34 | minGasPrice: "1000000000000"
35 |
36 | consensus:
37 | scheme: ROLLDPOS
38 | rollDPoS:
39 | fsm:
40 | unmatchedEventTTL: 3s
41 | unmatchedEventInterval: 100ms
42 | acceptBlockTTL: 4s
43 | acceptProposalEndorsementTTL: 2s
44 | acceptLockEndorsementTTL: 2s
45 | delay: 10s
46 | consensusDBPath: "/var/data/consensus.db"
47 |
48 | blockSync:
49 | interval: 10s
50 | bufferSize: 400
51 | maxRepeat: 3
52 | repeatDecayStep: 3
53 |
54 | log:
55 | zap:
56 | level: info
57 | encoding: json
58 | disableStacktrace: true
59 | outputPaths: ["stderr", "stdout"]
60 | errorOutputPaths: ["stderr"]
61 | stderrRedirectFile: /var/log/s.log
62 | stdLogRedirect: true
63 |
--------------------------------------------------------------------------------
/deployment/contracts.md:
--------------------------------------------------------------------------------
1 | # Smart Contracts On IoTeX Blockchain
2 |
3 | ## Reward Distribution Ratio Contract
4 |
5 | `io1lfl4ppn2c3wcft04f0rk0jy9lyn4pcjcm7638u`
6 |
7 | This is the smart contract that managed how much a delegate will share the rewards with his/her voters, which can be set via member.iotex.io and will be used by hermes when distributing rewards.
8 |
9 |
10 |
11 | ## VITA Bidding Pool
12 | `io16alj8sw7pt0d5wv22gdyphuyz9vas5dk8czk88`
13 |
14 | This is the smart contract that managed bidding of VITA token.
15 |
16 | ## Native Staking Version 1 (nsv1) Contracts
17 |
18 | `io1xpq62aw85uqzrccg9y5hnryv8ld2nkpycc3gza`
19 | `io1zn9mn4v63jg3047ylqx9nqaqz0ev659777q3xc`
20 |
21 | These two smart contracts were used for staking and voting before mainnet GA which are now deprecated. **All IOTX here are locked/burned**.
22 |
--------------------------------------------------------------------------------
/designdoc/blockdao.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iotexproject/iotex-bootstrap/b27aef5305b38c4af2cebe9df5d6703fc8498289/designdoc/blockdao.jpg
--------------------------------------------------------------------------------
/designdoc/blockdao.md:
--------------------------------------------------------------------------------
1 | # BlockDAO
2 | BlockDAO manages data access to the blockchain, for example reading a raw data block, querying a transaction by hash, and committing a block to the blockchain
3 |
4 | The blockchain data consist of multiple block files (chain.db, chain-00000001.db, etc), the state trie db file (trie.db), and the index db (index.db)
5 |
6 | We'll be focusing on block file in the following
7 |
8 | ## Legacy file (before db split activation at Ithaca height)
9 | Each db file is a key-value db storing raw data in multiple buckets, using *block hash as the key*
10 | 1. block header in bucket named "bhr"
11 | 2. block body in bucket named "bbd"
12 | 3. block footer in bucket named "bfr"
13 | 4. block receipt in bucket named "rpt"
14 |
15 | In particular, the very first db file (`chain.db`) stores the additional information:
16 | 1. the height and hash of the tip block is stored in bucket named "blk"
17 | 2. the height/hash mapping of all blocks in bucket named "h2h"
18 | 3. transaction log of all blocks in bucket named "syl"
19 |
20 | When committing a block, 2 things happen sequentially:
21 | 1. block data are written into corresponding db file (like chain-00000001.db)
22 | 2. height/hash of the new block, height/hash mapping, and transaction log are written to `chain.db`
23 |
24 | ## New file (after db split activation)
25 | The request of a new file format design comes from 2 observations:
26 |
27 | - Storing the height/hash mapping of all blocks in the first file (chain.db) has led to dependency of the BlockDAO service on this special file, which is a dependency we want to remove
28 | - Using hash as primary key and breaking a block into 3 parts has brought about the following issues:
29 | 1) it costs 3 DB reads to fetch a block
30 | 2) it consumed more storage space. Earlier testing result shows that using block height as (single incrementing) key and storing the whole block can reduce file size by 30% (10GB chain.db reduced to 7GB using new file format)
31 |
32 | The new file is still a key-value db, but *using block height as the key*
33 | 1. the height/hash mapping, and transaction log are written in the file itself (to remove dependency on `chain.db`)
34 | 2. in addition to height/hash of tip block, we also store the height of the starting block in this file. Doing so allows us to quickly know if a block is stored within a particular db file (starting height <= height <= tip height)
35 |
36 | With these adjustments, each block db file is autonomous, meaning it can serve block/transaction query in itself, without having to rely on any other special db or index db
37 |
38 | Here's the comparison
39 |
40 | File | Primary key | Height/hash mapping | Transaction log | Start height
41 | --- | --- | :---: | :---: | :---:
42 | Legacy | block hash | No (except `chain.db') | No (except `chain.db') | No
43 | New | block height | Yes | Yes | Yes
44 |
45 | ## Starting the chain soley from state DB
46 | Given the chain db size steadily increasing (today about 30GB), it could become curbersome that a node has to carry on all the history files for it to work.
47 | Now with the help of autonomous db file restructure, we want to achieve a more flexible and lightweight configuration:
48 |
49 | 1. chain db are broken into multiple data files with user-defined segment size (default 4GB)
50 | 2. build the intelligence into BlockDAO, such that a node is able to start up and running from any block db file, or even without a block db file (in which case BlockDAO will create a new one and start from there)
51 |
52 | Here are 3 examples:
53 |
54 | 1. node starts from `chain-00000002.db` which is the latest db file, node continues to add blocks, creating new file `chain-00000003.db` once the current file size grows to defined segment size
55 | 2. node starts without any chain db file. BlockDAO will create new file `chain.db` and starts adding blocks into it. Once the file size grows to defined segment size, a new file `chain-00000001.db` will be created
56 | 3. node starts from `chain-00000002.db` which has height 500. The next block comes in with height = 1000, BlockDAO will create a new file `chain-00000003.db` and starts adding blocks into it. Once the file size grows to defined segment size, a new file `chain-00000004.db` will be created
57 |
58 | In example 3 above, blocks 501~1000 are missing, we might consider improving blocksync module's functionality to reconcile this kind of data missing/inconsistency. This could be another topic for enhancement
59 |
60 | ## Managing legacy and new files in BlockDAO
61 | In order to handle each individual db file we abstract a FileDAO interface, which contains API to read/write block/action in current BlockDAO interface
62 | ```go
63 | FileDAO interface {
64 | Start(ctx context.Context) error
65 | Stop(ctx context.Context) error
66 | Height() (uint64, error)
67 | GetBlockHash(uint64) (hash.Hash256, error)
68 | GetBlockHeight(hash.Hash256) (uint64, error)
69 | GetBlock(hash.Hash256) (*block.Block, error)
70 | GetBlockByHeight(uint64) (*block.Block, error)
71 | GetReceipts(uint64) ([]*action.Receipt, error)
72 | ContainsTransactionLog() bool
73 | TransactionLogs(uint64) (*iotextypes.TransactionLogs, error)
74 | PutBlock(context.Context, *block.Block) error
75 | DeleteTipBlock() error
76 | }
77 | ```
78 |
79 | and a FileDAONew interface for the new db file
80 |
81 | ```go
82 | FileDAONew interface {
83 | FileDAO
84 | Bottom() (uint64, error)
85 | ContainsHeight(uint64) bool
86 | }
87 | ```
88 |
89 | the fileDAO object to implement the interface
90 |
91 | ```go
92 | // fileDAO implements FileDAO
93 | fileDAO struct {
94 | currFd FileDAO
95 | legacyFd FileDAO
96 | newFd map[uint64]FileDAONew
97 | }
98 | ```
99 |
100 | 1. legacyFd is the interface that manages **all** legacy files
101 | 2. newFd is a map of FileDAONew interface, each of which points to **one** new file
102 | 3. currFd points to the newest db file (that commit block should write to)
103 |
104 | 
105 |
--------------------------------------------------------------------------------
/genesis_mainnet.yaml:
--------------------------------------------------------------------------------
1 | account:
2 | initBalances:
3 | io1uqhmnttmv0pg8prugxxn7d8ex9angrvfjfthxa: "9800000000000000000000000000"
4 | # The balances on following test accounts will be burned into the all-zero address.
5 | # Check https://github.com/iotexproject/iotex-bootstrap/blob/master/postmortem/1.md for more details.
6 | io1v3gkc49d5vwtdfdka2ekjl3h468egun8e43r7z: "100000000000000000000000000"
7 | io1vrl48nsdm8jaujccd9cx4ve23cskr0ys6urx92: "100000000000000000000000000"
8 | io1llupp3n8q5x8usnr5w08j6hc6hn55x64l46rr7: "100000000000000000000000000"
9 | io1ns7y0pxmklk8ceattty6n7makpw76u770u5avy: "100000000000000000000000000"
10 | io1xuavja5dwde8pvy4yms06yyncad4yavghjhwra: "100000000000000000000000000"
11 | io1cdqx6p5rquudxuewflfndpcl0l8t5aezen9slr: "100000000000000000000000000"
12 | io1hh97f273nhxcq8ajzcpujtt7p9pqyndfmavn9r: "100000000000000000000000000"
13 | io1yhvu38epz5vmkjaclp45a7t08r27slmcc0zjzh: "100000000000000000000000000"
14 | io1cl6rl2ev5dfa988qmgzg2x4hfazmp9vn2g66ng: "100000000000000000000000000"
15 | io1skmqp33qme8knyw0fzgt9takwrc2nvz4sevk5c: "100000000000000000000000000"
16 | io1fxzh50pa6qc6x5cprgmgw4qrp5vw97zk5pxt3q: "100000000000000000000000000"
17 | io1jh0ekmccywfkmj7e8qsuzsupnlk3w5337hjjg2: "100000000000000000000000000"
18 | io1juvx5g063eu4ts832nukp4vgcwk2gnc5cu9ayd: "100000000000000000000000000"
19 | io19d0p3ah4g8ww9d7kcxfq87yxe7fnr8rpth5shj: "100000000000000000000000000"
20 | io1ed52svvdun2qv8sf2m0xnynuxfaulv6jlww7ur: "100000000000000000000000000"
21 | io158hyzrmf4a8xll7gfc8xnwlv70jgp44tzy5nvd: "100000000000000000000000000"
22 | io19kshh892255x4h5ularvr3q3al2v8cgl80fqrt: "100000000000000000000000000"
23 | io1ph0u2psnd7muq5xv9623rmxdsxc4uapxhzpg02: "100000000000000000000000000"
24 | io1znka733xefxjjw2wqddegplwtefun0mfdmz7dw: "100000000000000000000000000"
25 | io13sj9mzpewn25ymheukte4v39hvjdtrfp00mlyv: "100000000000000000000000000"
26 | io14gnqxf9dpkn05g337rl7eyt2nxasphf5m6n0rd: "100000000000000000000000000"
27 | io1l3wc0smczyay8xq747e2hw63mzg3ctp6uf8wsg: "100000000000000000000000000"
28 | io1q4tdrahguffdu4e9j9aj4f38p2nee0r9vlhx7s: "100000000000000000000000000"
29 | io1k9y4a9juk45zaqwvjmhtz6yjc68twqds4qcvzv: "100000000000000000000000000"
30 | io15flratm0nhh5xpxz2lznrrpmnwteyd86hxdtj0: "100000000000000000000000000"
31 | io1eq4ehs6xx6zj9gcsax7h3qydwlxut9xcfcjras: "100000000000000000000000000"
32 | io10a298zmzvrt4guq79a9f4x7qedj59y7ery84he: "100000000000000000000000000"
33 | blockchain:
34 | actionGasLimit: 5000000
35 | blockGasLimit: 20000000
36 | blockInterval: 10s
37 | numCandidateDelegates: 36
38 | numDelegates: 24
39 | numSubEpochs: 15
40 | timeBasedRotation: true
41 | timestamp: 1553558500
42 | poll:
43 | delegates: []
44 | enableGravityChainVoting: true
45 | gravityChainHeightInterval: 100
46 | gravityChainStartHeight: 7614500
47 | registerContractAddress: 0x95724986563028deb58f15c5fac19fa09304f32d
48 | scoreThreshold: "2000000000000000000000000"
49 | selfStakingThreshold: "1200000000000000000000000"
50 | stakingContractAddress: 0x87c9dbff0016af23f5b1ab9b8e072124ab729193
51 | voteThreshold: "100000000000000000000"
52 | nativeStakingContractAddress: io1xpq62aw85uqzrccg9y5hnryv8ld2nkpycc3gza
53 | rewarding:
54 | blockReward: "16000000000000000000"
55 | epochReward: "12500000000000000000000"
56 | exemptAddrsFromEpochReward:
57 | - io15fqav3tugm96ge7anckx0k4gukz5m4mqf0jpv3
58 | - io1x9kjkr0qv2fa7j4t2as8lrj223xxsqt4tl7xp7
59 | - io1ar5l5s268rtgzshltnqv88mua06ucm58dx678y
60 | - io1xsx5n94kg2zv64r7tm8vyz9mh86amfak9ka9xx
61 | - io1vtm2zgn830pn6auc2cvnchgwdaefa9gr4z0s86
62 | - io159fv8mu9d5djk8u2t0flgw4yqmt6fg98uqjka8
63 | - io1c3r4th3zrk4uhv83a9gr4gvn3y6pzaj6mc84ea
64 | - io14vmhs9c75r2ptxdaqrtk0dz7skct30pxmt69d9
65 | - io1gf08snppu2a2wfd50pjas2j6q2kcxjzqph3pep
66 | - io1u5ff879gg2dw9vfpxr2tsmuaz07e2rea6gvl7s
67 | - io1du4eq4f88n4wyc026l3gamjwetlgsg4jz7j884
68 | - io12yxdwewry70gr9fs6fphyfaky9c7gurmzk8f4f
69 | - io1lx53nfgq2dnzrz5ecz2ecs7vvl6qll0mkn970w
70 | - io1u5xy0ecnrjrdkzyctfqh37lgr5pcfzphgqrdwt
71 | - io1aj8arp07xw6s9rgh42af5xf98csyuehnnwlk52
72 | - io18gdmv5g0xhkuj2cdyvp8076uwhl7h3gesmzh8u
73 | - io1td5fvamm3qf22r5h93gay6ggqdh9z0edeqx63u
74 | - io1qs785af9k9xf3xgd6vut7um9zcthtrvsn2xap2
75 | - io127ftn4ry6wgxdrw4hcd6gdwqlq70ujk98dvtw5
76 | - io1wv5m0xyermvr2n0wjx2cjsqwyk863drdl5qfyn
77 | - io1v0q5g2f8z6l3v25krl677chdx7g5pwt9kvqfpc
78 | - io1xsdegzr2hdj5sv5ad4nr0yfgpsd98e40u6svem
79 | - io1fks575kklxafq4fwjccmz5d3pmq5ynxk5h6h0v
80 | - io15npzu93ug8r3zdeysppnyrcdu2xssz0lcam9l9
81 | - io1gh7xfrsnj6p5uqgjpk9xq6jg9na28aewgp7a9v
82 | - io1nyjs526mnqcsx4twa7nptkg08eclsw5c2dywp4
83 | - io1jafqlvntcxgyp6e0uxctt3tljzc3vyv5hg4ukh
84 | - io1z7mjef7w528nasnsafan0rp6yuvkvq405l6r8j
85 | - io1cup9k8hl8fp40vrj29ex8djc346780dk223end
86 | - io1scs89jur7qklzh5vfrmha3c40u8yajjx6kvzg9
87 | - io10kyvvzu08pjeylymq4umknjal25ea3ptfknrpf
88 | - io18mvepyxkcd5jkyplfqn27ydkpsendrey3xe2l8
89 | - io1nz40npqa3yvek4zdasmqaetl2j4h6urejfkera
90 | - io1m7p9yrejngxyvxhvn7p9g9uwlvd7uuamg8wcjd
91 | - io1cwwm08dwv9phh3wt5vsdhu9gcypw9q2sc7pl9s
92 | - io14aj46jjmtt83vts9syhrs9st80czumg40cjasl
93 | foundationBonus: "80000000000000000000"
94 | foundationBonusLastEpoch: 8760
95 | initBalance: "200000000000000000000000000"
96 | numDelegatesForEpochReward: 100
97 | numDelegatesForFoundationBonus: 36
98 | productivityThreshold: 85
99 |
--------------------------------------------------------------------------------
/genesis_testnet.yaml:
--------------------------------------------------------------------------------
1 | account:
2 | initBalances:
3 | io10t7juxazfteqzjsd6qjk7tkgmngj2tm7n4fvrd: "1000000000000000000000000000"
4 | io120au9ra0nffdle04jx2g5gccn6gq8qd4fy03l4: "7000000000000000000000000000"
5 | io1yrzvkucxpytn4fru35lc8r8jk4jtue4syg8d4h: "800000000000000000000000000"
6 | replayDeployerWhitelist:
7 | - 0x3fab184622dc19b6109349b94811493bf2a45362
8 | - 0x4c8d290a1b368ac4728d83a9e8321fc3af2b39b1
9 | - 0xa71ec2ea4a0df8ba132dfe15bb76f6408a2f887f
10 | blockchain:
11 | actionGasLimit: 5000000
12 | aleutianHeight: 1
13 | beringHeight: 1
14 | blockGasLimit: 20000000
15 | blockInterval: 10s
16 | cookHeight: 1801
17 | dardanellesHeight: 100081
18 | daytonaBlockHeight: 1713601
19 | easterHeight: 2696401
20 | fbkMigrationHeight: 3250081
21 | fairbankHeight: 3252241
22 | greenlandHeight: 4794481
23 | hawaiiHeight: 8613361
24 | icelandHeight: 9291601
25 | jutlandHeight: 10649521
26 | kamchatkaHeight: 10928881
27 | lordHoweHeight: 11052721
28 | midwayHeight: 13020481
29 | newfoundlandHeight: 14268961
30 | okhotskHeight: 17666641
31 | palauHeight: 19165681
32 | quebecHeight: 20562481
33 | redseaHeight: 22919041
34 | sumatraHeight: 24527521
35 | tsunamiHeight: 25226641
36 | upernavikHeight: 26984161
37 | vanuatuHeight: 28820881
38 | numCandidateDelegates: 36
39 | numDelegates: 24
40 | numSubEpochs: 15
41 | pacificHeight: 1
42 | timeBasedRotation: true
43 | timestamp: 1571036400
44 | poll:
45 | delegates: []
46 | enableGravityChainVoting: true
47 | gravityChainHeightInterval: 100
48 | gravityChainStartHeight: 8740900
49 | gravityChainCeilingHeight: 10022000
50 | nativeStakingContractAddress: io1w97pslyg7qdayp8mfnffxkjkpapaf83wmmll2l
51 | registerContractAddress: 0x92adef0e5e0c2b4f64a1ac79823f7ad3bc1662c4
52 | scoreThreshold: "2000000000000000000000000"
53 | selfStakingThreshold: "1200000000000000000000000"
54 | stakingContractAddress: 0x3bbe2346c40d34fc3f66ab059f75a6caece2c3b3
55 | voteThreshold: "100000000000000000000"
56 | systemStakingContractAddress: io1224slckr49ryfhsg3z3m484pgsm89esl2nd4jh
57 | systemStakingContractHeight: 20645456
58 | systemSGDContractAddress: io1d82m3ywplzfcw9fxlh497jve5ljsud2rg4gute
59 | systemSGDContractHeight: 20315706
60 | systemStakingContractV2Address: io1l45vd72wykrxkculmh4m9ekudqrml0jles7mkm
61 | systemStakingContractV2Height: 26978830
62 | staking:
63 | withdrawWaitingPeriod: "336h"
64 | rewarding:
65 | aleutianEpochReward: "15000000000000000000000"
66 | blockReward: "16000000000000000000"
67 | epochReward: "12500000000000000000000"
68 | exemptAddrsFromEpochReward:
69 | - io1rm223d7jyflpg0cvkja4zmgnjz8hrrdgm09pu0
70 | - io1dg65erd07hrvyme0493f2kqj2utuvpyf6jeuhd
71 | - io1343pwahz73s7vzd3l8jxxrjwcugxae2nx58zwf
72 | - io15ccuntztkkuu0xnfhqf2qt8y28kpu0mnr65050
73 | - io1se72frs5kn0j6gh0g3fk2usngu48sh2wjt4qgq
74 | - io1az8tln8432h42vf54e0c0fmaqcytwm2nk82g95
75 | - io1vdw0q7dv82g3jhmapvze99fdxeyztjrxdp7wse
76 | - io1qendhfjmpmug6ywde0590lakvxp3ph869ehlyp
77 | - io1jhcm9au9u77l27pgkqe6kqdf58dh64d0k5kf2x
78 | - io1y4punwfvhxzee08a034922vwr48wz0p6ruy0ke
79 | - io1c5a8kv4nljt4dy2mnxk23rj0255a9x4uvn4x5m
80 | - io13n3382cjhaawmqfk4vmvvgllnryw4tf56qdtks
81 | - io1gakgrsnsxmg9ed0tlcc2ukxzxdg6v8z2glw82e
82 | - io1dh8uwmva79vhk8mec998f7qgfud7jyz9v8lede
83 | - io1m8rge0h4xvmfzkc4yup766slcvn5cwymqeenpe
84 | - io1etc9ffzsg7lvph3j4ncczg08llvame8k3asyzc
85 | - io1959ykdhkene09at5nfl42a7xjwf5wgplpg7eh9
86 | - io1j07xpufsj03sc0dg020jahacx2pnt6m8cdl6qt
87 | - io1s3z2pr47u47p69zn7phshgenckw6tr70tex80k
88 | - io1e5uh4sfkgemds4fannncujcdylerdynddj3f43
89 | - io1eckfc699y4shqkc9ms8ts9sa254e5vtqyazkar
90 | - io14jp9s6mp85g2x00spq66cmdds4qe2ge5r0p72d
91 | - io1pgth3m3e4klanwdrfrgk6yelw03ws64ml8c22y
92 | - io1gn450vcrjkh7r35gcjyt93tp3u2dadz3k07wzw
93 | foundationBonus: "80000000000000000000"
94 | foundationBonusLastEpoch: 8760
95 | initBalance: "1200000000000000000000000000"
96 | numDelegatesForEpochReward: 100
97 | numDelegatesForFoundationBonus: 36
98 | productivityThreshold: 85
99 |
--------------------------------------------------------------------------------
/infra/infra.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iotexproject/iotex-bootstrap/b27aef5305b38c4af2cebe9df5d6703fc8498289/infra/infra.png
--------------------------------------------------------------------------------
/infra/infraguide.md:
--------------------------------------------------------------------------------
1 | ## IoTeX Delegates Infrastructure Guide
2 |
3 | 1. Run your node behind a commercial cloud load balancer.
4 |
5 | Cloud provider like amazon AWS[^1], google GCE[^2] or Cloudflare[^3], etc provide good protection against a large amounts of L3, L4 DDoS attack including SYN floods, IP fragment floods, port exhaustion, etc out in the market. We suggest using these solutions network experts built to help you protect your node.
6 |
7 | 2. Put Envoy Proxy in front of your node as an edge proxy.
8 |
9 | [Envoy](https://www.envoyproxy.io/) combines with [ratelimit](https://github.com/lyft/ratelimit) provides request rate limiting on HTTP/HTTP2 and connection limits on all network traffic. Put your IoTeX node behind an Envoy proxy give you another layer of protection against attackers. Also, since IoTeX node API use GRPC, if you want to become a service node and serve API request for browser single page application, you will need Envoy's [grpc-web](https://github.com/grpc/grpc-web) filter to enable this functionality.
10 |
11 | In our testnet cluster, we set a 20 requests per second per IP rate limit on HTTP/HTTP2 requests
12 |
13 | ```yaml
14 | domain: iotex-api
15 | descriptors:
16 | - key: remote_address
17 | rate_limit:
18 | unit: second
19 | requests_per_unit: 20
20 | ---
21 | domain: iotex-stats
22 | descriptors:
23 | - key: remote_address
24 | rate_limit:
25 | unit: second
26 | requests_per_unit: 20
27 | ```
28 |
29 | And the max connection numbers are set to 50
30 |
31 | ```yaml
32 | circuit_breakers:
33 | thresholds:
34 | max_connections: 50
35 | max_pending_requests: 500
36 | max_requests: 100
37 | max_retries: 3
38 | ```
39 |
40 |
41 |
42 | Here is the full configuration: [envoy config](https://gist.github.com/yutongp/c61292bf5c9c6e3058df96989365cb0c)
43 |
44 | 3. Use Kubernetes for deployment and health monitoring.
45 |
46 | [Kubernetes](https://kubernetes.io)(k8s) is a very powerful tool to manage your containerized services. It is very convenient to deploy and upgrade service running in docker container in Kubernetes.
47 |
48 | k8s will also do the health check and automatically restart the falling node to maximize your uptime.
49 |
50 | We heavily rely on k8s in our test environment. With our own experience, we can tell that k8s will for sure reduce your operation cost.
51 |
52 | These are the probe configuration we use in our deployment.yaml:
53 |
54 | ```yaml
55 | livenessProbe:
56 | httpGet:
57 | path: "/liveness"
58 | port: 8080
59 | initialDelaySeconds: 15
60 | timeoutSeconds: 2
61 | periodSeconds: 15
62 | failureThreshold: 5
63 | readinessProbe:
64 | httpGet:
65 | path: "/readiness"
66 | port: 8080
67 | initialDelaySeconds: 30
68 | timeoutSeconds: 2
69 | periodSeconds: 15
70 | failureThreshold: 5
71 | ```
72 |
73 | The delegate bots we currently run for our testnet have a setup is very similar to following graph:
74 |
75 | ## High Availability
76 |
77 | It's likely that one IoTeX node could be in outage because of code bugs, insufficient compute resource, host failure, network failure and etc, or you have to shutdown a node to do some maintenance work. Running multiple IoTeX nodes is the way to guarantee high availability (zero downtime) of your delegation. We provide the feature to run these nodes conveniently.
78 |
79 | Assuming that you will run 3 nodes for your delegate, 1 will run actively and participant into the consensus work, and 2 will standby and only listen to the blocks.
80 |
81 | All nodes can use the SAME `producerPrivKey`. For all nodes, add the following settings in `config.yaml`:
82 |
83 | ```yaml
84 | ...
85 | network:
86 | ...
87 | masterKey: producer_private_key-replica_id
88 | ...
89 | ...
90 | ```
91 |
92 | For the active node, add the following settings in `config.yaml`:
93 |
94 | ```yaml
95 | ...
96 | system:
97 | ...
98 | active: true
99 | ...
100 | ...
101 | ```
102 |
103 | For the standby nodes, add the following settings in `config.yaml`:
104 |
105 | ```yaml
106 | ...
107 | system:
108 | ...
109 | active: false
110 | ...
111 | ...
112 | ```
113 |
114 | Additionally, export `9009` port from the node's docker container. Once the active node is down, use `http://ip-to-one-node:9009/ha?activate=true` to turn a standby node into active mode. Similarly, you can turn an active node into standby mode by using `http://ip-to-one-node:9009/ha?activate=false`. `http://ip-to-one-node:9009/ha` can tell you the mode of a node.
115 |
116 | If you have quite a few nodes, and want to get rid of the tedious manual operation from your nodes or just want to try out the fancy setup of a high availability cluster, please check out the leader election solution [here](https://github.com/zjshen14/iotex-leader-election).
117 |
118 | ## Decentralized Gravity Chain Binding
119 |
120 | IoTeX relies on the election result on our contract deployed on Ethereum, so that the server needs to a list of Ethereum JSON-RPC endpoints to consume the relevant data. While we provide a list of default JSON-RPC endpoints, delegates are encouraged to
121 | setup their own endpoint, to be more decentralized, secured and performant.
122 |
123 | There are two approaches that we have experimented before and you could consider of:
124 |
125 | - Setup an Ethereum node (no need to mine) ([geth](https://github.com/ethereum/go-ethereum/wiki/Installing-Geth) and [parity](https://wiki.parity.io/Setup)) for your own, and expose the JSON-RPC endpoint.
126 | - Use [Infura](https://infura.io/) Ethereum blockchain infrasturcture: signing up an account and creating an project. The JSON-RPC endpoint would be https://mainnet.infura.io/v3/YOUR-PROJECT-ID. For more details of setting up Infura endpoint, please check [here](https://ethereumico.io/knowledge-base/infura-api-key-guide/).
127 |
128 | After getting your own JSON-RPC endpoint, you could add it into following place in `config.yaml` and restart your server. Then, your IoTeX server will read from this endpoint to get Ethereum data. You could also create and add multiple endpoints for the sake of robustness.
129 |
130 | ```yaml
131 | ...
132 | chain:
133 | ...
134 | committee:
135 | ...
136 | gravityChainAPIs:
137 | - [YOUR JSON-RPC ENDPOINT]
138 | ...
139 | ...
140 | ...
141 | ...
142 | ```
143 |
144 | ## Make It Even Better
145 | We are still new in the area of running decentralized infrastructure. There are still many things we can learn and improve. And since it is decentralized, we will need options and ideas from different perspectives. That means we need a lot of help form your guys to help us getting better.
146 |
147 |
148 | [^1]: https://aws.amazon.com/answers/networking/aws-ddos-attack-mitigation/
149 | [^2]: https://cloud.google.com/files/GCPDDoSprotection-04122016.pdf
150 | [^3]: https://www.cloudflare.com/ddos/
151 |
--------------------------------------------------------------------------------
/infra/infraguide_CN.md:
--------------------------------------------------------------------------------
1 | ## IoTeX 代表(delegate)基础设施指南
2 |
3 | 1. 基于商业云负载均衡器运行您的节点。
4 |
5 | 像amazon AWS[^1], google GCE[^2] or Cloudflare[^3] 等云提供商会提供良好的保护, 防止大量的包括 SYN floods, IP fragment floods, port exhaustion在内的 L3, L4 DDoS 攻击, 我们建议使用这些专业解决方案来帮助您保护您的节点
6 |
7 | 2. 将Envoy Proxy作为边缘代理放在节点前面。
8 |
9 | [Envoy](https://www.envoyproxy.io/) 与 [ratelimit](https://github.com/lyft/ratelimit) 对HTTP / HTTP2和所有网络流量的连接限制提供请求速率限制。将您的IoTeX节点置于Envoy代理后面,为您提供针对攻击者的另一层保护。此外,由于IoTeX节点API使用GRPC,如果您想成为服务器节点并为浏览器单页面应用程序提供API请求, 您将需要Envoy的 [grpc-web](https://github.com/grpc/grpc-web) 过滤器以启用此功能。
10 |
11 | 在我们的测试网络集群中,我们设置HTTP / HTTP2请求速率上限为每个IP每秒20个请求
12 |
13 | ```yaml
14 | domain: iotex-api
15 | descriptors:
16 | - key: remote_address
17 | rate_limit:
18 | unit: second
19 | requests_per_unit: 20
20 | ---
21 | domain: iotex-stats
22 | descriptors:
23 | - key: remote_address
24 | rate_limit:
25 | unit: second
26 | requests_per_unit: 20
27 | ```
28 |
29 | 并且最大连接数设置为50
30 |
31 | ```yaml
32 | circuit_breakers:
33 | thresholds:
34 | max_connections: 50
35 | max_pending_requests: 500
36 | max_requests: 100
37 | max_retries: 3
38 | ```
39 |
40 |
41 |
42 | 以下是完整配置: [envoy config](https://gist.github.com/yutongp/c61292bf5c9c6e3058df96989365cb0c)
43 |
44 | 3. 使用Kubernetes进行部署和运行状况监控。
45 |
46 | [Kubernetes](https://kubernetes.io)(k8s) 是一个非常强大的用于管理您的容器化服务器的工具。在Kubernetes中部署和升级在docker容器中运行的服务器非常方便。
47 |
48 | k8s 还将执行运行状况检查并自动重启下降的节点以最大化正常运行时间。
49 |
50 | 我们在测试环境中非常依赖k8s。根据我们自己的经验,我们可以确定k8s肯定会降低您的运营成本。
51 |
52 |
53 | 这些是我们在deployment.yaml中使用的探测器配置:
54 |
55 | ```yaml
56 | livenessProbe:
57 | httpGet:
58 | path: "/liveness"
59 | port: 8080
60 | initialDelaySeconds: 15
61 | timeoutSeconds: 2
62 | periodSeconds: 15
63 | failureThreshold: 5
64 | readinessProbe:
65 | httpGet:
66 | path: "/readiness"
67 | port: 8080
68 | initialDelaySeconds: 30
69 | timeoutSeconds: 2
70 | periodSeconds: 15
71 | failureThreshold: 5
72 | ```
73 |
74 | 我们目前在testnet运行的代理机器人设置与下图非常相似:
75 |
76 | ## 高可用性
77 |
78 | 由于代码错误,计算资源不足,主机故障,网络故障等原因,或者您必须关闭节点以执行某些维护工作,一个IoTeX节点可能处于中断状态。运行多个IoTeX节点是保证高可用性(零停机时间)的一种有效方法。我们提供了能方便运行这些节点的功能。
79 |
80 | 假设您将作为共识代表运行3个节点,1个将主动运行并参与共识工作,2个将待机并且仅监听块。
81 |
82 | 所有节点可以使用同样的 `producerPrivKey`. 对于所有的节点,添加下述设置到 `config.yaml`:
83 |
84 | ```yaml
85 | ...
86 | network:
87 | ...
88 | masterKey: producer_private_key-replica_id
89 | ...
90 | ...
91 | ```
92 |
93 | 对于主动节点,添加以下命令到 `config.yaml`:
94 |
95 | ```yaml
96 | ...
97 | system:
98 | ...
99 | active: true
100 | ...
101 | ...
102 | ```
103 |
104 | 对于待机节点,添加以下命令到 `config.yaml`:
105 |
106 | ```yaml
107 | ...
108 | system:
109 | ...
110 | active: false
111 | ...
112 | ...
113 | ```
114 |
115 | 除此之外, 从节点的docker container导出 `9009` 端口. 一旦主动节点关闭,使用`http://ip-to-one-node:9009/ha?activate=true` 将待机节点变为主动模式。同样,您可以使用`http://ip-to-one-node:9009/ha?activate=false`将主动节点转为待机模式。 `http://ip-to-one-node:9009/ha`可以告诉你节点的模式。
116 |
117 | 如果您有相当多的节点,并希望从您的节点中删除繁琐的手动操作,或者只是想尝试高可用性集群的设置,请在[此处](https://github.com/zjshen14/iotex-leader-election)查看领导者选举解决方案。
118 |
119 | ## 去中心化重力链绑定
120 |
121 | IoTeX 依赖于我们部署在以太坊合约上的选举结果,因此服务器需要以太坊 JSON-RPC 终端列表来使用相关数据。虽然我们提供了一份默认的 JSON-RPC 终端列表,但建议共识代表设置自己的终端,以便能够实现更加去中心化、安全且具有执行性的目的。
122 |
123 | 我们之前尝试过两种方法,您可以加以考虑:
124 |
125 | - 为自己设置一个以太坊节点(无需挖掘)([geth](https://github.com/ethereum/go-ethereum/wiki/Installing-Geth) and [parity](https://wiki.parity.io/Setup)),并公开 JSON-RPC 终端。
126 | - 使用[Infura](https://infura.io/)以太坊区块链基础设施:注册帐户并创建一个项目。JSON-RPC 终端将是 https://mainnet.infura.io/v3/YOUR-PROJECT-ID。
127 |
128 | 获得自己的 JSON-RPC 终端后,可以将其添加到`config.yaml` 并重新启动服务器。这样,您的 IoTeX 服务器将从此终端读取获得以太坊数据。您还可以创建和添加多个终端,以便保持稳定。
129 |
130 |
131 | ```yaml
132 | ...
133 | chain:
134 | ...
135 | committee:
136 | ...
137 | gravityChainAPIs:
138 | - [YOUR JSON-RPC ENDPOINT]
139 | ...
140 | ...
141 | ...
142 | ...
143 | ```
144 |
145 |
146 | ## 让它变得更好
147 | 运行去中心化基础设施仍在起步阶段,我们还有很多东西需要学习和改进。由于它是去中心化的,我们需要获得不同角度的观点和想法,希望大家集思广益,与我们共同建立一个更开放的高性能网络。
148 |
149 |
150 | [^1]: https://aws.amazon.com/answers/networking/aws-ddos-attack-mitigation/
151 | [^2]: https://cloud.google.com/files/GCPDDoSprotection-04122016.pdf
152 | [^3]: https://www.cloudflare.com/ddos/
153 |
--------------------------------------------------------------------------------
/infra/monitoring/README.md:
--------------------------------------------------------------------------------
1 | # Visualize Metrics of Your Fullnode
2 |
3 | ## Precondition
4 |
5 | - docker installed
6 | - full node connected to mainnet-rehearsal (https://github.com/iotexproject/iotex-bootstrap)
7 |
8 | ## Setup Prometheus
9 | Prometheus is an open-source systems monitoring and alerting toolkit originally built at SoundCloud. Since its inception in 2012, many companies and organizations have adopted Prometheus, and the project has a very active developer and user community. It is now a standalone open source project and maintained independently of any company. We use prometheus as the backend for the monitoring of IoTeX fullnodes.
10 |
11 |
12 | ### Custom Config
13 | reference: https://prometheus.io/docs/prometheus/latest/configuration/configuration/
14 |
15 | **get system eth0 ip**
16 |
17 | hostip=$(hostname -i|awk '{print$1}')
18 |
19 | cat < ~/prometheus.yml
20 | global:
21 | alerting:
22 | alertmanagers:
23 | - static_configs:
24 | - targets:
25 | rule_files:
26 | scrape_configs:
27 | - job_name: 'prometheus'
28 | static_configs:
29 | - targets: ['localhost:9090']
30 | - job_name: 'iotex-testnet'
31 | static_configs:
32 | - targets: ["${hostip}:8080"]
33 | EOF
34 |
35 | ### Download and run prometheus
36 |
37 | sudo docker pull prom/prometheus
38 |
39 | sudo docker run -d \
40 | -p 9090:9090 \
41 | -v ~/prometheus.yml:/etc/prometheus/prometheus.yml \
42 | prom/prometheus \
43 | --config.file=/etc/prometheus/prometheus.yml
44 |
45 | ### Check Prometheus status
46 | sudo netstat -nltp|grep 9090
47 | open http://${hostip}:9090/targets
48 |
49 | 
50 |
51 | 
52 |
53 | ## Setup Grafana
54 | Grafana is an open source metric analytics & visualization suite. It is most commonly used for visualizing time series data for infrastructure and application analytics but many use it in other domains including industrial sensors, home automation, weather, and process control. We use prometheus as the frontend for the monitoring of IoTeX fullnodes.
55 |
56 |
57 | ### Download and run Grafana
58 | docker pull grafana/grafana
59 | docker run -d --name=grafana -p 3000:3000 grafana/grafana
60 |
61 | ### Check Grafana status
62 | sudo netstat -nltp|grep 3000
63 | open http://${hostip}:3000
64 |
65 | - download iotex template: [iotex-grafana.json](https://raw.githubusercontent.com/iotexproject/iotex-bootstrap/master/monitoring/iotex-grafana.json)
66 |
67 | - import you grafana
68 |
69 | 
70 |
71 | 
72 |
73 |
74 | ## Setup in Kubernetes
75 | You can use [prometheus operator](https://github.com/coreos/prometheus-operator) in k8s.
76 | To set it up, you can install this helm chart: https://github.com/helm/charts/tree/master/stable/prometheus-operator
77 |
--------------------------------------------------------------------------------
/infra/monitoring/grafana_01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iotexproject/iotex-bootstrap/b27aef5305b38c4af2cebe9df5d6703fc8498289/infra/monitoring/grafana_01.png
--------------------------------------------------------------------------------
/infra/monitoring/grafana_02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iotexproject/iotex-bootstrap/b27aef5305b38c4af2cebe9df5d6703fc8498289/infra/monitoring/grafana_02.png
--------------------------------------------------------------------------------
/infra/monitoring/iotex_metric.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iotexproject/iotex-bootstrap/b27aef5305b38c4af2cebe9df5d6703fc8498289/infra/monitoring/iotex_metric.png
--------------------------------------------------------------------------------
/infra/monitoring/iotex_targets.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iotexproject/iotex-bootstrap/b27aef5305b38c4af2cebe9df5d6703fc8498289/infra/monitoring/iotex_targets.png
--------------------------------------------------------------------------------
/infra/security_practice.md:
--------------------------------------------------------------------------------
1 | # Best Security Practice
2 |
3 | Any server exposed to the public can become a potential target to hackers. This guide provides basic instructions and tips for securing the nodes.
4 |
5 | ## System Updates
6 | Keeping the system updated is vital before starting anything on your system. This will prevent people to use known vulnerabilities to enter in your system.
7 | ```
8 | sudo apt-get update
9 | sudo apt-get upgrade
10 | sudo apt-get autoremove
11 | sudo apt-get autoclean
12 | ```
13 |
14 | ## Enable Firewall
15 | A good place to start is to install a Firewall. UFW - Uncomplicated Firewall is a basic firewall that works very well.
16 | ```
17 | sudo apt-get install ufw
18 | sudo ufw allow ssh
19 | # allow P2P and metrics ports
20 | sudo ufw enable
21 | sudo ufw status verbose
22 | ```
23 |
24 | ## Identify and Verify Open Ports
25 | NMAP ("Network Mapper") is a free and open source utility for network discovery and security auditing. It would be useful to understand if certain ports are open as expected.
26 | ```
27 | sudo apt-get install nmap
28 | nmap -v -sT [NODE IP]
29 | ```
30 |
31 | ## SSH Hardening
32 | SSH can be very helpful when configuring your server, and it also one of the first point of entry of hackers. This is why it is very important to secure your SSH. The basic rules of hardening SSH are:
33 |
34 | - No password for SSH access (use private key)
35 | - Don't allow root to SSH (the appropriate users should SSH in, then su or sudo)
36 | - Use sudo for users so commands are logged
37 | - Log unauthorised login attempts (and consider software to block/ban users who try to access your server too many times, like fail2ban)
38 | - Lock down SSH to only the ip range your require (if you feel like it)
39 |
40 |
41 | ## Prevent IP Spoofing
42 | ```
43 | sudo vi /etc/host.conf
44 | order bind,hosts
45 | nospoof on
46 | ```
47 |
48 | ## Secure Shared Memory
49 | Shared memory allows data to be passed between applications. Sometimes, multiple processes can share the same memory space and this can lead to exploitation. To secure shared memory,
50 | ```
51 | sudo nano /etc/fstab
52 | # add the below line at the end of your file
53 | tmpfs /run/shm tmpfs defaults,noexec,nosuid 0 0
54 | ```
55 |
56 | ## Defending Network Attacks
57 | To prevent a source routing attack on your server,
58 | ```
59 | sudo nano /etc/sysctl.conf
60 | ```
61 | and make sure the following values are set:
62 | ```
63 | # IP Spoofing protection
64 | net.ipv4.conf.all.rp_filter = 1
65 | net.ipv4.conf.default.rp_filter = 1
66 | # Ignore ICMP broadcast requests
67 | net.ipv4.icmp_echo_ignore_broadcasts = 1
68 | # Disable source packet routing
69 | net.ipv4.conf.all.accept_source_route = 0
70 | net.ipv6.conf.all.accept_source_route = 0
71 | net.ipv4.conf.default.accept_source_route = 0
72 | net.ipv6.conf.default.accept_source_route = 0
73 | # Ignore send redirects
74 | net.ipv4.conf.all.send_redirects = 0
75 | net.ipv4.conf.default.send_redirects = 0
76 | # Block SYN attacks
77 | net.ipv4.tcp_syncookies = 1
78 | net.ipv4.tcp_max_syn_backlog = 2048
79 | net.ipv4.tcp_synack_retries = 2
80 | net.ipv4.tcp_syn_retries = 5
81 | # Log Martians
82 | net.ipv4.conf.all.log_martians = 1
83 | net.ipv4.icmp_ignore_bogus_error_responses = 1
84 | # Ignore ICMP redirects
85 | net.ipv4.conf.all.accept_redirects = 0
86 | net.ipv6.conf.all.accept_redirects = 0
87 | net.ipv4.conf.default.accept_redirects = 0
88 | net.ipv6.conf.default.accept_redirects = 0
89 | # Ignore Directed pings
90 | net.ipv4.icmp_echo_ignore_all = 1
91 | ```
92 | then restart the service with `sudo systctl -p`.
93 |
--------------------------------------------------------------------------------
/infra/security_practice_CN.md:
--------------------------------------------------------------------------------
1 | # 安全配置指导
2 |
3 | 任何公开的服务器都可能成为黑客的潜在目标。本指南提供了保护节点的基本说明和方法。
4 |
5 | ## 系统升级
6 | 在系统上启动任何操作之前,保持系统更新至关重要。这将阻止人们使用已知漏洞进入您的系统。
7 | ```
8 | sudo apt-get update
9 | sudo apt-get upgrade
10 | sudo apt-get autoremove
11 | sudo apt-get autoclean
12 | ```
13 |
14 | ## 使用防火墙
15 | 一个好的方法是安装防火墙。 UFW-防火墙是一个非常好用的基本防火墙。
16 | ```
17 | sudo apt-get install ufw
18 | sudo ufw allow ssh
19 | # allow P2P and metrics ports
20 | sudo ufw enable
21 | sudo ufw status verbose
22 | ```
23 |
24 | ## 识别并验证开放端口
25 | NMAP(“网络映射器”)是一种用于网络发现和安全审计的免费开源实用程序。了解某些端口是否按预期打开会很有用。
26 | ```
27 | sudo apt-get install nmap
28 | nmap -v -sT [NODE IP]
29 | ```
30 |
31 | ## SSH 强化
32 | 配置服务器时SSH非常有用,它也是黑客进入的第一站。这就是为什么保护SSH非常重要的原因。加强SSH的基本规则是:
33 |
34 | - 不设置SSH访问密码(使用私钥)
35 | - 不允许root用户进入SSH(相应的用户应该SSH,然后使用su或sudo)
36 | - 为用户使用sudo,以便记录命令
37 | - 记录未经授权的登录尝试(并考虑阻止/禁止试图访问您的服务器太多次的用户的软件,例如fail2ban)
38 | - 将SSH锁定到您需要的ip范围(如果您愿意的话)
39 |
40 | ## 防止IP欺骗
41 | ```
42 | sudo vi /etc/host.conf
43 | order bind,hosts
44 | nospoof on
45 | ```
46 |
47 | ## 保护共享内存
48 | 共享内存允许数据在应用程序之间传递。有时,多个进程可以共享相同的内存空间,这可能会导致漏洞利用。为了保护共享内存,
49 | ```
50 | sudo nano /etc/fstab
51 | # add the below line at the end of your file
52 | tmpfs /run/shm tmpfs defaults,noexec,nosuid 0 0
53 | ```
54 |
55 | ## 防御网络攻击
56 | 为了防御服务器上的源路由攻击,
57 | ```
58 | sudo nano /etc/sysctl.conf
59 | ```
60 | 请确保设置以下命令:
61 | ```
62 | # IP Spoofing protection
63 | net.ipv4.conf.all.rp_filter = 1
64 | net.ipv4.conf.default.rp_filter = 1
65 | # Ignore ICMP broadcast requests
66 | net.ipv4.icmp_echo_ignore_broadcasts = 1
67 | # Disable source packet routing
68 | net.ipv4.conf.all.accept_source_route = 0
69 | net.ipv6.conf.all.accept_source_route = 0
70 | net.ipv4.conf.default.accept_source_route = 0
71 | net.ipv6.conf.default.accept_source_route = 0
72 | # Ignore send redirects
73 | net.ipv4.conf.all.send_redirects = 0
74 | net.ipv4.conf.default.send_redirects = 0
75 | # Block SYN attacks
76 | net.ipv4.tcp_syncookies = 1
77 | net.ipv4.tcp_max_syn_backlog = 2048
78 | net.ipv4.tcp_synack_retries = 2
79 | net.ipv4.tcp_syn_retries = 5
80 | # Log Martians
81 | net.ipv4.conf.all.log_martians = 1
82 | net.ipv4.icmp_ignore_bogus_error_responses = 1
83 | # Ignore ICMP redirects
84 | net.ipv4.conf.all.accept_redirects = 0
85 | net.ipv6.conf.all.accept_redirects = 0
86 | net.ipv4.conf.default.accept_redirects = 0
87 | net.ipv6.conf.default.accept_redirects = 0
88 | # Ignore Directed pings
89 | net.ipv4.icmp_echo_ignore_all = 1
90 | ```
91 | 之后使用`sudo systctl -p`重启服务
92 |
--------------------------------------------------------------------------------
/launch_playbook_mainnet.md:
--------------------------------------------------------------------------------
1 | # Playbook for Mainnet Launch
2 |
3 | This is the playbook for bootstrapping IoTeX mainnet. It is the most comprehensive collection of knowledge regarding IoTeX mainnet launch.
4 |
5 | # Register as A Delegate Candidate and Get Voted
6 | To being with, one should register as a delegate at the member portal, which are:
7 |
8 | - MainNet: https://member.iotex.io/profile/name-registration
9 | - MainNet Rehearsal: https://member-reherasal.iotex.io/profile/name-registration
10 | - TestNet: https://member-testnet.iotex.io/profile/name-registration
11 |
12 | Once registered, your delegate node will be displayed on https://member.iotex.io, https://member-reherasal.iotex.io or https://member-testnet.iotex.io respectively, and can be voted by voters. Make sure you have operator address (for consensus node to operate) and reward address (for getting rewards) included. They are both addresses started with `io` and can be generated by [ioctl](https://docs.iotex.io/#create-account-s). It is recommended they are different for better security.
13 |
14 | To be concrete, there are four types of roles involved, where the latter covers the former:
15 | - Active Consensus Delegates: the 24 nodes that are responsible for producing blocks for a certain epoch (which is one hour), selected randomly from consensus delegates
16 | - Consensus Delegates: the top 36 delegates who get voted most
17 | - Delegates: the candidates who received more than 2,000,000 votes and have at least 1,200,000 IOTX self-staked (i.e., staked and voted for itself).
18 | - Candidates: all registered node.
19 |
20 | For launching the mainnet, **top 18 candidates should be participated**; **top 12 candidates work together with 24 robots as consensus delegates to produce blocks**. Once the launching succeeded and the mainnet is stabilized, all top 36 ranked candidates will be enrolled in.
21 |
22 | # Prepare Qualified Machines
23 | Recommended Hardware:
24 | ```
25 | Server: primary server and backup server
26 | • Memory: 16 GB of RAM
27 | • Local Storage: 200 GB SSD with 1000+ IOPS
28 | • Processor: 4 cores (2.4 GHz each)
29 | • Network: 100 Mb/sec
30 | ```
31 |
32 | You could run [this script](https://raw.githubusercontent.com/iotexproject/iotex-bootstrap/master/scripts/get_systemstat.sh) to get the basic hardware information. Note that slow network and slow local storage have prominent negative impact on the productivity of a node.
33 |
34 | # Setup Operating Nodes
35 | Please follow [this guide](https://github.com/iotexproject/iotex-bootstrap/blob/master/README.md) for the basic setup of an operating node.
36 |
37 | Once the node if fully synced, please fill in its domain name/static IP together with your contact information at [here](https://member.iotex.io/profile/technical/). This is for us to monitoring consensus delegates and notify you if something is wrong. DO NOT SHARE this information with anybody else!
38 |
39 | # Produce Blocks and Earn Rewards
40 | Once the node is up and running and ranked in the top 12, it will participates the consensus. [ioctl](https://docs.iotex.io/#cli-command-line-interface) is the best tool to make sure if your node is enrolled in. If so, it starts to produce blocks starting from a certain epoch. Note that one epoch contains 360 blocks, and is roughly one hour. Each block is produced every 10 seconds and the block producer gets 16 IOTX for producing a valid block. After each epoch is done, an epoch reward of 12,500 IOTX is splitted by all delegates, proportional to their respective percentage of total votes. In addition, a foundation bonus of 2,880 IOTX is splitted by at most top 36 consensus delegates for first 8760 epochs (roughly a year).
41 |
42 | **If a node is participating consensus (as an active consensus delegate) and missed more than 2 blocks in this epoch, all its epoch reward will be slashed**, although block reward (if it actually produced blocks) and foundation bonus are granted. More information can be found [here](https://iotex.io/consensus-delegate-handbook.pdf).
43 |
44 | Therefore, it is always a great practice to have multiple operating nodes up and running. One elected master participants the consensus while other slaves passively syncing. If the master fails (e.g., software crash, hardware error), one of the slaves will be automatically promoted to master and keep participating in the consensus. Please refer to [this](infra/infraguide.md#high-availability) for master election and failover.
45 |
46 | Please use ioctl tool to [check](https://docs.iotex.io/#query-reward) and [claim](https://docs.iotex.io/#claim-reward) reward, and use iotex-tube serivce (TBD) to swap native IOTX to ERC20 IOTX for staking and trading.
47 |
48 | # Infrastructure Best Practice
49 | Please refer to [this guide](https://github.com/iotexproject/iotex-bootstrap/blob/master/infra/infraguide.md) to setup an infrastructure (rather than a solo node) to have high block productivity.
50 |
51 | Please refer to [this guide](https://github.com/iotexproject/iotex-bootstrap/tree/master/infra/monitoring) to setup a dashboard for monitoring your nodes.
52 |
53 | # Security Best Practice
54 | Please refer to [this guide](https://github.com/iotexproject/iotex-bootstrap/blob/master/infra/security_practice.md) to make sure your node is operating in a secure way.
55 |
--------------------------------------------------------------------------------
/launch_playbook_mainnet_CN.md:
--------------------------------------------------------------------------------
1 | # 主网上线操作手册
2 |
3 | 这是IoTeX主网上线的指导手册。它是关于IoTeX主网上线最全面的知识手册
4 |
5 | # 注册成为节点候选人并获得投票
6 | 一开始,您应该在门户网站注册成为一个节点,您可以通过以下地址进入:
7 |
8 | - 主网: https://member.iotex.io/profile/name-registration
9 | - 主网预演: https://member-reherasal.iotex.io/profile/name-registration
10 | - 测试网络: https://member-testnet.iotex.io/profile/name-registration
11 |
12 | 一经注册,您的节点就会分别被显示在 https://member.iotex.io, https://member-reherasal.iotex.io
13 | 或者 https://member-testnet.iotex.io 上,并且可以接受投票。确保您有填写操作地址(用于操作
14 | 节点)和奖励地址(用于获得奖励)。这两个地址都是以 `io` 开头,并且可以由[ioctl](https://docs.iotex.io/#create-account-s)
15 | 工具产生。为了更高的安全性,他们应该是不同的地址。
16 |
17 | 具体而言,共有四种角色,并且后者包含前者:
18 | - 活跃共识节点:24个从共识节点中随机选取的,且负责在每个周期(一小时)产生区块的节点
19 | - 共识节点:获得票数最多的前36个节点
20 | - 节点:获得2,000,000选票且自我质押1,200,000IOTX到自己节点的候选人
21 | - 候选人:所有注册的节点
22 |
23 | 为了主网成功上线, **前18名候选人必须要参加**;**前12名候选人和24名机器人作为共识节点一起工作,产生区块**。一旦
24 | 成功上线,主网保持稳定后,所有前36名候选人都会参加。
25 |
26 | # 准备合格的机器
27 | 推荐配置:
28 | ```
29 | 服务器:主服务器和备份服务器
30 | • 内存:32 GB RAM
31 | • 本地存储:1 TB SSD,具有1000+ IOPS
32 | • 处理器:8核(每个2.4 GHz)
33 | • 网络:100 Mb /秒
34 | ```
35 |
36 | 你应该运行[这个脚本](https://raw.githubusercontent.com/iotexproject/iotex-bootstrap/master/scripts/get_systemstat.sh)
37 | 获取基本硬件信息。请注意,慢速网络和慢速本地存储会对节点的生产率产生显着的负面影响。
38 |
39 | # 设置操作节点
40 | 请遵循[这个指导](https://github.com/iotexproject/iotex-bootstrap/blob/master/README.md) 来设置操作节点
41 |
42 | 一旦节点完全同步,请在[这里](https://member.iotex.io/profile/technical/) 填写其域名/静态IP以及您的联系信息。我们可以监控共识节点状态,并在出现问题时通知您。请勿与其他人分享此信息!
43 |
44 | # 产生区块并且获得奖励
45 | 一旦节点启动并运行并排在前12位,它将参与共识。 [ioctl](https://docs.iotex.io/#cli-command-line-interface)是确保您的节点注册的最佳工具。如果是这样,它开始从某个时期生成块。请注意,一个周期包含360个块,大约一个小时。每10秒生成一个块,每个块会获得16个IOTX。在每个时代完成之后,所有节点将会按各自投票占比共同分享12,500 IOTX的周期奖励。此外,至多36名共识节点将会在前8760个周期(大约一年),每个周期分享2,880IOTX的基金奖励。
46 |
47 | **如果一个节点正在参与共识(作为一个活跃的共识代表)并且在这个周期错过了超过2个区块,那么它的所有周期奖励将被剥夺**,
48 | 虽然区块奖励(如果它实际产生了块)和基金奖励还可以获得。可以在[这里](https://iotex.io/consensus-delegate-handbook.pdf)获得更多信息
49 |
50 |
51 | 因此,启动并运行多个操作节点始终是一种很好的做法。一位当选主设备参与了共识,而其他附属设备被动同步。如果主设备发生故障(例如,软件崩溃,硬件错误),其中一个从设备将自动升级为主设备并继续参与共识。请参阅[这里](infra / infraguide.md#high-availability)进行主设备选举和故障转移。
52 |
53 | 请使用ioctl工具来核查[check](https://docs.iotex.io/#query-reward)和取出[claim](https://docs.iotex.io/#claim-reward)奖励,并使用iotex- tube服务(TBD)将本地IOTX兑换成ERC20 IOTX以进行质押和交易。
54 |
55 | # 基础设施配置指导
56 | 请参阅[本指南](https://github.com/iotexproject/iotex-bootstrap/blob/master/infra/infraguide.md)设置基础架构(而不是单独节点)以获得高出块效率。
57 |
58 | 请参阅[本指南](https://github.com/iotexproject/iotex-bootstrap/tree/master/infra/monitoring)设置仪表板以监控节点。
59 |
60 | # 安全措施配置指导
61 | TBD
62 |
63 | Stanford CPC 贡献
64 |
--------------------------------------------------------------------------------
/monitor/.env:
--------------------------------------------------------------------------------
1 | IOTEX_IMAGE=iotex/iotex-core
2 | IOTEX_HOME=~/iotex-var
3 | IOTEX_MONITOR_HOME=~/iotex-var/monitor
4 |
5 |
--------------------------------------------------------------------------------
/monitor/alert.rules:
--------------------------------------------------------------------------------
1 | groups:
2 | - name: Block chain height
3 | rules:
4 | - alert: Block chain height is abnormal
5 | expr: avg(delta(iotex_heartbeat_status{status_type="blockchainHeight"}[5m])) < 5 and avg(avg_over_time(iotex_heartbeat_status{status_type="blockchainHeight"}[1m])) > 0
6 | for: 1m
7 | labels:
8 | status_type: blockchainHeight
9 | annotations:
10 | summary: "Instance {{ $labels.instance }} Block chain height is abnormal"
11 | description: "{{ $labels.instance }} of job {{ $labels.job }} block chain height is {{ $value }}."
12 |
--------------------------------------------------------------------------------
/monitor/docker-compose.yml:
--------------------------------------------------------------------------------
1 | version: '2'
2 |
3 | services:
4 | iotex:
5 | container_name: iotex
6 | image: ${IOTEX_IMAGE}
7 | restart: unless-stopped
8 | ports:
9 | - 8080:8080
10 | - 4689:4689
11 | volumes:
12 | - $IOTEX_HOME/data:/var/data:rw
13 | - $IOTEX_HOME/log:/var/log:rw
14 | - $IOTEX_HOME/etc/config.yaml:/etc/iotex/config_override.yaml:ro
15 | - $IOTEX_HOME/etc/genesis.yaml:/etc/iotex/genesis.yaml:ro
16 | command: iotex-server -config-path=/etc/iotex/config_override.yaml -genesis-path=/etc/iotex/genesis.yaml
17 |
18 | monitor:
19 | container_name: iotex-monitor
20 | image: iotex/iotex-monitor:v1
21 | ports:
22 | - 3000:3000
23 | - 9090:9090
24 | volumes:
25 | - $IOTEX_MONITOR_HOME/prometheus.yml:/prometheus/prometheus-2.14.0.linux-amd64/prometheus.yml:ro
26 | - $IOTEX_MONITOR_HOME/alert.rules:/prometheus/prometheus-2.14.0.linux-amd64/alert.rules:ro
27 | links:
28 | - iotex
29 |
--------------------------------------------------------------------------------
/monitor/docker-compose.yml.gateway:
--------------------------------------------------------------------------------
1 | version: '2'
2 |
3 | services:
4 | iotex:
5 | container_name: iotex
6 | image: ${IOTEX_IMAGE}
7 | restart: unless-stopped
8 | ports:
9 | - 8080:8080
10 | - 4689:4689
11 | - 14014:14014
12 | volumes:
13 | - $IOTEX_HOME/data:/var/data:rw
14 | - $IOTEX_HOME/log:/var/log:rw
15 | - $IOTEX_HOME/etc/config.yaml:/etc/iotex/config_override.yaml:ro
16 | - $IOTEX_HOME/etc/genesis.yaml:/etc/iotex/genesis.yaml:ro
17 | command: iotex-server -config-path=/etc/iotex/config_override.yaml -genesis-path=/etc/iotex/genesis.yaml -plugin=gateway
18 |
19 | monitor:
20 | container_name: iotex-monitor
21 | image: iotex/iotex-monitor:v1
22 | ports:
23 | - 3000:3000
24 | - 9090:9090
25 | volumes:
26 | - $IOTEX_MONITOR_HOME/prometheus.yml:/prometheus/prometheus-2.14.0.linux-amd64/prometheus.yml:ro
27 | - $IOTEX_MONITOR_HOME/alert.rules:/prometheus/prometheus-2.14.0.linux-amd64/alert.rules:ro
28 | links:
29 | - iotex
30 |
--------------------------------------------------------------------------------
/monitor/docker-compose.yml.marketplace:
--------------------------------------------------------------------------------
1 | version: '2'
2 |
3 | services:
4 | iotex:
5 | container_name: iotex
6 | image: ${IOTEX_IMAGE}
7 | restart: on-failure
8 | ports:
9 | - 8080:8080
10 | - 4689:4689
11 | - 14014:14014
12 | volumes:
13 | - $IOTEX_HOME/data:/var/data:rw
14 | - $IOTEX_HOME/log:/var/log:rw
15 | - $IOTEX_HOME/etc/config.yaml:/etc/iotex/config_override.yaml:ro
16 | - $IOTEX_HOME/etc/genesis.yaml:/etc/iotex/genesis.yaml:ro
17 | command: iotex-server -config-path=/etc/iotex/config_override.yaml -genesis-path=/etc/iotex/genesis.yaml -plugin=gateway
--------------------------------------------------------------------------------
/monitor/example/example_dashboards.yaml:
--------------------------------------------------------------------------------
1 | # # config file version
2 | apiVersion: 1
3 |
4 | providers:
5 | - name: 'IoteX'
6 | # orgId: 1
7 | # folder: ''
8 | # folderUid: ''
9 | type: file
10 | options:
11 | path: /tmp/grafana/dashboards
12 |
--------------------------------------------------------------------------------
/monitor/example/example_datasource.yaml:
--------------------------------------------------------------------------------
1 | # # config file version
2 | apiVersion: 1
3 |
4 | # # list of datasources that should be deleted from the database
5 | #deleteDatasources:
6 | # - name: Graphite
7 | # orgId: 1
8 |
9 | # # list of datasources to insert/update depending
10 | # # on what's available in the database
11 | datasources:
12 | # # name of the datasource. Required
13 | - name: Iotex
14 | # # datasource type. Required
15 | type: prometheus
16 | # # access mode. direct or proxy. Required
17 | access: proxy
18 | # # org id. will default to orgId 1 if not specified
19 | # orgId: 1
20 | # # url
21 | url: http://localhost:9090
22 | # # database password, if used
23 | # password:
24 | # # database user, if used
25 | # user:
26 | # # database name, if used
27 | # database:
28 | # # enable/disable basic auth
29 | basicAuth: false
30 | # # basic auth username
31 | # basicAuthUser:
32 | # # basic auth password
33 | # basicAuthPassword:
34 | # # enable/disable with credentials headers
35 | # withCredentials:
36 | # # mark as default datasource. Max one per org
37 | isDefault: true
38 | # #