matter-labs / matter-labs/zksync
zk server failed
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 4.9k
- Forks
- 2.7k
- PR merge metrics
- No merged PRs in 30d
Description
When I use zk server,it returns failed, I used rust 1.66 1.70 1.72 1.74 1.75 1.76
How to compile success?
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
--> core/lib/storage/src/chain/operations_ext/mod.rs:1444:15
|
1444 | .map(|account| (start_account, Address::from_slice(&account)))
| ^^^^^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `[u8]`
= note: all function arguments must have a statically known size
error[E0282]: type annotations needed for `Vec`
--> core/lib/storage/src/chain/state/mod.rs:623:17
|
623 | let mut account_diff = Vec::new();
| ^^^^^^^^^^^^^^^^
...
642 | .map(|acc| acc.block_number())
| ------------ type must be known at this point
|
help: consider giving `account_diff` an explicit type, where the type for type parameter `T` is specified
|
623 | let mut account_diff: Vec = Vec::new();
| ++++++++
error[E0609]: no field `from_block` on type `&_`
--> core/lib/storage/src/ethereum/mod.rs:520:46
|
520 | ... let (from_block, to_block) = (op.from_block as u32, op.to_block a...
| ^^^^^^^^^^
warning: unused import: `num::bigint::ToBigInt`
--> core/lib/storage/src/chain/account/mod.rs:24:5
|
24 | use num::bigint::ToBigInt;
| ^^^^^^^^^^^^^^^^^^^^^
warning: unused import: `num::ToPrimitive`
--> core/lib/storage/src/misc/mod.rs:9:5
|
9 | use num::ToPrimitive;
| ^^^^^^^^^^^^^^^^
Some errors have detailed explanations: E0277, E0282, E0609.
For more information about an error, try `rustc --explain E0277`.
warning: `zksync_storage` (lib) generated 21 warnings
error: could not compile `zksync_storage` (lib) due to 319 previous errors; 21 warnings emitted
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the zksync_storage compilation failure with the Rust versions listed in the report. Start by reading the cited locations in core/lib/storage/src/chain/operations_ext/mod.rs, core/lib/storage/src/chain/state/mod.rs, and core/lib/storage/src/ethereum/mod.rs, then use the E0277, E0282, and E0609 diagnostics to trace the underlying incompatibilities. Done means the storage library compiles successfully without these errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100