-
Notifications
You must be signed in to change notification settings - Fork 14
[CAL][13] - implement NextSeqNum and GetSourceChainConfig #1049
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
base: main
Are you sure you want to change the base?
[CAL][13] - implement NextSeqNum and GetSourceChainConfig #1049
Conversation
20cfa4b
to
759e4d8
Compare
} | ||
|
||
// GetSourceChainConfigs always fetches fresh source chain configs directly from contracts | ||
// without using any cached values. Use this when up-to-date data is critical, especially |
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'm a little on the fence about putting this in the interface.
On one hand it avoids any confusion about whether the data is fresh or cached, so it's much clearer than the code that you've replaced. On the other, it's sort of an implementation detail because a non-EVM chain family might choose to store the next seq number in a different location.
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.
hmm, but accessor.NextSeqNum()
calling accessor.GetSourceChainConfigs()
is more of an implementation detail of this DefaultAccessor
rather than the entire ChainAccessor
interface
By adding GetSourceChainConfigs()
to the CAL interface we're just saying all chains will need to provide a way to fetch source chain configs, but all future accessors won't require that NextSeqNum()
calls GetSourceChainConfigs()
...if that makes sense
c571391
to
fe7cb40
Compare
fe7cb40
to
04e45eb
Compare
04e45eb
to
58fbb25
Compare
|
core ref: 2a64fde7f18a7e6cae302f6bed4e71da1c5f42af
ConfigPoller Migration
NextSeqNum()
in DefaultAccessorGetSourceChainConfigs()
to the ChainAccessor interfaceCCIPReader --> configPoller --> CCIPReader
cyclic dependency and removes first functionfetchFreshSourceChainConfigs()
from theccipReaderInternal
interface. Complete removal of this interface will mean the cycle is brokenStack: