Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Now supporting block builder submission with SSZ encoding #396

Closed
metachris opened this issue May 9, 2023 · 3 comments
Closed

Now supporting block builder submission with SSZ encoding #396

metachris opened this issue May 9, 2023 · 3 comments
Labels

Comments

@metachris
Copy link
Collaborator

metachris commented May 9, 2023

mev-boost-relay now supports block submissions in SSZ encoding (in addition to JSON). Also gzip is supported.

Implementation details:


Request details

https://flashbots.github.io/relay-specs/#/Builder/submitBlock

POST /relay/v1/builder/blocks

Payload: capella.SubmitBlockRequest

https://github.com/attestantio/go-builder-client/blob/master/api/capella/submitblockrequest.go

{
    "message": {
        "slot": "5552306",
        "parent_hash": "0xbd3291854dc822b7ec585925cda0e18f06af28fa2886e15f52d52dd4b6f94ed6",
        "block_hash": "0x1bafdc454116b605005364976b134d761dd736cb4788d25c835783b46daeb121",
        "builder_pubkey": "0xb67a5148a03229926e34b190af81a82a81c4df66831c98c03a139778418dd09a3b542ced0022620d19f35781ece6dc36",
        "proposer_pubkey": "0x8559727ee65c295279332198029c939557f4d2aba0751fc55f71d0733b8aa17cd0301232a7f21a895f81eacf55c97ec4",
        "proposer_fee_recipient": "0x5cc0dde14e7256340cc820415a6022a7d1c93a35",
        "gas_limit": "30000000",
        "gas_used": "25875661",
        "value": "71177763439091815"
    },
    "execution_payload": {
        "parent_hash": "0xbd3291854dc822b7ec585925cda0e18f06af28fa2886e15f52d52dd4b6f94ed6",
        "fee_recipient": "0xb64a30399f7f6b0c154c2e7af0a3ec7b0a5b131a",
        "state_root": "0x74f74d15dcb00ba194901136f2019dd6be2d4c88c822786df90561a550193899",
        "receipts_root": "0xb410fa34a1312626db3c41d325545e9f24e903d5dd9b9c260882aadb4c28fa8e",
        "logs_bloom": "0x40f7484521e2f4f8001ed9b0810595c450380844af610944218104d21c220028aa6a150a86312b000040401909e548e71c6a05128a58607200103fc400346f6e9843c2e20c72a00d7bd8138a249a83208697c0d03d7633c18248a58fe88284240a0e43e782c6b0c1167a00ac9808be499950e8500228776980266490f21c9040b30a30b4922c3a7af850ba08f2000146ea850401e978038e1205094215025016ae8811166961477d68522c826c9a0d20228c822de2ac830503b13936b5e01b9f9532ec2322c70c491c1a21618533c284299b189207cf0e37f2c7a1930c6667815fd238290926265cc28095a0a0240234af3810928a962ad0264a4905018a02a1",
        "prev_randao": "0x9962816e9d0a39fd4c80935338a741dc916d1545694e41eb5a505e1a3098f9e4",
        "block_number": "8935900",
        "gas_limit": "30000000",
        "gas_used": "25875661",
        "timestamp": "1683135672",
        "extra_data": "0x496c6c756d696e61746520446d6f63726174697a6520447374726962757465",
        "base_fee_per_gas": "19075240703",
        "block_hash": "0x1bafdc454116b605005364976b134d761dd736cb4788d25c835783b46daeb121",
        "transactions": ["0x..."],
        "withdrawals": [
            {
                "index": "4466251",
                "validator_index": "418388",
                "address": "0x59b0d71688da01057c08e4c1baa8faa629819c2a",
                "amount": "1927254"
            }
        ]
    },
    "signature": "0xa2def54237bfeb1d9269365e853b5469f68b7f4ad51ca7877e406ca94bc8a94bba54c14024b2f9ed37d8690bb9fac52600b7ff52b96b843cd8529e9ecc2497a0ecd5db8372e2049156e0fa9334d5c1b0ef642f192675b586ecbe6fc381178f88"
}

HTTP Headers

HTTP headers to use for the different encodings:

Encoding Content-Type Content-Encoding
JSON
JSON+GZIP gzip
SSZ application/octet-stream
SSZ+GZIP application/octet-stream gzip

Relay support

All these encodings are supported by https://boost-relay.flashbots.net.

Asking for other relays to comment here once support is rolled out and confirmed ⭐

@metachris metachris added the PSA label May 9, 2023
@michaelneuder
Copy link
Collaborator

confirmed it is available on ultra sound relay now

@MrKoberman
Copy link

confirmed it is available on securerpc relay now

@austonst
Copy link
Contributor

SSZ block submissions should now be enabled on Aestus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants