forked from monero-project/monero
-
Notifications
You must be signed in to change notification settings - Fork 116
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
Merge dev to stable #1573
Merged
Merge dev to stable #1573
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
With batching, individual blocks can have a negative coinbase emission because the tx fee gets added to the batch rewards database and not paid out immediately, which then results in an negative overflow to a value close to 2^64. Thus a block with no payout and a tx fee will have an erroneous huge positive coinbase emission when queried via `get_coinbase_tx_sum`. For example block 1094068 queried with: {"jsonrpc":"2.0","id":"0","method":"get_coinbase_tx_sum","params":{"height": 1094068, "count": 1}} returns: { "jsonrpc": "2.0", "id": "0", "result": { "burn_amount": 0, "emission_amount": 18446744073699378616, "fee_amount": 10173000, "status": "OK" } } This commit fixes it by making the values signed (and also serves as an example of why unsigned integers are usually the wrong choice): { "jsonrpc": "2.0", "id": "0", "result": { "burn_amount": 0, "emission_amount": -10173000, "fee_amount": 10173000, "status": "OK" } }
nano s plus HID pid
Fix negative coinbase emissions
Pop blocks investigation
Fixes #1575 We were appending a newline for every locked stake rather than just this wallet's locked stakes.
The CLI wallets `print_locked_stakes` was buggy, overly verbose, and missing pertinent information. This overhauls it. Details are below; the quick differences: - show the staking requirement - make key image output optional with a +key_images flag on the command - fix various bugs such as just showing the first contribution as the "total" contribution - add the wallet address of extra contributions, rather than just the key image with no other info. - put your own contributions first, and mark them as such - show totals of other contributors - sort service nodes to put unlocking nodes first; among unlocking and non-unlocking nodes we sort by hex pubkey string. - sort locked dereg outputs by unlock height - considerable reformatting of how things are displayed --- Output now looks like this: First we have 1-2 lines of general info: Service Node: abcdef123456... Unlock Height: 1234567 (omitted if not unlocking) If there are other contributors then we print a total line such as: Total Contributions: 15000 OXEN of 15000 OXEN required For our own contribution, when we have a single contribution, we use one of: Your Contribution: 5000 OXEN (Key image: abcdef123...) Your Contribution: 5000 OXEN of 15000 OXEN required (Key image: abcdef123...) (the second one applies if we are the only contributor so far). If we made multiple contributions then: Your Contributions: 5000 OXEN in 2 contributions: Your Contributions: 5000 OXEN of 15000 OXEN required in 2 contributions: (the second one if we are the only contributor so far). This is followed by the individual contributions: ‣ 4000.5 OXEN (Key image: abcdef123...) ‣ 999.5 OXEN (Key image: 789cba456...) If there are other contributors then we also print: Other contributions: 10000 OXEN from 2 contributors: • 1234.565 OXEN (T6U7YGUcPJffbaF5p8NLC3VidwJyHSdMaGmSxTBV645v33CmLq2ZvMqBdY9AVB2z8uhbHPCZSuZbv68hE6NBXBc51Gg9MGUGr) Key image 123456789... • 8765.435 OXEN (T6Tpop5RZdwE39iBvoP5xpJVoMpYPUwQpef9zS2tLL8yVgbppBbtGnzZxzkSp53Coi88wbsTHiokr7k8MQU94mGF1zzERqELK) ‣ 7530 OXEN (Key image: 23456789a...) ‣ 1235.435 OXEN (Key image: 3456789ab...) If we aren't showing key images then all the key image details get omitted. --- Locked key images get overhauled too; it wasn't at all clear from the output *why* these are locked (i.e. these are locked contributions of failed SNs): Locked Stakes due to Service Node Deregistration: ‣ 234.567 OXEN (Unlock height 1234567; Key image: abcfed999...) ‣ 5000 OXEN (Unlock height 123333; Key image: cbcfef989...)
CLI wallet: improve print_locked_stakes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.