-
Notifications
You must be signed in to change notification settings - Fork 122
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
Batch sn payments #1450
Batch sn payments #1450
Conversation
this will be a chonky PR when it's ready |
9e683e3
to
3d41efe
Compare
c196b19
to
f46efa2
Compare
f46efa2
to
7ade8b2
Compare
Todo:
Trigger
Constraint
|
-> https://github.com/SRombauts/SQLiteCpp now used in storage server, lets you write your own queries but keeps a C++ interface that's much nicer to work with than the straight C interface. |
a6b57ea
to
45f7c07
Compare
de43b6b
to
997039a
Compare
Misc other issues:
|
f20d57e
to
28c6d84
Compare
CMakeLists.txt
Outdated
@@ -86,6 +86,9 @@ else() | |||
message(WARNING "PIE disabled: cmake 3.14+ is required for proper PIE linking support") | |||
endif() | |||
|
|||
# TODO sean remove this | |||
set(CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} -ldl") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was something that came up when trying to run cmake with -DCMAKE_BUILD_TYPE=Debug
this made it work but unsure exactly what is going on behind the scenes and whether it should stay here or not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-ldl
is already linked for most things via the ${CMAKE_DL_LIBS}
, included as part of the extra
target dependencies. I'm guessing there's something not depending on extra
that needs this? Whatever it is, it's better to do it as:
target_link_libraries(target INTERFACE ${CMAKE_DL_LIBS})
(where target
is whatever the target is with the linking issue).
28c6d84
to
5133b54
Compare
This is now ready for review.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First pass, left many comments/suggestions, some tiny, some bigger.
More to come.
CMakeLists.txt
Outdated
@@ -86,6 +86,9 @@ else() | |||
message(WARNING "PIE disabled: cmake 3.14+ is required for proper PIE linking support") | |||
endif() | |||
|
|||
# TODO sean remove this | |||
set(CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} -ldl") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-ldl
is already linked for most things via the ${CMAKE_DL_LIBS}
, included as part of the extra
target dependencies. I'm guessing there's something not depending on extra
that needs this? Whatever it is, it's better to do it as:
target_link_libraries(target INTERFACE ${CMAKE_DL_LIBS})
(where target
is whatever the target is with the linking issue).
8f3ae75
to
116624c
Compare
8318c26
to
667ba98
Compare
This updates the coinbase transactions to reward service nodes periodically rather than every block. If you recieve a service node reward this reward will be delayed x blocks, if you receive another reward to the same wallet before those blocks have been completed it will be added to your total and all will be paid out after those x blocks has passed. For example if our batching interval is 2 blocks: Block 1 - Address A receives reward of 10 oxen - added to batch Block 2 - Address A receives reward of 10 oxen - added to batch Block 3 - Address A is paid out 20 oxen. Batching accumulates a small reward for all nodes every block The batching of service node rewards allows us to drip feed rewards to service nodes. Rather than accruing each service node 16.5 oxen every time they are pulse block leader we now reward every node the 16.5 / num_service_nodes every block and pay each wallet the full amount that has been accrued after a period of time (Likely 3.5 days). To spread each payment evenly we now pay the rewards based on the address of the recipient. This modulus of their address determines which block the address should be paid and by setting the interval to our service_node_batching interval we can guarantee they will be paid out regularly and evenly distribute the payments for all wallets over this
e28a88a
to
90fedba
Compare
90fedba
to
8bafaea
Compare
No description provided.