-
Notifications
You must be signed in to change notification settings - Fork 3
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
Fix test for rejecting a TSS node who is not part of the signing committe #1028
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -672,7 +672,6 @@ async fn test_request_limit_are_updated_during_signing() { | |
clean_tests(); | ||
} | ||
|
||
#[ignore] | ||
#[tokio::test] | ||
#[serial] | ||
async fn test_fails_to_sign_if_non_signing_group_participants_are_used() { | ||
|
@@ -728,7 +727,7 @@ async fn test_fails_to_sign_if_non_signing_group_participants_are_used() { | |
}; | ||
|
||
let with_parent_key = true; | ||
let (validators_info, mut signature_request, validator_ips_and_keys) = | ||
let (_validators_info, mut signature_request, validator_ips_and_keys) = | ||
get_sign_tx_data(&entropy_api, &rpc, hex::encode(PREIMAGE_SHOULD_SUCCEED), with_parent_key) | ||
.await; | ||
|
||
|
@@ -769,7 +768,7 @@ async fn test_fails_to_sign_if_non_signing_group_participants_are_used() { | |
let subscribe_response: Result<(), String> = | ||
bincode::deserialize(&response_message).unwrap(); | ||
|
||
assert_eq!(Err("NoListener(\"no listener\")".to_string()), subscribe_response); | ||
assert_eq!(Err("Decryption(\"Public key does not match any of those expected for this protocol session\")".to_string()), subscribe_response); | ||
|
||
// The stream should not continue to send messages | ||
// returns true if this part of the test passes | ||
|
@@ -780,20 +779,16 @@ async fn test_fails_to_sign_if_non_signing_group_participants_are_used() { | |
signature_request.signature_verifying_key = verifying_key.to_vec(); | ||
|
||
let test_user_bad_connection_res = submit_transaction_requests( | ||
vec![validator_ips_and_keys[1].clone()], | ||
vec![validator_ips_and_keys[0].clone()], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was the bit that was wrong before. We should be sending the signature request to the same TS server that we attempt to make a connection to. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🙏 |
||
signature_request.clone(), | ||
one, | ||
) | ||
.await; | ||
|
||
// thread 'user::tests::test_fails_to_sign_if_non_signing_group_participants_are_used' panicked at crates/threshold-signature-server/src/user/tests.rs:848:9: | ||
// assertion `left == right` failed | ||
// left: "{\"Err\":\"Subscribe message rejected: NoListener(\\\"no listener\\\")\"}" | ||
// right: "{\"Err\":\"Timed out waiting for remote party\"}" | ||
for res in test_user_bad_connection_res { | ||
assert_eq!( | ||
res.unwrap().text().await.unwrap(), | ||
"{\"Err\":\"Timed out waiting for remote party\"}" | ||
"{\"Err\":\"Oneshot timeout error: channel closed\"}" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think what error we get here is not too important - the main thing is that the connection attempt fails in the assertion below. |
||
); | ||
} | ||
|
||
|
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.
I changed this error message and the comment above because they mentioned registration which no longer involves a protocol session.