-
Notifications
You must be signed in to change notification settings - Fork 137
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
TTL Implementation #261
TTL Implementation #261
Conversation
… to include proof, add sender address in init_send_tx
controller/src/controller.rs
Outdated
@@ -64,8 +64,8 @@ fn check_middleware( | |||
} | |||
if let Some(s) = slate { | |||
if s.version_info.version < CURRENT_SLATE_VERSION | |||
|| (bhv == 2 && s.version_info.block_header_version != 2) | |||
|| (bhv > 2 && s.version_info.block_header_version < GRIN_BLOCK_HEADER_VERSION) | |||
|| (bhv == 3 && s.version_info.block_header_version != 3) |
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.
Since txns from block header 2 are compatible with those from block header version 3, you can just remove line 67. We only needed that logic because of the bulletproof serialization changes.
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.
👍
* refactor address generation code into libwallet, bool to flag whether to include proof, add sender address in init_send_tx * rustfmt * require payment proof addr as part of init_tx * rustfmt * store payment proof on sender transaction side * rustfmt * change sig to ed25519 sig * rustfmt * add message creation and signature * rustfmt * add payment proof verification function * rustfmt * validate proof on sender side, store proof * rustfmt * fix json tests * fixes and updates to tests * added API functions for converting and retrieving proof addresses * rustfmt * add payment proof to init_send_tx example * rustfmt * incorrect comment * add commands for requesting payment proofs * rustfmt * wire up payment proofs into command line * rustfmt * add address command * rustfmt * added tor sending from owner api * rustfmt * add TTL to slate, transaction log * ttl cutoff tests * add ttl check to recieve functions, add tests, modify doctests * rustfmt * fixes from upstream changes and test fixes * rustfmt * remove unnecessary block header version check
* refactor address generation code into libwallet, bool to flag whether to include proof, add sender address in init_send_tx * rustfmt * require payment proof addr as part of init_tx * rustfmt * store payment proof on sender transaction side * rustfmt * change sig to ed25519 sig * rustfmt * add message creation and signature * rustfmt * add payment proof verification function * rustfmt * validate proof on sender side, store proof * rustfmt * fix json tests * fixes and updates to tests * added API functions for converting and retrieving proof addresses * rustfmt * add payment proof to init_send_tx example * rustfmt * incorrect comment * add commands for requesting payment proofs * rustfmt * wire up payment proofs into command line * rustfmt * add address command * rustfmt * added tor sending from owner api * rustfmt * add TTL to slate, transaction log * ttl cutoff tests * add ttl check to recieve functions, add tests, modify doctests * rustfmt * fixes from upstream changes and test fixes * rustfmt * remove unnecessary block header version check
This provides the implementation of TTL functionality within the wallet API. Note that this PR doesn't yet add the TTL to the command line client or add any default values (which likely need a bit of further discussion).
Changes Are:
recieve_tx
,finalize
etc now do a check for the TTL value before continuing processing. Note the wallet uses the stored last confirmed height for this value as opposed to calling out to the server to get the value (so as not to create a dependency on a node running in order to transact)InitTxParams
now has attl_blocks
field specifying the number of blocks from current to set slate's TTL.