2023-09-24 02:29:58 -07:00
|
|
|
# Trailing Finality Layer Simulator
|
|
|
|
|
|
|
|
This is an experimental simulator for research into a potential
|
|
|
|
[Trailing Finality Layer](https://electriccoin.co/blog/the-trailing-finality-layer-a-stepping-stone-to-proof-of-stake-in-zcash/)
|
|
|
|
for Zcash.
|
|
|
|
|
|
|
|
Note the caveats: *experimental*, *simulator*, *research*, *potential*.
|
|
|
|
|
|
|
|
## Instructions
|
|
|
|
|
|
|
|
1. Install `poetry`:
|
|
|
|
|
|
|
|
sudo apt install python3-poetry
|
|
|
|
|
|
|
|
or see [poetry's installation docs](https://python-poetry.org/docs/)
|
|
|
|
if not on Debian/Ubuntu.
|
|
|
|
|
|
|
|
2. Install dependencies:
|
|
|
|
|
|
|
|
poetry install
|
|
|
|
|
2023-09-24 09:36:46 -07:00
|
|
|
3. Run the demo (currently just an example of message passing):
|
2023-09-24 02:29:58 -07:00
|
|
|
|
2023-09-24 09:36:46 -07:00
|
|
|
poetry run demo
|
2023-09-24 02:29:58 -07:00
|
|
|
|
2023-10-18 03:25:58 -07:00
|
|
|
## Documentation
|
2023-09-24 07:37:55 -07:00
|
|
|
|
2023-10-18 03:25:58 -07:00
|
|
|
Design documentation is under the `doc/` directory:
|
2023-09-24 07:37:55 -07:00
|
|
|
|
2023-12-05 16:05:27 -08:00
|
|
|
* [Programming patterns for use of simpy and type annotations](doc/patterns.md).
|
2023-09-24 07:37:55 -07:00
|
|
|
|
2023-10-20 13:09:18 -07:00
|
|
|
You can also generate API documentation by running `./gendoc.sh`. This assumes
|
|
|
|
that you have run `poetry install` as shown above. The starting point for the
|
|
|
|
generated documentation is <apidoc/simtfl.html>.
|
2023-10-19 14:51:09 -07:00
|
|
|
|
2023-09-24 09:41:22 -07:00
|
|
|
## Contributing
|
|
|
|
|
2023-12-06 05:25:19 -08:00
|
|
|
Please use `./check.sh` before submitting a PR. This currently runs `flake8`,
|
|
|
|
`pyanalyze`, and the unit tests locally.
|
2023-10-19 11:02:51 -07:00
|
|
|
|
2023-12-06 05:25:19 -08:00
|
|
|
You can use `./check.sh -k <substring>` to run `flake8`, `pyanalyze`, and then
|
|
|
|
only tests with names matching the given substring. This will not suppress
|
|
|
|
output to stdout or stderr (but `./check.sh -bk <substring>` will).
|
2023-10-19 11:02:51 -07:00
|
|
|
|
|
|
|
To see other options for running unit tests, use `poetry run python -m unittest -h`.
|
2023-09-24 09:41:22 -07:00
|
|
|
|
2023-09-24 02:29:58 -07:00
|
|
|
## License
|
|
|
|
|
|
|
|
This software is provided under the terms of the [MIT License](LICENSE).
|