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

Added Blockheight and Version #11

Merged
merged 7 commits into from
Aug 26, 2024
Merged

Added Blockheight and Version #11

merged 7 commits into from
Aug 26, 2024

Conversation

Karthiksrinatha
Copy link
Member

Added Blockheight and Version fields to Pubsub

@@ -29,6 +30,8 @@ type message struct {
Commitment string `json:"commitment"`
Proof string `json:"proof"`
Cell string `json:"cell"`
BlockHeight uint `json:"block_height"`
Copy link
Collaborator

@tarassh tarassh Aug 26, 2024

Choose a reason for hiding this comment

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

Lets use the same type as in event uint64

@@ -89,6 +92,9 @@ func (p *Publisher) PublishToCS(cid string, rowIndex int, colIndex int, status b
Commitment: base64.StdEncoding.EncodeToString(commitment),
Proof: base64.StdEncoding.EncodeToString(proof),
Cell: base64.StdEncoding.EncodeToString(cell),
BlockHeight: blockHeight,
Version: common.Version,
Copy link
Collaborator

@tarassh tarassh Aug 26, 2024

Choose a reason for hiding this comment

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

Version: fmt.Sprintf("%s-%s", common.Version, common.Commit)

Copy link
Collaborator

@tarassh tarassh left a comment

Choose a reason for hiding this comment

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

Minor change and we are good.

@@ -109,6 +109,6 @@ func (el *EventListener) ProcessLogs() {
continue
}

el.sampler.ProcessEvent(parsedURL.Host, uint(event.BlockHeight))
el.sampler.ProcessEvent(parsedURL.Host, uint64(event.BlockHeight))
Copy link
Collaborator

Choose a reason for hiding this comment

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

BlockHeight is of type uint64, no need to use type conversion.

@@ -97,6 +98,8 @@ func (p *Publisher) PublishToCS(cid string, rowIndex int, colIndex int, status b

}

fmt.Sprintf("%s-%s", common.Version, common.GitCommit)
Copy link
Collaborator

Choose a reason for hiding this comment

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

The result should go to Version.

}

fmt.Printf("%s-%s", common.Version, common.GitCommit)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Comment above

Copy link
Collaborator

@tarassh tarassh left a comment

Choose a reason for hiding this comment

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

Let us pass version and the commit

@tarassh tarassh self-requested a review August 26, 2024 23:02
@tarassh tarassh merged commit 56274a8 into main Aug 26, 2024
3 checks passed
@tarassh tarassh deleted the pubsub-additions branch August 26, 2024 23:06
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