Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
5035: Tweak tx sizes r=EdHastingsCasperAssociation a=mpapierski This PR tweaks tx sizes in lanes configuration based on the mainnet Wasm data analysis For analysis every wasm was processed through `wasm-strip`, and whether it's install/upgrade was based on either `casper_create_contract_package_at_hash` or `casper_add_contract_version` being present in the binary. Otherwise, a wasm is considered a session. 1. The install or upgrade lane tx size was decreased by 75% from 1MiB to 750kB. Based on the heuristics above, this lane should cover all existing Wasm installers/upgraders and encourage the use of a `wasm-strip` tool or similar to minimize the Wasm binary to fit within it. The current max size of a stripped installer is 618kB, so with 750kB, there's still margin for more complex Wasms. 2. Wasm lane 3 is decreased to 2^18 (262144 bytes), which should fit Wasm sessions that need extra size above lane 4. No Wasm was observed to date that needs more space and is not an installer. 3. Wasm lane 4 is decreased to a previous power of two (2^17). This should cover any Wasm session and encourage the use of `wasm-strip` etc. 4. Wasm lane 5 is bumped to a next power of two (2^14) which should cover about 10% of all Wasms observed to-date. Ideal for multi-sig key management, contract calls, etc. The maximum size of a session Wasm observed to date was 116952 (assuming each one was Wasm-stripped), so lane 3-4 should cover all use cases. The dataset is available here with the analysis script https://gist.github.com/mpapierski/1b7a603bde1d4fe99c836ef9b68b3d0e Co-authored-by: Michał Papierski <michal@casper.network>
- Loading branch information