From f212a4a0a35846498de68a9ed3dd0c05662740c6 Mon Sep 17 00:00:00 2001 From: Richard Ramos Date: Tue, 31 Jul 2018 11:24:58 -0400 Subject: [PATCH] Adding Loom's plasma_cash folder --- plasma_cash/.flake8 | 2 + plasma_cash/License.md | 86 ++ plasma_cash/Makefile | 9 + plasma_cash/README.md | 35 + plasma_cash/auto_respond_challenge.py | 66 ++ plasma_cash/benchmark.py | 157 +++ plasma_cash/challenge_after_demo.py | 87 ++ plasma_cash/challenge_before_demo.py | 79 ++ plasma_cash/challenge_between_demo.py | 74 ++ plasma_cash/child_chain/__init__.py | 16 + plasma_cash/child_chain/block.py | 67 ++ plasma_cash/child_chain/child_chain.py | 121 ++ plasma_cash/child_chain/exceptions.py | 26 + plasma_cash/child_chain/server.py | 55 + plasma_cash/child_chain/transaction.py | 54 + plasma_cash/client/child_chain_service.py | 73 ++ plasma_cash/client/client.py | 438 +++++++ plasma_cash/client/exceptions.py | 2 + plasma_cash/config.py | 1006 +++++++++++++++++ plasma_cash/contract_binds/base/contract.py | 147 +++ plasma_cash/contract_binds/erc721.py | 35 + plasma_cash/contract_binds/plasma_cash.py | 179 +++ plasma_cash/contract_binds/utils/colors.py | 17 + .../contract_binds/utils/formatters.py | 7 + plasma_cash/contract_binds/utils/getWeb3.py | 27 + plasma_cash/demo.py | 114 ++ plasma_cash/dependency_config.py | 48 + plasma_cash/dump_test_data.py | 25 + plasma_cash/requirements.txt | 15 + plasma_cash/unit_test.py | 114 ++ plasma_cash/utils/__init__.py | 0 plasma_cash/utils/merkle/__init__.py | 0 .../utils/merkle/sparse_merkle_tree.py | 117 ++ plasma_cash/utils/utils.py | 27 + 34 files changed, 3325 insertions(+) create mode 100644 plasma_cash/.flake8 create mode 100644 plasma_cash/License.md create mode 100644 plasma_cash/Makefile create mode 100644 plasma_cash/README.md create mode 100644 plasma_cash/auto_respond_challenge.py create mode 100644 plasma_cash/benchmark.py create mode 100644 plasma_cash/challenge_after_demo.py create mode 100644 plasma_cash/challenge_before_demo.py create mode 100644 plasma_cash/challenge_between_demo.py create mode 100644 plasma_cash/child_chain/__init__.py create mode 100644 plasma_cash/child_chain/block.py create mode 100644 plasma_cash/child_chain/child_chain.py create mode 100644 plasma_cash/child_chain/exceptions.py create mode 100644 plasma_cash/child_chain/server.py create mode 100644 plasma_cash/child_chain/transaction.py create mode 100644 plasma_cash/client/child_chain_service.py create mode 100644 plasma_cash/client/client.py create mode 100644 plasma_cash/client/exceptions.py create mode 100644 plasma_cash/config.py create mode 100644 plasma_cash/contract_binds/base/contract.py create mode 100644 plasma_cash/contract_binds/erc721.py create mode 100644 plasma_cash/contract_binds/plasma_cash.py create mode 100644 plasma_cash/contract_binds/utils/colors.py create mode 100644 plasma_cash/contract_binds/utils/formatters.py create mode 100644 plasma_cash/contract_binds/utils/getWeb3.py create mode 100644 plasma_cash/demo.py create mode 100644 plasma_cash/dependency_config.py create mode 100644 plasma_cash/dump_test_data.py create mode 100644 plasma_cash/requirements.txt create mode 100644 plasma_cash/unit_test.py create mode 100644 plasma_cash/utils/__init__.py create mode 100644 plasma_cash/utils/merkle/__init__.py create mode 100644 plasma_cash/utils/merkle/sparse_merkle_tree.py create mode 100644 plasma_cash/utils/utils.py diff --git a/plasma_cash/.flake8 b/plasma_cash/.flake8 new file mode 100644 index 0000000..f9072d0 --- /dev/null +++ b/plasma_cash/.flake8 @@ -0,0 +1,2 @@ +[flake8] +exclude = unit_test.py, config.py diff --git a/plasma_cash/License.md b/plasma_cash/License.md new file mode 100644 index 0000000..f0d9818 --- /dev/null +++ b/plasma_cash/License.md @@ -0,0 +1,86 @@ +Copyright (C) 2018 Loom Network Inc + +GNU GENERAL PUBLIC LICENSE + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. +Preamble + +The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: + +a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. +b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. +c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) +These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. + +3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: + +a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, +b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, +c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) +The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. + +This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. diff --git a/plasma_cash/Makefile b/plasma_cash/Makefile new file mode 100644 index 0000000..c0ffaa0 --- /dev/null +++ b/plasma_cash/Makefile @@ -0,0 +1,9 @@ +test: + pytest unit_test.py + +lint: + flake8 child_chain client contract_binds utils *.py --ignore=E203,W503 --exclude unit_test.py,config.py,dump_test_data.py + +format: + black --line-length 79 -S . + isort -rc . diff --git a/plasma_cash/README.md b/plasma_cash/README.md new file mode 100644 index 0000000..adf02ec --- /dev/null +++ b/plasma_cash/README.md @@ -0,0 +1,35 @@ +# Development Dependencies + +A patched version of web3.py is used because otherwise it does not work with Ganache due to issue #674. In addition, in order to be able to monitor events, PR #827, which is not merged yet. Pyethereum dependencies broke recently so we need to manually install a slightly older version of rlp encoding. Flask is used for server purposes. + +On OSX + Homebrew +``` +source /usr/local/bin/virtualenvwrapper.sh +``` + + +``` +mkvirtualenv erc721plasma --python=/usr/bin/python3.6 +pip install -r requirements.txt +``` + +## Launch Plasma Chain + +1. Make sure the contracts are deployed at the correct addresses (`npm run migrate:dev` in `server` directory) +2. Run `FLASK_APP=./child_chain FLASK_ENV=development flask run --port=8546` in one terminal. This will start a Plasma Chain instance which listens at `localhost:8546` and is also connected to the deployed contracts +3. Run `python demo.py` + +TODO Should probably bundle these into makefiles, i.e. `make server` should launch the plasma chain. + + +## Testing + +``` +make test +``` + +## Linting + +``` +make lint +``` diff --git a/plasma_cash/auto_respond_challenge.py b/plasma_cash/auto_respond_challenge.py new file mode 100644 index 0000000..e56917e --- /dev/null +++ b/plasma_cash/auto_respond_challenge.py @@ -0,0 +1,66 @@ +import time + +from client.client import Client +from dependency_config import container +from utils.utils import increaseTime + +dan = Client(container.get_root('dan'), container.get_token('dan')) +trudy = Client(container.get_root('trudy'), container.get_token('trudy')) +authority = Client( + container.get_root('authority'), container.get_token('authority') +) + +# Give Trudy 5 tokens +trudy.register() + +danTokensStart = dan.token_contract.balance_of() + +# Trudy deposits a coin +tx_hash, gas_used = trudy.deposit(21) +event_data = trudy.root_chain.get_event_data('Deposit', tx_hash) +deposit1_utxo = event_data[0]['args']['slot'] + +# wait to make sure that events get fired correctly +time.sleep(2) + +trudy_submit_block = authority.get_block_number() +trudyTokensStart = trudy.token_contract.balance_of() + +coin = trudy.get_plasma_coin(deposit1_utxo) +authority.submit_block() +trudy.watch_exits(deposit1_utxo) + +# Trudy sends her coin to Dan +trudy_to_dan = trudy.send_transaction( + deposit1_utxo, coin['deposit_block'], dan.token_contract.account.address +) +authority.submit_block() +trudy_to_dan_block = authority.get_block_number() +trudy.stop_watching_exits(deposit1_utxo) + +# Dan attempts to exit his coin +coin = dan.get_plasma_coin(deposit1_utxo) +dan.start_exit(deposit1_utxo, coin['deposit_block'], trudy_to_dan_block) +authority.submit_block() +dan.watch_exits(deposit1_utxo) +dan.watch_challenges(deposit1_utxo) + +# Dan is challenged by Trudy +trudy.challenge_before(deposit1_utxo, 0, coin['deposit_block']) + +# Wait for dan to automatically respond to the challenge +time.sleep(2) + +# Dan successfully finalizes his exit +w3 = dan.root_chain.w3 +increaseTime(w3, 8 * 24 * 3600) +authority.finalize_exits() + +dan.withdraw(deposit1_utxo) + +danTokensEnd = dan.token_contract.balance_of() +print('dan has {} tokens'.format(danTokensEnd)) +assert ( + danTokensEnd == danTokensStart + 1 +), "END: dan has incorrect number of tokens" +print('Automatic challenge response success :)') diff --git a/plasma_cash/benchmark.py b/plasma_cash/benchmark.py new file mode 100644 index 0000000..a987cdf --- /dev/null +++ b/plasma_cash/benchmark.py @@ -0,0 +1,157 @@ +import collections + +from client.client import Client +from dependency_config import container +from utils.utils import increaseTime + +authority = Client( + container.get_root("authority"), container.get_token("authority") +) +w3 = authority.root_chain.w3 # get w3 instance + +child_block_interval = 1000 +block_iterations = 8 +coins_per_register = 5 +num_deposited_coins = 2 +coin_indices = range(0, num_deposited_coins) +number_of_players = 5 +players_indices = range(0, number_of_players) + +gas_costs = collections.defaultdict(dict) + +players = list( + map( + lambda index: Client( + container.get_root("players", index), + container.get_token("players", index), + ), + players_indices, + ) +) + +# Step 1: All players register to the game and are given 5 coins each. +# Step 2: They then proceed to deposit 2 of their coins to Plasma Cash. +deposits = {} +deposit_gas = 0 +for index in players_indices: + players[index].register() + for coin_index in coin_indices: + tx_hash, gas_used = players[index].deposit( + index * coins_per_register + coin_index + 1 + ) + deposit_gas += gas_used + print('GAS USED FOR A DEPOSIT', gas_used) + + deposits[index] = list( + map(lambda event: event["args"], players[index].get_all_deposits()) + ) + print("Player {} deposited coins: {}".format(index, deposits[index])) + +# Get mean gas cost for deposits +gas_costs['deposit'] = deposit_gas / (number_of_players * num_deposited_coins) + + +print("STEP 3") +# Step 3: Each player gives their deposited coins to the next player +# 1000 players * 2 coins = 2k Plasma transactions per round +# This loops `block_iterations` times. +for iteration in range(block_iterations): + for index in players_indices: + neighbor_index = (index + 1) % number_of_players + deposit_index = (index - iteration) % number_of_players + for coin_index in coin_indices: + prev_block = ( + deposits[index][coin_index]["blockNumber"] + if iteration == 0 + else iteration * child_block_interval + ) + print( + '{}: PLAYER {} to {} : Coin {} from block {}'.format( + iteration, + index, + neighbor_index, + deposits[deposit_index][coin_index]['slot'], + prev_block, + ) + ) + players[index].send_transaction( + deposits[deposit_index][coin_index]["slot"], + prev_block, + players[neighbor_index].token_contract.account.address, + ) + authority.submit_block() + +print("STEP 4") +# Step 4: All players initiate an exit for the coins they own. +# Since each player gave their coin to their neighbour, player `i` +# now owns the coins that player `(i-block_iterations) % num_players` +# initially had. Everyone initializes their exits +# by referencing the last 2 blocks +exit_gas = 0 +for index in players_indices: + received = (index - block_iterations) % number_of_players + for coin_index in coin_indices: + print( + 'PLAYER {} exiting {} from {}'.format(index, coin_index, received) + ) + slot = deposits[received][coin_index]["slot"] + prev_block = ( + deposits[received][coin_index]["blockNumber"] + if block_iterations == 1 + else (block_iterations - 1) * child_block_interval + ) + tx_hash, gas_used = players[index].start_exit( + slot, prev_block, block_iterations * child_block_interval + ) + exit_gas += gas_used + +gas_costs['exit'] = exit_gas / (number_of_players * num_deposited_coins) + + +increaseTime(w3, 8 * 24 * 3600) +# Somebody can finalize all exits, or each user can finalize their own +# authority.finalize_exits() + +# Final step: Each user finalizes their exit after challenge period +# has passed and then withdraws their coins. +withdraw_gas = 0 +finalize_exit_gas = 0 +for index in players_indices: + received = (index - block_iterations) % number_of_players + for coin_index in coin_indices: + slot = deposits[received][coin_index]["slot"] + tx_hash, gas_used = players[index].finalize_exit(slot) + finalize_exit_gas += gas_used + tx_hash, gas_used = players[index].withdraw(slot) + withdraw_gas += gas_used + print("Player {} withdrew coin: {}".format(index, slot)) + +gas_costs['finalize_exit'] = finalize_exit_gas / ( + number_of_players * num_deposited_coins +) +gas_costs['withdraw'] = withdraw_gas / ( + number_of_players * num_deposited_coins +) + +print('Benchmarking done :)') +print( + 'Mean gas cost for {} transfers: (Deposit + \ +Start Exit + Finalize Exit + Withdraw) = {}'.format( + block_iterations, sum(gas_costs.values()) + ) +) + +# Authority registers and transacts on-chain, index = 1000 +authority.register() +coin = number_of_players * coins_per_register + 2 +tx_hash, gas_transfer = authority.token_contract.transfer( + players[0].token_contract.account.address, coin +) + + +print( + 'Expected Gas cost for {} on-chain transfers \ +(safeTransferFrom) = {}'.format( + block_iterations, block_iterations * gas_transfer + ) +) diff --git a/plasma_cash/challenge_after_demo.py b/plasma_cash/challenge_after_demo.py new file mode 100644 index 0000000..43cc4d2 --- /dev/null +++ b/plasma_cash/challenge_after_demo.py @@ -0,0 +1,87 @@ +import time + +from client.client import Client +from dependency_config import container +from utils.utils import increaseTime + +dan = Client(container.get_root('dan'), container.get_token('dan')) +mallory = Client(container.get_root('mallory'), container.get_token('mallory')) +authority = Client( + container.get_root('authority'), container.get_token('authority') +) + +# Give Mallory 5 tokens +mallory.register() + +danTokensStart = dan.token_contract.balance_of() +print('Dan has {} tokens'.format(danTokensStart)) +assert danTokensStart == 0, "START: Dan has incorrect number of tokens" +malloryTokensStart = mallory.token_contract.balance_of() +print('Mallory has {} tokens'.format(malloryTokensStart)) +assert malloryTokensStart == 5, "START: Mallory has incorrect number of tokens" +current_block = authority.get_block_number() +print('current block: {}'.format(current_block)) + +# Mallory deposits one of her coins to the plasma contract +tx_hash, gas_used = mallory.deposit(6) +event_data = mallory.root_chain.get_event_data('Deposit', tx_hash) +deposit1_utxo = event_data[0]['args']['slot'] +mallory.deposit(7) +# wait to make sure that events get fired correctly +time.sleep(2) +registered_deposits = mallory.get_all_deposits() +assert ( + len(registered_deposits) == 2 +), "Mallory has incorrect number of deposits" + +malloryTokensPostDeposit = mallory.token_contract.balance_of() +print('Mallory has {} tokens'.format(malloryTokensPostDeposit)) +assert ( + malloryTokensPostDeposit == 3 +), "POST-DEPOSIT: Mallory has incorrect number of tokens" + +plasma_block1 = authority.submit_block() +plasma_block2 = authority.submit_block() + +# Mallory sends her coin to Dan +# Coin 6 was the first deposit of +coin = mallory.get_plasma_coin(deposit1_utxo) +mallory_to_dan = mallory.send_transaction( + deposit1_utxo, coin['deposit_block'], dan.token_contract.account.address +) +incl_proofs, excl_proofs = mallory.get_coin_history(deposit1_utxo) +assert dan.verify_coin_history(deposit1_utxo, incl_proofs, excl_proofs) + +plasma_block3 = authority.submit_block() +dan.watch_exits(deposit1_utxo) + +# Mallory attempts to exit spent coin (the one sent to Dan) +# This will be auto-challenged by Dan's client +mallory.start_exit(deposit1_utxo, 0, coin['deposit_block']) + +# Wait until challenge is done +time.sleep(2) +dan.start_exit(deposit1_utxo, coin['deposit_block'], plasma_block3) +dan.stop_watching_exits(deposit1_utxo) + +w3 = dan.root_chain.w3 # get w3 instance +increaseTime(w3, 8 * 24 * 3600) +authority.finalize_exits() + +dan.withdraw(deposit1_utxo) + +dan_balance_before = w3.eth.getBalance(dan.token_contract.account.address) +dan.withdraw_bonds() +dan_balance_after = w3.eth.getBalance(dan.token_contract.account.address) +assert ( + dan_balance_before < dan_balance_after +), "END: Dan did not withdraw his bonds" + +malloryTokensEnd = mallory.token_contract.balance_of() +print('Mallory has {} tokens'.format(malloryTokensEnd)) +assert malloryTokensEnd == 3, "END: Mallory has incorrect number of tokens" +danTokensEnd = dan.token_contract.balance_of() +print('Dan has {} tokens'.format(danTokensEnd)) +assert danTokensEnd == 1, "END: Dan has incorrect number of tokens" + +print('Plasma Cash `challengeAfter` success :)') diff --git a/plasma_cash/challenge_before_demo.py b/plasma_cash/challenge_before_demo.py new file mode 100644 index 0000000..bfe2ab3 --- /dev/null +++ b/plasma_cash/challenge_before_demo.py @@ -0,0 +1,79 @@ +import time + +from client.client import Client +from dependency_config import container +from utils.utils import increaseTime + +dan = Client(container.get_root('dan'), container.get_token('dan')) +trudy = Client(container.get_root('trudy'), container.get_token('trudy')) +mallory = Client(container.get_root('mallory'), container.get_token('mallory')) +authority = Client( + container.get_root('authority'), container.get_token('authority') +) + +# Give Dan 5 tokens +dan.register() + +# Dan deposits a coin +tx_hash, gas_used = dan.deposit(16) +event_data = dan.root_chain.get_event_data('Deposit', tx_hash) +deposit1_utxo = event_data[0]['args']['slot'] + +# wait to make sure that events get fired correctly +time.sleep(2) + +dan_submit_block = authority.get_block_number() +danTokensStart = dan.token_contract.balance_of() + +coin = dan.get_plasma_coin(deposit1_utxo) +authority.submit_block() +dan.watch_exits(deposit1_utxo) + +# Trudy sends her invalid coin to Mallory +trudy_to_mallory = trudy.send_transaction( + deposit1_utxo, + coin['deposit_block'], + mallory.token_contract.account.address, +) +authority.submit_block() +trudy_to_mallory_block = authority.get_block_number() + +# Mallory sends her invalid coin to Trudy +mallory_to_trudy = mallory.send_transaction( + deposit1_utxo, trudy_to_mallory_block, trudy.token_contract.account.address +) +authority.submit_block() +mallory_to_trudy_block = authority.get_block_number() + +# Trudy attemps to exit her illegitimate coin +trudy.start_exit(deposit1_utxo, trudy_to_mallory_block, mallory_to_trudy_block) +time.sleep(2) # need to wait a bit for authority to catch up + +w3 = dan.root_chain.w3 + +# Dan challenges Trudy's exit +increaseTime(w3, 8 * 24 * 3600) +authority.finalize_exits() +dan.start_exit(deposit1_utxo, 0, coin['deposit_block']) +dan.stop_watching_exits(deposit1_utxo) + +increaseTime(w3, 8 * 24 * 3600) +authority.finalize_exits() + +dan.withdraw(deposit1_utxo) + +dan_balance_before = w3.eth.getBalance(dan.token_contract.account.address) +dan.withdraw_bonds() +dan_balance_after = w3.eth.getBalance(dan.token_contract.account.address) +assert ( + dan_balance_before < dan_balance_after +), "END: Dan did not withdraw his bonds" + +danTokensEnd = dan.token_contract.balance_of() + +print('dan has {} tokens'.format(danTokensEnd)) +assert ( + danTokensEnd == danTokensStart + 1 +), "END: dan has incorrect number of tokens" + +print('Plasma Cash `challengeBefore` success :)') diff --git a/plasma_cash/challenge_between_demo.py b/plasma_cash/challenge_between_demo.py new file mode 100644 index 0000000..ca8713c --- /dev/null +++ b/plasma_cash/challenge_between_demo.py @@ -0,0 +1,74 @@ +import time + +from client.client import Client +from dependency_config import container +from utils.utils import increaseTime + +alice = Client(container.get_root('alice'), container.get_token('alice')) +bob = Client(container.get_root('bob'), container.get_token('bob')) +eve = Client(container.get_root('eve'), container.get_token('eve')) +authority = Client( + container.get_root('authority'), container.get_token('authority') +) + +bobTokensStart = bob.token_contract.balance_of() + +# Give Eve 5 tokens +eve.register() + +# Eve deposits a coin +tx_hash, gas_used = eve.deposit(11) +event_data = eve.root_chain.get_event_data('Deposit', tx_hash) +deposit1_utxo = event_data[0]['args']['slot'] + +# wait to make sure that events get fired correctly +time.sleep(2) + +# Eve sends her plasma coin to Bob +coin = eve.get_plasma_coin(deposit1_utxo) +eve_to_bob = eve.send_transaction( + deposit1_utxo, coin['deposit_block'], bob.token_contract.account.address +) +authority.submit_block() +eve_to_bob_block = authority.get_block_number() +bob.watch_exits(deposit1_utxo) + +# Eve sends this same plasma coin to Alice +eve_to_alice = eve.send_transaction( + deposit1_utxo, coin['deposit_block'], alice.token_contract.account.address +) +authority.submit_block() + +eve_to_alice_block = authority.get_block_number() + +# Alice attempts to exit here double-spent coin +# Bob auto-challenges Alice's exit +alice.start_exit(deposit1_utxo, coin['deposit_block'], eve_to_alice_block) + +# bob.challenge_between(deposit1_utxo, eve_to_bob_block) +# Wait for challenge +time.sleep(2) +bob.start_exit(deposit1_utxo, coin['deposit_block'], eve_to_bob_block) +bob.stop_watching_exits(deposit1_utxo) + +w3 = bob.root_chain.w3 # get w3 instance +increaseTime(w3, 8 * 24 * 3600) +authority.finalize_exits() + +bob.withdraw(deposit1_utxo) + +bob_balance_before = w3.eth.getBalance(bob.token_contract.account.address) +bob.withdraw_bonds() +bob_balance_after = w3.eth.getBalance(bob.token_contract.account.address) +assert ( + bob_balance_before < bob_balance_after +), "END: Bob did not withdraw his bonds" + +bobTokensEnd = bob.token_contract.balance_of() + +print('Bob has {} tokens'.format(bobTokensEnd)) +assert ( + bobTokensEnd == bobTokensStart + 1 +), "END: Bob has incorrect number of tokens" + +print('Plasma Cash `challengeBetween` success :)') diff --git a/plasma_cash/child_chain/__init__.py b/plasma_cash/child_chain/__init__.py new file mode 100644 index 0000000..42a9fa6 --- /dev/null +++ b/plasma_cash/child_chain/__init__.py @@ -0,0 +1,16 @@ +from flask import Flask + +from dependency_config import container + + +def create_app(): + app = Flask(__name__) + + # Create a child chain instance when creating a Flask app. + container.get_child_chain() + + from . import server + + app.register_blueprint(server.bp) + + return app diff --git a/plasma_cash/child_chain/block.py b/plasma_cash/child_chain/block.py new file mode 100644 index 0000000..28f0fe8 --- /dev/null +++ b/plasma_cash/child_chain/block.py @@ -0,0 +1,67 @@ +import rlp +from rlp.sedes import CountableList, binary +from web3.auto import w3 + +from child_chain.exceptions import (CoinAlreadyIncludedException, + InvalidBlockSignatureException) +from utils.merkle.sparse_merkle_tree import SparseMerkleTree +from utils.utils import get_sender, sign + +from .transaction import Transaction + + +class Block(rlp.Serializable): + + fields = [('transaction_set', CountableList(Transaction)), ('sig', binary)] + + def __init__(self, transaction_set=None, sig=b'\x00' * 65): + if transaction_set is None: + self.transactions = {} + else: + self.transactions = {tx.uid: tx for tx in transaction_set} + self.merkle = None + self.sig = sig + + @property + def hash(self): + return w3.sha3(rlp.encode(self, UnsignedBlock)) + + @property + def merkle_hash(self): + return w3.sha3(rlp.encode(self)) + + @property + def transaction_set(self): + return list(self.transactions.values()) + + @property + def sender(self): + if self.sig == b'\x00' * 65: + raise InvalidBlockSignatureException('Block not signed') + return get_sender(self.hash, self.sig) + + def merklize_transaction_set(self): + hashed_transaction_dict = { + tx.uid: tx.hash for tx in self.transactions.values() + } + self.merkle = SparseMerkleTree(64, hashed_transaction_dict) + return self.merkle.root + + def add_tx(self, tx): + if tx.uid in self.transactions: + raise CoinAlreadyIncludedException('double spend rejected') + else: + self.transactions[tx.uid] = tx + + # `uid` is the coin that was transferred + def get_tx_by_uid(self, uid): + if uid in self.transactions: + return self.transactions[uid] + else: + return Transaction(0, 0, 0, 0) + + def sign(self, key): + self.sig = sign(self.hash, key) + + +UnsignedBlock = Block.exclude(['sig']) diff --git a/plasma_cash/child_chain/child_chain.py b/plasma_cash/child_chain/child_chain.py new file mode 100644 index 0000000..2831e0a --- /dev/null +++ b/plasma_cash/child_chain/child_chain.py @@ -0,0 +1,121 @@ +import rlp +from ethereum import utils +from web3.auto import w3 + +from .block import Block +from .exceptions import (InvalidPrevBlockException, + InvalidTxSignatureException, + PreviousTxNotFoundException, TxAlreadySpentException) +from .transaction import Transaction + + +class ChildChain(object): + ''' + Operator runs child chain, watches all Deposit events and creates + deposit blocks + ''' + + def __init__(self, root_chain): + self.root_chain = root_chain # PlasmaCash object from plasma_cash.py + self.authority = self.root_chain.account.address + self.key = self.root_chain.account.privateKey + self.blocks = {} + self.current_block = Block() + self.child_block_interval = 1000 + self.current_block_number = 0 + + # Watch all deposit events, callback to self._send_deposit + self.root_chain.watch_event('Deposit', self._send_deposit, 0.1) + + def _send_deposit(self, event): + ''' Called by event watcher and creates a deposit block ''' + slot = event['args']['slot'] + blknum = int(event['args']['blockNumber']) + # Currently, denomination is always 1. This may change in the future. + denomination = event['args']['denomination'] + depositor = event['args']['from'] + deposit_tx = Transaction(slot, 0, denomination, depositor) + + # create a new plasma block on deposit + deposit_block = Block([deposit_tx]) + self.blocks[blknum] = deposit_block + + def submit_block(self): + ''' Submit the merkle root to the chain from the authority ''' + block = self.current_block + block.make_mutable() + block.sign(self.key) + block.make_immutable() + self.current_block_number += self.child_block_interval + merkle_hash = w3.toHex(block.merklize_transaction_set()) + self.root_chain.submit_block(merkle_hash) + + self.blocks[self.current_block_number] = self.current_block + self.current_block = Block() + return str(self.current_block_number) + + def send_transaction(self, transaction): + tx = rlp.decode(utils.decode_hex(transaction), Transaction) + # Reject transactions refering to a future block as prev_block + if ( + tx.prev_block + > self.current_block_number + self.child_block_interval + ): + raise InvalidPrevBlockException('failed to send transaction') + + # If the tx we are spending is not a deposit tx + if tx.prev_block % self.child_block_interval == 0: + # If the TX we are referencing was initially a deposit TX, then it + # does not have a signature attached + + # The tx we are referencing should be included in a block + prev_tx = self.blocks[tx.prev_block].get_tx_by_uid(tx.uid) + if prev_tx is None: + raise PreviousTxNotFoundException('failed to send transaction') + # The tx we are referencing should not be spent + if prev_tx.spent: + raise TxAlreadySpentException('failed to send transaction') + # deposit tx if prev_block is 0 + if ( + prev_tx.prev_block % self.child_block_interval == 0 + and utils.normalize_address(tx.sender) != prev_tx.new_owner + ): + raise InvalidTxSignatureException('failed to send transaction') + # `add_tx` automatically checks if the coin has already been moved + # in the current block + self.current_block.add_tx(tx) + prev_tx.spent = True # Mark the previous tx as spent + # If the tx we are spending is a deposit tx + else: + self.current_block.add_tx(tx) + return tx.hash + + def get_current_block(self): + return rlp.encode(self.current_block).hex() + + def get_block(self, blknum): + if blknum > self.current_block_number: + return rlp.encode(Block()).hex() + else: + return rlp.encode(self.blocks[blknum]).hex() + + def get_block_number(self): + return self.current_block_number + + def get_proof(self, blknum, slot): + block = self.blocks[blknum] + block.merklize_transaction_set() + return block.merkle.create_merkle_proof(slot).hex() + + def get_tx(self, blknum, slot): + block = self.blocks[blknum] + tx = block.get_tx_by_uid(slot) + return rlp.encode(tx).hex() + + def get_tx_and_proof(self, blknum, slot): + tx = self.get_tx(blknum, slot) + if blknum % self.child_block_interval != 0: + proof = '00' * 8 + else: + proof = self.get_proof(blknum, slot) + return tx, proof diff --git a/plasma_cash/child_chain/exceptions.py b/plasma_cash/child_chain/exceptions.py new file mode 100644 index 0000000..7fb6b72 --- /dev/null +++ b/plasma_cash/child_chain/exceptions.py @@ -0,0 +1,26 @@ +class InvalidTxSignatureException(Exception): + """the signature of a tx is invalid""" + + +class CoinAlreadyIncludedException(Exception): + """the coin uid has already been included in block""" + + +class InvalidBlockSignatureException(Exception): + """the signature of a block is invalid""" + + +class PreviousTxNotFoundException(Exception): + """previous transaction is not found""" + + +class TxAlreadySpentException(Exception): + """the transaction is already spent""" + + +class TxAmountMismatchException(Exception): + """tx input total amount is not equal to output total amount""" + + +class InvalidPrevBlockException(Exception): + """prev block cannot be bigger than current block""" diff --git a/plasma_cash/child_chain/server.py b/plasma_cash/child_chain/server.py new file mode 100644 index 0000000..1874cbd --- /dev/null +++ b/plasma_cash/child_chain/server.py @@ -0,0 +1,55 @@ +from flask import Blueprint, jsonify, request + +from dependency_config import container + +bp = Blueprint('api', __name__) + + +@bp.route('/block/', methods=['GET']) +def get_block(blknum): + return container.get_child_chain().get_block(int(blknum)) + + +@bp.route('/block', methods=['GET']) +def get_current_block(): + return container.get_child_chain().get_current_block() + + +@bp.route('/blocknumber', methods=['GET']) +def get_block_number(): + return str(container.get_child_chain().get_block_number()) + + +@bp.route('/tx_proof', methods=['GET']) +def get_tx_and_proof(): + blknum = int(request.args.get('blknum')) + slot = int(request.args.get('slot')) + tx, proof = container.get_child_chain().get_tx_and_proof( + int(blknum), int(slot) + ) + return jsonify({'tx': tx, 'proof': proof}) + + +@bp.route('/tx', methods=['GET']) +def get_tx(): + blknum = int(request.args.get('blknum')) + slot = int(request.args.get('slot')) + return container.get_child_chain().get_tx(blknum, slot) + + +@bp.route('/proof', methods=['GET']) +def get_proof(): + blknum = int(request.args.get('blknum')) + slot = int(request.args.get('slot')) + return container.get_child_chain().get_proof(blknum, slot) + + +@bp.route('/submit_block', methods=['POST']) +def submit_block(): + return container.get_child_chain().submit_block() + + +@bp.route('/send_tx', methods=['POST']) +def send_tx(): + tx = request.form['tx'] + return container.get_child_chain().send_transaction(tx) diff --git a/plasma_cash/child_chain/transaction.py b/plasma_cash/child_chain/transaction.py new file mode 100644 index 0000000..6bc7fc1 --- /dev/null +++ b/plasma_cash/child_chain/transaction.py @@ -0,0 +1,54 @@ +import ethereum.utils +import rlp +from rlp.sedes import big_endian_int, binary +from web3.auto import w3 + +from utils.utils import get_sender, sign + +from .exceptions import InvalidTxSignatureException + + +class Transaction(rlp.Serializable): + + fields = [ + ('uid', big_endian_int), + ('prev_block', big_endian_int), + ('denomination', big_endian_int), + ('new_owner', ethereum.utils.address), + ('sig', binary), + ] + + def __init__( + self, uid, prev_block, denomination, new_owner, sig=b'\x00' * 65 + ): + self.uid = uid + self.prev_block = prev_block + self.denomination = denomination + self.new_owner = ethereum.utils.normalize_address(new_owner) + self.sig = sig + self.spent = False # not part of the rlp + self.make_mutable() + + @property + def hash(self): + if self.prev_block != 0: + ret = w3.sha3(rlp.encode(self, UnsignedTransaction)) + else: + ret = w3.soliditySha3(['uint64'], [self.uid]) + return ret + + @property + def merkle_hash(self): + return w3.sha3(rlp.encode(self)) + + @property + def sender(self): + if self.sig == b'\x00' * 65: + raise InvalidTxSignatureException('Tx not signed') + return get_sender(self.hash, self.sig) + + def sign(self, key): + self.sig = sign(self.hash, key) + + +UnsignedTransaction = Transaction.exclude(['sig']) diff --git a/plasma_cash/client/child_chain_service.py b/plasma_cash/client/child_chain_service.py new file mode 100644 index 0000000..249df96 --- /dev/null +++ b/plasma_cash/client/child_chain_service.py @@ -0,0 +1,73 @@ +import requests + +from .exceptions import RequestFailedException + + +class ChildChainService(object): + def __init__(self, base_url, verify=False, timeout=5): + self.base_url = base_url + self.verify = verify + self.timeout = timeout + + def request(self, end_point, method, params=None, data=None, headers=None): + url = self.base_url + end_point + + response = requests.request( + method=method, + url=url, + params=params, + data=data, + headers=headers, + verify=self.verify, + timeout=self.timeout, + ) + + if response.ok: + return response + else: + raise RequestFailedException( + 'failed with response: {}'.format(response) + ) + + def get_current_block(self): + end_point = '/block' + response = self.request(end_point, 'GET') + return response.text + + def get_block_number(self): + end_point = '/blocknumber' + response = self.request(end_point, 'GET') + return int(response.text) + + def get_block(self, blknum): + end_point = '/block/{}'.format(blknum) + response = self.request(end_point, 'GET') + return response.text + + def get_proof(self, blknum, slot): + end_point = '/proof' + params = {'blknum': blknum, 'slot': slot} + response = self.request(end_point, 'GET', params=params) + return response.text + + def get_tx_and_proof(self, blknum, slot): + end_point = '/tx_proof' + params = {'blknum': blknum, 'slot': slot} + response = self.request(end_point, 'GET', params=params) + return response.text + + def get_tx(self, blknum, slot): + end_point = '/tx' + params = {'blknum': blknum, 'slot': slot} + response = self.request(end_point, 'GET', params=params) + return response.text + + def submit_block(self): + end_point = '/submit_block' + response = self.request(end_point, 'POST') + return int(response.text) + + def send_transaction(self, tx): + end_point = '/send_tx' + data = {'tx': tx} + self.request(end_point, 'POST', data=data) diff --git a/plasma_cash/client/client.py b/plasma_cash/client/client.py new file mode 100644 index 0000000..336a9e3 --- /dev/null +++ b/plasma_cash/client/client.py @@ -0,0 +1,438 @@ +import json + +import rlp +from ethereum import utils + +from child_chain.block import Block +from child_chain.transaction import Transaction, UnsignedTransaction + +from .child_chain_service import ChildChainService + + +class Client(object): + def __init__( + self, + root_chain, + token_contract, + child_chain=ChildChainService('http://localhost:8546'), + ): + self.root_chain = root_chain + self.key = token_contract.account.privateKey + self.token_contract = token_contract + self.child_chain = child_chain + self.child_block_interval = 1000 + + # Proof related state + self.incl_proofs = {} + self.excl_proofs = {} + self.txs = {} + + # Event watchers + self.watchers = {} + self.challenge_watchers = {} + + # Token Functions + + def register(self): + ''' Register a new player and grant 5 cards, for demo purposes''' + tx_hash, gas_used = self.token_contract.register() + return tx_hash, gas_used + + def deposit(self, tokenId): + ''' Deposit happens by a use calling the erc721 token contract ''' + tx_hash, gas_used = self.token_contract.deposit(tokenId) + return tx_hash, gas_used + + # Plasma Functions + + def start_exit(self, slot, prev_tx_blk_num, tx_blk_num): + ''' + As a user, you declare that you want to exit a coin at slot `slot` + at the state which happened at block `tx_blk_num` and you also need to + reference a previous block + ''' + # TODO The actual proof information should be passed to a user from its + # previous owners, this is a hacky way of getting the info from the + # operator which sould be changed in the future after the exiting + # process is more standardized + if tx_blk_num % self.child_block_interval != 0: + # In case the sender is exiting a Deposit transaction, they should + # just create a signed transaction to themselves. There is no need + # for a merkle proof. + + # prev_block = 0 , denomination = 1 + exiting_tx = Transaction( + slot, 0, 1, self.token_contract.account.address + ) + exiting_tx.make_mutable() + exiting_tx.sign(self.key) + exiting_tx.make_immutable() + tx_hash, gas_used = self.root_chain.start_exit( + slot, + b'0x0', + rlp.encode(exiting_tx, UnsignedTransaction), + b'0x0', + b'0x0', + exiting_tx.sig, + 0, + tx_blk_num, + ) + else: + # Otherwise, they should get the raw tx info from the block + # And the merkle proof and submit these + exiting_tx, exiting_tx_proof = self.get_tx_and_proof( + tx_blk_num, slot + ) + prev_tx, prev_tx_proof = self.get_tx_and_proof( + prev_tx_blk_num, slot + ) + + tx_hash, gas_used = self.root_chain.start_exit( + slot, + rlp.encode(prev_tx, UnsignedTransaction), + rlp.encode(exiting_tx, UnsignedTransaction), + prev_tx_proof, + exiting_tx_proof, + exiting_tx.sig, + prev_tx_blk_num, + tx_blk_num, + ) + return tx_hash, gas_used + + def challenge_before(self, slot, prev_tx_blk_num, tx_blk_num): + if tx_blk_num % self.child_block_interval != 0: + # In case the sender is exiting a Deposit transaction, they should + # just create a signed transaction to themselves. There is no need + # for a merkle proof. + + # prev_block = 0 , denomination = 1 + exiting_tx = Transaction( + slot, 0, 1, self.token_contract.account.address + ) + exiting_tx.make_mutable() + exiting_tx.sign(self.key) + exiting_tx.make_immutable() + tx_hash, gas_used = self.root_chain.challenge_before( + slot, + b'0x0', + rlp.encode(exiting_tx, UnsignedTransaction), + b'0x0', + b'0x0', + exiting_tx.sig, + 0, + tx_blk_num, + ) + else: + # Otherwise, they should get the raw tx info from the block + # And the merkle proof and submit these + exiting_tx, exiting_tx_proof = self.get_tx_and_proof( + tx_blk_num, slot + ) + prev_tx, prev_tx_proof = self.get_tx_and_proof( + prev_tx_blk_num, slot + ) + + tx_hash, gas_used = self.root_chain.challenge_before( + slot, + rlp.encode(prev_tx, UnsignedTransaction), + rlp.encode(exiting_tx, UnsignedTransaction), + prev_tx_proof, + exiting_tx_proof, + exiting_tx.sig, + prev_tx_blk_num, + tx_blk_num, + ) + return tx_hash, gas_used + + def respond_challenge_before(self, slot, challenging_block_number): + ''' + Respond to an exit with invalid history challenge by proving that + you were given the coin under question + ''' + challenging_tx, proof = self.get_tx_and_proof( + challenging_block_number, slot + ) + + tx_hash, gas_used = self.root_chain.respond_challenge_before( + slot, + challenging_block_number, + rlp.encode(challenging_tx, UnsignedTransaction), + proof, + challenging_tx.sig, + ) + return tx_hash, gas_used + + def challenge_between(self, slot, challenging_block_number): + ''' + `Double Spend Challenge`: Challenge a double spend of a coin + with a spend between the exit's blocks + ''' + challenging_tx, proof = self.get_tx_and_proof( + challenging_block_number, slot + ) + + tx_hash, gas_used = self.root_chain.challenge_between( + slot, + challenging_block_number, + rlp.encode(challenging_tx, UnsignedTransaction), + proof, + challenging_tx.sig, + ) + return tx_hash, gas_used + + def challenge_after(self, slot, challenging_block_number): + ''' + `Exit Spent Coin Challenge`: Challenge an exit with a spend + after the exit's blocks + ''' + challenging_tx, proof = self.get_tx_and_proof( + challenging_block_number, slot + ) + tx_hash, gas_used = self.root_chain.challenge_after( + slot, + challenging_block_number, + rlp.encode(challenging_tx, UnsignedTransaction), + proof, + challenging_tx.sig, + ) + return tx_hash, gas_used + + def finalize_exit(self, slot): + tx_hash, gas_used = self.root_chain.finalize_exit(slot) + return tx_hash, gas_used + + def finalize_exits(self): + tx_hash, gas_used = self.root_chain.finalize_exits() + return tx_hash, gas_used + + def withdraw(self, slot): + tx_hash, gas_used = self.root_chain.withdraw(slot) + return tx_hash, gas_used + + def withdraw_bonds(self): + tx_hash, gas_used = self.root_chain.withdraw_bonds() + return tx_hash, gas_used + + def get_plasma_coin(self, slot): + return self.root_chain.get_plasma_coin(slot) + + def get_block_root(self, blknum): + return self.root_chain.get_block_root(blknum) + + def check_inclusion(self, leaf, root, slot, proof): + return self.root_chain.check_inclusion(leaf, root, slot, proof) + + def check_exclusion(self, root, slot, proof): + return self.root_chain.check_exclusion(root, slot, proof) + + # Child Chain Functions + + def get_block_numbers(self, slot): + # First get the coin's deposit block + # todo efficiency -> start_block should be updated to the last block + # obtained last time + start_block = self.get_plasma_coin(slot)['deposit_block'] + + # Get next non-deposit block + next_deposit = ( + (start_block + self.child_block_interval) + // self.child_block_interval + * self.child_block_interval + ) + end_block = self.get_block_number() + + # Create a list of indexes with coin's deposit block + # and all subsequent submitted blocks that followed + block_numbers = [start_block] + list( + range(next_deposit, end_block + 1, self.child_block_interval) + ) + return block_numbers + + def get_coin_history(self, slot): + block_numbers = self.get_block_numbers(slot) + + incl_proofs = {} + excl_proofs = {} + txs = {} + for blknum in block_numbers: + blk_root = self.root_chain.get_block_root(blknum) + tx, proof = self.get_tx_and_proof(blknum, slot) + txs[blknum] = tx + if self.check_inclusion(tx, blk_root, slot, proof): + incl_proofs[blknum] = proof + else: + excl_proofs[blknum] = proof + + # Save the proofs to the client's "state", and return + self.incl_proofs[slot] = incl_proofs + self.excl_proofs[slot] = excl_proofs + self.txs[slot] = txs + return incl_proofs, excl_proofs + + # received_proofs should be a dictionary with merkle branches for each + # block + def verify_coin_history(self, slot, incl_proofs, excl_proofs): + # Sanity checks, make sure incl_proofs and excl_proofs have all the + # correct keys for the coin + incl_keys = set(incl_proofs) + excl_keys = set(excl_proofs) + if len(incl_keys.intersection(excl_keys)) != 0: + return False + + # gets all of the coin's block numbers + block_numbers = self.get_block_numbers(slot) + # ensure that all keys are included + if incl_keys.union(excl_keys) != set(block_numbers): + return False + + # assert inclusion proofs + for blknum, proof in incl_proofs.items(): + blk_root = self.root_chain.get_block_root(blknum) + # should we be polling the tx from the operator or trusting the + # receiver? + tx = self.get_tx(blknum, slot) + if not self.check_inclusion(tx, blk_root, slot, proof): + return False + + # assert exclusion proof / i.e. leaf at that slot is empty hash + for blknum, proof in excl_proofs.items(): + blk_root = self.root_chain.get_block_root(blknum) + if not self.check_exclusion(blk_root, slot, proof): + return False + # If it does not hit any of the return false branches, it's OK + return True + + def submit_block(self): + return self.child_chain.submit_block() + + def send_transaction(self, slot, prev_block, new_owner): + new_owner = utils.normalize_address(new_owner) + tx = Transaction(slot, prev_block, 1, new_owner) + tx.make_mutable() + tx.sign(self.key) + tx.make_immutable() + self.child_chain.send_transaction(rlp.encode(tx, Transaction).hex()) + return tx + + def watch_challenges(self, slot): + self.challenge_watchers[slot] = self.root_chain.watch_event( + 'ChallengedExit', + self._respond_to_challenge, + 0.1, + filters={'slot': slot}, + ) + + def _respond_to_challenge(self, event): + slot = event['args']['slot'] + print( + "CHALLENGE DETECTED by {} -- slot: {}".format( + self.token_contract.account.address, slot + ) + ) + # fetch coin history + incl_proofs, excl_proofs = self.get_coin_history(slot) + received_block = max(incl_proofs.keys()) + self.respond_challenge_before(slot, received_block) + + def stop_watching_challenges(self, slot): + # a user stops watching exits of a particular coin after transferring + # it to another plasma user + event_filter = self.challenge_watchers[slot] + self.root_chain.w3.eth.uninstallFilter(event_filter.filter_id) + + def watch_exits(self, slot): + # TODO figure out how to have this function be invoked automatically + self.watchers[slot] = self.root_chain.watch_event( + 'StartedExit', self._respond_to_exit, 0.1, filters={'slot': slot} + ) + + def _respond_to_exit(self, event): + ''' Called by event watcher and checks that the exit event is + legitimate + ''' + slot = event['args']['slot'] + owner = event['args']['owner'] + print( + "EXIT DETECTED by {} -- slot: {}, owner: {}".format( + self.token_contract.account.address, slot, owner + ) + ) + + # A coin-owner will automatically start a challenge if he believes he + # owns a coin that has been exited by someone else + if owner != self.token_contract.account.address: + print("invalid exit...challenging") + + # fetch exit information + exit_details = self.root_chain.get_exit(slot) + [owner, prev_block, exit_block, state] = exit_details + + # fetch coin history + incl_proofs, excl_proofs = self.get_coin_history(slot) + blocks = self.get_block_numbers(slot) # skip the deposit tx block + for blk in blocks: + if blk not in incl_proofs: + continue + if blk > exit_block: + print( + 'CHALLENGE AFTER -- {} at block {}'.format(slot, blk) + ) + self.challenge_after(slot, blk) + break + elif prev_block < blk < exit_block: + print( + 'CHALLENGE BETWEEN -- {} at block {}'.format( + slot, blk + ) + ) + self.challenge_between(slot, blk) + break + elif blk < prev_block < exit_block: + # Need to find a previous block + tx = self.get_tx(blk, slot) + print( + 'CHALLENGE BEFORE -- {} at prev block {} / block {}' + .format( + slot, tx.prev_block, blk + ) + ) + self.challenge_before(slot, tx.prev_block, blk) + break + else: + print("valid exit") + + def stop_watching_exits(self, slot): + # a user stops watching exits of a particular coin after transferring + # it to another plasma user + event_filter = self.watchers[slot] + self.root_chain.w3.eth.uninstallFilter(event_filter.filter_id) + + def get_block_number(self): + return self.child_chain.get_block_number() + + def get_current_block(self): + block = self.child_chain.get_current_block() + return rlp.decode(utils.decode_hex(block), Block) + + def get_block(self, blknum): + block = self.child_chain.get_block(blknum) + return rlp.decode(utils.decode_hex(block), Block) + + def get_tx(self, blknum, slot): + tx_bytes = self.child_chain.get_tx(blknum, slot) + tx = rlp.decode(utils.decode_hex(tx_bytes), Transaction) + return tx + + def get_tx_and_proof(self, blknum, slot): + data = json.loads(self.child_chain.get_tx_and_proof(blknum, slot)) + tx = rlp.decode(utils.decode_hex(data['tx']), Transaction) + proof = utils.decode_hex(data['proof']) + return tx, proof + + def get_proof(self, blknum, slot): + return utils.decode_hex(self.child_chain.get_proof(blknum, slot)) + + def get_all_deposits(self): + return self.root_chain.get_all_deposits( + self.root_chain.account.address + ) diff --git a/plasma_cash/client/exceptions.py b/plasma_cash/client/exceptions.py new file mode 100644 index 0000000..252176e --- /dev/null +++ b/plasma_cash/client/exceptions.py @@ -0,0 +1,2 @@ +class RequestFailedException(Exception): + """request failed without success http status""" diff --git a/plasma_cash/config.py b/plasma_cash/config.py new file mode 100644 index 0000000..0f83e4e --- /dev/null +++ b/plasma_cash/config.py @@ -0,0 +1,1006 @@ +plasma_config = dict( + validator_manager='0xf5cad0db6415a71a5bc67403c87b56b629b4ddaa', + root_chain='0x9e51aeeeca736cd81d27e025465834b8ec08628a', + token_contract='0x1aa76056924bf4768d63357eca6d6a56ec929131', + authority='0x7920ca01d3d1ac463dfd55b5ddfdcbb64ae31830f31be045ce2d51a305516a37', + alice='0xbb63b692f9d8f21f0b978b596dc2b8611899f053d68aec6c1c20d1df4f5b6ee2', + bob='0x2f615ea53711e0d91390e97cdd5ce97357e345e441aa95d255094164f44c8652', + charlie='0x7d52c3f6477e1507d54a826833169ad169a56e02ffc49a1801218a7d87ca50bd', + dan='0x6aecd44fcb79d4b68f1ee2b2c706f8e9a0cd06b0de4729fe98cfed8886315256', + mallory='0x686e245584fdf696abd739c0e66ac6e01fc4c68babee20c7124566e118b2a634', + eve='0x9fd4ab25e1699bb252f4d5c4510a135db34b3adca8baa03194ad5cd6faa13a1d', + trudy='0xe8445efa4e3349c3c74fd6689553f93b55aca723115fb777e1e6f4db2a0a82ca', + players=[ + '0x56901d80abc6953d1dc01de2f077b75260f49a3304f665b57ed13514a7e2a2bc', + '0xedc63d0e14b29aaa26c7585e962f93abb59bd7d8b01b585e073dc03d052a000b', + '0x6b9e9cc46d205668eff6eaa0c4ec6375d475e8ebd821bc79cc4239571560df15', + '0x9d1158552b8b649568712ce07336c089a87399bae04bd6651d586eeae004f029', + '0x28305e246a4eb211efe2b2e7a05b90b4b71f088f79e175d5319f86936fd8d25d', + '0xaf17c1894d128f37245cf417992ffdf0a373409ad2e14f815dbfc9915a5c7551', + '0xba208bc99befd670f72705cec35c009e11da8c5377ed873a421cbe90a5934e16', + '0x4690fc991c2becc3d6cbd42e831ecd6bc16816f63d07c66497e080cf93cbcd76', + '0x7ad566934cb886c6e3e4c1b44c30308b1fc1f0740616977acb9ed3c7fd6299c2', + '0x98a741a13e32780d551ed69f072917d4ded9ba9e87d6c02ff75485657c553a8e', + '0xc4ba90ff666439ea4f936a2eade243d0f38a79c805fe131d85f223fbc8bfa92f', + '0xbde6bc84d8dd830d291dd2f465830b4e64330f4b2ad0c3a8645cc61f692ace9e', + '0x12314dd07cf4b5c7e13d40c57d06d45082f4f039bff46abcfbf2fe34a797a1ae', + '0xab079a14279ef10a7fcf12b84aebb38fe1c4e17e56fd5cc324008a06e8944acc', + '0x2eae6a6374e09e4881b5e9347907787ac124e29190b331df745c953b2b312836', + '0xa4c6bb53128ee75484d01ed317890186fe1ec42d7ffe13f2cbfdf2cf342f7b59', + '0x08ef7fa5af2da1f832ae9eca0b51674fc107779f96bbe0172448b782956574c9', + '0x4ed33011d8480d51be9f3e00d482f53a55916a38bf1ec0477af69265e6465128', + '0x563f4d086ad6411a508228b53cc8e2f3c168d5b1e83c662189ce1b45a5707f95', + '0xb8b6b7c722dd2d3f237b108b36443c3ed004a616edd279bc527e8ac281bf784c', + '0x7bbb605ffc49c51d62a23bb6b91595572c13aab36df590ac11d7aa7f31a76070', + '0x51d6fcc0308ad3c5ad3d1c1ebcf726c521664e470686e7d224aea8bf1f693a44', + '0xcc02756fcfd744216aac84012e464968a7eef5747bdf412d81401192d80e2980', + '0x69a5614a1bdde1a20cdb7e357795e6cf25b13b3656b36b544e70e57c9591be94', + '0x5fc030174cfbaa365009535fd9788cf4284c13d64505ff58f5eb2ca65a1da412', + '0x56cc68f7d6de9a3defa6e9c2a81296fd5ad081d01aa1e01302b03299ac2f34c5', + '0xe3d13bb22b6d6b129663f75757192d61e8794c0c422faf7199f1a2a6461b9689', + '0x54f8a326adf8dd1c0a7f6b94b005e9d23bb2f811d0da68609f012c84bfb28cb4', + '0xa16a14cb839b775663ffa458bf43348c0a90d57064b0063b651d0bd7eca7c908', + '0x481d98605401574a1b3b075b7144b36f5a9391f1085e65c07deed8e26e11b2fd', + '0x64453165226fa1ec7f9becdfcfe43d8efe24a56026354b3997fe991ece83588d', + '0xfd13089d668c30c97df290605a6b911abc274aca26e1ca6ed70cd33fd07785c8', + '0x7c58b95b27ea61b42d00293a52b4bb56b3c75993d38fb1da04e5a87f84cf7382', + '0xa2e913875457329142bab81220a43722c8e6158457698d1b12db0d0686f43029', + '0x479c694bca25d8c34e52653358d9f81e7f9bc86c5a752208c1e37fcabc95c767', + '0xc3cf4b377408ad08daac6cc7924b23c92010514ff586b774743f33b4c8a44a14', + '0xc0c9203db737afdd4d9fca9246c687464da857df87554edfbd42e2184d35921a', + '0x1239798c7eca855e077884f07301df87e5e615d19b41966d7c4cde1131483ee1', + '0x24a69c3bb1309406946d95ea39e9ac7277c75aed439867b4d3af520c9276c344', + '0x4b42f9038e56fa71d1b9bfea7dad07818a88b52d338ebf02f51c985f796718be', + '0xb38b05194331a302d47f43ad64de79ee5caf68ded3272e0badc36b3ccd730ba8', + '0xe3b8c51b27d36b20d95dd055699fc92d29b6af3c98053eb91320c3afcdb74002', + '0x8ba630b036ed5b84bc75950c01b52375ef0fecc56b0cd36f5e7420e993b9ee19', + '0x02a95f059b3129f355d752d76416812c17396c567345dd063cc5848be54994f9', + '0x3c105ee0a01f60364230ec793fa7d805729b2b3b96e23000ca4a37a23ca9cd18', + '0x1d9a6556cec52fe4e6db9c5d6a5a428e10b419953bcf78883678b21eb9d6883b', + '0x384c15ed08ab291b5d0ac96b720d191050dcc8a55afaf03a08b7816c4e81a319', + '0xb54793d3e6da6ec63581a821039430cce1327e606cd7488e0908db286f4e1fe8', + '0x234887f9bca2c7f72cc5d99a58cd1a5da1120fba0e96f815b6c65acf66369eb1', + '0x61910788ac89453fc03f4ae5d553700970ed5042e8777712d3e37ff6d8a1c3f5', + '0x6bdcabdb7b1997e7ecc7007fdd61477f7fae7b1c0092a8db37c3cd3d2e3b679b', + '0xa3bf93cda070784568e16a00133b75bd69d2f9576affc2a4f4a275ee2d2dcd4e', + '0xa78ae2afc2d142cd618f5e329a17933c63260de9bc1677faeaaabe34bc8b9060', + '0xb767e548e13d432ca5c103ecbd6b8a2cd5f90308f3422d16089a5f6a02d2c1ff', + '0x915d00fb7675f81eeaa7b02a6a3d96c71d689ed6aa36a009742e6562870ba58d', + '0x6ce991ee7ef662f824a7be3c72df22d4779b9744b56250241099386b8465ab48', + '0x1d4934de5ebf00f8741596ebc0e082aa302ffed7168f3b913dab5788ddd92e37', + '0x4700c10cb2e4d1154bb3c4e1b4eac5cf6dc279a37642aff2f2a34cde3ca4de1d', + '0xa47dba9b240d4fcbc2b206f77323c280f332f893cc058b644aa397c24317010d', + '0xd639109e0ecfcc9008c8a345716c64c0d83f316f2972ece578e40cb36b082688', + '0x8b6597d6e6bdd31dcc6f3cfec72c3791469c3619e1f652ce59be0d2a73508422', + '0x4989557d49cd119e22dfcf914a295d94542937df4ea20a24d8c55a199cd8d6d3', + '0xfed5f0def7b124f0419f21c7ef5937ea746cc83c547c25829ceec161f75c9160', + '0x8beda63ff799e9de0663d093e8f200a85115d0f947cfba96b5429240ed8ed2ad', + '0x8a21eef34fa1a89be565ffd147ef765bae6652952b7f36a2b6e41a9e7fc4ceec', + '0x3c7834d02e74c53da10c7275d4abe0e60ed879eeeaee1c9aebf1074c9bf013c0', + '0xeadc332653d31a71e4e20a42fb6c10a971e0577a9980efddc75554c7fe43a295', + '0x5adcd649f6c269917a72641baf6a94746e50768de1081ca3829b4e6639a5e608', + '0xb199fe49adc01d9aa561faecbb008213aed13549c3428872aff507c0486a8108', + '0x4455b8bf95a70c8f3cf3940868f24655e5c403a08da9d37cc54c057a52b1f6f5', + '0xffbeff217903499819cfe045049de9cd35a64e071e3a09658496b6c25c804d44', + '0x93865469959fa4b577870444190c6635ff8852177b6ff56b08af70b797d26f1a', + '0xcb0050bccc71564e0554850ee0a66cb235eff55a38bb43420ef493dae1707caa', + '0xed7dade1135b32f0de93685a0b761846b015e79b31def0fdb213a6b6a4e1a439', + '0x84514981a62afe7de946ae93293d672f7d371adf9744ee90b9fd0bdc2b10ad0c', + '0xf1f78ab258432d865614c9ac9f1a3ce0552f1e4d74670ef8326336c7366d03ec', + '0xcfc1c6181389d7de7eaa1a54a45849c57336f7f031fd516cd41453eb52cf4e95', + '0x2ba0dd84ccbe76a1be8c9ea70bda0748b33f56696c8cc79b33461a80d75b89e0', + '0x70c7aba632fd9e67bf1bf958c4b0e445875c9126006ed6fff127c22464e627ff', + '0xa72f5a09b230b986c929d4361cee701ea92651dbd1661ff8a07f9eb8eb5d4d52', + '0x737ea0461ac446901e13e7f1793d8a782589bcb1ba359837410d2d7b3ea51bec', + '0xf07dc1cef349a60d9f71175a6a733c0564fecad1c5053c86bbe8cb246a529c38', + '0xf038cf826bc7ec10ba4d7f715de197b0e661471bb4dcafe9a819cfec5a866590', + '0x526390839d7903e14e6303ae1c176ed0d3f63c26a332121789199baf3f8e18bf', + '0x7bb9157a0cf101921d7f48ad10e00431735e97ccbacb26e5dc9b9d644e904b71', + '0x3a627595c0d577b8fdd56015df96438e9f5506c57543b4ec1e4f1390564280a3', + '0x1a45980697e6977533ac6badcbd0ebdf3ca8f5a0862a134e99a89b290cd8d4c1', + '0xc076352294151dc33001039767d7058bb306277363cbdeb6dc833088d1bd05ee', + '0x37c9756cc63c0350514e5b963fcc406e10724e749b135260eeceb157e92dd855', + '0xd8c8522d3ed8d3dfcf4bb9fcbfa25cc68e8a358512e417a606fd1ab18743a9d4', + '0x67573d3b89ca2f31f71c0b907cbff0f901134f3a751976c92dfc23fda9a6c8dc', + '0x9c000ff2b2f9e1d87efcec2f3e5de16f321068495a4c53ad496446edaf523505', + '0x5c3f621d8cef7d1d240468ef5cf36bc8beaa547748f2b4dbdace2463f8905ebb', + '0x0b171b6c1417888442bb4709dcbbac428948e90d9f47debacc2087e655cff001', + '0x2227cdaf17ae776887413e39ccf00a87c79b56820ec56cacaedbe1244d484912', + '0x207e01040f8eb012bc54582da1465a6021778ccda74305295ea30e8c318cc2f0', + '0xf2b84b9bc8f2242654e1f8693483a97602d50f856e0f553c39fdc5dc014e59ad', + '0x83aa77087119075e477f3cf82fc38748883a37eec05c7f803ed6a9868018a0b4', + '0x37d1463647f8c016b8aee0bafef3be8087949efa2a4c095cc1776d5f3b7761a2', + '0x847c663cd1c2ea440ffd0a0172c4662a04a214c2971283022958d51331b8da4b', + '0xb4761512b12997b63e706f93d3f893cb490980edad3e62f94897680e05940cd6', + '0xadbfeabeb69caea004cb0f694e41cab6d910dc5b7a4f978ca7b0555c652119d3', + '0x72bc3ec24f803ca4e3fd99ada607f2e3b92bcd6781c58ed22f02afb2ea99a535', + '0x13c17a4793f6f9e19aa2f35fb830dbea4852c0a6bb6b4fed9dbdd34eadabd978', + '0x47def4620bb6fb7e31d34d7350986db97b4cec0913c5a02d2ee4353ad8e504ab', + '0x29e382190f2c80e7ea956a641c9d91e74f7614360cf934133d9bb80e98e85ad6', + '0x00ff08ac3bdbb062ea963a07bb9a4800af219e1293d2879ef7ab0e0d034fc56e', + '0x76befeabb9a17fb550db320c2f9177309aa24674ce250baa9a5a9ddd2d2814d9', + '0xf5585ef5b50a1068079b1e35d65ef750a2a8ad7c577ece2444cac39e493a13f3', + '0x87724e74d23691e0bca967edc2f5278988f30647a47af742d6a59faa25e5924a', + '0xe8bcb0ff690b4d64994b25318ee6e21eebd79965149eb7e55faf70fe205be626', + '0x46fdd03721d85f10994d1d69d37ce1d40d274763a1eadfac04da491eefb12d11', + '0x0f1b274df1c9141778f401812fbc117ce7dc7b39d759883c8d9cf720a808e620', + '0x413451e5bb428b704b9da662f1ff42286567a028534a8b358e74277109594fab', + '0xfcb19093834d6ad30751126ea81447baf358d058a1644ae85ef5a9c249b07a2f', + '0xd6c2476988a04ba5f0a3124a381000f2a48a7818ed4a8938471b78e14de73c71', + '0x76be208e1517bc43b36ecd8b6983b4e8a127703de65c2862b940c3f5c9a2f132', + '0xde00d74b9d6231eff9c7c0b6dad2eae559d0fbd5c501839dc2e36d7275d990cc', + '0x61deeb424cb1c6ba111d2aa6c2095c3c1d881e6eeb8984f6e5615e0069fdb764', + '0xa85bbfce395abf00cb562ee907879f68099a5f8331770e7642d4762ae699f6d5', + '0xbdc676ad2c661f299b6545b18641f11adc8319aef7d00214baf89b0d7e0b58b3', + '0x7892ab2b2d807ceeac5cf1abc1a9ca87f6d62bb095b393b5d9d11bf56c8ef7bb', + '0x9f8eddc9e0a7ec64161d5a34b4788ff761e21ebce594afaf9fd21b486bc68a78', + '0x0bf64f4ce13abab76b24080edb5e98c6a405ce603622799ab1f00cbe58e2564c', + '0x0e969c3e4b9faae342f96ea2d6c792618e1b1cb01e8780638b97e260da57ea12', + '0x457f7b24d57b268e5e695e06ac336a845e24bd49acbd897e0442bbd8c6f9dbea', + '0xb6afaeadddce353fb2c89ceab5106ea308f939936b7773927ff00747094f9f01', + '0xe8c0748ccbb301a327d2485a6ab6f7b491090a5665a722f1faf418524852cc60', + '0xe54222414f0e1522867578213a06c1923298560ffc8ed988ea7792aa6a3c7a98', + '0x355eb98104f97518944962957b3ca42673d5ab914fe19b9cce09de99a31c29fe', + '0xebd9a0dcf38bcdfcfe8c48204eb43368c2dac9239ec64d46b03f81e6eba996ec', + '0xfcf5b018a28aa0f4091bf8b3c568c895ee907bc39329b98b299850904949d011', + '0x64ab96c35c0947f4207444f82e2fb6be7ca332d2ec76dc8ae8df4075cedb9f56', + '0x10bad55d172c67414560809e52ed550d5a0e5c94efc557e7724a988ab0484316', + '0x78772796071570ac3473a1c598ead7b431db1cd35d0a6720578ad436dbdd46bc', + '0x91a83dec9cb108d3beff8065035b1d35add4e479ab02a77a8a763a8a692eaaaa', + '0xb0a028ea7cc5b76aa55537069cff409e7153578111f7f3e12a289a74f4695757', + '0x53477f41ca73cea79c78e104e779609aa658fe4fe27f83eae9f6c9edb3a58d40', + '0x5e029cc49cbca4e3e142cf32bd8fd6fa5a4a9496c8bbf7f8c4c5eddbbb9a2430', + '0xd93c7d23f06fed72954b9913004988ff5498da9fb72cc1b8ec0df41ce0ecdc2c', + '0x1914bfb46d80cbcf05c8ba81892ec388efdde9206da2999324c9512aa3687a2d', + '0xc4d2aa4938d0bd2594434390110883c74fbe816645265717912906fcb31bfd95', + '0x5038f90e01a8b67887f4bcf26c896c396255a49d0fabebde652ba52fa78bb7fb', + '0x76164cc7b1d554d299432bbdd6f2481d3bd90c7788727720a749eb5eb6a0cd4d', + '0x326b9d307ddee2a97caac447fca6f5a3eb56a9dcbe7b3058a764d2bcb5fef7c8', + '0x20b4e99e74730980d9bc4147deacad87ac57fafaea161b4c6976bf902c4daf94', + '0x058e0addb106c007b29e22c47faf6dbd8f10ba175ec931c6c290737eb00878a6', + '0x9363312189e485d6f568b89326420f5bd68ce784c63551ce98c8a25a9cd220f7', + '0x1415e03bef6f5f605ba4efe46693eb3f6e341aaf84cf8b804a980744611484fd', + '0xaa53cd66c919de53398eccf7b2955ed63d5dbe48b0a05175492e95a8aae210ea', + '0x8fdf5bf4fbf4fcc687ac42329a10665e5bfe88f3631127ea222dc8a0b6d40d44', + '0x6ba96c5a6abf451baf3d5190968543d2aa88dbc14b7cac527840d7c921511158', + '0x2767645403cd2c67a4df3b1a8e141776897ab76b99ecbb8e7c84071bdb1a0eb2', + '0xc7acb6c05a374408bdab5df1044acdb56f5a2973eeafecf2def09a8192ec1132', + '0x46139d7f1821c8cf05f41008892cc7c6813f09cdae35a2c605202812cf546b87', + '0x2d0fd9802af47fe5c7a5dfff0c7c9037c745c0f875a6e7aa94744ea5d9aaeab7', + '0xa8e4aabbaca7d00f865da9dadda7479d5a2a9595411ca954ece714012478b042', + '0xe41cfa72f49e7e5355bae8aa984df4d014faa578e860971fa4c272e741a2583a', + '0xcc64b26024113b94af4a77df7bf96ca463d53e658c842bc4616e41d84962abd0', + '0x856a2611702d450a401c570f6b8e921015575fe6d4a70faf306547f2b146bdfa', + '0x3276c025a49a4b3cae3cae03725f0e345e7dc10bbad9d2d5064da534938fdd02', + '0xcec9c726d55f508938aaacb58e43b7dcdd6d58e478c2223a79c0b5c2c1c7ea36', + '0xe894712505802aa06f11e89f8eb0d78b8b1af9b3bc79a02d94fea4ca1af45205', + '0xa0340155cff7932f862987be0a59648d8fc09a4b710f6bfa81503dda394c881a', + '0x8c7ecad02db37417e1910546a681c39c582d02c9272063f01ad4f07ae3db01fc', + '0x692427e62d97fcc2c56ac6e01ccd329ae98f4b427daafbb0ad22477d10dc2099', + '0x12a6a3fbcd9b912001cdaba2d9e0d1d514d39917de430926fce099c6817e4168', + '0xdf4529b86ee10f4a76ff577dfcd0bf4c932902d3c5a941f2cfaa98cf4f4d280d', + '0xab289817e81d9ef381ecb36a88e2704719b46d6a870a1f86c1523df23d96b2ec', + '0xd4df07e3eab884f785db299056c902804f83f3bf941a2f5caa8251fae495fc3c', + '0xf570c5c2be49a1a8afc43886e1da7d685546844f9126287af30f5f408334e756', + '0xe09724dd1af86f07478353d561251cd4cc86af86ef68f3a1220bd1b79833076b', + '0xd0a343dcf32d30284c89383b0dcc538462349d6840b61fa28fb4a80f5e662595', + '0xb3733e2df6ed3b73eda4536d751d55f45de4049e29800306b801f1f762f2eafc', + '0xbdb1c97b1580476036d851ee17269f3e571db0d9535559ea5265d65856ce2185', + '0x227bf0aab3ba6f30059dea81ab4e172a24bf3782cf09aab97acae9a2759d7ab6', + '0xf135c8e7cc0fef13a0027f53c130590184f49a45bdca6be92494fdd51abe6047', + '0xc27f7c7da9dab2f46a8b1b51b1b99508ba61f1639f509f9f32f18f6bddeeebb9', + '0x264f6d4a99be48d9025ffb8239e5cb48905af66e94295fbaf3d47b5bbfe6f493', + '0xe19e47f741a5edd56f721319b0fed149e09be8116cfbe6881a61f843187928d1', + '0x6f58f659b513faaa7bb6c16850ffa3d661c3cff6b0514571eb43635564c374d5', + '0xad0c4593b0ff4be55feb15c9e3491c5dc6851d23de5253a214b478f0c9426e9a', + '0xe847e14db0437ef98c064edd94c17fca2658432b2a51b0f928046f5db599078e', + '0xa1dfc12a8066170dd758bb6a31735a45d18c6a6057efbaa5d87b9d802f9d3547', + '0x1341a92a4bbbc22977671e5e8544f1d13769a61342eb500c14e4d2bcfac12115', + '0xcfffc8d99881a3e09fc91ec3596b48220eefe730eb76218a3f56538d01d10d16', + '0xb6c36207448bf617b104bd78219d3a6c2625a4e241c7469c1a2ed97322faacc0', + '0x1d1245343b54b08cb455a441719dc96a8c908f9b04bbc293e13e19416d6c7eac', + '0xf905b9c7ab324ca2ab4df73a81583d234c55ff07d80aae4d3018c68dfdfb4542', + '0x34433b000a72cc9a71f578a0888e9737596c47baf867791709dd388d21c29eff', + '0x143b4809f7408753d4d7aaa24c6e5b67699307b2103cc6adff6e033112c4cb7e', + '0xbfa78b65e808698885d510a359f1d7c0b4994eea27c3787d640c012b19e5985e', + '0x1a672afda0afd409853efec6e8a3c735671488de47e8a1e082f5bdbdc26b76b9', + '0x6f1883365f2a79b5923e30d916dac9985198e391e2b3661925616995a3cbc9f1', + '0xad4cf0b481e09e5b8133705654b52de94aa1cc0d7a2af1a949ab78e7eafcb056', + '0x9987209030fcd8bd502f7718c64d3c64f91eb3acec5167cf271e34e869fd678f', + '0x3d9f34affa0a282b6229f8a716aa1298163bd840bffb961a11ca76ab6375dc6e', + '0xe1d197f01e232e470be57e9bbb48e06a7e8257c421d214f48456fc5946e29e59', + '0xdb2d2e9e18d229fdeffdcb64923581cd1ad06c9bcb39b5c5bb50c122837756b3', + '0xf20e4693574bbd26c02e4841bc5f06cc58ed3908b5ae11193165f01ae2331b30', + '0xe30c279741a2a438c2a6e734da260b717c8c78a7f9c0972317246cc7e45c99e2', + '0x9009d56ee0ec9ed801e286c18aa7178a9abce7fd474b6a9a44239613e6b71cc4', + '0x9c6cbb1ccd52c314485bf903c3e7cc589b205cbf6bcaf1763a84d4136e9c3a84', + '0x387be9ea40668b5789616f271e0c3a505532e6be48705b41d3734e80b4e26bfc', + '0x47242ae42c922deb3333eb6970389e8988a9fdf9d52971900f6aa2bd168f6ff5', + '0x3c211eb4d010b6cb69e4a05215436283f3c6f20535841c093788ba305d88fef5', + '0xadead0d567ae9c87a941577818cef78d95e62dc4762492c6f9c081832a3603cd', + '0xa3efa0f396817db1e01c087fb3e73bdf4205101589dcbe5c3077c16d595f2af8', + '0xbf9e5f7b114519d89d922592e9a77387ca8f75f9b182ef1858f370911b9cac1a', + '0x962896166d24298e64dd8d6c42c95439808934e2a8ebc4b628e5d80cc974acbf', + '0xf3cc8338dc612c2f4a66e63ee7e15b5a80399a641977a7fc9264d004ea5f3518', + '0x3a98cf25481af7ecd190c4f39900fbb35792a234029206ef242ca07ae0f8e188', + '0x44d6f3d1c5e005673d74a79e3b844d2747ba1170b73496c0f902616dcf106e90', + '0x28a344d9fb086bb2461176a48649c562f5c71e57b7cd131a4bdc8a98730fd738', + '0x64901e5eb1f15298d5a2d34fa85c511a20243bba6b8af561a72dc43ac9f8f423', + '0x82202d5719b702272ed0a27152abdf352cb2257ab1e8ada78e32b7bb73376d75', + '0xb3c726bc8bdaf674904a6dcee567cc13700d2cdffef1d5a3bdaee3bec9430084', + '0xf6a860f61874313c85f99d5764a4915b4ae3ee7912133c532211623e81e6c750', + '0x5cc12d1a69b1cadf788e3e3c20da7e4b0024f415bdac7c5e8597ad6310e2862a', + '0xac704e5ec30cfd2e2f95e67831c16186244c808e83a1d2f09aeb37dc75b6bc94', + '0x8939f15905e613be07e784aba405155bdbd2a6caacd257d0d6507119c8162214', + '0xb7d97368bd8b32c84ce77655e8f0e6ddf2f21e335eee3853aacaa2f9b826f7a4', + '0x16a48152a5e490c7f5c4a3632262e41a9174c7d19469b8c3f0ed4f236e1b6ab3', + '0x9f3a63e590ba37b19bf0a16d65764e880632d5730d80e576224aeca7f46090c1', + '0x22a41986fc05ce76b77c05f2017c2a73b14f2dac15e0cb546d239acc0ef92fdc', + '0x5fa6703eea71b540be87a98ce6178c5e64fa2743062597aacc03c0457af3a03b', + '0x384455aa4b0ba9040b10bd09e47f54c88636573b35e623103009f19b5c855ae1', + '0x3808caf928be44d315770225038d0914749c8af1f83e542d569f7c0cd679be2a', + '0xdbe82e8d21f9f4706cbf5d985fdc91d444ae6b07086ba89ecc1437670ab6e036', + '0xd88332e42493d113024b33aed0bd7da7b84c8c5fe4d4d52352e37e9793910fb7', + '0x1e7ff73ae5a26f67cbfc76936f06e28fbc13846a54112e0c2726ca33702398d1', + '0xc09c2316a20704c3a3b7102ddd73819eff3f16e92fbc9bdc66a3a6d2ee06dc27', + '0x8352bf5ea2d789033a82ebb35849f905babc24d5f498b4f322afc23dc2772a2e', + '0x6dbedea8b58b1cf6f87c040e5e7b0be295f3709fff95c954949145e55531a453', + '0x59a7176305c3e26768aa4ad3d999e422984ffaf56cccaee0bea3bc3d715e4186', + '0xc5bafcf849caf72cb63ca354aae20cfce7f55129a7c889a488cdb704335aa52e', + '0x359f25d83b289d7cdce9ddb6077848dbcbb3092adaa888ad953d19e0ea871524', + '0x9e6e51796b260e3579fb2bc5a2d05ba8354b560cc8ef290e1b089be2c63272d5', + '0x42402a3b6ef6d8f53dc076560371449718d377b1fe7252305bf1edb82c39bd54', + '0x0257f9a120fc9993b5c78f5872899dc8f8cdc354a4a52361ccf0ea3e75225510', + '0x2e70af22644537bff742bbe2a4b3c4cfc7ae665d1489d1d3c078d8ddaff8f69f', + '0xafb004a07a4051945c294b254937b9345f2e6599cae431d2777a05c548df73f7', + '0xeae88e20f5c56f85a881141868a565c1e95725c2867dcea68df75d3ee3cdd525', + '0x9819e2d0490a26820f9bfd198f4e63e4043ba4d88d8468d01c010a598f4d1ff0', + '0x5202eb92715192e5a5212f40eb09dc7f2f39f6d19d2889059d943ad6f95449e6', + '0x59c9983c5139d10357fdff3274cb7d3131916e20325c86438ad2df6c7d748141', + '0xe1220a97f29c4d08cb87e639baf1a13974e1a2079121f4aaf1e072f3de2f10aa', + '0xa785e23fe7736cbba21859712d5131da9e01529378b07d4c2dd70cd3ba6af508', + '0xa5163c6e2278c4f6749abe8dc52f4a1ee06bce1083fcdcb548b2a25b81718818', + '0xd6963b46897625cfd7829900a965959a561d6839fd667c73d7f862cd015e73a6', + '0xee589c1850e075f0aa444aa90c5353cfea289c3bfdfaefea58338ccb66ec1245', + '0x6d5d27a4679c27e57f49b5db8514ce8a0fd6bd3dba5e3d3c2e774b62811bdd77', + '0x4c4c175488402c1dc4680ffbf4bf22d84cf85889e036b299a4da2e627978470e', + '0xa999a1ed766edb8577a228aa1ebe175f33c35843102364e04bc2947efdb435d5', + '0x63d2e4821620441839f8d883cd5338008f1d5dd7dd8ac5d2d9c30bb848d22e35', + '0x32a371e83ed8360fb596368c6363d0c6a5e7c4a0904b15a1bb838074ff26185a', + '0xefe5f79f48f6633f34bfaf95646a390aba7f47085c6cf0571e53ec742f7a2a70', + '0x6325c1d669206365206269f3dadf03eae938888f70f4df732246025714649ce4', + '0x7b58d319cf0b81a39e8c1dbb81bddc096ddc8af990d964241fe5eb68a57fe8ce', + '0xc6746dc406279965d454111ae74e1baec032cba68ee08232d3127b797101cc5f', + '0xfdddbc6dfc4b8665514be59b116a93c84bde3efd19427fe4441e541cacb889d9', + '0x1ea79944bf9bec9901e32420a6fc5b933d5d7256decfc9828e83ed3c6086f24a', + '0x4f433e34baf08fdeb2a9284a354440b9dab0696c7e1a1111e22946640aa47fe3', + '0xd16862ab580dd90cbd3e6a37c5f6ac36b21058b773349d9c6975f91e8fda2f60', + '0xe78b5d05300065d662d9195d2561192d3b6396638e6b4e3a221dbddca3678e1e', + '0x9730a9bd6617ec1f9f09308713c7fcc2bac23dd1508fc1b0b52fa66362f9ceb8', + '0x7278bdfdc3c7a8899aa73dec74b6437f220d460ba71a605f5385c6eec81a3417', + '0x98fe2569fda00a494a8d9d7b058e40bdb49c6137bb5b5f56453b785905df9794', + '0xb078aaebacded0a00b106db1a666ee7ba1b8e274434bf29faa73da5c31316ae8', + '0xfa52e3b8e093574d3683a8d6707d66a2c7f29e99ba74c9848e4452ed6bc8ce4c', + '0x690e7c30c903d09767247c74069c5c9c78d3f40459b7c395df051cbfb34da203', + '0xc907367af60f4abab0d425d57e4c160a562f19d7f5327d78bdf03536eb0345f5', + '0xecbc9e00e2f35bd3574a652f24cd0ea833cbdd5d202cf26bbbbe8346dbda2764', + '0xc17662b832518584a6b6d435568d054ba9b7a46fe7ee1d508d366b043e159c45', + '0x48c039cdc7ce303e28f32d1c3d81279eae4d12a5014431d22a88b6ffa378bf9b', + '0x69df1ac866d86b2b2b8c7a0af8fab9cebb20bee65e2d3f02a026bb1164c77525', + '0x8d6caaf8a9dc510bd32c76217d4e5158329064e6c9f604b3430259c933d851ef', + '0x49acf7836a90738a05bf9ff7f141ac2707ea9f164f968fed089fe25991d1f746', + '0xf6d46705d4b80aa0e2b5ef58bb85098d3316143628b7ff0bad4e993843c27740', + '0xaaec267aa2e415687b678dc7ae3bd1f0f42f9f9fbe395157289f45bdffcbe2b7', + '0xd34fb69c91d1cea05906d9bcb9222242254d48ad37857fdd501b8b471737000b', + '0x39f2ee9568c9133dc4023fd26ac35c4f7fecd727e0bd94aa3e082cf695c7456b', + '0x83bc9cba28fff171c80486b6a9e58848cd5e7a2fcd8abfaf190668cbea3f2dfb', + '0xf2f3d949aefd52f2ae83b51c4f63c1deb339f3250b73c0ba69141cbbc5f3d0c8', + '0xbd1a35c0c02b714e57b52e8a35f8f17610766d132305276cc8fbec362a93cc05', + '0xc29609164200c4375c1eac5f38df6fcd8122d333653cf5aef469054bb075a9ec', + '0xc167aaf184db37a328d3fc35b1254ae4fb5b1ff2a3a4265bcc11c7fe62763849', + '0x69fdd4783c208b8b7e9b99804ed6dc5653cfc7a7c35f946b61ff055a236c62be', + '0xe215dcd8974ca3303a6cc59ad8f43b2dd0902d1cef6d79a44b84f7e65e92b14c', + '0x31ee51d6fb71c82e31ccb67ea3391225944a0dd9215af9cdc50904501546a9d0', + '0xb374ee5ee5f89c3d990e97c5022cbd0e51b38aa0260a7b6893e206a4a68ee90e', + '0x2f746a2dcdcfd6d490982c070a6c800113fe678343231eeb22b9eeaf6e7a0c18', + '0x90b3145df096cb8af56ea3a0016b47e834fb0a57d95c43f7a11b3291b8ac920c', + '0xc494f8b4867aaac76c6e554b5581a0167d0228752fd1ced9bedc24def83f9cc5', + '0x5d729297026bb7e590354a8131e83dd72c0280e6a28e1c50f7fedb2db53950a5', + '0x101c4c420e137057041f3056d91e155374d4a4cb623d6ca0dad3a63a42c7145d', + '0xf2201bb15c56e4b0746e111ccf912993dfce22582f8c9dcdfdd24f428c708ded', + '0xc02def3d717bf70599127ad518b464433f8e0453300fedbabb107754154b4b5f', + '0xacf000dd6c15bb82581d11dd5e5961b74c99c70d4a89705e8ee3243db1ce15fa', + '0xcea15f6a311e22e32c3fc3c36ea3d957bb6e59ab071f61e815a8fa6a7685c792', + '0x1ee5e6789263fa3ef0ef70b1e6d4937e83469b337ca16b25165868af5d1f5d9a', + '0xcbce699f6b1279765cefa4bfd984978e76600a91346b9071031deec3a35ac7de', + '0x23e952a83fdfcdc38b185bbb420ca718d5f3bba6a236b58ae27e0a2b2a678238', + '0x1c479812f2ce4cf4bdaa5405fb0188cf06cf8acbd814b967ad4a3d2a3741a2c3', + '0x34134c2c857b8381c25cbc7e59a9c5c73245aafc00e512b61a141c2deb5bfe57', + '0x7f6df49192dd66e5409ffab3662b7cd434d7bd62d0f1dbcb035ebed2b64891a0', + '0xcdea973998d5ad10d077c2aa7d88cd1f60681289753b3ceb763247b6c65af7f5', + '0xa2cd7f40811a9663ba26a1fc76043368c8e0e7ccd1ab8a5a057b02a5101a7731', + '0x0eef666b29d3c1cb05a2af4dfe3971d9d1b75d1740b8c4a480e80ab10ab22865', + '0x2a9c8b87787332a190fa5a099e2c3451684784d55633f1bf50cb93e560c25100', + '0xcb26ef72709ce696874ae368efadcfe535e7daf2521681825d8824d759abec6c', + '0xfe94d71fd0901a2eeca0854f0d4eb66406d2fccd7814a72fba72977176b0ac59', + '0xb8d2a7d09a953c7e49eaa059af15c853be92165b51c7c8e110f15d3fd9e74faa', + '0x3fcb1cc7e501999256f0cff29e2ddfd37688e0b0fab981739477e73b77d3a912', + '0x5335779f68ea1e2e5721dfc850e0b6cb988ab8ef1d93768472bd2b91a053e7e1', + '0x837003f4948341b55ab96821d2edc90e2fba4a1b8791f5bc63ddb89927c2b97a', + '0x069ed325b33a9caa96e4f151cc1e3b91bbe2507b0b54ca35515e94224ccf3e20', + '0x1cb6a0bf412b01270e6ea8cb3248a98762f7aed0df103c7888aacf1b06bf6905', + '0xac54654cd7541edbca508372bea7cd10a1e93d27ad482c08209dfbc66856cc11', + '0x84e91cc8182ea1b271e27899c3aff64cb55f9fc7cadbb96054bc5147159cec34', + '0xb2fd2574d2394ae5bc2b5172d4a3ba924eab0467fdd5d36a01a071bd53982b6f', + '0xe7f7b56389c8f7f03a29fa6e63bc78925467f580f648ac1699f1e155273126db', + '0xc26bcc942735cc3aa59c74aa81712b01e405e6dc6e0c1969f0421647852555c8', + '0x4c8b34f9941030b0517019ca2d82d35410ad07a2fdbb3c965b3203425d73d9c5', + '0x2ca54a2bca8c98af20ac9e1e90b949bcd4105277dd489cd8df9b60af97524ec3', + '0x49378b6ab2061e0c7f69b195093eef8ab49e8460c768b91a8100c6093221b612', + '0x3421623d8051029fd383e85414821721aa2db475201299de770a7992f737f1d1', + '0x30fb880b9d28d9e76bdb7a56ee786894251b514332b8c8c7821f0afc5776cef4', + '0x2c059017a0c72a1977e7201dd173bd99488c68b27aa6961e7902359aeea76122', + '0x50b6749db4446ddd6016fc96b4ea338136789b724e54f92dbbf36f5a1653cc47', + '0x914311b89b9a537a0bc16cf9ccbd9e0e630696157e621ef47e8c6cbff0982448', + '0x2996dd38b2be9d641704ac662cdbd322a09e87216a95c1ca8c8a03309f4163a6', + '0x8a2b9258b1d5735a83c18dc82dc64337d5b996563b4ddfe1883fa7f4909000e4', + '0x56fbd9cd6475979a0e410db87db6a27395f7add89e6a28366c9b61a14bbf8fd4', + '0xd49cf49f973e26da338045686dfcd5401e0ba2d9f603bade8289c9f54ed4e7c8', + '0x4bbaeadb456caddfb68de6357daf0a2c8befb476bf16b15b065ee309afbb65d5', + '0x02751cec3d692541535c869a1de91a808335d805eb82938b8ab56b7a96d0f8c6', + '0x0b2c008ca9dd1a077a26a9eb311ed665d1152d032f6c0244ffaed1380672380c', + '0xf07c2f4ad548cee745b75ed8f9f956ef8b79a630afe406b116e3ba05d0fa1571', + '0x94fd1357daada8d5168d116a384dc65c7c6853ad8907d60790d3c3e631e4518c', + '0x5901e33d13dfc2cd72dab65aa7117b407762ad40a523d5fba8923bbd0e6c690f', + '0x7ed99934710905d26f6a795e7b2ec61f27cd724aa7985614c1661b0cb6807d8c', + '0x7802bcbcae93090b599b35779fa6782d798cac45a67c6010293d08b161308fc3', + '0x916460dbd34e2d7710c163fb3f337d8b2c1bad5339971c24850e2a33418d35fd', + '0xc1421963081d93d5fade208f7a065126e3f905d906a5d2afb4e3ad9621c311e6', + '0x6d8b2a9da9143e399b14112b90eaa7f2f98d389d7512c62d4e801a0217d682c4', + '0x02d1e9fd06d033058ac0b482526051cf1ac27660b58ba4ec25ee17ca2b83246e', + '0x21724e025bbee27975d56c2eba041132daaab762f90e576fc93066625b111ce0', + '0xe24ea6500d73727359cd38cde4224f57759fda66ec545c9738882fdefb2fef9c', + '0x2088fc323ef658aa95ddba60cc27df1b25bb189bb76e74a7a8059c9b7ef09870', + '0xeb62c3d07d31c8ca82c50ba9fbb9865d501b159ba454acde81d6f7b661196f77', + '0x8d5836e18781602ceae3fed4f7fc1fcb86512db654836d6f05ff4c67fbfd8aa1', + '0x9a3c7639018af413f05790278b2b48a919afe9b967e7c2f1cead03f9f58c2b07', + '0xe278f691a09587a5baac6950307601c1501d9b45667e17fb0918becf5e5f65be', + '0x03359cdc959e42c6a52c633fe8bdf47844591e057850e1077d7428dd258ae937', + '0x349adc2ad620a3b74760ab15814d74ef529ccde9c14447a9a9fcf5ed36da35f7', + '0x0754f5378b123171039c264edbf702854e83e4e4f202561ff6edb836966ac2a7', + '0x8801f873d058ae7bae19cc19ef1f98c40000832b16d3a9060663c5436a667db3', + '0x6c85c467a08c113511ce1fbf3949a54b324df9f9ce41f6848d20f02a78bffe2c', + '0x90a083256c6ba07cacf4bd31f0a3481ca9e32cbedab9445b379acfc00322ca76', + '0xefd9eaa865276e2b899b08179a830a60ee989696df5f956984875ae3c1dc475a', + '0xbd58dd194293d6a86492869b470d1a93a9ae2241e9437e2d675d71465fdd092a', + '0x4f7201a8bd6beb8286b2a335f599435a352f8b7470d7a4cb53dc720b50b7696a', + '0x946cf5bc69983d8eeccfa93e50ed0ae582e7abe01835fe6b7f3f8f90ba130610', + '0xe16732635c20ac34e3497d4d32540bcf3960079753ed225d68513b96f13ef235', + '0xc3aa2bbdca67d324b4acaf14e7e5508fd98d4351acb5d84353f0911cc41fecaa', + '0x034758cd79dd49d8eddb0ba2424be93913ae7b8260eb27bcee7cbdde98e09a60', + '0x7b4fa8d8f820300372b69be110492393e17c7fccdf8d9efb80d9cd45a5b04a6a', + '0x96486271c662be095cb44fd552a8bed2076b51940490d80152e8db54a6261786', + '0x7c36608720aa658ea4cd67addfa9279c533de35a4cb69a9ff95d80049de2a699', + '0xc5e9bb52c1a37289531abc7b475024e58704197b3f98bd86534d03d31d144080', + '0x4742395a8067e30309c465d5f7080ea5ea2f192af75ef6b0c293ff4925f5bae8', + '0xce6040fcfbb547e5ae265623fba120d918343e843f66dca187ac0bcb95dac27e', + '0x2aa177bca6d95d3bac1b77ed04663b21b24b8b911ba3faf086479e7b3d7e404b', + '0xcb38630de48e80ebff7f5c0c93f04ffe274204db2e73be521e8f9d3d44a15928', + '0x9e2c91b7b62a16bae75c424c0bf8cccea59233c329a8be56e12f46a06e2537c0', + '0xc030e26f18cbf5ec0d60833c53b856fac30c12da68b5d0679d7d72488df18f99', + '0xf39926aa84193864907c1d5e2ccbc8a426ccf899cf9eda666433774e2f07caa3', + '0x85feed9973964ef7278d18539e1a45b585ad408dd4f98db779c34d5925a62cdb', + '0xeb594ce7ff3242a62692f7cbe1ffb5aeac6be13f32c77126b5471af0b575b1ee', + '0x2eba1761ced4828e57cf04db6f81365b101518211276e4a315b9e84be868f495', + '0xf980cb7fc75c8c8d0c37ae24e63034125bdd342d550fc4162c6a4d71e25aecc0', + '0x5b024f53e5489d7ae02f142c0dcb118b411f3b1c79b25e304ae4678b1d3941d0', + '0x1b83fc45f6d0c52d8cd81225dd8e83302981fc3f990c97822518c56a568a154d', + '0xd8f1d31e3cd8281ac2b9f904b4d48da596d2bebbf6e5e9387ee919452c88a362', + '0xd08b15dcd0dd724c852d694d181ab565c8e7d7ef774df3898a52dfd34146847e', + '0x243506400cf2c4ae6de2baa7cd468e5116cf32f4c64075146772b1fbfab52ef2', + '0x50ba5892c3409229c936cbb5053b4511374eb34de80e595182ca019afabae101', + '0x77d40a9b376253afc65f8338f57fd754a2047f20cf546d13bbd45a12d0022e56', + '0x1dc9ceaa7ce585c7be36088cf6d11b559e021bccbc04e1c7427d987c667b2a56', + '0xda1e69fe8dc3fa5f6a496945fa560029bd00fb473f585d26e35687a8bfb58e61', + '0x021f3091de03548a5c83e0b05c9861a5b62112f17f8164b2511fdbd356242d85', + '0xd14b82924892e5e55769428390407dd4f89fdb3c88f71ff70d1baa4cb0272f7e', + '0x93987bcfa6bf4e772f3ff195f0634fe5651d6b7b062549c2e33d2399743a33a3', + '0xfbafe905155fe26d0f74085fa3e44671c6ab72204c68c94753e1655b458e3697', + '0x7171141d2983704d874d9a9739c626ee1ab60eeb4539c12d1504c8e86654d2ab', + '0xd4328c9065e6e2974efd218eb1f99cdfe028ac4e06383a7a29945a4032cb880b', + '0x33c00e4443df9f7774b4d37bcc4b88e2720e4f598625f9e878ea855dce716379', + '0x77af6117c2d6f53c6d7a95b2f60f8e1893c013c81126a6533685d097a149d6ac', + '0x16528f2eedeff03cdbc564cf87e2420da0735b622a5d47a7f0dffddd623df3b2', + '0xe03d5ed390f9b1ae9541808d0ce73278a848ac2d7b4fa0bda82dd0bc6a53e88f', + '0x45ecd1e4fa2337ef758e58505383a4d73ca61aaf6d7653a7375cb2ba96c5fd1f', + '0xd6532a73b06775063a7574eb5b616f8bbf53b5c5f0c7148926cc1b294644b028', + '0x4afd941e615c7ccdd37190f85b310ddf469dadcf217b9f39e58a02c9904fdc9c', + '0xacacf72643379d265b0be93b3558eeee693fead6bb6224e8504a12e00104fd9f', + '0x090a6a379e82958c32994dd0149d149f150259d5729c6d03d947251239e90727', + '0x56371aad3f6c24fe53ee2e6c40a9060a39f8c3906862ad07c53f99915c27aa49', + '0x3c4637bf0fb71ba11558abbd4014da7721b3b29107b0d4285262a84a0e7a439c', + '0x0dacbb69ecae37c0f24f7a1abc73b938a79a8b3e5b4333c69fddf3551f4a8b2b', + '0x191256406755d4a5e59b1192b38d76fe3971577fc62c3b59dfb0a26491889458', + '0x38babba41db70638b48ae4d3568f7b49f83560676f31046d09f702845b625ed4', + '0xcf722048f85bc96016fad3394146c98dc001319724a742a78317cc7bfc8b92e4', + '0x8bcdb225f5dd934e29ff378367eef2703fb55559935ccac5597e6cef24c1de57', + '0x9eaf5c441fa4996638bc277c639dbeef7e6b7da09cdca0622df1b0d33e4658fb', + '0xf52be367a2b2f77b40b20791bb41a401987ff3d6123254c85aa6bab68ec5c1ff', + '0x179c4a55985b6ade9f76016cd10a69ad8af8e6153a22e5e8d04916964c410f31', + '0x3bdb2245de979b2b78d8e9fe75cc3c65ae5208bea944ba93cc585ae1f4edd36e', + '0x3bda23120f2e6a929856d6bac5f8cabf813aa99928b230d93866f29b50a00417', + '0xd2516c58d3559b80cabe4edff27ad28d31d24c129f90a16633f0ba04992d40f4', + '0x5d9bd016e1f9ac989ca507940f2a4b7468c8665b75ab507d044ea97a0a7b7b33', + '0xa094d9117ede6ff233db03fbfa323ef9e6691675168c370b47629569b975cb5e', + '0x6585a0e1f3f2b88a726e9c6e10b0887dbc16893ac22fc78b8315c387e96deaa7', + '0xc5c6321714494c40c581af025ad2982a64ae6dd5e98379a599936052633aaf45', + '0x759d3b5e042b7b90bec3e1413e8ac581be4224aa963374c9596293b837806556', + '0x1b61014b64b77e44a06ae585616275779f5b0634603449d9584ed17fec6575f8', + '0x4b918b093cfe3108712e0ba1ea403d72ae07ccfa20a768773f14ecfae73e48ca', + '0x2a7882141f7cd361d0f6c26211f391a4fe857e2d7b530631da59d4980357f3a0', + '0x10ee0ffb99be5241195ad241bba24cbd2faf81d896037c07cad954f50e3422a2', + '0xef0ea838017024b2fd0734efa0b23258a41e693ecfe33186b00ee6cd8ada29ab', + '0xe4ffec5c7cfd61a79fbeb328b0024b6e543f741bb0108e8cc4dabc49f0a943fd', + '0x2f54e044a2e90d31fcd4f47caa5b11a68fd28ea88fa56e5ffca7e2c7ebaca3c7', + '0x1292f976bb99e927bdbd682e541ad4044739024ff5ded745c123f3a3033aaf9e', + '0xa8182f4eb6825ec6c8daef98a25e3697ec64ac789546a96a301045cc9f2dc939', + '0x786f20abd0df2e21b78715989de4961e61c0bb376a76e6b21f862e9dee93a02c', + '0x27f886b877a39b0a7f96139dfc1e8458333a03c2a18fe971b1b406cf42d31eac', + '0x2da03221231066c98f51bd1ae2f2f50aa7851862c2ad81b74867c3088bd11858', + '0x15d5356dbf696cda74d078b49eaade9135ada907f03083a2ececcbbdcd86b43a', + '0x6a19cc4e51e2c99b7b3d192c06911af96505f60732abe24ee31de0dd0c479705', + '0xa83992bfb7916833dc778f03106328e436fd40a3ae4d91baf6f70919ce64f36b', + '0xc9053fd5493280471623264b0873762cbad9a618c754aa3561d6aa82c1f7dbcd', + '0xf0e3eb6bc5a48e95cda7becf7033f1cec15f59228c33aa88dbd5878e664ec8a2', + '0xc2754b99cdadbe862f03fb4d55691d30d3452340c495e2974acab577cfb37bdb', + '0xafc72b1e2a77bd40e8ff8a20845846cf291667f9955d3194156ca498d0a3f7eb', + '0x8c70ee6d06689865cdee8da16007122e0f947f8d56c4bc0e26b17141bdbde0ca', + '0x59b3e26f1848b1acd504b63463b50ea23c1e035166d3b69d7e44c33132e2dd81', + '0x45cf41eb9099c877751319add5154873ee95039dda3aa6fdcc7c6d7630133ff2', + '0x32be5aeee05681fe6a6bcacff3bc22723de3f0cfae4f9e53a86f9788a91010e0', + '0x6941b0e9ee7bc685563e7391080f2ba55200a71deeec3b46ed3d8fbe306cde52', + '0x60166eefb8c6a7a73ef12ac269ff3dc22647f2fe4afedf1134a7ee6bb844ca11', + '0x0e7fd91a9d124ab594930b1ff8ae12d1d55bb7c8bc0c03e1c1f3f65f937d9ad4', + '0x2a74af7712554c15e6c84696d347015cf3f24b5ee3e89f7f38932c5278c96736', + '0x6156548c069d297dfc972fe30f4543b8b8ef898c469d68cf4395d4634edd39aa', + '0x4b9ee68cb912be6b06c0ca492a0a1c3036ad64951378dda4148902692e2aea24', + '0x31aa66818d660f493ea51b32d10dac5854c54f630f2e01a4c0d1d07c50155e34', + '0x7f949a9425957804ae7ed4cb208447fc546a4b60641daf543ad1c58f4542534e', + '0xedd34d3a253d368b88b8476d28b0550f58a75ee0045cdfb14a3d3d113225b7e2', + '0xcf1831c3e7e9e9c4359136538b5bfe253e9b4ce88161dd5e7d8d1579fea641db', + '0x256ade42be58615b85669a73239a1040181d04923fcb098e615cdfea5e764951', + '0xb459ca1179dc553fe01c6a9c3de5170e6e7e2f158e1c72c21827ea05f756c2d8', + '0x8536edc268cca577c90244188177776ac974bc7065d6d80e74a0023a6b7d4a96', + '0x61f6510382bb9175d5508df73d46c5b9c66574fde8d3a3c55a45345e088e64c2', + '0x9b234c6e09cae459d9b014ceef3de74469f5b3000d8d8ead63c69cb920d8a588', + '0x12bfeb596ce64e099b6de27827a12d771975bea19d08cbfec1a37e4942f37c87', + '0x8e5c19d670dfea24e95700f7459690300156519e34783d45a5c3863e0ee39853', + '0xe2eff5eaf4c9eae87ee050724669bf2f5587f4b599e2ce04c887d19d501af433', + '0x7e272eda473f87248d31bee0805cc6b2118f9873ebbe8ae0f04c1b1a95703de5', + '0x3a95b247374a108aa2363d39ca2af35700c12499922befbb048423d328748127', + '0x8570b2add0e7b24c1fb0c8db9539ebea08bab40d011c0b75a901943f291fefb6', + '0x335f141f41e086baf827716653026bc44ec301ef092bd9ce3043abeac5ef0c1e', + '0xa02029d6824899cb9aca7184467e4dec9543e8f03103f585dee37d25eceb1c56', + '0xfc7b5a8768f350d561c53ce601b8ad14348de926d89beff78e9bcd3a7cc00893', + '0xed14f68978d26d5ebb025e8b6be372723467b5bf69583e5348901d4b3daa185b', + '0x3fed253722ce3744e59dfd84742d991544db3cf63f97cfccb0993da2354ce1bf', + '0x160c4b13ef236bd50bcd35e0870cc991cc0741f5ae802d44814513774651307a', + '0x6dcb1b123f9dafb0dc2dce311d58c29b9cecfebdef799370686242306ae2cc5c', + '0x9d2267c3871587c8aacb6c314fa57be1315a135e0fbf46b4eadae3e47eb83be8', + '0xfe41db42157efba7963ba3683b294e24517424c034b8904f3e2c0b1a96b67e51', + '0x8c8c9d8e82956c96e8ac90781ab345c08f5bffd050140a7ef31a7aedd9b49549', + '0xaa3b8b4147db5e9de6114e42951c4ba1888ac39b3bc81a97def48217422186f7', + '0xc786b0b90f5f4ef89112daeca211b072975d5cd18491b1a87418e8495f3d8db6', + '0x69153cd0ce6116c0b98191e492d14c447968f4512b915d2bc543a5b79e088225', + '0xbbcfb9deb72c0150c149f075eff6748f136d845aeef0ffc5e5aafc08c18ff248', + '0xb2505a39808f86fb30f746ec6ca8822282d8263add1fb6fc80a1839c1ac12966', + '0x30ce0ce653a673ea7170b28e7795015c4d5336c1538a914707a1fe082a6e02ea', + '0xa9b3c1b1839f60b481390626832bffd992a44243338486d9404c996906d8a3af', + '0x2655dc8349f84372ce339c6a6f6fc0f02f524a7ed99fc93a2b8e9fb0ded910ff', + '0xe3d073642f19e3c768dc928a69e49e69f088c2815b55fda7848af5fe8cb3cb77', + '0xd15377967a2783ca8505aea3d4c99da03dcd1ac0d7aa391a306a9628e299823c', + '0x2729bdb5e81033376b3fcbab6ec93f37130c4bf0ea8a4e63b139a6c06a629f46', + '0x4a326ba2a16fb7db1f0c6be44f864528f0c482855848f86250c6db20e3cae859', + '0x404d08ca6edba181a1db6465c14eea343c7057ca98e97a8e0cd37afbca71296b', + '0xeacc0433a5f0143750da886cda82dd773ec554e17cb54293a2b9a30ef06bed6c', + '0x0dc9cd51aea45bf2869cf26531133f4493a04cb2cd217e31db28099cd6d0d86c', + '0xd0dea44f2a7d2713cd541b99bce987bfb4a4f74d9417f6913dc21fddb8276b25', + '0xa3ca5a004c41ed3809e1ef3988ae91d535c0077f4ead440884cd661feb6980da', + '0x6ac09f356d61248abea0dce0e915d44b645cdbe67ec1b44f7dc2a479b869200d', + '0x29285fbaa0db7394841e472e39afc4160e6db2df35b2a913d53ddaa4910b6045', + '0x22d7cdaef436a4cf8e02e49ac5c2af28afc401c2f7aa89167cab2323603b8f46', + '0xc98762a762fa29019d0c79343cc90f92fffd0f1760e55bdaaae5c2c14a058e8e', + '0x11b79a49367f782619ad9f77f2e33db66fc1b2c92480cbf3c460f891eefdc574', + '0xd49c41d0388f1a8cba2afc49806b756241bc26a22c5b330d1ba9397df7ba6c33', + '0x17f8088a2e8aa1ae4e55f47825e68a0b0123575061c820d01e9431176a1902bd', + '0x7b11ca141cc75eacfe326b2726819589bee46d29faec8c74120ce5be8287c47f', + '0xda39df12073de4822988475f6b9070a829ca7a82338bb4f52ee73576265b3652', + '0x60f5285d2709d04c79def31eb8b1fed676d508b98d7809dfe8ea875817ed4839', + '0x5ced3be039195ba186ff0d98304e7cab959d0b4703cc622ab7e92450180acbf3', + '0x8f5b5c3a0c71a59584cd390e1e5078b5616adfe7692694fc5e3de1ae22180dc9', + '0x65cd2ecd6a0494e783c4bfa0e23f7cd5a93b2c3ebb62bb3730945f30fe252eb5', + '0x9508b3db394e25a59c91fdac23664c01f7f7057a23b2936294bf54dd7b4dd572', + '0x8b066ee2807e06e0143495b10df0dc8d2a4fdd02c47d8a1c191688ae798975f6', + '0xc7173ae6151213616ae08923ee42a9f6b9c33b005000ccc056c2f338306c2b43', + '0x7dd5dfe1deffe9b7c41de46512030e2c4e7bb767696782df81be6f3249c33ba2', + '0x0702480b1d1a0bef80c5180fc653355f4b31fae30f2170a3112fd17c1e7f63e7', + '0x4a27e3c9729b2a834891a976cbe8a86805a6c2415ba6416b0d17dd47b1ef3217', + '0x4f27c5073a717c97d0c0b1c0cfeee78b9ead455027aa90b2f128b8e2bde8949b', + '0xc0da9295b95241146d84d1c6a44dd9a763deccbda806dbb634bbbcc0a95fc88d', + '0xf84dd8c4cda53f6c299dd157244ecc2fa85fe7167236ec54fb3cceda314848d8', + '0x1c63373cc72f92e9b035f7463deba8b730466885049955cfa8f76ebe9da23c66', + '0x7b427b9b976f5ac0b825cfe8094981c7a0ad152d31fe7f75ec5de3f9f32aa41e', + '0x00f6a8610ba5e21fef4bee17f29143200297ca0313fa97b0953ee566bfdda1a1', + '0xb8ee43090a3871dde882e00183d8c51489677d49d2d6214c1a881574c9485462', + '0xbbb5e1f46d7da3852f766d6198ea95e05564a49ff885ee4144bef9105bad2fc3', + '0x4502cdc9218557d2c41d3ea7a1f7370d0a934db257980ee888c98ba4b1a20309', + '0xc77be0085600b5c6cf91d84af3f4cb5042b8b7605147e0a0f77ee84011059299', + '0xb5f7afbda0ce58eafcf859d07654bf8b08eefca8cf19201c6f171a9f204d6e95', + '0x377b05231d85dca396b8a6ce42545c1dd836d60999820361f74308b3a270dd0e', + '0xf2317bfc29ab78cb3b4e74702d461a88582bb20f2ed0b7e5dc51ee653e09cd2f', + '0xa8b9dfee6cb48739cd24a9ffddeb88f7b4810931282b71ffcfb8370f3884f2d2', + '0xd5e957af1ea38adc2cc97eab912d9f25124e2868b2fabea345c4fe7c7c3e7f48', + '0xadfd5d9c89c4456242ffe1fb401a41d9d449d9f64e8cd41dbce51d9b1d38439f', + '0x806fa55d217cce7dec63f284c7e86eed3432b8f6d307312c612305cfcef67252', + '0xda63dceab8c3a3964589e3e96d01b0a1ccd12c7bc2d877baa8ce945e3d4d601a', + '0x319e6d1b9302f8de966ddb51b32280c7586e507b643ea9c58305eb8d4bcb776d', + '0xa77e744ce6a972b4e8c1339ed55663497ff4e056b4a8be7ea19850040faeb88d', + '0xee620d128ffba1a0191ae6ed18d55b34b28baddbcda777f1d0f84a96abc97e8f', + '0x7e9e89b61d577b3b686de8f0c52e2a95fd078c1bd73a7c904ea4f5f45a3b7d08', + '0x70c1e207524efedb38dcaa4fea408b6ad0ebc61ff467b76a48a19f4a0daf68e0', + '0xd90326360793a003f8baab9e8d7ecd7d50b27e90b4c1b3d2fcc3968b7e25ffdf', + '0xda086beb033dbcfbeebb39b5985fd5bc97eb39ae56467afaed642496cd7fb9e8', + '0x903bf969e88170319c70f8f79100c570ffb0b899124a78a1a3a702d27b9e665c', + '0x848e7ca924a365c1ab18d968f466d4d00555d03c7b61e522a2f52069383b9750', + '0x242ed1403bd1ad4d1ccbac9d188f06c91447930f4411567d6590c5d3cdafd245', + '0x16ec5e12f6e3183670eb8a8ce56438b77f3778f8edb87559cad23e03f801b07f', + '0x78dc5d4020dc6a3609bf4cbe5f1498be57fbd999a98b625cdcc7a50fde0dd3b2', + '0x7787f566ead38b766a99bd90c4f567926ccf960f637a0923840ee7759f9d41ce', + '0xd8c83ab726b0425d30894983f7b88f1ff5507b8119fe99c440a37f9b22743b9d', + '0x0b628e7e8339347417485d60fa89e432d6234e036922952c538101d48128eeed', + '0xc2f8d92b319f382d6d434fe614e51cfadaa1c835dd7d7c03004e3640661d9562', + '0xd0053a28ed6bbd0e37cbe926cc790676d8724813244f1d7bd4e21a4ed10bbaeb', + '0x21accb0e75267e92ac0ea94c52cd9c87f8c0c354bf3a4add043242ec24f0f9f7', + '0x92180eb49138216d5dacb03e672c89a33cbb779d16579eea1ad1e2593e7d61f5', + '0x95e84c2190093e0c0e87edc8b4dd746df3cdeaec638402791dc18499a7b88f36', + '0x8ee7ff48b1b1c74cd0400b7bcb72d8f78190824b82de91d34a6aa1a2832f3b00', + '0x0d11cf747555f3046575104867508b31f3f6244f280d31873c87aee39b524835', + '0xacbc2cb7bee2998b490304a0efb0eca7140b825555c6b65ac8499b8a46a9e275', + '0xb42b7f66ff159b88bdeea2b149e723dc237176f9683686e33a75d00c7203e78b', + '0x10a37e3fe8c5329981770434a8a9cead189f575fb8cd1f239323f81f1d91b41e', + '0x306d5ec1b59800d152bdf3a35fba6c0f002da2905b5bd6adbc2542ec83ea8024', + '0x726c03bf0038ff2489192407b8fa0568a38002ec593165455c99b6e821a69f93', + '0xb0e6ef708bf0dd4a88c2800ab71941c970ced2c81d17d0cb6256fc141f62c8fa', + '0x2c8923eb4045fe8b74960eb7b7b1f65c2f169a7e0bb944fe3d3fcd62d28446c1', + '0x40c20c4e1905a47a90d5303c685d00ccb8e854f0694333b10c87e2ef4c1d64fc', + '0xdfab500cff338470b9d7f14143a2fcb966b18811e8444363b4d1c9ccba9c71bb', + '0x86b67a2580230866cb2ccc855315a53133f48dd118ea733eee99967909057518', + '0xbdd058a954dff98a0f845d127de2bc1d3d4b3f9decf7196b6de30557005d617e', + '0xa513779a6f2e797bbe08fd9a632fa5113c43598ff8842e372cd13ed4f1d4a1c6', + '0xd0021797355d9218202f21db2f422d7bcaca26c517a341587cd383c13c9fecb7', + '0x09e00ac2945c5cdb3a2de3b087c05ffd1eae376d907e2f3567e6955a5970a958', + '0xeb096a9cb25b7e7590dc537d967c33a6c57d674f2d42bd36d69ea6a6275abe1c', + '0x68dd39f880c6a12187873a15abdc9240cbf03555ee08f7d0c5e6429e3622feb8', + '0x1bdc03eff3c6249424e91231e4d7abbe4d68650fab06e527eb548a179deffd4d', + '0xf321975c781c26742f9a5190c53a98cc96f7b47c3cb2d17cf21740c1c9e0d1a2', + '0x9adc73ad6a9289148325db0ace14b0e56a69cfb8378ee86e98a957548d4aaefc', + '0xb0f8bcbd205978228e4abf1d9a47ba79d56a8c3a28a885b55248acf1790a979a', + '0xbd4912c72abacaf1bb2aff873c5ab263fc30f5da7fefa7af033ae811d2ddd74b', + '0x9cb01c55c5d596282dee9c94e394736bd73d735d4162285318d97cbba3e471c7', + '0x97d3da778fad2ba9cb654f5ab8c729bdb18f38b842d7165c8f1cc5fe5f3d6a6a', + '0x076d35eb1d44f29e015c0b423d3e62d6f28dc3eb604df34b9b3365624638203c', + '0x60dcdc439fb6889207a77bffbe2658e0216532bfa5e8956413c41a138bcbac24', + '0x450e343209c4d6efb5881e3242e13f39a0516e09be4c0c64fe6246a720f3ab32', + '0x5473b743cbe74ec9f597d38c482066a9f24f1a79fce4451207bfb00b3a6c5da9', + '0x7faea36bd60d23818af6396a468d8c751bac9b71b20c7ac3747a9b01d854a653', + '0x26a81b6cab7f55722a2a54593be12f8a85ae9e62ec21fdb724a53d72cc5cd38c', + '0x59003bfb7cee474fc0a78e1e36781e956f03b5741c62ed49e5c89c69320a2489', + '0x17337d0851cc5e80040e99014b4a32ec89ce5df8b19ecf3cb40413d262c55049', + '0xe8d14b753688813c703b21275191cc354e3fabde8f5129ed4300e6c5c169f5ad', + '0x3193958c3d8995e08800fb8a0ec8d7477834aaef63904b556f94843702082376', + '0x77ffd7506e9b6f59ba8afb5329c003941e32c4a92d029e78448af78bf988adb0', + '0xc5f21349a14f8511a9726c49748f5d05d70595ab377c9850775a568b76910998', + '0x96718d61fac8a603f47ee5d0becde4d992a550bac6687192e16a1810cbd0cb33', + '0x127274fca395f84c9c5154a6c79b49f482b0f74afbeb695e14e7e374c0821950', + '0x8bce6ee8eeee7456eb133bcbb10260c6041222a24678a23f3bd25235dbc8a3df', + '0xf6dc94ce5449a126fc7f6b8b40dca3f798c86bcc1a1f0bec4e777162c115470c', + '0x525ef24914a3d5a8f53ff49154eca910ca147672c485752449f985f81434ba29', + '0x3e837b6b4883940ed6e8fcb343bf80a733e4e6bc794e2317c0ce69e12cf42f6c', + '0x1006aab2fcd4b09ae4431f347a9a1fd97c1481eb9f02b87994dea96d5a74a794', + '0x43b579bd69b03812a2202dd20133d277f6f3801ba1bd4d2af392fffc00ce0fcd', + '0x45e65a9b8dd0e9985cf85ec181006f4801b7ad42f9cf28553685c72aa7020725', + '0x6b4cf4ec3fe7a3ca18a4fd5d5787140027c1bb2548e9953f27a316bbfa829227', + '0x8ba337598c7c9852806f6f762411ac9fbe93fc0cad119a7ce5c6d096592e2a74', + '0x346d2e576187f377147a6c88ff5a9fd1cc134449f6042a64b5d564d40bbe7ed9', + '0xbc64afca31c3ae441bd0a650a8a6bd5215b5afc15e02f73c6a54f5ed7993ae87', + '0x9bf8f3631168814890a2316a1c681c2107a39f9c7b40745cb9cefb355ad73951', + '0xd89c423973ed6b29c96d1213dc496c8f40985df869bbb90660c9a6fce8fd17f0', + '0x66cdf7de56967d0f5346bb23aee9d3e4b7311876363cfda29c984bc5aaba86bb', + '0x759a992084aa4359bfbca557b2fd2aac90699477c08e2642839aff02e1f991fd', + '0xa2aa7f232747328162338dca86222e3d65780d3752bf186954c8b8dcb404fc3c', + '0x7f19e779392af0f07bb0f204c8e26d6348b918b205cfb5d8a86b75ebcc3f6a77', + '0x16544c7b02251d57ef7645da316b9d6390e3b6b16c188a9d04774c8d1db9ee5c', + '0xa9a84d6e9a028b577b0214b995cf9908d90447475287aa377981d37419e1ca4d', + '0x04137dfab9a00debb2de319e83d78830c1e9b684ad39c94655ad43d2275c1e03', + '0xc4370d5a04f0c1e826654991271fa86ab3be4d5ff9a6d60d8e110a48bccded0f', + '0x36eb5e2dbc795d6041838d736f73462b60d50cdb410a70a3d366414cc35593d0', + '0xe3e7b86ff9ca83b58dbb08036e386081f8ed4bd29231ea77f92bc82256eeb1f5', + '0x344df72c9746e0173942b2c691b014121bd2fdbedf02f67fede554c4ebad8fa0', + '0x4f04bc0b2db15ab392e88d940c6eaee7f5c21015e2a22830d8af46f64228a8dd', + '0x469cc9ac528b38cc5ffd9f372643264c15ba1a90ff2d756345e8abb8ff86c686', + '0x8aa34bae2ca520f918a163e5bee225906563eb7d9be4483f158ca8f1da144846', + '0xf96a3fc209338c549bf827682ac3f61911381a306d6a99bce811a2679532b212', + '0xd0a1e5c15dd277a47189dabfa4cbe3a2e654e6bc94259407e57fd2a6232d09b7', + '0xbfefd5411d8000e3dd91be45bdafbfbb6da4304fa712e03362cf37ad221c630f', + '0xe91c09d9a25bef07924060d2d95ffac3d5862ed065bd97c8486dafbefbaacc15', + '0x0d6eac8c42e3db05a05d14558b901966c4ba0fc87e559107875c99b01fc5c945', + '0x9c228d7e954eca009b4c859482f9470acdcdda58333d5846a1c4cf2f1fe5dd3e', + '0x4c3593c3670865f6611c262e7f85f25667ca09bd4e111dd1a67ec435e6166d54', + '0xac51e5ecba2046447d071cafb381041224cd1f4f430209120b9f4a76e4d1c99d', + '0x168c7684f8d63a460102927b42f26bd604fb109a6d3e2c58dd6374088c5d53ac', + '0xf8df32019f00769081a756da62fe3b83ce58ad411702b6c90e65c2f156727009', + '0x16770a5bb31fde2f3135c1332b421217a69257bcaf06a69c78acecbcead4c670', + '0xf94878587a9c1bfd41874aceb79c0f1b116d8d4330220da2e7cdbeaafaae8efb', + '0x3266f4a49950f4eaa9a93f557cd584b642328dbe3e3ab19598a91d613879907c', + '0x104ae0376db04ac36f737d197fdc1f12f99367277ce8e4bdb4419fbd9b6977a7', + '0x8762807fbba307b7920a432e1ad619d6a3583ca1b6271309be049e18e95edcdf', + '0x4ca47b0053313b10870bbb81805e5a86b6c288566de95fdb2842c4715329280e', + '0xdf90a17ea831d77617030bdf54e449c0826d6917018cc8a4e052c245a6c5a5f1', + '0xf299b966769d055004f73f495da8d40e85435d2a988d18cea1c3350edaf6c9ce', + '0x80429fc15e1e4db31af93874e09db5810f82d6dfba0559ce144c8f8ecc3596d1', + '0x7304f9904e9c0729ffaadad94c418f4872e6f6d05ec63d5525098eba9645766a', + '0xc2f41d0936ca43010d51c8cb21127db92c970338d9f980a9a99f912516b7395a', + '0x02980f37d4cf3d1c9bf849d87038fdc68f10255534ac9931c7f7b4a344c9e217', + '0x9bdf31a6eb872d2e7d1ce6c6e094b3170422c7dbc3231e9771ef5811c3a5bed7', + '0x55a291f3a3c0b29037c9f8d00f8121b68ca6a4a649fccf1663fc1e1e44b40bcb', + '0x566762bc576d9dfa7f22b8e19b4bc9e0b7149076ecc1c8523589ffa9237a57ec', + '0xfd9d5894a54b34a7a50ebce926b020bf8c9ddd38c1189138ca278bc7a8c7a45a', + '0xbeef70fe2039041dbfe4b604ce126c457cd4b2e29c7486f1b9473554c7dcbd95', + '0x681bfe16e83b1079fe2d559782e3fe605ec4ab19ae126bc012c759680669955b', + '0xfa29616072a5c70e08991b5dc7ec946c05753776575b5f83cc651c26c8b00a8e', + '0x95071b53117e19c1c6fb4ff7120aedfbaffca5998eaeb826ea7b5f7f8c8e6181', + '0x6e6eb46e0fe4ab93597098408777855a3b4f0ea43cd4fca5602b2cad6ca8de93', + '0x7093ea91793d4d099c0fe9d742813a2c7a373e09128104ce6d210250a616d6f7', + '0xd861cdb783ff9d28788764bc369c60397f8dbed7f870914b9911cb0cd5e1ea50', + '0x88fe61ae166364c90b2155d746152cbd62020e0d04be36ffb2de495bb41ee660', + '0x56316e37f3fa65ed240bc7fec2913b66ed188f8df100663ec7c91711ab645162', + '0xc161b803fe292ef8074f49f4a2446f4ec27b2d30444441da04efc515b339956d', + '0x20c1f98778867aede63569f5503aeca5467fb5800e7958513bd0b5a97707d03a', + '0x24fbe04cae3ccc1ecb6adbb7fd862c9f6b9a2317603d59b368787d748e80502b', + '0xab0a0ec722e06a7ec18bff1f89b00ff42ee1d817ea71bf722042f4e6587d946f', + '0x56406099b1e91516d8f40eb994f3cf7339cdd77d3ea4c4c1552d51d3704da4c2', + '0xe7dc19faa3fa868567ca1673f7ae8110a37e92c3fe6a7882a34b7c3f680673f8', + '0x2f44f394312974eb51393415f05876b163197e768b33097d57f5948764030ea0', + '0x86b7ce2b6a5375558c492cab4184a2f2a1bd5a24081ddc24739a031e9bc94ef3', + '0xfa1f80f9e40b8f90c3ee886d00b6a1145ff8b8be532886aebcf9f24e9304592d', + '0x1dceaaa1b1483c45be997cd1fcf6aa85c6cb658790d96573bfff291468a52745', + '0x66b86e7d4c138554a1104fa350e79aa62b2a6c47e3ee318a8ffe1dee783b047f', + '0x344b30e769b5ad40e76ec40c4797e398767be0326702d98c3dbc5e2108ab77fa', + '0xc521ab3b7d2e0f160b1a9e46fa347721083f70dd4313b7567918c0e2de0aea02', + '0xbdea0dc6ab3b41d6b79f494e24866e2f290d0a28bb95e5f8347239f8898fba43', + '0xad4a82a19508d3cd8879880ae569922b469752436989894a9984652d3c5da330', + '0xe1deaa3747c57424059fd8da715821784ede9b1cd925caf93538b020259ab397', + '0xd19271f6646cf87406928acbfb0b7251d0958189fe3a9e96c9271340ed246c45', + '0x96922bbdc258d2804b505cfef8f2104b377ee12ee63a6838c496ab7c432ce5bd', + '0x7e202456b35bc8989921ed6b770ea2adbba2d3e6acbb3133dbca2aa1b6a37f0f', + '0x2d59fa48655afa14de810ed573529b3c2b3329e41906feb5c10796780d1298da', + '0x4c4f47e968ad4a9758eeec7ea433e50997938163dd86850db66951bda3ff56e4', + '0x9b642323a3e0a14b307a793e7553954930e59d28d2d8e79aa3dadcf2b7db632b', + '0x6ae3ae34865d237ff1f587ea046be3dc59e67b3980c1dd0c2ff65da6ef6eb83d', + '0xd31b029a2c1d2460bb160e78f483b156804f529fa297f73ea716ac2461ca3804', + '0x37e91a0d24d1c911e36c432f6ee53a93286caf8129e7ef86dbe9f07096a18de0', + '0x8f9f4ff838dffd35c0f540f667fee2557d3bd43cfec8667a3bbe3f0993b700f0', + '0xdc10549c264aba378fad3e3511dbb83c21ced53bef224d8ae4db9582a3cd03c0', + '0x805c6fba20eb39b210f338692d1aa489c707f4734c109885889ccb4a810daa40', + '0x9b15ef7e44e70e5150ecf2b6af3d4cdd1220f088c0cd5cbcb59b141267f6830f', + '0x07a0f13d71a5500a7ad4ea3955d08300083206b14f8f98084f1de590462ea7cb', + '0x1bcebb39fb75b1b44c2248f375f6b2bbf30595f236041ecf2b73c12cfef00aca', + '0xb33c1d16e380e0fa72f1262a4b2e840dc64b5f9f35d5619e36a7fc58c4691087', + '0x3d4fe26bb5cd1b6ef6d8d6edddcb52c387ef022ea2242b418fcd186aa10afae3', + '0x1cb011c8b03e6ea34adfb9b32cc7ac34b4de5d4d71b9c1bb4be244359bbff242', + '0x376d63f921dcefa5b6bd1a55381b5592aa95c4873bb157e465cdc2d80b21d092', + '0x0f9771071b0688bdca60c633ff5e6899fb486b8add3922a6150869401b800183', + '0xa1750d5a98c8e88cf5598994fdbf476a1be449ee6be7ccf89f2d397e59184e43', + '0x8ce3360d39545c587712d75b2d3e756ed73e702efd80f288183d1489e3ba4c52', + '0xc9df6032459c302a64130be8fd3e9babc14d427842b44d0a23c4b58737d95c52', + '0x6935982984715985b296ea352fb5c4b1107b8b83a89c7acd0eb95b91a64a8fdc', + '0xc357cc6e3771ae53b4dda4e874e1e287ed4ea56035a9e9fb1c8b8d4159e98aaa', + '0x2470e704c582b5c3987b24d0412ebe382574e63cfedbb647816de49ce40af0bf', + '0x1d906da7a90ede44e9965574242516fe247d80889af965e4bbd3f226de0e44d4', + '0xb62be604e35ae73f195bebb4a006a568f6b33d279da9341aca8b63a7b82cdff5', + '0xede1d021660deb4c024772c44b833ca8d96ec63d5009b250ae823fdb216d3902', + '0xb26184c8d7848c5e04a26ff66eb6b570cb760ecca9dd4866e92bda1bf711460d', + '0xc5414584be843b4483a445c7c2b70dca299f42667920f67dcb5c5c5c47877ef7', + '0xba759e5ed395685a025b87f4514189080806ced8883517699e61343eaa511c50', + '0x896f7d21c6beb6fbf8da17fa1251803634b164a1fa5cceb213e3f5b327345497', + '0xef3f423cfaf0e8451aaf8fb6ec77314e8431920328cdadda41a76717e2fb6b39', + '0xfa7649c670cb601daaba7b71f965143b530e669e71697c4944fab7d7e0a4a142', + '0xc0b54989b92638f5a3de190face65ef6d144bddf5d4928044b5ccebd16e7ba50', + '0x1279afc4e886f3b9a57afea2b6f4c9966d5bbe5228bb96dbf98b6477bcdcda35', + '0x9bf97eda507609d8514a7c1060b591c70541e3a53243bc9d89e24fee18455e1f', + '0x2cfd171742009ec1a9611cb1f0bc9ca310430e4e1308c73203800fc121b27fd3', + '0xf39a8d030e0dab33fa2b610f0e240147f478adb15da5ea6ff811f4814570c281', + '0xb42521e551b7f729f7eaaa6b96822f9fc56176418c6ecd9b076c57d03e1742bd', + '0x1c83390c7015628537949a48b12a910a10be3cd299379661fe340316b0f84782', + '0x252353de38c70b1504402ac9dfc7a8323363b713aa55d88ae1a67117261c6720', + '0xf43216a76f23b55662c92ea0fa4fb10a1a810265fce362109e37407019e0ab9c', + '0x2ade0e2d8be0d2b49e0850180317e3724f593f76e950b0aaf474e72b39cb1849', + '0x63431dd248e68b7740d2dc942755f11bb5935db3077794c16469a450658427f9', + '0x8510037dc51a9176c3c5e9b0272260d3db311a8e5a7801996a692f407085bce3', + '0x39f5032ec907843eaee6a79c4ed87525516ad0fcfa5e06151841a5843ee837f1', + '0x43593617b67cc35b148039ab0bbf0af21dfe91ac7e6f18462cd246b075206562', + '0x6f1468f14e8f3aae57b6a937d06a5f5a331b12718473ccea5f4d2ff1b4bbd6f4', + '0xf16ed038c22f09535b6a370d5d550af59f55378647c572bd1c12bacf28f7ca84', + '0xc29f438bfedc153d12d1fdbc627e287bffc2d43b416c6a6e8ebb55e3cd4ed4e0', + '0xa0f8c902434068cd4fadd7cfcc5107db854fd96c59e00a512f89984f8abd1bbd', + '0xffd4bbc831e2d41273601030ed6996eb09e3fc855972c85e3b488144be67f3b7', + '0xa8519ccc4289b9eaabbed3ba1eb5927f171b1eff950e80b593debce608edbfda', + '0x2094c857078ab459096bf55c72c9a8ef17784fcd5962236ca836e3b8ffef68f6', + '0x4145b98ea815fef47dd9a19e428f7536eb8be3a12e52435902a1998fd4a41eda', + '0x49640855f5fd5ce369de29c7aab4d5edbdd22a50d7d6cdc0f228828bee76fa7c', + '0x7cc78cf2b92fb29eb2dca7c693488831de920e884e9b8328e55a5fd944d23937', + '0x9821f978d4ce40a67fac78c0b04ab042ddc37a05f7716322d738b9f5c5ee6d1a', + '0x4411dd429a4b3470de02c7505978c5724564ca108b99f011903fc0e92ada22a4', + '0x0eefff95960fbf317994477be44503f9387c70ceee95b012de86df54d9858e6b', + '0x48e7f20ce9a1f392036f39605520c4e4b1cf3c0ba1ff44e21ed88453c670dde9', + '0x6461ab69cee636689f35c19e06d2b65f8613d25a1ab089bb7b65afe07bfd9f2f', + '0xf65514cf0ff15fc0a13db3210e30f2ce16e0c8b0fbc3793be8ed6b9c07abb8a1', + '0x86a43d212cfed60f1361f9b17af4957427c898e3ce0d101bd7b9d86760792ecc', + '0xc41446f68562d82427a1873d184d36f5d5a87c243092e64cc88b60f3667265e2', + '0x65e056a259a5cb129e4c1f713dd2a8bcc22495aedd72d4b6afd97a3854caee32', + '0x46bda60f4d075439c304f61a485dcf7f976f3cdd62d2e2c30dc005d78e0752a8', + '0x6fe5f4188da0cbfb1e7cc2536bba919dcd7e9bd7a66ecff3983f70518274a036', + '0x38cc82c5c6ec6c5a027c31ac765d7c5223ad6e721ee4dd48f43bfc20974057dc', + '0xf77eb31b37df6b5cca5ae29a7c0419654a9a9ee64464290308a509978400c6c4', + '0x9f798e9369b704b91b5b6c50f6c82bb68e1b78e1ec539b7a76b36d8aa2b6bce0', + '0xf5cd940e11ae3fb0153964c23fce3685fcacb2d80420c45aab929711d9d289b1', + '0x40a6252c882975d007bc0f7c0cd1477ea535e07e9aed5029d20d90c8151b8b68', + '0x9b52fd44f251eebd3f0fa807701464ca5fb22ec954582af0d759f142cf5b5268', + '0xd63f9fb2f2ba26251b3017ae99ec3a92a33db634de6c3106da0593cf04a3077e', + '0x2313445c2e34f3099d787d85578eb4383c29f1517f0923e51c02df21f517f978', + '0xed098f6ca8732dfb020e0e125fb72622bb0aa4a8d19e1ecc0935f14f580388a8', + '0x17908df8960d27b9d7cc6720512b2ed82eed3a603058bd03d8dfc77eb49c2b9b', + '0x594648fdaaddbcff0a0264394024da993f5be315031538ee4f3442c6286ef803', + '0xf2ee78e707d1a86abd36e2f284a95b67ddeab1399f910d703604c884c80cb9c9', + '0xac1fe1348f71035f622fa2c614bfd50c26d20329de53e081e2cd44b32e299974', + '0x24c0f9cc1d0ad8bf7806b7e3d6741b4ddd854760ef070da3fd86627ecf1177f9', + '0xe8bf22e67306bda20401e0d6b62a874edc7f40752bc8053f17f637ee1c85593e', + '0xba74cb1ef6b6dd52d02f39cc2311ad7af567f747384b75f84024e60cbfea1955', + '0x667e14184621a04be8e373a43583baa3c5ccf84eb18f05c4019a017a2aceb1a7', + '0x18d10680ef7d2a5a7aaa66c83e24f151d5bba92268db1732a9f78e656bcfd9de', + '0x250bb65f8bb616ea9e92ea8c52b87573fe0cb060cf85b78ee201a6c4c8fd2292', + '0x920ec8afb86f896e7edc999ab9fca9963fbbad8f5c63c1c4235d7c9ecdddc221', + '0x1faa88a4b7636ddcac75ee07ff50b91661a20d3054b5b1926c2e075d5d1f0234', + '0x491647880c0b177db2a1a576fbd61b86b43d96638de549c300e8501ec1558f8b', + '0xed0e25e9b9d67cf48f2741583a7f543782ad79c750aa86357849c1ce3b70bf4d', + '0x67d5e91b93ad852a96cd6c4babd557a618d6433bc4ad7c87f1db22aaa5326b45', + '0x955cfc9473b1968490e95f6485c150e0b3e18a11030cf9016cde1be14d9ec1d9', + '0x061e549f721d3b3408b2edb8efc21b6cbaf48b1d0bed081ed45b786d38bd33b2', + '0x9fcc8a5dffafbdb42b8c48fb24ef10329d2cdea069339507ddba98be870810be', + '0xd92677e4cace656a4f7cba356729fcdd547e9aa3020263b5407e124a5e8f6149', + '0xcfe841a3d218e1f2e4332e4e17cb0ef63b33994372297da0585d6dbfdba9d9cb', + '0x9095a4384d71393011ec7ee481b274bc090d2412b80705a2801482cf71875c33', + '0x4c70b51b16a8c493906d98a30d4f75c52d19eca968eb70581c8bbe97a9a46fa6', + '0xbdaf63ddde6b1e901dfbd0a7383b6f036cfbf044dcf14253b540d2872b702fd5', + '0x336513a26832f4a45dc1cb820ab727507df98fd25c2b9304f221b7c9faaf4807', + '0x70089cafdd7c7648131da68590b9f087bdc6e832ec02f8d66c0b8a0db4e92f50', + '0x95bb171330407ac999d609ae001def873a3d3e54e265aa34d4f77ab584a3a822', + '0xc01cf941f6bd5d39359f1d0e471de0ce1af5a0a992ac80b61f8e961a01ad00bb', + '0x477664d138d4065fad19a9100f313dfd3f96bd315e59055cace6b4e21f90c749', + '0x6af48b8b9c19b73a91f436df205ed4c7c6e3457f646dde8c4c83fa8c24b91b28', + '0x30b5ca3d5742e83aaf2b77120bb62abf410d37155630c1a118672f8019e03a17', + '0xcecb766632beb1d56afca63653ab368ab3d299d94403462ea0655248fa5a847f', + '0x08d28a1540f757d66c8ac8ee743ed3b11c5f2dbde15f49b167888273e53edbba', + '0xfe1247d36418776c00f78ce92c3baf97a16d0ddd99e164014222f219157e1f10', + '0x87dd0de151893cce9aabdca97aba3398d7138a3efdbb666995621b6d5e39bc63', + '0x198b6573b26fc91eb0c57ad7cb09dddf0962d79d80f87974cc7be007524870bd', + '0x7d3b168b652c1e56f8b2e621f9d3079d7a3094b08a8e0ff525a90edeced0770e', + '0xc61722196487e73da1ec3c60b41e693c2369a61047ec27c8f7d320c6a1a326e2', + '0xc0b036b6fb211d68caf463b07042a57f7043154f50a3eda5f68ce083b25d7d74', + '0xf15807f0b972b14af842695c472a342caac9aa7c9e18beac0e78e2dde56f6080', + '0x7ff58fa0d58de24d6b84f0af71ad329de9ec65d938ad353d8638c5afe84e850d', + '0x31ae513dbf5cb47a2e00a54412e604ecce03f06496ef78627e68ce84d3738dd2', + '0x6c73a8f3728ab8747ec36615cb6c2a339b1914f50ccb26de6babfd9d0aec3569', + '0xab525a540355d6f72b3d94a0cddb4d76059db73d5bdea21f6f46737b73d99067', + '0xcb857489dff80baa6565d2f8306c5e126a8841c1e322d41d28a4091e7f2a5df5', + '0x74649e2e93d207b3f6dfba43752eced63a7fcc9fdd85eec1daf5584cdb145fc2', + '0xcae911feb4c96c8c3df4d6c2e8d6f2821ba1483cbae4cc32670b063892161a18', + '0xd6f738579ae5d65e024a9ccbd0239cb4623bd438a25acd1e94563665cf2f2ec0', + '0x373f5e00e1b6219296eb7181f75a3f755d966b62f625ee3cb0262e084a488c8e', + '0x02296ab4dfb0d1fe83d095d1c879983546abbc59139f3d8fc98c426b235e44ef', + '0xde5f486a7fc77f11eb90a812afe055fe85236e47e96a12454f594450a83446ed', + '0x5537b0ce656f5699e6277b82d7ee55ea25d3c86a47d469e44ddb4a7051b11864', + '0x3707d8e7e8d5e35920165c9d5210c5c0ecbcb64f32104ea565c52d01da147b86', + '0x7d6c6ed8152356b4eb7ad034c44d18d9af5cf744c9faeede9bcff19766a0c711', + '0x21a67b32a144ebe8adb45d6271e39234877a04d627d5b0ab6ecccd2ab2af73fc', + '0x142255a57fa73dae0ff62b0aa6c39eb8ebf642ab2cfdf01e23df27d81219e7b6', + '0xf5c0f7c4bc558bc09546278f3dfd0476a11e4429a5593a7917c1ad0713caa0d2', + '0x8677af03ead76c750ec101b2a7e6bdc9486b9d62a4d20847548b77c7fa78b248', + '0x69a8cf56cb360180afe07f7a51ae628835ea04144834251f28f13a4a32077cd9', + '0x4c8e39d2f850a56214d92e13a9b037a7c8c73160ec135451dc7c210b4f513584', + '0x4b92b39065e53702efe88ceae68c6a77689df49bf981822affafa17ce4fc2ed7', + '0x095c21b4c4be6111f6516a9e796377a0a7ee01c9d47bc4bf4defe5c06fb2941b', + '0xdacad6ad93d1dea104e60a2a99f20e5ebfec8f71c18e7f11b903bcf85ae4ec15', + '0x8e02feef21d214b405f27561a140b3e6523bfa9e1e73242cf69f57421e833f8a', + '0x3f3b68efb1ee1e5a7b17383976173c540d8281b0667334d4c0f7da7861d5bbfe', + '0x57bb72ef7350613e1511ce4e06ea8c22723e8a72d63220eaeb3897f28198f598', + '0x264c22bea260b855cf0324db4e8725748f261b2ba3b2897838bdb44d0c0a4bb0', + '0x3b8ce5192f2220ef316d52fadd926b6bd7c2cc521ade64a96f994817c16a3f9a', + '0x85cb8968b437194dce20698db146a642a314c380788f3c8513fc1e67c6ae4a9f', + '0xf2dd416d1cb17368c0a1b73db9c977d131dcc60229410e9a3f910b0bd2871706', + '0x6469a6844e3117a14697d2bd066f6af77fc354a5a921665c2430fbcf76144e9e', + '0xa126a9e521d7d9dff22c4b41a6280f8877588a6c19c6c236db67f7716effcc18', + '0x44540c9475ba7927560a170a26c2215bb969c3eb172fcc94d0a9705fdfdbd07f', + '0x506f4cd54892c7154b643c811670e94e24bd0c5c57bb2afd43351e40c5e455c8', + '0xdf1a8dbe63221ab7821166ca393c9fd5c6045a5e60cf362b233173b296f3ae87', + '0x0b26f9b8150672b1c4ab05e1d3fc70ee87bfb79f01f670a37d3b510dd29d505d', + '0x5f87692154915f555b12f393a97d107f023afedb53e2e70ca2c8f8f9dc72c980', + '0x2318112579190219f7bd59437c9a7ee7eabef6fed7dfade78b64aaab997e5c0c', + '0x30e39ba2754517b35053816b59c7e7cfc00307fef7d19970f86ba5ff1ab93669', + '0x370a5d722ebe578ee99c1cc1f385194daa550fa1c668ed24125f200fc9eac2cd', + '0x443da3a082945fc4768a395075b5596b3e3f48edd30a6048b4234f81a305dc0c', + '0x498d1257a4e7eff01ed4d8d1b9d6a6b86bf8c4356424446c92cef10c8f33c693', + '0x4310b805b4fed6514be7443b4c62a7d6a3420904cdec854e17369b187f392dd3', + '0x7b949a192ac06e9b5d9fbea4809321b4f21a30712b61973aca544d9e356ab6b3', + '0x7ce92a9bbed5ab07578ff4e1335390fd5c9803e56460c3131f25e85d7e683a5e', + '0xde9e78640fd8d932dc3c12a9e040528aa7fc20a3f8f04683e2ba1cd4627452da', + '0x72b3b0a0894ee2f3468b6371d08bfdb2916d8de651aae163b83ad84e57385ecc', + '0x103776b1c4891b09282f1ad4efbee5e978ede4ac9b0a23bdd78bcaf869beacb3', + '0x881044afe781e8caa71f4917c6b99d1e93cbe5fbacbb64fa07cc80536bd16975', + '0x7ea4b4f622df34d993bab359641e9f12a52db02ac8bcc579b5a12eecd6ef98df', + '0x340ed07090a78de15c1d46e3a3ee514c492125290b5d0206d0ea9c71fdc6af33', + '0x7120e32cee426a5b0912d5181eb6fc7e1f6c1056b3b7f53287ace9fd73207a24', + '0xe966fb1f87afe75f9978ffcf1d9af4bc1b6bb72d2748bd7e7abbbf7654982b16', + '0x415e280a1e555c042b28c139b93978c2fd9752765a8cf875c9cd26bfaaf71bcf', + '0x4a6015103c8223b0f1f7e2b01c044d70041222ecf15b30c5a88ecc94dbd1fa58', + '0x6266a15f615b4138a0182fac52cba6b43f520c3f8a8db58668ea41851cd8dbea', + '0x2f5974024ac1fbec9bb8a94a868e5beb47ea0992b1d0e92c81ce39618e64873e', + '0xaa729cc736686c3de89aff3288b06bac2e2970c6dce329711373b859eeb3bc67', + '0xeb3f1cbec92b67fd997ba818853374ee782f1ce094fea903d06f5f99eb0b9b48', + '0x24b0cf391de389da5020c46198e158c1b87279f80bf0c7713bb0949cef90f884', + '0x2ef8a2fee462cefffa314c44569ac1cb4f096fd8bede594c97a1cc6582891ff5', + '0x564e14cd96cc9d4297bd347bf1633bd5d05b5cf4da963ff3478f7fce6e418e49', + '0xdce514cf41e00f69f04033a6570b226077cf5610eba4e67c415cd9dd3aed4036', + '0x67666c6bc520f9c6b14cc2c0330c000d9b46a8c12e1584913c9c807d2d71b559', + '0x435d11b89ff38f4b934d5b01dafe2870047454305b1109bad920d09563b0a1e0', + '0x0d51b734cbbb446e81b4081c551c6afbe59ae041186d1a487eb8340bda597312', + '0xbff4b9c1d3f1c58b81b2fecb19f0fc956bc907f010960f4b9f28eedfa3463f48', + '0x46ebac397f61c4f8f59efbe8ce3d24390c1971471d3566ddd83cab9a1e2820fb', + '0xca9ab444b76d324febd154d1e1e86f7996666a0825bf2684a7897f449119bcdf', + '0xffd9c1c5799f847ead7d06556d978d55d3cd7df3a29d3dbeb1c92cfc3475ad61', + '0xa1657f249d8791322247ffe2a7c2d1ed9c9e1013e3c0a058243b12978a743464', + '0x14c5af0962f849e92c0839007c42eb111cb8e2c0eee4e99152cc291071fb15c1', + '0x923ceb0dff95b6cfbe9ed46569b7f81abf4e418acaadfb972a67a6f11bce0286', + '0x34a08b176eb43a9ded8de10f630bfead5b4412d93c153d3132607ad2ac998bdc', + '0xebc97bcd6824882b158bb567120e431e061ee41208f84bbe8468e25459668528', + '0x0eb46022e83f55ab6ee2bfd7d881b77770d581601192636bbf2398514f8650cf', + '0x37d3a7d06104bb07a4fe162e63ac14a1c0698a1cd292116e393dd8ab4b4ed700', + '0x0176a22d4aae4b8e503f84cbe87b8850544e2da12de468fae1853818af140fb1', + '0x832d56f7d1fd9fc7fa1c33344ea577e801af2a4a50605a29d76409d34e811d25', + '0x5cd7f818f37fd597022af188e89bfd70d948c5d687ab146d72a8a1a5d4e2fdd7', + '0x1a9823b88d2ddfa84b669409af3769b1f674a41dd91e51f4827786a1612e0f53', + '0x5b99557aaa336efe552f76f3f082aa27a3ac236ae3a5ac2ca289d6a13342bec4', + '0xef8cdf5bcdee0bc85d25616925a1915f72b633f88c8d0ec23a65fd2d664cb9b1', + '0xc301eb7b226a5facac8b9c9bb4c36988e0487f6513f8f89b3df3d34f78d7e84f', + '0xc2ee57b93caf6580b92de798719f06021b204fd560f246b52f9ba0c208f9cfbc', + '0xbe58f1efdcaedacc5f20d0318672ef4faca8ef859a81071d353c7f565cd56cc5', + '0x7b0c5f35ae1ce063541ed1c614b102cdf97a271361e968b7aba4ab4851b1fe69', + '0x67d043258d9c3a8655f53bad62391894efd58f20de528f088c638e6e1f198b20', + '0x35cd64bd0365cb2d53023caba31ad593f4d24ca2e7886df6b3cf8eff6534d65d', + '0x1161b667918bb4edec47d5c74ab885555f10f11bab56a65bee19588a1302112b', + '0x72958d15cc47419a852a48fe350fc7c8a88e17dc553b9586611238da647063db', + '0x51d78637de895f585876ce5c2d4010da335070e635042bec008d12f6252943b7', + '0x6032d54e332d3862d9a2cd84f1eae7348565a5e04de7faf25338a6d516f28ffe', + '0x7a345a5fb5f785d25a20c768871a8780cd8bca25cd4776915335f8c8382cc678', + '0x5a1764c3384e060b4544012a842a3817f81798f4358f78dd1d469aa77d7fbbb8', + '0x1da4ca8a1022a12238c0cac2306b7d9f0943c02eb7a155469ef639ef3b046fa8', + '0xf9eed5081f483687a6ee5d0b0bc6b78dcccfab1366cc60c83c59210f9820aa8d', + '0x2fa7c9dda8e652843a9b9fc4c047ad6df2697bb895f275704b7d137674a4541d', + '0xece9e56cf1b3f3d7afc5a3eb13bf9c88be8fc709a56f2d7e0b9871a11b6808df', + '0x0b08a4ecf2aa64b46719d30d169be7d9eb02fa42e9e080decf5531206b7cc17e', + '0xc0dde6a48445673052fde7819d3a96a2ec602e47511f752c30247d7804fe416a', + '0x1ab93491016807073c5f820c8012f4260653fcd7a341050d207717b0c341d723', + '0xa160d8dbceee05c6d87bcbd7812e8e980e831b1624328cf9c9bdecdffc0822d3', + '0xaa589e38daf5530be102abfa487b4cb95d0e6536f65e0cba581682291ee842f9', + '0x3e676f4b7d5b5304ef6dc269282ddb6852fcc8266790d75c3ac675df592c1c5d', + '0x9037b7413e21e6007ad29bd13e7bcd726710c2d22cfa1d306d58543e10bd320b', + '0x7c9ff1bb6dbce0225f0aa7a3e22cd8b361d6f5613a34c38fdfda47d9301839f4', + '0x09b47dbedff401317d6d8e1d6517418040cea837236cbcc8383341189798e9fa', + '0x780acee612bda566c0ae326521f6f624a09ffd4e816dced7f017a8b3ef5f66da', + '0x9ee42fa581ff9dc8734a2c72d67169ff3070c16591278d5a69f84939a4673329', + '0x66faff873ea186f2a8136a268e75dbb959f48fc7c6979111b70c696d52af8b79', + '0x45475ae6a90a872c1ac48a8d3742e7bf676d464d9166ec8c5721798fba515e29', + '0x909e25fe6d2524e7eb840bb7f095aba6ef9cdd4cb74c932d7a1575ef73bc8eb8', + '0xda827573a8ea31fe3fc6984e62f5aa6631d889e47500c73eac9ab736e929fe7d', + '0x7926973e5262f7d4967ce862889cfa6b51a6acc34210f38a5fd15a69db2ea29d', + '0xa6686054c32bc726c4fcb11b4588b469953472283af0733778dfdbf416eedece', + '0xb5476f87f4b116f2a4faa95372bd8b9c1ef2c24670aa2e488f8b5c4a5046ae92', + '0xfec2ecb525e307532de52bcd2e770526368ac2e84803f680b0d9bcd60038a174', + '0x1e9d44e1b72b3edf9256b168a05412bf0b800c7f1e4c0d1911acc307d5167998', + '0x89bc605a43322376c0a28c30ea6e7738934b26c8e8587d51b4f0521684870391', + '0x1df6e6b6cbd26b058793fc55cb7726f7b158f3dc71d0daefe25ac16dab421beb', + '0xc7f578ce4c168462e20ad01bacde621b6ea3281a4d1ec9d040335e067f108912', + '0xdad66f4bb93c39817b8d23052c701ad001217df0d71808bb57d96e018ba8bf32', + '0x000b0e7b8f7a126f7e11339561cfa813c88c2b0660a8e437aee204d3f893a02b', + '0x9ead3823fc76d520fed651b2fb4613d5aaa0bd3096546a3271524e46bfdac23a', + '0x5ebab4373f9e7885f4d6707d4caefbc29019bc0ecb9ffa1ca59fed27d99473a9', + '0x3c5b54041abbb1429de2947976d04c43cd9365565c0a640de8b7910c451a58e7', + '0x0fcf13b7d7b971db77cee46dad8468fc1e4457e9e30a8f7230761d7033261b04', + '0x815773de465e16fdcf4c7d184b946fc6a13673818aa00e5be3a6607e60cf692d', + '0x539ba861c031114efdadaab7cd806376a7d5f4226571690c3a34ffb8ac673d0e', + '0x9f4cddffd65d557c5379c67af69f97c3539cecc7f9edf436161c46f9f30095ff', + '0xa89e90b1a3c6cb2cb7af920b45e0866052d2805d466dca0f32b99719359be63b', + '0xfc15e122c2e5f10ad54ce26f0c1641253974f608bc07d92b2ae63205a044c9fc', + '0x246a2c4b084409f3148ec581b1464bbba5d1630e7803409c25c30d32f2ca3499', + '0x7d44c9c926dd9886831408c54d2bdeac02ef4101fecb9c61152a8e309c5fd2ef', + '0xee4903a6a6a509a1cf6f0b884b2b24dfd9ec914bd4b63ebc7a5098e5c52867f4', + '0x486d74d9350b7090ac138ba6c3f143796157f6fbec692fbd9cae4cc73457fa2a', + '0x12a71292fabe0a9fec3c1fa055ec7509e7dc5110e1a0553796c0a64e7067e1a2', + '0xb9242af0ee574033a1b16df985abb04b84ff5ce24a4565b8b5f44223d20d62f4', + '0x40af908e4571a62ba19258ae042544cafa1290d17f766baa9ccf81e16f2a614c', + '0x3b199bf504b0dd691ab62dd815abf486cff1831b74c6a60c9d3e518bcf60ebc0', + '0x96eff926e8651d928e17475b5bd530e6739f553202b8a53753e1845b236ba000', + '0xb5c8c759cc582cbb113fb418cf25934cd3f38bf88a2660fd961c418d6a324f18', + '0xd9f7e368be719c34f99ca561601b9374feb9c8b0663f66fc02061ff6a2366781', + '0x8f97364683573380ee25b2b50542ae5ba7b999b8904a206de91a794257cd04d0', + '0xf2e81860fe5c155a8c05d5478a6a40feb32db68078665b827da9aa7489abe26f', + '0x9eb8befa36d2961b974ee8a07c79771a426024d3c5db18b9b01d7963f91bb923', + '0x21f3107b3aa2b106d841e67f86d5ebe9c3233807e359389e6f3520732bd9b0e6', + '0x3af752c5a14e1675512865c9b704d2d7e44ac3f322411fb831af2bcd60011cc9', + '0x6a89e4dd62bfef1b20375c73c4a04b4fb8df5b5fa9bda256c2dbba9bd32d376a', + '0x6cf7b7a626a3df46f5ae3d24ed3d9e9e70f0592bf4eacc1f1a19b015b60fe88f', + '0x265ac87bde09c15ceb810e1b21480a2ba5a91964d6873b813ae7a9ebdd0e65be', + '0xfb6f53fd89832caed1728dfcf752d722acecd2eaf3a79c9bd14d386ed5e222fa', + '0x26a2fa0654af270e666c9f78cda036520717230cf1923bffb8920de484a639b8', + '0xfc0fca111cb59c5e486ff24ddd0dd190e2124442e4886b0958eab18749620ef2', + '0xab8312ceaeda4cbc7fcd1dc62abf57c9bee24c11c60f982e5fa3fb0e30f4d2bd', + '0xe99aad04298f1a5c0758f27ad5f2d8db4a51782b2c206f8bd905999ea7f711bc', + '0xe4a119253f064d7e50c03982417eadc56a7df2c82dd5149aae6356dc185050fd', + '0xf09bcd61b9b4299e6aced82e2191fbca070c2279f4ee4d02f3a457c0f86b63b2', + '0xdb86685299cdc27877340671957b63502dc35b97e1ebc9b22ace68da87080996', + '0xdbfe883674e9c675c1d574a3141f70f1ad80cfd063a55b913e25a3d2418096ce', + '0xdd579fd0f92da102a90010a483c230ad7764f1ca19ec6b040f637643b1947d07', + '0xf44953043869b9033d164c8f7f5a399f2b65aa17b06854d40f3ce1125b8df48f', + '0x0f33d18fed3dc0b624baa829bdcebd33c733464daf2b41dd80816deae6fc706d', + '0x1ea8f38395dc2745e7de781f793d2efcd128d562edba2c7aa1b49718536fe3d7', + '0xcd14faa4c973a1a730bfe54f44fe1f90f5b263f1e20eebd6bea266af3b0994e2', + '0xe79d3148c8b58c9884d9e15e3b2dcdf7b860aff06eb78a29030bd7986494b93a', + '0xa9030c4b74ee5d41484e5d5c223ae3f303c6eb1183c259ee9f3073dd3fee8ddc', + '0x27bd44520261f349fed84ee45e2e77674bcb11a9d7eaf6e0add5757e6e83ce95', + '0x529113ebd62bc8eb30673f814295380c96ebb1f49f5af94ff287fbafd36abfe0', + '0x9407fe4daeec3ce931f2cab1c5033f1106571318350a2e15ee6d6099127a6161', + '0xa21bfe2333c2beba2cb583dc3a9850c7f9c1200c2e504b1d27d50e7a9ed637bd', + '0x6b7469db88a50a8de63dcbf0c02cbf449c4d5bdfaae003690317dad742483596', + '0x4d7aae4d19f3408ffd05756cc65db13d1d81ff6175e66a05402aecd16a9cfe3d', + '0xa43933a30f1378f3f264db40fc5e783832b60152ebea2d1e31d4855e07963c80', + '0x2c15b1ada8277ed0b94211393700a20423f640ef9f91e669eb8649b938d4f9cc', + '0x6350599116e90d75c4a6ff5f8066654f0266f308d65bd52601b12cfecff8ad84', + '0xb51973d09f22e9ab44bb2113dc268aff69ac4d29bc28ce6a04415400173d67e2', + '0x0805c3b10e7867d07d44e31c0bdd7c73a6af5641ce6d01e79e395b97378ed75d', + '0x47dbd60f7ed23100397f0be93265a6c57efcdc3b1ede4e76867dee2104ca5ace', + '0x6d7efa5144f13e975abef3867f2a19668351162369e2205c9a9dc916a0a8e1e5', + '0xcec8174afd339226f083ee1f748c3d08d6e1206d8c36cb214821296f26543671', + '0x0f9b6f5b284f0a6297e343c94787742eb4ea3066510ac00debed529cc275a07d', + '0xf1708f171dfb37beafe8cbab1574a93b40cc6aa159c01be0d51c331df2d2a2a1', + '0x2cc40a3c1f778666e0a1516cabee97d36d59c839e62dc5bc730748e9262a17b8', + '0x30120d51c5e80bfb778c69be0626cf425bcea2395205ee2599496535028fba55', + '0xccf95226faf462ef5271f7a0f86eda164365942f62b6586617026a09617884ea', + '0x52f40aa9c46a7a2e89ce03e704dba810ad720175fc695e1f617932bb272b7c30', + '0x22287296b99a2464e2b97bc4df5c9fc62f38ed0c719e2dcbe176bcb3ac9c503f', + '0x54041d6dd8faf7bab106fd47f53127911292b8fab37d57ed7cbda1d5292f8b51', + '0xf8568e0538883c9bd35e01f7bd00f0d28df515958a32bb79ec6503b1870c10c6', + '0xd703905d9f68d8fe656dad9453f8195272a30073b9bf54c9510ede785ab023b4', + '0x616c26cd52f2f58d2f7e3ee0075084ce4b62708bc8524f64d0211cbd83e63b7f', + '0xce9de56a62cf971a4dc2bdb6eebb0eef5e61377ba1a0815ab2dec6968278b137', + '0x6c11a4f8fba82a8571b48f80e24f30448061149bd5f97c5a6d181d1b90fd783f', + '0x5eaf241e01af9897432c4b802bc249686bacd900311a9b7c87dfa5106906ffc2', + '0x2545bc2a7695f14d242ec6515460f290d679bcd3d9e0362404a6199fb63e16cd', + '0x214e787a08d3aa9e294dab2b339140d934d74d82a3dd11c57799604c45dd5e81', + '0xd183d586410f4b8ba9166272fd2230eca48c2e417819434ad8175d99c71300fc', + '0x45c71e820e49a039e1d7e372a1da5068be21b1c460dce49d915ea7005b91295c', + '0xbcf1a80ab5c42aa8b80d93afba42fd25776cd5526cb89b59e528500ae15e39a0', + '0xa5626895e61f24565bdea9e15f30b4db7a3d6683345a1b751f43cd7d3c71461e', + '0xb5896381cf6e2cb64af3d2e616fa3db1e3fb952018ecd8929a8d5db4f5142f99', + '0xe2546d3c34bbcefd5ffa0275505e9cd394f8843ef5b119968abf72b387407055', + ], +) diff --git a/plasma_cash/contract_binds/base/contract.py b/plasma_cash/contract_binds/base/contract.py new file mode 100644 index 0000000..0d6ef5f --- /dev/null +++ b/plasma_cash/contract_binds/base/contract.py @@ -0,0 +1,147 @@ +import json +import time +from threading import Thread + +from web3.utils.events import get_event_data + +from ..utils.getWeb3 import getWeb3 + + +class Contract(object): + '''Base class for interfacing with a contract''' + + def __init__(self, keystore, address, abi_file, endpoint): + w3 = getWeb3(endpoint) + with open(abi_file) as f: + abi = json.load(f)['abiDefinition'] + contract = w3.eth.contract(abi=abi, address=address) + self.w3 = w3 + + if keystore is not None: + self.account = self.to_account(keystore) + self.contract = contract + + def to_account(self, data): + account = self.w3.eth.account.privateKeyToAccount(data) + del data + return account + + def sign_and_send(self, func, args, value=0, gas=1000000): + ''' Expecting all arguments in 1 array ''' + signed_tx = self._sign_function_call( + func, + args, + value, + # may need to change gas + gas, + ) + + try: + tx_hash, gas_used = self._send_raw_tx(signed_tx) + except Exception as e: + print('FAILURE: ', e) + info = 'Failed: {}, Args: {}'.format(func.__name__, args) + print(info) + return tx_hash, gas_used + + def send_transaction(self, to, value): + signed_tx = self._sign_transaction(to, value) + return self._send_raw_tx(signed_tx) + + def _sign_transaction(self, to, value): + gas = 21000 + gasPrice = self.w3.toWei('10', 'gwei') + + raw_tx = { + 'chainId': int(self.w3.version.network), + 'to': self.w3.toChecksumAddress(to), + 'value': value, + 'gas': gas, + 'gasPrice': gasPrice, + 'nonce': self.w3.eth.getTransactionCount(self.account.address), + } + + # print(raw_tx) + + signed_tx = self.account.signTransaction(raw_tx) + + return signed_tx + + def _sign_function_call(self, func, args, value, gas): + """ + Takes reading and timestamp and creates a + raw transaction call to `ping` at the target contract + TODO: Add option to modify gas + """ + # Build the raw transaction + raw_tx = func(*args).buildTransaction( + { + 'gas': gas, + 'value': value, + 'nonce': self.w3.eth.getTransactionCount(self.account.address), + } + ) + raw_tx['to'] = self.w3.toChecksumAddress(raw_tx['to']) + + # Sign the transaction with the meter's private key + signed_tx = self.account.signTransaction(raw_tx) + + return signed_tx + + def _send_raw_tx(self, signed_tx): + tx_hash = self.w3.eth.sendRawTransaction(signed_tx.rawTransaction) + gas_used = self.waitForTxReceipt(tx_hash)['gasUsed'] + return tx_hash, gas_used + + def waitForTxReceipt(self, tx): + receipt = self.w3.eth.getTransactionReceipt(tx) + while receipt is None: + time.sleep(1) # Block time avg + receipt = self.w3.eth.getTransactionReceipt(tx) + return receipt + + def get_event_data(self, event_name, tx_hash): + tx_logs = self.w3.eth.getTransactionReceipt(tx_hash)['logs'] + event_abi = self.contract._find_matching_event_abi(event_name) + matched = [] + for log in tx_logs: + try: + d = get_event_data(event_abi, log) + except Exception as e: + continue + matched.append(d) + return matched + + def watch_event( + self, + event_name, + callback, + interval, + fromBlock=0, + toBlock='latest', + filters=None, + ): + event_filter = self.install_filter( + event_name, fromBlock, toBlock, filters + ) + Thread( + target=self.watcher, + args=(event_filter, callback, interval), + daemon=True, + ).start() + return event_filter + + def watcher(self, event_filter, callback, interval): + while True: + for event in event_filter.get_new_entries(): + callback(event) + time.sleep(interval) + + def install_filter( + self, event_name, fromBlock=0, toBlock='latest', filters=None + ): + event = getattr(self.contract.events, event_name) + eventFilter = event.createFilter( + fromBlock=fromBlock, toBlock=toBlock, argument_filters=filters + ) + return eventFilter diff --git a/plasma_cash/contract_binds/erc721.py b/plasma_cash/contract_binds/erc721.py new file mode 100644 index 0000000..c6516de --- /dev/null +++ b/plasma_cash/contract_binds/erc721.py @@ -0,0 +1,35 @@ +from .base.contract import Contract + + +class ERC721(Contract): + '''ERC721 bindings for python ''' + + def __init__(self, private_key, abi_file, address, endpoint): + super().__init__(private_key, address, abi_file, endpoint) + + def register(self): + args = [] + return self.sign_and_send(self.contract.functions.register, args) + + def transfer(self, to, tokenId, data=None): + if data is None: + args = [self.account.address, to, tokenId] + else: + args = [self.account.address, to, tokenId, data] + return self.sign_and_send( + self.contract.functions.safeTransferFrom, args + ) + + def deposit(self, tokenId): + ''' + Slot is providable by the user however there is a validity check + performed in the contract. It always needs to be the value of + `NUM_COINS` in the plasma contract + ''' + args = [tokenId] + return self.sign_and_send( + self.contract.functions.depositToPlasma, args + ) + + def balance_of(self): + return self.contract.functions.balanceOf(self.account.address).call() diff --git a/plasma_cash/contract_binds/plasma_cash.py b/plasma_cash/contract_binds/plasma_cash.py new file mode 100644 index 0000000..89393bf --- /dev/null +++ b/plasma_cash/contract_binds/plasma_cash.py @@ -0,0 +1,179 @@ +from .base.contract import Contract + + +class PlasmaCash(Contract): + '''Plasma Cash bindings for python ''' + + def __init__(self, private_key, abi_file, address, endpoint): + super().__init__(private_key, address, abi_file, endpoint) + self.BOND = self.w3.toWei(0.1, 'ether') + + def challenge_before( + self, + slot, + prev_tx_bytes, + exiting_tx_bytes, + prev_tx_inclusion_proof, + exiting_tx_inclusion_proof, + sig, + prev_tx_block_num, + exiting_tx_block_num, + ): + args = [ + slot, + prev_tx_bytes, + exiting_tx_bytes, + prev_tx_inclusion_proof, + exiting_tx_inclusion_proof, + sig, + [prev_tx_block_num, exiting_tx_block_num], + ] + + return self.sign_and_send( + self.contract.functions.challengeBefore, args, value=self.BOND + ) + + def respond_challenge_before( + self, + slot, + challenging_block_number, + challenging_transaction, + proof, + sig, + ): + args = [ + slot, + challenging_block_number, + challenging_transaction, + proof, + sig, + ] + return self.sign_and_send( + self.contract.functions.respondChallengeBefore, args + ) + + def challenge_between( + self, + slot, + challenging_block_number, + challenging_transaction, + proof, + sig, + ): + args = [ + slot, + challenging_block_number, + challenging_transaction, + proof, + sig, + ] + return self.sign_and_send( + self.contract.functions.challengeBetween, args + ) + + def challenge_after( + self, + slot, + challenging_block_number, + challenging_transaction, + proof, + sig, + ): + args = [ + slot, + challenging_block_number, + challenging_transaction, + proof, + sig, + ] + return self.sign_and_send(self.contract.functions.challengeAfter, args) + + def start_exit( + self, + uid, + prev_tx, + exiting_tx, + prev_tx_proof, + exiting_tx_proof, + sigs, + prev_tx_blk_num, + tx_blk_num, + ): + args = [ + uid, + prev_tx, + exiting_tx, + prev_tx_proof, + exiting_tx_proof, + sigs, + [prev_tx_blk_num, tx_blk_num], + ] + return self.sign_and_send( + self.contract.functions.startExit, args, value=self.BOND + ) + + def finalize_exits(self): + args = [] + return self.sign_and_send(self.contract.functions.finalizeExits, args) + + def finalize_exit(self, slot): + args = [slot] + return self.sign_and_send(self.contract.functions.finalizeExit, args) + + def withdraw(self, uid): + args = [uid] + return self.sign_and_send(self.contract.functions.withdraw, args) + + def submit_block(self, root): + args = [root] + return self.sign_and_send(self.contract.functions.submitBlock, args) + + def withdraw_bonds(self): + return self.sign_and_send(self.contract.functions.withdrawBonds, []) + + def get_plasma_coin(self, slot): + data = self.contract.functions.getPlasmaCoin(slot).call() + ret = { + 'uid': data[0], + 'deposit_block': data[1], + 'denomination': data[2], + 'owner': data[3], + 'contract_address': data[4], + 'state': data[5], + } + return ret + + def get_all_deposits(self, address, fromBlock=0): + event_filter = self.contract.events.Deposit.createFilter( + fromBlock=fromBlock, + toBlock='latest', + argument_filters={'from': address}, + ) + return event_filter.get_all_entries() + + def get_block_root(self, blknum): + ret = self.contract.functions.getBlockRoot(blknum).call() + return ret + + def get_exit(self, slot): + ret = self.contract.functions.getExit(slot).call() + return ret + + def check_inclusion(self, tx, root, slot, proof): + if tx.prev_block == 0: # deposit tx + ret = tx.hash == root + else: + ret = self.contract.functions.checkMembership( + tx.hash, root, slot, proof + ).call() + return ret + + def check_exclusion(self, root, slot, proof): + empty_hash = ( + '0x290decd9548b62a8d60345a988386' + + 'fc84ba6bc95484008f6362f93160ef3e563' + ) + ret = self.contract.functions.checkMembership( + empty_hash, root, slot, proof + ).call() + return ret diff --git a/plasma_cash/contract_binds/utils/colors.py b/plasma_cash/contract_binds/utils/colors.py new file mode 100644 index 0000000..71daf09 --- /dev/null +++ b/plasma_cash/contract_binds/utils/colors.py @@ -0,0 +1,17 @@ +class Colors: + GREEN = '\033[92m' + YELLOW = '\033[93m' + RED = '\033[91m' + END = '\033[0m' + + +def green(txt): + return Colors.GREEN + txt + Colors.END + + +def yellow(txt): + return Colors.YELLOW + txt + Colors.END + + +def red(txt): + return Colors.RED + txt + Colors.END diff --git a/plasma_cash/contract_binds/utils/formatters.py b/plasma_cash/contract_binds/utils/formatters.py new file mode 100644 index 0000000..2b56a93 --- /dev/null +++ b/plasma_cash/contract_binds/utils/formatters.py @@ -0,0 +1,7 @@ +def normalize(d): + if type(d) is str: + return bytes(d, 'utf-8') + elif type(d) is list: + return [bytes(x, 'utf-8') for x in d] + else: + return d diff --git a/plasma_cash/contract_binds/utils/getWeb3.py b/plasma_cash/contract_binds/utils/getWeb3.py new file mode 100644 index 0000000..246d571 --- /dev/null +++ b/plasma_cash/contract_binds/utils/getWeb3.py @@ -0,0 +1,27 @@ +import time + + +def getWeb3(endpoint=None): + if endpoint is None: + from web3.auto import w3 + elif 'http' in endpoint: + from web3 import Web3, HTTPProvider + + w3 = Web3(HTTPProvider(endpoint)) + else: + from web3 import Web3, IPCProvider + from web3.middleware import geth_poa_middleware + + w3 = Web3(IPCProvider(endpoint)) + w3.middleware_stack.inject(geth_poa_middleware, layer=0) + # w3.eth.defaultAccount = w3.eth.accounts[0] + return w3 + + +def waitForTransactionReceipt(w3, tx_hash): + while True: + tx_receipt = w3.eth.getTransactionReceipt(tx_hash) + if tx_receipt is not None: + break + time.sleep(1) + return tx_receipt diff --git a/plasma_cash/demo.py b/plasma_cash/demo.py new file mode 100644 index 0000000..577e826 --- /dev/null +++ b/plasma_cash/demo.py @@ -0,0 +1,114 @@ +from time import sleep + +from client.client import Client +from dependency_config import container +from utils.utils import increaseTime + +alice = Client(container.get_root('alice'), container.get_token('alice')) +bob = Client(container.get_root('bob'), container.get_token('bob')) +charlie = Client(container.get_root('charlie'), container.get_token('charlie')) +authority = Client( + container.get_root('authority'), container.get_token('authority') +) +w3 = alice.root_chain.w3 # get w3 instance + +# Give alice 5 tokens +alice.register() + +aliceTokensStart = alice.token_contract.balance_of() +print('Alice has {} tokens'.format(aliceTokensStart)) +assert aliceTokensStart == 5, "START: Alice has incorrect number of tokens" +bobTokensStart = bob.token_contract.balance_of() +print('Bob has {} tokens'.format(bobTokensStart)) +assert bobTokensStart == 0, "START: Bob has incorrect number of tokens" +charlieTokensStart = charlie.token_contract.balance_of() +print('Charlie has {} tokens'.format(charlieTokensStart)) +assert charlieTokensStart == 0, "START: Charlie has incorrect number of tokens" + +# Alice deposits 3 of her coins to the plasma contract and gets 3 plasma nft +# utxos in return +tokenId = 1 +tx_hash, gas_used = alice.deposit(tokenId) +event_data = alice.root_chain.get_event_data('Deposit', tx_hash) +print('ALICE EVENT DATA1', event_data[0]['args']) + +tx_hash, gas_used = alice.deposit(tokenId + 1) +event_data = alice.root_chain.get_event_data('Deposit', tx_hash) +deposit2_utxo = event_data[0]['args']['slot'] +deposit2_block_number = event_data[0]['args']['blockNumber'] +print('ALICE EVENT DATA2', event_data[0]['args']) + +tx_hash, gas_used = alice.deposit(tokenId + 2) +event_data = alice.root_chain.get_event_data('Deposit', tx_hash) +deposit3_utxo = event_data[0]['args']['slot'] +deposit3_block_number = event_data[0]['args']['blockNumber'] +print('ALICE EVENT DATA3', event_data[0]['args']) + + +# Check that all deposits have registered +sleep(2) +registered_deposits = alice.get_all_deposits() +assert len(registered_deposits) == 3, "Alice has incorrect number of deposits" + +# Alice to Bob, and Alice to Charlie. We care about the Alice to Bob +# transaction +alice_to_bob = alice.send_transaction( + deposit3_utxo, deposit3_block_number, bob.token_contract.account.address +) +random_tx = alice.send_transaction( + deposit2_utxo, + deposit2_block_number, + charlie.token_contract.account.address, +) +plasma_block1 = authority.submit_block() + +# Add an empty block in betweeen (for proof of exclusion reasons) +authority.submit_block() + +# Bob to Charlie +bob_to_charlie = bob.send_transaction( + deposit3_utxo, plasma_block1, charlie.token_contract.account.address +) + +# This is the info that bob is required to send to charlie. This happens on +# the P2P layer +incl_proofs, excl_proofs = bob.get_coin_history(deposit3_utxo) + +# Charlie receives them, verifies the validity. If found invalid, charlie +# should not accept them and the demo fails (similar to how you shouldn't sell +# a good when you're given counterfeit currency) +assert charlie.verify_coin_history(deposit3_utxo, incl_proofs, excl_proofs) + +plasma_block2 = authority.submit_block() + +# Block has been submitted, now we start watching for exits of our coin +charlie.watch_exits(deposit3_utxo) + +# Charlie should be able to submit an exit by referencing blocks 0 and 1 which +# included his transaction. +charlie.start_exit(deposit3_utxo, plasma_block1, plasma_block2) + +# We exited the coin so we should stop watching +charlie.stop_watching_exits(deposit3_utxo) + +# Here we should start watching for challenges + +# After 8 days pass, charlie's exit should be finalizable +increaseTime(w3, 8 * 24 * 3600) +authority.finalize_exits() + +# Charlie should now be able to withdraw the utxo which included token 2 to his +# wallet. +charlie.withdraw(deposit3_utxo) + +aliceTokensEnd = alice.token_contract.balance_of() +print('Alice has {} tokens'.format(aliceTokensEnd)) +assert aliceTokensEnd == 2, "END: Alice has incorrect number of tokens" +bobTokensEnd = bob.token_contract.balance_of() +print('Bob has {} tokens'.format(bobTokensEnd)) +assert bobTokensEnd == 0, "END: Bob has incorrect number of tokens" +charlieTokensEnd = charlie.token_contract.balance_of() +print('Charlie has {} tokens'.format(charlieTokensEnd)) +assert charlieTokensEnd == 1, "END: Charlie has incorrect number of tokens" + +print('Plasma Cash with ERC721 tokens success :)') diff --git a/plasma_cash/dependency_config.py b/plasma_cash/dependency_config.py new file mode 100644 index 0000000..9fc131d --- /dev/null +++ b/plasma_cash/dependency_config.py @@ -0,0 +1,48 @@ +from child_chain.child_chain import ChildChain +from config import plasma_config +from contract_binds.erc721 import ERC721 +from contract_binds.plasma_cash import PlasmaCash + + +class DependencyContainer(object): + def __init__(self): + self._child_chain = None + self.root_chain_abi = '../server/build/contracts/RootChain.json' + self.token_contract_abi = '../server/build/contracts/CryptoCards.json' + self.endpoint = 'http://localhost:8545' + self.root_chain = PlasmaCash( + plasma_config['authority'], + self.root_chain_abi, + plasma_config['root_chain'], + self.endpoint, + ) + + def get_root(self, key, index=None): + private_key = ( + plasma_config[key] if index is None else plasma_config[key][index] + ) + return PlasmaCash( + private_key, + self.root_chain_abi, + plasma_config['root_chain'], + self.endpoint, + ) + + def get_token(self, key, index=None): + private_key = ( + plasma_config[key] if index is None else plasma_config[key][index] + ) + return ERC721( + private_key, + self.token_contract_abi, + plasma_config['token_contract'], + self.endpoint, + ) + + def get_child_chain(self): + if self._child_chain is None: + self._child_chain = ChildChain(self.root_chain) + return self._child_chain + + +container = DependencyContainer() diff --git a/plasma_cash/dump_test_data.py b/plasma_cash/dump_test_data.py new file mode 100644 index 0000000..840f0c9 --- /dev/null +++ b/plasma_cash/dump_test_data.py @@ -0,0 +1,25 @@ +import rlp + +from child_chain.transaction import Transaction, UnsignedTransaction +from dependency_config import container + +token_contract = container.get_token('alice') +tx = Transaction(5, 0, 1, token_contract.account.address) +tx_hex = rlp.encode(tx, UnsignedTransaction).hex() +print( + 'Transaction(5, 0, 1, {}): {}'.format( + token_contract.account.address, tx_hex + ) +) + +tx = Transaction(5, 85478557858583, 1, token_contract.account.address) +tx_hex = rlp.encode(tx, UnsignedTransaction).hex() +print( + 'Transaction(5, 85478557858583, 1, {}): {}'.format( + token_contract.account.address, tx_hex + ) +) + +tx.sign(token_contract.account.privateKey) +print('Transaction Hash: {}'.format(tx.hash.hex())) +print('Transaction Sig: {}'.format(tx.sig.hex())) diff --git a/plasma_cash/requirements.txt b/plasma_cash/requirements.txt new file mode 100644 index 0000000..5407117 --- /dev/null +++ b/plasma_cash/requirements.txt @@ -0,0 +1,15 @@ +Flask==1.0.2 +requests==2.18.4 +rlp==0.6.0 +ethereum==2.3.1 + +# web3 fork +-e git+https://github.com/gakonst/web3.py#egg=web3 + +# linting +flake8==3.5.0 +black==18.6b4 +isort==4.3.4 + +# testing +pytest==3.6.0 diff --git a/plasma_cash/unit_test.py b/plasma_cash/unit_test.py new file mode 100644 index 0000000..c7f1158 --- /dev/null +++ b/plasma_cash/unit_test.py @@ -0,0 +1,114 @@ +import pytest +from eth_utils.crypto import keccak +from hexbytes import HexBytes + +from utils.merkle.sparse_merkle_tree import SparseMerkleTree + +empty_val = b'\x00' * 32 +default_hash = keccak(empty_val) +dummy_val = keccak(2) +dummy_val_2 = keccak(3) + + +class TestSparseMerkleTree(object): + def test_size_limits(self): + with pytest.raises(SparseMerkleTree.TreeSizeExceededException): + SparseMerkleTree(depth=0, leaves={0: '0', 1: '1'}) + with pytest.raises(SparseMerkleTree.TreeSizeExceededException): + SparseMerkleTree( + depth=1, leaves={0: empty_val, 1: empty_val, 2: empty_val} + ) + + def test_empty_SMT(self): + emptyTree = SparseMerkleTree(64, {}) + assert len(emptyTree.leaves) == 0 + assert ( + emptyTree.root + == bytes(HexBytes('0x6f35419d1da1260bc0f33d52e8f6d73fc5d672c0dca13bb960b4ae1adec17937')) + ) + + def test_all_leaves_with_val(self): + leaves = {0: dummy_val, 1: dummy_val, 2: dummy_val, 3: dummy_val} + tree = SparseMerkleTree(depth=2, leaves=leaves) + mid_level_val = keccak(dummy_val * 2) + assert tree.root == keccak(mid_level_val + mid_level_val) + + def test_empty_leaves(self): + tree = SparseMerkleTree(depth=2) + mid_level_val = keccak(default_hash * 2) + assert tree.root == keccak(mid_level_val * 2) + + def test_empty_left_leave(self): + leaves = {1: dummy_val, 2: dummy_val, 3: dummy_val} + tree = SparseMerkleTree(depth=2, leaves=leaves) + mid_left_val = keccak(default_hash + dummy_val) + mid_right_val = keccak(dummy_val * 2) + assert tree.root == keccak(mid_left_val + mid_right_val) + + def test_empty_right_leave(self): + leaves = {0: dummy_val, 2: dummy_val, 3: dummy_val} + tree = SparseMerkleTree(depth=2, leaves=leaves) + mid_left_val = keccak(dummy_val + default_hash) + mid_right_val = keccak(dummy_val * 2) + assert tree.root == keccak(mid_left_val + mid_right_val) + + def test_create_merkle_proof(self): + leaves = {0: dummy_val, 2: dummy_val, 3: dummy_val_2} + tree = SparseMerkleTree(depth=2, leaves=leaves) + mid_left_val = keccak(dummy_val + default_hash) + mid_right_val = keccak(dummy_val + dummy_val_2) + assert ( + tree.create_merkle_proof(0) + == (2).to_bytes(8, byteorder='big') + mid_right_val + ) + assert ( + tree.create_merkle_proof(1) + == (3).to_bytes(8, byteorder='big') + dummy_val + mid_right_val + ) + assert ( + tree.create_merkle_proof(2) + == (3).to_bytes(8, byteorder='big') + dummy_val_2 + mid_left_val + ) + assert ( + tree.create_merkle_proof(3) + == (3).to_bytes(8, byteorder='big') + dummy_val + mid_left_val + ) + + def test_old(self): + slot = 2 + txHash = HexBytes( + '0xcf04ea8bb4ff94066eb84dd932f9e66d1c9f40d84d5491f5a7735200de010d84' + ) + slot2 = 600 + txHash2 = HexBytes( + '0xabcabcabacbc94566eb84dd932f9e66d1c9f40d84d5491f5a7735200de010d84' + ) + slot3 = 30000 + txHash3 = HexBytes( + '0xabcaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c9f40d84d5491f5a7735200de010d84' + ) + tx = {slot: txHash, slot2: txHash2, slot3: txHash3} + tree = SparseMerkleTree(64, tx) + for s in tx.keys(): + proof = tree.create_merkle_proof(s) + inc = tree.verify(s, proof) + assert inc + + def test_real_slot_proofs(self): + slot = 14414645988802088183 + txHash = HexBytes('0x510a183d5457e0d22951440a273f0d8e28e01d15f750d79fd1b27442299f7220') + tree = SparseMerkleTree(64, {slot: txHash}) + proof = tree.create_merkle_proof(slot) + inc = tree.verify(slot, proof) + assert inc + + def test_real_tree_roots(self): + slot = 14414645988802088183 + txHash = HexBytes('0x4b114962ecf0d681fa416dc1a6f0255d52d701ab53433297e8962065c9d439bd') + tree = SparseMerkleTree(64, {slot: txHash}) + assert tree.root == bytes(HexBytes('0x0ed6599c03641e5a20d9688f892278dbb48bbcf8b1ff2c9a0e2b7423af831a83')) + + slot = 14414645988802088183 + txHash = HexBytes('0x510a183d5457e0d22951440a273f0d8e28e01d15f750d79fd1b27442299f7220') + tree = SparseMerkleTree(64, {slot: txHash}) + assert tree.root == bytes(HexBytes('0x8d0ae4c94eaad54df5489e5f9d62eeb4bf06ff774a00b925e8a52776256e910f')) diff --git a/plasma_cash/utils/__init__.py b/plasma_cash/utils/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/plasma_cash/utils/merkle/__init__.py b/plasma_cash/utils/merkle/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/plasma_cash/utils/merkle/sparse_merkle_tree.py b/plasma_cash/utils/merkle/sparse_merkle_tree.py new file mode 100644 index 0000000..adf5859 --- /dev/null +++ b/plasma_cash/utils/merkle/sparse_merkle_tree.py @@ -0,0 +1,117 @@ +from collections import OrderedDict + +from eth_utils.crypto import keccak + + +class SparseMerkleTree(object): + def __init__(self, depth=64, leaves={}): + self.depth = depth + if len(leaves) > 2 ** depth: + raise self.TreeSizeExceededException( + 'tree with depth {} cannot have {} leaves'.format( + depth, len(leaves) + ) + ) + + # Sort the transaction dict by index. + self.leaves = OrderedDict(sorted(leaves.items(), key=lambda t: t[0])) + self.default_nodes = self.create_default_nodes(self.depth) + if leaves: + self.tree = self.create_tree( + self.leaves, self.depth, self.default_nodes + ) + self.root = self.tree[-1][0] + else: + self.tree = [] + self.root = self.default_nodes[self.depth] + + def create_default_nodes(self, depth): + # Default nodes are the nodes whose children are both empty nodes at + # each level. + default_hash = keccak(b'\x00' * 32) + default_nodes = [default_hash] + for level in range(1, depth + 1): + prev_default = default_nodes[level - 1] + default_nodes.append(keccak(prev_default * 2)) + return default_nodes + + def create_tree(self, ordered_leaves, depth, default_nodes): + tree = [ordered_leaves] + tree_level = ordered_leaves + for level in range(depth): + next_level = {} + for index, value in tree_level.items(): + if index % 2 == 0: + co_index = index + 1 + if co_index in tree_level: + next_level[index // 2] = keccak( + value + tree_level[co_index] + ) + else: + next_level[index // 2] = keccak( + value + default_nodes[level] + ) + else: + # If the node is a right node, check if its left sibling is + # a default node. + co_index = index - 1 + if co_index not in tree_level: + next_level[index // 2] = keccak( + default_nodes[level] + value + ) + tree_level = next_level + tree.append(tree_level) + return tree + + def create_merkle_proof(self, uid): + # Generate a merkle proof for a leaf with provided index. + # First `depth/8` bytes of the proof are necessary for checking if + # we are at a default-node + index = uid + proof = b'' + proofbits = 0 + + # Edge case of tree being empty + if len(self.tree) == 0: + return b'\x00\x00\x00\x00\x00\x00\x00\x00' + + for level in range(self.depth): + sibling_index = index + 1 if index % 2 == 0 else index - 1 + index = index // 2 + if sibling_index in self.tree[level]: + proof += self.tree[level][sibling_index] + proofbits += 2 ** level + + proof_bytes = proofbits.to_bytes(8, byteorder='big') + return proof_bytes + proof + + def verify(self, uid, proof): + ''' Checks if the proof for the leaf at `uid` is valid''' + # assert (len(proof) -8 % 32) == 0 + assert len(proof) <= 2056 + + proofbits = int.from_bytes((proof[0:8]), byteorder='big') + index = uid + p = 8 + if index in self.leaves: + computed_hash = self.leaves[index] + # in case the tx is not included, computed_hash is the default leaf + else: + computed_hash = self.default_nodes[-1] + + for d in range(self.depth): + if proofbits % 2 == 0: + proof_element = self.default_nodes[d] + else: + proof_element = proof[p : p + 32] + p += 32 + if index % 2 == 0: + computed_hash = keccak(computed_hash + proof_element) + else: + computed_hash = keccak(proof_element + computed_hash) + proofbits = proofbits // 2 + index = index // 2 + return computed_hash == self.root + + class TreeSizeExceededException(Exception): + """there are too many leaves for the tree to build""" diff --git a/plasma_cash/utils/utils.py b/plasma_cash/utils/utils.py new file mode 100644 index 0000000..a010ca1 --- /dev/null +++ b/plasma_cash/utils/utils.py @@ -0,0 +1,27 @@ +from hexbytes import HexBytes +from web3.auto import w3 + +from child_chain.exceptions import InvalidTxSignatureException + + +def sign(hash, key): + # DO NOT PREFIX! + sig = ( + HexBytes('0') + + w3.eth.account.signHash(hash, private_key=key).signature + ) + return sig + + +def get_sender(hash, sig): + if sig is None: + raise InvalidTxSignatureException('Tx not signed') + return w3.eth.account.recoverHash(hash, signature=sig[1:]) + + +def increaseTime(w3, time): + start = w3.eth.getBlock('latest').timestamp + # provider.make_request(method='evm_increaseTime', params=start+time) + w3.manager.request_blocking( + method='evm_increaseTime', params=[start + time] + )