Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions proto/parser/parser.proto
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,25 @@ message ParseRequest {
// Default false preserves the pre-feature behavior byte-for-byte: the parser
// emits an empty `intermediate_output` and the signed digest is unchanged.
bool include_intermediate_output = 4;

// Borsh-encoded SignedVerifiedPaymentMarker: a VerifiedPaymentMarker plus
// the gateway's P256 signature over it. Note the wrapper, not the bare
// VerifiedPaymentMarker: an external signer that emits the inner struct
// produces bytes the enclave cannot deserialize. parser_app verifies this
// before processing when payment enforcement is on (PaymentPolicy::Required);
// today every call site passes PaymentPolicy::Disabled, so verification is a
// no-op and this field is not yet enforced. Empty for the open v1 routes and
// for local-dev / gRPC-direct callers. Field 5, not 4: field 4 shipped as
// include_intermediate_output (#414) while payment_marker was still on an
// unmerged branch, so payment_marker moved rather than breaking the wire.
// Size bound: parser_app rejects a payment_marker over 8 KiB on length
// alone, before Borsh-decoding it
// (parser_app::payment_verify::MAX_PAYMENT_MARKER_BYTES). A real marker is
// well under 1 KiB, so the limit is headroom, not a constraint a signer
// has to plan around. The server's whole-request gRPC cap (25MB,
// host_primitives::GRPC_MAX_RECV_MSG_SIZE) still applies on top, as it
// does to every other field on this message.
bytes payment_marker = 5;
}

message ChainMetadata {
Expand Down
2 changes: 2 additions & 0 deletions src/Cargo.lock

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

Binary file modified src/generated/src/generated/descriptor.bin
Binary file not shown.
19 changes: 19 additions & 0 deletions src/generated/src/generated/parser.rs

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

1 change: 1 addition & 0 deletions src/host_primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ publish = false

[dependencies]
qos_core = { workspace = true}
qos_crypto = { workspace = true } # sha_256 for payment_marker hashing

tonic = { version = "0.10", default-features = false }
prost = { version = "0.12", features = [
Expand Down
1 change: 1 addition & 0 deletions src/host_primitives/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use prost::Message;
use qos_core::protocol::{ProtocolError, msg::ProtocolMsg};
use tonic::Status;

pub mod payment_marker;
pub mod turnkey;

/// Buffer size for socket message queue.
Expand Down
Loading
Loading