Merge pull request #129 from antiochp/kernel_features_compat

rework kernel features support
This commit is contained in:
Antioch Peverell 2019-08-20 01:22:45 +01:00 committed by GitHub
commit 3efe36eb7d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 171 additions and 157 deletions

74
Cargo.lock generated
View file

@ -581,17 +581,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
name = "grin_api" name = "grin_api"
version = "2.0.1-beta.1" version = "2.0.1-beta.1"
source = "git+https://github.com/mimblewimble/grin#705fcbb1a62a1cfddb1e8b4fc9c30bab4a388818"
dependencies = [ dependencies = [
"failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)",
"grin_chain 2.0.1-beta.1 (git+https://github.com/mimblewimble/grin)", "grin_chain 2.0.1-beta.1",
"grin_core 2.0.1-beta.1 (git+https://github.com/mimblewimble/grin)", "grin_core 2.0.1-beta.1",
"grin_p2p 2.0.1-beta.1 (git+https://github.com/mimblewimble/grin)", "grin_p2p 2.0.1-beta.1",
"grin_pool 2.0.1-beta.1 (git+https://github.com/mimblewimble/grin)", "grin_pool 2.0.1-beta.1",
"grin_store 2.0.1-beta.1 (git+https://github.com/mimblewimble/grin)", "grin_store 2.0.1-beta.1",
"grin_util 2.0.1-beta.1 (git+https://github.com/mimblewimble/grin)", "grin_util 2.0.1-beta.1",
"http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", "http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.12.19 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.12.19 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper-rustls 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper-rustls 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -613,7 +612,6 @@ dependencies = [
[[package]] [[package]]
name = "grin_chain" name = "grin_chain"
version = "2.0.1-beta.1" version = "2.0.1-beta.1"
source = "git+https://github.com/mimblewimble/grin#705fcbb1a62a1cfddb1e8b4fc9c30bab4a388818"
dependencies = [ dependencies = [
"bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
@ -621,10 +619,10 @@ dependencies = [
"croaring 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "croaring 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"grin_core 2.0.1-beta.1 (git+https://github.com/mimblewimble/grin)", "grin_core 2.0.1-beta.1",
"grin_keychain 2.0.1-beta.1 (git+https://github.com/mimblewimble/grin)", "grin_keychain 2.0.1-beta.1",
"grin_store 2.0.1-beta.1 (git+https://github.com/mimblewimble/grin)", "grin_store 2.0.1-beta.1",
"grin_util 2.0.1-beta.1 (git+https://github.com/mimblewimble/grin)", "grin_util 2.0.1-beta.1",
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
"lru-cache 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "lru-cache 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
@ -636,7 +634,6 @@ dependencies = [
[[package]] [[package]]
name = "grin_core" name = "grin_core"
version = "2.0.1-beta.1" version = "2.0.1-beta.1"
source = "git+https://github.com/mimblewimble/grin#705fcbb1a62a1cfddb1e8b4fc9c30bab4a388818"
dependencies = [ dependencies = [
"blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", "blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
@ -645,8 +642,8 @@ dependencies = [
"enum_primitive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "enum_primitive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"grin_keychain 2.0.1-beta.1 (git+https://github.com/mimblewimble/grin)", "grin_keychain 2.0.1-beta.1",
"grin_util 2.0.1-beta.1 (git+https://github.com/mimblewimble/grin)", "grin_util 2.0.1-beta.1",
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
"lru-cache 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "lru-cache 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
@ -663,12 +660,11 @@ dependencies = [
[[package]] [[package]]
name = "grin_keychain" name = "grin_keychain"
version = "2.0.1-beta.1" version = "2.0.1-beta.1"
source = "git+https://github.com/mimblewimble/grin#705fcbb1a62a1cfddb1e8b4fc9c30bab4a388818"
dependencies = [ dependencies = [
"blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", "blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
"digest 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", "digest 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)",
"grin_util 2.0.1-beta.1 (git+https://github.com/mimblewimble/grin)", "grin_util 2.0.1-beta.1",
"hmac 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", "hmac 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
@ -686,16 +682,15 @@ dependencies = [
[[package]] [[package]]
name = "grin_p2p" name = "grin_p2p"
version = "2.0.1-beta.1" version = "2.0.1-beta.1"
source = "git+https://github.com/mimblewimble/grin#705fcbb1a62a1cfddb1e8b4fc9c30bab4a388818"
dependencies = [ dependencies = [
"bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)",
"chrono 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)",
"enum_primitive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "enum_primitive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"grin_chain 2.0.1-beta.1 (git+https://github.com/mimblewimble/grin)", "grin_chain 2.0.1-beta.1",
"grin_core 2.0.1-beta.1 (git+https://github.com/mimblewimble/grin)", "grin_core 2.0.1-beta.1",
"grin_store 2.0.1-beta.1 (git+https://github.com/mimblewimble/grin)", "grin_store 2.0.1-beta.1",
"grin_util 2.0.1-beta.1 (git+https://github.com/mimblewimble/grin)", "grin_util 2.0.1-beta.1",
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
"net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
"num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
@ -708,16 +703,15 @@ dependencies = [
[[package]] [[package]]
name = "grin_pool" name = "grin_pool"
version = "2.0.1-beta.1" version = "2.0.1-beta.1"
source = "git+https://github.com/mimblewimble/grin#705fcbb1a62a1cfddb1e8b4fc9c30bab4a388818"
dependencies = [ dependencies = [
"blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", "blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)",
"chrono 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)",
"failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"grin_core 2.0.1-beta.1 (git+https://github.com/mimblewimble/grin)", "grin_core 2.0.1-beta.1",
"grin_keychain 2.0.1-beta.1 (git+https://github.com/mimblewimble/grin)", "grin_keychain 2.0.1-beta.1",
"grin_store 2.0.1-beta.1 (git+https://github.com/mimblewimble/grin)", "grin_store 2.0.1-beta.1",
"grin_util 2.0.1-beta.1 (git+https://github.com/mimblewimble/grin)", "grin_util 2.0.1-beta.1",
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.98 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.98 (registry+https://github.com/rust-lang/crates.io-index)",
@ -742,15 +736,14 @@ dependencies = [
[[package]] [[package]]
name = "grin_store" name = "grin_store"
version = "2.0.1-beta.1" version = "2.0.1-beta.1"
source = "git+https://github.com/mimblewimble/grin#705fcbb1a62a1cfddb1e8b4fc9c30bab4a388818"
dependencies = [ dependencies = [
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
"croaring 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "croaring 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)",
"failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"grin_core 2.0.1-beta.1 (git+https://github.com/mimblewimble/grin)", "grin_core 2.0.1-beta.1",
"grin_util 2.0.1-beta.1 (git+https://github.com/mimblewimble/grin)", "grin_util 2.0.1-beta.1",
"libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)",
"lmdb-zero 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "lmdb-zero 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
@ -763,7 +756,6 @@ dependencies = [
[[package]] [[package]]
name = "grin_util" name = "grin_util"
version = "2.0.1-beta.1" version = "2.0.1-beta.1"
source = "git+https://github.com/mimblewimble/grin#705fcbb1a62a1cfddb1e8b4fc9c30bab4a388818"
dependencies = [ dependencies = [
"backtrace 0.3.34 (registry+https://github.com/rust-lang/crates.io-index)", "backtrace 0.3.34 (registry+https://github.com/rust-lang/crates.io-index)",
"base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)",
@ -926,12 +918,12 @@ name = "grin_wallet_util"
version = "2.1.0-beta.1" version = "2.1.0-beta.1"
dependencies = [ dependencies = [
"dirs 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", "dirs 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
"grin_api 2.0.1-beta.1 (git+https://github.com/mimblewimble/grin)", "grin_api 2.0.1-beta.1",
"grin_chain 2.0.1-beta.1 (git+https://github.com/mimblewimble/grin)", "grin_chain 2.0.1-beta.1",
"grin_core 2.0.1-beta.1 (git+https://github.com/mimblewimble/grin)", "grin_core 2.0.1-beta.1",
"grin_keychain 2.0.1-beta.1 (git+https://github.com/mimblewimble/grin)", "grin_keychain 2.0.1-beta.1",
"grin_store 2.0.1-beta.1 (git+https://github.com/mimblewimble/grin)", "grin_store 2.0.1-beta.1",
"grin_util 2.0.1-beta.1 (git+https://github.com/mimblewimble/grin)", "grin_util 2.0.1-beta.1",
"pretty_assertions 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "pretty_assertions 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.98 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.98 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2886,15 +2878,7 @@ dependencies = [
"checksum getrandom 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "cd8e190892c840661957ba9f32dacfb3eb405e657f9f9f60485605f0bb37d6f8" "checksum getrandom 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "cd8e190892c840661957ba9f32dacfb3eb405e657f9f9f60485605f0bb37d6f8"
"checksum git2 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8cb400360e8a4d61b10e648285bbfa919bbf9519d0d5d5720354456f44349226" "checksum git2 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8cb400360e8a4d61b10e648285bbfa919bbf9519d0d5d5720354456f44349226"
"checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" "checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb"
"checksum grin_api 2.0.1-beta.1 (git+https://github.com/mimblewimble/grin)" = "<none>"
"checksum grin_chain 2.0.1-beta.1 (git+https://github.com/mimblewimble/grin)" = "<none>"
"checksum grin_core 2.0.1-beta.1 (git+https://github.com/mimblewimble/grin)" = "<none>"
"checksum grin_keychain 2.0.1-beta.1 (git+https://github.com/mimblewimble/grin)" = "<none>"
"checksum grin_p2p 2.0.1-beta.1 (git+https://github.com/mimblewimble/grin)" = "<none>"
"checksum grin_pool 2.0.1-beta.1 (git+https://github.com/mimblewimble/grin)" = "<none>"
"checksum grin_secp256k1zkp 0.7.7 (registry+https://github.com/rust-lang/crates.io-index)" = "23027a7673df2c2b20fb9589d742ff400a10a9c3e4c769a77e9fa3bd19586822" "checksum grin_secp256k1zkp 0.7.7 (registry+https://github.com/rust-lang/crates.io-index)" = "23027a7673df2c2b20fb9589d742ff400a10a9c3e4c769a77e9fa3bd19586822"
"checksum grin_store 2.0.1-beta.1 (git+https://github.com/mimblewimble/grin)" = "<none>"
"checksum grin_util 2.0.1-beta.1 (git+https://github.com/mimblewimble/grin)" = "<none>"
"checksum h2 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)" = "a5b34c246847f938a410a03c5458c7fee2274436675e76d8b903c08efc29c462" "checksum h2 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)" = "a5b34c246847f938a410a03c5458c7fee2274436675e76d8b903c08efc29c462"
"checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" "checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205"
"checksum hmac 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "733e1b3ac906631ca01ebb577e9bb0f5e37a454032b9036b5eaea4013ed6f99a" "checksum hmac 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "733e1b3ac906631ca01ebb577e9bb0f5e37a454032b9036b5eaea4013ed6f99a"

View file

@ -94,9 +94,7 @@ pub trait ForeignRpc {
"kernel": { "kernel": {
"excess": "08dfe86d732f2dd24bac36aa7502685221369514197c26d33fac03041d47e4b490", "excess": "08dfe86d732f2dd24bac36aa7502685221369514197c26d33fac03041d47e4b490",
"excess_sig": "8f07ddd5e9f5179cff19486034181ed76505baaad53e5d994064127b56c5841be02fa098c54c9bf638e0ee1ad5eb896caa11565f632be7b9cd65643ba371044f", "excess_sig": "8f07ddd5e9f5179cff19486034181ed76505baaad53e5d994064127b56c5841be02fa098c54c9bf638e0ee1ad5eb896caa11565f632be7b9cd65643ba371044f",
"features": "Coinbase", "features": "Coinbase"
"fee": "0",
"lock_height": "0"
}, },
"key_id": "0300000000000000000000000400000000", "key_id": "0300000000000000000000000400000000",
"output": { "output": {
@ -192,7 +190,7 @@ pub trait ForeignRpc {
# ,false, 1 ,false, false); # ,false, 1 ,false, false);
``` ```
*/ */
fn verify_slate_messages(&self, slate: &Slate) -> Result<(), ErrorKind>; fn verify_slate_messages(&self, slate: VersionedSlate) -> Result<(), ErrorKind>;
/** /**
Networked version of [Foreign::receive_tx](struct.Foreign.html#method.receive_tx). Networked version of [Foreign::receive_tx](struct.Foreign.html#method.receive_tx).
@ -513,7 +511,7 @@ pub trait ForeignRpc {
# ,false, 5, false, true); # ,false, 5, false, true);
``` ```
*/ */
fn finalize_invoice_tx(&self, slate: &Slate) -> Result<Slate, ErrorKind>; fn finalize_invoice_tx(&self, slate: VersionedSlate) -> Result<VersionedSlate, ErrorKind>;
} }
impl<'a, L, C, K> ForeignRpc for Foreign<'a, L, C, K> impl<'a, L, C, K> ForeignRpc for Foreign<'a, L, C, K>
@ -530,31 +528,32 @@ where
Foreign::build_coinbase(self, block_fees).map_err(|e| e.kind()) Foreign::build_coinbase(self, block_fees).map_err(|e| e.kind())
} }
fn verify_slate_messages(&self, slate: &Slate) -> Result<(), ErrorKind> { fn verify_slate_messages(&self, slate: VersionedSlate) -> Result<(), ErrorKind> {
Foreign::verify_slate_messages(self, slate).map_err(|e| e.kind()) Foreign::verify_slate_messages(self, &Slate::from(slate)).map_err(|e| e.kind())
} }
fn receive_tx( fn receive_tx(
&self, &self,
slate: VersionedSlate, in_slate: VersionedSlate,
dest_acct_name: Option<String>, dest_acct_name: Option<String>,
message: Option<String>, message: Option<String>,
) -> Result<VersionedSlate, ErrorKind> { ) -> Result<VersionedSlate, ErrorKind> {
let version = slate.version(); let version = in_slate.version();
let slate: Slate = slate.into(); let out_slate = Foreign::receive_tx(
let slate = Foreign::receive_tx(
self, self,
&slate, &Slate::from(in_slate),
dest_acct_name.as_ref().map(String::as_str), dest_acct_name.as_ref().map(String::as_str),
message, message,
) )
.map_err(|e| e.kind())?; .map_err(|e| e.kind())?;
Ok(VersionedSlate::into_version(out_slate, version))
Ok(VersionedSlate::into_version(slate, version))
} }
fn finalize_invoice_tx(&self, slate: &Slate) -> Result<Slate, ErrorKind> { fn finalize_invoice_tx(&self, in_slate: VersionedSlate) -> Result<VersionedSlate, ErrorKind> {
Foreign::finalize_invoice_tx(self, slate).map_err(|e| e.kind()) let version = in_slate.version();
let out_slate =
Foreign::finalize_invoice_tx(self, &Slate::from(in_slate)).map_err(|e| e.kind())?;
Ok(VersionedSlate::into_version(out_slate, version))
} }
} }

View file

@ -17,6 +17,7 @@ use uuid::Uuid;
use crate::core::core::Transaction; use crate::core::core::Transaction;
use crate::keychain::{Identifier, Keychain}; use crate::keychain::{Identifier, Keychain};
use crate::libwallet::slate_versions::v2::TransactionV2;
use crate::libwallet::{ use crate::libwallet::{
AcctPathMapping, ErrorKind, InitTxArgs, IssueInvoiceTxArgs, NodeClient, NodeHeightResult, AcctPathMapping, ErrorKind, InitTxArgs, IssueInvoiceTxArgs, NodeClient, NodeHeightResult,
OutputCommitMapping, Slate, SlateVersion, TxLogEntry, VersionedSlate, WalletInfo, OutputCommitMapping, Slate, SlateVersion, TxLogEntry, VersionedSlate, WalletInfo,
@ -949,7 +950,7 @@ pub trait OwnerRpc: Sync + Send {
``` ```
*/ */
fn post_tx(&self, tx: &Transaction, fluff: bool) -> Result<(), ErrorKind>; fn post_tx(&self, tx: TransactionV2, fluff: bool) -> Result<(), ErrorKind>;
/** /**
Networked version of [Owner::cancel_tx](struct.Owner.html#method.cancel_tx). Networked version of [Owner::cancel_tx](struct.Owner.html#method.cancel_tx).
@ -1073,7 +1074,7 @@ pub trait OwnerRpc: Sync + Send {
# , false, 5, true, true, false); # , false, 5, true, true, false);
``` ```
*/ */
fn get_stored_tx(&self, tx: &TxLogEntry) -> Result<Option<Transaction>, ErrorKind>; fn get_stored_tx(&self, tx: &TxLogEntry) -> Result<Option<TransactionV2>, ErrorKind>;
/** /**
Networked version of [Owner::verify_slate_messages](struct.Owner.html#method.verify_slate_messages). Networked version of [Owner::verify_slate_messages](struct.Owner.html#method.verify_slate_messages).
@ -1304,19 +1305,18 @@ where
fn process_invoice_tx( fn process_invoice_tx(
&self, &self,
slate: VersionedSlate, in_slate: VersionedSlate,
args: InitTxArgs, args: InitTxArgs,
) -> Result<VersionedSlate, ErrorKind> { ) -> Result<VersionedSlate, ErrorKind> {
let in_slate = Slate::from(slate); let out_slate = Owner::process_invoice_tx(self, None, &Slate::from(in_slate), args)
let out_slate = .map_err(|e| e.kind())?;
Owner::process_invoice_tx(self, None, &in_slate, args).map_err(|e| e.kind())?;
let version = SlateVersion::V2; let version = SlateVersion::V2;
Ok(VersionedSlate::into_version(out_slate, version)) Ok(VersionedSlate::into_version(out_slate, version))
} }
fn finalize_tx(&self, slate: VersionedSlate) -> Result<VersionedSlate, ErrorKind> { fn finalize_tx(&self, in_slate: VersionedSlate) -> Result<VersionedSlate, ErrorKind> {
let in_slate = Slate::from(slate); let out_slate =
let out_slate = Owner::finalize_tx(self, None, &in_slate).map_err(|e| e.kind())?; Owner::finalize_tx(self, None, &Slate::from(in_slate)).map_err(|e| e.kind())?;
let version = SlateVersion::V2; let version = SlateVersion::V2;
Ok(VersionedSlate::into_version(out_slate, version)) Ok(VersionedSlate::into_version(out_slate, version))
} }
@ -1326,25 +1326,26 @@ where
slate: VersionedSlate, slate: VersionedSlate,
participant_id: usize, participant_id: usize,
) -> Result<(), ErrorKind> { ) -> Result<(), ErrorKind> {
let in_slate = Slate::from(slate); Owner::tx_lock_outputs(self, None, &Slate::from(slate), participant_id)
Owner::tx_lock_outputs(self, None, &in_slate, participant_id).map_err(|e| e.kind()) .map_err(|e| e.kind())
} }
fn cancel_tx(&self, tx_id: Option<u32>, tx_slate_id: Option<Uuid>) -> Result<(), ErrorKind> { fn cancel_tx(&self, tx_id: Option<u32>, tx_slate_id: Option<Uuid>) -> Result<(), ErrorKind> {
Owner::cancel_tx(self, None, tx_id, tx_slate_id).map_err(|e| e.kind()) Owner::cancel_tx(self, None, tx_id, tx_slate_id).map_err(|e| e.kind())
} }
fn get_stored_tx(&self, tx: &TxLogEntry) -> Result<Option<Transaction>, ErrorKind> { fn get_stored_tx(&self, tx: &TxLogEntry) -> Result<Option<TransactionV2>, ErrorKind> {
Owner::get_stored_tx(self, None, tx).map_err(|e| e.kind()) Owner::get_stored_tx(self, None, tx)
.map(|x| x.map(|y| TransactionV2::from(y)))
.map_err(|e| e.kind())
} }
fn post_tx(&self, tx: &Transaction, fluff: bool) -> Result<(), ErrorKind> { fn post_tx(&self, tx: TransactionV2, fluff: bool) -> Result<(), ErrorKind> {
Owner::post_tx(self, None, tx, fluff).map_err(|e| e.kind()) Owner::post_tx(self, None, &Transaction::from(tx), fluff).map_err(|e| e.kind())
} }
fn verify_slate_messages(&self, slate: VersionedSlate) -> Result<(), ErrorKind> { fn verify_slate_messages(&self, slate: VersionedSlate) -> Result<(), ErrorKind> {
let in_slate = Slate::from(slate); Owner::verify_slate_messages(self, None, &Slate::from(slate)).map_err(|e| e.kind())
Owner::verify_slate_messages(self, None, &in_slate).map_err(|e| e.kind())
} }
fn restore(&self) -> Result<(), ErrorKind> { fn restore(&self) -> Result<(), ErrorKind> {

View file

@ -17,6 +17,7 @@ use uuid::Uuid;
use crate::core::core::Transaction; use crate::core::core::Transaction;
use crate::keychain::{Identifier, Keychain}; use crate::keychain::{Identifier, Keychain};
use crate::libwallet::slate_versions::v2::TransactionV2;
use crate::libwallet::{ use crate::libwallet::{
AcctPathMapping, ErrorKind, InitTxArgs, IssueInvoiceTxArgs, NodeClient, NodeHeightResult, AcctPathMapping, ErrorKind, InitTxArgs, IssueInvoiceTxArgs, NodeClient, NodeHeightResult,
OutputCommitMapping, Slate, SlateVersion, TxLogEntry, VersionedSlate, WalletInfo, OutputCommitMapping, Slate, SlateVersion, TxLogEntry, VersionedSlate, WalletInfo,
@ -987,7 +988,7 @@ pub trait OwnerRpcS {
``` ```
*/ */
fn post_tx(&self, token: Token, tx: &Transaction, fluff: bool) -> Result<(), ErrorKind>; fn post_tx(&self, token: Token, tx: TransactionV2, fluff: bool) -> Result<(), ErrorKind>;
/** /**
Networked version of [Owner::cancel_tx](struct.Owner.html#method.cancel_tx). Networked version of [Owner::cancel_tx](struct.Owner.html#method.cancel_tx).
@ -1125,7 +1126,7 @@ pub trait OwnerRpcS {
&self, &self,
token: Token, token: Token,
tx: &TxLogEntry, tx: &TxLogEntry,
) -> Result<Option<Transaction>, ErrorKind>; ) -> Result<Option<TransactionV2>, ErrorKind>;
/** /**
Networked version of [Owner::verify_slate_messages](struct.Owner.html#method.verify_slate_messages). Networked version of [Owner::verify_slate_messages](struct.Owner.html#method.verify_slate_messages).
@ -1402,12 +1403,15 @@ where
fn process_invoice_tx( fn process_invoice_tx(
&self, &self,
token: Token, token: Token,
slate: VersionedSlate, in_slate: VersionedSlate,
args: InitTxArgs, args: InitTxArgs,
) -> Result<VersionedSlate, ErrorKind> { ) -> Result<VersionedSlate, ErrorKind> {
let in_slate = Slate::from(slate); let out_slate = Owner::process_invoice_tx(
let out_slate = self,
Owner::process_invoice_tx(self, (&token.keychain_mask).as_ref(), &in_slate, args) (&token.keychain_mask).as_ref(),
&Slate::from(in_slate),
args,
)
.map_err(|e| e.kind())?; .map_err(|e| e.kind())?;
let version = SlateVersion::V2; let version = SlateVersion::V2;
Ok(VersionedSlate::into_version(out_slate, version)) Ok(VersionedSlate::into_version(out_slate, version))
@ -1416,10 +1420,13 @@ where
fn finalize_tx( fn finalize_tx(
&self, &self,
token: Token, token: Token,
slate: VersionedSlate, in_slate: VersionedSlate,
) -> Result<VersionedSlate, ErrorKind> { ) -> Result<VersionedSlate, ErrorKind> {
let in_slate = Slate::from(slate); let out_slate = Owner::finalize_tx(
let out_slate = Owner::finalize_tx(self, (&token.keychain_mask).as_ref(), &in_slate) self,
(&token.keychain_mask).as_ref(),
&Slate::from(in_slate),
)
.map_err(|e| e.kind())?; .map_err(|e| e.kind())?;
let version = SlateVersion::V2; let version = SlateVersion::V2;
Ok(VersionedSlate::into_version(out_slate, version)) Ok(VersionedSlate::into_version(out_slate, version))
@ -1428,14 +1435,13 @@ where
fn tx_lock_outputs( fn tx_lock_outputs(
&self, &self,
token: Token, token: Token,
slate: VersionedSlate, in_slate: VersionedSlate,
participant_id: usize, participant_id: usize,
) -> Result<(), ErrorKind> { ) -> Result<(), ErrorKind> {
let in_slate = Slate::from(slate);
Owner::tx_lock_outputs( Owner::tx_lock_outputs(
self, self,
(&token.keychain_mask).as_ref(), (&token.keychain_mask).as_ref(),
&in_slate, &Slate::from(in_slate),
participant_id, participant_id,
) )
.map_err(|e| e.kind()) .map_err(|e| e.kind())
@ -1455,17 +1461,24 @@ where
&self, &self,
token: Token, token: Token,
tx: &TxLogEntry, tx: &TxLogEntry,
) -> Result<Option<Transaction>, ErrorKind> { ) -> Result<Option<TransactionV2>, ErrorKind> {
Owner::get_stored_tx(self, (&token.keychain_mask).as_ref(), tx).map_err(|e| e.kind()) Owner::get_stored_tx(self, (&token.keychain_mask).as_ref(), tx)
.map(|x| x.map(|y| TransactionV2::from(y)))
.map_err(|e| e.kind())
} }
fn post_tx(&self, token: Token, tx: &Transaction, fluff: bool) -> Result<(), ErrorKind> { fn post_tx(&self, token: Token, tx: TransactionV2, fluff: bool) -> Result<(), ErrorKind> {
Owner::post_tx(self, (&token.keychain_mask).as_ref(), tx, fluff).map_err(|e| e.kind()) Owner::post_tx(
self,
(&token.keychain_mask).as_ref(),
&Transaction::from(tx),
fluff,
)
.map_err(|e| e.kind())
} }
fn verify_slate_messages(&self, token: Token, slate: VersionedSlate) -> Result<(), ErrorKind> { fn verify_slate_messages(&self, token: Token, slate: VersionedSlate) -> Result<(), ErrorKind> {
let in_slate = Slate::from(slate); Owner::verify_slate_messages(self, (&token.keychain_mask).as_ref(), &Slate::from(slate))
Owner::verify_slate_messages(self, (&token.keychain_mask).as_ref(), &in_slate)
.map_err(|e| e.kind()) .map_err(|e| e.kind())
} }

View file

@ -137,13 +137,16 @@ fn accounts_test_impl(test_dir: &'static str) -> Result<(), libwallet::Error> {
assert_eq!(txs.len(), 5); assert_eq!(txs.len(), 5);
Ok(()) Ok(())
})?; })?;
// now check second account // now check second account
{ {
let mut w_lock = wallet1.lock(); // let mut w_lock = wallet1.lock();
let lc = w_lock.lc_provider()?; // let lc = w_lock.lc_provider()?;
let w = lc.wallet_inst()?; // let w = lc.wallet_inst()?;
wallet_inst!(wallet1, w);
w.set_parent_key_id_by_name("account1")?; w.set_parent_key_id_by_name("account1")?;
} }
wallet::controller::owner_single_use(wallet1.clone(), mask1, |api, m| { wallet::controller::owner_single_use(wallet1.clone(), mask1, |api, m| {
// check last confirmed height on this account is different from above (should be 0) // check last confirmed height on this account is different from above (should be 0)
let (_, wallet1_info) = api.retrieve_summary_info(m, false, 1)?; let (_, wallet1_info) = api.retrieve_summary_info(m, false, 1)?;
@ -183,7 +186,6 @@ fn accounts_test_impl(test_dir: &'static str) -> Result<(), libwallet::Error> {
wallet_inst!(wallet1, w); wallet_inst!(wallet1, w);
w.set_parent_key_id_by_name("account1")?; w.set_parent_key_id_by_name("account1")?;
} }
wallet::controller::owner_single_use(wallet1.clone(), mask1, |api, m| { wallet::controller::owner_single_use(wallet1.clone(), mask1, |api, m| {
let args = InitTxArgs { let args = InitTxArgs {
src_acct_name: None, src_acct_name: None,

View file

@ -119,13 +119,9 @@ fn basic_transaction_api(test_dir: &'static str) -> Result<(), libwallet::Error>
// Check we have a single kernel and that it is a Plain kernel (no lock_height). // Check we have a single kernel and that it is a Plain kernel (no lock_height).
assert_eq!(slate.tx.kernels().len(), 1); assert_eq!(slate.tx.kernels().len(), 1);
assert_eq!(
slate.tx.kernels().first().map(|k| k.lock_height).unwrap(),
0
);
assert_eq!( assert_eq!(
slate.tx.kernels().first().map(|k| k.features).unwrap(), slate.tx.kernels().first().map(|k| k.features).unwrap(),
transaction::KernelFeatures::Plain transaction::KernelFeatures::Plain { fee: 2000000 }
); );
Ok(()) Ok(())

View file

@ -26,6 +26,7 @@ use crate::core::{pow, ser};
use crate::keychain::Keychain; use crate::keychain::Keychain;
use crate::libwallet; use crate::libwallet;
use crate::libwallet::api_impl::foreign; use crate::libwallet::api_impl::foreign;
use crate::libwallet::slate_versions::v2::SlateV2;
use crate::libwallet::{ use crate::libwallet::{
NodeClient, NodeVersionInfo, Slate, TxWrapper, WalletInst, WalletLCProvider, NodeClient, NodeVersionInfo, Slate, TxWrapper, WalletInst, WalletLCProvider,
}; };
@ -214,23 +215,30 @@ where
Some(w) => w, Some(w) => w,
}; };
let mut slate = serde_json::from_str(&m.body).context( let slate: SlateV2 = serde_json::from_str(&m.body).context(
libwallet::ErrorKind::ClientCallback("Error parsing TxWrapper".to_owned()), libwallet::ErrorKind::ClientCallback("Error parsing TxWrapper".to_owned()),
)?; )?;
;
{ let slate: Slate = {
let mut w_lock = wallet.1.lock(); let mut w_lock = wallet.1.lock();
let w = w_lock.lc_provider()?.wallet_inst()?; let w = w_lock.lc_provider()?.wallet_inst()?;
let mask = wallet.2.clone(); let mask = wallet.2.clone();
// receive tx // receive tx
slate = foreign::receive_tx(&mut **w, (&mask).as_ref(), &slate, None, None, false)?; foreign::receive_tx(
} &mut **w,
(&mask).as_ref(),
&Slate::from(slate),
None,
None,
false,
)?
};
Ok(WalletProxyMessage { Ok(WalletProxyMessage {
sender_id: m.dest, sender_id: m.dest,
dest: m.sender_id, dest: m.sender_id,
method: m.method, method: m.method,
body: serde_json::to_string(&slate).unwrap(), body: serde_json::to_string(&SlateV2::from(slate)).unwrap(),
}) })
} }
@ -332,7 +340,7 @@ impl LocalWalletClient {
sender_id: self.id.clone(), sender_id: self.id.clone(),
dest: dest.to_owned(), dest: dest.to_owned(),
method: "send_tx_slate".to_owned(), method: "send_tx_slate".to_owned(),
body: serde_json::to_string(slate).unwrap(), body: serde_json::to_string(&SlateV2::from(slate)).unwrap(),
}; };
{ {
let p = self.proxy_tx.lock(); let p = self.proxy_tx.lock();
@ -343,11 +351,10 @@ impl LocalWalletClient {
let r = self.rx.lock(); let r = self.rx.lock();
let m = r.recv().unwrap(); let m = r.recv().unwrap();
trace!("Received send_tx_slate response: {:?}", m.clone()); trace!("Received send_tx_slate response: {:?}", m.clone());
Ok( let slate: SlateV2 = serde_json::from_str(&m.body).context(
serde_json::from_str(&m.body).context(libwallet::ErrorKind::ClientCallback( libwallet::ErrorKind::ClientCallback("Parsing send_tx_slate response".to_owned()),
"Parsing send_tx_slate response".to_owned(), )?;
))?, Ok(Slate::from(slate))
)
} }
} }

View file

@ -286,9 +286,10 @@ where
let (mut parts, change_amounts_derivations) = let (mut parts, change_amounts_derivations) =
inputs_and_change(&coins, wallet, keychain_mask, amount, fee, change_outputs)?; inputs_and_change(&coins, wallet, keychain_mask, amount, fee, change_outputs)?;
// This is more proof of concept than anything but here we set lock_height // Build a "Plain" kernel unless lock_height>0 explicitly specified.
// on tx being sent (based on current chain height via api). if lock_height > 0 {
parts.push(build::with_lock_height(lock_height)); parts.push(build::with_lock_height(lock_height));
}
Ok((parts, coins, change_amounts_derivations, fee)) Ok((parts, coins, change_amounts_derivations, fee))
} }

View file

@ -20,8 +20,7 @@ use crate::error::{Error, ErrorKind};
use crate::grin_core::core::amount_to_hr_string; use crate::grin_core::core::amount_to_hr_string;
use crate::grin_core::core::committed::Committed; use crate::grin_core::core::committed::Committed;
use crate::grin_core::core::transaction::{ use crate::grin_core::core::transaction::{
kernel_features, kernel_sig_msg, Input, Output, Transaction, TransactionBody, TxKernel, Input, KernelFeatures, Output, Transaction, TransactionBody, TxKernel, Weighting,
Weighting,
}; };
use crate::grin_core::core::verifier_cache::LruVerifierCache; use crate::grin_core::core::verifier_cache::LruVerifierCache;
use crate::grin_core::libtx::{aggsig, build, proof::ProofBuild, secp_ser, tx_fee}; use crate::grin_core::libtx::{aggsig, build, proof::ProofBuild, secp_ser, tx_fee};
@ -290,11 +289,16 @@ impl Slate {
} }
// This is the msg that we will sign as part of the tx kernel. // This is the msg that we will sign as part of the tx kernel.
// Currently includes the fee and the lock_height. // If lock_height is 0 then build a plain kernel, otherwise build a height locked kernel.
fn msg_to_sign(&self) -> Result<secp::Message, Error> { fn msg_to_sign(&self) -> Result<secp::Message, Error> {
// Currently we only support interactively creating a tx with a "default" kernel. let features = match self.lock_height {
let features = kernel_features(self.lock_height); 0 => KernelFeatures::Plain { fee: self.fee },
let msg = kernel_sig_msg(self.fee, self.lock_height, features)?; _ => KernelFeatures::HeightLocked {
fee: self.fee,
lock_height: self.lock_height,
},
};
let msg = features.kernel_sig_msg()?;
Ok(msg) Ok(msg)
} }
@ -881,19 +885,19 @@ impl From<&Output> for OutputV2 {
impl From<&TxKernel> for TxKernelV2 { impl From<&TxKernel> for TxKernelV2 {
fn from(kernel: &TxKernel) -> TxKernelV2 { fn from(kernel: &TxKernel) -> TxKernelV2 {
let TxKernel { let (features, fee, lock_height) = match kernel.features {
features, KernelFeatures::Plain { fee } => (CompatKernelFeatures::Plain, fee, 0),
fee, KernelFeatures::Coinbase => (CompatKernelFeatures::Coinbase, 0, 0),
lock_height, KernelFeatures::HeightLocked { fee, lock_height } => {
excess, (CompatKernelFeatures::HeightLocked, fee, lock_height)
excess_sig, }
} = *kernel; };
TxKernelV2 { TxKernelV2 {
features, features,
fee, fee,
lock_height, lock_height,
excess, excess: kernel.excess,
excess_sig, excess_sig: kernel.excess_sig,
} }
} }
} }
@ -1025,19 +1029,23 @@ impl From<&OutputV2> for Output {
impl From<&TxKernelV2> for TxKernel { impl From<&TxKernelV2> for TxKernel {
fn from(kernel: &TxKernelV2) -> TxKernel { fn from(kernel: &TxKernelV2) -> TxKernel {
let TxKernelV2 { let (fee, lock_height) = (kernel.fee, kernel.lock_height);
features, let features = match kernel.features {
fee, CompatKernelFeatures::Plain => KernelFeatures::Plain { fee },
lock_height, CompatKernelFeatures::Coinbase => KernelFeatures::Coinbase,
excess, CompatKernelFeatures::HeightLocked => KernelFeatures::HeightLocked { fee, lock_height },
excess_sig, };
} = *kernel;
TxKernel { TxKernel {
features, features,
fee, excess: kernel.excess,
lock_height, excess_sig: kernel.excess_sig,
excess,
excess_sig,
} }
} }
} }
#[derive(Clone, Copy, Debug, Serialize, Deserialize)]
pub enum CompatKernelFeatures {
Plain,
Coinbase,
HeightLocked,
}

View file

@ -35,13 +35,14 @@
//! orig_version: u16, //! orig_version: u16,
//! block_header_version: u16, //! block_header_version: u16,
use crate::grin_core::core::transaction::{KernelFeatures, OutputFeatures}; use crate::grin_core::core::transaction::OutputFeatures;
use crate::grin_core::libtx::secp_ser; use crate::grin_core::libtx::secp_ser;
use crate::grin_keychain::BlindingFactor; use crate::grin_keychain::BlindingFactor;
use crate::grin_util::secp; use crate::grin_util::secp;
use crate::grin_util::secp::key::PublicKey; use crate::grin_util::secp::key::PublicKey;
use crate::grin_util::secp::pedersen::{Commitment, RangeProof}; use crate::grin_util::secp::pedersen::{Commitment, RangeProof};
use crate::grin_util::secp::Signature; use crate::grin_util::secp::Signature;
use crate::slate::CompatKernelFeatures;
use uuid::Uuid; use uuid::Uuid;
#[derive(Serialize, Deserialize, Debug, Clone)] #[derive(Serialize, Deserialize, Debug, Clone)]
@ -162,7 +163,7 @@ pub struct OutputV2 {
#[derive(Serialize, Deserialize, Debug, Clone)] #[derive(Serialize, Deserialize, Debug, Clone)]
pub struct TxKernelV2 { pub struct TxKernelV2 {
/// Options for a kernel's structure or use /// Options for a kernel's structure or use
pub features: KernelFeatures, pub features: CompatKernelFeatures,
/// Fee originally included in the transaction this proof is for. /// Fee originally included in the transaction this proof is for.
#[serde(with = "secp_ser::string_or_u64")] #[serde(with = "secp_ser::string_or_u64")]
pub fee: u64, pub fee: u64,

View file

@ -23,7 +23,9 @@ use grin_wallet_util::grin_util::secp::key::{PublicKey, SecretKey};
use rand::thread_rng; use rand::thread_rng;
fn kernel_sig_msg() -> secp::Message { fn kernel_sig_msg() -> secp::Message {
transaction::kernel_sig_msg(0, 0, transaction::KernelFeatures::Plain).unwrap() transaction::KernelFeatures::Plain { fee: 0 }
.kernel_sig_msg()
.unwrap()
} }
#[test] #[test]

View file

@ -25,12 +25,12 @@ dirs = "1.0.3"
# grin_store = "2.0.0" # grin_store = "2.0.0"
# For beta release # For beta release
# grin_core = { git = "https://github.com/mimblewimble/grin", tag = "2.0.0-beta.2" } # grin_core = { git = "https://github.com/mimblewimble/grin", tag = "2.0.1-beta.1" }
# grin_keychain = { git = "https://github.com/mimblewimble/grin", tag = "2.0.0-beta.2" } # grin_keychain = { git = "https://github.com/mimblewimble/grin", tag = "2.0.1-beta.1" }
# grin_chain = { git = "https://github.com/mimblewimble/grin", tag = "2.0.0-beta.2" } # grin_chain = { git = "https://github.com/mimblewimble/grin", tag = "2.0.1-beta.1" }
# grin_util = { git = "https://github.com/mimblewimble/grin", tag = "2.0.0-beta.2" } # grin_util = { git = "https://github.com/mimblewimble/grin", tag = "2.0.1-beta.1" }
# grin_api = { git = "https://github.com/mimblewimble/grin", tag = "2.0.0-beta.2" } # grin_api = { git = "https://github.com/mimblewimble/grin", tag = "2.0.1-beta.1" }
# grin_store = { git = "https://github.com/mimblewimble/grin", tag = "2.0.0-beta.2" } # grin_store = { git = "https://github.com/mimblewimble/grin", tag = "2.0.1-beta.1" }
# For bleeding edge # For bleeding edge
grin_core = { git = "https://github.com/mimblewimble/grin", branch = "master" } grin_core = { git = "https://github.com/mimblewimble/grin", branch = "master" }