consensus-shipyard / ipc-actors

Rust implementation of the IPC actors for FVM
MIT License
6 stars 3 forks source link

add pre-fund when there are less than three validators #102

Closed adlrocha closed 1 year ago

adlrocha commented 1 year ago

Background

In order to remove the chicken-and-egg problem described in https://github.com/consensus-shipyard/ipc-actors/pull/96 we send some initial funds to the initial validators in a subnet. The issue is that if we spawn a subnet with just one validator, and we join from another validator, the second validator won't have any funds to submit top-down checkpoints, and as a super-majority is required to commit the checkpoint, there won't be any way for the joining validator to inject funds in the subnet to submit top-down checkpoints, stalling the checkpoint submission of top-down checkpoints for the subnet.

Proposal

For now, this PR introduces a work-around where some initial funds are also sent to joining validators when the number of validators is below 3, to prevent joining validators from not being able to submit a checkpoint for lack of funds. A more robust solution should be considered like using account abstraction or some kind of checkpoint submission subsidising system.

adlrocha commented 1 year ago

@cryptoAtwill, unless you think otherwise, closing for now as the solution is too hacky and open to abuse.