Skip to content

Commit 6c62128

Browse files
CCIP-4472: Update default rate limit and cleanup comments (smartcontractkit#1558)
## Motivation [CCIP-4472](https://smartcontract-it.atlassian.net/browse/CCIP-4472) ## Solution
1 parent 857c5a6 commit 6c62128

File tree

1 file changed

+3
-7
lines changed
  • core/services/ocr2/plugins/ccip/tokendata/lbtc

1 file changed

+3
-7
lines changed

core/services/ocr2/plugins/ccip/tokendata/lbtc/lbtc.go

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import (
2121
"github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/tokendata/http"
2222
)
2323

24-
// TODO: double check the validty of default values for lombard's API after checking docs
2524
const (
2625
apiVersion = "v1"
2726
attestationPath = "deposits/getByHash"
@@ -35,8 +34,8 @@ const (
3534
maxCoolDownDuration = 10 * time.Minute
3635

3736
// defaultRequestInterval defines the rate in requests per second that the attestation API can be called.
38-
// this is set according to the APIs documentated 10 requests per second rate limit.
39-
defaultRequestInterval = 100 * time.Millisecond
37+
// this is set according to the APIs recommended 5 requests per second rate limit.
38+
defaultRequestInterval = 200 * time.Millisecond
4039

4140
// APIIntervalRateLimitDisabled is a special value to disable the rate limiting.
4241
APIIntervalRateLimitDisabled = -1
@@ -74,10 +73,9 @@ type TokenDataReader struct {
7473
type messageAttestationResponse struct {
7574
MessageHash string `json:"message_hash"`
7675
Status attestationStatus `json:"status"`
77-
Attestation string `json:"attestation"` // Attestation represented by abi.encode(payload, proof)
76+
Attestation string `json:"attestation,omitempty"` // Attestation represented by abi.encode(payload, proof)
7877
}
7978

80-
// TODO: Adjust after checking API docs
8179
type attestationRequest struct {
8280
PayloadHashes []string `json:"messageHash"`
8381
}
@@ -86,8 +84,6 @@ type attestationResponse struct {
8684
Attestations []messageAttestationResponse `json:"attestations"`
8785
}
8886

89-
// TODO: Implement encoding/decoding
90-
9187
type sourceTokenData struct {
9288
SourcePoolAddress []byte
9389
DestTokenAddress []byte

0 commit comments

Comments
 (0)