-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
fix(genesis): set salt of contract on execution of genesis state configuration #2322
Conversation
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.
I have a few questions so far. While this PR is pretty small, I feel like I don't understand the storage traits well enough to comprehend what's going on here - but I have tried running this and the query works on my local node.
I'll approve when I've acquired more knowledge of this.
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.
Okay this looks good to me. I have one consideration about the general approach but that is more for my own understanding.
crates/fuel-core/src/database.rs
Outdated
|
||
/// !!!! WARNING !!!! | ||
/// This method is unsafe because it doesn't check if the height is already set. | ||
/// This allows overriding the genesis state with a new one. | ||
pub fn unsafe_into_genesis(self) -> GenesisDatabase<Description> { | ||
GenesisDatabase::new(self.into_inner().data) | ||
} |
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.
We need to add a todo to rework this. It breaks all procession that we have for database right now.
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.
already done #2329
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.
I meant in the code itself
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.
Co-authored-by: Green Baneling <[email protected]>
I think we can just hold off on this PR until we have a dedicated strategy of how to deal with genesis insertions. this might be doing more harm than good by introducing tech debt. |
I was under the impression that we needed to patch this before mainnet. If not, I agree it sounds wise to hold it off. |
## Version v0.39.0 ### Added - [2324](#2324): Added metrics for sync, async processor and for all GraphQL queries. - [2320](#2320): Added new CLI flag `graphql-max-resolver-recursive-depth` to limit recursion within resolver. The default value it "1". ## Fixed - [2320](#2320): Prevent `/health` and `/v1/health` from being throttled by the concurrency limiter. - [2322](#2322): Set the salt of genesis contracts to zero on execution. - [2324](#2324): Ignore peer if we already are syncing transactions from it. #### Breaking - [2320](#2330): Reject queries that are recursive during the resolution of the query. ### Changed #### Breaking - [2311](#2311): Changed the text of the error returned by the executor if gas overflows. ## What's Changed * chore(executor): instrument errors to be more meaningful by @rymnc in #2311 * fix(dummy_da_block_costs): remove dependency on polling_interval and use channel instead by @rymnc in #2314 * fix(txpool): Error in GossipsubMessageAcceptance variant docstrings by @netrome in #2316 * refactor: Eager returns in txpool_v2::service::Task::run by @netrome in #2325 * fix(api_service): exclude health checks from throttling with ConcurrencyLimitLayer by @rymnc in #2320 * Remove the `normalize_rewards_and_costs()` function by @rafal-ch in #2293 * fix(genesis): set salt of contract on execution of genesis state configuration by @rymnc in #2322 * Fixing the issue with duplicate transaction synchronization processes by @xgreenx in #2324 * Reject queries that are recursive during the resolution by @xgreenx in #2330 **Full Changelog**: v0.38.0...v0.39.0
Linked Issues/PRs
fixes #2296
Description
AsTable
,ImportTable
forgraphql::ContractInfo
.question: this doesn't work with an existing database, can anyone point me to the right place to include it?
I'm not sure if 8d0464e is a good idea at all.
Checklist
Before requesting review
After merging, notify other teams
[Add or remove entries as needed]