-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement storage power evolution in simulations for honest participants
Implement the ability to evolve the storage power across honest participants over the course of a simulation. The changes introduce primitives to allow doing this and reflect the changes across the tests using a uniformed fixed storage power generator. The adversary storage power evolution is not yet implemented and left to future work in favour of reducing the number of lines changed. Add two tests that exercise increase and decrease of storage power over sync and async message passing: 1. Sudden increase of storage power results in the corresponding group of nodes to dominate consensus as expected. 2. Gradual decrease of storage power results in loss of dominance among the corresponding group. Fixes #114
- Loading branch information
Showing
14 changed files
with
292 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package sim | ||
|
||
import "github.com/filecoin-project/go-f3/gpbft" | ||
|
||
type StoragePowerGenerator func(instance uint64, id gpbft.ActorID) *gpbft.StoragePower | ||
|
||
func UniformStoragePower(power *gpbft.StoragePower) StoragePowerGenerator { | ||
return func(uint64, gpbft.ActorID) *gpbft.StoragePower { | ||
return power | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.