Skip to content

Non-deterministic wasm binary of the contracts #165

@xgreenx

Description

@xgreenx

After the bunch of size optimization, we decided to add a GitHub action that will compare the sizes of contracts. During the implementation of the size, we found that the size of the contracts is not deterministic.

After investigation, we found the reason:
OpenBrush stores some metadata in the target folder. It requires access to the storage and adds some delays during the parallel compilation of the contract. The code is optimized in the different sequences, which may cause differences in the contract sizes in 10-150 bytes.

The solution is entirely to replace the code generated by ink::trait_definition and ink::contract macros and store all required information in the code on Rust level to avoid access to the storage.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions