Skip to content

feat: enhance bid comparison and reply bidding results && detail logs#2538

Merged
irrun merged 14 commits intobnb-chain:developfrom
48Club:develop-2
Jul 11, 2024
Merged

feat: enhance bid comparison and reply bidding results && detail logs#2538
irrun merged 14 commits intobnb-chain:developfrom
48Club:develop-2

Conversation

@Jolly23
Copy link
Copy Markdown
Contributor

@Jolly23 Jolly23 commented Jun 25, 2024

Description

  • mev_sendBid replies current bestBid reward if it's discard due to low reward (but it still cost 1 submit chance for builder).
  • The thread safe transaction set is no need for GreedyMergeTx. The change will lift extensive locking mechanisms.
    Add builder bid arriving and comparing log into standard log output.
  • Simplified bidRuntime comparison by moving comparing function into bidRuntime.
  • add bid arrive/comparsion detail logs, helps validator records the builder bid operation, to better understand and get involve the BPS mechanisms.

irrun
irrun previously approved these changes Jun 25, 2024
@irrun
Copy link
Copy Markdown
Contributor

irrun commented Jun 25, 2024

could you please help to add a metric on bid_simulator Line547
metrics.GetOrRegisterCounter(fmt.Sprintf("bid/sim/count/%d", bidRuntime.bid.BlockNumber), nil).Inc(1)

irrun
irrun previously approved these changes Jun 25, 2024
Copy link
Copy Markdown
Contributor

@unclezoro unclezoro left a comment

Choose a reason for hiding this comment

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

hi, We will have hot fix release soon, as this PR is not a must to have feature, so we will hold this PR after the hot fix. It may take 2 weeks.

"validatorReward", weiToEtherStringF6(bidRuntime.expectedValidatorReward),
"tx", len(newBid.bid.Txs),
"hash", newBid.bid.Hash().TerminalString(),
)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It is suggested to send a nil error back to newBid.feedback if no error happen, so that sendBid can return ASAP

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

if no error happen, it's nil.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

check this note?

delay := b.engine.Delay(b.chain, bidRuntime.env.header, &b.delayLeftOver)
if delay != nil && *delay > 0 {
bidTxsSet := mapset.NewSet[common.Hash]()
bidTxsSet := mapset.NewThreadUnsafeSetWithSize[common.Hash](len(bidRuntime.bid.Txs))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

what is the motivation to change the hash set type?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

for no concurrent operation on bidTxsSet

irrun
irrun previously approved these changes Jul 10, 2024
@irrun irrun changed the title enhance bid comparison and reply if it's discarded && details bid logs feat: enhance bid comparison and reply if it's discarded && details bid logs Jul 10, 2024
@irrun irrun changed the title feat: enhance bid comparison and reply if it's discarded && details bid logs feat: enhance bid comparison and reply bidding results && detail logs Jul 10, 2024
@irrun irrun requested a review from unclezoro July 11, 2024 03:19
@irrun irrun removed the request for review from unclezoro July 11, 2024 03:27
@irrun irrun merged commit a04e287 into bnb-chain:develop Jul 11, 2024
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.

5 participants