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

Fixed contracts tables to touch only own SMT nodes #1536

Merged
merged 5 commits into from
Dec 11, 2023

Conversation

xgreenx
Copy link
Collaborator

@xgreenx xgreenx commented Dec 11, 2023

It was possible to remove the SMT nodes in the foreign contract because it was not prefixed with the ContractId. The caller could use the same storage key/asset ID with exactly the same values to delete the SMT nodes in another contract.

Fixes #1535

@xgreenx xgreenx requested a review from a team December 11, 2023 13:15
@xgreenx xgreenx self-assigned this Dec 11, 2023
Dentosal
Dentosal previously approved these changes Dec 11, 2023
Copy link
Member

@Dentosal Dentosal left a comment

Choose a reason for hiding this comment

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

Seems pretty straightforward, but maybe should wait for @bvrooman to review as well?

@xgreenx xgreenx requested review from bvrooman and a team December 11, 2023 18:46
bvrooman
bvrooman previously approved these changes Dec 11, 2023
crates/fuel-core/src/database/balances.rs Outdated Show resolved Hide resolved
crates/fuel-core/src/database/state.rs Outdated Show resolved Hide resolved
@xgreenx xgreenx dismissed stale reviews from bvrooman and Dentosal via 51c4fd1 December 11, 2023 19:01
Co-authored-by: Brandon Vrooman <brandon.vrooman@fuel.sh>
@xgreenx xgreenx enabled auto-merge (squash) December 11, 2023 19:01
@xgreenx xgreenx merged commit 673c91d into master Dec 11, 2023
25 checks passed
@xgreenx xgreenx deleted the bugfix/overriding-smt-entries-by-another-contract branch December 11, 2023 19:08
@xgreenx xgreenx mentioned this pull request Dec 12, 2023
xgreenx added a commit that referenced this pull request Dec 12, 2023
## Version v0.22.0

### Added

- [#1515](#1515): Added
support of `--version` command for `fuel-core-keygen` binary.
- [#1504](#1504): A `Success`
or `Failure` variant of `TransactionStatus` returned by a query now
contains the associated receipts generated by transaction execution.

#### Breaking
- [#1531](#1531): Make
`fuel-core-executor` `no_std` compatible. It affects the `fuel-core`
crate because it uses the `fuel-core-executor` crate. The change is
breaking because of moved types.
- [#1524](#1524): Adds
information about connected peers to the GQL API.

### Changed

- [#1517](#1517): Changed
default gossip heartbeat interval to 500ms.
- [#1520](#1520): Extract
`executor` into `fuel-core-executor` crate.

### Fixed

#### Breaking
- [#1536](#1536): The change
fixes the contracts tables to not touch SMT nodes of foreign contracts.
Before, it was possible to invalidate the SMT from another contract. It
is a breaking change and requires re-calculating the whole state from
the beginning with new SMT roots.

## What's Changed
* Added support of `--version` command for `fuel-core-keygen` binary by
@xgreenx in #1515
* Weekly `cargo update` by @github-actions in
#1518
* feat: Add receipts to transaction status by @bvrooman in
#1504
* chore: Update gossip heartbeat interval by @bvrooman in
#1517
* Weekly `cargo update` by @github-actions in
#1525
* Run beta 4 e2e test each 30 minutes by @xgreenx in
#1528
* Fix broken link. by @lukema95 in
#1526
* Extract executor into fuel-core-executor crate by @Salka1988 in
#1520
* Weekly `cargo update` by @github-actions in
#1534
* Make `fuel-core-executor` `no_std` compatible by @Salka1988 in
#1532
* Fixed contracts tables to touch only own SMT nodes by @xgreenx in
#1536
* Show info about connected peers in the gql api by @Voxelot in
#1524
* fix committed gql schema by @Voxelot in
#1540

## New Contributors
* @lukema95 made their first contribution in
#1526

**Full Changelog**:
v0.21.0...v0.22.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Execution Error When Calling bal After Low-Level Call and Calling The Other Contract First
3 participants