-
Notifications
You must be signed in to change notification settings - Fork 1
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
Create a common folder #9
base: main
Are you sure you want to change the base?
Conversation
8135774
to
5f60fb3
Compare
github.com/prometheus/client_golang v1.20.5 | ||
github.com/shopspring/decimal v1.4.0 | ||
github.com/smartcontractkit/chainlink-common v0.4.0 | ||
github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20250115203616-a2ea5e50b260 |
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.
This dependency is unfortunate. Although it looks like the only usages is for a SendTxReturnCode
which has a binary state. I bet we could eliminate it. 🤔
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.
Sorry, could you please clarify why you think this dependency is "unfortunate"? Do you mean that in general we want the code dependencies to be as simple as possible and this one complicates it, or is there any other reason to eliminate it?
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.
Dependencies between modules in the same repo can be a headache, since devs want to be able to update them both atomically, which forces us to use hacky local replaces. In this case, I think we should just switch to using a bool
instead of a custom type with two values for success/fatal.
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.
Ok, but what about txmgr/broadcaster.go and txmgr/confirmer.go that have a full-fledged switch logic for SendTxReturnCode? Do you think we should try changing them to also use boolean?
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.
No, there are actually many different kinds of meaningful codes. This module was only referencing two of them though. I don't think a bool is the answer, but there might be a different way to approach it, like by making the aggegrate func pluggable so that this module only deals with an opaque RESULT any
. We can figure this out in a follow-up.
LGTM, but let's see the chainlink/ PR build/test with this before merging 👍 |
This is the corresponding draft smartcontractkit/chainlink#15972 (I can update it once this is submitted) |
Moved files from chainlink/common to chains with the following caveats:
A one-to-one diff is available here https://github.com/smartcontractkit/chainlink/pull/15960/files