forked from bnb-chain/bsc
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
builder: implement BEP322 builder-api (#7)
* feat: mev-builder * consesus: add a interface to set validator at runtime * core/txpool: add bundlepool to maintain bundle txs * core/type: define bundle * internal/ethapi: add sendBundle, bundlePrice, unregis * ethclient: add SendBundle * miner: add fillTransacitonsAndBundles, add Bidder to sendBid to validators * add README.builder.md --------- Co-authored-by: raina <[email protected]>
- Loading branch information
1 parent
79cd522
commit 7bcc6e3
Showing
27 changed files
with
1,861 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
[bsc readme](README.original.md) | ||
|
||
# BSC Builder | ||
|
||
This project implements the BEP-322: Builder API Specification for BNB Smart Chain. | ||
|
||
This project represents a minimal implementation of the protocol and is provided as is. We make no guarantees regarding its functionality or security. | ||
|
||
See also: https://github.com/bnb-chain/BEPs/pull/322 | ||
|
||
# Usage | ||
|
||
Builder-related settings are configured in the `config.toml` file. The following is an example of a `config.toml` file: | ||
|
||
``` | ||
[Eth.Miner.Mev] | ||
Enabled = false | ||
ValidatorCommission = 100 | ||
BidSimulationLeftOver = 50 | ||
BuilderEnabled = true | ||
BuilderAccount = {{BUILDER_ADDRESS}} | ||
[[Eth.Miner.Mev.Validators]] | ||
Address = {{VALIDATOR_ADDRESS}} | ||
URL = {{VALIDATOR_URL}} | ||
... | ||
``` | ||
|
||
- `Enabled`: Whether to enable validator mev. | ||
- `BuilderEnabled`: Whether to enable the builder mev. | ||
- `BuilderAccount`: The account address to unlock of the builder. | ||
- `BidSimulationLeftOver`: The left over of the bid simulation. | ||
- `Validators`: A list of validators to bid for. | ||
- `Address`: The address of the validator. | ||
- `URL`: The URL of the validator. | ||
|
||
## License | ||
|
||
The bsc library (i.e. all code outside of the `cmd` directory) is licensed under the | ||
[GNU Lesser General Public License v3.0](https://www.gnu.org/licenses/lgpl-3.0.en.html), | ||
also included in our repository in the `COPYING.LESSER` file. | ||
|
||
The bsc binaries (i.e. all code inside of the `cmd` directory) is licensed under the | ||
[GNU General Public License v3.0](https://www.gnu.org/licenses/gpl-3.0.en.html), also | ||
included in our repository in the `COPYING` file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.