Skip to content

Commit

Permalink
arm64 testnet10 update
Browse files Browse the repository at this point in the history
  • Loading branch information
madMAx43v3r committed May 2, 2023
1 parent 3430e3c commit 8191b27
Show file tree
Hide file tree
Showing 60 changed files with 1,371 additions and 365 deletions.
2 changes: 1 addition & 1 deletion mmx-node/linux/arm64/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=testnet9
NETWORK=testnet10
echo ${NETWORK} > "${MMX_HOME}NETWORK"
fi

Expand Down
Binary file modified mmx-node/linux/arm64/bin/calc_test_rewards
Binary file not shown.
Binary file modified mmx-node/linux/arm64/bin/dump_binary
Binary file not shown.
Binary file modified mmx-node/linux/arm64/bin/mmx
Binary file not shown.
Binary file added mmx-node/linux/arm64/bin/mmx_compile
Binary file not shown.
Binary file modified mmx-node/linux/arm64/bin/mmx_farmer
Binary file not shown.
Binary file modified mmx-node/linux/arm64/bin/mmx_harvester
Binary file not shown.
Binary file modified mmx-node/linux/arm64/bin/mmx_node
Binary file not shown.
Binary file modified mmx-node/linux/arm64/bin/mmx_timelord
Binary file not shown.
Binary file modified mmx-node/linux/arm64/bin/mmx_wallet
Binary file not shown.
Binary file modified mmx-node/linux/arm64/bin/tx_bench
Binary file not shown.
1 change: 1 addition & 0 deletions mmx-node/linux/arm64/config/default/Harvester.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"num_threads": 16,
"max_queue_ms": 120000,
"config_path": "config/local/"
}
3 changes: 2 additions & 1 deletion mmx-node/linux/arm64/config/default/Node.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"num_sync_retries": 5,
"sync_loss_delay": 180,
"max_fork_length": 1000,
"validate_interval_ms": 500
"validate_interval_ms": 500,
"verify_vdf_rewards": true
}
3 changes: 3 additions & 0 deletions mmx-node/linux/arm64/config/default/TimeLord.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"enable_reward": true
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
mmx18prt3g38ws4hjh59y3xq0znsa0nst69l9pyr5et6dpdvg8mfnfps8cssqx
mmx10xg2w2y3wf0l2ttt98en28jjsfqzrz4er76ydvp9kx00n5tts2dszc9rpk
Original file line number Diff line number Diff line change
@@ -1 +1 @@
mmx1ct5evvlq2delu7vnlmeu838chnwycdcq3wuujkckkcjcet0ealuqeajrl5
mmx1q3z9ln6tx69w7a57uamhywangz7x0lsc7ptrmnh22qj3k64q06pqzpzr4q
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mmx1xerme3ngua7y5ljmavw6s500umv4jnudn66cukkp7q0grjwch6uqcyz4fy
Original file line number Diff line number Diff line change
@@ -1 +1 @@
mmx183fcx8p7fntt0uj0n60dstk9u3p32y6smvl9v2n0ahsjcwfuccnqdfar8m
mmx1hfyq6t2jartw9f8fkkertepxef0f8egegd3m438ndfttrlhzzmks7c99tv
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mmx1rnang04sx9srtf8kxzkyrn6mj6wcgwjjmthwmflvaxpnds9ev7eqdug0ag
3 changes: 2 additions & 1 deletion mmx-node/linux/arm64/config/local_init/Node.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"opencl_device": 0
"opencl_device": 0,
"verify_vdf_rewards": true
}
3 changes: 2 additions & 1 deletion mmx-node/linux/arm64/config/local_init/TimeLord.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"reward_addr": null
"reward_addr": null,
"enable_reward": true
}
7 changes: 7 additions & 0 deletions mmx-node/linux/arm64/config/testnet10/Router.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"seed_peers": [
"5.9.65.85",
"5.9.65.10",
"65.108.224.248",
]
}
5 changes: 5 additions & 0 deletions mmx-node/linux/arm64/config/testnet10/Wallet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"token_whitelist": [
"mmx17uuqmktq33mmh278d3nlqy0mrgw9j2vtg4l5vrte3m06saed9yys2q5hrf"
]
}
42 changes: 42 additions & 0 deletions mmx-node/linux/arm64/config/testnet10/chain/params.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"port": 12340,
"block_time": 10,
"plot_filter": 8,
"plot_filter_nhash": 64,
"min_ksize": 26,
"infuse_delay": 3,
"challenge_delay": 6,
"challenge_interval": 64,
"commit_delay": 24,
"min_vdf_segments": 1000,
"num_vdf_segments": 1150,
"max_vdf_segments": 2048,
"vdf_seed": "test10",
"reward_factor": {
"value": 3048,
"inverse": 1000000000000000
},
"vdf_reward": 2500,
"min_reward": 500000,
"min_txfee": 2000,
"min_txfee_io": 1000,
"min_txfee_sign": 1000,
"min_txfee_exec": 2000,
"min_txfee_deploy": 2000,
"min_txfee_byte": 10,
"min_txfee_activate": 10000,
"max_block_size": 10000000,
"max_block_cost": 200000000,
"min_time_diff": 100000,
"initial_time_diff": 200000,
"initial_space_diff": 1,
"time_diff_constant": 1000,
"space_diff_constant": 100000000,
"virtual_space_constant": 1524,
"fixed_project_reward": 50000,
"project_ratio": {
"value": 1,
"inverse": 100
},
"project_addr": "mmx1cvc060jcsk3ywg36c5sm7zmrgth0ex7wp9s7jxvh4kgjgy2c90ss46rhwp"
}
1 change: 1 addition & 0 deletions mmx-node/linux/arm64/config/testnet10/parent
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
../default/
6 changes: 3 additions & 3 deletions mmx-node/linux/arm64/config/testnet9/Router.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"seed_peers": [
"23.88.74.202",
"94.130.47.147",
"65.108.106.243",
"65.108.110.149"
"65.108.224.248",
"5.9.65.85",
"5.9.65.10"
]
}
2 changes: 2 additions & 0 deletions mmx-node/linux/arm64/data/testnet9/rewards.json

Large diffs are not rendered by default.

622 changes: 622 additions & 0 deletions mmx-node/linux/arm64/data/testnet9/rewards.txt

Large diffs are not rendered by default.

Binary file modified mmx-node/linux/arm64/data/tx_offer_binary.dat
Binary file not shown.
Binary file modified mmx-node/linux/arm64/data/tx_plot_binary.dat
Binary file not shown.
Binary file added mmx-node/linux/arm64/data/tx_plot_nft_binary.dat
Binary file not shown.
Binary file modified mmx-node/linux/arm64/data/tx_swap_binary.dat
Binary file not shown.
Binary file added mmx-node/linux/arm64/data/tx_token_binary.dat
Binary file not shown.
3 changes: 2 additions & 1 deletion mmx-node/linux/arm64/include/automy/basic_opencl/Context.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#define CL_TARGET_OPENCL_VERSION 120

#include <CL/cl.h>
#include <CL/cl_ext.h>

#include <vector>
#include <string>
Expand All @@ -35,7 +36,7 @@ std::string get_platform_name(cl_platform_id platform);

cl_platform_id find_platform_by_name(const std::string& name);

cl_context create_context(cl_platform_id platform, cl_device_type device_type);
cl_context create_context(cl_platform_id platform, const std::vector<cl_device_id>& devices);

void release_context(cl_context& context);

Expand Down
7 changes: 3 additions & 4 deletions mmx-node/linux/arm64/include/automy/basic_opencl/Program.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ class Program {

std::vector<std::string> build_log;

Program(cl_context context, cl_platform_id platform);
Program(cl_context context);

Program(const Program&) = delete;
Program& operator=(const Program&) = delete;

~Program();

static std::shared_ptr<Program> create(cl_context context, cl_platform_id platform);
static std::shared_ptr<Program> create(cl_context context);

void add_source(const std::string& file_name);

Expand All @@ -42,7 +42,7 @@ class Program {

void create_from_source();

bool build(cl_device_type device_type, bool with_arg_names = true);
bool build(const std::vector<cl_device_id>& devices, bool with_arg_names = true);

void print_sources(std::ostream& out) const;

Expand All @@ -52,7 +52,6 @@ class Program {

private:
cl_context context;
cl_platform_id platform;
cl_program program = nullptr;
bool have_arg_info = false;

Expand Down
6 changes: 6 additions & 0 deletions mmx-node/linux/arm64/include/vnx/Util.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ uint64_t rand64();
/// Converts a binary string to a hex string, with constant length. (Without leading "0x")
std::string to_hex_string(const void* data, const size_t length, bool big_endian = false, bool lower_case = false);

/// Converts a hex string to binary vector. (Handles leading "0x")
std::vector<uint8_t> from_hex_string(const std::string& str);

/// Converts an integer to a hex string (big endian), without leading zeros. (Without leading "0x", upper case chars)
template<typename T>
std::string to_hex_string(const T& value) {
Expand Down Expand Up @@ -128,6 +131,9 @@ std::string get_socket_error_text();
/// Get this machines host name
std::string get_host_name();

/// Get peer address for socket
std::string get_peer_address(int sock);


} // vnx

Expand Down
Binary file modified mmx-node/linux/arm64/lib/libautomy_basic_opencl.so
Binary file not shown.
Binary file modified mmx-node/linux/arm64/lib/libautomy_basic_opencl_static.a
Binary file not shown.
Binary file modified mmx-node/linux/arm64/lib/libmmx_iface.so
Binary file not shown.
Binary file modified mmx-node/linux/arm64/lib/libmmx_modules.so
Binary file not shown.
Binary file modified mmx-node/linux/arm64/lib/libmmx_vm.so
Binary file not shown.
Binary file modified mmx-node/linux/arm64/lib/libvnx_addons.so
Binary file not shown.
Binary file modified mmx-node/linux/arm64/lib/libvnx_base.so
Binary file not shown.
10 changes: 7 additions & 3 deletions mmx-node/linux/arm64/scripts/genesis_setup.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
./build/create_plot_binary > config/default/chain/params/plot_binary
./build/create_offer_binary > config/default/chain/params/offer_binary
./build/create_swap_binary > config/default/chain/params/swap_binary
#!/bin/bash

./build/tools/mmx_compile -f src/contract/swap.js -t -o data/tx_swap_binary.dat > config/default/chain/params/swap_binary
./build/tools/mmx_compile -f src/contract/offer.js -t -o data/tx_offer_binary.dat > config/default/chain/params/offer_binary
./build/tools/mmx_compile -f src/contract/token.js -t -o data/tx_token_binary.dat > config/default/chain/params/token_binary
./build/tools/mmx_compile -f src/contract/virtual_plot.js -t -o data/tx_plot_binary.dat > config/default/chain/params/plot_binary
./build/tools/mmx_compile -f src/contract/plot_nft.js -t -o data/tx_plot_nft_binary.dat > config/default/chain/params/plot_nft_binary
2 changes: 1 addition & 1 deletion mmx-node/linux/arm64/scripts/win/activate.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ IF "%MMX_DATA%"=="" (
SET "MMX_DATA=%MMX_HOME%"
)

SET "NETWORK=testnet9"
SET "NETWORK=testnet10"
SET "MMX_NETWORK=%MMX_DATA%%NETWORK%\"

ECHO NETWORK=%NETWORK%
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "GIT_COMMIT_HASH": "16939684ebca0ee7085db420c20690606edabb83" }
{ "GIT_COMMIT_HASH": "6fa16aadff16a2eae1510becd27d7e89ba5878df" }
78 changes: 30 additions & 48 deletions mmx-node/linux/arm64/www/web-gui/public/explorer.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Vue.component('explore-menu', {
<v-tabs class="mb-2">
<v-tab to="/explore/blocks">{{ $t('explore_menu.blocks') }}</v-tab>
<v-tab to="/explore/transactions">{{ $t('explore_menu.transactions') }}</v-tab>
<v-tab to="/explore/farmers">Farmers</v-tab>
<v-tab to="/explore/farmers">{{ $t('explore_menu.farmers') }}</v-tab>
</v-tabs>
</div>
`
Expand All @@ -65,8 +65,9 @@ Vue.component('blocks-table', {
{ text: this.$t('explore_blocks.k'), value: 'ksize' },
{ text: this.$t('explore_blocks.score'), value: 'score' },
{ text: this.$t('explore_blocks.reward'), value: 'reward' },
{ text: "Size", value: 'static_cost_ratio' },
{ text: "Cost", value: 'total_cost_ratio' },
{ text: "TX Fees", value: 'tx_fees' },
{ text: this.$t('explore_blocks.size'), value: 'static_cost_ratio' },
{ text: this.$t('explore_blocks.cost'), value: 'total_cost_ratio' },
{ text: this.$t('explore_blocks.hash'), value: 'hash' },
]
}
Expand Down Expand Up @@ -99,7 +100,11 @@ Vue.component('blocks-table', {
</template>
<template v-slot:item.reward="{ item }">
{{item.tx_base && item.tx_base.exec_result ? (item.tx_base.exec_result.total_fee_value).toFixed(3) + "&nbsp;&nbsp;MMX" : null}}
{{item.reward_addr ? (item.reward_amount.value).toFixed(3) + " MMX" : null}}
</template>
<template v-slot:item.tx_fees="{ item }">
{{item.tx_count ? (item.tx_fees.value).toFixed(3) + " MMX" : null}}
</template>
<template v-slot:item.static_cost_ratio="{ item }">
Expand All @@ -111,7 +116,7 @@ Vue.component('blocks-table', {
</template>
<template v-slot:item.hash="{ item }">
<router-link :to="'/explore/block/hash/' + item.hash">{{item.hash}}</router-link>
<router-link :to="'/explore/block/hash/' + item.hash">{{get_short_hash(item.hash, 16)}}</router-link>
</template>
</v-data-table>
Expand All @@ -129,20 +134,6 @@ Vue.component('explore-blocks', {
loaded: false
}
},
computed: {
headers() {
return [
{ text: this.$t('explore_blocks.height'), value: 'height', width: "5%"},
{ text: this.$t('explore_blocks.tx'), value: 'tx_count' },
{ text: this.$t('explore_blocks.k'), value: 'ksize' },
{ text: this.$t('explore_blocks.score'), value: 'score' },
{ text: this.$t('explore_blocks.reward'), value: 'reward' },
{ text: this.$t('explore_blocks.tdiff'), value: 'time_diff' },
{ text: this.$t('explore_blocks.sdiff'), value: 'space_diff' },
{ text: this.$t('explore_blocks.hash'), value: 'hash' },
]
}
},
methods: {
update() {
fetch('/wapi/headers?limit=' + this.limit)
Expand Down Expand Up @@ -255,8 +246,8 @@ Vue.component('explore-farmers', {
computed: {
headers() {
return [
{ text: "No. Blocks", value: 'block_count'},
{ text: "Farmer Key", value: 'farmer_key'},
{ text: this.$t('explore_farmers.no_blocks'), value: 'block_count'},
{ text: this.$t('explore_farmers.farmer_key'), value: 'farmer_key'},
]
}
},
Expand Down Expand Up @@ -418,13 +409,27 @@ Vue.component('block-view', {
<td class="key-cell">{{ $t('block_view.vdf_iterations') }}</td>
<td>{{data.vdf_iters}}</td>
</tr>
<template v-if="data.tx_base">
<template v-if="data.vdf_reward_addr">
<tr>
<td class="key-cell">Timelord</td>
<td><router-link :to="'/explore/address/' + data.vdf_reward_addr">{{data.vdf_reward_addr}}</router-link></td>
</tr>
</template>
<template v-if="data.reward_addr">
<tr>
<td class="key-cell">{{ $t('block_view.tx_base') }}</td>
<td><router-link :to="'/explore/transaction/' + data.tx_base.id">{{data.tx_base.id}}</router-link></td>
<td class="key-cell">Farmer Address</td>
<td><router-link :to="'/explore/address/' + data.reward_addr">{{data.reward_addr}}</router-link></td>
</tr>
</template>
<template v-if="data.proof">
<tr>
<td class="key-cell">Block Reward</td>
<td>{{data.reward_amount.value}} MMX</td>
</tr>
<tr>
<td class="key-cell">TX Fees</td>
<td>{{data.tx_fees.value}} MMX</td>
</tr>
<tr>
<td class="key-cell">{{ $t('block_view.tx_count') }}</td>
<td>{{data.tx_count}}</td>
Expand All @@ -451,29 +456,6 @@ Vue.component('block-view', {
</v-simple-table>
</v-card>
<v-card class="my-2">
<v-simple-table v-if="data.tx_base">
<template v-slot:default>
<thead>
<tr>
<th class="key-cell"></th>
<th>{{ $t('block_view.amount') }}</th>
<th></th>
<th>{{ $t('block_view.address') }}</th>
</tr>
</thead>
<tbody>
<tr v-for="(item, index) in data.tx_base.outputs" :key="index">
<td class="key-cell">{{ $t('block_view.reward') }}[{{index}}]</td>
<td><b>{{item.value}}</b></td>
<td>{{item.symbol}}</td>
<td><router-link :to="'/explore/address/' + item.address">{{item.address}}</router-link></td>
</tr>
</tbody>
</template>
</v-simple-table>
</v-card>
<v-card class="my-2">
<v-simple-table v-if="data.tx_list.length">
<thead>
Expand Down Expand Up @@ -576,7 +558,7 @@ Vue.component('transaction-view', {
<template v-if="data.height">
<router-link :to="'/explore/block/height/' + data.height">{{data.height}}</router-link>
</template>
<template v-if="!data.height"><i>pending</i></template>
<template v-if="!data.height"><i>{{ $t('common.pending') }}</i></template>
</td>
</tr>
<tr v-if="data.did_fail" class="red--text">
Expand Down
6 changes: 3 additions & 3 deletions mmx-node/linux/arm64/www/web-gui/public/farmer.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Vue.component('farmer-plots', {
},
headers2() {
return [
{ text: "Harvester", value: 'name' },
{ text: this.$t('common.harvester'), value: 'name' },
{ text: this.$t('farmer_info.physical_size'), value: 'bytes' },
]
}
Expand Down Expand Up @@ -281,11 +281,11 @@ Vue.component('farmer-blocks', {
</template>
<template v-slot:item.reward="{ item }">
<b>{{item.tx_base && item.tx_base.exec_result ? item.tx_base.exec_result.total_fee_value : 0}}</b> MMX
<b>{{item.reward_amount.value}}</b> MMX
</template>
<template v-slot:item.tx_fees="{ item }">
<b>{{item.tx_fees / 1e6}}</b> MMX
<b>{{item.tx_fees.value}}</b> MMX
</template>
<template v-slot:item.time="{ item }">
Expand Down
Loading

0 comments on commit 8191b27

Please sign in to comment.