-
Notifications
You must be signed in to change notification settings - Fork 108
chore: merge builder code #354
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
Conversation
## 📝 Summary Cleanup PR to remove unused variables. ## 💡 Motivation and Context <!--- (Optional) Why is this change required? What problem does it solve? Remove this section if not applicable. --> --- ## ✅ I have completed the following steps: * [ ] Run `make lint` * [ ] Run `make test` * [ ] Added tests (if applicable)
## 📝 Summary Lovely reth changes. ## 💡 Motivation and Context Pectra ## ✅ I have completed the following steps: * [X] Run `make lint` * [X] Run `make test` * [ ] Added tests (if applicable) --------- Co-authored-by: Ferran Borreguero <[email protected]> Co-authored-by: shana <[email protected]> Co-authored-by: Solar Mithril <[email protected]> Co-authored-by: Vitaly Drogan <[email protected]>
## 📝 Summary <!--- A general summary of your changes --> ## 💡 Motivation and Context <!--- (Optional) Why is this change required? What problem does it solve? Remove this section if not applicable. --> --- ## ✅ I have completed the following steps: * [x] Run `make lint` * [x] Run `make test` * [x] Added tests (if applicable)
## 📝 Summary This PR changes uses the incremental format for Flashblocks and adds support for it on tester. Generate a genesis file: ``` $ cargo run -p op-rbuilder --bin tester --features optimism -- genesis --output genesis.json ``` Run op-rbuilder with flashblocks ``` $ cargo run -p op-rbuilder --bin op-rbuilder --features optimism,flashblocks node --authrpc.port 4444 --authrpc.jwtsecret ./crates/op-rbuilder/src/tester/fixtures/test-jwt-secret.txt --chain ./genesis.json --datadir /tmp/builder2 --disable-discovery --http --http.port 8545 ``` Run the tester with flashblocks enabled: ``` $ cargo run -p op-rbuilder --bin tester --features optimism -- run --flashblocks-endpoint ws://localhost:1111 ``` Now, there are two streams available, one from the builder (websocat ws://localhost:1111) and another one from the tester which mimicks the Rollup-boost preconfirmations (websocat ws://localhost:1112). ## 💡 Motivation and Context <!--- (Optional) Why is this change required? What problem does it solve? Remove this section if not applicable. --> --- ## ✅ I have completed the following steps: * [ ] Run `make lint` * [ ] Run `make test` * [ ] Added tests (if applicable) --------- Co-authored-by: Daniel Xifra <[email protected]>
## 📝 Summary Marks reverting transactions as invalid in the payload building process and removed dependents. Also removes reverting hashes from the tx pool. This would result in transactions that revert not be considered for future blocks once it's simulated once. ## 💡 Motivation and Context Remove the need to resimulate reverting transactions for revert protection. --- ## ✅ I have completed the following steps: * [x] Run `make lint` * [x] Run `make test` * [x] Added tests (if applicable)
## 📝 Summary Deposit command was not funding the address correctly ## 💡 Motivation and Context Tested deposits in integration tests --- ## ✅ I have completed the following steps: * [x] Run `make lint` * [x] Run `make test` * [x] Added tests (if applicable)
## 📝 Summary Add integration test to op-rbuilder that asserts that the block is built with priority fee ordering ## 💡 Motivation and Context <!--- (Optional) Why is this change required? What problem does it solve? Remove this section if not applicable. --> --- ## ✅ I have completed the following steps: * [x] Run `make lint` * [x] Run `make test` * [x] Added tests (if applicable)
## 📝 Summary Making flashblock websocket as flag so that it can be customizable. Also added receipts, account balance, block number into the metadata field, such that the RPC node can build the RPC response for `eth_transactionReceipt` and `eth_getBalance` for pending blocks. (#4) Added an integration test to test that the metadata field indeed has the new data. ## ✅ I have completed the following steps: * [x] Run `make lint` * [x] Run `make test` * [x] Added tests (if applicable)
## 📝 Summary Currently the block time is hard coded to assume the chain block time is 1s and flashblock time is 250ms. But for Base the chain block time is 2s. Thus fixing this by adding args to make it dynamic. <!--- (Optional) Why is this change required? What problem does it solve? Remove this section if not applicable. --> --- ## ✅ I have completed the following steps: * [x] Run `make lint` * [x] Run `make test` * [x] Added tests (if applicable)
## 📝 Summary The index for getting the receipt is incorrect as it's using an updated index, fix it. Added an additional assertion in integration test to test this. <!--- A general summary of your changes --> ## 💡 Motivation and Context <!--- (Optional) Why is this change required? What problem does it solve? Remove this section if not applicable. --> --- ## ✅ I have completed the following steps: * [ ] Run `make lint` * [ ] Run `make test` * [ ] Added tests (if applicable)
## 📝 Summary Moved ExecutionInfo and ExecutingPayload into primitives, combining them Now we could implement revert protection for Flashblocks too ## 💡 Motivation and Context <!--- (Optional) Why is this change required? What problem does it solve? Remove this section if not applicable. --> --- ## ✅ I have completed the following steps: * [ ] Run `make lint` * [ ] Run `make test` * [ ] Added tests (if applicable)
## 📝 Summary <!--- A general summary of your changes --> ## 💡 Motivation and Context <!--- (Optional) Why is this change required? What problem does it solve? Remove this section if not applicable. --> --- ## ✅ I have completed the following steps: * [ ] Run `make lint` * [ ] Run `make test` * [ ] Added tests (if applicable)
## 📝 Summary This PR introduces a monitoring service that prints all the transactions that arrive to the transaction pool in op-rbuilder. ## 💡 Motivation and Context <!--- (Optional) Why is this change required? What problem does it solve? Remove this section if not applicable. --> --- ## ✅ I have completed the following steps: * [ ] Run `make lint` * [ ] Run `make test` * [ ] Added tests (if applicable)
Implement SupervisorValidator to be used in rbuilder Add additional primitives crate, that is used for storing external ## 📝 Summary <!--- A general summary of your changes --> ## 💡 Motivation and Context <!--- (Optional) Why is this change required? What problem does it solve? Remove this section if not applicable. --> --- ## ✅ I have completed the following steps: * [x] Run `make lint` * [x] Run `make test` * [x] Added tests (if applicable)
Corrected grammar: "transactions events" → "transaction events" for proper noun-adjective agreement. Preposition correction: "on" → "at" for referring to a website link properly. Corrected article usage: "any" → "a" for clarity.
## 📝 Summary <!--- A general summary of your changes --> Bump deps to reth `v1.3.3` ## ✅ I have completed the following steps: * [x] Run `make lint` * [x] Run `make test` * [ ] Added tests (if applicable) --------- Co-authored-by: Daniel Xifra <[email protected]>
## 📝 Summary I will remove previous interop version in favor of newly written reth implementation. After this PR i'll make a follow-up PR with dependency bump and additional logic for tx filtering. ## 💡 Motivation and Context <!--- (Optional) Why is this change required? What problem does it solve? Remove this section if not applicable. --> --- ## ✅ I have completed the following steps: * [ ] Run `make lint` * [ ] Run `make test` * [ ] Added tests (if applicable)
## 📝 Summary When batcher's max channel duration is big enough (e.g. 10m), the batcher would be pushing its updates at specified intervals. This causes the sequencer to send an avalanche of FCUs (and getBlockByNumber) that push safe head step-by-step. As a consequence it can happen that the time b/w FCU and ensuing getPayload would be on the scale of ~2.5s. This means that we should "remember" the payloads long enough to accommodate that corner-case. --- ## ✅ I have completed the following steps: * [ ] Run `make lint` * [ ] Run `make test` * [ ] Added tests (if applicable)
## 📝 Summary Fix deposit and flashblocks integration tests. Resolves flashbots/rbuilder#533 and flashbots/rbuilder#521 ## ✅ I have completed the following steps: * [x] Run `make lint` * [x] Run `make test` * [x] Added tests (if applicable)
Enhanced the OpRBuilderMetrics struct to include new metrics for tracking flashblocks, messages sent, and invalid blocks. Updated the OpPayloadBuilder to utilize these metrics during block building and transaction simulation processes. - Added `flashblock_count`, `messages_sent_count`, and `invalid_blocks_count` to OpRBuilderMetrics. - Integrated metrics tracking in OpPayloadBuilder for message sending, block building success, and transaction simulation. - Recorded durations for various operations to improve performance monitoring. ## 📝 Summary <!--- A general summary of your changes --> ## 💡 Motivation and Context <!--- (Optional) Why is this change required? What problem does it solve? Remove this section if not applicable. --> --- ## ✅ I have completed the following steps: * [ ] Run `make lint` * [ ] Run `make test` * [ ] Added tests (if applicable)
## 📝 Summary Bumps reth dependencies to `1.3.8`. ## ✅ I have completed the following steps: * [x] Run `make lint` * [x] Run `make test` * [ ] Added tests (if applicable)
## 📝 Summary Adding reth 1.3.11 for the upcoming op chain sepolia Isthmus hardfork for op-rbuilder flashblock builder Also fixing request hash for Isthmus validity rules https://specs.optimism.io/protocol/isthmus/exec-engine.html#header-validity-rules. Tested deploying on Base devnet, it's able to sync again ## 💡 Motivation and Context <!--- (Optional) Why is this change required? What problem does it solve? Remove this section if not applicable. --> --- ## ✅ I have completed the following steps: * [ ] Run `make lint` * [ ] Run `make test` * [ ] Added tests (if applicable)
## 📝 Summary Update the op-rbuilder devnet documentation: * Update it to use the builder-playground * Various fixes (e.g. remove optimism feature, use fully qualified docker image so it pulls automatically) ## ✅ I have completed the following steps: * [x] Run `make lint` * [x] Run `make test` * [x] Added tests (if applicable)
## 📝 Summary <!--- A general summary of your changes --> ## 💡 Motivation and Context <!--- (Optional) Why is this change required? What problem does it solve? Remove this section if not applicable. --> --- ## ✅ I have completed the following steps: * [ ] Run `make lint` * [ ] Run `make test` * [ ] Added tests (if applicable)
## 📝 Summary Add isthmus withdrawal hash fix on the vanilla builder. Previously was added to the flashblocks builder. ## 💡 Motivation and Context Fix errors around invalid blocks due to incorrect withdrawals hash --- ## ✅ I have completed the following steps: * [x] Run `make lint` * [x] Run `make test` * [x] Added tests (if applicable)
## 📝 Summary Fixes unbounded mem growth in monitoring task ## 💡 Motivation and Context <!--- (Optional) Why is this change required? What problem does it solve? Remove this section if not applicable. --> --- ## ✅ I have completed the following steps: * [ ] Run `make lint` * [ ] Run `make test` * [ ] Added tests (if applicable)
## 📝 Summary Currently it's possible for the builder to make more Flashblocks than intended during a block (likely due to delays). If more flashblocks are made than desired (e.g. 11 flashblocks for a 2s block w/ 200ms Flashblocks), the 11th flashblock will have a gas limit that is over the blocks gas limit and will cause invalid blocks on the sequencer. ## 💡 Motivation and Context If the builder produces a full block that uses more gas than the gas limit, the local EL client will treat it as invalid. --- ## ✅ I have completed the following steps: * [ ] Run `make lint` * [x] Run `make test` * [x] Added tests (if applicable)
## 📝 Summary 1. Update the version of op-reth used by CI 2. Make the CI script work on macOS as well as linux 3. Update the instructions for running/testing op-rbuilder ## 💡 Motivation and Context 1. The CI script was handy for downloading Reth 2. The instructions didn't work for me (due to the optimism feature being removed etc). --- ## ✅ I have completed the following steps: * [x] Run `make lint` * [x] Run `make test` * [x] Added tests (if applicable) --------- Co-authored-by: shana <[email protected]>
## 📝 Summary
The builder block building times always slowly increase to a very high
number on Base Sepolia, suspecting revert protection is causing failed
txs to get backed up, which causes slow down in op-rbuilder block
building.
```
# HELP reth_op_rbuilder_payload_num_tx_simulated_fail Number of transactions in the payload that failed simulation
# TYPE reth_op_rbuilder_payload_num_tx_simulated_fail summary
reth_op_rbuilder_payload_num_tx_simulated_fail{quantile="0"} 77
reth_op_rbuilder_payload_num_tx_simulated_fail{quantile="0.5"} 3198.061173550786
reth_op_rbuilder_payload_num_tx_simulated_fail{quantile="0.9"} 3223.1035892442424
reth_op_rbuilder_payload_num_tx_simulated_fail{quantile="0.95"} 3223.748274430612
reth_op_rbuilder_payload_num_tx_simulated_fail{quantile="0.99"} 3226.973635127358
reth_op_rbuilder_payload_num_tx_simulated_fail{quantile="0.999"} 3226.973635127358
reth_op_rbuilder_payload_num_tx_simulated_fail{quantile="1"} 3228
reth_op_rbuilder_payload_num_tx_simulated_fail_sum 64118848
reth_op_rbuilder_payload_num_tx_simulated_fail_count 21069
# HELP reth_op_rbuilder_payload_tx_simulation_duration Duration of payload simulation of all transactions
# TYPE reth_op_rbuilder_payload_tx_simulation_duration summary
reth_op_rbuilder_payload_tx_simulation_duration{quantile="0"} 0.018329514
reth_op_rbuilder_payload_tx_simulation_duration{quantile="0.5"} 0.49002444205448686
reth_op_rbuilder_payload_tx_simulation_duration{quantile="0.9"} 0.5026304818952316
reth_op_rbuilder_payload_tx_simulation_duration{quantile="0.95"} 0.5079867028401951
reth_op_rbuilder_payload_tx_simulation_duration{quantile="0.99"} 0.553164415015488
reth_op_rbuilder_payload_tx_simulation_duration{quantile="0.999"} 0.553164415015488
reth_op_rbuilder_payload_tx_simulation_duration{quantile="1"} 0.555461782
reth_op_rbuilder_payload_tx_simulation_duration_sum 9654.159540928
reth_op_rbuilder_payload_tx_simulation_duration_count 25870
# HELP reth_op_rbuilder_flashblock_build_duration Flashblock build duration
# TYPE reth_op_rbuilder_flashblock_build_duration summary
reth_op_rbuilder_flashblock_build_duration{quantile="0"} 0.055144161
reth_op_rbuilder_flashblock_build_duration{quantile="0.5"} 0.5166962986266059
reth_op_rbuilder_flashblock_build_duration{quantile="0.9"} 0.5348868728374531
reth_op_rbuilder_flashblock_build_duration{quantile="0.95"} 0.5672812838109652
reth_op_rbuilder_flashblock_build_duration{quantile="0.99"} 0.583272957920482
reth_op_rbuilder_flashblock_build_duration{quantile="0.999"} 0.583272957920482
reth_op_rbuilder_flashblock_build_duration{quantile="1"} 0.60984729
reth_op_rbuilder_flashblock_build_duration_sum 9081.926654393968
reth_op_rbuilder_flashblock_build_duration_count 21065
# HELP reth_op_rbuilder_payload_num_tx_simulated_success Number of transactions in the payload that were successfully simulated
# TYPE reth_op_rbuilder_payload_num_tx_simulated_success summary
reth_op_rbuilder_payload_num_tx_simulated_success{quantile="0"} 1
reth_op_rbuilder_payload_num_tx_simulated_success{quantile="0.5"} 11.000052032263987
reth_op_rbuilder_payload_num_tx_simulated_success{quantile="0.9"} 20.999528921206892
reth_op_rbuilder_payload_num_tx_simulated_success{quantile="0.95"} 24.001108231483542
reth_op_rbuilder_payload_num_tx_simulated_success{quantile="0.99"} 29.00012111115082
reth_op_rbuilder_payload_num_tx_simulated_success{quantile="0.999"} 29.00012111115082
reth_op_rbuilder_payload_num_tx_simulated_success{quantile="1"} 60
reth_op_rbuilder_payload_num_tx_simulated_success_sum 136029
reth_op_rbuilder_payload_num_tx_simulated_success_count 21069
```
<!--- A general summary of your changes -->
## 💡 Motivation and Context
<!--- (Optional) Why is this change required? What problem does it
solve? Remove this section if not applicable. -->
---
## ✅ I have completed the following steps:
* [ ] Run `make lint`
* [ ] Run `make test`
* [ ] Added tests (if applicable)
## 📝 Summary This PR introduces three changes: - It refactors some of the common utilities shared among the tests into a single `TestHarness` struct which spins the test framework with all the components. Note that it does not update the tests to use this new utility. - It fixes an issue with the block builder that would stop the block building process and not return any block if a cancel request was found. This happens when an FCU and a getPayload request are called to close to each other, the getPayload cancels the block building process, and getPayload waits forever for a block that will never be built. Now, the block building finishes. - It adds an integration test to cover this use case with the new utility. ## 💡 Motivation and Context <!--- (Optional) Why is this change required? What problem does it solve? Remove this section if not applicable. --> --- ## ✅ I have completed the following steps: * [ ] Run `make lint` * [ ] Run `make test` * [ ] Added tests (if applicable)
Move config extraction directly into extension constructor calls to reduce intermediate variables in main.rs.
Migrates the following crates from op-rbuilder repository: - op-rbuilder: Main builder application - p2p: P2P networking layer - tdx-quote-provider: TDX attestation service All crates are placed under crates/builder/ with full git history preserved.
The tss-esapi-sys crate requires libtss2-dev to build, which was missing from the udeps job causing CI failures.
09cc540 to
8391c04
Compare
✅ Heimdall Review Status
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, looks good. I can take care of the follow up PRs here as I'm going to be working on the builder now anyway
|
|
||
| # base | ||
| concurrent-queue = "2.5.0" | ||
| tips-core = { git = "https://github.com/base/tips", rev = "c08eaa4fe10c26de8911609b41ddab4918698325", default-features = false } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
non-blocking; we should be able to use base-bundles instead of tips-core. Can be done in a follow-up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do in a follow up 👍
Description
Merge the latest op-rbuilder code into this repo base/op-rbuilder@23f42c8
This PR:
Follow ups
In a couple of follow up PR's, we should:
bin/