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

Enforce Tx unlock_time is Zero by Relay Rule [RELEASE] #9311

Open
wants to merge 1 commit into
base: release-v0.18
Choose a base branch
from

Conversation

jeffro256
Copy link
Contributor

Related to monero-project/research-lab#78

Added a relay rule that enforces the `unlock_time` field is equal to 0 for non-coinbase transactions.

UIs changed:
* Removed `locked_transfer` and `locked_sweep_all` commands from `monero-wallet-cli`

APIs changed:
* Removed `unlock_time` parameters from `wallet2` transfer methods
* Wallet RPC transfer endpoints send error codes when requested unlock time is not 0
* Removed `unlock_time` parameters from `construct_tx*` cryptonote core functions

@tobtoht: undo rebase changes tx.dsts -> tx_dsts
Copy link
Contributor

@rbrunner7 rbrunner7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went through all the code again, after the review of the master branch PR. Again, saw no problems.

Encouraged by @selsta , beyond that code review I actually tested daemon and CLI wallet running this PR on testnet.

I tested the following:

  • The daemon still accepts blocks with locked transactions in them, which is correct, as this PR does not yet change consensus rules
  • The daemon ignores locked transactions sent to it from another daemon i.e. does not let them enter its pool
  • The daemon rejects a locked transaction submitted by a wallet without this PR
  • The CLI wallet without this PR correctly displays an error message when trying to submit a locked transaction that gets rejected by the daemon
  • The CLI wallet with this PR does not know commands like locked_transfer anymore which makes it impossible to ask for locked transactions

Unfortunately the rejection message of a CLI wallet without this PR does not mention the reason for rejection because obviously it does not know it:

Error: transaction <75aa75f2adb89290b9d79590d2a511b3390c9ffc37aaff5dc59c18de60a36bf1> was rejected by daemon

I checked the responsible code wallet2::get_text_reason: Seems to me there is no way for a "new" daemon to give back error info in a way to make an "old" CLI wallet showing the reason. I don't think that this really matters however.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants