Skip to content

Commit

Permalink
Merge pull request #246 from madMAx43v3r/testnet12
Browse files Browse the repository at this point in the history
Testnet12
  • Loading branch information
madMAx43v3r authored Jun 14, 2024
2 parents c68e231 + 50ac918 commit 52acac2
Show file tree
Hide file tree
Showing 44 changed files with 320 additions and 123 deletions.
2 changes: 1 addition & 1 deletion activate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ cp "${PASSWD_PATH}" "${MMX_HOME}PASSWD"
if [ -f "${MMX_HOME}NETWORK" ]; then
NETWORK=$(cat "${MMX_HOME}NETWORK")
else
NETWORK=testnet11
NETWORK=testnet12
echo ${NETWORK} > "${MMX_HOME}NETWORK"
fi

Expand Down
2 changes: 1 addition & 1 deletion cmake/win_pack.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ macro(get_all_targets_recursive targets dir)
list(APPEND ${targets} ${current_targets})
endmacro()

set(NETWORK "testnet11")
set(NETWORK "testnet12")
get_all_targets(all_targets)
set_target_properties(${all_targets} PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "$(OutDir)")
set_target_properties(${all_targets} PROPERTIES VS_DEBUGGER_ENVIRONMENT "MMX_HOME=$(USERPROFILE)\\.mmx\\\nMMX_DATA=$(USERPROFILE)\\.mmx\\\nNETWORK=${NETWORK}\nMMX_NETWORK=$(USERPROFILE)\\.mmx\\${NETWORK}\\\n")
Expand Down
3 changes: 0 additions & 3 deletions config/default/Farmer.json

This file was deleted.

2 changes: 1 addition & 1 deletion config/default/chain/params/offer_binary
Original file line number Diff line number Diff line change
@@ -1 +1 @@
mmx12jn049haarythqzl32ehc9kxrs6u2ueyj0aq3p68nvq22yxs73ksy2ms8l
mmx1mahaygvnkvm85hmzedmzyklwdxcztf2y7snuk3zrqqtseucacyds7gqmeq
2 changes: 1 addition & 1 deletion config/default/chain/params/plot_binary
Original file line number Diff line number Diff line change
@@ -1 +1 @@
mmx1sxpq3lct00h4asdpfyqk4zjjj7zera3zpx5xa4y7h05n9jmenenshq9fdd
mmx1jj8tzd62arxkujefdmrtefhv7ts4q7zj3nu35v7punrv60662emsrn46jc
2 changes: 1 addition & 1 deletion config/default/chain/params/plot_nft_binary
Original file line number Diff line number Diff line change
@@ -1 +1 @@
mmx14qv9cfu25nhp49mfs2tqpe07uvnpu634hkgqvup5klfuehm83vrq5fm0dp
mmx150n2tqzz60d4fau0mqc23ekpv89z4z37gryn6enqqvjpwndmgjfscyz5hq
2 changes: 1 addition & 1 deletion config/default/chain/params/swap_binary
Original file line number Diff line number Diff line change
@@ -1 +1 @@
mmx122hvah9lfj9p0tyey7lqc7usd3h25a7dw6aa5ke7shh7te3sgvrqzdt86y
mmx1gpu8spcn0kwv63ymds8xawfslcwrgh4jsvzr3p64rcq5cf5uf0lszexlms
2 changes: 1 addition & 1 deletion config/default/chain/params/token_binary
Original file line number Diff line number Diff line change
@@ -1 +1 @@
mmx14p3r04475n5qjcchuklk0z8qunknjwl7jr93zhv9xzzp0n78hgwsjy39kq
mmx1af3nmx8zefduyqexz8z5v6qz2ks96znd89jxjk0jwtu9sqvvgmzqw7u6xt
3 changes: 3 additions & 0 deletions config/testnet12/Node.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"mmx_usd_swap_addr": "mmx1uyyxl7xt8ev0sel7fh756kmqmwze0uzqemuz87560s9w5g23vrxqp4c7vy"
}
7 changes: 7 additions & 0 deletions config/testnet12/Router.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"seed_peers": [
"37.27.108.34",
"37.27.108.35",
"5.9.57.230"
]
}
5 changes: 5 additions & 0 deletions config/testnet12/Wallet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"token_whitelist": [
"mmx14tmh82zku65h7wsq0hlt0xayzcjznvu8zgdat92lluwrvx9mfupsqenjla"
]
}
43 changes: 43 additions & 0 deletions config/testnet12/chain/params.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"port": 12342,
"block_time": 10,
"plot_filter": 4,
"min_ksize": 26,
"infuse_delay": 3,
"challenge_delay": 6,
"challenge_interval": 256,
"commit_delay": 24,
"min_vdf_segments": 1000,
"num_vdf_segments": 1500,
"max_vdf_segments": 2048,
"network": "testnet12",
"vdf_reward": 10000,
"min_reward": 500000,
"reward_adjust_div": 50000,
"min_txfee": 20000,
"min_txfee_io": 10000,
"min_txfee_sign": 10000,
"min_txfee_memo": 5000,
"min_txfee_exec": 10000,
"min_txfee_deploy": 20000,
"min_txfee_byte": 100,
"min_txfee_read": 2000,
"min_txfee_read_kbyte": 2000,
"max_block_size": 250000000,
"max_block_cost": 1000000000,
"max_tx_cost": 25000000,
"min_fee_ratio": [1, 2, 3, 5, 10],
"initial_time_diff": 20000,
"initial_space_diff": 10,
"time_diff_constant": 10000,
"space_diff_constant": 10000000000,
"virtual_space_constant": 8108,
"reward_activation": 25000,
"transaction_activation": 100,
"fixed_project_reward": 50000,
"project_ratio": {
"value": 1,
"inverse": 100
},
"project_addr": "mmx1cvc060jcsk3ywg36c5sm7zmrgth0ex7wp9s7jxvh4kgjgy2c90ss46rhwp"
}
1 change: 1 addition & 0 deletions config/testnet12/parent
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
../default/
Binary file modified data/tx_offer_binary.dat
Binary file not shown.
Binary file modified data/tx_plot_binary.dat
Binary file not shown.
Binary file modified data/tx_plot_nft_binary.dat
Binary file not shown.
Binary file modified data/tx_swap_binary.dat
Binary file not shown.
Binary file modified data/tx_token_binary.dat
Binary file not shown.
4 changes: 2 additions & 2 deletions generated/include/mmx/BlockHeader.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ public:
vnx::optional<::mmx::addr_t> reward_addr;
int8_t reward_vote = 0;
uint64_t next_base_reward = 0;
uint32_t static_cost = 0;
uint32_t total_cost = 0;
uint64_t static_cost = 0;
uint64_t total_cost = 0;
uint32_t tx_count = 0;
uint64_t tx_fees = 0;
::mmx::hash_t tx_hash;
Expand Down
8 changes: 6 additions & 2 deletions generated/include/mmx/ChainParams.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ public:
::mmx::addr_t project_addr;
uint64_t fixed_project_reward = 50000;
::mmx::uint_fraction_t project_ratio;
uint32_t reward_activation = 50000;
uint32_t transaction_activation = 100000;

typedef ::vnx::Value Super;

Expand Down Expand Up @@ -111,7 +113,7 @@ protected:

template<typename T>
void ChainParams::accept_generic(T& _visitor) const {
_visitor.template type_begin<ChainParams>(50);
_visitor.template type_begin<ChainParams>(52);
_visitor.type_field("port", 0); _visitor.accept(port);
_visitor.type_field("decimals", 1); _visitor.accept(decimals);
_visitor.type_field("min_ksize", 2); _visitor.accept(min_ksize);
Expand Down Expand Up @@ -162,7 +164,9 @@ void ChainParams::accept_generic(T& _visitor) const {
_visitor.type_field("project_addr", 47); _visitor.accept(project_addr);
_visitor.type_field("fixed_project_reward", 48); _visitor.accept(fixed_project_reward);
_visitor.type_field("project_ratio", 49); _visitor.accept(project_ratio);
_visitor.template type_end<ChainParams>(50);
_visitor.type_field("reward_activation", 50); _visitor.accept(reward_activation);
_visitor.type_field("transaction_activation", 51); _visitor.accept(transaction_activation);
_visitor.template type_end<ChainParams>(52);
}


Expand Down
20 changes: 10 additions & 10 deletions generated/src/Block.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace mmx {


const vnx::Hash64 Block::VNX_TYPE_HASH(0x94965d816d328467ull);
const vnx::Hash64 Block::VNX_CODE_HASH(0xbf07ed2fdcc61d1dull);
const vnx::Hash64 Block::VNX_CODE_HASH(0x79aa685dc4f58d6ull);

vnx::Hash64 Block::get_type_hash() const {
return VNX_TYPE_HASH;
Expand Down Expand Up @@ -377,7 +377,7 @@ std::shared_ptr<vnx::TypeCode> Block::static_create_type_code() {
auto type_code = std::make_shared<vnx::TypeCode>();
type_code->name = "mmx.Block";
type_code->type_hash = vnx::Hash64(0x94965d816d328467ull);
type_code->code_hash = vnx::Hash64(0xbf07ed2fdcc61d1dull);
type_code->code_hash = vnx::Hash64(0x79aa685dc4f58d6ull);
type_code->is_native = true;
type_code->is_class = true;
type_code->native_size = sizeof(::mmx::Block);
Expand Down Expand Up @@ -501,15 +501,15 @@ std::shared_ptr<vnx::TypeCode> Block::static_create_type_code() {
}
{
auto& field = type_code->fields[19];
field.data_size = 4;
field.data_size = 8;
field.name = "static_cost";
field.code = {3};
field.code = {4};
}
{
auto& field = type_code->fields[20];
field.data_size = 4;
field.data_size = 8;
field.name = "total_cost";
field.code = {3};
field.code = {4};
}
{
auto& field = type_code->fields[21];
Expand Down Expand Up @@ -673,7 +673,7 @@ void write(TypeOutput& out, const ::mmx::Block& value, const TypeCode* type_code
else if(code && code[0] == CODE_STRUCT) {
type_code = type_code->depends[code[1]];
}
auto* const _buf = out.write(85);
auto* const _buf = out.write(93);
vnx::write_value(_buf + 0, value.version);
vnx::write_value(_buf + 4, value.height);
vnx::write_value(_buf + 8, value.nonce);
Expand All @@ -686,9 +686,9 @@ void write(TypeOutput& out, const ::mmx::Block& value, const TypeCode* type_code
vnx::write_value(_buf + 56, value.reward_vote);
vnx::write_value(_buf + 57, value.next_base_reward);
vnx::write_value(_buf + 65, value.static_cost);
vnx::write_value(_buf + 69, value.total_cost);
vnx::write_value(_buf + 73, value.tx_count);
vnx::write_value(_buf + 77, value.tx_fees);
vnx::write_value(_buf + 73, value.total_cost);
vnx::write_value(_buf + 81, value.tx_count);
vnx::write_value(_buf + 85, value.tx_fees);
vnx::write(out, value.hash, type_code, type_code->fields[1].code.data());
vnx::write(out, value.prev, type_code, type_code->fields[2].code.data());
vnx::write(out, value.weight, type_code, type_code->fields[7].code.data());
Expand Down
20 changes: 10 additions & 10 deletions generated/src/BlockHeader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace mmx {


const vnx::Hash64 BlockHeader::VNX_TYPE_HASH(0xcaae941a2fc712a6ull);
const vnx::Hash64 BlockHeader::VNX_CODE_HASH(0xdfa1bb560f8aaafull);
const vnx::Hash64 BlockHeader::VNX_CODE_HASH(0xc88a419a59d443ccull);

vnx::Hash64 BlockHeader::get_type_hash() const {
return VNX_TYPE_HASH;
Expand Down Expand Up @@ -369,7 +369,7 @@ std::shared_ptr<vnx::TypeCode> BlockHeader::static_create_type_code() {
auto type_code = std::make_shared<vnx::TypeCode>();
type_code->name = "mmx.BlockHeader";
type_code->type_hash = vnx::Hash64(0xcaae941a2fc712a6ull);
type_code->code_hash = vnx::Hash64(0xdfa1bb560f8aaafull);
type_code->code_hash = vnx::Hash64(0xc88a419a59d443ccull);
type_code->is_native = true;
type_code->is_class = true;
type_code->native_size = sizeof(::mmx::BlockHeader);
Expand Down Expand Up @@ -491,15 +491,15 @@ std::shared_ptr<vnx::TypeCode> BlockHeader::static_create_type_code() {
}
{
auto& field = type_code->fields[19];
field.data_size = 4;
field.data_size = 8;
field.name = "static_cost";
field.code = {3};
field.code = {4};
}
{
auto& field = type_code->fields[20];
field.data_size = 4;
field.data_size = 8;
field.name = "total_cost";
field.code = {3};
field.code = {4};
}
{
auto& field = type_code->fields[21];
Expand Down Expand Up @@ -656,7 +656,7 @@ void write(TypeOutput& out, const ::mmx::BlockHeader& value, const TypeCode* typ
else if(code && code[0] == CODE_STRUCT) {
type_code = type_code->depends[code[1]];
}
auto* const _buf = out.write(85);
auto* const _buf = out.write(93);
vnx::write_value(_buf + 0, value.version);
vnx::write_value(_buf + 4, value.height);
vnx::write_value(_buf + 8, value.nonce);
Expand All @@ -669,9 +669,9 @@ void write(TypeOutput& out, const ::mmx::BlockHeader& value, const TypeCode* typ
vnx::write_value(_buf + 56, value.reward_vote);
vnx::write_value(_buf + 57, value.next_base_reward);
vnx::write_value(_buf + 65, value.static_cost);
vnx::write_value(_buf + 69, value.total_cost);
vnx::write_value(_buf + 73, value.tx_count);
vnx::write_value(_buf + 77, value.tx_fees);
vnx::write_value(_buf + 73, value.total_cost);
vnx::write_value(_buf + 81, value.tx_count);
vnx::write_value(_buf + 85, value.tx_fees);
vnx::write(out, value.hash, type_code, type_code->fields[1].code.data());
vnx::write(out, value.prev, type_code, type_code->fields[2].code.data());
vnx::write(out, value.weight, type_code, type_code->fields[7].code.data());
Expand Down
Loading

0 comments on commit 52acac2

Please sign in to comment.