Skip to content

Commit

Permalink
refine content and fix issues
Browse files Browse the repository at this point in the history
  • Loading branch information
forcodedancing committed Nov 23, 2023
1 parent 8c251c1 commit 4cbcd48
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions BEPs/BEP322.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,12 @@ After setup, during each block production interval, the overall workflow for pro
7) the proposer will notify the builder if something is wrong (e.g., timeout to retrieve transitions from the builder,
or the proposed block is invalid).

8) the proposer will seal a block using the transactions from the winning builder, if there is no profitable bid
8) the proposer will append a transaction to record builder fee to its builder smart contract. This step is optional.

9) the proposer will seal a block using the transactions from the winning builder. If there is no profitable bid
compared to local or the transactions do not return in time, the proposer can still seal a block using local
transactions.

9) the proposer will append a transaction to record builder fee to its builder smart contract. This step is optional.

![workflow](./assets/bep-322/workflow_2round.png)

In BSC, the time for producing a block is only 3 seconds. To reduce the latency, the following option is also supported
Expand Down Expand Up @@ -520,12 +520,11 @@ HTTP status code is 200
##### 3.4.2.2 Record Builder Fee

After accepting a bid, a validator needs to append one accounting transaction to
record builder fee to its builder smart contract. Then builders can claim
their fee from the smart contract.
book-keep builder fee to its builder smart contract.

```solidity
// for a validator to record builder fee
function record(uint256 blockHeight, address builderAddress, uint256 fee) external;
function bookkeep(uint256 blockHeight, address builderAddress, uint256 fee) external;
```

For `record` transaction,
Expand Down
Binary file modified BEPs/assets/bep-322/workflow_1round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified BEPs/assets/bep-322/workflow_2round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4cbcd48

Please sign in to comment.