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

EVM 149 - syncer go ibft coordination #843

Merged

Conversation

Nemanja0x
Copy link
Contributor

@Nemanja0x Nemanja0x commented Oct 27, 2022

Description

This PR is a initial piece of code required to introduce go-ibft into v3-parity.
The following is implemented:

  1. Polybft uses go-ibft instead of pbft
  2. Coordination between syncer and go-ibft
  3. Transport functions are renamed in accordance to go-ibft interface (Gossip -> Multicast)
  4. Dummy methods are implemented for consensus engine which will become go-ibft backend

Changes include

  • Bugfix (non-breaking change that solves an issue)
  • Hotfix (change that solves an urgent issue, and requires immediate attention)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)

Breaking changes

Please complete this section if any breaking changes have been made, otherwise delete it

Checklist

  • I have assigned this PR to myself
  • I have added at least 1 reviewer
  • I have added the relevant labels
  • I have updated the official documentation
  • I have added sufficient documentation in code

Testing

  • I have tested this code with the official test suite
  • I have tested this code manually

Additional comments

In order to split replacement of pbft with go-ibft into a smaller PRs, the tests will not be supported by this PR. The last PR in the incoming sequence of PRs will hold correct e2e tests.

@Stefan-Ethernal Stefan-Ethernal added the feature New update to Polygon Edge label Oct 28, 2022
@codecov
Copy link

codecov bot commented Oct 28, 2022

Codecov Report

❗ No coverage uploaded for pull request base (go-ibft-integration@c9b71a1). Click here to learn what that means.
The diff coverage is n/a.

@@                  Coverage Diff                   @@
##             go-ibft-integration     #843   +/-   ##
======================================================
  Coverage                       ?   51.25%           
======================================================
  Files                          ?      162           
  Lines                          ?    21190           
  Branches                       ?        0           
======================================================
  Hits                           ?    10860           
  Misses                         ?     9483           
  Partials                       ?      847           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Stefan-Ethernal Stefan-Ethernal changed the title ECM 149 - syncer go ibft coordination EVM 149 - syncer go ibft coordination Oct 31, 2022
if p.runtime.IsBridgeEnabled() {
// start bridge event tracker
if err := p.runtime.startEventTracker(); err != nil {
return fmt.Errorf("starting event tracker failed:%w", err)
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpicking :) missing a whitespace before %w

Copy link
Contributor

Choose a reason for hiding this comment

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

Fixed c14c710

return topic.Subscribe(func(obj interface{}, _ peer.ID) {
msg, ok := obj.(*pbftproto.TransportMessage)
if !ok {
cr.logger.Warn("failed to deliver message", "err", "invalid msg")
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need to log the object itself? also is it a warning or an error?

Copy link
Contributor

Choose a reason for hiding this comment

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

the same below.

Copy link
Contributor

Choose a reason for hiding this comment

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

Fixed c14c710

Copy link
Contributor

@JekaMas JekaMas left a comment

Choose a reason for hiding this comment

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

lgtm with few comments


return
}
// initialize pbft engine
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should you remove this commented code?

@igorcrevar igorcrevar merged commit 977ba67 into go-ibft-integration Nov 4, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Nov 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New update to Polygon Edge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants