Skip to content

Feat: Merge confirmed Branches with the MasterBranch #1770

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

Merged
merged 324 commits into from
Feb 11, 2022
Merged

Conversation

hmoog
Copy link
Contributor

@hmoog hmoog commented Oct 28, 2021

Description of change

This PR adds the logic to merge confirmed Branches back to the MasterBranch to keep the network performant.

Type of change

  • Enhancement (a non-breaking change which adds functionality)

Change checklist

  • My code follows the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Base automatically changed from dev/consensus-performance-optimizations to dev/consensus October 29, 2021 11:10
@karimodm karimodm changed the base branch from dev/consensus to develop November 5, 2021 13:38
@hmoog hmoog changed the title Feat: started restructuring the code Feat: Merge confirmed Branches with the MasterBranch Nov 29, 2021
@karimodm karimodm marked this pull request as draft November 29, 2021 13:09
# Conflicts:
#	packages/ledgerstate/branch_dag.go
#	packages/tangle/booker.go
#	pkged.go
func (b *Booker) collectShallowLikedParentsBranchIDs(message *Message) (likedBranchIDs, dislikedBranchIDs ledgerstate.BranchIDs, err error) {
likedBranchIDs = ledgerstate.NewBranchIDs()
dislikedBranchIDs = ledgerstate.NewBranchIDs()
message.ForEachParentByType(ShallowLikeParentType, func(parentMessageID MessageID) bool {

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
388-416 lines are duplicate of packages/tangle/booker.go:425-453 (dupl)

// the supplied ArithmeticBranchIDs.
func (b *Booker) collectShallowDislikedParentsBranchIDs(message *Message) (dislikedBranchIDs ledgerstate.BranchIDs, err error) {
dislikedBranchIDs = ledgerstate.NewBranchIDs()
message.ForEachParentByType(ShallowDislikeParentType, func(parentMessageID MessageID) bool {

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
425-453 lines are duplicate of packages/tangle/booker.go:388-416 (dupl)

}

// ProcessMessageScenario2 creates a scenario useful to validate strong / weak propagation paths.
//nolint:gomnd

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
directive //nolint:gomnd is unused for linter "gomnd" (nolintlint)

@karimodm karimodm temporarily deployed to feature February 11, 2022 10:13 Inactive
@karimodm karimodm temporarily deployed to feature February 11, 2022 10:37 Inactive
@karimodm karimodm temporarily deployed to feature February 11, 2022 11:36 Inactive
@karimodm karimodm merged commit c01e96c into develop Feb 11, 2022
@karimodm karimodm deleted the feat/mergemaster branch February 11, 2022 12:04
@karimodm karimodm mentioned this pull request Feb 11, 2022
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.

7 participants