-
Notifications
You must be signed in to change notification settings - Fork 219
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
feat!: add one-sided coinbase payments #5967
feat!: add one-sided coinbase payments #5967
Conversation
2bc4e36
to
ee5729d
Compare
Added one-sided and stealth coinbase transactions. Coinbases can now only be paid to a nominated wallet address directly.
318285d
to
12b1db3
Compare
12b1db3
to
6a56f69
Compare
Added exclamation for breaking change |
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.
System-level testing: Merge mining proxy should panic if the wallet payment address is not set; currently it is logging an error.
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.
We need more detail about imported coinbase transactions on the console wallet's transactions pane
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.
Many of the imported coinbase transactions in the nominated wallet have the incorrect status. We expect FauxUnconfirmed
-> FauxConfrimed
, but they end up as FauxUnconfirmed
-> Completed
. The Completed
transactions are then broadcast to the mempool, which is just a further symptom to the actual problem.
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.
looking good, a few comments
// The coinbase are technically Inbound. | ||
// To determine whether a transaction is coinbase | ||
// we will check whether the message contains `Coinbase`. | ||
is_coinbase: inbound.message.to_lowercase().contains("coinbase"), |
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.
and here
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.
We do not have coinbase transactions anymore; we just import one-sided coinbase UTXOs and make faux transactions
@@ -0,0 +1,69 @@ | |||
-- Any old 'outputs' will not be valid due to the removal of 'coinbase_block_height', |
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.
why remove this? we can still add this in?
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.
The coinbase_block_height
column was only used to manage coinbase transactions in the transaction service; this is not used anymore due to the removal of conbase transactions.
); | ||
|
||
-- Any old 'completed_transactions' will not be valid due to the removal of 'coinbase_block_height', | ||
-- so we drop and recreate the table. |
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.
why remove this?
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.
See above
Description --- Added normal one-sided and stealth one-sided coinbase transactions. Changes are: - Coinbases can now only be paid to a nominated wallet address directly. - The minotari miner and merge mining proxy will only start if a valid minotari wallet address has been supplied for the particular network. - The miner and merge mining proxy does not depend on the wallet anymore to construct the coinbase; it is done directly. - Corresponding gRPC method (`rpc GetCoinbase (GetCoinbaseRequest) returns (GetCoinbaseResponse)`) has been removed from the wallet. - A memory-based transactions key manager has been created for use by the miner and merge mining proxy as they do not need persistent storage of keys. This also ensures that new entropy for the generation of keys is created each time the miner or merge mining proxy is started effectively negating any collisions of private keys. - All unused code in the output manager and transaction manager have been removed. Motivation and Context --- See tari-project#5930 How Has This Been Tested? --- Unit tests Cucumber tests System-level tests - _Completed_ What process can a PR reviewer use to test or verify this change? --- - Code walk-through - Run cucumber `Scenario: Get Transaction Info` and review the log files for `WALLET_A` where the stealth one-sided coinbases will be imported and where payment is made to `WALLET_B`. <!-- Checklist --> <!-- 1. Is the title of your PR in the form that would make nice release notes? The title, excluding the conventional commit tag, will be included exactly as is in the CHANGELOG, so please think about it carefully. --> Breaking Changes --- - [ ] None - [ ] Requires data directory on base node to be deleted - [ ] Requires hard fork - [x] Other - Please specify <!-- Does this include a breaking change? If so, include this line as a footer --> - Coinbases can now only be paid to a nominated wallet address directly. - Existing wallets need to be recovered into new wallets.
Description
Added normal one-sided and stealth one-sided coinbase transactions. Changes are:
rpc GetCoinbase (GetCoinbaseRequest) returns (GetCoinbaseResponse)
) has been removed from the wallet.Motivation and Context
See #5930
How Has This Been Tested?
Unit tests
Cucumber tests
System-level tests - Completed
What process can a PR reviewer use to test or verify this change?
Scenario: Get Transaction Info
and review the log files forWALLET_A
where the stealth one-sided coinbases will be imported and where payment is made toWALLET_B
.Breaking Changes