Skip to content

Commit

Permalink
testnet10 second try
Browse files Browse the repository at this point in the history
  • Loading branch information
madMAx43v3r committed Apr 25, 2023
1 parent b7a879b commit 4388309
Show file tree
Hide file tree
Showing 15 changed files with 73 additions and 45 deletions.
Binary file modified mmx-node/linux/x86_64/bin/calc_test_rewards
Binary file not shown.
Binary file modified mmx-node/linux/x86_64/bin/mmx_node
Binary file not shown.
Binary file modified mmx-node/linux/x86_64/bin/mmx_timelord
Binary file not shown.
3 changes: 2 additions & 1 deletion mmx-node/linux/x86_64/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/x86_64/config/default/TimeLord.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"enable_reward": true
}
3 changes: 2 additions & 1 deletion mmx-node/linux/x86_64/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/x86_64/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
}
2 changes: 1 addition & 1 deletion mmx-node/linux/x86_64/config/testnet10/Wallet.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"token_whitelist": [
"mmx1m8qs007sgerhy69zcd98pfdnj3466q24ff9alphmc5nxjwvjules8nh77l"
"mmx17uuqmktq33mmh278d3nlqy0mrgw9j2vtg4l5vrte3m06saed9yys2q5hrf"
]
}
Binary file modified mmx-node/linux/x86_64/lib/libmmx_iface.so
Binary file not shown.
Binary file modified mmx-node/linux/x86_64/lib/libmmx_modules.so
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "GIT_COMMIT_HASH": "d10340e13a7e63c8d94417e606338280b3ad5d3b" }
{ "GIT_COMMIT_HASH": "5f57640a1934d10c97e9d56f184563b715b7d2fa" }
41 changes: 19 additions & 22 deletions mmx-node/linux/x86_64/www/web-gui/public/explorer.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ 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: "TX Fees", value: 'tx_fees' },
{ text: "Size", value: 'static_cost_ratio' },
{ text: "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.reward_addr ? (item.reward_amount.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 @@ -418,21 +409,27 @@ Vue.component('block-view', {
<td class="key-cell">{{ $t('block_view.vdf_iterations') }}</td>
<td>{{data.vdf_iters}}</td>
</tr>
<tr>
<td class="key-cell">Timelord</td>
<td><router-link :to="'/explore/address/' + data.vdf_reward">{{data.vdf_reward}}</router-link></td>
</tr>
<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">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}}&nbsp;&nbsp;<b>MMX</b></td>
</tr>
</template>
<template v-if="data.proof">
<tr>
<td class="key-cell">TX Fees</td>
<td>{{data.tx_fees.value}}&nbsp;&nbsp;<b>MMX</b></td>
</tr>
<tr>
<td class="key-cell">{{ $t('block_view.tx_count') }}</td>
<td>{{data.tx_count}}</td>
Expand Down
7 changes: 7 additions & 0 deletions mmx-node/linux/x86_64/www/web-gui/public/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ function get_short_addr(address, length) {
return address.substring(0, length) + '...' + address.substring(62 - length);
}

function get_short_hash(hash, length) {
if(!length) {
length = 10;
}
return hash.substring(0, length) + '...' + hash.substring(64 - length);
}

const MMX_ADDR = "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev";

const Wallet = {
Expand Down
52 changes: 35 additions & 17 deletions mmx-node/linux/x86_64/www/web-gui/public/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ Vue.component('node-settings', {
opencl_platform_list: null,
farmer_reward_addr: "null",
timelord_reward_addr: "null",
enable_timelord_reward: null,
verify_timelord_reward: null,
reload_interval: null,
plot_dirs: [],
new_plot_dir: null,
Expand Down Expand Up @@ -55,6 +57,8 @@ Vue.component('node-settings', {
}
this.farmer_reward_addr = data["Farmer.reward_addr"];
this.timelord_reward_addr = data["TimeLord.reward_addr"];
this.enable_timelord_reward = data["TimeLord.enable_reward"];
this.verify_timelord_reward = data["Node.verify_vdf_rewards"];
this.reload_interval = data["Harvester.reload_interval"];
this.plot_dirs = data["Harvester.plot_dirs"];
});
Expand Down Expand Up @@ -173,6 +177,16 @@ Vue.component('node-settings', {
this.set_config("TimeLord.reward_addr", value.length ? value : null, true);
}
},
enable_timelord_reward(value, prev) {
if(prev != null) {
this.set_config("TimeLord.enable_reward", value, true);
}
},
verify_timelord_reward(value, prev) {
if(prev != null) {
this.set_config("Node.verify_vdf_rewards", value, true);
}
},
reload_interval(value, prev) {
if(prev != null) {
this.set_config("Harvester.reload_interval", value, true);
Expand Down Expand Up @@ -224,23 +238,27 @@ Vue.component('node-settings', {
<v-card-title>General</v-card-title>
<v-card-text>
<v-progress-linear :active="loading" indeterminate absolute top></v-progress-linear>
<v-row>
<v-col>
<v-checkbox
v-model="timelord"
:label="$t('node_settings.enable_timelord')"
class="d-inline-block"
></v-checkbox>
</v-col>
<v-col>
<v-checkbox
v-model="open_port"
label="Open network port to allow incoming connections (UPnP)"
class="d-inline-block"
></v-checkbox>
</v-col>
</v-row>
<v-checkbox
v-model="timelord"
:label="$t('node_settings.enable_timelord')"
class="my-0"
></v-checkbox>
<v-checkbox
v-model="enable_timelord_reward"
label="Enable TimeLord Rewards (requires one more CPU core)"
class="my-0"
></v-checkbox>
<v-checkbox
v-model="verify_timelord_reward"
label="Verify TimeLord Rewards (disable to speed up VDF verify)"
class="my-0"
></v-checkbox>
<v-checkbox
v-model="open_port"
label="Open network port to allow incoming connections (UPnP)"
class="my-0"
></v-checkbox>
<v-select
v-model="opencl_platform"
Expand Down
2 changes: 1 addition & 1 deletion mmx-node/linux/x86_64/www/web-gui/public/wallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ Vue.component('account-tx-history', {
</template>
<template v-slot:item.transaction_id="{ item }">
<router-link :to="'/explore/transaction/' + item.id">{{item.id.substring(0,16)}}...{{item.id.substring(48)}}</router-link>
<router-link :to="'/explore/transaction/' + item.id">{{get_short_hash(item.id, 16)}}</router-link>
</template>
<template v-slot:item.confirmed="{ item }">
Expand Down

0 comments on commit 4388309

Please sign in to comment.