Add flag to boost local block value (#12227)

* Add builder bid fraction to compare with local block value and use builder bid if (bid * fraction) > local block value

* Prioritize local block construction over relay/builder block construction using a boost value for local block construction

* Refactor builder and local block value calculation to use percentage comparison

* Add a test for local with boost

* Use uint64

* Fix log
This commit is contained in:
terencechain
2023-04-04 07:58:56 -07:00
committed by GitHub
parent 2618a114e5
commit 35e3eeddf9
5 changed files with 54 additions and 9 deletions

View File

@@ -27,6 +27,11 @@ var (
Usage: "Number of total skip slot to fallback from using relay/builder to local execution engine for block construction in last epoch rolling window",
Value: 8,
}
LocalBlockValueBoost = &cli.Float64Flag{
Name: "local-block-value-boost",
Usage: "A percentage boost for local block construction. This is used to prioritize local block construction over relay/builder block construction" +
"Boost is an additional percentage to multiple local block value. Use builder block if: builder_bid_value * 100 > local_block_value * (local-block-value-boost + 100)",
}
// ExecutionEngineEndpoint provides an HTTP access endpoint to connect to an execution client on the execution layer
ExecutionEngineEndpoint = &cli.StringFlag{
Name: "execution-endpoint",