fix test, add todos

This commit is contained in:
fbock
2024-07-25 10:49:45 +02:00
parent ab2c69b714
commit 3380f7d206
3 changed files with 16 additions and 7 deletions

View File

@ -185,16 +185,16 @@ fn test_build_escrow_transaction_output_descriptor() {
"b709f64da734e04e35b129a65a7fae361cad8a9458d1abc4f0b45b7661a42fca".to_string(), "b709f64da734e04e35b129a65a7fae361cad8a9458d1abc4f0b45b7661a42fca".to_string(),
taproot_pubkey_hex_taker: taproot_pubkey_hex_taker:
"4987f3de20a9b1fa6f76c6758934953a8d615e415f1a656f0f6563694b53107d".to_string(), "4987f3de20a9b1fa6f76c6758934953a8d615e415f1a656f0f6563694b53107d".to_string(),
musig_pubkey_hex_maker: "b943789a0c9a16e27d7a9d27077eacd0fc664f01ff795f64e0f5fd257b4019e9" musig_pubkey_hex_maker:
.to_string(), "02F9308A019258C31049344F85F89D5229B531C845836F99B08601F113BCE036F9".to_string(),
musig_pubkey_hex_taker: "a2e78a076b9ecfec8a8eb71ad5f0f29592d1559424f35ac25a0130d1a2880733" musig_pubkey_hex_taker:
.to_string(), "03DFF1D77F2A671C5F36183726DB2341BE58FEAE1DA2DECED843240F7B502BA659".to_string(),
}; };
let coordinator_pk = XOnlyPublicKey::from_str( let coordinator_pk = XOnlyPublicKey::from_str(
"d8e204cdaebec4c5a637311072c865858dc4f142b3848b8e6dde4143476535b5", "d8e204cdaebec4c5a637311072c865858dc4f142b3848b8e6dde4143476535b5",
) )
.unwrap(); .unwrap();
let result = build_escrow_transaction_output_descriptor(&escrow_data, &coordinator_pk); let result = build_escrow_transaction_output_descriptor(&escrow_data, &coordinator_pk);
dbg!(&result); dbg!(&result); // cargo test -- --nocapture to see the output
assert!(result.is_ok()); assert!(result.is_ok());
} }

View File

@ -1,2 +0,0 @@
Thinks to improve when implementing the production ready library:
* make api more generic (smaller)

11
todos.md Normal file
View File

@ -0,0 +1,11 @@
Thinks to improve when implementing the production ready library/coordinator:
* make api more generic (smaller) / maybe use websockets
* review escrow output descriptor, maybe make it smaller(less specific cases, more generic)?
* maybe hard code descriptor instead of compiling it from pieces?
* review for security flaws (error handling, logic bugs)
* maybe switch wallet completely to core rpc instead of bdk wallet + core rpc
* api rate limiting (e.g. backoff) ?
* build trader toolkit to get funds out of escrow if coordinator dissapears
* use the same database as the existing (python) robosats coordinator instead of separate sqlite db?
* share single db for coordinator and bdk wallet instead of sqlite + bdk k/v db?
* add more test coverage