Skip to content

Commit

Permalink
chore: chang mev log level
Browse files Browse the repository at this point in the history
  • Loading branch information
irrun committed Jun 5, 2024
1 parent f5ba30e commit c0e9691
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
14 changes: 7 additions & 7 deletions miner/bid_simulator.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ func (b *bidSimulator) newBidLoop() {
}

if time.Until(b.bidMustBefore(bidRuntime.bid.ParentHash)) <= simDuration*leftOverTimeRate/leftOverTimeScale {
log.Debug("BidSimulator: abort commit, not enough time to simulate",
log.Info("BidSimulator: abort commit, not enough time to simulate",
"builder", bidRuntime.bid.Builder, "bidHash", bidRuntime.bid.Hash().Hex())
return
}
Expand All @@ -335,7 +335,7 @@ func (b *bidSimulator) newBidLoop() {
interruptCh = make(chan int32, 1)
select {
case b.simBidCh <- &simBidReq{interruptCh: interruptCh, bid: bidRuntime}:
log.Debug("BidSimulator: commit", "builder", bidRuntime.bid.Builder, "bidHash", bidRuntime.bid.Hash().Hex())
log.Info("BidSimulator: commit", "builder", bidRuntime.bid.Builder, "bidHash", bidRuntime.bid.Hash().Hex())
case <-b.exitCh:
return
}
Expand All @@ -356,7 +356,7 @@ func (b *bidSimulator) newBidLoop() {

if expectedValidatorReward.Cmp(big.NewInt(0)) < 0 {
// damage self profit, ignore
log.Debug("BidSimulator: invalid bid, validator reward is less than 0, ignore",
log.Info("BidSimulator: invalid bid, validator reward is less than 0, ignore",
"builder", newBid.Builder, "bidHash", newBid.Hash().Hex())
continue
}
Expand Down Expand Up @@ -387,7 +387,7 @@ func (b *bidSimulator) newBidLoop() {
continue
}

log.Debug("BidSimulator: lower reward, ignore",
log.Info("BidSimulator: lower reward, ignore",
"builder", bidRuntime.bid.Builder, "bidHash", newBid.Hash().Hex())
continue
}
Expand All @@ -400,7 +400,7 @@ func (b *bidSimulator) newBidLoop() {
continue
}

log.Debug("BidSimulator: lower reward, ignore", "builder", newBid.Builder, "bidHash", newBid.Hash().Hex())
log.Info("BidSimulator: lower reward, ignore", "builder", newBid.Builder, "bidHash", newBid.Hash().Hex())
case <-b.exitCh:
return
}
Expand Down Expand Up @@ -565,7 +565,7 @@ func (b *bidSimulator) simBid(interruptCh chan int32, bidRuntime *BidRuntime) {

select {
case b.newBidCh <- bidRuntime.bid:
log.Debug("BidSimulator: recommit", "builder", bidRuntime.bid.Builder, "bidHash", bidRuntime.bid.Hash().Hex())
log.Info("BidSimulator: recommit", "builder", bidRuntime.bid.Builder, "bidHash", bidRuntime.bid.Hash().Hex())
default:
}
}
Expand Down Expand Up @@ -676,7 +676,7 @@ func (b *bidSimulator) simBid(interruptCh chan int32, bidRuntime *BidRuntime) {

select {
case b.newBidCh <- bestBid.bid:
log.Debug("BidSimulator: recommit last bid", "builder", bidRuntime.bid.Builder, "bidHash", bidRuntime.bid.Hash().Hex())
log.Info("BidSimulator: recommit last bid", "builder", bidRuntime.bid.Builder, "bidHash", bidRuntime.bid.Hash().Hex())
default:
}
}
Expand Down
6 changes: 3 additions & 3 deletions miner/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -1339,7 +1339,7 @@ LOOP:
bestBid := w.bidFetcher.GetBestBid(bestWork.header.ParentHash)

if bestBid != nil {
log.Debug("BidSimulator: final compare", "block", bestWork.header.Number.Uint64(),
log.Info("BidSimulator: final compare", "block", bestWork.header.Number.Uint64(),
"localBlockReward", bestReward.String(),
"bidBlockReward", bestBid.packedBlockReward.String())
}
Expand All @@ -1349,7 +1349,7 @@ LOOP:
localValidatorReward := new(uint256.Int).Mul(bestReward, uint256.NewInt(w.config.Mev.ValidatorCommission))
localValidatorReward.Div(localValidatorReward, uint256.NewInt(10000))

log.Debug("BidSimulator: final compare", "block", bestWork.header.Number.Uint64(),
log.Info("BidSimulator: final compare", "block", bestWork.header.Number.Uint64(),
"localValidatorReward", localValidatorReward.String(),
"bidValidatorReward", bestBid.packedValidatorReward.String())

Expand All @@ -1358,7 +1358,7 @@ LOOP:
bestWork = bestBid.env
from = bestBid.bid.Builder

log.Debug("BidSimulator: bid win", "block", bestWork.header.Number.Uint64(), "bid", bestBid.bid.Hash())
log.Info("BidSimulator: bid win", "block", bestWork.header.Number.Uint64(), "bid", bestBid.bid.Hash())
}
}
}
Expand Down

0 comments on commit c0e9691

Please sign in to comment.