Skip to content

Commit

Permalink
Merge pull request #254 from madMAx43v3r/mainnet-rc
Browse files Browse the repository at this point in the history
Mainnet-RC
  • Loading branch information
madMAx43v3r authored Jan 2, 2025
2 parents 0b41bd2 + 4dacee9 commit 018239a
Show file tree
Hide file tree
Showing 889 changed files with 21,465 additions and 12,504 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@ CMakeUserPresets.json
/NETWORK
/DB_VERSION
/testnet*
/mainnet*
/tmp
/coverage.info
/.idea
/_deps
/*.dat
/www/web-gui/public/GIT_COMMIT_HASH.json
/test/vm/AFL/outputs/*
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ add_library(mmx_iface SHARED
src/Transaction.cpp
src/Operation.cpp
src/Contract.cpp
src/Challenge.cpp
src/Solution.cpp
src/ProofOfTime.cpp
src/ProofOfSpace.cpp
Expand Down Expand Up @@ -158,6 +157,9 @@ add_library(mmx_iface SHARED
src/account_info_t.cpp
src/VDF_Point.cpp
src/Partial.cpp
src/ChainParams.cpp
src/utils.cpp
src/ValidatorVote.cpp
)

add_library(mmx_vm SHARED
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ ENV MMX_HOME="/data/"
VOLUME /data

# node p2p port
EXPOSE 12342/tcp
EXPOSE 10337/tcp
# http api port
EXPOSE 11380/tcp

Expand Down Expand Up @@ -72,4 +72,4 @@ ENV NVIDIA_DRIVER_CAPABILITIES compute,utility

FROM base AS intel
RUN apt-get update && apt-get install --no-install-recommends -y intel-opencl-icd \
&& rm -rf /var/lib/apt/lists/*
&& rm -rf /var/lib/apt/lists/*
46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,49 @@ The login password is auto-generated at first launch, located in `mmx-node/PASSW
- Fixed Virtual Plots, they now win blocks at the expected rate. On TN11 it was ~20 times less.
- Fixed block reward formula, average tx fee is subtracted from minimum reward again.

### Mainnet-RC

- New VDF scheme:
- Single VDF stream with infused Timelord reward
- No longer possible to steal or disable Timelord reward
- Proof challenges are now deterministic, apart from random infusions every 256 blocks on average
- If a proof's hash passes a filter, it will change future challenges and update difficutly
- Timelord rewards are now paid out every 50 blocks in bulk to fastest TL
- VDF segment count is now dynamic, depending on TL speed:
- This means VDF verify time wont increase unless the GPU is at it's compute limit
- Previously VDF verify time would increase even if the GPU is not maxed out, due to fixed parallel work
- CPU verify is unchanged
- All proofs found are now included in blocks
- Yields accurate netspace estimation
- Supports extra security (see below)
- Recent blocks are further secured via a new voting scheme:
- Up to 21 farmers who found a lesser proof (didn't make a block) recently can act as a validator
- These validators vote on the first block received per height
- Only blocks made with the best known proof are voted for
- This prevents reverting recent blocks via double signing in most cases
- Previously it was always possible to replace the current peak via double signing, this is now impossible
- Previously if a farmer got lucky to find multiple blocks in a row:
- He could also replace them at will until another farmer found the next block
- This is now also impossible, unless the farmer has close to 50% or more netspace
- 50% TX fee burn (to avoid farmer spam attack + allow supply contraction)
- Project fee is taken from burned amount
- Virtual Plots have been removed due to an attack vector
- Together with the un-bounded block reward voting it was possible to generate a heavier chain with minimal real netspace
- Improved block reward voting: Majority vote out of 8640 blocks wins, 1% change up/down per day, >50% participation required.
- Offer contract now supports price update (at most every 1080 blocks)
- Pooling support + Reference Pool implementation
- Improved difficulty adjustment algorithm (targets 4 proofs per block)
- VM improvements to reduce transaction costs
- Send amount can now be up to 128-bit (was limited to 64-bit before)
- Mint amount can now be up to 80-bit (was limited to 64-bit before)
- Added block timestamps
- Smart Contract unit test framework









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=testnet12
NETWORK=mainnet-rc
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
@@ -1,4 +1,4 @@
set(NETWORK "testnet12")
set(NETWORK "mainnet-rc")
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/nsis/;${CMAKE_MODULE_PATH}")

function(get_all_targets var)
Expand Down
6 changes: 2 additions & 4 deletions config/default/Node.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
{
"num_sync_retries": 5,
"sync_loss_delay": 60,
"sync_loss_delay": 300,
"max_sync_jobs": 100,
"max_history": 2000,
"max_fork_length": 1000,
"max_history": 1000,
"validate_interval_ms": 500,
"verify_vdf_rewards": true,
"tx_pool_limit": 50
}
1 change: 1 addition & 0 deletions config/default/chain/params/escrow_binary
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mmx1c7shd66jwqcue6v0vcxnmujnm69g72ejzry763zy8n6n5pp8refsuzmcuy
1 change: 1 addition & 0 deletions config/default/chain/params/nft_binary
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mmx152k24jj9pvg32ssrl60kycw24wwe36dnspg6z37tdsyld3rhspesqp5f8e
2 changes: 1 addition & 1 deletion config/default/chain/params/offer_binary
Original file line number Diff line number Diff line change
@@ -1 +1 @@
mmx1mahaygvnkvm85hmzedmzyklwdxcztf2y7snuk3zrqqtseucacyds7gqmeq
mmx13gl0xq4ldhj55aax97xa8up94jmtl8dgjqqwcsewhdmjn8zq7qpspvg8lc
2 changes: 1 addition & 1 deletion config/default/chain/params/plot_binary
Original file line number Diff line number Diff line change
@@ -1 +1 @@
mmx1jj8tzd62arxkujefdmrtefhv7ts4q7zj3nu35v7punrv60662emsrn46jc
mmx19pv69aafsdjrzg8fe7aj2svgx2kwq72dqm5lj36m5h4vmmhcuj8qn9pn8y
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 @@
mmx150n2tqzz60d4fau0mqc23ekpv89z4z37gryn6enqqvjpwndmgjfscyz5hq
mmx1k3cjvctczuykddvz56u65n4jshpy36k0crdet8zmcuqwl2u964wq7czquf
1 change: 1 addition & 0 deletions config/default/chain/params/relay_binary
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mmx1uy7at3hp0kxg47smucnxfdhgsrc0d8hu43s2q2u4asw7vz5967ds80yhre
2 changes: 1 addition & 1 deletion config/default/chain/params/swap_binary
Original file line number Diff line number Diff line change
@@ -1 +1 @@
mmx1gpu8spcn0kwv63ymds8xawfslcwrgh4jsvzr3p64rcq5cf5uf0lszexlms
mmx1dfttxvmg9jz0wn8wnl9gm0plfsu2cvfxy0avs5u0829wkqytex4qmk78ax
1 change: 1 addition & 0 deletions config/default/chain/params/template_binary
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mmx1v5kkwr2hky2pyvpwv69947j8xjqt99u3kdrtt6pz73cxqtxtvsusuusz89
1 change: 1 addition & 0 deletions config/default/chain/params/time_lock_binary
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mmx1z9fazg7la8vjfkrtw2eyxk9xersguz9k4l30e45a4mqetqqfezxqp6lglc
2 changes: 1 addition & 1 deletion config/default/chain/params/token_binary
Original file line number Diff line number Diff line change
@@ -1 +1 @@
mmx1af3nmx8zefduyqexz8z5v6qz2ks96znd89jxjk0jwtu9sqvvgmzqw7u6xt
mmx1sjkwd9xmyr4yc2ajy83pcf22jzet9awu7hutp40knpxf8e0tr4nqy9xnqc
2 changes: 0 additions & 2 deletions config/local_init/Node.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"opencl_device": 0,
"verify_vdf_cpuopencl": false,
"verify_vdf_rewards": true,
"metalsdev_api_key": null
}
3 changes: 1 addition & 2 deletions config/local_init/TimeLord.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"reward_addr": null,
"enable_reward": true
"reward_addr": null
}
48 changes: 48 additions & 0 deletions config/mainnet-rc/Router.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"seed_peers": [
"104.157.124.160",
"108.12.226.21",
"109.198.29.98",
"119.6.178.16",
"135.131.174.76",
"141.135.6.172",
"143.177.124.174",
"162.118.7.169",
"162.198.119.188",
"163.58.65.191",
"184.146.2.29",
"184.71.194.234",
"195.239.203.162",
"203.129.18.0",
"212.15.59.91",
"217.198.130.81",
"42.3.123.47",
"46.189.185.59",
"47.253.32.11",
"47.34.208.57",
"49.231.43.170",
"66.231.154.77",
"69.197.174.72",
"70.19.84.129",
"71.227.39.0",
"75.172.49.125",
"76.128.231.98",
"76.232.65.235",
"78.107.240.148",
"78.180.96.7",
"79.104.211.73",
"80.235.212.62",
"82.37.10.82",
"84.215.4.105",
"86.30.69.50",
"87.118.169.200",
"89.242.3.102",
"93.43.225.93",
"94.19.237.176",
"95.105.142.58",
"95.22.80.4",
"95.31.212.141",
"110.164.184.5",
"89.116.184.19"
]
}
45 changes: 45 additions & 0 deletions config/mainnet-rc/chain/params.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"port": 10337,
"network": "mainnet-rc",
"plot_filter": 4,
"min_ksize": 26,
"infuse_delay": 3,
"challenge_delay": 6,
"challenge_interval": 256,
"commit_delay": 24,
"proofs_per_height": 4,
"max_validators": 21,
"vdf_segment_size": 250000,
"min_reward": 500000,
"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": 500,
"initial_space_diff": 50,
"initial_time_stamp": 1735823207000,
"time_diff_divider": 100,
"time_diff_constant": 1000000,
"space_diff_constant": 100000000000,
"vdf_reward": 500000,
"vdf_reward_interval": 50,
"reward_adjust_div": 100,
"reward_adjust_interval": 8640,
"min_reward_adjust": 10000,
"reward_activation": 50,
"transaction_activation": 100,
"fixed_project_reward": 50000,
"project_ratio": {
"value": 1,
"inverse": 100
}
}
File renamed without changes.
5 changes: 0 additions & 5 deletions config/mainnet/chain/params.json

This file was deleted.

6 changes: 6 additions & 0 deletions data/project_relay.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"__type": "mmx.contract.Executable",
"name": "Project Reward Relay",
"binary": "mmx1uy7at3hp0kxg47smucnxfdhgsrc0d8hu43s2q2u4asw7vz5967ds80yhre",
"init_args": ["mmx1cvc060jcsk3ywg36c5sm7zmrgth0ex7wp9s7jxvh4kgjgy2c90ss46rhwp"]
}
1 change: 1 addition & 0 deletions data/testnet12/rewards.json

Large diffs are not rendered by default.

Loading

0 comments on commit 018239a

Please sign in to comment.