consensus-shipyard / ipc

🌳 Spawn multi-level trees of customized, scalable, EVM-compatible networks with IPC. L2++ powered by FVM, Wasm, libp2p, IPFS/IPLD, and CometBFT.
https://ipc.space
Apache License 2.0
44 stars 39 forks source link

fix: include genesis validators in gateway parent validators tracker #1166

Open sanderpick opened 1 month ago

sanderpick commented 1 month ago

This PR is the result of trying to track down the cause of the following behavior:

I'm not sure if this fix is ideal, but it works. It just adds the genesis validators to the parent validator tracker before setting the initial membership in the gateway constructor.

sanderpick commented 1 month ago

Hunch: This issue is also the reason that in federated mode, you have to always include all validators, instead of being able to add them one-by-one.

sanderpick commented 1 month ago

Ah, makes sense. Somehow I missed https://github.com/consensus-shipyard/ipc/issues/1150. I'm happy to take a stab at passing the mode in the constructor here, but sounds like from slack convo you're picking this up. If so, do you want access to this branch or will you just recreate it? Nbd either way.

cryptoAtwill commented 1 month ago

@sanderpick yeah, it's quite tedious to fix the constructor, quite some code needs to be updated in fendermint. @raulk mentioned yesterday that he will check this out to see if there are easier fixes. But I think for collateral based subnets, this is the fix.