├── .gitignore ├── CONTRIBUTING.md ├── COPYRIGHT ├── LICENSE-APACHE ├── LICENSE-MIT ├── README.md ├── code ├── README.md ├── attacks │ ├── attack-calcs.py │ └── forking-factor.py ├── beacon-sim │ └── leaderelection.py ├── ec-sim-w │ ├── main.go │ └── utils.go ├── ec-sim-zs │ ├── .gitignore │ ├── convert_open.sh │ ├── generate_default.sh │ ├── main.go │ └── utils │ │ ├── blocktree.py │ │ └── driver.py ├── other-sims │ ├── canadversarycatchup.py │ ├── case1_maxTotalCatchup.py │ ├── case2.py │ ├── case2_mp.py │ ├── case3_mp.py │ ├── case4.py │ ├── case4_mp.py │ ├── catchup_epoch_boundary.py │ ├── continuous_hs.py │ ├── cq_closed_form.py │ ├── early_chain_quality_sim.py │ ├── ec_markov.py │ ├── ec_withhold.py │ ├── epoch_boundary_end.py │ ├── epochboundary.py │ ├── epochboundary_large.py │ ├── finality_fixedlength.py │ ├── general_grinding.py │ ├── generate_chain.py │ ├── grinding.go │ ├── grinding.py │ ├── headstart.py │ ├── headstart_henri.py │ ├── lookfwd.py │ ├── max_tot_null.py │ ├── probaofcatchingup.py │ ├── probasucessfulHS.py │ ├── pure_withholding.py │ ├── simple_withholding.py │ └── utils.py └── vrf-chain-sim │ ├── biasable_block_whithholding.py │ ├── find_pattern.py │ ├── find_pattern2.py │ ├── frozen_vrf_biasability.py │ ├── improved_biasable_block_withholding.py │ └── test.py ├── research-notes ├── attacks.md ├── glossary.md ├── interfaces.md ├── open-questions.md ├── randomness.md ├── tools.md └── waiting.md └── specs └── ec ├── MC.tla └── ec.tla /.gitignore: -------------------------------------------------------------------------------- 1 | *.json 2 | *.png 3 | *.dot 4 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/CONTRIBUTING.md -------------------------------------------------------------------------------- /COPYRIGHT: -------------------------------------------------------------------------------- 1 | This library is dual-licensed under Apache 2.0 and MIT terms. 2 | -------------------------------------------------------------------------------- /LICENSE-APACHE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/LICENSE-APACHE -------------------------------------------------------------------------------- /LICENSE-MIT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/LICENSE-MIT -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/README.md -------------------------------------------------------------------------------- /code/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/code/README.md -------------------------------------------------------------------------------- /code/attacks/attack-calcs.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/code/attacks/attack-calcs.py -------------------------------------------------------------------------------- /code/attacks/forking-factor.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/code/attacks/forking-factor.py -------------------------------------------------------------------------------- /code/beacon-sim/leaderelection.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/code/beacon-sim/leaderelection.py -------------------------------------------------------------------------------- /code/ec-sim-w/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/code/ec-sim-w/main.go -------------------------------------------------------------------------------- /code/ec-sim-w/utils.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/code/ec-sim-w/utils.go -------------------------------------------------------------------------------- /code/ec-sim-zs/.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | *.swp 3 | ec-sim-zs 4 | output/* 5 | -------------------------------------------------------------------------------- /code/ec-sim-zs/convert_open.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/code/ec-sim-zs/convert_open.sh -------------------------------------------------------------------------------- /code/ec-sim-zs/generate_default.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | go build && ./ec-sim-zs 3 | -------------------------------------------------------------------------------- /code/ec-sim-zs/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/code/ec-sim-zs/main.go -------------------------------------------------------------------------------- /code/ec-sim-zs/utils/blocktree.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/code/ec-sim-zs/utils/blocktree.py -------------------------------------------------------------------------------- /code/ec-sim-zs/utils/driver.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/code/ec-sim-zs/utils/driver.py -------------------------------------------------------------------------------- /code/other-sims/canadversarycatchup.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/code/other-sims/canadversarycatchup.py -------------------------------------------------------------------------------- /code/other-sims/case1_maxTotalCatchup.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/code/other-sims/case1_maxTotalCatchup.py -------------------------------------------------------------------------------- /code/other-sims/case2.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/code/other-sims/case2.py -------------------------------------------------------------------------------- /code/other-sims/case2_mp.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/code/other-sims/case2_mp.py -------------------------------------------------------------------------------- /code/other-sims/case3_mp.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/code/other-sims/case3_mp.py -------------------------------------------------------------------------------- /code/other-sims/case4.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/code/other-sims/case4.py -------------------------------------------------------------------------------- /code/other-sims/case4_mp.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/code/other-sims/case4_mp.py -------------------------------------------------------------------------------- /code/other-sims/catchup_epoch_boundary.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/code/other-sims/catchup_epoch_boundary.py -------------------------------------------------------------------------------- /code/other-sims/continuous_hs.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/code/other-sims/continuous_hs.py -------------------------------------------------------------------------------- /code/other-sims/cq_closed_form.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/code/other-sims/cq_closed_form.py -------------------------------------------------------------------------------- /code/other-sims/early_chain_quality_sim.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/code/other-sims/early_chain_quality_sim.py -------------------------------------------------------------------------------- /code/other-sims/ec_markov.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/code/other-sims/ec_markov.py -------------------------------------------------------------------------------- /code/other-sims/ec_withhold.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/code/other-sims/ec_withhold.py -------------------------------------------------------------------------------- /code/other-sims/epoch_boundary_end.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/code/other-sims/epoch_boundary_end.py -------------------------------------------------------------------------------- /code/other-sims/epochboundary.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/code/other-sims/epochboundary.py -------------------------------------------------------------------------------- /code/other-sims/epochboundary_large.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/code/other-sims/epochboundary_large.py -------------------------------------------------------------------------------- /code/other-sims/finality_fixedlength.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/code/other-sims/finality_fixedlength.py -------------------------------------------------------------------------------- /code/other-sims/general_grinding.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/code/other-sims/general_grinding.py -------------------------------------------------------------------------------- /code/other-sims/generate_chain.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/code/other-sims/generate_chain.py -------------------------------------------------------------------------------- /code/other-sims/grinding.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/code/other-sims/grinding.go -------------------------------------------------------------------------------- /code/other-sims/grinding.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/code/other-sims/grinding.py -------------------------------------------------------------------------------- /code/other-sims/headstart.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/code/other-sims/headstart.py -------------------------------------------------------------------------------- /code/other-sims/headstart_henri.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/code/other-sims/headstart_henri.py -------------------------------------------------------------------------------- /code/other-sims/lookfwd.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/code/other-sims/lookfwd.py -------------------------------------------------------------------------------- /code/other-sims/max_tot_null.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/code/other-sims/max_tot_null.py -------------------------------------------------------------------------------- /code/other-sims/probaofcatchingup.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/code/other-sims/probaofcatchingup.py -------------------------------------------------------------------------------- /code/other-sims/probasucessfulHS.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/code/other-sims/probasucessfulHS.py -------------------------------------------------------------------------------- /code/other-sims/pure_withholding.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/code/other-sims/pure_withholding.py -------------------------------------------------------------------------------- /code/other-sims/simple_withholding.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/code/other-sims/simple_withholding.py -------------------------------------------------------------------------------- /code/other-sims/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/code/other-sims/utils.py -------------------------------------------------------------------------------- /code/vrf-chain-sim/biasable_block_whithholding.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/code/vrf-chain-sim/biasable_block_whithholding.py -------------------------------------------------------------------------------- /code/vrf-chain-sim/find_pattern.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/code/vrf-chain-sim/find_pattern.py -------------------------------------------------------------------------------- /code/vrf-chain-sim/find_pattern2.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/code/vrf-chain-sim/find_pattern2.py -------------------------------------------------------------------------------- /code/vrf-chain-sim/frozen_vrf_biasability.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/code/vrf-chain-sim/frozen_vrf_biasability.py -------------------------------------------------------------------------------- /code/vrf-chain-sim/improved_biasable_block_withholding.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/code/vrf-chain-sim/improved_biasable_block_withholding.py -------------------------------------------------------------------------------- /code/vrf-chain-sim/test.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/code/vrf-chain-sim/test.py -------------------------------------------------------------------------------- /research-notes/attacks.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/research-notes/attacks.md -------------------------------------------------------------------------------- /research-notes/glossary.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/research-notes/glossary.md -------------------------------------------------------------------------------- /research-notes/interfaces.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/research-notes/interfaces.md -------------------------------------------------------------------------------- /research-notes/open-questions.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/research-notes/open-questions.md -------------------------------------------------------------------------------- /research-notes/randomness.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/research-notes/randomness.md -------------------------------------------------------------------------------- /research-notes/tools.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/research-notes/tools.md -------------------------------------------------------------------------------- /research-notes/waiting.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/research-notes/waiting.md -------------------------------------------------------------------------------- /specs/ec/MC.tla: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/specs/ec/MC.tla -------------------------------------------------------------------------------- /specs/ec/ec.tla: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/consensus/HEAD/specs/ec/ec.tla --------------------------------------------------------------------------------