diff --git a/README.md b/README.md index ad5143c..c987533 100644 --- a/README.md +++ b/README.md @@ -164,10 +164,9 @@ Configuration file: '/home/user/.config/autct/default-config.toml' mode = "request" ... other config settings -We received this resource: soup-for-you +Request was accepted by the Autct verifier! The proof is valid and the (unknown) pubkey is unused. ``` - (Process currently verified working on Ubuntu 22.04, Debian 12 and Windows 10) # Testing diff --git a/docs/utxo-keysets.md b/docs/utxo-keysets.md index 4e258cc..5a929cb 100644 --- a/docs/utxo-keysets.md +++ b/docs/utxo-keysets.md @@ -29,10 +29,10 @@ https://github.com/AdamISZ/aut-ct-test-cases/blob/master/src/filter_utxos.py (See the notes on the repo; install with `pip install .` before running the script). -Example yntax: +Example syntax: ``` -python3 filter_utxos 500000 utxos16Mar.sqlite autct-830000-500000-0-2-1024.aks +python3 filter_utxos.py 500000 utxos16Mar.sqlite autct-830000-500000-0-2-1024.aks ``` ... noting that here, I'm using an example of the key filename syntax defined in Appendix 1 [here](./protocol-utxo.md). diff --git a/src/autct.rs b/src/autct.rs index 4e1a8ea..5b8f595 100644 --- a/src/autct.rs +++ b/src/autct.rs @@ -181,7 +181,8 @@ async fn run_request(autctcfg: AutctConfig) -> Result<(), Box> { // codes defined in lib.rs // TODO: create some callback structure to receive the resource match rest.accepted { - 1 => println!("We received this resource: {}", rest.resource_string.unwrap()), + // deliberately verbose message here to help testers understand: + 1 => println!("Request was accepted by the Autct verifier! The proof is valid and the (unknown) pubkey is unused."), -1 => println!("Request rejected, PedDLEQ proof does not match the tree."), -2 => println!("Request rejected, PedDLEQ proof is invalid."), -3 => println!("Request rejected, proofs are valid but key image is reused."), diff --git a/src/lib.rs b/src/lib.rs index dac5bdc..fe0cd6c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -50,6 +50,11 @@ pub mod rpc { pub context_label: String, pub application_label: String, pub accepted: i32, + // TODO possibly remove this; + // the resource string will be the + // responsibility of the caller, + // for now we just leave a default string + // that could be used somehow in future versions: pub resource_string: Option, pub key_image: Option, } @@ -196,8 +201,7 @@ pub mod rpc { println!("Verifying curve tree passed and it matched the key image. Here is the key image: {}", str_E); resp.accepted = 1; - // TODO create some callback structure to generate - // the resource (probably taking the full Request as argument) + // as per comment in Response struct: resp.resource_string = Some("soup-for-you".to_string()); resp.key_image = Some(str_E); Ok(resp)