Skip to content
New issue

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

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

Already on GitHub? # to your account

Review ipc-cli gas parameters #1175

Open
raulk opened this issue Oct 17, 2024 · 2 comments · May be fixed by #1182
Open

Review ipc-cli gas parameters #1175

raulk opened this issue Oct 17, 2024 · 2 comments · May be fixed by #1182
Assignees

Comments

@raulk
Copy link
Contributor

raulk commented Oct 17, 2024

Akave folks have pointed out that ipc-cli transactions against Filecoin mainnet (e.g. subnet creation, subnet join, fund) seem to remain queued for long. This could be due to us miscalculating gas parameters (concretely the gas fee cap or premium). Even though we calculate our values based on the data returned by the Eth RPC API, it's possible that our code is carrying Ethereum assumptions that work for Calibrationnet (due to it being mostly vacant), but not for Mainnet.

@raulk
Copy link
Contributor Author

raulk commented Oct 17, 2024

I would maybe start here:

pub(crate) async fn call_with_premium_estimation<B, D, M>(

And here:

fn base_fee_surged(base_fee_per_gas: U256) -> U256 {
if base_fee_per_gas <= U256::from(40_000_000_000u64) {
base_fee_per_gas * 2
} else if base_fee_per_gas <= U256::from(100_000_000_000u64) {
base_fee_per_gas * 16 / 10
} else if base_fee_per_gas <= U256::from(200_000_000_000u64) {
base_fee_per_gas * 14 / 10
} else {
base_fee_per_gas * 12 / 10
}
}

@karlem
Copy link
Contributor

karlem commented Oct 20, 2024

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
Status: Backlog
2 participants