Skip to content

test: increase exported functions limits for benchmarking setup#4861

Merged
maksymar merged 4 commits intomasterfrom
maksym/pocket_ic_embedders_config
Apr 24, 2025
Merged

test: increase exported functions limits for benchmarking setup#4861
maksymar merged 4 commits intomasterfrom
maksym/pocket_ic_embedders_config

Conversation

@maksymar
Copy link
Copy Markdown
Contributor

@maksymar maksymar commented Apr 22, 2025

This PR increases exported function limits for canister Wasm in benchmarking setup.

This allows canbench to have more tests, eg in stable-structures, at the same time it does not affect prod setup.

Current limitations for functions number and total function name length are 1k and 20k respectively.

For benchmarking purposes the number of functions increased x100 with the assumption that average function name length is 50 chars (previously was just 20).

@maksymar maksymar requested a review from a team as a code owner April 22, 2025 06:03
@github-actions github-actions Bot added the test label Apr 22, 2025
@michael-weigelt
Copy link
Copy Markdown
Contributor

Typically, we try to make most failure conditions that can occur on mainnet also occur with PocketIC, so that the user does not have green tests and then fails in prod.

However, in this case, the failure (that we let slide on PocketIC with this change) would occur very early on, when trying to upload a Wasm with too many exported methods. So I am fine with making this change without going through a PocketIC builder flag (which is the usual way to configure stuff that deviates from mainnet).

@mraszyk
Copy link
Copy Markdown
Contributor

mraszyk commented Apr 24, 2025

without going through a PocketIC builder flag

in a sense, this feature is already gated by using SubnetInstructionConfig::Benchmarking instead of SubnetInstructionConfig::Production although the name "instruction" config does not really apply anymore

@maksymar
Copy link
Copy Markdown
Contributor Author

SubnetInstructionConfig::Benchmarking

I was also relying on this config, hope it's fine for this case.

@maksymar maksymar added this pull request to the merge queue Apr 24, 2025
Merged via the queue into master with commit 3e364f8 Apr 24, 2025
29 checks passed
@maksymar maksymar deleted the maksym/pocket_ic_embedders_config branch April 24, 2025 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants