Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solana mcm signers in ConfigSet event [NONEVM-1068] #393

Merged
merged 18 commits into from
Dec 23, 2024

Conversation

jadepark-dev
Copy link
Contributor

@jadepark-dev jadepark-dev commented Dec 19, 2024

This PR resolves the out-of-memory issue that was occurring when emitting ConfigSet events with large numbers of signers in the MCM program.

Primary Changes

  • Modified set_config block scopes to fix memory overflow in ConfigSet event emission
  • Adjusted maximum signer limit to prevent OOM(200 -> 180)

Testing

  • Verified ConfigSet events with maximum signer capacity
  • Validated event emission across different config scenarios

Notes

  • Maximum signers reduced from 200 to 180 to ensure stable event emission

@jadepark-dev jadepark-dev changed the base branch from main to solana/mcm-clear-root December 19, 2024 17:26
@jadepark-dev jadepark-dev marked this pull request as ready for review December 19, 2024 18:18
@jadepark-dev jadepark-dev requested a review from a team as a code owner December 19, 2024 18:18
@jadepark-dev jadepark-dev self-assigned this Dec 19, 2024
agusaldasoro
agusaldasoro previously approved these changes Dec 23, 2024
@@ -1,5 +1,5 @@
// Business-logic constants
pub const MAX_NUM_SIGNERS: usize = 200; // This has to be below u8 limit (255). Value copied from EVM reference contract
pub const MAX_NUM_SIGNERS: usize = 180; // maximum number of signers supported
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious, is this what fixed the overflow?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have the same question 😄

Besides curiosity, I assume the limit is high enough anyway so probably nothing to worry about, but do you know more or less how many signers we have today? And who should we notify about the overall limit shrinking from 200 to 180? This affects other chains as well as MCMS is "many-chain" multisig

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@agusaldasoro 😅 with additional block scoping in set_config to save some runtime memory.

@toblich Thank you for checking in! I've been discussing the number of signers/signatures with the deployment automation team and research team - currently, 10-12 signers and 6-8 signatures are in production operation using mcms. So, 180 is pretty enough.

There will be another discussion with research side about those numbers(among mcm w/ timelock - signers, signatures, supported max transactions) after the holidays.

Base automatically changed from solana/mcm-clear-root to main December 23, 2024 18:59
@jadepark-dev jadepark-dev dismissed agusaldasoro’s stale review December 23, 2024 18:59

The base branch was changed.

Copy link

Metric solana/mcm-configset-event main
Coverage 76.5% 76.4%

@jadepark-dev jadepark-dev merged commit f25773d into main Dec 23, 2024
17 checks passed
@jadepark-dev jadepark-dev deleted the solana/mcm-configset-event branch December 23, 2024 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants