-
Notifications
You must be signed in to change notification settings - Fork 189
fix: Fix the GasEstimateMessageGas API
#6109
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
Merged
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
947e657
fix gas estimate message gas issue
akaladarshi f7e232e
add unit tests
akaladarshi ab7f29f
fix message tipset issue
akaladarshi e4c32ea
add snapshot tests for the estimate message gas API
akaladarshi 1f87632
Merge branch 'main' into akaladarshi/fix-estimate-msg-gas
akaladarshi 5ce5eaf
update the failing gas related snapshot and fix message response
akaladarshi 8e73d66
Merge branch 'main' into akaladarshi/fix-estimate-msg-gas
akaladarshi d5a8754
Merge branch 'main' into akaladarshi/fix-estimate-msg-gas
akaladarshi fa8af08
Merge branch 'main' into akaladarshi/fix-estimate-msg-gas
akaladarshi 1615714
small refactor
akaladarshi 48c2ea8
Merge branch 'main' into akaladarshi/fix-estimate-msg-gas
akaladarshi 33be1a5
Merge branch 'main' into akaladarshi/fix-estimate-msg-gas
akaladarshi 7f3452b
Merge branch 'main' into akaladarshi/fix-estimate-msg-gas
akaladarshi 291e4fe
fix linter issue
akaladarshi 06ff3fe
address comments
akaladarshi ea881dc
Merge branch 'main' into akaladarshi/fix-estimate-msg-gas
akaladarshi dbb91d0
refactor as per the comments
akaladarshi ec9c48e
add check for gas limit in cap gas fee
akaladarshi c9e4246
fix linter issue and test error
akaladarshi 9d9f59b
address comment
akaladarshi e06aa75
address comment
akaladarshi eade8f6
fix linter issue
akaladarshi c42c5ec
address final comments
akaladarshi e2a5ad3
Merge branch 'main' into akaladarshi/fix-estimate-msg-gas
akaladarshi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -1,16 +1,16 @@ | ||||||||
| // Copyright 2019-2025 ChainSafe Systems | ||||||||
| // SPDX-License-Identifier: Apache-2.0, MIT | ||||||||
|
|
||||||||
| use super::client::Client; | ||||||||
| use crate::db::db_engine::DbConfig; | ||||||||
| use crate::libp2p::Libp2pConfig; | ||||||||
| use crate::shim::clock::ChainEpoch; | ||||||||
| use crate::shim::econ::TokenAmount; | ||||||||
| use crate::utils::misc::env::is_env_set_and_truthy; | ||||||||
| use crate::{chain_sync::SyncConfig, networks::NetworkChain}; | ||||||||
| use serde::{Deserialize, Serialize}; | ||||||||
| use std::path::PathBuf; | ||||||||
|
|
||||||||
| use super::client::Client; | ||||||||
|
|
||||||||
| const FOREST_CHAIN_INDEXER_ENABLED: &str = "FOREST_CHAIN_INDEXER_ENABLED"; | ||||||||
|
|
||||||||
| /// Structure that defines daemon configuration when process is detached | ||||||||
|
|
@@ -92,6 +92,23 @@ impl Default for ChainIndexerConfig { | |||||||
| } | ||||||||
| } | ||||||||
|
|
||||||||
| #[derive(Deserialize, Serialize, PartialEq, Eq, Debug, Clone)] | ||||||||
| #[cfg_attr(test, derive(derive_quickcheck_arbitrary::Arbitrary))] | ||||||||
| pub struct FeeConfig { | ||||||||
| /// Indicates the default max fee for a message | ||||||||
| #[serde(with = "crate::lotus_json")] | ||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||||||||
| pub max_fee: TokenAmount, | ||||||||
| } | ||||||||
|
|
||||||||
| impl Default for FeeConfig { | ||||||||
| fn default() -> Self { | ||||||||
| // The code is taken from https://github.com/filecoin-project/lotus/blob/release/v1.34.1/node/config/def.go#L39 | ||||||||
| Self { | ||||||||
| max_fee: TokenAmount::from_atto(70_000_000_000_000_000u64), // 0.07 FIL | ||||||||
| } | ||||||||
| } | ||||||||
| } | ||||||||
|
|
||||||||
| #[derive(Serialize, Deserialize, PartialEq, Default, Debug, Clone)] | ||||||||
| #[cfg_attr(test, derive(derive_quickcheck_arbitrary::Arbitrary))] | ||||||||
| #[serde(default)] | ||||||||
|
|
@@ -104,6 +121,7 @@ pub struct Config { | |||||||
| pub daemon: DaemonConfig, | ||||||||
| pub events: EventsConfig, | ||||||||
| pub fevm: FevmConfig, | ||||||||
| pub fee: FeeConfig, | ||||||||
| pub chain_indexer: ChainIndexerConfig, | ||||||||
| } | ||||||||
|
|
||||||||
|
|
||||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice