What is the main motivation for Fuel choosing a word size of 64 bits instead of usual 256 bits?
This is hardening portability of existing Solidity libraries.
Hi @onlyforweb3 ,
The 64-bit word size is based around modern virtual machine and ISA standards.
Outside of the blockchain world 32 and 64 -bit systems are the norm, not the exception.
256-bit words were only something that came from the EVM and cause a significant amount of execution overhead with little benefit to the developer.
Totally agreeing about outside blockchain world.
Inside crypto space which remains until now small anyways, i’m afraid several EVM devs will find difficulties trying/migrating to FuelVM architecture due to these fundamental differences.
The 256-bit word side really should not affect how a Solidity developer uses the system though.
The FuelVM has arithmetic operations for U128 and U256 numbers:
The Sway language provides first-class support for b256 as a primitive type and U128 / U256 numbers.
Some examples in Sway:
I’d also recommend trying out the Solidity → Sway Transpiler (Charcoal), just open the Sway Playground and click Solidity, then select an example to transpile. This should help show you what’s available for Sway in terms of functionality.
It also should be noted that the EVM is generally the exception, even in the blockchain world:
- Solana’s SVM: 64-bits
- Move (Sui/Aptos): 64-bits
- Cosmos SDK: 64-bits
- WASM (CosmWasm, NEAR, Arbitrum Stylus, Fluent): 32-bits
- StarkNet/Cairo: 251-bits
Interesting discussion, thanks for your replies!