Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(taiko-client): proposer profitability check #18548

Closed

Conversation

mskrzypkows
Copy link
Collaborator

No description provided.

@mskrzypkows mskrzypkows changed the title Proposer profitability check feat(taiko-client): Proposer profitability check Dec 5, 2024
@mskrzypkows mskrzypkows changed the title feat(taiko-client): Proposer profitability check feat(taiko-client): proposer profitability check Dec 5, 2024
@dantaik dantaik requested a review from davidtaikocha December 7, 2024 00:30
@dantaik dantaik requested a review from YoGhurt111 December 18, 2024 01:56
return totalGasConsumed, nil
}

func get75PercentOf(num *big.Int) *big.Int {
Copy link
Contributor

Choose a reason for hiding this comment

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

The 75 percent of base fee sharing is the config in contract, let's use the chain config instead of a constant value.

return nil, fmt.Errorf("getTransactionCost: failed to get gas price: %w", err)
}

estimatedGasUsage, err := p.rpc.L1.EstimateGas(p.ctx, ethereum.CallMsg{
Copy link
Contributor

Choose a reason for hiding this comment

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

@davidtaikocha I remembered that EstimateGas for blob tx is not very accurate. Did I misremember?

@YoGhurt111
Copy link
Contributor

Let me fix lint later.

@@ -458,12 +453,23 @@ func (p *Proposer) ProposeTxListOntake(
return errors.New("insufficient prover balance")
}

txCandidate, err := p.txBuilder.BuildOntake(ctx, txListsBytesArray)
txCandidate, cost, err := p.buildCheaperOnTakeTransaction(ctx, txListsBytesArray)
Copy link
Contributor

Choose a reason for hiding this comment

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

I saw it was always get cheaper txCandidate from buildCheaperOnTakeTransaction.
How about making this feature optional?

@davidtaikocha
Copy link
Member

After an internal discussion, we decided to only impl the calldata / blob switch part at first: #18690 , anyway thanks for the contribution :)

@mskrzypkows
Copy link
Collaborator Author

OK, so will it be needed in the future, or don't you want this kind of profitability check?

@davidtaikocha
Copy link
Member

OK, so will it be needed in the future, or don't you want this kind of profitability check?

Our official proposer is mainly used as a fallback proposer role, so even when sometimes its unprofitable when proposing, our proposer will still keep proposing to make the chain "alive", so atm i think we won't impl this in this codebase, but i guess some proposers should have impled this in their private repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants