Skip to content

Commit

Permalink
fix: merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas Bostoen committed Jun 18, 2024
2 parents b583229 + bb45cc6 commit cc416b5
Show file tree
Hide file tree
Showing 10 changed files with 117 additions and 62 deletions.
12 changes: 6 additions & 6 deletions apis/builder/constraints.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
post:
operationId: "submitConstraints"
summary: "Submit a validator's block constraints."
summary: "Submit signed constraints for a certain slot."
description: |
Submits a validator's constraints for block building.
Submits a validator's constraints for a certain slot.
A success response (200) indicates that the submission was valid and the constraints
will be considered for block building. If the submission is invalid, the builder
Expand All @@ -18,12 +18,12 @@ post:
schema:
$ref: "../../builder-oapi.yaml#/components/schemas/Deneb.SignedConstraints"
examples:
InclusionConstraint:
inclusion:
$ref: "../../builder-oapi.yaml#/components/examples/Deneb.InclusionConstraint"
BundleConstraint:
bundle:
$ref: "../../builder-oapi.yaml#/components/examples/Deneb.BundleConstraint"
AtomicConstraint:
$ref: "../../builder-oapi.yaml#/components/examples/Deneb.AtomicConstraint"
positional:
$ref: "../../builder-oapi.yaml#/components/examples/Deneb.PositionalConstraint"
responses:
"200":
description: Success response.
Expand Down
13 changes: 7 additions & 6 deletions apis/builder/header_with_proofs.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
get:
operationId: "getHeaderWithProof"
operationId: "getHeaderWithProofs"
summary: Get an execution payload header with proof.
description: |
Requests a builder node to produce a valid execution payload header with proof, which
Requests a builder node to produce a valid execution payload header with constraint proofs, which
can be integrated into a blinded beacon block and signed.
If the builder is unable to produce a valid execution payload header, then
If the builder is unable to produce a valid execution payload header (with valid proofs for the given constraints), then
the builder MUST return a 204 response. If the request is invalid, then the
builder MUST return an error response (400) with a description of the
validation failure.
Expand Down Expand Up @@ -38,17 +38,18 @@ get:
content:
application/json:
schema:
title: GetHeaderWithProofResponse
title: GetHeaderWithProofsResponse
type: object
required: [version, data]
properties:
version:
type: string
example: "deneb"
data:
$ref: "../../builder-oapi.yaml#/components/schemas/Deneb.SignedBuilderBidWithProof"
$ref: "../../builder-oapi.yaml#/components/schemas/Deneb.SignedBuilderBidWithProofs"
examples:
$ref: "../../builder-oapi.yaml#/components/examples/Deneb.SignedBuilderBidWithProof"
deneb:
$ref: "../../builder-oapi.yaml#/components/examples/Deneb.SignedBuilderBidWithProofs"
"204":
description: No header is available.
"400":
Expand Down
10 changes: 5 additions & 5 deletions builder-oapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ components:
$ref: "./beacon-apis/types/deneb/block.yaml#/Deneb/SignedBlindedBeaconBlock"
Deneb.SignedBuilderBid:
$ref: "./types/deneb/bid.yaml#/Deneb/SignedBuilderBid"
Deneb.SignedBuilderBidWithProof:
$ref: "./types/deneb/bid_proof.yaml#/Deneb/SignedBuilderBidWithProof"
Deneb.SignedBuilderBidWithProofs:
$ref: "./types/deneb/bid_proof.yaml#/Deneb/SignedBuilderBidWithProofs"
Deneb.ExecutionPayloadAndBlobsBundle:
$ref: "./types/deneb/execution_payload_and_blobs_bundle.yaml#/Deneb/ExecutionPayloadAndBlobsBundle"
Deneb.SignedConstraints:
Expand Down Expand Up @@ -109,11 +109,11 @@ components:
$ref: "./examples/deneb/execution_payload_and_blobs_bundle.json"
Deneb.SignedBuilderBid:
$ref: "./examples/deneb/signed_builder_bid.json"
Deneb.SignedBuilderBidWithProof:
Deneb.SignedBuilderBidWithProofs:
$ref: "./examples/deneb/signed_builder_bid_with_proofs.json"
Deneb.InclusionConstraint:
$ref: "./examples/deneb/inclusion_constraint.json"
Deneb.BundleConstraint:
$ref: "./examples/deneb/bundle_constraint.json"
Deneb.AtomicConstraint:
$ref: "./examples/deneb/atomic_constraint.json"
Deneb.PositionalConstraint:
$ref: "./examples/deneb/positional_constraint.json"
15 changes: 0 additions & 15 deletions examples/deneb/atomic_constraint.json

This file was deleted.

13 changes: 10 additions & 3 deletions examples/deneb/bundle_constraint.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
{
"value": [
{
"type": 0,
"message": {
"validatorIndex": 97,
"slot": 987432,
"constraints": [
{ "tx": "0xabc", "index": 0 },
{ "tx": "0xdef", "index": 1 }
{
"tx": "0x02f876018204db8405f5e100850218711a00825208949d22816f6611cfcb0cde5076c5f4e4a269e79bef8904563918244f40000080c080a0ee840d80915c9b506537909a5a6cf1ca2c5b47140d6585adab6ec0faf75fdcb7a07692785c5cb43c7cf02b800f3aa55aca4c474f289a3904717394254ff071be63",
"index": null
},
{
"tx": "0x02f8f2011484024111338501988fc9cc82879c941db3439a222c519ab44bb1144fc28167b4fa6ee680b8867065706520686173206120667269656e642c20686973206e616d652069732067726f797065722e2066726f6720636f696e20616e64207472756d7020636f696e207061636b656420696e746f206f6e652c207468652062657374206f6620626f746820776f726c64732e0d0a68747470733a2f2f782e636f6d2f47726f797065724f6e455448c080a085f2611dfbec8b80929062f0a304a43fad1f2d22442e89b388433949769db748a065eb9dfce244caebd29c10c5aae3c30a8e9aa0e54aaabaa6b4120b0f6410fd7e",
"index": null
}
]
},
"signature": "0x..."
"signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
}
]
}
18 changes: 13 additions & 5 deletions examples/deneb/inclusion_constraint.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,32 @@
{
"value": [
{
"type": 0,
"message": {
"validatorIndex": 97,
"slot": 987432,
"constraints": [
{ "tx": "0xabc", "index": null }
{
"tx": "0x02f876018204db8405f5e100850218711a00825208949d22816f6611cfcb0cde5076c5f4e4a269e79bef8904563918244f40000080c080a0ee840d80915c9b506537909a5a6cf1ca2c5b47140d6585adab6ec0faf75fdcb7a07692785c5cb43c7cf02b800f3aa55aca4c474f289a3904717394254ff071be63",
"index": null
}
]
},
"signature": "0x..."
"signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
},
{
"type": 0,
"message": {
"validatorIndex": 97,
"slot": 987432,
"constraints": [
{ "tx": "0xdef", "index": null }
{
"tx": "0x02f8f2011484024111338501988fc9cc82879c941db3439a222c519ab44bb1144fc28167b4fa6ee680b8867065706520686173206120667269656e642c20686973206e616d652069732067726f797065722e2066726f6720636f696e20616e64207472756d7020636f696e207061636b656420696e746f206f6e652c207468652062657374206f6620626f746820776f726c64732e0d0a68747470733a2f2f782e636f6d2f47726f797065724f6e455448c080a085f2611dfbec8b80929062f0a304a43fad1f2d22442e89b388433949769db748a065eb9dfce244caebd29c10c5aae3c30a8e9aa0e54aaabaa6b4120b0f6410fd7e",
"index": null
}
]
},
"signature": "0x..."
"signature": "0x1b77ac1fb663c9bc59509846d6ec05345bd629eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
}
]
}
}
22 changes: 22 additions & 0 deletions examples/deneb/positional_constraint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"value": [
{
"type": 0,
"message": {
"validatorIndex": 97,
"slot": 987432,
"constraints": [
{
"tx": "0x02f876018204db8405f5e100850218711a00825208949d22816f6611cfcb0cde5076c5f4e4a269e79bef8904563918244f40000080c080a0ee840d80915c9b506537909a5a6cf1ca2c5b47140d6585adab6ec0faf75fdcb7a07692785c5cb43c7cf02b800f3aa55aca4c474f289a3904717394254ff071be63",
"index": 0
},
{
"tx": "0x02f8f2011484024111338501988fc9cc82879c941db3439a222c519ab44bb1144fc28167b4fa6ee680b8867065706520686173206120667269656e642c20686973206e616d652069732067726f797065722e2066726f6720636f696e20616e64207472756d7020636f696e207061636b656420696e746f206f6e652c207468652062657374206f6620626f746820776f726c64732e0d0a68747470733a2f2f782e636f6d2f47726f797065724f6e455448c080a085f2611dfbec8b80929062f0a304a43fad1f2d22442e89b388433949769db748a065eb9dfce244caebd29c10c5aae3c30a8e9aa0e54aaabaa6b4120b0f6410fd7e",
"index": 1
}
]
},
"signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,26 @@
"blob_kzg_commitments": [
"0xa94170080872584e54a1cf092d845703b13907f2e6b3b1c0ad573b910530499e3bcd48c6378846b80d2bfa58c81cf3d5"
],
"constraint_proofs": {
"type": 0,
"data": {
"generalized_indeces": [
4
],
"transaction_hashes": [
"0x1234...",
"0x456..."
],
"merkle_hashes": [
"0x5097...",
"0x932587..."
]
}
},
"value": "1",
"pubkey": "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
"signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
}
},
"proof": {
"transaction_hashes": ["0x1234...", "0x456..."],
"generalized_indexes": [4, 5],
"merkle_hashes": ["0x5097...", "0x932587..."]
}
}
}
Expand Down
45 changes: 33 additions & 12 deletions types/deneb/bid_proof.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
Deneb:
SignedBuilderBidWithProof:
type: object
description: "The `SignedBuilderBidWithProof` object from the Builder API Deneb spec."
required: [message, signature, proof]
properties:
bid:
$ref: "./bid.yaml#/Deneb/SignedBuilderBid"
proof:
$ref: "#/Deneb/InclusionProof"

InclusionProof:
ConstraintProofs:
type: object
properties:
transaction_hashes:
Expand All @@ -33,9 +23,40 @@ Deneb:
description: List of merkle hashes.
description: List of lists containing merkle hashes.
description: |
The InclusionProof object contains proof data including transaction hashes,
The ConstraintProofs object contains proof data including transaction hashes,
generalized indexes, and merkle hashes for inclusion proof in the Merkle tree.
BuilderBidWithProofs:
description: "The `BuilderBid` object from the Builder API Deneb spec with constraint proofs."
allOf:
- type: object
required: [header, blob_kzg_commitments]
properties:
header:
$ref: "../../beacon-apis/types/deneb/execution_payload.yaml#/Deneb/ExecutionPayloadHeader"
description: "`ExecutionPayloadHeader` to use in block proposal."
blob_kzg_commitments:
type: array
items:
$ref: '../../beacon-apis/types/primitive.yaml#/KZGCommitment'
minItems: 0
maxItems: 4096
description: "the `KZGCommitment`s for the associated blobs for this `header`"
constraint_proofs:
$ref: "#/Deneb/ConstraintProofs"
- $ref: '../bellatrix/bid.yaml#/Bellatrix/BuilderBidCommon'

SignedBuilderBidWithProofs:
type: object
description: "The `SignedBuilderBidWithProofs` object from the Builder API spec."
required: [message, signature]
properties:
message:
$ref: "#/Deneb/BuilderBidWithProofs"
signature:
$ref: "../../beacon-apis/types/primitive.yaml#/Signature"





10 changes: 5 additions & 5 deletions types/deneb/constraints.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ Deneb:
message:
$ref: "#/Deneb/ConstraintsMessage"
signature:
type: string
description: |
The ECDSA signature of the ConstraintsMessage object, encoded as bytes and
hashed with the keccak256 hash. The signature must come from the key-pair
associated with the proposer opted-in into Bolt.
$ref: "../../beacon-apis/types/primitive.yaml#/Signature"
ConstraintsMessage:
type: object
properties:
type:
type: integer
items:
$ref: "../../builder-oapi.yaml#/components/schemas/Uint64"
validator_index:
type: string
items:
Expand Down

0 comments on commit cc416b5

Please sign in to comment.