diff --git a/CMakeLists.txt b/CMakeLists.txt index 27b20e5a09..c92644a850 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,8 +2,8 @@ cmake_minimum_required(VERSION 3.20) # Set current version of the project set(TARAXA_MAJOR_VERSION 1) -set(TARAXA_MINOR_VERSION 9) -set(TARAXA_PATCH_VERSION 3) +set(TARAXA_MINOR_VERSION 11) +set(TARAXA_PATCH_VERSION 0) set(TARAXA_VERSION ${TARAXA_MAJOR_VERSION}.${TARAXA_MINOR_VERSION}.${TARAXA_PATCH_VERSION}) # Any time a change in the network protocol is introduced this version should be increased diff --git a/libraries/cli/include/cli/config_jsons/mainnet/mainnet_genesis.json b/libraries/cli/include/cli/config_jsons/mainnet/mainnet_genesis.json index 4ad1e20333..10a7c5e93a 100644 --- a/libraries/cli/include/cli/config_jsons/mainnet/mainnet_genesis.json +++ b/libraries/cli/include/cli/config_jsons/mainnet/mainnet_genesis.json @@ -1650,9 +1650,9 @@ "generated_rewards": "0x105674788D280AE305A6EC0" }, "ficus_hf": { - "block_num": -1, - "pillar_blocks_interval": 100, - "bridge_contract_address": "0x0000000000000000000000000000000000000000" + "block_num": 11616000, + "pillar_blocks_interval": 4000, + "bridge_contract_address": "0xe126E0BaeAE904b8Cfd619Be1A8667A173b763a1" } } } \ No newline at end of file diff --git a/libraries/cli/include/cli/config_jsons/testnet/testnet_config.json b/libraries/cli/include/cli/config_jsons/testnet/testnet_config.json index 1fe0aaaeeb..d444117b3c 100644 --- a/libraries/cli/include/cli/config_jsons/testnet/testnet_config.json +++ b/libraries/cli/include/cli/config_jsons/testnet/testnet_config.json @@ -38,17 +38,17 @@ "boot_nodes": [ { "id": "f36f467529fe91a750dfdc8086fd0d2f30bad9f55a5800b6b4aa603c7787501db78dc4ac1bf3cf16e42af7c2ebb53648653013c3da1987494960d751871d598a", - "ip": "boot-node-3.testnet.taraxa.io", + "ip": "boot-node-0.testnet.taraxa.io", "port": 10002 }, { "id": "d2d445fc3276bdbf2a07628a484baabf45ccb91d6aa078a0dc3aefc11f1941899a923312ec0e664b8e57b63b774c47a006d9d1d16befd2135dcf76067736c688", - "ip": "boot-node-4.testnet.taraxa.io", + "ip": "boot-node-1.testnet.taraxa.io", "port": 10002 }, { "id": "c6e7263f44d88c0d6cc3b0d5ebdc31cf891908e8fa7e545e137d3ed0bfec1810fa24c1379228afbb53df0d59e716e17138115fd096782a84261718ab77665171", - "ip": "boot-node-5.testnet.taraxa.io", + "ip": "boot-node-2.testnet.taraxa.io", "port": 10002 } ] diff --git a/libraries/cli/include/cli/config_jsons/testnet/testnet_genesis.json b/libraries/cli/include/cli/config_jsons/testnet/testnet_genesis.json index 8e8bf4af8f..9d34feb1c0 100644 --- a/libraries/cli/include/cli/config_jsons/testnet/testnet_genesis.json +++ b/libraries/cli/include/cli/config_jsons/testnet/testnet_genesis.json @@ -4,7 +4,7 @@ "level": "0x0", "pivot": "0x0000000000000000000000000000000000000000000000000000000000000000", "sig": "0xb7e22d46c1ba94d5e8347b01d137b5c428fcbbeaf0a77fb024cbbf1517656ff00d04f7f25be608c321b0d7483c402c294ff46c49b265305d046a52236c0a363701", - "timestamp": "0x66827F92", + "timestamp": "0x669f7f20", "tips": [], "transactions": [] }, @@ -151,7 +151,7 @@ }, "ficus_hf": { "block_num": 1000, - "pillar_blocks_interval": 100, + "pillar_blocks_interval": 1000, "bridge_contract_address": "0xcAF2b453FE8382a4B8110356DF0508f6d71F22BF" } } diff --git a/libraries/types/pbft_block/include/pbft/pbft_block_extra_data.hpp b/libraries/types/pbft_block/include/pbft/pbft_block_extra_data.hpp index ba1bd9e4d7..765069b45d 100644 --- a/libraries/types/pbft_block/include/pbft/pbft_block_extra_data.hpp +++ b/libraries/types/pbft_block/include/pbft/pbft_block_extra_data.hpp @@ -21,7 +21,8 @@ class PbftBlockExtraData { PbftBlockExtraData(const uint16_t major_version, const uint16_t minor_version, const uint16_t patch_version, const uint16_t net_version, const std::string node_implementation, const std::optional& pillar_block_hash); - PbftBlockExtraData(const bytes& data); + + static std::optional fromBytes(const bytes& data); /** * @brief Get rlp diff --git a/libraries/types/pbft_block/src/pbft_block.cpp b/libraries/types/pbft_block/src/pbft_block.cpp index 54dadeca97..e0deec66e0 100644 --- a/libraries/types/pbft_block/src/pbft_block.cpp +++ b/libraries/types/pbft_block/src/pbft_block.cpp @@ -4,8 +4,6 @@ #include -#include "common/jsoncpp.hpp" - namespace taraxa { PbftBlock::PbftBlock(bytes const& b) : PbftBlock(dev::RLP(b)) {} @@ -15,7 +13,7 @@ PbftBlock::PbftBlock(dev::RLP const& rlp) { dev::bytes extra_data_bytes; util::rlp_tuple(util::RLPDecoderRef(rlp, true), prev_block_hash_, dag_block_hash_as_pivot_, order_hash_, prev_state_root_hash_, period_, timestamp_, reward_votes_, extra_data_bytes, signature_); - extra_data_ = PbftBlockExtraData(extra_data_bytes); + extra_data_ = PbftBlockExtraData::fromBytes(extra_data_bytes); } else { util::rlp_tuple(util::RLPDecoderRef(rlp, true), prev_block_hash_, dag_block_hash_as_pivot_, order_hash_, prev_state_root_hash_, period_, timestamp_, reward_votes_, signature_); diff --git a/libraries/types/pbft_block/src/pbft_block_extra_data.cpp b/libraries/types/pbft_block/src/pbft_block_extra_data.cpp index 215dab37cb..6a14c99c61 100644 --- a/libraries/types/pbft_block/src/pbft_block_extra_data.cpp +++ b/libraries/types/pbft_block/src/pbft_block_extra_data.cpp @@ -1,9 +1,5 @@ #include "pbft/pbft_block_extra_data.hpp" -#include - -#include "common/jsoncpp.hpp" - namespace taraxa { PbftBlockExtraData::PbftBlockExtraData(const uint16_t major_version, const uint16_t minor_version, @@ -17,14 +13,22 @@ PbftBlockExtraData::PbftBlockExtraData(const uint16_t major_version, const uint1 node_implementation_(node_implementation), pillar_block_hash_(pillar_block_hash) {} -PbftBlockExtraData::PbftBlockExtraData(const bytes& data) { +std::optional PbftBlockExtraData::fromBytes(const bytes& data) { if (data.size() > kExtraDataMaxSize) { throw std::runtime_error("Pbft block invalid, extra data size over the limit"); } dev::RLP rlp(data); - util::rlp_tuple(util::RLPDecoderRef(rlp, true), major_version_, minor_version_, patch_version_, net_version_, - node_implementation_, pillar_block_hash_); + PbftBlockExtraData extra_data; + try { + util::rlp_tuple(util::RLPDecoderRef(rlp, true), extra_data.major_version_, extra_data.minor_version_, + extra_data.patch_version_, extra_data.net_version_, extra_data.node_implementation_, + extra_data.pillar_block_hash_); + } catch (const dev::RLPException& e) { + return std::nullopt; + } + + return extra_data; } bytes PbftBlockExtraData::rlp() const { diff --git a/submodules/taraxa-evm b/submodules/taraxa-evm index 5ad48bf9a8..2edc2f91df 160000 --- a/submodules/taraxa-evm +++ b/submodules/taraxa-evm @@ -1 +1 @@ -Subproject commit 5ad48bf9a87bfa3496000ad130e191d12962232d +Subproject commit 2edc2f91df972511e1ccba6440a38efd32812ee2