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

fault_proving(compression): add merkle root of transaction ids to compressed block header #2569

Closed
rymnc opened this issue Jan 15, 2025 · 1 comment · Fixed by #2648
Closed
Assignees

Comments

@rymnc
Copy link
Member

rymnc commented Jan 15, 2025

No description provided.

@rymnc
Copy link
Member Author

rymnc commented Jan 29, 2025

scope has changed, now to be included in full block header

rymnc added a commit that referenced this issue Feb 6, 2025
…tx_id_commitment (#2648)

## Linked Issues/PRs
<!-- List of related issues/PRs -->
closes #2569

## Description
<!-- List of detailed changes -->

This pull request introduces a new feature called "fault-proving" across
various modules and files. It includes modifications to configuration
files, schema updates, and changes to the handling of block generation
and transaction IDs.

### Reviewers guide

- ignore all the toml changes, its just a bunch of `fault-proving`
features with deps
- Focus on `crates/types/src/blockchain` for changes to the block header
- gql codeowners: Focus on `crates/client` for breaking change to the
graphql api
- producer/executor codeowners: The chainId has to be bubbled all the
way from the producer until the generation of a block header from a
partial block header because the tx_id_commitment needs it

you may filter the non-toml files by filtering them here -
<img width="528" alt="image"
src="https://github.com/user-attachments/assets/f8ed3f61-1390-4775-8e79-cc47515b4974"
/>


### Fault-Proving Feature Integration:

* `benches/Cargo.toml`, `crates/chain-config/Cargo.toml`,
`crates/client/Cargo.toml`, `crates/compression/Cargo.toml`,
`crates/database/Cargo.toml`, `crates/fuel-core/Cargo.toml`: Added
`fault-proving` feature dependencies.
[[1]](diffhunk://#diff-a287ac1ddb3103008d127dec29efad3be71aad1dc35692ea2b110739027f2a74R68-R75)
[[2]](diffhunk://#diff-f235fee8a06ac87af06ce4edde5f0e8f485baa1f0701a2fedaf6847cdb3c16daR66-R69)
[[3]](diffhunk://#diff-dba95a52b5a0286dba406a489a3721c1e0fb1c2b16d23e58a130ab449822d572R52)
[[4]](diffhunk://#diff-0311205805cedde290488b04958c6963d8cf03bf9bd42311e0adbe1934b76336L46-R46)
[[5]](diffhunk://#diff-d5c2961b30934fe3de075eb214734b59f7629431c5b874ee491a25e9a7310404R31-R34)
[[6]](diffhunk://#diff-7fc200bcb8e651840f8692da4101cfcdba429acc82847ed81d1d0ed63e0a5bd2L120-R128)

### Code Updates for Fault-Proving:

* `benches/src/db_lookup_times_utils/seed.rs`,
`crates/chain-config/src/config/randomize.rs`,
`crates/fuel-core/src/database/block.rs`,
`crates/fuel-core/src/executor.rs`,
`crates/fuel-core/src/query/message/test.rs`: Updated block generation
code to conditionally include `fault-proving` feature parameters.
[[1]](diffhunk://#diff-fd36e023c6c6a55ac85efc7304714454b8a9dffd91fe9bd5205f0ea73bc8e605L68-R73)
[[2]](diffhunk://#diff-ccfd120bae552bc04569d5ed127286c9af2cccbc2bc14875976aeb4cd97400f4R204-R216)
[[3]](diffhunk://#diff-9c5a14fda963ea35dbb447b92c5cd59b5e8cc63c8a81cdde7697edbff5df98ecL171-R178)
[[4]](diffhunk://#diff-379b2602e8ed0e8048291c20eff0d6ab59d4cfc1e6c5c9c6d5513b33008ba1c1R477-R478)
[[5]](diffhunk://#diff-63d9bf82521a9cd0243448173d69333864b431e92a0dbd279f79b1f53fdd857eL113-R119)

### Schema and Type Changes:

* `crates/client/assets/schema.sdl`,
`crates/client/src/client/schema/block.rs`,
`crates/client/src/client/types/block.rs`,
`crates/fuel-core/src/schema/block.rs`: Added `txIdCommitment` field and
`HeaderVersion::V2` to support the `fault-proving` feature.
[[1]](diffhunk://#diff-03da2c7455e03fe0bb1904e6272bbadcf292ab749f6400ba053f2b9e55484adeR569-R577)
[[2]](diffhunk://#diff-66bec94050a0bb100fd0859a45934bb01cd46ae433f4d1feaa9e6792362e14b4R128)
[[3]](diffhunk://#diff-5559fd7116703e5ff0fd288531424ff56de251b4d3dff620e6df2e6e3d8d24ceR51)
[[4]](diffhunk://#diff-e5c8bb940533d7236b2fd7866738e0542aee5aeeb8eb1236413a7e3ade8faaebR169)

### Snapshot and Test Updates:

*
`crates/client/src/client/schema/snapshots/fuel_core_client__client__schema__block__tests__block_by_height_query_gql_output.snap`,
`crates/client/src/client/schema/snapshots/fuel_core_client__client__schema__block__tests__block_by_id_query_gql_output.snap`,
`crates/client/src/client/schema/snapshots/fuel_core_client__client__schema__block__tests__blocks_connection_query_gql_output.snap`,
`crates/client/src/client/schema/snapshots/fuel_core_client__client__schema__chain__tests__chain_gql_query_output.snap`:
Updated snapshots to include `txIdCommitment` field.
[[1]](diffhunk://#diff-7d7f40c2d555a2a7af6a10b5ee80a5185a308b9feb54085ff13de49b12f63ca4R24)
[[2]](diffhunk://#diff-bb4613ba23d180ecada958738d517acaf6ece25584760545a273277b637ed9f9R24)
[[3]](diffhunk://#diff-e104b3bf3075513bdbeb3677ecd354317c09644e91ade3ee9d1458f08fc6072cR27)
[[4]](diffhunk://#diff-478cdb2ba85194d289555b895248472db296a4cd1007eaaa9a334a55dcfaeea5L4)

## Checklist
- [ ] Breaking changes are clearly marked as such in the PR description
and changelog
- [ ] New behavior is reflected in tests
- [ ] [The specification](https://github.com/FuelLabs/fuel-specs/)
matches the implemented behavior (link update PR if changes are needed)

### Before requesting review
- [ ] I have reviewed the code myself
- [ ] I have created follow-up issues caused by this PR and linked them
here

### After merging, notify other teams

[Add or remove entries as needed]

- [ ] [Rust SDK](https://github.com/FuelLabs/fuels-rs/)
- [ ] [Sway compiler](https://github.com/FuelLabs/sway/)
- [ ] [Platform
documentation](https://github.com/FuelLabs/devrel-requests/issues/new?assignees=&labels=new+request&projects=&template=NEW-REQUEST.yml&title=%5BRequest%5D%3A+)
(for out-of-organization contributors, the person merging the PR will do
this)
- [ ] Someone else?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment