|
| 1 | +post: |
| 2 | + tags: |
| 3 | + - Beacon |
| 4 | + - ValidatorRequiredApi |
| 5 | + summary: "Publish a signed block." |
| 6 | + operationId: "publishBlindedBlockV2" |
| 7 | + description: | |
| 8 | + Instructs the beacon node to use the components of the `SignedBlindedBeaconBlock` to construct and publish a |
| 9 | + `SignedBeaconBlock` by swapping out the `transactions_root` for the corresponding full list of `transactions`. |
| 10 | + The beacon node should broadcast a newly constructed `SignedBeaconBlock` to the beacon network, |
| 11 | + to be included in the beacon chain. The beacon node is not required to validate the signed |
| 12 | + `BeaconBlock`, and a successful response (20X) only indicates that the broadcast has been |
| 13 | + successful. The beacon node is expected to integrate the new block into its state, and |
| 14 | + therefore validate the block internally, however blocks which fail the validation are still |
| 15 | + broadcast but a different status code is returned (202). Pre-Bellatrix, this endpoint will accept |
| 16 | + a `SignedBeaconBlock`. The broadcast behaviour may be adjusted via the `broadcast_validation` |
| 17 | + query parameter. |
| 18 | + parameters: |
| 19 | + - name: broadcast_validation |
| 20 | + in: query |
| 21 | + required: false |
| 22 | + description: | |
| 23 | + Level of validation that must be applied to a block before it is broadcast. |
| 24 | +
|
| 25 | + Possible values: |
| 26 | + - **`gossip`** (default): lightweight gossip checks only |
| 27 | + - **`consensus`**: full consensus checks, including validation of all signatures and |
| 28 | + blocks fields _except_ for the execution payload transactions. |
| 29 | + - **`consensus_and_equivocation`**: the same as `consensus`, with an extra equivocation |
| 30 | + check immediately before the block is broadcast. If the block is found to be an |
| 31 | + equivocation it fails validation. |
| 32 | +
|
| 33 | + If the block fails the requested level of a validation a 400 status MUST be returned |
| 34 | + immediately and the block MUST NOT be broadcast to the network. |
| 35 | +
|
| 36 | + If validation succeeds, the block must still be fully verified before it is |
| 37 | + incorporated into the state and a 20x status is returned to the caller. |
| 38 | + schema: |
| 39 | + $ref: '../../../beacon-node-oapi.yaml#/components/schemas/BroadcastValidation' |
| 40 | + - in: header |
| 41 | + schema: |
| 42 | + $ref: '../../../beacon-node-oapi.yaml#/components/schemas/ConsensusVersion' |
| 43 | + required: false |
| 44 | + name: Eth-Consensus-Version |
| 45 | + description: "Version of the block being submitted, if using SSZ encoding." |
| 46 | + requestBody: |
| 47 | + description: "The `SignedBlindedBeaconBlock` object composed of `BlindedBeaconBlock` object (produced by beacon node) and validator signature." |
| 48 | + required: true |
| 49 | + content: |
| 50 | + application/json: |
| 51 | + schema: |
| 52 | + oneOf: |
| 53 | + - $ref: '../../../beacon-node-oapi.yaml#/components/schemas/SignedBeaconBlock' |
| 54 | + - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Altair.SignedBeaconBlock" |
| 55 | + - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.SignedBlindedBeaconBlock" |
| 56 | + - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Capella.SignedBlindedBeaconBlock" |
| 57 | + - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Deneb.SignedBlindedBeaconBlock" |
| 58 | + application/octet-stream: |
| 59 | + schema: |
| 60 | + description: "SSZ serialized block bytes. Use content type header to indicate that SSZ data is contained in the request body." |
| 61 | + responses: |
| 62 | + "200": |
| 63 | + description: "The block was validated successfully and has been broadcast. It has also been integrated into the beacon node's database." |
| 64 | + "202": |
| 65 | + description: "The block failed validation, but was successfully broadcast anyway. It was not integrated into the beacon node's database." |
| 66 | + "400": |
| 67 | + description: "The `SignedBlindedBeaconBlock` object is invalid" |
| 68 | + content: |
| 69 | + application/json: |
| 70 | + schema: |
| 71 | + $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage" |
| 72 | + example: |
| 73 | + code: 400 |
| 74 | + message: "Invalid block: missing signature" |
| 75 | + "415": |
| 76 | + $ref: '../../../beacon-node-oapi.yaml#/components/responses/UnsupportedMediaType' |
| 77 | + "500": |
| 78 | + $ref: '../../../beacon-node-oapi.yaml#/components/responses/InternalError' |
| 79 | + "503": |
| 80 | + $ref: '../../../beacon-node-oapi.yaml#/components/responses/CurrentlySyncing' |
0 commit comments