diff --git a/.changeset/metal-houses-approve.md b/.changeset/metal-houses-approve.md new file mode 100644 index 00000000000..6768c50767e --- /dev/null +++ b/.changeset/metal-houses-approve.md @@ -0,0 +1,5 @@ +--- +"chainlink": minor +--- + +Added TxExpirationRebroadcast feature and config for Solana TXM. #added diff --git a/core/config/docs/chains-solana.toml b/core/config/docs/chains-solana.toml index c979581b258..c4d757ffa85 100644 --- a/core/config/docs/chains-solana.toml +++ b/core/config/docs/chains-solana.toml @@ -17,6 +17,9 @@ TxTimeout = '1m' # Default TxRetryTimeout = '10s' # Default # TxConfirmTimeout is the duration to wait when confirming a tx signature, before discarding as unconfirmed. TxConfirmTimeout = '30s' # Default +# TxExpirationRebroadcast enables or disables transaction rebroadcast if expired. Expiration check is performed every `ConfirmPollPeriod` +# A transaction is considered expired if the blockhash it was sent with is 150 blocks older than the latest blockhash. +TxExpirationRebroadcast = false # Default # TxRetentionTimeout is the duration to retain transactions in storage after being marked as finalized or errored. Set to 0 to immediately drop transactions. TxRetentionTimeout = '0s' # Default # SkipPreflight enables or disables preflight checks when sending txs. diff --git a/core/scripts/go.mod b/core/scripts/go.mod index 972dd4ff4a2..1e230f3da91 100644 --- a/core/scripts/go.mod +++ b/core/scripts/go.mod @@ -309,7 +309,7 @@ require ( github.com/smartcontractkit/chainlink-feeds v0.1.1 // indirect github.com/smartcontractkit/chainlink-protos/job-distributor v0.6.0 // indirect github.com/smartcontractkit/chainlink-protos/orchestrator v0.4.0 // indirect - github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241210172617-6fd1891d0fbc // indirect + github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241219173444-150f7443fdd3 // indirect github.com/smartcontractkit/chainlink-starknet/relayer v0.1.1-0.20241202202529-2033490e77b8 // indirect github.com/smartcontractkit/chainlink-testing-framework/lib v1.50.13 // indirect github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7 // indirect diff --git a/core/scripts/go.sum b/core/scripts/go.sum index 3338519266d..744ad724688 100644 --- a/core/scripts/go.sum +++ b/core/scripts/go.sum @@ -1162,8 +1162,8 @@ github.com/smartcontractkit/chainlink-protos/job-distributor v0.6.0 h1:0ewLMbAz3 github.com/smartcontractkit/chainlink-protos/job-distributor v0.6.0/go.mod h1:/dVVLXrsp+V0AbcYGJo3XMzKg3CkELsweA/TTopCsKE= github.com/smartcontractkit/chainlink-protos/orchestrator v0.4.0 h1:ZBat8EBvE2LpSQR9U1gEbRV6PfAkiFdINmQ8nVnXIAQ= github.com/smartcontractkit/chainlink-protos/orchestrator v0.4.0/go.mod h1:m/A3lqD7ms/RsQ9BT5P2uceYY0QX5mIt4KQxT2G6qEo= -github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241210172617-6fd1891d0fbc h1:dssRwJhmzJkUN/OajaDj2GsxBn+Tupk3bI1BkPEoJg0= -github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241210172617-6fd1891d0fbc/go.mod h1:p8aUDfJeley6oer7y+Ucd3edOtRlMTnWg3mN6rhaLWo= +github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241219173444-150f7443fdd3 h1:AIIiwrZ5T4nEjFT33aLZKoXwD63JSMu72wWe/rUdfm0= +github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241219173444-150f7443fdd3/go.mod h1:ARILnIgKelP0YkVzxXO111S9j0b4uKyt7iLpYjOkCtU= github.com/smartcontractkit/chainlink-starknet/relayer v0.1.1-0.20241202202529-2033490e77b8 h1:tNS7U9lrxkFvEuyxQv11HHOiV9LPDGC9wYEy+yM/Jv4= github.com/smartcontractkit/chainlink-starknet/relayer v0.1.1-0.20241202202529-2033490e77b8/go.mod h1:EBrEgcdIbwepqguClkv8Ohy7CbyWSJaE4EC9aBJlQK0= github.com/smartcontractkit/chainlink-testing-framework/lib v1.50.13 h1:T0kbw07Vb6xUyA9MIJZfErMgWseWi1zf7cYvRpoq7ug= diff --git a/core/services/chainlink/config_test.go b/core/services/chainlink/config_test.go index aab601133d6..65ece5a88c0 100644 --- a/core/services/chainlink/config_test.go +++ b/core/services/chainlink/config_test.go @@ -751,6 +751,7 @@ func TestConfig_Marshal(t *testing.T) { TxTimeout: commoncfg.MustNewDuration(time.Hour), TxRetryTimeout: commoncfg.MustNewDuration(time.Minute), TxConfirmTimeout: commoncfg.MustNewDuration(time.Second), + TxExpirationRebroadcast: ptr(false), TxRetentionTimeout: commoncfg.MustNewDuration(0 * time.Second), SkipPreflight: ptr(true), Commitment: ptr("banana"), @@ -1281,6 +1282,7 @@ OCR2CacheTTL = '1h0m0s' TxTimeout = '1h0m0s' TxRetryTimeout = '1m0s' TxConfirmTimeout = '1s' +TxExpirationRebroadcast = false TxRetentionTimeout = '0s' SkipPreflight = true Commitment = 'banana' diff --git a/core/services/chainlink/testdata/config-full.toml b/core/services/chainlink/testdata/config-full.toml index 61469716bf3..6878e09c911 100644 --- a/core/services/chainlink/testdata/config-full.toml +++ b/core/services/chainlink/testdata/config-full.toml @@ -499,6 +499,7 @@ OCR2CacheTTL = '1h0m0s' TxTimeout = '1h0m0s' TxRetryTimeout = '1m0s' TxConfirmTimeout = '1s' +TxExpirationRebroadcast = false TxRetentionTimeout = '0s' SkipPreflight = true Commitment = 'banana' diff --git a/core/services/chainlink/testdata/config-multi-chain-effective.toml b/core/services/chainlink/testdata/config-multi-chain-effective.toml index 794e02dd119..ba7538cac04 100644 --- a/core/services/chainlink/testdata/config-multi-chain-effective.toml +++ b/core/services/chainlink/testdata/config-multi-chain-effective.toml @@ -662,6 +662,7 @@ OCR2CacheTTL = '1m0s' TxTimeout = '1m0s' TxRetryTimeout = '10s' TxConfirmTimeout = '30s' +TxExpirationRebroadcast = false TxRetentionTimeout = '0s' SkipPreflight = true Commitment = 'confirmed' @@ -707,6 +708,7 @@ OCR2CacheTTL = '1m0s' TxTimeout = '1m0s' TxRetryTimeout = '10s' TxConfirmTimeout = '30s' +TxExpirationRebroadcast = false TxRetentionTimeout = '0s' SkipPreflight = true Commitment = 'confirmed' diff --git a/core/web/chains_controller_test.go b/core/web/chains_controller_test.go index 9e6c32a9637..d4e9b785f23 100644 --- a/core/web/chains_controller_test.go +++ b/core/web/chains_controller_test.go @@ -418,6 +418,7 @@ OCR2CacheTTL = '1m0s' TxTimeout = '1h0m0s' TxRetryTimeout = '10s' TxConfirmTimeout = '30s' +TxExpirationRebroadcast = false TxRetentionTimeout = '0s' SkipPreflight = false Commitment = 'confirmed' diff --git a/core/web/resolver/testdata/config-full.toml b/core/web/resolver/testdata/config-full.toml index 451faade0ad..1418ae9497e 100644 --- a/core/web/resolver/testdata/config-full.toml +++ b/core/web/resolver/testdata/config-full.toml @@ -498,6 +498,7 @@ OCR2CacheTTL = '1h0m0s' TxTimeout = '1h0m0s' TxRetryTimeout = '1m0s' TxConfirmTimeout = '1s' +TxExpirationRebroadcast = false TxRetentionTimeout = '0s' SkipPreflight = true Commitment = 'banana' diff --git a/core/web/resolver/testdata/config-multi-chain-effective.toml b/core/web/resolver/testdata/config-multi-chain-effective.toml index c4a9f24d545..f5de84093a4 100644 --- a/core/web/resolver/testdata/config-multi-chain-effective.toml +++ b/core/web/resolver/testdata/config-multi-chain-effective.toml @@ -662,6 +662,7 @@ OCR2CacheTTL = '1m0s' TxTimeout = '1m0s' TxRetryTimeout = '10s' TxConfirmTimeout = '30s' +TxExpirationRebroadcast = false TxRetentionTimeout = '0s' SkipPreflight = true Commitment = 'confirmed' @@ -707,6 +708,7 @@ OCR2CacheTTL = '1m0s' TxTimeout = '1m0s' TxRetryTimeout = '10s' TxConfirmTimeout = '30s' +TxExpirationRebroadcast = false TxRetentionTimeout = '0s' SkipPreflight = true Commitment = 'confirmed' diff --git a/deployment/go.mod b/deployment/go.mod index 9d71da06329..9eb3a02d573 100644 --- a/deployment/go.mod +++ b/deployment/go.mod @@ -411,7 +411,7 @@ require ( github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20241216163550-fa030d178ba3 // indirect github.com/smartcontractkit/chainlink-feeds v0.1.1 // indirect github.com/smartcontractkit/chainlink-protos/orchestrator v0.4.0 // indirect - github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241210172617-6fd1891d0fbc // indirect + github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241219173444-150f7443fdd3 // indirect github.com/smartcontractkit/chainlink-starknet/relayer v0.1.1-0.20241202202529-2033490e77b8 // indirect github.com/smartcontractkit/chainlink-testing-framework/lib/grafana v1.50.0 // indirect github.com/smartcontractkit/chainlink-testing-framework/seth v1.50.5 // indirect diff --git a/deployment/go.sum b/deployment/go.sum index 9b142dc77dd..cc0176b90a8 100644 --- a/deployment/go.sum +++ b/deployment/go.sum @@ -1429,8 +1429,8 @@ github.com/smartcontractkit/chainlink-protos/job-distributor v0.6.0 h1:0ewLMbAz3 github.com/smartcontractkit/chainlink-protos/job-distributor v0.6.0/go.mod h1:/dVVLXrsp+V0AbcYGJo3XMzKg3CkELsweA/TTopCsKE= github.com/smartcontractkit/chainlink-protos/orchestrator v0.4.0 h1:ZBat8EBvE2LpSQR9U1gEbRV6PfAkiFdINmQ8nVnXIAQ= github.com/smartcontractkit/chainlink-protos/orchestrator v0.4.0/go.mod h1:m/A3lqD7ms/RsQ9BT5P2uceYY0QX5mIt4KQxT2G6qEo= -github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241210172617-6fd1891d0fbc h1:dssRwJhmzJkUN/OajaDj2GsxBn+Tupk3bI1BkPEoJg0= -github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241210172617-6fd1891d0fbc/go.mod h1:p8aUDfJeley6oer7y+Ucd3edOtRlMTnWg3mN6rhaLWo= +github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241219173444-150f7443fdd3 h1:AIIiwrZ5T4nEjFT33aLZKoXwD63JSMu72wWe/rUdfm0= +github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241219173444-150f7443fdd3/go.mod h1:ARILnIgKelP0YkVzxXO111S9j0b4uKyt7iLpYjOkCtU= github.com/smartcontractkit/chainlink-starknet/relayer v0.1.1-0.20241202202529-2033490e77b8 h1:tNS7U9lrxkFvEuyxQv11HHOiV9LPDGC9wYEy+yM/Jv4= github.com/smartcontractkit/chainlink-starknet/relayer v0.1.1-0.20241202202529-2033490e77b8/go.mod h1:EBrEgcdIbwepqguClkv8Ohy7CbyWSJaE4EC9aBJlQK0= github.com/smartcontractkit/chainlink-testing-framework/lib v1.50.13 h1:T0kbw07Vb6xUyA9MIJZfErMgWseWi1zf7cYvRpoq7ug= diff --git a/docs/CONFIG.md b/docs/CONFIG.md index 11cc2fbad01..7fa4993ec09 100644 --- a/docs/CONFIG.md +++ b/docs/CONFIG.md @@ -11264,6 +11264,7 @@ OCR2CacheTTL = '1m' # Default TxTimeout = '1m' # Default TxRetryTimeout = '10s' # Default TxConfirmTimeout = '30s' # Default +TxExpirationRebroadcast = false # Default TxRetentionTimeout = '0s' # Default SkipPreflight = true # Default Commitment = 'confirmed' # Default @@ -11334,6 +11335,13 @@ TxConfirmTimeout = '30s' # Default ``` TxConfirmTimeout is the duration to wait when confirming a tx signature, before discarding as unconfirmed. +### TxExpirationRebroadcast +```toml +TxExpirationRebroadcast = false # Default +``` +TxExpirationRebroadcast enables or disables transaction rebroadcast if expired. Expiration check is performed every `ConfirmPollPeriod` +A transaction is considered expired if the blockhash it was sent with is 150 blocks older than the latest blockhash. + ### TxRetentionTimeout ```toml TxRetentionTimeout = '0s' # Default diff --git a/go.mod b/go.mod index e97f949b065..4bfc5964ff7 100644 --- a/go.mod +++ b/go.mod @@ -84,7 +84,7 @@ require ( github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20241216163550-fa030d178ba3 github.com/smartcontractkit/chainlink-feeds v0.1.1 github.com/smartcontractkit/chainlink-protos/orchestrator v0.4.0 - github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241210172617-6fd1891d0fbc + github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241219173444-150f7443fdd3 github.com/smartcontractkit/chainlink-starknet/relayer v0.1.1-0.20241202202529-2033490e77b8 github.com/smartcontractkit/libocr v0.0.0-20241007185508-adbe57025f12 github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20241009055228-33d0c0bf38de diff --git a/go.sum b/go.sum index 5d3b9db6b21..c6f5b4a29e8 100644 --- a/go.sum +++ b/go.sum @@ -1149,8 +1149,8 @@ github.com/smartcontractkit/chainlink-feeds v0.1.1 h1:JzvUOM/OgGQA1sOqTXXl52R6An github.com/smartcontractkit/chainlink-feeds v0.1.1/go.mod h1:55EZ94HlKCfAsUiKUTNI7QlE/3d3IwTlsU3YNa/nBb4= github.com/smartcontractkit/chainlink-protos/orchestrator v0.4.0 h1:ZBat8EBvE2LpSQR9U1gEbRV6PfAkiFdINmQ8nVnXIAQ= github.com/smartcontractkit/chainlink-protos/orchestrator v0.4.0/go.mod h1:m/A3lqD7ms/RsQ9BT5P2uceYY0QX5mIt4KQxT2G6qEo= -github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241210172617-6fd1891d0fbc h1:dssRwJhmzJkUN/OajaDj2GsxBn+Tupk3bI1BkPEoJg0= -github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241210172617-6fd1891d0fbc/go.mod h1:p8aUDfJeley6oer7y+Ucd3edOtRlMTnWg3mN6rhaLWo= +github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241219173444-150f7443fdd3 h1:AIIiwrZ5T4nEjFT33aLZKoXwD63JSMu72wWe/rUdfm0= +github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241219173444-150f7443fdd3/go.mod h1:ARILnIgKelP0YkVzxXO111S9j0b4uKyt7iLpYjOkCtU= github.com/smartcontractkit/chainlink-starknet/relayer v0.1.1-0.20241202202529-2033490e77b8 h1:tNS7U9lrxkFvEuyxQv11HHOiV9LPDGC9wYEy+yM/Jv4= github.com/smartcontractkit/chainlink-starknet/relayer v0.1.1-0.20241202202529-2033490e77b8/go.mod h1:EBrEgcdIbwepqguClkv8Ohy7CbyWSJaE4EC9aBJlQK0= github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7 h1:12ijqMM9tvYVEm+nR826WsrNi6zCKpwBhuApq127wHs= diff --git a/integration-tests/go.mod b/integration-tests/go.mod index 1f35241e461..86b89b82582 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -428,7 +428,7 @@ require ( github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20241216163550-fa030d178ba3 // indirect github.com/smartcontractkit/chainlink-feeds v0.1.1 // indirect github.com/smartcontractkit/chainlink-protos/orchestrator v0.4.0 // indirect - github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241210172617-6fd1891d0fbc // indirect + github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241219173444-150f7443fdd3 // indirect github.com/smartcontractkit/chainlink-starknet/relayer v0.1.1-0.20241202202529-2033490e77b8 // indirect github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7 // indirect github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20241009055228-33d0c0bf38de // indirect diff --git a/integration-tests/go.sum b/integration-tests/go.sum index c7cca9094e0..b2101edcd73 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -1450,8 +1450,8 @@ github.com/smartcontractkit/chainlink-protos/job-distributor v0.6.0 h1:0ewLMbAz3 github.com/smartcontractkit/chainlink-protos/job-distributor v0.6.0/go.mod h1:/dVVLXrsp+V0AbcYGJo3XMzKg3CkELsweA/TTopCsKE= github.com/smartcontractkit/chainlink-protos/orchestrator v0.4.0 h1:ZBat8EBvE2LpSQR9U1gEbRV6PfAkiFdINmQ8nVnXIAQ= github.com/smartcontractkit/chainlink-protos/orchestrator v0.4.0/go.mod h1:m/A3lqD7ms/RsQ9BT5P2uceYY0QX5mIt4KQxT2G6qEo= -github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241210172617-6fd1891d0fbc h1:dssRwJhmzJkUN/OajaDj2GsxBn+Tupk3bI1BkPEoJg0= -github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241210172617-6fd1891d0fbc/go.mod h1:p8aUDfJeley6oer7y+Ucd3edOtRlMTnWg3mN6rhaLWo= +github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241219173444-150f7443fdd3 h1:AIIiwrZ5T4nEjFT33aLZKoXwD63JSMu72wWe/rUdfm0= +github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241219173444-150f7443fdd3/go.mod h1:ARILnIgKelP0YkVzxXO111S9j0b4uKyt7iLpYjOkCtU= github.com/smartcontractkit/chainlink-starknet/relayer v0.1.1-0.20241202202529-2033490e77b8 h1:tNS7U9lrxkFvEuyxQv11HHOiV9LPDGC9wYEy+yM/Jv4= github.com/smartcontractkit/chainlink-starknet/relayer v0.1.1-0.20241202202529-2033490e77b8/go.mod h1:EBrEgcdIbwepqguClkv8Ohy7CbyWSJaE4EC9aBJlQK0= github.com/smartcontractkit/chainlink-testing-framework/havoc v1.50.2 h1:GDGrC5OGiV0RyM1znYWehSQXyZQWTOzrEeJRYmysPCE= diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod index 3f0cf7e952e..2467d35684b 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -412,7 +412,7 @@ require ( github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20241216163550-fa030d178ba3 // indirect github.com/smartcontractkit/chainlink-feeds v0.1.1 // indirect github.com/smartcontractkit/chainlink-protos/orchestrator v0.4.0 // indirect - github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241210172617-6fd1891d0fbc // indirect + github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241219173444-150f7443fdd3 // indirect github.com/smartcontractkit/chainlink-starknet/relayer v0.1.1-0.20241202202529-2033490e77b8 // indirect github.com/smartcontractkit/chainlink-testing-framework/havoc v1.50.2 // indirect github.com/smartcontractkit/chainlink-testing-framework/lib/grafana v1.50.0 // indirect diff --git a/integration-tests/load/go.sum b/integration-tests/load/go.sum index 64591b58222..bb187d252b5 100644 --- a/integration-tests/load/go.sum +++ b/integration-tests/load/go.sum @@ -1441,8 +1441,8 @@ github.com/smartcontractkit/chainlink-protos/job-distributor v0.6.0 h1:0ewLMbAz3 github.com/smartcontractkit/chainlink-protos/job-distributor v0.6.0/go.mod h1:/dVVLXrsp+V0AbcYGJo3XMzKg3CkELsweA/TTopCsKE= github.com/smartcontractkit/chainlink-protos/orchestrator v0.4.0 h1:ZBat8EBvE2LpSQR9U1gEbRV6PfAkiFdINmQ8nVnXIAQ= github.com/smartcontractkit/chainlink-protos/orchestrator v0.4.0/go.mod h1:m/A3lqD7ms/RsQ9BT5P2uceYY0QX5mIt4KQxT2G6qEo= -github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241210172617-6fd1891d0fbc h1:dssRwJhmzJkUN/OajaDj2GsxBn+Tupk3bI1BkPEoJg0= -github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241210172617-6fd1891d0fbc/go.mod h1:p8aUDfJeley6oer7y+Ucd3edOtRlMTnWg3mN6rhaLWo= +github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241219173444-150f7443fdd3 h1:AIIiwrZ5T4nEjFT33aLZKoXwD63JSMu72wWe/rUdfm0= +github.com/smartcontractkit/chainlink-solana v1.1.1-0.20241219173444-150f7443fdd3/go.mod h1:ARILnIgKelP0YkVzxXO111S9j0b4uKyt7iLpYjOkCtU= github.com/smartcontractkit/chainlink-starknet/relayer v0.1.1-0.20241202202529-2033490e77b8 h1:tNS7U9lrxkFvEuyxQv11HHOiV9LPDGC9wYEy+yM/Jv4= github.com/smartcontractkit/chainlink-starknet/relayer v0.1.1-0.20241202202529-2033490e77b8/go.mod h1:EBrEgcdIbwepqguClkv8Ohy7CbyWSJaE4EC9aBJlQK0= github.com/smartcontractkit/chainlink-testing-framework/havoc v1.50.2 h1:GDGrC5OGiV0RyM1znYWehSQXyZQWTOzrEeJRYmysPCE=