diff --git a/docker/sbtc/signer/signer-config.toml b/docker/sbtc/signer/signer-config.toml index 0d1ea7372..688fd2641 100644 --- a/docker/sbtc/signer/signer-config.toml +++ b/docker/sbtc/signer/signer-config.toml @@ -11,7 +11,7 @@ # [blocklist_client] # endpoint = "http://127.0.0.1:8080" -# The delay, in milliseconds, for the retry after a blocklist client failure +# The delay, in milliseconds, for the retry after a blocklist client failure # # Required: false # Environment: SIGNER_BLOCKLIST_CLIENT__RETRY_DELAY @@ -35,11 +35,10 @@ endpoints = [ "http://testApiKey@emily-server:3031", ] -# The pagination timeout, in seconds, used to fetch deposits and withdrawals -# requests from Emily. +# The pagination timeout, in seconds, used to fetch deposits requests from Emily. # Required: true # Environment: SIGNER_EMILY__PAGINATION_TIMEOUT -pagination_timeout = 30 +pagination_timeout = 15 # !! ============================================================================== # !! Bitcoin Core Configuration diff --git a/emily/handler/tests/integration/deposit.rs b/emily/handler/tests/integration/deposit.rs index 2e20ceb97..cff1cafff 100644 --- a/emily/handler/tests/integration/deposit.rs +++ b/emily/handler/tests/integration/deposit.rs @@ -317,11 +317,11 @@ async fn get_deposits() { } } - let chunksize: u16 = 2; + let chunksize = 2; // If the number of elements is an exact multiple of the chunk size the "final" // query will still have a next token, and the next query will now have a next // token and will return no additional data. - let expected_chunks: u16 = expected_deposit_infos.len() as u16 / chunksize + 1; + let expected_chunks = expected_deposit_infos.len() / chunksize + 1; // Act. // ---- @@ -349,13 +349,13 @@ async fn get_deposits() { // Assert. // ------- - assert_eq!(expected_chunks, gotten_deposit_info_chunks.len() as u16); + assert_eq!(expected_chunks, gotten_deposit_info_chunks.len()); let max_chunk_size = gotten_deposit_info_chunks .iter() .map(|chunk| chunk.len()) .max() .unwrap(); - assert!(chunksize >= max_chunk_size as u16); + assert!(chunksize >= max_chunk_size); let mut gotten_deposit_infos = gotten_deposit_info_chunks .into_iter() @@ -440,7 +440,7 @@ async fn get_deposits_for_recipient() { } // The size of the chunks to grab from the api. - let chunksize: u16 = 2; + let chunksize = 2; // Act. // ---- @@ -456,7 +456,7 @@ async fn get_deposits_for_recipient() { &configuration, recipient, next_token.as_ref().and_then(|o| o.as_deref()), - Some(chunksize as u32), + Some(chunksize), ) .await .expect("Received an error after making a valid get deposits for recipient api call."); diff --git a/emily/handler/tests/integration/withdrawal.rs b/emily/handler/tests/integration/withdrawal.rs index 98d117a5a..e08d35d67 100644 --- a/emily/handler/tests/integration/withdrawal.rs +++ b/emily/handler/tests/integration/withdrawal.rs @@ -143,7 +143,7 @@ async fn get_withdrawals() { // If the number of elements is an exact multiple of the chunk size the "final" // query will still have a next token, and the next query will now have a next // token and will return no additional data. - let expected_chunks = expected_withdrawal_infos.len() as u32 / chunksize + 1; + let expected_chunks = expected_withdrawal_infos.len() / chunksize + 1; // Act. // ---- @@ -157,7 +157,7 @@ async fn get_withdrawals() { &configuration, status, next_token.as_ref().and_then(|o| o.as_deref()), - Some(chunksize), + Some(chunksize as u32), ) .await .expect("Received an error after making a valid get withdrawal api call."); @@ -171,13 +171,13 @@ async fn get_withdrawals() { // Assert. // ------- - assert_eq!(expected_chunks, gotten_withdrawal_info_chunks.len() as u32); + assert_eq!(expected_chunks, gotten_withdrawal_info_chunks.len()); let max_chunk_size = gotten_withdrawal_info_chunks .iter() .map(|chunk| chunk.len()) .max() .unwrap(); - assert!(chunksize >= max_chunk_size as u32); + assert!(chunksize >= max_chunk_size); let mut gotten_withdrawal_infos = gotten_withdrawal_info_chunks .into_iter() diff --git a/signer/src/config/default.toml b/signer/src/config/default.toml index 3f46af5c2..0d0154732 100644 --- a/signer/src/config/default.toml +++ b/signer/src/config/default.toml @@ -14,7 +14,7 @@ # [blocklist_client] # endpoint = "http://127.0.0.1:8080" -# The delay, in milliseconds, for the retry after a blocklist client failure +# The delay, in milliseconds, for the retry after a blocklist client failure # # Required: false # Environment: SIGNER_BLOCKLIST_CLIENT__RETRY_DELAY @@ -38,8 +38,15 @@ endpoints = [ "http://testApiKey@localhost:3031", ] -# The pagination timeout, in seconds, used to fetch deposits and withdrawals -# requests from Emily. +# Maximum deposits returned per page. Responses will be limited to this +# many items. Regardless of the page_size setting, responses are always +# capped at 1 MB total size. If not set, only the 1 MB cap applies. +# +# Required: false +# Environment: SIGNER_EMILY__PAGE_SIZE +# page_size = 100 + +# The pagination timeout, in seconds, used to fetch deposits requests from Emily. # Required: true # Environment: SIGNER_EMILY__PAGINATION_TIMEOUT pagination_timeout = 15