| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
chore: bump fuel-core to 0.24.2, fuel-vm to 0.48.0, sdk to 0.57.0 (#5844) ## Description Updates fuel dependencies: 1. fuel-core to 0.24.2 2. fuel-vm to 0.48.0 3. sdk to 0.57.0 | 2 年前 | |
Apply Clippy's `uninlined_format_args` lint (#7361) ## Description This PR improves the readability of `format!`, `write!`, etc. macros by rolling out the Clippy fixes for the `uninlined_format_args` lint. `cargo clippy` started showing this lint after locally switching to Cargo v1.88.0. Additionally, the PR: - replaces a few occurrences of `io::Error::new(std::io::ErrorKind::Other, <msg>)` with `io::Error::other(<msg>)`. - replaces a single occurrence of `if params.iter().any(|&p| p == "all")` with `if params.contains(&"all")`. ## Checklist - [ ] I have linked to any relevant issues. - [ ] I have commented my code, particularly in hard-to-understand areas. - [ ] I have updated the documentation where relevant (API docs, the reference, and the Sway book). - [ ] If my change requires substantial documentation changes, I have [requested support from the DevRel team](https://github.com/FuelLabs/devrel-requests/issues/new/choose) - [ ] I have added tests that prove my fix is effective or that my feature works. - [ ] I have added (or requested a maintainer to add) the necessary `Breaking*` or `New Feature` labels where relevant. - [x] I have done my best to ensure that my PR adheres to [the Fuel Labs Code Review Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md). - [x] I have requested a review from the relevant team or maintainers. | 1 年前 | |
Implement dynamic storage opcodes in the compiler (#7595) ## Description This PR is a step in implementing #7560. It adds compiler support for [dynamic storage opcodes](https://github.com/FuelLabs/fuel-specs/pull/640) by: - supporting all opcodes in `asm` blocks. - adding IR instructions for all opcodes. Note that the `FuelVmInstruction::StatePreload` IR instruction returns zero if the slot is not used, but also if it is used and contains zero-sized content. The reason is that zero-sized storage types, like, e.g. `StorageVec`, have special semantics in the storage API and the `storage_api` does not write zero-sized types into storage, nor reads them. Modeling the IR instruction this way preserves this semantics and allows for more efficient implementation that is actually needed in the API. (Returning both the length and the existence information would require a stack allocation and more gas expensive compilation for something that is actually not used.) This API semantics might be changed to support zero-sized types like any other types. This would be a separate breaking change and a part of [Configurable and composable storage RFC](https://github.com/FuelLabs/sway-rfcs/pull/40). Meanwhile, if a distinction between unused and zero-sized used slot is needed while preloading, it can be achieved by using the `SPLD` opcode in `asm` block. ## Checklist - [x] I have linked to any relevant issues. - [x] I have commented my code, particularly in hard-to-understand areas. - [ ] I have updated the documentation where relevant (API docs, the reference, and the Sway book). - [ ] If my change requires substantial documentation changes, I have [requested support from the DevRel team](https://github.com/FuelLabs/devrel-requests/issues/new/choose) - [x] I have added tests that prove my fix is effective or that my feature works. - [ ] I have added (or requested a maintainer to add) the necessary `Breaking*` or `New Feature` labels where relevant. - [x] I have done my best to ensure that my PR adheres to [the Fuel Labs Code Review Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md). - [x] I have requested a review from the relevant team or maintainers. | 6 个月前 | |
Optimise `pshl` (#7561) ## Description Change the order of register allocation... instead of starting from "lower" registers... it starts from higher registers... that means that for functions with very few registers, there is no need to save them with `pshl`. Example: ```sway #[inline(never)] fn leaf_fn_6(a: u64, b: u64, c: u64, d: u64, e: u64, f: u64) -> u64 { a + b + c + d + e + f } ``` Before: ```asm pshl i1 ; [fn init: leaf_fn_6_2]: push used low registers 16..40 pshh i524288 ; [fn init: leaf_fn_6_2]: push used high registers 40..64 add $r0 $$arg0 $$arg1 add $r0 $r0 $$arg2 add $r0 $r0 $$arg3 add $r0 $r0 $$arg4 add $r0 $r0 $$arg5 move $$retv $r0 ; [fn end: leaf_fn_6_2] set return value poph i524288 ; [fn end: leaf_fn_6_2]: restore used high registers 40..64 popl i1 ; [fn end: leaf_fn_6_2]: restore used low registers 16..40 jal $zero $$reta i0 ; [fn end: leaf_fn_6_2] return from call ``` After ```asm pshh i528384 ; [fn init: leaf_fn_6_2]: push used high registers 40..64 add $r0 $$arg0 $$arg1 add $r0 $r0 $$arg2 add $r0 $r0 $$arg3 add $r0 $r0 $$arg4 add $r0 $r0 $$arg5 move $$retv $r0 ; [fn end: leaf_fn_6_2] set return value poph i528384 ; [fn end: leaf_fn_6_2]: restore used high registers 40..64 jal $zero $$reta i0 ; [fn end: leaf_fn_6_2] return from call ``` Please notice that `pshl i1` and `popl i1` were removed. ## Checklist - [ ] I have linked to any relevant issues. - [x] I have commented my code, particularly in hard-to-understand areas. - [ ] I have updated the documentation where relevant (API docs, the reference, and the Sway book). - [ ] If my change requires substantial documentation changes, I have [requested support from the DevRel team](https://github.com/FuelLabs/devrel-requests/issues/new/choose) - [x] I have added tests that prove my fix is effective or that my feature works. - [ ] I have added (or requested a maintainer to add) the necessary `Breaking*` or `New Feature` labels where relevant. - [x] I have done my best to ensure that my PR adheres to [the Fuel Labs Code Review Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md). - [x] I have requested a review from the relevant team or maintainers. | 7 个月前 | |
chore: bumpt rust version to 1.90 (#7427) ## Description Bumping the rust version to 1.90 and fixing the clippy lints along the way | 1 年前 | |
Add support recover key (#5419) ## Description Add recover-public-key to forc-crypto This function is ported from https://github.com/FuelLabs/forc-wallet/pull/152 This PR depends on #5388 ## Checklist - [x] I have linked to any relevant issues. - [x] I have commented my code, particularly in hard-to-understand areas. - [x] I have updated the documentation where relevant (API docs, the reference, and the Sway book). - [x] I have added tests that prove my fix is effective or that my feature works. - [x] I have added (or requested a maintainer to add) the necessary `Breaking*` or `New Feature` labels where relevant. - [x] I have done my best to ensure that my PR adheres to [the Fuel Labs Code Review Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md). - [x] I have requested a review from the relevant team or maintainers. | 2 年前 |