Skip to content

Commit

Permalink
feat: add dataMarket field to SnapshotSubmission proto definition
Browse files Browse the repository at this point in the history
  • Loading branch information
anomit committed Dec 13, 2024
1 parent 5cbdac2 commit ad41c2b
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 34 deletions.
1 change: 1 addition & 0 deletions pkgs/proto/submission.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ message SnapshotSubmission {
Request request = 1;
string signature = 2;
string header = 3;
string dataMarket = 4;
}

service Submission {
Expand Down
5 changes: 1 addition & 4 deletions pkgs/service/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@ func (s *server) SubmitSnapshot(ctx context.Context, submission *pkgs.SnapshotSu
log.Debugln("Sending submission with ID: ", submissionId.String())

submissionBytes := submissionIdBytes
if config.SettingsObj.DataMarketInRequest {
submissionBytes = append(submissionBytes, []byte(config.SettingsObj.DataMarketAddress)...)
}
submissionBytes = append(submissionBytes, subBytes...)

// Track received submission for this epoch
Expand Down Expand Up @@ -172,7 +169,7 @@ func (s *server) getOrCreateEpochMetrics(epochID uint64) *epochMetrics {
received: atomic.Uint64{},
succeeded: atomic.Uint64{},
})

// Type assert and return the metrics object
metrics := metricsValue.(*epochMetrics)

Expand Down
70 changes: 40 additions & 30 deletions pkgs/submission.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ad41c2b

Please sign in to comment.