If so, please tell us more here:
Yes I am interested. I find playing with Ethereum ecosystem very exciting. What software I need to build my own builder ? I see lots of documentation around but I am more of a install the SW , roll up the sleeves and learn.
Hello @vishal. See here: GitHub - flashbots/boost-geth-builder: Example builder
You can ask your questions, if any, in that thread.
In addition to our Goerli relay, we’ve now also opened block submissions on our Sepolia relay (where our relay delivers about 1 in 5 blocks).
Sepolia relay block submission endpoints:
getValidators: https://builder-relay-sepolia.flashbots.net/relay/v1/builder/validators (GET) - array of proposer preferences for registered validators with assigned duties in the current and next epoch
submitBlock: https://builder-relay-sepolia.flashbots.net/relay/v1/builder/blocks (POST)
Goerli relay block submission endpoints:
getValidators: https://builder-relay-goerli.flashbots.net/relay/v1/builder/validators (GET) - array of proposer preferences for registered validators with assigned duties in the current and next epoch
submitBlock: https://builder-relay-goerli.flashbots.net/relay/v1/builder/blocks (POST)
Note: Submissions are currently rate-limited to 60 requests / minute / IP address.
Btw, the Flashbots mainnet relay will also allow external builder submissions from the get-go (the merge), in the same way as our testnet relays.
Mainnet relay block submission endpoints:
getValidators: https://boost-relay.flashbots.net/relay/v1/builder/validators (GET) - array of proposer preferences for registered validators with assigned duties in the current and next epoch
submitBlock: https://boost-relay.flashbots.net/relay/v1/builder/blocks (POST)
Are you triggering the block production? You will need to run the custom Prysm fork from GitHub - flashbots/prysm: Our custom Prysm fork for boost relay and builder CL. Sends payload attributes for block building on every slot to trigger building.
I ran the flashbot prysm program, but it still did not appear in the build block
This is my start command
I am toying around with a builder at the moment. I like to have my blocks / bundles saved into a DB for analyzing the behaviour a bit better than just with the logs…
I can see in the docs that this is supposed to be possible with the builder by using flashbotsextra.IDatabaseService.
however I am not sure what kind of a database am I supposed to deploy and how to configure builder-geth to use it?
any pointers here please?
You need a Postgres database, and configure the DSN via the
FLASHBOTS_POSTGRES_DSN environment variable:
- builder/service.go at 586fbec873e3ec9952f8aa185fa5942b4346efde · flashbots/builder · GitHub
- builder/database.go at main · flashbots/builder · GitHub
You can spin up such a database with Docker like this:
docker run -d -p 5432:5432 -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=postgres postgres
then you’d set the environment variable like this:
Thanks a bunch! this is really helpful. I would assume that I`ll have to create the db schema manually? cheers
Oh yeah, seems that the schema is not yet in there.
Definitely! Will have to clean up my script first as I am not super experienced with postgres. (understatement)
Btw how exactly will these two tables be populated? Do I need to enable local relay for saving the built blocks? Which process is responsible for saving the incoming bundles into postgres? cheers
Tried to run the builder with Postgres and failed.
here is my table creation SQL: -- based on https://collective.flashbots.net/t/do-you-want-to-run-a-builder/212/ - Pastebin.com
after start the PG instance and create the tables, running the builder will result in error log:
pq: operator does not exist: character varying * numeric
seems the error is caused by this SQL in flashbotsextra/database.go:
fetchPrioBundlesStmt, err := db.PrepareNamed(“select bundle_hash, param_signed_txs, param_block_number, param_timestamp, received_timestamp, param_reverting_tx_hashes, coinbase_diff, total_gas_used, state_block_number, gas_fees, eth_sent_to_coinbase from bundles where is_high_prio = :is_high_prio and coinbase_diff*1e18/total_gas_used > 1000000000 and param_block_number = :param_block_number order by coinbase_diff/total_gas_used DESC limit :limit”)
coinbase_diff*1e18/total_gas_used is trying to multiply the
coinbase_diff column, which is of type
VARCHAR , with a numeric constant (1e18) and then divide by the
total_gas_used column, which is of type
BIGINT , hence the error.
coinbase_diff has to be varchar according to the go struct defined in flashbotsextra/database_types.go
It seems that the only way to correct this issue is by updating the SQL code for
fetchPrioBundlesStmt. This makes me wonder if anyone has ever successfully run the code using a PostgresDB, or if I’m doing something wrong here that I’m not aware of?