dwallet-labs / dwallet-network

dWallet Network, a composable modular signature network that is the home of dWallets. A dWallet is a noncollusive and massively decentralized signing mechanism, used as a building block by builders on other networks to add native multi-chain interoperability to any smart contract.
https://docs.dwallet.io
Other
40 stars 35 forks source link

Remove hard coded 100 from instance channel limit #256

Closed ItayLevyOfficial closed 2 months ago

ItayLevyOfficial commented 2 months ago

_1. Reasonable or not, I'm allergic to 99% of hardcoding (outside of tests) :wink: It obscures behavior, which makes the code hard to understand. By giving a constant a name (e.g., by extracting it into a constant), the reader can realize/double-check why this constant is used and verify it.

  1. Can we perhaps derive this from existing constants? For example, does a constant exist that captures the number of active validators? We know that the number of messages to an instance should be, at most, that number multiplied by the maximum number of rounds for a protocol.
  2. To close: I don't think 100 is reasonable. If you want to scale this project beyond 100 validators, you'll likely overflow this channel from time to time._

_Originally posted by @erik-3milabs in https://github.com/dwallet-labs/dwallet-network/pull/244#discussion_r1772769071_

ItayLevyOfficial commented 2 months ago

Irrelevant as we removed this channel