├── .flake8 ├── .gitignore ├── .isort.cfg ├── .travis.yml ├── README.md ├── deployment.py ├── integration_tests ├── __init__.py └── features │ ├── basic_flow.feature │ ├── challenge_double_spending_flow.feature │ ├── challenge_history_flow.feature │ ├── challenge_spent_coin_flow.feature │ ├── environment.py │ ├── exit_deposit_flow.feature │ ├── steps │ ├── basic_flow.py │ ├── challenge_double_spending_flow.py │ ├── challenge_history_flow.py │ ├── challenge_spent_coin_flow.py │ └── exit_deposit_flow.py │ └── utils.py ├── plasma_cash ├── __init__.py ├── child_chain │ ├── __init__.py │ ├── __main__.py │ ├── block.py │ ├── child_chain.py │ ├── child_chain_client.py │ ├── db │ │ ├── __init__.py │ │ ├── db_interface.py │ │ ├── exceptions.py │ │ ├── leveldb.py │ │ └── memory_db.py │ ├── event.py │ ├── exceptions.py │ ├── server.py │ ├── transaction.py │ └── websocket.py ├── client │ ├── __init__.py │ ├── client.py │ ├── db │ │ ├── db_interface.py │ │ └── memory_db.py │ ├── exceptions.py │ └── history.py ├── config.py ├── dependency_config.py ├── operator_cron_job │ ├── __init__.py │ ├── __main__.py │ ├── job_handler.py │ └── jobs │ │ ├── __init__.py │ │ ├── apply_deposit_job.py │ │ ├── job_interface.py │ │ └── submit_block_job.py ├── root_chain │ ├── __init__.py │ ├── contracts │ │ ├── DataStructures │ │ │ ├── Challenge.sol │ │ │ └── Transaction.sol │ │ ├── Libraries │ │ │ ├── ECRecovery.sol │ │ │ ├── RLP.sol │ │ │ └── merkle.sol │ │ └── RootChain │ │ │ └── RootChain.sol │ └── deployer.py └── utils │ ├── __init__.py │ ├── merkle │ ├── __init__.py │ ├── predicate.py │ └── sparse_merkle_tree.py │ └── utils.py ├── requirements.txt └── unit_tests ├── __init__.py ├── child_chain ├── __init__.py ├── db │ ├── __init__.py │ ├── test_leveldb.py │ └── test_memory_db.py ├── test_block.py ├── test_child_chain.py ├── test_child_chain_client.py ├── test_event.py ├── test_server.py └── test_transaction.py ├── client ├── __init__.py ├── db │ ├── __init__.py │ └── test_memory_db.py ├── test_client.py └── test_history.py ├── operator_cron_job ├── __init__.py ├── jobs │ ├── __init__.py │ ├── test_apply_deposit_job.py │ └── test_submit_block_job.py ├── test_job_handler.py └── test_main.py ├── root_chain ├── __init__.py └── test_root_chain.py ├── unstub_mixin.py └── utils ├── __init__.py ├── merkle ├── __init__.py ├── test_predicate.py └── test_sparse_merkle_tree.py └── test_utils.py /.flake8: -------------------------------------------------------------------------------- 1 | [flake8] 2 | max-line-length = 99 3 | exclude = config.py 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/.gitignore -------------------------------------------------------------------------------- /.isort.cfg: -------------------------------------------------------------------------------- 1 | [settings] 2 | line_length = 100 3 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/.travis.yml -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/README.md -------------------------------------------------------------------------------- /deployment.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/deployment.py -------------------------------------------------------------------------------- /integration_tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /integration_tests/features/basic_flow.feature: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/integration_tests/features/basic_flow.feature -------------------------------------------------------------------------------- /integration_tests/features/challenge_double_spending_flow.feature: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/integration_tests/features/challenge_double_spending_flow.feature -------------------------------------------------------------------------------- /integration_tests/features/challenge_history_flow.feature: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/integration_tests/features/challenge_history_flow.feature -------------------------------------------------------------------------------- /integration_tests/features/challenge_spent_coin_flow.feature: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/integration_tests/features/challenge_spent_coin_flow.feature -------------------------------------------------------------------------------- /integration_tests/features/environment.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/integration_tests/features/environment.py -------------------------------------------------------------------------------- /integration_tests/features/exit_deposit_flow.feature: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/integration_tests/features/exit_deposit_flow.feature -------------------------------------------------------------------------------- /integration_tests/features/steps/basic_flow.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/integration_tests/features/steps/basic_flow.py -------------------------------------------------------------------------------- /integration_tests/features/steps/challenge_double_spending_flow.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/integration_tests/features/steps/challenge_double_spending_flow.py -------------------------------------------------------------------------------- /integration_tests/features/steps/challenge_history_flow.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/integration_tests/features/steps/challenge_history_flow.py -------------------------------------------------------------------------------- /integration_tests/features/steps/challenge_spent_coin_flow.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/integration_tests/features/steps/challenge_spent_coin_flow.py -------------------------------------------------------------------------------- /integration_tests/features/steps/exit_deposit_flow.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/integration_tests/features/steps/exit_deposit_flow.py -------------------------------------------------------------------------------- /integration_tests/features/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/integration_tests/features/utils.py -------------------------------------------------------------------------------- /plasma_cash/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /plasma_cash/child_chain/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/plasma_cash/child_chain/__init__.py -------------------------------------------------------------------------------- /plasma_cash/child_chain/__main__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/plasma_cash/child_chain/__main__.py -------------------------------------------------------------------------------- /plasma_cash/child_chain/block.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/plasma_cash/child_chain/block.py -------------------------------------------------------------------------------- /plasma_cash/child_chain/child_chain.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/plasma_cash/child_chain/child_chain.py -------------------------------------------------------------------------------- /plasma_cash/child_chain/child_chain_client.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/plasma_cash/child_chain/child_chain_client.py -------------------------------------------------------------------------------- /plasma_cash/child_chain/db/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /plasma_cash/child_chain/db/db_interface.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/plasma_cash/child_chain/db/db_interface.py -------------------------------------------------------------------------------- /plasma_cash/child_chain/db/exceptions.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/plasma_cash/child_chain/db/exceptions.py -------------------------------------------------------------------------------- /plasma_cash/child_chain/db/leveldb.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/plasma_cash/child_chain/db/leveldb.py -------------------------------------------------------------------------------- /plasma_cash/child_chain/db/memory_db.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/plasma_cash/child_chain/db/memory_db.py -------------------------------------------------------------------------------- /plasma_cash/child_chain/event.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/plasma_cash/child_chain/event.py -------------------------------------------------------------------------------- /plasma_cash/child_chain/exceptions.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/plasma_cash/child_chain/exceptions.py -------------------------------------------------------------------------------- /plasma_cash/child_chain/server.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/plasma_cash/child_chain/server.py -------------------------------------------------------------------------------- /plasma_cash/child_chain/transaction.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/plasma_cash/child_chain/transaction.py -------------------------------------------------------------------------------- /plasma_cash/child_chain/websocket.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/plasma_cash/child_chain/websocket.py -------------------------------------------------------------------------------- /plasma_cash/client/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /plasma_cash/client/client.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/plasma_cash/client/client.py -------------------------------------------------------------------------------- /plasma_cash/client/db/db_interface.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/plasma_cash/client/db/db_interface.py -------------------------------------------------------------------------------- /plasma_cash/client/db/memory_db.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/plasma_cash/client/db/memory_db.py -------------------------------------------------------------------------------- /plasma_cash/client/exceptions.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/plasma_cash/client/exceptions.py -------------------------------------------------------------------------------- /plasma_cash/client/history.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/plasma_cash/client/history.py -------------------------------------------------------------------------------- /plasma_cash/config.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/plasma_cash/config.py -------------------------------------------------------------------------------- /plasma_cash/dependency_config.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/plasma_cash/dependency_config.py -------------------------------------------------------------------------------- /plasma_cash/operator_cron_job/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /plasma_cash/operator_cron_job/__main__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/plasma_cash/operator_cron_job/__main__.py -------------------------------------------------------------------------------- /plasma_cash/operator_cron_job/job_handler.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/plasma_cash/operator_cron_job/job_handler.py -------------------------------------------------------------------------------- /plasma_cash/operator_cron_job/jobs/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /plasma_cash/operator_cron_job/jobs/apply_deposit_job.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/plasma_cash/operator_cron_job/jobs/apply_deposit_job.py -------------------------------------------------------------------------------- /plasma_cash/operator_cron_job/jobs/job_interface.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/plasma_cash/operator_cron_job/jobs/job_interface.py -------------------------------------------------------------------------------- /plasma_cash/operator_cron_job/jobs/submit_block_job.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/plasma_cash/operator_cron_job/jobs/submit_block_job.py -------------------------------------------------------------------------------- /plasma_cash/root_chain/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /plasma_cash/root_chain/contracts/DataStructures/Challenge.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/plasma_cash/root_chain/contracts/DataStructures/Challenge.sol -------------------------------------------------------------------------------- /plasma_cash/root_chain/contracts/DataStructures/Transaction.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/plasma_cash/root_chain/contracts/DataStructures/Transaction.sol -------------------------------------------------------------------------------- /plasma_cash/root_chain/contracts/Libraries/ECRecovery.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/plasma_cash/root_chain/contracts/Libraries/ECRecovery.sol -------------------------------------------------------------------------------- /plasma_cash/root_chain/contracts/Libraries/RLP.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/plasma_cash/root_chain/contracts/Libraries/RLP.sol -------------------------------------------------------------------------------- /plasma_cash/root_chain/contracts/Libraries/merkle.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/plasma_cash/root_chain/contracts/Libraries/merkle.sol -------------------------------------------------------------------------------- /plasma_cash/root_chain/contracts/RootChain/RootChain.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/plasma_cash/root_chain/contracts/RootChain/RootChain.sol -------------------------------------------------------------------------------- /plasma_cash/root_chain/deployer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/plasma_cash/root_chain/deployer.py -------------------------------------------------------------------------------- /plasma_cash/utils/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /plasma_cash/utils/merkle/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /plasma_cash/utils/merkle/predicate.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/plasma_cash/utils/merkle/predicate.py -------------------------------------------------------------------------------- /plasma_cash/utils/merkle/sparse_merkle_tree.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/plasma_cash/utils/merkle/sparse_merkle_tree.py -------------------------------------------------------------------------------- /plasma_cash/utils/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/plasma_cash/utils/utils.py -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/requirements.txt -------------------------------------------------------------------------------- /unit_tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /unit_tests/child_chain/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /unit_tests/child_chain/db/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /unit_tests/child_chain/db/test_leveldb.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/unit_tests/child_chain/db/test_leveldb.py -------------------------------------------------------------------------------- /unit_tests/child_chain/db/test_memory_db.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/unit_tests/child_chain/db/test_memory_db.py -------------------------------------------------------------------------------- /unit_tests/child_chain/test_block.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/unit_tests/child_chain/test_block.py -------------------------------------------------------------------------------- /unit_tests/child_chain/test_child_chain.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/unit_tests/child_chain/test_child_chain.py -------------------------------------------------------------------------------- /unit_tests/child_chain/test_child_chain_client.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/unit_tests/child_chain/test_child_chain_client.py -------------------------------------------------------------------------------- /unit_tests/child_chain/test_event.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/unit_tests/child_chain/test_event.py -------------------------------------------------------------------------------- /unit_tests/child_chain/test_server.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/unit_tests/child_chain/test_server.py -------------------------------------------------------------------------------- /unit_tests/child_chain/test_transaction.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/unit_tests/child_chain/test_transaction.py -------------------------------------------------------------------------------- /unit_tests/client/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /unit_tests/client/db/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /unit_tests/client/db/test_memory_db.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/unit_tests/client/db/test_memory_db.py -------------------------------------------------------------------------------- /unit_tests/client/test_client.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/unit_tests/client/test_client.py -------------------------------------------------------------------------------- /unit_tests/client/test_history.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/unit_tests/client/test_history.py -------------------------------------------------------------------------------- /unit_tests/operator_cron_job/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /unit_tests/operator_cron_job/jobs/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /unit_tests/operator_cron_job/jobs/test_apply_deposit_job.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/unit_tests/operator_cron_job/jobs/test_apply_deposit_job.py -------------------------------------------------------------------------------- /unit_tests/operator_cron_job/jobs/test_submit_block_job.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/unit_tests/operator_cron_job/jobs/test_submit_block_job.py -------------------------------------------------------------------------------- /unit_tests/operator_cron_job/test_job_handler.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/unit_tests/operator_cron_job/test_job_handler.py -------------------------------------------------------------------------------- /unit_tests/operator_cron_job/test_main.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/unit_tests/operator_cron_job/test_main.py -------------------------------------------------------------------------------- /unit_tests/root_chain/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /unit_tests/root_chain/test_root_chain.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/unit_tests/root_chain/test_root_chain.py -------------------------------------------------------------------------------- /unit_tests/unstub_mixin.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/unit_tests/unstub_mixin.py -------------------------------------------------------------------------------- /unit_tests/utils/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /unit_tests/utils/merkle/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /unit_tests/utils/merkle/test_predicate.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/unit_tests/utils/merkle/test_predicate.py -------------------------------------------------------------------------------- /unit_tests/utils/merkle/test_sparse_merkle_tree.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/unit_tests/utils/merkle/test_sparse_merkle_tree.py -------------------------------------------------------------------------------- /unit_tests/utils/test_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omgnetwork/plasma-cash/HEAD/unit_tests/utils/test_utils.py --------------------------------------------------------------------------------