Skip to content

Proper replacements#401

Merged
ZanCorDX merged 10 commits intodevelopfrom
proper-replacements
Feb 5, 2025
Merged

Proper replacements#401
ZanCorDX merged 10 commits intodevelopfrom
proper-replacements

Conversation

@ZanCorDX
Copy link
Collaborator

@ZanCorDX ZanCorDX commented Feb 4, 2025

📝 Summary

  • Parallel sealer killed (config parameter max_concurrent_seals gone)
  • Removed every check for increasing TBV
  • Removed every check for increasing competition bid
  • Added a UnfinishedBlockBuildingSinkMuxer at the output of the BlockBuildingAlgorithms to choose the best block among the last block from each algo
  • Added cancellations in relay submiton (/relay/v1/builder/blocks?cancellations=1)

💡 Motivation and Context

Good order replacement is critical!

✅ I have completed the following steps:

  • Run make lint
  • Run make test
  • Added tests (if applicable)

@dvush
Copy link
Contributor

dvush commented Feb 4, 2025

@ZanCorDX I don't know if relay respect it but we need to submit with a url param to enable this https://github.com/flashbots/geth-builder-old-unused/blob/b6a6dd336988d3f866a6c611a6505885966ba189/builder/relay.go#L142

@github-actions
Copy link

github-actions bot commented Feb 4, 2025

Benchmark results for 4cf7956

Report: https://flashbots-rbuilder-ci-stats.s3.us-east-2.amazonaws.com/benchmark/4cf7956-feafa9e/report/index.html

Date (UTC) 2025-02-04T22:50:25+00:00
Commit 4cf7956fd36a6b87831fefaf79e3788f9f437f24
Base SHA feafa9efd9988ee039d71cdfd8cb60de555d6f47

Significant changes

Benchmark Mean Status
gather_nodes_clone -14.91% Performance has improved.
MEV-Boost SubmitBlock serialization/JSON encoding 57.96% Performance has degraded.

@ZanCorDX
Copy link
Collaborator Author

ZanCorDX commented Feb 4, 2025

@ZanCorDX I don't know if relay respect it but we need to submit with a url param to enable this https://github.com/flashbots/geth-builder-old-unused/blob/b6a6dd336988d3f866a6c611a6505885966ba189/builder/relay.go#L142

The code will never cancel, it replaces. From what I read on the relay spec (https://flashbots.github.io/relay-specs/#/Builder/submitBlock) it should work:

Any new submission by a builder will overwrite a previous one by the same builder_pubkey, even if it is less profitable.

};

let mut last_bid_value = U256::from(0);
let mut last_bid_hash = None;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit, to make code simpler and remove this option you can set it to B256::ZERO

@dvush
Copy link
Contributor

dvush commented Feb 4, 2025

also, would it make sense to have this as a feature flag? I am not against this but there may be a problem if it does not work for some reason and we would need to quickly update builder net binary instead of config

@ZanCorDX
Copy link
Collaborator Author

ZanCorDX commented Feb 4, 2025

also, would it make sense to have this as a feature flag? I am not against this but there may be a problem if it does not work for some reason and we would need to quickly update builder net binary instead of config
Mmmm... that would take me a while. Maybe for the future?

@ZanCorDX
Copy link
Collaborator Author

ZanCorDX commented Feb 4, 2025

Changed it to use a hash from tx hashs to avoid coping stuff.

@ZanCorDX ZanCorDX requested a review from dvush February 4, 2025 19:15
@ZanCorDX ZanCorDX requested a review from dvush February 5, 2025 15:19
@ZanCorDX ZanCorDX merged commit eb2784e into develop Feb 5, 2025
5 checks passed
@ZanCorDX ZanCorDX deleted the proper-replacements branch February 5, 2025 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants