Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use cryptonote::reward_money in db_sqlite #1802

Open
wants to merge 73 commits into
base: dev
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
3646d08
WIP oxen->sent transition code
jagerman Jun 27, 2024
c4dc9b2
HF21 transition code mostly finished
tewinget Jul 9, 2024
7b5a0ee
Post-hf21 purge and deactivation limit
tewinget Dec 5, 2024
42754cc
Final HF20 block payout
tewinget Dec 6, 2024
e2deeeb
correct removal of nodes which did not go past hf21
tewinget Jan 9, 2025
5d07ebc
HF21 fixes and debug logging
tewinget Jan 9, 2025
f156496
rough-but-complete script for hf21 transition info
tewinget Jan 9, 2025
180866b
change localdev initial staking req to match contract
tewinget Jan 9, 2025
9d6006c
testnet hf21 height
tewinget Jan 9, 2025
b34f4bd
change testnet netid for chain restart
tewinget Jan 9, 2025
527645d
Don't apply HF dereg grace period to zombie nodes
tewinget Jan 10, 2025
f41787f
make hf21 zombies not payable
tewinget Jan 10, 2025
a5ea7d9
remove erroneous hf21 transition change
tewinget Jan 10, 2025
dd03f86
add hf21 dry run rpc method
tewinget Jan 23, 2025
b20b10f
local devnet retry on json-rpc 'error'
tewinget Jan 27, 2025
5a54706
hf21 transition: always set bls key if present, even if node fails tr…
tewinget Jan 27, 2025
c77429c
devnet restart for hf21 testing
tewinget Jan 27, 2025
5353058
add devnet reset old block hashes
tewinget Jan 27, 2025
7108ee1
fix inverted condition in daemon command
tewinget Jan 28, 2025
30f4c56
devnet temp hf heights, double staking req
tewinget Jan 28, 2025
8c649df
devnet timings underflow fix (and slow it down a little)
tewinget Jan 29, 2025
01b8b19
devnet hf20 height
tewinget Jan 30, 2025
96d60ce
(reverted later) devnet hf21 height and stop chain before
tewinget Feb 4, 2025
ca7844b
redo/fix pre-hf21 bulk payout for non-registrants
tewinget Feb 5, 2025
a6cffca
push devnet hf21 back a little
tewinget Feb 5, 2025
dfacb71
devnet hf21 parameters
tewinget Feb 5, 2025
ca70c19
fix uptime proofs using hf rules one block too early
tewinget Feb 5, 2025
f4e51bd
stop using old monero-style keys altogether at HF21
tewinget Feb 5, 2025
5d23fcb
fix stake scaling for hf21 transition for over-funded nodes
tewinget Feb 5, 2025
bb4d997
fix hf21_info stake scaling for over-funded nodes
tewinget Feb 5, 2025
25153b0
change devnet l2 tracker parameters
tewinget Feb 5, 2025
c19c5e1
remove devnet stall-before-hf21 code
tewinget Feb 5, 2025
f4e6743
devnet hf dereg grace period 100 blocks
tewinget Feb 5, 2025
374529e
devnet reboot for testing mainnet test contracts
tewinget Feb 6, 2025
4243e9f
cleanup
tewinget Feb 8, 2025
2819955
clang format
tewinget Feb 8, 2025
20b1323
hf21 ensure 'zombies' do not linger in recently removed
tewinget Feb 11, 2025
9828720
Move network config args into command_line.cpp
Doy-lee Feb 11, 2025
4912e71
Rmove unused offline field in Blockchain
Doy-lee Feb 13, 2025
a8b8a90
Move network config args into command_line.cpp
Doy-lee Feb 11, 2025
ddf7a1b
Remove unused macro BINARY_ARCHIVE_STREAM
Doy-lee Feb 11, 2025
331fb7b
Optimize/remove unused headers in command_line.h
Doy-lee Feb 12, 2025
f899062
Remove unused headers from core
Doy-lee Feb 12, 2025
f20952f
Remove unused headers in blockchain
Doy-lee Feb 13, 2025
e9407af
Make stacktrace a cmake build option, WITH_STACKTRACE
Doy-lee Feb 19, 2025
1c82e08
Add mocknet support via --fork-to-mocknet
Doy-lee Feb 13, 2025
bb9da36
Enable mocknet through CMake option WITH_MOCKNET
Doy-lee Feb 19, 2025
f7f8244
Mocknet changes to work on mainnet
Doy-lee Feb 24, 2025
95cb23d
Final HF21 payments must not payout 0 OXEN when truncated from DB OXEN
Doy-lee Feb 26, 2025
cb5c050
Gen data for making transition CSVs, block purging in mocknet
Doy-lee Feb 24, 2025
bffd366
Allow money printing to take custom decimal places
Doy-lee Feb 28, 2025
80b3268
Add more detail to the CSV dumps of the token transition
Doy-lee Feb 28, 2025
8a1aa91
Hide mocknet impl, pull transition parameters into struct
Doy-lee Feb 28, 2025
be2c586
Pass the transition context into the transition function
Doy-lee Mar 3, 2025
4f8180b
Remove unused parse_oxen/eth_address from sent_transition.h
Doy-lee Mar 3, 2025
a845879
Calc transition STAKING_RATIO at runtime, make conversion ratio 64bits
Doy-lee Mar 3, 2025
beb1b5e
Simplify mocknet construction of the transition parameters
Doy-lee Mar 3, 2025
7695a36
Revert some incorrect transition stat calculations
Doy-lee Mar 4, 2025
9d21326
Add sanity check of HF transition code when producing CSV reports
Doy-lee Mar 4, 2025
a2afb79
Add option to dump the transition CSVs, fix incorrect mocknet convers…
Doy-lee Mar 4, 2025
8835a49
SESH rewards need to be stored in DB units
Doy-lee Mar 4, 2025
6f284c0
Remove debugging hardforks for testing mocknet
Doy-lee Mar 5, 2025
3a13a86
Adjust mocknet to fork at chain height to follow codebase convention
Doy-lee Mar 5, 2025
cc395aa
Add braces around no-op macro when mocknet is disabled
Doy-lee Mar 5, 2025
16e03ed
Fix mocknet comment, use oxen::array_count
Doy-lee Mar 5, 2025
273767b
Linting pass
Doy-lee Mar 5, 2025
da5f3e8
Avoid querying block height before miner_tx is instantiated
Doy-lee Mar 5, 2025
cfe33df
Use constexpr bitset size in bytes to avoid clang-format bug
Doy-lee Mar 6, 2025
0318b5d
Use strong-typed reward_money in DB SQLite
Doy-lee Mar 5, 2025
42f4ece
Linting pass for reward_money change
Doy-lee Mar 6, 2025
ea82e61
Fix unit test for SQLite.CalculateRewards to use reward_money correctly
Doy-lee Mar 6, 2025
7b6dc7c
Handle N = 0 for reward handler
Doy-lee Mar 6, 2025
5a87795
Cross compile windows has a lowercase windows.h
Doy-lee Mar 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Simplify mocknet construction of the transition parameters
  • Loading branch information
Doy-lee committed Mar 5, 2025
commit beb1b5ea2ced0d01d1544f1347ead1d11e8944a2
7 changes: 2 additions & 5 deletions src/network_config/mocknet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -437,19 +437,16 @@ void mocknet_push_mock_pulse_block(cryptonote::core& core) {
oxen::log::info(
globallogcat,
fg(fmt::terminal_color::yellow) | fmt::emphasis::bold,
"mocknet generating mock transition data to the sesh network");
"Mocknet generating mock transition data to the sesh network");

// NOTE: Assume all the SN's have submitted their BLS key by mocking it in
uint64_t next_bls_key = 0;
for (auto it : snl_list) {
std::shared_ptr<const service_nodes::service_node_info> sn_info = it.info;
crypto::ed25519_public_key ed_key = {};
std::memcpy(ed_key.data(), &it.pubkey, sizeof(it.pubkey));

eth::bls_public_key bls_key = {};
std::memcpy(bls_key.data(), &next_bls_key, sizeof(next_bls_key));
next_bls_key++;
globals.transition_bls_keys[ed_key] = bls_key;
globals.transition_bls_keys[crypto::ed25519_public_key{it.pubkey}] = bls_key;
}

// NOTE: Construct the addresses and the shares of the bonus tokens here!
Expand Down