Skip to content

Commit c1b2c20

Browse files
robinbryceRobin Bryce
and
Robin Bryce
authored
got this wrong: we _dont_ want oneof (#15)
* got this wrong: we _dont_ want oneof * we don't want oneof * tweak the comments AB#8336 --------- Co-authored-by: Robin Bryce <[email protected]>
1 parent 42763db commit c1b2c20

File tree

2 files changed

+22
-25
lines changed

2 files changed

+22
-25
lines changed

datatrails-common-api/assets/v2/assets/eventresponse.proto

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -173,18 +173,17 @@ message EventResponse {
173173
max_length: 1024
174174
}];
175175

176-
// An event has exactly one proof mechanism. On any event only the entry
177-
// corresponding to the chosen proof mechanism will be present. (Note that
178-
// onfof exposes us to to many tooling compatibility issues)
176+
// An event has exactly one proof mechanism. This field caputures the proof
177+
// mechanism specific details supporting the trustworthyness of the event
178+
// record. More than one proof mech type is likely, but using oneof here has
179+
// proven to expose us to open ended tooling compatibility issues.
179180

180181
// proof details for proof_mechanism MERKLE_LOG
181-
oneof proof_details {
182-
MerkleLogEntry merklelog_entry = 19 [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
183-
description:
184-
"verifiable merkle mmr log entry details",
185-
// see https://github.com/grpc-ecosystem/grpc-gateway/blob/master/protoc-gen-openapiv2/options/openapiv2.proto
186-
// for specific types.
187-
type: OBJECT
188-
}];
189-
}
182+
MerkleLogEntry merklelog_entry = 19 [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
183+
description:
184+
"verifiable merkle mmr log entry details",
185+
// see https://github.com/grpc-ecosystem/grpc-gateway/blob/master/protoc-gen-openapiv2/options/openapiv2.proto
186+
// for specific types.
187+
type: OBJECT
188+
}];
190189
}

datatrails-common-api/assets/v2/assets/eventresponsejsonapi.proto

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -175,17 +175,15 @@ message EventResponseJSONAPI {
175175
max_length: 1024
176176
}];
177177

178-
// An event has exactly one proof mechanism. This field caputures the proof
179-
// mechanism specific details supporting the trustworthyness of the event
180-
// record. We anticipate at least two proof mechs: merkle_log and
181-
// verkle_log. We use oneof to avoid repeating the scattering of randomly
182-
// re-purposed fields we currently have for simple hash vs khipu.
183-
oneof proof_details {
184-
// proof details for proof_mechanism MERKLE_LOG
185-
MerkleLogEntry merklelog_entry = 19 [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
186-
description:
187-
"verifiable merkle mmr log entry details"
188-
max_length: 1024
189-
}];
190-
};
178+
// An event has exactly one proof mechanism. This field caputures the proof
179+
// mechanism specific details supporting the trustworthyness of the event
180+
// record. More than one proof mech type is likely, but using oneof here has
181+
// proven to expose us to open ended tooling compatibility issues.
182+
183+
// proof details for proof_mechanism MERKLE_LOG
184+
MerkleLogEntry merklelog_entry = 19 [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
185+
description:
186+
"verifiable merkle mmr log entry details"
187+
max_length: 1024
188+
}];
191189
}

0 commit comments

Comments
 (0)