[WIP] Aggsig Transactions (#530)
* First steps converting transaction workflow to be aggsig-enable * integrating updated version of aggsig, which gives greater control over the contents of e * added wallet transaction test to testing framework to enable testing the whole thing, completed interaction as far as inital response from recipient * more aggsig work, final signature is produced now * Construction of aggsig transaction now working to the point of the signature being built * aggsig transactions working end-to-end in the nominal case * refactor aggsig verify from commit and fix some tests * more cleanup and test fixing * cleaning up automated tests * test+formatting fix
This commit is contained in:
+11
-2
@@ -25,7 +25,7 @@
|
||||
extern crate slog;
|
||||
extern crate slog_async;
|
||||
extern crate slog_term;
|
||||
|
||||
extern crate byteorder;
|
||||
extern crate rand;
|
||||
|
||||
#[macro_use]
|
||||
@@ -48,12 +48,13 @@ pub mod secp_static;
|
||||
pub use secp_static::static_secp_instance;
|
||||
|
||||
pub mod types;
|
||||
pub use types::LoggingConfig;
|
||||
pub use types::{LoggingConfig, LogLevel};
|
||||
|
||||
// other utils
|
||||
use std::cell::{Ref, RefCell};
|
||||
#[allow(unused_imports)]
|
||||
use std::ops::Deref;
|
||||
use byteorder::{BigEndian, ByteOrder};
|
||||
|
||||
mod hex;
|
||||
pub use hex::*;
|
||||
@@ -98,3 +99,11 @@ impl<T> OneTime<T> {
|
||||
Ref::map(self.inner.borrow(), |o| o.as_ref().unwrap())
|
||||
}
|
||||
}
|
||||
|
||||
/// Construct msg bytes from tx fee and lock_height
|
||||
pub fn kernel_sig_msg(fee: u64, lock_height: u64) -> [u8; 32] {
|
||||
let mut bytes = [0; 32];
|
||||
BigEndian::write_u64(&mut bytes[16..24], fee);
|
||||
BigEndian::write_u64(&mut bytes[24..], lock_height);
|
||||
bytes
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user