-
Notifications
You must be signed in to change notification settings - Fork 7
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
CCIP-5109 LBTC tokendata #558
base: main
Are you sure you want to change the base?
Conversation
6b0ed0c
to
5b8286d
Compare
47c2c5e
to
e19c13e
Compare
76567fa
to
c9f1900
Compare
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.
Looks good but kinda hard to properly review due to the PR size, I recommend making smaller individual PRs in the future.
e.g.
- refactoring pr / rename packages / etc
- add lbtc token data reader
- start using lbtc token data reader
pluginconfig/token.go
Outdated
if err != nil { | ||
return nil, err | ||
} | ||
return json.Marshal(raw) |
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.
isn't there a more efficient way? i see we do marshal -> unmarshal -> marshal
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.
hope having anonymus struct is more efficient than marshal -> unmarshal -> marshal
// Default to 100 millis if AttestationAPIInterval is not set this is set according to the APIs documented | ||
// 10 requests per second rate limit. | ||
if p.AttestationAPIInterval == nil { | ||
p.AttestationAPIInterval = commonconfig.MustNewDuration(100 * time.Millisecond) |
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.
Please make sure all this are configurable
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.
What do you mean? I have updated all tests with this configuration
I also added unmarshal test
chainlink-ccip/pluginconfig/token_test.go
Line 17 in f0861cc
func Test_TokenDataObserver_Unmarshal(t *testing.T) { |
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 mean we should be able to configure all this parameter without having to make a new release.
d295948
to
f0861cc
Compare
f0861cc
to
729ebb5
Compare
|
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.
Approving to unblock, but I haven’t done a full deep dive on every detail due to the size of the PR. Please make sure to get additional reviews and thoroughly test the changes (including proper E2E validation) before merging.
// Default to 100 millis if AttestationAPIInterval is not set this is set according to the APIs documented | ||
// 10 requests per second rate limit. | ||
if p.AttestationAPIInterval == nil { | ||
p.AttestationAPIInterval = commonconfig.MustNewDuration(100 * time.Millisecond) |
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 mean we should be able to configure all this parameter without having to make a new release.
core ref: f5957b8389a5968df275eba3918dfe941dac525c
This PR proposes tokendata refactoring + LBTC tokendata enablement
Config refactoring
LBTC attestation
One-pager: https://smartcontract-it.atlassian.net/wiki/spaces/CCIP/pages/1204256885/Lombard+LBTC+Attestation
token data not ready
for example)This PR contains unit and component tests, but lacks integration tests in core repo