Skip to content

Commit c97a6c7

Browse files
authored
Merge pull request #804 from pastelnetwork/PSL-1133_removeRQSymbols
[PSL-1533] remove rq symbols from self-healing messages
2 parents a067f61 + 844e213 commit c97a6c7

File tree

16 files changed

+44771
-62987
lines changed

16 files changed

+44771
-62987
lines changed

common/types/self_healing.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,6 @@ type RespondedTicket struct {
129129
TicketType TicketType `json:"ticket_type"`
130130
MissingKeys []string `json:"missing_keys"`
131131
ReconstructedFileHash []byte `json:"reconstructed_file_hash"`
132-
FileIDs []string `json:"sense_file_ids"`
133-
RaptorQSymbols []byte `json:"raptor_q_symbols"`
134132
IsReconstructionRequired bool `json:"is_reconstruction_required"`
135133
Error string `json:"error"`
136134
}
@@ -153,8 +151,6 @@ type VerifiedTicket struct {
153151
ReconstructedFileHash []byte `json:"reconstructed_file_hash"`
154152
IsReconstructionRequired bool `json:"is_reconstruction_required"`
155153
IsReconstructionRequiredByHealer bool `json:"is_reconstruction_required_by_healer"`
156-
RaptorQSymbols []byte `json:"raptor_q_symbols"`
157-
FileIDs []string `json:"sense_file_ids"`
158154
IsVerified bool `json:"is_verified"`
159155
Message string `json:"message"`
160156
}

supernode/services/selfhealing/process_self_healing_challenge.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ func (task *SHTask) ProcessSelfHealingChallenge(ctx context.Context, event types
8989
TicketType: ticket.TicketType,
9090
MissingKeys: ticket.MissingKeys,
9191
ReconstructedFileHash: nil,
92-
RaptorQSymbols: nil,
9392
IsReconstructionRequired: false,
9493
}
9594
logger.Info("sending response for verification")
@@ -125,7 +124,6 @@ func (task *SHTask) ProcessSelfHealingChallenge(ctx context.Context, event types
125124
TicketType: ticket.TicketType,
126125
MissingKeys: ticket.MissingKeys,
127126
ReconstructedFileHash: reconstructedFileHash,
128-
RaptorQSymbols: raptorQSymbols,
129127
IsReconstructionRequired: true,
130128
}
131129
logger.Info("sending response for verification")
@@ -192,8 +190,6 @@ func (task *SHTask) ProcessSelfHealingChallenge(ctx context.Context, event types
192190
TicketType: ticket.TicketType,
193191
MissingKeys: ticket.MissingKeys,
194192
ReconstructedFileHash: nil,
195-
RaptorQSymbols: nil,
196-
FileIDs: nil,
197193
IsReconstructionRequired: false,
198194
}
199195
logger.Info("sending response for verification")
@@ -215,7 +211,7 @@ func (task *SHTask) ProcessSelfHealingChallenge(ctx context.Context, event types
215211
}
216212
logger.Info("going to initiate sense self-healing")
217213

218-
ids, idFiles, fileHash, err := task.senseSelfHealing(ctx, senseTicket, sortedFiles)
214+
_, idFiles, fileHash, err := task.senseSelfHealing(ctx, senseTicket, sortedFiles)
219215
if err != nil {
220216
logger.WithError(err).Error("self-healing failed for sense ticket")
221217
return err
@@ -227,7 +223,6 @@ func (task *SHTask) ProcessSelfHealingChallenge(ctx context.Context, event types
227223
TicketType: ticket.TicketType,
228224
MissingKeys: ticket.MissingKeys,
229225
ReconstructedFileHash: fileHash,
230-
FileIDs: ids,
231226
IsReconstructionRequired: true,
232227
}
233228
logger.Info("sending response for verification")

walletnode/api/design/selfhealing.go

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ var SelfHealingMessage = Type("SelfHealingMessage", func() {
197197
var SelfHealingMessageData = Type("SelfHealingMessageData", func() {
198198
Attribute("challenger_id", String)
199199
Attribute("recipient_id", String)
200-
Attribute("challenge", SelfHealingChallengeData)
200+
Attribute("event_details", SelfHealingChallengeData)
201201
Attribute("response", SelfHealingResponseData)
202202
Attribute("verification", SelfHealingVerificationData)
203203
})
@@ -207,12 +207,12 @@ var SelfHealingChallengeData = Type("SelfHealingChallengeData", func() {
207207
Attribute("block", Int32)
208208
Attribute("merkelroot", String)
209209
Attribute("timestamp", String) // Goa does not directly support time.Time, use string and format as RFC3339
210-
Attribute("challenge_tickets", ArrayOf(ChallengeTicket))
210+
Attribute("event_tickets", ArrayOf(ChallengeTicket))
211211
Attribute("nodes_on_watchlist", String)
212212
})
213213

214214
// ChallengeTicket is the result type for the challenge ticket
215-
var ChallengeTicket = Type("ChallengeTicket", func() {
215+
var ChallengeTicket = Type("EventTicket", func() {
216216
Attribute("tx_id", String)
217217
Attribute("ticket_type", String) // Assuming TicketType is an enum or similar in Go, represented as String here
218218
Attribute("missing_keys", ArrayOf(String))
@@ -222,7 +222,7 @@ var ChallengeTicket = Type("ChallengeTicket", func() {
222222

223223
// SelfHealingResponseData is the result type for the self-healing response data
224224
var SelfHealingResponseData = Type("SelfHealingResponseData", func() {
225-
Attribute("challenge_id", String)
225+
Attribute("event_id", String)
226226
Attribute("block", Int32)
227227
Attribute("merkelroot", String)
228228
Attribute("timestamp", String) // Use string for time.Time
@@ -236,14 +236,12 @@ var RespondedTicket = Type("RespondedTicket", func() {
236236
Attribute("ticket_type", String) // Assuming TicketType is an enum or similar in Go
237237
Attribute("missing_keys", ArrayOf(String))
238238
Attribute("reconstructed_file_hash", Bytes)
239-
Attribute("sense_file_ids", ArrayOf(String))
240-
Attribute("raptor_q_symbols", Bytes)
241239
Attribute("is_reconstruction_required", Boolean)
242240
})
243241

244242
// SelfHealingVerificationData is the result type for the self-healing verification data
245243
var SelfHealingVerificationData = Type("SelfHealingVerificationData", func() {
246-
Attribute("challenge_id", String)
244+
Attribute("event_id", String)
247245
Attribute("block", Int32)
248246
Attribute("merkelroot", String)
249247
Attribute("timestamp", String) // Use string for time.Time
@@ -258,8 +256,6 @@ var VerifiedTicket = Type("VerifiedTicket", func() {
258256
Attribute("missing_keys", ArrayOf(String))
259257
Attribute("reconstructed_file_hash", Bytes)
260258
Attribute("is_reconstruction_required", Boolean)
261-
Attribute("raptor_q_symbols", Bytes)
262-
Attribute("sense_file_ids", ArrayOf(String))
263259
Attribute("is_verified", Boolean)
264260
Attribute("message", String)
265261
})

walletnode/api/gen/http/cascade/client/cli.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

walletnode/api/gen/http/metrics/client/encode_decode.go

Lines changed: 18 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

walletnode/api/gen/http/metrics/client/types.go

Lines changed: 10 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)