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

Add a feature that propose u32 tx_pointer in fuel-tx and fuel-vm #899

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

AurelienFT
Copy link
Contributor

Having u32 tx_pointer is mendatory to make our system scales and support more than u16::MAX tx in a block.

However, changing this in the current network is a hard breaking change and is not needed for now. That's why we decided to add this change to the VM behind a feature flag if we want to use in other system or be able to enable it in our principal one too.

Checklist

  • Breaking changes are clearly marked as such in the PR description and changelog
  • New behavior is reflected in tests
  • If performance characteristic of an instruction change, update gas costs as well or make a follow-up PR for that
  • The specification 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

@AurelienFT AurelienFT requested a review from a team January 20, 2025 14:57
@AurelienFT AurelienFT added the xxx label Jan 20, 2025
rymnc
rymnc previously approved these changes Jan 21, 2025
Copy link
Member

@rymnc rymnc left a comment

Choose a reason for hiding this comment

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

LGTM, but in the malleable_fields_do_not_affect_* tests if we used u16::MAX and u32::MAX to indicate change in size vs adding some zeroes OR using rng to generate those values, would be nice, but is out of scope for this PR :)

@xgreenx
Copy link
Collaborator

xgreenx commented Jan 21, 2025

It is a big breaking change for the type system. We need to have proper testing and double check that serialization and deserialization will be not affected for mainnet/testnet/devnet blocks. It would be nice try to use extreme values and see when postcard serialization/deserialiation will be different(like from 1 to u16::MAX).

Also maybe Rollup team uses bitcode, if yes, then it also break compressed blocks for them

@AurelienFT
Copy link
Contributor Author

@xgreenx I didn't want to activate this feature on Ignition is it something we want to do in the near future ? For xxx, it will be a new network and will be in the specs.

@xgreenx
Copy link
Collaborator

xgreenx commented Jan 21, 2025

We can activate it on Ignition, if tests show that old database types are compatible with it.

@AurelienFT
Copy link
Contributor Author

I have added a test to showcase that we have a difference on the postcard serialization format (it's expected because postcard use varint encoding). I tried our .to_bytes() which doesn't break because it's not using varint and was padded to a 8 bytes value so u32 fits.

I don't really understand how we could activate this on Ignition but if we want to make more tests to activate this for Ignition they should be done on the fuel-core repository

@AurelienFT AurelienFT self-assigned this Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants