Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chain enum and UnsupportedChainException (python) #20

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

antazoey
Copy link
Contributor

@antazoey antazoey commented Sep 8, 2020

Summary

Creates chain constants such as "mainnet" or "goerli" now accessible as Chain.MAINNET or Chain.GOERLI. Replaces the use of these constants through the code to use the available constants.

Other Information

This afford Pycharm type hints and allows the same constants to not have to be redefined down stream in apps/libs that use this library. It also makes the code look more polished.

Finally, if your pull request affects documentation or any non-code
changes, please explain.

Thanks for contributing to incubed! -->

I updated the documentation to show using these constants in cases where the chain name was being specified.

@antazoey antazoey changed the title Chain const Chain const (python) Sep 8, 2020
@antazoey antazoey changed the title Chain const (python) Chain enum and UnsupportedChainException (python) Sep 12, 2020
@antazoey
Copy link
Contributor Author

antazoey commented Sep 12, 2020

Questions about the documentation, end of line 71 in in3.model.py, about the config parameter chain_finality_threshold:

chain_finality_threshold (int):  Behavior depends on the chain consensus algorithm: POA - percent of signers needed in order reach finality (% of the validators) i.e.: 60 %. POW - mined blocks on top of the requested, i.e. 8 blocks. Defaults are defined in enum.Chain.

1.). Where is this enum.Chain? I can't find t.
2.) Why are consensus algorithms defined in an enum with name Chain? The rest of the library refers to Chain as being a string such as mainnet or goerli. Is this a typo? If so, I will fix it. And then what is the name of the actual enum for Consensus Algorithms?
3.) Why are there chains in the chain_configs that are not yet used anywhere? I left them out in this PR from the enum, thinking that they can be added once IPFS support is added, etc.

I actually suspect this is referring to chain_configs. I will look at more documentation to find the use of those configs...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant