Skip to content

Conversation

@sstanculeanu
Copy link
Collaborator

@sstanculeanu sstanculeanu commented Oct 3, 2024

Reasoning behind the pull request

  • send equivalent proofs on the common new topic

Proposed changes

  • send equivalent proofs on the common new topic
  • small worker cleanup

Testing procedure

  • with feat branch

Pre-requisites

Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:

  • was the PR targeted to the correct branch?
  • if this is a larger feature that probably needs more than one PR, is there a feat branch created?
  • if this is a feat branch merging, do all satellite projects have a proper tag inside go.mod?

return err
}

mcm.broadcast(common.EquivalentProofsTopic, msgProof, pkBytes)
Copy link
Contributor

Choose a reason for hiding this comment

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

is this a topic between metachain and all shards?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

// PrepareBroadcastFinalConsensusMessage prepares the validator final info data broadcast for when its turn comes
func (cm *commonMessenger) PrepareBroadcastFinalConsensusMessage(message *consensus.Message, consensusIndex int) {
err := cm.delayedBlockBroadcaster.SetFinalConsensusMessageForValidator(message, consensusIndex)
// PrepareBroadcastEquivalentProof prepares the validator final info data broadcast for when its turn comes
Copy link
Contributor

Choose a reason for hiding this comment

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

update comment message

// BroadcastEquivalentProof will broadcast the proof for a header on the metachain common topic
func (mcm *metaChainMessenger) BroadcastEquivalentProof(proof *block.HeaderProof, pkBytes []byte) error {
if check.IfNilReflect(proof) {
return spos.ErrNilHeader
Copy link
Contributor

Choose a reason for hiding this comment

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

change error here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated

// BroadcastEquivalentProof will broadcast the proof for a header on the shard metachain common topic
func (scm *shardChainMessenger) BroadcastEquivalentProof(proof *block.HeaderProof, pkBytes []byte) error {
if check.IfNilReflect(proof) {
return spos.ErrNilHeader
Copy link
Contributor

Choose a reason for hiding this comment

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

same here

Copy link
Contributor

Choose a reason for hiding this comment

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

maybe we can have a common inner function here for shard and meta and pass the topic

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

applied the suggestion

@sstanculeanu sstanculeanu merged commit eccd1bf into feat/equivalent-messages Oct 3, 2024
5 checks passed
@sstanculeanu sstanculeanu deleted the send_proofs_on_topic branch October 3, 2024 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants