Skip to content
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

feat: multichain ocr3 contract transmitter #11672

Closed
wants to merge 16 commits into from

Conversation

makramkd
Copy link
Contributor

@makramkd makramkd commented Jan 3, 2024

The Lock/Unlock plugin will need an OCR3 transmitter that can transmit to many chains based upon the info being provided in the ReportWithInfo struct.

In order to achieve this, we need to implement two things:

With this in mind, this PR:

  • Creates a regular OCR3 contract transmitter that is based off of the OCR2 contract transmitter
  • Creates a multi-chain contract config tracker which tracks config changes on a single ("master") chain and combines config updates from all chains into a single config using a parametrizable CombinerFn
    • A CombinerFn is implemented which groups all transmitters for a single signer into a single types.Account object. See TransmitterCombiner in the PR changes.
  • Adds the OCR3Abstract, OCR3Base and NoOpOCR3 contracts to generate gethwrappers and use the associated ABI and ConfigSet event objects in the config tracker.
    • In theory, all OCR3 contracts should inherit OCR3Base and have the same exact ConfigSet event signature.
  • Creates a multichain OCR3 contract transmitter that wraps many different OCR3 transmitters and implements FromAccount matching the TransmitterCombiner CombinerFn implementation.
  • In order to test the above, adds the base OCR3 contracts to the shared subdirectory of the contracts directory and adds a NoOpOCR3.sol implementation that does nothing in _report just to test the end-to-end of the transmitter.

Copy link
Contributor

github-actions bot commented Jan 3, 2024

I see that you haven't updated any CHANGELOG files. Would it make sense to do so?

return nil, fmt.Errorf("abi missing Transmitted event")
}

err := lp.RegisterFilter(logpoller.Filter{
Copy link
Contributor

@dimkouv dimkouv Jan 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will never be Unregistered?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do unregisters need to happen?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cl-sonarqube-production
Copy link

SonarQube Quality Gate

Quality Gate failed

Failed condition C Reliability Rating on New Code (is worse than A)

See analysis details on SonarQube

Fix issues before they fail your Quality Gate with SonarLint SonarLint in your IDE.

@makramkd
Copy link
Contributor Author

makramkd commented Jan 8, 2024

Moving to CCIP: smartcontractkit/ccip#414

@makramkd makramkd closed this Jan 8, 2024
@makramkd makramkd deleted the CCIP-1467/multichain-ocr3-transmitter branch January 8, 2024 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants