diff --git a/.mailmap b/.mailmap index a3a3020ac..7db065071 100644 --- a/.mailmap +++ b/.mailmap @@ -12,3 +12,49 @@ Nick Savers Maran Hidskes Taylor Gerring + +Bas van Kervel +Bas van Kervel +Bas van Kervel + +Sven Ehlert + +Vitalik Buterin + +Marian Oancea + +Christoph Jentzsch + +Heiko Hees + +Alex Leverington +Alex Leverington + +Zsolt Felföldi + +Gavin Wood + +Martin Becze +Martin Becze + +Dimitry Khokhlov + +Roman Mandeleil + +Alec Perseghin + +Alon Muroch + +Arkadiy Paronyan + +Jae Kwon + +Aaron Kumavis + +Nick Dodson + +Jason Carver +Jason Carver + +Joseph Chow +Joseph Chow ethers \ No newline at end of file diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 000000000..0c5b547d7 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,24 @@ +# This is the official list of go-ethereum authors for copyright purposes. + +Alex Leverington +Alexandre Van de Sande +Bas van Kervel +Daniel A. Nagy +Ethan Buchman +Fabian Vogelsteller +Felix Lange +Gustav Simonsson +Jae Kwon +Jason Carver +Jeffrey Wilcke +Joseph Chow +Kobi Gurkan +Maran Hidskes +Marek Kotewicz +Matthew Wampler-Doty +Nick Dodson +Péter Szilágyi +Taylor Gerring +Viktor Trón +Vitalik Buterin +Zsolt Felföldi diff --git a/COPYING b/COPYING new file mode 100644 index 000000000..8d66e8772 --- /dev/null +++ b/COPYING @@ -0,0 +1,619 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2014 The go-ethereum Authors. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. \ No newline at end of file diff --git a/COPYING.LESSER b/COPYING.LESSER new file mode 100644 index 000000000..65c5ca88a --- /dev/null +++ b/COPYING.LESSER @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser 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 +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/LICENSE b/LICENSE index 30f629158..003bdf59a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2013-2014, Jeffrey Wilcke. All rights reserved. +Copyright (c) 2013-2015, The go-ethereum Authors. All rights reserved. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public diff --git a/README.md b/README.md index 4093aff64..b9ab28fdb 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ## Ethereum Go -Ethereum Go Client © 2014 Jeffrey Wilcke. +Ethereum Go Client, by Jeffrey Wilcke (and some other people). | Linux | OSX | ARM | Windows | Tests ----------|---------|-----|-----|---------|------ diff --git a/accounts/abi/abi.go b/accounts/abi/abi.go index 067381a48..1119c6186 100644 --- a/accounts/abi/abi.go +++ b/accounts/abi/abi.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package abi import ( diff --git a/accounts/abi/abi_test.go b/accounts/abi/abi_test.go index f47fa80f0..a92a29ffd 100644 --- a/accounts/abi/abi_test.go +++ b/accounts/abi/abi_test.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package abi import ( diff --git a/accounts/abi/doc.go b/accounts/abi/doc.go index 648c971e1..dcb0e5471 100644 --- a/accounts/abi/doc.go +++ b/accounts/abi/doc.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + // Package abi implements the Ethereum ABI (Application Binary // Interface). // diff --git a/accounts/abi/numbers.go b/accounts/abi/numbers.go index 9205c005e..66698f562 100644 --- a/accounts/abi/numbers.go +++ b/accounts/abi/numbers.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package abi import ( diff --git a/accounts/abi/numbers_test.go b/accounts/abi/numbers_test.go index 319d7fb51..f0efaecb9 100644 --- a/accounts/abi/numbers_test.go +++ b/accounts/abi/numbers_test.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package abi import ( diff --git a/accounts/abi/type.go b/accounts/abi/type.go index 56520b672..ee4a073dc 100644 --- a/accounts/abi/type.go +++ b/accounts/abi/type.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package abi import ( diff --git a/accounts/account_manager.go b/accounts/account_manager.go index 13f16296a..c9e06261a 100644 --- a/accounts/account_manager.go +++ b/accounts/account_manager.go @@ -1,41 +1,32 @@ -/* - This file is part of go-ethereum +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . - go-ethereum is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - go-ethereum is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with go-ethereum. If not, see . -*/ -/** - * @authors - * Gustav Simonsson - * @date 2015 - * - */ -/* - -This abstracts part of a user's interaction with an account she controls. -It's not an abstraction of core Ethereum accounts data type / logic - -for that see the core processing code of blocks / txs. - -Currently this is pretty much a passthrough to the KeyStore2 interface, -and accounts persistence is derived from stored keys' addresses - -*/ +// Package implements a private key management facility. +// +// This abstracts part of a user's interaction with an account she controls. package accounts +// Currently this is pretty much a passthrough to the KeyStore interface, +// and accounts persistence is derived from stored keys' addresses + import ( "crypto/ecdsa" crand "crypto/rand" "errors" + "fmt" "os" "sync" "time" @@ -49,17 +40,12 @@ var ( ErrNoKeys = errors.New("no keys in store") ) -const ( - // Default unlock duration (in seconds) when an account is unlocked from the console - DefaultAccountUnlockDuration = 300 -) - type Account struct { Address common.Address } type Manager struct { - keyStore crypto.KeyStore2 + keyStore crypto.KeyStore unlocked map[common.Address]*unlocked mutex sync.RWMutex } @@ -69,7 +55,7 @@ type unlocked struct { abort chan struct{} } -func NewManager(keyStore crypto.KeyStore2) *Manager { +func NewManager(keyStore crypto.KeyStore) *Manager { return &Manager{ keyStore: keyStore, unlocked: make(map[common.Address]*unlocked), @@ -86,19 +72,6 @@ func (am *Manager) HasAccount(addr common.Address) bool { return false } -func (am *Manager) Primary() (addr common.Address, err error) { - addrs, err := am.keyStore.GetKeyAddresses() - if os.IsNotExist(err) { - return common.Address{}, ErrNoKeys - } else if err != nil { - return common.Address{}, err - } - if len(addrs) == 0 { - return common.Address{}, ErrNoKeys - } - return addrs[0], nil -} - func (am *Manager) DeleteAccount(address common.Address, auth string) error { return am.keyStore.DeleteKey(address, auth) } @@ -114,72 +87,41 @@ func (am *Manager) Sign(a Account, toSign []byte) (signature []byte, err error) return signature, err } -// TimedUnlock unlocks the account with the given address. -// When timeout has passed, the account will be locked again. +// unlock indefinitely +func (am *Manager) Unlock(addr common.Address, keyAuth string) error { + return am.TimedUnlock(addr, keyAuth, 0) +} + +// Unlock unlocks the account with the given address. The account +// stays unlocked for the duration of timeout +// it timeout is 0 the account is unlocked for the entire session func (am *Manager) TimedUnlock(addr common.Address, keyAuth string, timeout time.Duration) error { key, err := am.keyStore.GetKey(addr, keyAuth) if err != nil { return err } - u := am.addUnlocked(addr, key) - go am.dropLater(addr, u, timeout) - return nil -} - -// Unlock unlocks the account with the given address. The account -// stays unlocked until the program exits or until a TimedUnlock -// timeout (started after the call to Unlock) expires. -func (am *Manager) Unlock(addr common.Address, keyAuth string) error { - key, err := am.keyStore.GetKey(addr, keyAuth) - if err != nil { - return err - } - am.addUnlocked(addr, key) - return nil -} - -func (am *Manager) NewAccount(auth string) (Account, error) { - key, err := am.keyStore.GenerateNewKey(crand.Reader, auth) - if err != nil { - return Account{}, err - } - return Account{Address: key.Address}, nil -} - -func (am *Manager) Accounts() ([]Account, error) { - addresses, err := am.keyStore.GetKeyAddresses() - if os.IsNotExist(err) { - return nil, ErrNoKeys - } else if err != nil { - return nil, err - } - accounts := make([]Account, len(addresses)) - for i, addr := range addresses { - accounts[i] = Account{ - Address: addr, - } - } - return accounts, err -} - -func (am *Manager) addUnlocked(addr common.Address, key *crypto.Key) *unlocked { - u := &unlocked{Key: key, abort: make(chan struct{})} + var u *unlocked am.mutex.Lock() - prev, found := am.unlocked[addr] + defer am.mutex.Unlock() + var found bool + u, found = am.unlocked[addr] if found { // terminate dropLater for this key to avoid unexpected drops. - close(prev.abort) - // the key is zeroed here instead of in dropLater because - // there might not actually be a dropLater running for this - // key, i.e. when Unlock was used. - zeroKey(prev.PrivateKey) + if u.abort != nil { + close(u.abort) + } + } + if timeout > 0 { + u = &unlocked{Key: key, abort: make(chan struct{})} + go am.expire(addr, u, timeout) + } else { + u = &unlocked{Key: key} } am.unlocked[addr] = u - am.mutex.Unlock() - return u + return nil } -func (am *Manager) dropLater(addr common.Address, u *unlocked, timeout time.Duration) { +func (am *Manager) expire(addr common.Address, u *unlocked, timeout time.Duration) { t := time.NewTimer(timeout) defer t.Stop() select { @@ -199,6 +141,44 @@ func (am *Manager) dropLater(addr common.Address, u *unlocked, timeout time.Dura } } +func (am *Manager) NewAccount(auth string) (Account, error) { + key, err := am.keyStore.GenerateNewKey(crand.Reader, auth) + if err != nil { + return Account{}, err + } + return Account{Address: key.Address}, nil +} + +func (am *Manager) AddressByIndex(index int) (addr string, err error) { + var addrs []common.Address + addrs, err = am.keyStore.GetKeyAddresses() + if err != nil { + return + } + if index < 0 || index >= len(addrs) { + err = fmt.Errorf("index out of range: %d (should be 0-%d)", index, len(addrs)-1) + } else { + addr = addrs[index].Hex() + } + return +} + +func (am *Manager) Accounts() ([]Account, error) { + addresses, err := am.keyStore.GetKeyAddresses() + if os.IsNotExist(err) { + return nil, ErrNoKeys + } else if err != nil { + return nil, err + } + accounts := make([]Account, len(addresses)) + for i, addr := range addresses { + accounts[i] = Account{ + Address: addr, + } + } + return accounts, err +} + // zeroKey zeroes a private key in memory. func zeroKey(k *ecdsa.PrivateKey) { b := k.D.Bits() @@ -229,6 +209,19 @@ func (am *Manager) Import(path string, keyAuth string) (Account, error) { return Account{Address: key.Address}, nil } +func (am *Manager) Update(addr common.Address, authFrom, authTo string) (err error) { + var key *crypto.Key + key, err = am.keyStore.GetKey(addr, authFrom) + + if err == nil { + err = am.keyStore.StoreKey(key, authTo) + if err == nil { + am.keyStore.Cleanup(addr) + } + } + return +} + func (am *Manager) ImportPreSaleKey(keyJSON []byte, password string) (acc Account, err error) { var key *crypto.Key key, err = crypto.ImportPreSaleKey(am.keyStore, keyJSON, password) diff --git a/accounts/accounts_test.go b/accounts/accounts_test.go index 427114cbd..9d09156af 100644 --- a/accounts/accounts_test.go +++ b/accounts/accounts_test.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package accounts import ( @@ -58,9 +74,51 @@ func TestTimedUnlock(t *testing.T) { if err != ErrLocked { t.Fatal("Signing should've failed with ErrLocked timeout expired, got ", err) } + } -func tmpKeyStore(t *testing.T, new func(string) crypto.KeyStore2) (string, crypto.KeyStore2) { +func TestOverrideUnlock(t *testing.T) { + dir, ks := tmpKeyStore(t, crypto.NewKeyStorePassphrase) + defer os.RemoveAll(dir) + + am := NewManager(ks) + pass := "foo" + a1, err := am.NewAccount(pass) + toSign := randentropy.GetEntropyCSPRNG(32) + + // Unlock indefinitely + if err = am.Unlock(a1.Address, pass); err != nil { + t.Fatal(err) + } + + // Signing without passphrase works because account is temp unlocked + _, err = am.Sign(a1, toSign) + if err != nil { + t.Fatal("Signing shouldn't return an error after unlocking, got ", err) + } + + // reset unlock to a shorter period, invalidates the previous unlock + if err = am.TimedUnlock(a1.Address, pass, 100*time.Millisecond); err != nil { + t.Fatal(err) + } + + // Signing without passphrase still works because account is temp unlocked + _, err = am.Sign(a1, toSign) + if err != nil { + t.Fatal("Signing shouldn't return an error after unlocking, got ", err) + } + + // Signing fails again after automatic locking + time.Sleep(150 * time.Millisecond) + _, err = am.Sign(a1, toSign) + if err != ErrLocked { + t.Fatal("Signing should've failed with ErrLocked timeout expired, got ", err) + } +} + +// + +func tmpKeyStore(t *testing.T, new func(string) crypto.KeyStore) (string, crypto.KeyStore) { d, err := ioutil.TempDir("", "eth-keystore-test") if err != nil { t.Fatal(err) diff --git a/build/update-license.go b/build/update-license.go new file mode 100644 index 000000000..abb17f872 --- /dev/null +++ b/build/update-license.go @@ -0,0 +1,347 @@ +// +build none + +/* +This command generates GPL license headers on top of all source files. +You can run it once per month, before cutting a release or just +whenever you feel like it. + + go run update-license.go + +All authors (people who have contributed code) are listed in the +AUTHORS file. The author names are mapped and deduplicated using the +.mailmap file. You can use .mailmap to set the canonical name and +address for each author. See git-shortlog(1) for an explanation of the +.mailmap format. + +Please review the resulting diff to check whether the correct +copyright assignments are performed. +*/ + +package main + +import ( + "bufio" + "bytes" + "fmt" + "io/ioutil" + "log" + "os" + "os/exec" + "path/filepath" + "regexp" + "runtime" + "sort" + "strconv" + "strings" + "sync" + "text/template" + "time" +) + +var ( + // only files with these extensions will be considered + extensions = []string{".go", ".js", ".qml"} + + // paths with any of these prefixes will be skipped + skipPrefixes = []string{ + // boring stuff + "Godeps/", "tests/files/", "build/", + // don't relicense vendored packages + "crypto/sha3/", "crypto/ecies/", "logger/glog/", + } + + // paths with this prefix are licensed as GPL. all other files are LGPL. + gplPrefixes = []string{"cmd/"} + + // this regexp must match the entire license comment at the + // beginning of each file. + licenseCommentRE = regexp.MustCompile(`^//\s*(Copyright|This file is part of).*?\n(?://.*?\n)*\n*`) + + // this text appears at the start of AUTHORS + authorsFileHeader = "# This is the official list of go-ethereum authors for copyright purposes.\n\n" +) + +// this template generates the license comment. +// its input is an info structure. +var licenseT = template.Must(template.New("").Parse(` +// Copyright {{.Year}} The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU {{.License}} as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU {{.License}} for more details. +// +// You should have received a copy of the GNU {{.License}} +// along with go-ethereum. If not, see . + +`[1:])) + +type info struct { + file string + Year int64 +} + +func (i info) License() string { + if i.gpl() { + return "General Public License" + } else { + return "Lesser General Public License" + } +} + +func (i info) ShortLicense() string { + if i.gpl() { + return "GPL" + } else { + return "LGPL" + } +} + +func (i info) gpl() bool { + for _, p := range gplPrefixes { + if strings.HasPrefix(i.file, p) { + return true + } + } + return false +} + +func main() { + var ( + files = getFiles() + filec = make(chan string) + infoc = make(chan *info, 20) + wg sync.WaitGroup + ) + + writeAuthors(files) + + go func() { + for _, f := range files { + filec <- f + } + close(filec) + }() + for i := runtime.NumCPU(); i >= 0; i-- { + // getting file info is slow and needs to be parallel. + // it traverses git history for each file. + wg.Add(1) + go getInfo(filec, infoc, &wg) + } + go func() { + wg.Wait() + close(infoc) + }() + writeLicenses(infoc) +} + +func getFiles() []string { + cmd := exec.Command("git", "ls-tree", "-r", "--name-only", "HEAD") + var files []string + err := doLines(cmd, func(line string) { + for _, p := range skipPrefixes { + if strings.HasPrefix(line, p) { + return + } + } + ext := filepath.Ext(line) + for _, wantExt := range extensions { + if ext == wantExt { + goto keep + } + } + return + keep: + files = append(files, line) + }) + if err != nil { + log.Fatalf("error getting files:", err) + } + return files +} + +var authorRegexp = regexp.MustCompile(`\s*[0-9]+\s*(.*)`) + +func gitAuthors(files []string) []string { + cmds := []string{"shortlog", "-s", "-n", "-e", "HEAD", "--"} + cmds = append(cmds, files...) + cmd := exec.Command("git", cmds...) + var authors []string + err := doLines(cmd, func(line string) { + m := authorRegexp.FindStringSubmatch(line) + if len(m) > 1 { + authors = append(authors, m[1]) + } + }) + if err != nil { + log.Fatalln("error getting authors:", err) + } + return authors +} + +func readAuthors() []string { + content, err := ioutil.ReadFile("AUTHORS") + if err != nil && !os.IsNotExist(err) { + log.Fatalln("error reading AUTHORS:", err) + } + var authors []string + for _, a := range bytes.Split(content, []byte("\n")) { + if len(a) > 0 && a[0] != '#' { + authors = append(authors, string(a)) + } + } + // Retranslate existing authors through .mailmap. + // This should catch email address changes. + authors = mailmapLookup(authors) + return authors +} + +func mailmapLookup(authors []string) []string { + if len(authors) == 0 { + return nil + } + cmds := []string{"check-mailmap", "--"} + cmds = append(cmds, authors...) + cmd := exec.Command("git", cmds...) + var translated []string + err := doLines(cmd, func(line string) { + translated = append(translated, line) + }) + if err != nil { + log.Fatalln("error translating authors:", err) + } + return translated +} + +func writeAuthors(files []string) { + merge := make(map[string]bool) + // Add authors that Git reports as contributorxs. + // This is the primary source of author information. + for _, a := range gitAuthors(files) { + merge[a] = true + } + // Add existing authors from the file. This should ensure that we + // never lose authors, even if Git stops listing them. We can also + // add authors manually this way. + for _, a := range readAuthors() { + merge[a] = true + } + // Write sorted list of authors back to the file. + var result []string + for a := range merge { + result = append(result, a) + } + sort.Strings(result) + content := new(bytes.Buffer) + content.WriteString(authorsFileHeader) + for _, a := range result { + content.WriteString(a) + content.WriteString("\n") + } + fmt.Println("writing AUTHORS") + if err := ioutil.WriteFile("AUTHORS", content.Bytes(), 0644); err != nil { + log.Fatalln(err) + } +} + +func getInfo(files <-chan string, out chan<- *info, wg *sync.WaitGroup) { + for file := range files { + stat, err := os.Lstat(file) + if err != nil { + fmt.Printf("ERROR %s: %v\n", file, err) + continue + } + if !stat.Mode().IsRegular() { + continue + } + info, err := fileInfo(file) + if err != nil { + fmt.Printf("ERROR %s: %v\n", file, err) + continue + } + out <- info + } + wg.Done() +} + +// fileInfo finds the lowest year in which the given file was commited. +func fileInfo(file string) (*info, error) { + info := &info{file: file, Year: int64(time.Now().Year())} + cmd := exec.Command("git", "log", "--follow", "--find-copies", "--pretty=format:%ai", "--", file) + err := doLines(cmd, func(line string) { + y, err := strconv.ParseInt(line[:4], 10, 64) + if err != nil { + fmt.Printf("cannot parse year: %q", line[:4]) + } + if y < info.Year { + info.Year = y + } + }) + return info, err +} + +func writeLicenses(infos <-chan *info) { + for i := range infos { + writeLicense(i) + } +} + +func writeLicense(info *info) { + fi, err := os.Stat(info.file) + if os.IsNotExist(err) { + fmt.Println("skipping (does not exist)", info.file) + return + } + if err != nil { + log.Fatalf("error stat'ing %s: %v\n", info.file, err) + } + content, err := ioutil.ReadFile(info.file) + if err != nil { + log.Fatalf("error reading %s: %v\n", info.file, err) + } + // Construct new file content. + buf := new(bytes.Buffer) + licenseT.Execute(buf, info) + if m := licenseCommentRE.FindIndex(content); m != nil && m[0] == 0 { + buf.Write(content[:m[0]]) + buf.Write(content[m[1]:]) + } else { + buf.Write(content) + } + // Write it to the file. + if bytes.Equal(content, buf.Bytes()) { + fmt.Println("skipping (no changes)", info.file) + return + } + fmt.Println("writing", info.ShortLicense(), info.file) + if err := ioutil.WriteFile(info.file, buf.Bytes(), fi.Mode()); err != nil { + log.Fatalf("error writing %s: %v", info.file, err) + } +} + +func doLines(cmd *exec.Cmd, f func(string)) error { + stdout, err := cmd.StdoutPipe() + if err != nil { + return err + } + if err := cmd.Start(); err != nil { + return err + } + s := bufio.NewScanner(stdout) + for s.Scan() { + f(s.Text()) + } + if s.Err() != nil { + return s.Err() + } + if err := cmd.Wait(); err != nil { + return fmt.Errorf("%v (for %s)", err, strings.Join(cmd.Args, " ")) + } + return nil +} diff --git a/cmd/LICENSE b/cmd/LICENSE index 78efdaabe..00cdb415d 100644 --- a/cmd/LICENSE +++ b/cmd/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2013-2014, Jeffrey Wilcke. All rights reserved. +Copyright (c) 2013-2015, The go-ethereum Authors. All rights reserved. This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public diff --git a/cmd/bootnode/main.go b/cmd/bootnode/main.go index 26912525d..397fa099c 100644 --- a/cmd/bootnode/main.go +++ b/cmd/bootnode/main.go @@ -1,21 +1,20 @@ -/* - This file is part of go-ethereum +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with go-ethereum. If not, see . - go-ethereum is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - go-ethereum is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with go-ethereum. If not, see . -*/ - -// Command bootnode runs a bootstrap node for the Discovery Protocol. +// bootnode runs a bootstrap node for the Ethereum Discovery Protocol. package main import ( diff --git a/cmd/disasm/main.go b/cmd/disasm/main.go index 5b658046f..4bcd8608a 100644 --- a/cmd/disasm/main.go +++ b/cmd/disasm/main.go @@ -1,3 +1,20 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with go-ethereum. If not, see . + +// disasm is a pretty-printer for EVM bytecode. package main import ( diff --git a/cmd/ethtest/main.go b/cmd/ethtest/main.go index 278d2133f..61276b177 100644 --- a/cmd/ethtest/main.go +++ b/cmd/ethtest/main.go @@ -1,25 +1,20 @@ -/* - This file is part of go-ethereum - - go-ethereum is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - go-ethereum is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with go-ethereum. If not, see . -*/ -/** - * @authors: - * Jeffrey Wilcke - * Taylor Gerring - */ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with go-ethereum. If not, see . +// ethtest executes Ethereum JSON tests. package main import ( diff --git a/cmd/evm/main.go b/cmd/evm/main.go index 7c9d27fac..6420c83be 100644 --- a/cmd/evm/main.go +++ b/cmd/evm/main.go @@ -1,24 +1,20 @@ -/* - This file is part of go-ethereum - - go-ethereum is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - go-ethereum is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with go-ethereum. If not, see . -*/ -/** - * @authors - * Jeffrey Wilcke - */ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with go-ethereum. If not, see . +// evm executes EVM code snippets. package main import ( @@ -106,7 +102,7 @@ type VMEnv struct { depth int Gas *big.Int - time int64 + time uint64 logs []vm.StructLog } @@ -115,7 +111,7 @@ func NewEnv(state *state.StateDB, transactor common.Address, value *big.Int) *VM state: state, transactor: &transactor, value: value, - time: time.Now().Unix(), + time: uint64(time.Now().Unix()), } } @@ -123,7 +119,7 @@ func (self *VMEnv) State() *state.StateDB { return self.state } func (self *VMEnv) Origin() common.Address { return *self.transactor } func (self *VMEnv) BlockNumber() *big.Int { return common.Big0 } func (self *VMEnv) Coinbase() common.Address { return *self.transactor } -func (self *VMEnv) Time() int64 { return self.time } +func (self *VMEnv) Time() uint64 { return self.time } func (self *VMEnv) Difficulty() *big.Int { return common.Big1 } func (self *VMEnv) BlockHash() []byte { return make([]byte, 32) } func (self *VMEnv) Value() *big.Int { return self.value } diff --git a/cmd/geth/blocktestcmd.go b/cmd/geth/blocktestcmd.go index 116eec2b3..494a4d474 100644 --- a/cmd/geth/blocktestcmd.go +++ b/cmd/geth/blocktestcmd.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with go-ethereum. If not, see . + package main import ( @@ -86,7 +102,6 @@ func runBlockTest(ctx *cli.Context) { } func runOneBlockTest(ctx *cli.Context, test *tests.BlockTest) (*eth.Ethereum, error) { - // TODO remove in favor of logic contained in tests package cfg := utils.MakeEthConfig(ClientIdentifier, Version, ctx) cfg.NewDB = func(path string) (common.Database, error) { return ethdb.NewMemDatabase() } cfg.MaxPeers = 0 // disable network diff --git a/cmd/geth/chaincmd.go b/cmd/geth/chaincmd.go index 8586e3b81..b23a74809 100644 --- a/cmd/geth/chaincmd.go +++ b/cmd/geth/chaincmd.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with go-ethereum. If not, see . + package main import ( diff --git a/cmd/geth/contracts.go b/cmd/geth/contracts.go deleted file mode 100644 index 1f27838d1..000000000 --- a/cmd/geth/contracts.go +++ /dev/null @@ -1,6 +0,0 @@ -package main - -var ( - globalRegistrar = `var GlobalRegistrar = web3.eth.contract([{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"name","outputs":[{"name":"o_name","type":"bytes32"}],"type":"function"},{"constant":true,"inputs":[{"name":"_name","type":"bytes32"}],"name":"owner","outputs":[{"name":"","type":"address"}],"type":"function"},{"constant":true,"inputs":[{"name":"_name","type":"bytes32"}],"name":"content","outputs":[{"name":"","type":"bytes32"}],"type":"function"},{"constant":true,"inputs":[{"name":"_name","type":"bytes32"}],"name":"addr","outputs":[{"name":"","type":"address"}],"type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"bytes32"}],"name":"reserve","outputs":[],"type":"function"},{"constant":true,"inputs":[{"name":"_name","type":"bytes32"}],"name":"subRegistrar","outputs":[{"name":"o_subRegistrar","type":"address"}],"type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"bytes32"},{"name":"_newOwner","type":"address"}],"name":"transfer","outputs":[],"type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"bytes32"},{"name":"_registrar","type":"address"}],"name":"setSubRegistrar","outputs":[],"type":"function"},{"constant":false,"inputs":[],"name":"Registrar","outputs":[],"type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"bytes32"},{"name":"_a","type":"address"},{"name":"_primary","type":"bool"}],"name":"setAddress","outputs":[],"type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"bytes32"},{"name":"_content","type":"bytes32"}],"name":"setContent","outputs":[],"type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"bytes32"}],"name":"disown","outputs":[],"type":"function"},{"constant":true,"inputs":[{"name":"_name","type":"bytes32"}],"name":"register","outputs":[{"name":"","type":"address"}],"type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"name","type":"bytes32"}],"name":"Changed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"name","type":"bytes32"},{"indexed":true,"name":"addr","type":"address"}],"name":"PrimaryChanged","type":"event"}]);` - globalRegistrarAddr = "0xc6d9d2cd449a754c494264e1809c50e34d64562b" -) diff --git a/cmd/geth/js.go b/cmd/geth/js.go index 01840ebd9..cc4c14c2e 100644 --- a/cmd/geth/js.go +++ b/cmd/geth/js.go @@ -1,19 +1,18 @@ -// Copyright (c) 2013-2014, Jeffrey Wilcke. All rights reserved. +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. // -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // -// This library is distributed in the hope that it will be useful, +// go-ethereum is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -// MA 02110-1301 USA +// along with go-ethereum. If not, see . package main @@ -32,16 +31,17 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/docserver" "github.com/ethereum/go-ethereum/common/natspec" + "github.com/ethereum/go-ethereum/common/registrar" "github.com/ethereum/go-ethereum/eth" re "github.com/ethereum/go-ethereum/jsre" "github.com/ethereum/go-ethereum/rpc" "github.com/ethereum/go-ethereum/rpc/api" "github.com/ethereum/go-ethereum/rpc/codec" "github.com/ethereum/go-ethereum/rpc/comms" + "github.com/ethereum/go-ethereum/rpc/shared" "github.com/ethereum/go-ethereum/xeth" "github.com/peterh/liner" "github.com/robertkrimen/otto" - "github.com/ethereum/go-ethereum/rpc/shared" ) type prompter interface { @@ -69,6 +69,7 @@ func (r dumbterm) PasswordPrompt(p string) (string, error) { func (r dumbterm) AppendHistory(string) {} type jsre struct { + ds *docserver.DocServer re *re.JSRE ethereum *eth.Ethereum xeth *xeth.XEth @@ -143,6 +144,7 @@ func newLightweightJSRE(libPath string, client comms.EthereumClient, interactive js := &jsre{ps1: "> "} js.wait = make(chan *big.Int) js.client = client + js.ds = docserver.New("/") if f == nil { f = js @@ -180,6 +182,7 @@ func newJSRE(ethereum *eth.Ethereum, libPath, corsDomain string, client comms.Et if f == nil { f = js } + js.ds = docserver.New("/") js.xeth = xeth.New(ethereum, f) js.wait = js.xeth.UpdateState() js.client = client @@ -331,15 +334,13 @@ func (js *jsre) apiBindings(f xeth.Frontend) error { utils.Fatalf("Error setting namespaces: %v", err) } - js.re.Eval(globalRegistrar + "registrar = GlobalRegistrar.at(\"" + globalRegistrarAddr + "\");") + js.re.Eval(`var GlobalRegistrar = eth.contract(` + registrar.GlobalRegistrarAbi + `); registrar = GlobalRegistrar.at("` + registrar.GlobalRegistrarAddr + `");`) return nil } -var ds, _ = docserver.New("/") - func (self *jsre) ConfirmTransaction(tx string) bool { if self.ethereum.NatSpec { - notice := natspec.GetNotice(self.xeth, tx, ds) + notice := natspec.GetNotice(self.xeth, tx, self.ds) fmt.Println(notice) answer, _ := self.Prompt("Confirm Transaction [y/n]") return strings.HasPrefix(strings.Trim(answer, " "), "y") diff --git a/cmd/geth/js_test.go b/cmd/geth/js_test.go index cfbe26bee..db2c5ca03 100644 --- a/cmd/geth/js_test.go +++ b/cmd/geth/js_test.go @@ -1,27 +1,44 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with go-ethereum. If not, see . + package main import ( "fmt" "io/ioutil" + "math/big" "os" "path/filepath" "regexp" "runtime" "strconv" "testing" + "time" "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/compiler" "github.com/ethereum/go-ethereum/common/docserver" "github.com/ethereum/go-ethereum/common/natspec" - "github.com/ethereum/go-ethereum/common/resolver" + "github.com/ethereum/go-ethereum/common/registrar" "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/eth" - "github.com/ethereum/go-ethereum/rpc/comms" "github.com/ethereum/go-ethereum/rpc/codec" + "github.com/ethereum/go-ethereum/rpc/comms" ) const ( @@ -43,7 +60,6 @@ var ( type testjethre struct { *jsre - stateDb *state.StateDB lastConfirm string ds *docserver.DocServer } @@ -64,6 +80,10 @@ func (self *testjethre) ConfirmTransaction(tx string) bool { } func testJEthRE(t *testing.T) (string, *testjethre, *eth.Ethereum) { + return testREPL(t, nil) +} + +func testREPL(t *testing.T, config func(*eth.Config)) (string, *testjethre, *eth.Ethereum) { tmp, err := ioutil.TempDir("", "geth-test") if err != nil { t.Fatal(err) @@ -74,14 +94,19 @@ func testJEthRE(t *testing.T) (string, *testjethre, *eth.Ethereum) { ks := crypto.NewKeyStorePlain(filepath.Join(tmp, "keystore")) am := accounts.NewManager(ks) - ethereum, err := eth.New(ð.Config{ + conf := ð.Config{ NodeKey: testNodeKey, DataDir: tmp, AccountManager: am, MaxPeers: 0, Name: "test", SolcPath: testSolcPath, - }) + PowTest: true, + } + if config != nil { + config(conf) + } + ethereum, err := eth.New(conf) if err != nil { t.Fatal("%v", err) } @@ -102,31 +127,23 @@ func testJEthRE(t *testing.T) (string, *testjethre, *eth.Ethereum) { } assetPath := filepath.Join(os.Getenv("GOPATH"), "src", "github.com", "ethereum", "go-ethereum", "cmd", "mist", "assets", "ext") - ds, err := docserver.New("/") - if err != nil { - t.Errorf("Error creating DocServer: %v", err) - } - tf := &testjethre{ds: ds, stateDb: ethereum.ChainManager().State().Copy()} client := comms.NewInProcClient(codec.JSON) + ds := docserver.New("/") + tf := &testjethre{ds: ds} repl := newJSRE(ethereum, assetPath, "", client, false, tf) tf.jsre = repl return tmp, tf, ethereum } -// this line below is needed for transaction to be applied to the state in testing -// the heavy lifing is done in XEth.ApplyTestTxs -// this is fragile, overwriting xeth will result in -// process leaking since xeth loops cannot quit safely -// should be replaced by proper mining with testDAG for easy full integration tests -// txc, self.xeth = self.xeth.ApplyTestTxs(self.xeth.repl.stateDb, coinbase, txc) - func TestNodeInfo(t *testing.T) { + t.Skip("broken after p2p update") tmp, repl, ethereum := testJEthRE(t) if err := ethereum.Start(); err != nil { t.Fatalf("error starting ethereum: %v", err) } defer ethereum.Stop() defer os.RemoveAll(tmp) + want := `{"DiscPort":0,"IP":"0.0.0.0","ListenAddr":"","Name":"test","NodeID":"4cb2fc32924e94277bf94b5e4c983beedb2eabd5a0bc941db32202735c6625d020ca14a5963d1738af43b6ac0a711d61b1a06de931a499fe2aa0b1a132a902b5","NodeUrl":"enode://4cb2fc32924e94277bf94b5e4c983beedb2eabd5a0bc941db32202735c6625d020ca14a5963d1738af43b6ac0a711d61b1a06de931a499fe2aa0b1a132a902b5@0.0.0.0:0","TCPPort":0,"Td":"131072"}` checkEvalJSON(t, repl, `admin.nodeInfo`, want) } @@ -140,8 +157,7 @@ func TestAccounts(t *testing.T) { defer os.RemoveAll(tmp) checkEvalJSON(t, repl, `eth.accounts`, `["`+testAddress+`"]`) - checkEvalJSON(t, repl, `eth.coinbase`, `"`+testAddress+`"`) - + checkEvalJSON(t, repl, `eth.coinbase`, `null`) val, err := repl.re.Run(`personal.newAccount("password")`) if err != nil { t.Errorf("expected no error, got %v", err) @@ -151,9 +167,7 @@ func TestAccounts(t *testing.T) { t.Errorf("address not hex: %q", addr) } - // skip until order fixed #824 - // checkEvalJSON(t, repl, `eth.accounts`, `["`+testAddress+`", "`+addr+`"]`) - // checkEvalJSON(t, repl, `eth.coinbase`, `"`+testAddress+`"`) + checkEvalJSON(t, repl, `eth.accounts`, `["`+testAddress+`","`+addr+`"]`) } func TestBlockChain(t *testing.T) { @@ -256,8 +270,12 @@ func TestSignature(t *testing.T) { } func TestContract(t *testing.T) { - t.Skip() - tmp, repl, ethereum := testJEthRE(t) + t.Skip("contract testing is implemented with mining in ethash test mode. This takes about 7seconds to run. Unskip and run on demand") + coinbase := common.HexToAddress(testAddress) + tmp, repl, ethereum := testREPL(t, func(conf *eth.Config) { + conf.Etherbase = coinbase + conf.PowTest = true + }) if err := ethereum.Start(); err != nil { t.Errorf("error starting ethereum: %v", err) return @@ -265,12 +283,26 @@ func TestContract(t *testing.T) { defer ethereum.Stop() defer os.RemoveAll(tmp) - var txc uint64 - coinbase := common.HexToAddress(testAddress) - resolver.New(repl.xeth).CreateContracts(coinbase) - // time.Sleep(1000 * time.Millisecond) + reg := registrar.New(repl.xeth) + _, err := reg.SetGlobalRegistrar("", coinbase) + if err != nil { + t.Errorf("error setting HashReg: %v", err) + } + _, err = reg.SetHashReg("", coinbase) + if err != nil { + t.Errorf("error setting HashReg: %v", err) + } + _, err = reg.SetUrlHint("", coinbase) + if err != nil { + t.Errorf("error setting HashReg: %v", err) + } + /* TODO: + * lookup receipt and contract addresses by tx hash + * name registration for HashReg and UrlHint addresses + * mine those transactions + * then set once more SetHashReg SetUrlHint + */ - // checkEvalJSON(t, repl, `eth.getBlock("pending", true).transactions.length`, `2`) source := `contract test {\n` + " /// @notice Will multiply `a` by 7." + `\n` + ` function multiply(uint a) returns(uint d) {\n` + @@ -278,14 +310,20 @@ func TestContract(t *testing.T) { ` }\n` + `}\n` - checkEvalJSON(t, repl, `admin.contractInfo.stop()`, `true`) + if checkEvalJSON(t, repl, `admin.stopNatSpec()`, `true`) != nil { + return + } contractInfo, err := ioutil.ReadFile("info_test.json") if err != nil { t.Fatalf("%v", err) } - checkEvalJSON(t, repl, `primary = eth.accounts[0]`, `"`+testAddress+`"`) - checkEvalJSON(t, repl, `source = "`+source+`"`, `"`+source+`"`) + if checkEvalJSON(t, repl, `primary = eth.accounts[0]`, `"`+testAddress+`"`) != nil { + return + } + if checkEvalJSON(t, repl, `source = "`+source+`"`, `"`+source+`"`) != nil { + return + } // if solc is found with right version, test it, otherwise read from file sol, err := compiler.New("") @@ -305,69 +343,160 @@ func TestContract(t *testing.T) { t.Errorf("%v", err) } } else { - checkEvalJSON(t, repl, `contract = eth.compile.solidity(source).test`, string(contractInfo)) + if checkEvalJSON(t, repl, `contract = eth.compile.solidity(source).test`, string(contractInfo)) != nil { + return + } } - checkEvalJSON(t, repl, `contract.code`, `"0x605880600c6000396000f3006000357c010000000000000000000000000000000000000000000000000000000090048063c6888fa114602e57005b603d6004803590602001506047565b8060005260206000f35b60006007820290506053565b91905056"`) + if checkEvalJSON(t, repl, `contract.code`, `"0x605880600c6000396000f3006000357c010000000000000000000000000000000000000000000000000000000090048063c6888fa114602e57005b603d6004803590602001506047565b8060005260206000f35b60006007820290506053565b91905056"`) != nil { + return + } - checkEvalJSON( + if checkEvalJSON( t, repl, - `contractaddress = eth.sendTransaction({from: primary, data: contract.code })`, - `"0x5dcaace5982778b409c524873b319667eba5d074"`, - ) + `contractaddress = eth.sendTransaction({from: primary, data: contract.code})`, + `"0x46d69d55c3c4b86a924a92c9fc4720bb7bce1d74"`, + ) != nil { + return + } + + if !processTxs(repl, t, 8) { + return + } callSetup := `abiDef = JSON.parse('[{"constant":false,"inputs":[{"name":"a","type":"uint256"}],"name":"multiply","outputs":[{"name":"d","type":"uint256"}],"type":"function"}]'); Multiply7 = eth.contract(abiDef); multiply7 = Multiply7.at(contractaddress); ` - // time.Sleep(1500 * time.Millisecond) _, err = repl.re.Run(callSetup) if err != nil { t.Errorf("unexpected error setting up contract, got %v", err) + return } - // checkEvalJSON(t, repl, `eth.getBlock("pending", true).transactions.length`, `3`) - - // why is this sometimes failing? - // checkEvalJSON(t, repl, `multiply7.multiply.call(6)`, `42`) expNotice := "" if repl.lastConfirm != expNotice { t.Errorf("incorrect confirmation message: expected %v, got %v", expNotice, repl.lastConfirm) + return } - txc, repl.xeth = repl.xeth.ApplyTestTxs(repl.stateDb, coinbase, txc) + if checkEvalJSON(t, repl, `admin.startNatSpec()`, `true`) != nil { + return + } + if checkEvalJSON(t, repl, `multiply7.multiply.sendTransaction(6, { from: primary })`, `"0x4ef9088431a8033e4580d00e4eb2487275e031ff4163c7529df0ef45af17857b"`) != nil { + return + } - checkEvalJSON(t, repl, `admin.contractInfo.start()`, `true`) - checkEvalJSON(t, repl, `multiply7.multiply.sendTransaction(6, { from: primary, gas: "1000000", gasPrice: "100000" })`, `undefined`) - expNotice = `About to submit transaction (no NatSpec info found for contract: content hash not found for '0x87e2802265838c7f14bb69eecd2112911af6767907a702eeaa445239fb20711b'): {"params":[{"to":"0x5dcaace5982778b409c524873b319667eba5d074","data": "0xc6888fa10000000000000000000000000000000000000000000000000000000000000006"}]}` + if !processTxs(repl, t, 1) { + return + } + + expNotice = `About to submit transaction (no NatSpec info found for contract: content hash not found for '0x87e2802265838c7f14bb69eecd2112911af6767907a702eeaa445239fb20711b'): {"params":[{"to":"0x46d69d55c3c4b86a924a92c9fc4720bb7bce1d74","data": "0xc6888fa10000000000000000000000000000000000000000000000000000000000000006"}]}` if repl.lastConfirm != expNotice { - t.Errorf("incorrect confirmation message: expected %v, got %v", expNotice, repl.lastConfirm) + t.Errorf("incorrect confirmation message: expected\n%v, got\n%v", expNotice, repl.lastConfirm) + return } - var contenthash = `"0x86d2b7cf1e72e9a7a3f8d96601f0151742a2f780f1526414304fbe413dc7f9bd"` - if sol != nil { + var contentHash = `"0x86d2b7cf1e72e9a7a3f8d96601f0151742a2f780f1526414304fbe413dc7f9bd"` + if sol != nil && solcVersion != sol.Version() { modContractInfo := versionRE.ReplaceAll(contractInfo, []byte(`"compilerVersion":"`+sol.Version()+`"`)) - _ = modContractInfo - // contenthash = crypto.Sha3(modContractInfo) + fmt.Printf("modified contractinfo:\n%s\n", modContractInfo) + contentHash = `"` + common.ToHex(crypto.Sha3([]byte(modContractInfo))) + `"` } - checkEvalJSON(t, repl, `filename = "/tmp/info.json"`, `"/tmp/info.json"`) - checkEvalJSON(t, repl, `contenthash = admin.contractInfo.register(primary, contractaddress, contract, filename)`, contenthash) - checkEvalJSON(t, repl, `admin.contractInfo.registerUrl(primary, contenthash, "file://"+filename)`, `true`) - if err != nil { - t.Errorf("unexpected error registering, got %v", err) + if checkEvalJSON(t, repl, `filename = "/tmp/info.json"`, `"/tmp/info.json"`) != nil { + return + } + if checkEvalJSON(t, repl, `contentHash = admin.saveInfo(contract.info, filename)`, contentHash) != nil { + return + } + if checkEvalJSON(t, repl, `admin.register(primary, contractaddress, contentHash)`, `true`) != nil { + return + } + if checkEvalJSON(t, repl, `admin.registerUrl(primary, contentHash, "file://"+filename)`, `true`) != nil { + return } - checkEvalJSON(t, repl, `admin.contractInfo.start()`, `true`) + if checkEvalJSON(t, repl, `admin.startNatSpec()`, `true`) != nil { + return + } - // update state - txc, repl.xeth = repl.xeth.ApplyTestTxs(repl.stateDb, coinbase, txc) + if !processTxs(repl, t, 3) { + return + } + + if checkEvalJSON(t, repl, `multiply7.multiply.sendTransaction(6, { from: primary })`, `"0x66d7635c12ad0b231e66da2f987ca3dfdca58ffe49c6442aa55960858103fd0c"`) != nil { + return + } + + if !processTxs(repl, t, 1) { + return + } - checkEvalJSON(t, repl, `multiply7.multiply.sendTransaction(6, { from: primary, gas: "1000000", gasPrice: "100000" })`, `undefined`) expNotice = "Will multiply 6 by 7." if repl.lastConfirm != expNotice { - t.Errorf("incorrect confirmation message: expected %v, got %v", expNotice, repl.lastConfirm) + t.Errorf("incorrect confirmation message: expected\n%v, got\n%v", expNotice, repl.lastConfirm) + return + } +} + +func pendingTransactions(repl *testjethre, t *testing.T) (txc int64, err error) { + txs := repl.ethereum.TxPool().GetTransactions() + return int64(len(txs)), nil +} + +func processTxs(repl *testjethre, t *testing.T, expTxc int) bool { + var txc int64 + var err error + for i := 0; i < 50; i++ { + txc, err = pendingTransactions(repl, t) + if err != nil { + t.Errorf("unexpected error checking pending transactions: %v", err) + return false + } + if expTxc < int(txc) { + t.Errorf("too many pending transactions: expected %v, got %v", expTxc, txc) + return false + } else if expTxc == int(txc) { + break + } + time.Sleep(100 * time.Millisecond) + } + if int(txc) != expTxc { + t.Errorf("incorrect number of pending transactions, expected %v, got %v", expTxc, txc) + return false } + err = repl.ethereum.StartMining(runtime.NumCPU()) + if err != nil { + t.Errorf("unexpected error mining: %v", err) + return false + } + defer repl.ethereum.StopMining() + + timer := time.NewTimer(100 * time.Second) + height := new(big.Int).Add(repl.xeth.CurrentBlock().Number(), big.NewInt(1)) + repl.wait <- height + select { + case <-timer.C: + // if times out make sure the xeth loop does not block + go func() { + select { + case repl.wait <- nil: + case <-repl.wait: + } + }() + case <-repl.wait: + } + txc, err = pendingTransactions(repl, t) + if err != nil { + t.Errorf("unexpected error checking pending transactions: %v", err) + return false + } + if txc != 0 { + t.Errorf("%d trasactions were not mined", txc) + return false + } + return true } func checkEvalJSON(t *testing.T, re *testjethre, expr, want string) error { diff --git a/cmd/geth/main.go b/cmd/geth/main.go index f4d2f94fe..5ac93a983 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -1,23 +1,20 @@ -/* - This file is part of go-ethereum +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with go-ethereum. If not, see . - go-ethereum is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - go-ethereum is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with go-ethereum. If not, see . -*/ -/** - * @authors - * Jeffrey Wilcke - */ +// geth is the official command-line client for Ethereum. package main import ( @@ -37,8 +34,12 @@ import ( "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core" + "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/eth" + "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/logger" + "github.com/ethereum/go-ethereum/logger/glog" "github.com/ethereum/go-ethereum/metrics" "github.com/ethereum/go-ethereum/rpc/codec" "github.com/ethereum/go-ethereum/rpc/comms" @@ -48,7 +49,7 @@ import ( const ( ClientIdentifier = "Geth" - Version = "0.9.34" + Version = "0.9.36" ) var ( @@ -68,6 +69,18 @@ func init() { app.Action = run app.HideVersion = true // we have a command to print the version app.Commands = []cli.Command{ + { + Action: blockRecovery, + Name: "recover", + Usage: "attempts to recover a corrupted database by setting a new block by number or hash. See help recover.", + Description: ` +The recover commands will attempt to read out the last +block based on that. + +recover #number recovers by number +recover recovers by hash +`, + }, blocktestCommand, importCommand, exportCommand, @@ -137,9 +150,12 @@ Note that exporting your key in unencrypted format is NOT supported. Keys are stored under /keys. It is safe to transfer the entire directory or the individual keys therein -between ethereum nodes. +between ethereum nodes by simply copying. Make sure you backup your keys regularly. +In order to use your account to send transactions, you need to unlock them using the +'--unlock' option. The argument is a comma + And finally. DO NOT FORGET YOUR PASSWORD. `, Subcommands: []cli.Command{ @@ -170,6 +186,33 @@ Note, this is meant to be used for testing only, it is a bad idea to save your password to file or expose in any other way. `, }, + { + Action: accountUpdate, + Name: "update", + Usage: "update an existing account", + Description: ` + + ethereum account update
+ +Update an existing account. + +The account is saved in the newest version in encrypted format, you are prompted +for a passphrase to unlock the account and another to save the updated file. + +This same command can therefore be used to migrate an account of a deprecated +format to the newest format or change the password for an account. + +For non-interactive use the passphrase can be specified with the --password flag: + + ethereum --password account new + +Since only one password can be given, only format update can be performed, +changing your password is only possible interactively. + +Note that account update has the a side effect that the order of your accounts +changes. + `, + }, { Action: accountImport, Name: "import", @@ -261,7 +304,6 @@ JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Conso utils.ExecFlag, utils.WhisperEnabledFlag, utils.VMDebugFlag, - utils.ProtocolVersionFlag, utils.NetworkIdFlag, utils.RPCCORSDomainFlag, utils.VerbosityFlag, @@ -302,7 +344,6 @@ func main() { } func run(ctx *cli.Context) { - utils.HandleInterrupt() cfg := utils.MakeEthConfig(ClientIdentifier, nodeNameVersion, ctx) ethereum, err := eth.New(cfg) if err != nil { @@ -415,48 +456,72 @@ func execJSFiles(ctx *cli.Context) { ethereum.WaitForShutdown() } -func unlockAccount(ctx *cli.Context, am *accounts.Manager, account string) (passphrase string) { +func unlockAccount(ctx *cli.Context, am *accounts.Manager, addr string, i int) (addrHex, auth string) { var err error - // Load startup keys. XXX we are going to need a different format - - if !((len(account) == 40) || (len(account) == 42)) { // with or without 0x - utils.Fatalf("Invalid account address '%s'", account) - } - // Attempt to unlock the account 3 times - attempts := 3 - for tries := 0; tries < attempts; tries++ { - msg := fmt.Sprintf("Unlocking account %s | Attempt %d/%d", account, tries+1, attempts) - passphrase = getPassPhrase(ctx, msg, false) - err = am.Unlock(common.HexToAddress(account), passphrase) - if err == nil { - break + addrHex, err = utils.ParamToAddress(addr, am) + if err == nil { + // Attempt to unlock the account 3 times + attempts := 3 + for tries := 0; tries < attempts; tries++ { + msg := fmt.Sprintf("Unlocking account %s | Attempt %d/%d", addr, tries+1, attempts) + auth = getPassPhrase(ctx, msg, false, i) + err = am.Unlock(common.HexToAddress(addrHex), auth) + if err == nil { + break + } } } + if err != nil { utils.Fatalf("Unlock account failed '%v'", err) } - fmt.Printf("Account '%s' unlocked.\n", account) + fmt.Printf("Account '%s' unlocked.\n", addr) return } +func blockRecovery(ctx *cli.Context) { + arg := ctx.Args().First() + if len(ctx.Args()) < 1 && len(arg) > 0 { + glog.Fatal("recover requires block number or hash") + } + + cfg := utils.MakeEthConfig(ClientIdentifier, nodeNameVersion, ctx) + blockDb, err := ethdb.NewLDBDatabase(filepath.Join(cfg.DataDir, "blockchain")) + if err != nil { + glog.Fatalln("could not open db:", err) + } + + var block *types.Block + if arg[0] == '#' { + block = core.GetBlockByNumber(blockDb, common.String2Big(arg[1:]).Uint64()) + } else { + block = core.GetBlockByHash(blockDb, common.HexToHash(arg)) + } + + if block == nil { + glog.Fatalln("block not found. Recovery failed") + } + + err = core.WriteHead(blockDb, block) + if err != nil { + glog.Fatalln("block write err", err) + } + glog.Infof("Recovery succesful. New HEAD %x\n", block.Hash()) +} + func startEth(ctx *cli.Context, eth *eth.Ethereum) { // Start Ethereum itself - utils.StartEthereum(eth) - am := eth.AccountManager() + am := eth.AccountManager() account := ctx.GlobalString(utils.UnlockedAccountFlag.Name) accounts := strings.Split(account, " ") - for _, account := range accounts { + for i, account := range accounts { if len(account) > 0 { if account == "primary" { - primaryAcc, err := am.Primary() - if err != nil { - utils.Fatalf("no primary account: %v", err) - } - account = primaryAcc.Hex() + utils.Fatalf("the 'primary' keyword is deprecated. You can use integer indexes, but the indexes are not permanent, they can change if you add external keys, export your keys or copy your keystore to another node.") } - unlockAccount(ctx, am, account) + unlockAccount(ctx, am, account, i) } } // Start auxiliary services if enabled. @@ -483,14 +548,12 @@ func accountList(ctx *cli.Context) { if err != nil { utils.Fatalf("Could not list accounts: %v", err) } - name := "Primary" for i, acct := range accts { - fmt.Printf("%s #%d: %x\n", name, i, acct) - name = "Account" + fmt.Printf("Account #%d: %x\n", i, acct) } } -func getPassPhrase(ctx *cli.Context, desc string, confirmation bool) (passphrase string) { +func getPassPhrase(ctx *cli.Context, desc string, confirmation bool, i int) (passphrase string) { passfile := ctx.GlobalString(utils.PasswordFileFlag.Name) if len(passfile) == 0 { fmt.Println(desc) @@ -514,14 +577,22 @@ func getPassPhrase(ctx *cli.Context, desc string, confirmation bool) (passphrase if err != nil { utils.Fatalf("Unable to read password file '%s': %v", passfile, err) } - passphrase = string(passbytes) + // this is backwards compatible if the same password unlocks several accounts + // it also has the consequence that trailing newlines will not count as part + // of the password, so --password <(echo -n 'pass') will now work without -n + passphrases := strings.Split(string(passbytes), "\n") + if i >= len(passphrases) { + passphrase = passphrases[len(passphrases)-1] + } else { + passphrase = passphrases[i] + } } return } func accountCreate(ctx *cli.Context) { am := utils.MakeAccountManager(ctx) - passphrase := getPassPhrase(ctx, "Your new account is locked with a password. Please give a password. Do not forget this password.", true) + passphrase := getPassPhrase(ctx, "Your new account is locked with a password. Please give a password. Do not forget this password.", true, 0) acct, err := am.NewAccount(passphrase) if err != nil { utils.Fatalf("Could not create the account: %v", err) @@ -529,6 +600,21 @@ func accountCreate(ctx *cli.Context) { fmt.Printf("Address: %x\n", acct) } +func accountUpdate(ctx *cli.Context) { + am := utils.MakeAccountManager(ctx) + arg := ctx.Args().First() + if len(arg) == 0 { + utils.Fatalf("account address or index must be given as argument") + } + + addr, authFrom := unlockAccount(ctx, am, arg, 0) + authTo := getPassPhrase(ctx, "Please give a new password. Do not forget this password.", true, 0) + err := am.Update(common.HexToAddress(addr), authFrom, authTo) + if err != nil { + utils.Fatalf("Could not update the account: %v", err) + } +} + func importWallet(ctx *cli.Context) { keyfile := ctx.Args().First() if len(keyfile) == 0 { @@ -540,7 +626,7 @@ func importWallet(ctx *cli.Context) { } am := utils.MakeAccountManager(ctx) - passphrase := getPassPhrase(ctx, "", false) + passphrase := getPassPhrase(ctx, "", false, 0) acct, err := am.ImportPreSaleKey(keyJson, passphrase) if err != nil { @@ -555,7 +641,7 @@ func accountImport(ctx *cli.Context) { utils.Fatalf("keyfile must be given as argument") } am := utils.MakeAccountManager(ctx) - passphrase := getPassPhrase(ctx, "Your new account is locked with a password. Please give a password. Do not forget this password.", true) + passphrase := getPassPhrase(ctx, "Your new account is locked with a password. Please give a password. Do not forget this password.", true, 0) acct, err := am.Import(keyfile, passphrase) if err != nil { utils.Fatalf("Could not create the account: %v", err) @@ -598,7 +684,7 @@ func version(c *cli.Context) { if gitCommit != "" { fmt.Println("Git Commit:", gitCommit) } - fmt.Println("Protocol Version:", c.GlobalInt(utils.ProtocolVersionFlag.Name)) + fmt.Println("Protocol Versions:", eth.ProtocolVersions) fmt.Println("Network Id:", c.GlobalInt(utils.NetworkIdFlag.Name)) fmt.Println("Go Version:", runtime.Version()) fmt.Println("OS:", runtime.GOOS) diff --git a/cmd/geth/monitorcmd.go b/cmd/geth/monitorcmd.go index 6593b3614..affe3b75d 100644 --- a/cmd/geth/monitorcmd.go +++ b/cmd/geth/monitorcmd.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with go-ethereum. If not, see . + package main import ( diff --git a/cmd/rlpdump/main.go b/cmd/rlpdump/main.go index 528ccc6bd..2f74c073d 100644 --- a/cmd/rlpdump/main.go +++ b/cmd/rlpdump/main.go @@ -1,23 +1,18 @@ -/* - This file is part of go-ethereum - - go-ethereum is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - go-ethereum is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with go-ethereum. If not, see . -*/ -/** - * @authors - * Felix Lange - */ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with go-ethereum. If not, see . // rlpdump is a pretty-printer for RLP data. package main diff --git a/cmd/utils/cmd.go b/cmd/utils/cmd.go index f7520a8e4..2949d2470 100644 --- a/cmd/utils/cmd.go +++ b/cmd/utils/cmd.go @@ -1,24 +1,20 @@ -/* - This file is part of go-ethereum +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with go-ethereum. If not, see . - go-ethereum is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - go-ethereum is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with go-ethereum. If not, see . -*/ -/** - * @authors - * Jeffrey Wilcke - * Viktor Tron - */ +// Package utils contains internal helper functions for go-ethereum commands. package utils import ( @@ -46,29 +42,6 @@ const ( var interruptCallbacks = []func(os.Signal){} -// Register interrupt handlers callbacks -func RegisterInterrupt(cb func(os.Signal)) { - interruptCallbacks = append(interruptCallbacks, cb) -} - -// go routine that call interrupt handlers in order of registering -func HandleInterrupt() { - c := make(chan os.Signal, 1) - go func() { - signal.Notify(c, os.Interrupt) - for sig := range c { - glog.V(logger.Error).Infof("Shutting down (%v) ... \n", sig) - RunInterruptCallbacks(sig) - } - }() -} - -func RunInterruptCallbacks(sig os.Signal) { - for _, cb := range interruptCallbacks { - cb(sig) - } -} - func openLogFile(Datadir string, filename string) *os.File { path := common.AbsolutePath(Datadir, filename) file, err := os.OpenFile(path, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666) @@ -149,19 +122,24 @@ func StartEthereum(ethereum *eth.Ethereum) { if err := ethereum.Start(); err != nil { Fatalf("Error starting Ethereum: %v", err) } - RegisterInterrupt(func(sig os.Signal) { - ethereum.Stop() + go func() { + sigc := make(chan os.Signal, 1) + signal.Notify(sigc, os.Interrupt) + defer signal.Stop(sigc) + <-sigc + glog.V(logger.Info).Infoln("Got interrupt, shutting down...") + go ethereum.Stop() logger.Flush() - }) -} - -func StartEthereumForTest(ethereum *eth.Ethereum) { - glog.V(logger.Info).Infoln("Starting ", ethereum.Name()) - ethereum.StartForTest() - RegisterInterrupt(func(sig os.Signal) { - ethereum.Stop() - logger.Flush() - }) + for i := 10; i > 0; i-- { + <-sigc + if i > 1 { + glog.V(logger.Info).Infoln("Already shutting down, please be patient.") + glog.V(logger.Info).Infoln("Interrupt", i-1, "more times to induce panic.") + } + } + glog.V(logger.Error).Infof("Force quitting: this might not end so well.") + panic("boom") + }() } func FormatTransactionData(data string) []byte { diff --git a/cmd/utils/customflags.go b/cmd/utils/customflags.go index 78a6b8d22..6aeec448c 100644 --- a/cmd/utils/customflags.go +++ b/cmd/utils/customflags.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with go-ethereum. If not, see . + package utils import ( diff --git a/cmd/utils/customflags_test.go b/cmd/utils/customflags_test.go index 11deb38ef..726d1ab47 100644 --- a/cmd/utils/customflags_test.go +++ b/cmd/utils/customflags_test.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with go-ethereum. If not, see . + package utils import ( diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 0d59980ec..903c97e71 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with go-ethereum. If not, see . + package utils import ( @@ -9,6 +25,7 @@ import ( "os" "path/filepath" "runtime" + "strconv" "github.com/ethereum/go-ethereum/metrics" @@ -82,11 +99,6 @@ var ( Usage: "Data directory to be used", Value: DirectoryString{common.DefaultDataDir()}, } - ProtocolVersionFlag = cli.IntFlag{ - Name: "protocolversion", - Usage: "ETH protocol version (integer)", - Value: eth.ProtocolVersion, - } NetworkIdFlag = cli.IntFlag{ Name: "networkid", Usage: "Network Id (integer)", @@ -127,8 +139,8 @@ var ( } EtherbaseFlag = cli.StringFlag{ Name: "etherbase", - Usage: "Public address for block mining rewards. By default the address of your primary account is used", - Value: "primary", + Usage: "Public address for block mining rewards. By default the address first created is used", + Value: "0", } GasPriceFlag = cli.StringFlag{ Name: "gasprice", @@ -138,7 +150,7 @@ var ( UnlockedAccountFlag = cli.StringFlag{ Name: "unlock", - Usage: "Unlock the account given until this program exits (prompts for password). '--unlock primary' unlocks the primary account", + Usage: "Unlock the account given until this program exits (prompts for password). '--unlock n' unlocks the n-th account in order or creation.", Value: "", } PasswordFileFlag = cli.StringFlag{ @@ -356,10 +368,15 @@ func MakeEthConfig(clientID, version string, ctx *cli.Context) *eth.Config { if len(customName) > 0 { clientID += "/" + customName } + am := MakeAccountManager(ctx) + etherbase, err := ParamToAddress(ctx.GlobalString(EtherbaseFlag.Name), am) + if err != nil { + glog.V(logger.Error).Infoln("WARNING: No etherbase set and no accounts found as default") + } + return ð.Config{ Name: common.MakeName(clientID, version), DataDir: ctx.GlobalString(DataDirFlag.Name), - ProtocolVersion: ctx.GlobalInt(ProtocolVersionFlag.Name), GenesisNonce: ctx.GlobalInt(GenesisNonceFlag.Name), BlockChainVersion: ctx.GlobalInt(BlockchainVersionFlag.Name), SkipBcVersionCheck: false, @@ -367,9 +384,9 @@ func MakeEthConfig(clientID, version string, ctx *cli.Context) *eth.Config { LogFile: ctx.GlobalString(LogFileFlag.Name), Verbosity: ctx.GlobalInt(VerbosityFlag.Name), LogJSON: ctx.GlobalString(LogJSONFlag.Name), - Etherbase: ctx.GlobalString(EtherbaseFlag.Name), + Etherbase: common.HexToAddress(etherbase), MinerThreads: ctx.GlobalInt(MinerThreadsFlag.Name), - AccountManager: MakeAccountManager(ctx), + AccountManager: am, VmDebug: ctx.GlobalBool(VMDebugFlag.Name), MaxPeers: ctx.GlobalInt(MaxPeersFlag.Name), MaxPendingPeers: ctx.GlobalInt(MaxPendingPeersFlag.Name), @@ -418,7 +435,7 @@ func MakeChain(ctx *cli.Context) (chain *core.ChainManager, blockDB, stateDB, ex eventMux := new(event.TypeMux) pow := ethash.New() genesis := core.GenesisBlock(uint64(ctx.GlobalInt(GenesisNonceFlag.Name)), blockDB) - chain, err = core.NewChainManager(genesis, blockDB, stateDB, pow, eventMux) + chain, err = core.NewChainManager(genesis, blockDB, stateDB, extraDB, pow, eventMux) if err != nil { Fatalf("Could not start chainmanager: %v", err) } @@ -438,17 +455,17 @@ func MakeAccountManager(ctx *cli.Context) *accounts.Manager { func IpcSocketPath(ctx *cli.Context) (ipcpath string) { if common.IsWindows() { ipcpath = common.DefaultIpcPath() - if ipcpath != ctx.GlobalString(IPCPathFlag.Name) { + if ctx.GlobalIsSet(IPCPathFlag.Name) { ipcpath = ctx.GlobalString(IPCPathFlag.Name) } } else { ipcpath = common.DefaultIpcPath() - if ctx.GlobalString(IPCPathFlag.Name) != common.DefaultIpcPath() { - ipcpath = ctx.GlobalString(IPCPathFlag.Name) - } else if ctx.GlobalString(DataDirFlag.Name) != "" && - ctx.GlobalString(DataDirFlag.Name) != common.DefaultDataDir() { + if ctx.GlobalIsSet(DataDirFlag.Name) { ipcpath = filepath.Join(ctx.GlobalString(DataDirFlag.Name), "geth.ipc") } + if ctx.GlobalIsSet(IPCPathFlag.Name) { + ipcpath = ctx.GlobalString(IPCPathFlag.Name) + } } return @@ -494,3 +511,20 @@ func StartPProf(ctx *cli.Context) { log.Println(http.ListenAndServe(address, nil)) }() } + +func ParamToAddress(addr string, am *accounts.Manager) (addrHex string, err error) { + if !((len(addr) == 40) || (len(addr) == 42)) { // with or without 0x + index, err := strconv.Atoi(addr) + if err != nil { + Fatalf("Invalid account address '%s'", addr) + } + + addrHex, err = am.AddressByIndex(index) + if err != nil { + return "", err + } + } else { + addrHex = addr + } + return +} diff --git a/common/big.go b/common/big.go index 05d56daba..ec936b5bc 100644 --- a/common/big.go +++ b/common/big.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package common import "math/big" diff --git a/common/big_test.go b/common/big_test.go index cedbaf144..df8dfd980 100644 --- a/common/big_test.go +++ b/common/big_test.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package common import ( diff --git a/common/bytes.go b/common/bytes.go index d279156b4..a65c0122b 100644 --- a/common/bytes.go +++ b/common/bytes.go @@ -1,3 +1,20 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + +// Package common contains various helper functions. package common import ( diff --git a/common/bytes_test.go b/common/bytes_test.go index 069af984c..4e7c63941 100644 --- a/common/bytes_test.go +++ b/common/bytes_test.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package common import ( diff --git a/common/compiler/solidity.go b/common/compiler/solidity.go index caf86974e..e1869cc3b 100644 --- a/common/compiler/solidity.go +++ b/common/compiler/solidity.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package compiler import ( @@ -185,12 +201,12 @@ func (sol *Solidity) Compile(source string) (contracts map[string]*Contract, err return } -func ExtractInfo(contract *Contract, filename string) (contenthash common.Hash, err error) { - contractInfo, err := json.Marshal(contract.Info) +func SaveInfo(info *ContractInfo, filename string) (contenthash common.Hash, err error) { + infojson, err := json.Marshal(info) if err != nil { return } - contenthash = common.BytesToHash(crypto.Sha3(contractInfo)) - err = ioutil.WriteFile(filename, contractInfo, 0600) + contenthash = common.BytesToHash(crypto.Sha3(infojson)) + err = ioutil.WriteFile(filename, infojson, 0600) return } diff --git a/common/compiler/solidity_test.go b/common/compiler/solidity_test.go index 59b6b6cd6..49772cd2e 100644 --- a/common/compiler/solidity_test.go +++ b/common/compiler/solidity_test.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package compiler import ( @@ -72,19 +88,15 @@ func TestNoCompiler(t *testing.T) { } } -func TestExtractInfo(t *testing.T) { +func TestSaveInfo(t *testing.T) { var cinfo ContractInfo err := json.Unmarshal([]byte(info), &cinfo) if err != nil { t.Errorf("%v", err) } - contract := &Contract{ - Code: "", - Info: cinfo, - } filename := "/tmp/solctest.info.json" os.Remove(filename) - cinfohash, err := ExtractInfo(contract, filename) + cinfohash, err := SaveInfo(&cinfo, filename) if err != nil { t.Errorf("error extracting info: %v", err) } diff --git a/common/config.go b/common/config.go index 23a902bc1..f5507d3e9 100644 --- a/common/config.go +++ b/common/config.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package common import ( diff --git a/common/db.go b/common/db.go index 7f3becd5a..2d484482e 100644 --- a/common/db.go +++ b/common/db.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package common // Database interface diff --git a/common/debug.go b/common/debug.go index 69675cc6c..be4e3d36c 100644 --- a/common/debug.go +++ b/common/debug.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package common import ( diff --git a/common/docserver/docserver.go b/common/docserver/docserver.go index 5e076aa7e..3a3343909 100644 --- a/common/docserver/docserver.go +++ b/common/docserver/docserver.go @@ -1,37 +1,45 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package docserver import ( "fmt" "io/ioutil" "net/http" + "path/filepath" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" ) -// http://golang.org/pkg/net/http/#RoundTripper -var ( - schemes = map[string]func(*DocServer) http.RoundTripper{ - // Simple File server from local disk file:///etc/passwd :) - "file": fileServerOnDocRoot, - } -) - -func fileServerOnDocRoot(ds *DocServer) http.RoundTripper { - return http.NewFileTransport(http.Dir(ds.DocRoot)) -} - type DocServer struct { *http.Transport DocRoot string + schemes []string } -func New(docRoot string) (self *DocServer, err error) { +func New(docRoot string) (self *DocServer) { self = &DocServer{ Transport: &http.Transport{}, DocRoot: docRoot, + schemes: []string{"file"}, } - err = self.RegisterProtocols(schemes) + self.DocRoot = "/tmp/" + self.RegisterProtocol("file", http.NewFileTransport(http.Dir(self.DocRoot))) return } @@ -45,16 +53,44 @@ func (self *DocServer) Client() *http.Client { } } -func (self *DocServer) RegisterProtocols(schemes map[string]func(*DocServer) http.RoundTripper) (err error) { - for scheme, rtf := range schemes { - self.RegisterProtocol(scheme, rtf(self)) +func (self *DocServer) RegisterScheme(scheme string, rt http.RoundTripper) { + self.schemes = append(self.schemes, scheme) + self.RegisterProtocol(scheme, rt) +} + +func (self *DocServer) HasScheme(scheme string) bool { + for _, s := range self.schemes { + if s == scheme { + return true + } } - return + return false } func (self *DocServer) GetAuthContent(uri string, hash common.Hash) (content []byte, err error) { + // retrieve content + content, err = self.Get(uri, "") + if err != nil { + return + } + + // check hash to authenticate content + chash := crypto.Sha3Hash(content) + if chash != hash { + content = nil + err = fmt.Errorf("content hash mismatch %x != %x (exp)", hash[:], chash[:]) + } + + return + +} + +// Get(uri, path) downloads the document at uri, if path is non-empty it +// is interpreted as a filepath to which the contents are saved +func (self *DocServer) Get(uri, path string) (content []byte, err error) { // retrieve content resp, err := self.Client().Get(uri) + defer func() { if resp != nil { resp.Body.Close() @@ -68,13 +104,10 @@ func (self *DocServer) GetAuthContent(uri string, hash common.Hash) (content []b return } - // check hash to authenticate content - hashbytes := crypto.Sha3(content) - var chash common.Hash - copy(chash[:], hashbytes) - if chash != hash { - content = nil - err = fmt.Errorf("content hash mismatch") + if path != "" { + var abspath string + abspath, err = filepath.Abs(path) + ioutil.WriteFile(abspath, content, 0700) } return diff --git a/common/docserver/docserver_test.go b/common/docserver/docserver_test.go index 400d7447a..136ec9ccc 100644 --- a/common/docserver/docserver_test.go +++ b/common/docserver/docserver_test.go @@ -1,7 +1,24 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package docserver import ( "io/ioutil" + "net/http" "os" "testing" @@ -15,7 +32,7 @@ func TestGetAuthContent(t *testing.T) { copy(hash[:], crypto.Sha3([]byte(text))) ioutil.WriteFile("/tmp/test.content", []byte(text), os.ModePerm) - ds, err := New("/tmp/") + ds := New("/tmp/") content, err := ds.GetAuthContent("file:///test.content", hash) if err != nil { t.Errorf("no error expected, got %v", err) @@ -26,7 +43,7 @@ func TestGetAuthContent(t *testing.T) { hash = common.Hash{} content, err = ds.GetAuthContent("file:///test.content", hash) - expected := "content hash mismatch" + expected := "content hash mismatch 0000000000000000000000000000000000000000000000000000000000000000 != 9c22ff5f21f0b81b113e63f7db6da94fedef11b2119b4088b89664fb9a3cb658 (exp)" if err == nil { t.Errorf("expected error, got nothing") } else { @@ -36,3 +53,18 @@ func TestGetAuthContent(t *testing.T) { } } + +type rt struct{} + +func (rt) RoundTrip(req *http.Request) (resp *http.Response, err error) { return } + +func TestRegisterScheme(t *testing.T) { + ds := New("/tmp/") + if ds.HasScheme("scheme") { + t.Errorf("expected scheme not to be registered") + } + ds.RegisterScheme("scheme", rt{}) + if !ds.HasScheme("scheme") { + t.Errorf("expected scheme to be registered") + } +} diff --git a/common/list.go b/common/list.go index 594a8a24b..4370d69fe 100644 --- a/common/list.go +++ b/common/list.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package common import ( diff --git a/common/main_test.go b/common/main_test.go index 2bed278e6..c1efb848b 100644 --- a/common/main_test.go +++ b/common/main_test.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package common import ( diff --git a/common/math/dist.go b/common/math/dist.go index 0a0731971..93b1635e4 100644 --- a/common/math/dist.go +++ b/common/math/dist.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package math import ( diff --git a/common/math/dist_test.go b/common/math/dist_test.go index 90e302f44..d2e3650b4 100644 --- a/common/math/dist_test.go +++ b/common/math/dist_test.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package math import ( diff --git a/common/natspec/natspec.go b/common/natspec/natspec.go index 7e5f053c7..ed16d62a0 100644 --- a/common/natspec/natspec.go +++ b/common/natspec/natspec.go @@ -1,17 +1,33 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package natspec import ( "bytes" "encoding/json" "fmt" - "github.com/robertkrimen/otto" "strings" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/docserver" - "github.com/ethereum/go-ethereum/common/resolver" + "github.com/ethereum/go-ethereum/common/registrar" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/xeth" + "github.com/robertkrimen/otto" ) type abi2method map[[8]byte]*method @@ -88,7 +104,7 @@ func New(xeth *xeth.XEth, jsontx string, http *docserver.DocServer) (self *NatSp } // also called by admin.contractInfo.get -func FetchDocsForContract(contractAddress string, xeth *xeth.XEth, http *docserver.DocServer) (content []byte, err error) { +func FetchDocsForContract(contractAddress string, xeth *xeth.XEth, ds *docserver.DocServer) (content []byte, err error) { // retrieve contract hash from state codehex := xeth.CodeAt(contractAddress) codeb := xeth.CodeAtBytes(contractAddress) @@ -99,20 +115,32 @@ func FetchDocsForContract(contractAddress string, xeth *xeth.XEth, http *docserv } codehash := common.BytesToHash(crypto.Sha3(codeb)) // set up nameresolver with natspecreg + urlhint contract addresses - res := resolver.New(xeth) + reg := registrar.New(xeth) // resolve host via HashReg/UrlHint Resolver - uri, hash, err := res.KeyToUrl(codehash) + hash, err := reg.HashToHash(codehash) + if err != nil { + return + } + if ds.HasScheme("bzz") { + content, err = ds.Get("bzz://"+hash.Hex()[2:], "") + if err == nil { // non-fatal + return + } + err = nil + //falling back to urlhint + } + + uri, err := reg.HashToUrl(hash) if err != nil { return } // get content via http client and authenticate content using hash - content, err = http.GetAuthContent(uri, hash) + content, err = ds.GetAuthContent(uri, hash) if err != nil { return } - return } diff --git a/common/natspec/natspec_e2e_test.go b/common/natspec/natspec_e2e_test.go index 7e9172649..0cbe040c0 100644 --- a/common/natspec/natspec_e2e_test.go +++ b/common/natspec/natspec_e2e_test.go @@ -1,18 +1,36 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package natspec import ( "fmt" "io/ioutil" + "math/big" "os" + "runtime" "strings" "testing" + "time" "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/docserver" - "github.com/ethereum/go-ethereum/common/resolver" + "github.com/ethereum/go-ethereum/common/registrar" "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/eth" xe "github.com/ethereum/go-ethereum/xeth" @@ -73,13 +91,10 @@ const ( ) type testFrontend struct { - t *testing.T - // resolver *resolver.Resolver + t *testing.T ethereum *eth.Ethereum xeth *xe.XEth - coinbase common.Address - stateDb *state.StateDB - txc uint64 + wait chan *big.Int lastConfirm string wantNatSpec bool } @@ -91,10 +106,7 @@ func (self *testFrontend) UnlockAccount(acc []byte) bool { func (self *testFrontend) ConfirmTransaction(tx string) bool { if self.wantNatSpec { - ds, err := docserver.New("/tmp/") - if err != nil { - self.t.Errorf("Error creating DocServer: %v", err) - } + ds := docserver.New("/tmp/") self.lastConfirm = GetNotice(self.xeth, tx, ds) } return true @@ -128,6 +140,8 @@ func testEth(t *testing.T) (ethereum *eth.Ethereum, err error) { DataDir: "/tmp/eth-natspec", AccountManager: am, MaxPeers: 0, + PowTest: true, + Etherbase: common.HexToAddress(testAddress), }) if err != nil { @@ -153,86 +167,106 @@ func testInit(t *testing.T) (self *testFrontend) { // mock frontend self = &testFrontend{t: t, ethereum: ethereum} self.xeth = xe.New(ethereum, self) - - addr, _ := ethereum.Etherbase() - self.coinbase = addr - self.stateDb = self.ethereum.ChainManager().State().Copy() + self.wait = self.xeth.UpdateState() + addr, _ := self.ethereum.Etherbase() // initialise the registry contracts - // self.resolver.CreateContracts(addr) - resolver.New(self.xeth).CreateContracts(addr) - self.applyTxs() - // t.Logf("HashReg contract registered at %v", resolver.HashRegContractAddress) - // t.Logf("URLHint contract registered at %v", resolver.UrlHintContractAddress) + reg := registrar.New(self.xeth) + var registrarTxhash, hashRegTxhash, urlHintTxhash string + registrarTxhash, err = reg.SetGlobalRegistrar("", addr) + if err != nil { + t.Errorf("error creating GlobalRegistrar: %v", err) + } + + hashRegTxhash, err = reg.SetHashReg("", addr) + if err != nil { + t.Errorf("error creating HashReg: %v", err) + } + urlHintTxhash, err = reg.SetUrlHint("", addr) + if err != nil { + t.Errorf("error creating UrlHint: %v", err) + } + if !processTxs(self, t, 3) { + t.Errorf("error mining txs") + } + _ = registrarTxhash + _ = hashRegTxhash + _ = urlHintTxhash + + /* TODO: + * lookup receipt and contract addresses by tx hash + * name registration for HashReg and UrlHint addresses + * mine those transactions + * then set once more SetHashReg SetUrlHint + */ return } -// this is needed for transaction to be applied to the state in testing -// the heavy lifing is done in XEth.ApplyTestTxs -// this is fragile, -// and does process leaking since xeth loops cannot quit safely -// should be replaced by proper mining with testDAG for easy full integration tests -func (self *testFrontend) applyTxs() { - self.txc, self.xeth = self.xeth.ApplyTestTxs(self.stateDb, self.coinbase, self.txc) - return -} - // end to end test func TestNatspecE2E(t *testing.T) { t.Skip() tf := testInit(t) defer tf.ethereum.Stop() + addr, _ := tf.ethereum.Etherbase() // create a contractInfo file (mock cloud-deployed contract metadocs) // incidentally this is the info for the registry contract itself ioutil.WriteFile("/tmp/"+testFileName, []byte(testContractInfo), os.ModePerm) - dochash := common.BytesToHash(crypto.Sha3([]byte(testContractInfo))) + dochash := crypto.Sha3Hash([]byte(testContractInfo)) // take the codehash for the contract we wanna test - // codehex := tf.xeth.CodeAt(resolver.HashRegContractAddress) - codeb := tf.xeth.CodeAtBytes(resolver.HashRegContractAddress) - codehash := common.BytesToHash(crypto.Sha3(codeb)) + codeb := tf.xeth.CodeAtBytes(registrar.HashRegAddr) + codehash := crypto.Sha3Hash(codeb) // use resolver to register codehash->dochash->url - registry := resolver.New(tf.xeth) - _, err := registry.Register(tf.coinbase, codehash, dochash, "file:///"+testFileName) + // test if globalregistry works + // registrar.HashRefAddr = "0x0" + // registrar.UrlHintAddr = "0x0" + reg := registrar.New(tf.xeth) + _, err := reg.SetHashToHash(addr, codehash, dochash) if err != nil { t.Errorf("error registering: %v", err) } - // apply txs to the state - tf.applyTxs() + _, err = reg.SetUrlToHash(addr, dochash, "file:///"+testFileName) + if err != nil { + t.Errorf("error registering: %v", err) + } + if !processTxs(tf, t, 5) { + return + } // NatSpec info for register method of HashReg contract installed // now using the same transactions to check confirm messages tf.wantNatSpec = true // this is set so now the backend uses natspec confirmation - _, err = registry.RegisterContentHash(tf.coinbase, codehash, dochash) + _, err = reg.SetHashToHash(addr, codehash, dochash) if err != nil { t.Errorf("error calling contract registry: %v", err) } + fmt.Printf("GlobalRegistrar: %v, HashReg: %v, UrlHint: %v\n", registrar.GlobalRegistrarAddr, registrar.HashRegAddr, registrar.UrlHintAddr) if tf.lastConfirm != testExpNotice { - t.Errorf("Wrong confirm message. expected '%v', got '%v'", testExpNotice, tf.lastConfirm) + t.Errorf("Wrong confirm message. expected\n'%v', got\n'%v'", testExpNotice, tf.lastConfirm) } // test unknown method - exp := fmt.Sprintf(testExpNotice2, resolver.HashRegContractAddress) - _, err = registry.SetOwner(tf.coinbase) + exp := fmt.Sprintf(testExpNotice2, registrar.HashRegAddr) + _, err = reg.SetOwner(addr) if err != nil { t.Errorf("error setting owner: %v", err) } if tf.lastConfirm != exp { - t.Errorf("Wrong confirm message, expected '%v', got '%v'", exp, tf.lastConfirm) + t.Errorf("Wrong confirm message, expected\n'%v', got\n'%v'", exp, tf.lastConfirm) } // test unknown contract - exp = fmt.Sprintf(testExpNotice3, resolver.UrlHintContractAddress) + exp = fmt.Sprintf(testExpNotice3, registrar.UrlHintAddr) - _, err = registry.RegisterUrl(tf.coinbase, dochash, "file:///test.content") + _, err = reg.SetUrlToHash(addr, dochash, "file:///test.content") if err != nil { t.Errorf("error registering: %v", err) } @@ -242,3 +276,63 @@ func TestNatspecE2E(t *testing.T) { } } + +func pendingTransactions(repl *testFrontend, t *testing.T) (txc int64, err error) { + txs := repl.ethereum.TxPool().GetTransactions() + return int64(len(txs)), nil +} + +func processTxs(repl *testFrontend, t *testing.T, expTxc int) bool { + var txc int64 + var err error + for i := 0; i < 50; i++ { + txc, err = pendingTransactions(repl, t) + if err != nil { + t.Errorf("unexpected error checking pending transactions: %v", err) + return false + } + if expTxc < int(txc) { + t.Errorf("too many pending transactions: expected %v, got %v", expTxc, txc) + return false + } else if expTxc == int(txc) { + break + } + time.Sleep(100 * time.Millisecond) + } + if int(txc) != expTxc { + t.Errorf("incorrect number of pending transactions, expected %v, got %v", expTxc, txc) + return false + } + + err = repl.ethereum.StartMining(runtime.NumCPU()) + if err != nil { + t.Errorf("unexpected error mining: %v", err) + return false + } + defer repl.ethereum.StopMining() + + timer := time.NewTimer(100 * time.Second) + height := new(big.Int).Add(repl.xeth.CurrentBlock().Number(), big.NewInt(1)) + repl.wait <- height + select { + case <-timer.C: + // if times out make sure the xeth loop does not block + go func() { + select { + case repl.wait <- nil: + case <-repl.wait: + } + }() + case <-repl.wait: + } + txc, err = pendingTransactions(repl, t) + if err != nil { + t.Errorf("unexpected error checking pending transactions: %v", err) + return false + } + if txc != 0 { + t.Errorf("%d trasactions were not mined", txc) + return false + } + return true +} diff --git a/common/natspec/natspec_e2e_test.go.orig b/common/natspec/natspec_e2e_test.go.orig new file mode 100644 index 000000000..ae8e17ad9 --- /dev/null +++ b/common/natspec/natspec_e2e_test.go.orig @@ -0,0 +1,253 @@ +package natspec + +import ( + "fmt" + "io/ioutil" + "os" + "strings" + "testing" + + "github.com/ethereum/go-ethereum/accounts" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/docserver" + "github.com/ethereum/go-ethereum/common/registrar" + "github.com/ethereum/go-ethereum/core" + "github.com/ethereum/go-ethereum/core/state" + "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/eth" + xe "github.com/ethereum/go-ethereum/xeth" +) + +const ( + testBalance = "10000000000000000000" + + testFileName = "long_file_name_for_testing_registration_of_URLs_longer_than_32_bytes.content" + + testNotice = "Register key `utils.toHex(_key)` <- content `utils.toHex(_content)`" + + testExpNotice = "Register key 0xadd1a7d961cff0242089674ec2ef6fca671ab15e1fe80e38859fc815b98d88ab <- content 0xb3a2dea218de5d8bbe6c4645aadbf67b5ab00ecb1a9ec95dbdad6a0eed3e41a7" + + testExpNotice2 = `About to submit transaction (NatSpec notice error: abi key does not match any method): {"params":[{"to":"%s","data": "0x31e12c20"}]}` + + testExpNotice3 = `About to submit transaction (no NatSpec info found for contract: content hash not found for '0x1392c62d05b2d149e22a339c531157ae06b44d39a674cce500064b12b9aeb019'): {"params":[{"to":"%s","data": "0x300a3bbfb3a2dea218de5d8bbe6c4645aadbf67b5ab00ecb1a9ec95dbdad6a0eed3e41a7000000000000000000000000000000000000000000000000000000000000000000000000000000000000000066696c653a2f2f2f746573742e636f6e74656e74"}]}` +) + +const ( + testUserDoc = ` +{ + "methods": { + "register(uint256,uint256)": { + "notice": "` + testNotice + `" + } + }, + "invariants": [ + { "notice": "" } + ], + "construction": [ + { "notice": "" } + ] +} +` + testAbiDefinition = ` +[{ + "name": "register", + "constant": false, + "type": "function", + "inputs": [{ + "name": "_key", + "type": "uint256" + }, { + "name": "_content", + "type": "uint256" + }], + "outputs": [] +}] +` + + testContractInfo = ` +{ + "userDoc": ` + testUserDoc + `, + "abiDefinition": ` + testAbiDefinition + ` +} +` +) + +type testFrontend struct { + t *testing.T + ethereum *eth.Ethereum + xeth *xe.XEth + coinbase common.Address + stateDb *state.StateDB + txc uint64 + lastConfirm string + wantNatSpec bool +} + +func (self *testFrontend) UnlockAccount(acc []byte) bool { + self.ethereum.AccountManager().Unlock(common.BytesToAddress(acc), "password") + return true +} + +func (self *testFrontend) ConfirmTransaction(tx string) bool { + if self.wantNatSpec { + ds := docserver.New("/tmp/") + self.lastConfirm = GetNotice(self.xeth, tx, ds) + } + return true +} + +func testEth(t *testing.T) (ethereum *eth.Ethereum, err error) { + + os.RemoveAll("/tmp/eth-natspec/") + + err = os.MkdirAll("/tmp/eth-natspec/keystore", os.ModePerm) + if err != nil { + panic(err) + } + + // create a testAddress + ks := crypto.NewKeyStorePassphrase("/tmp/eth-natspec/keystore") + am := accounts.NewManager(ks) + testAccount, err := am.NewAccount("password") + if err != nil { + panic(err) + } + testAddress := strings.TrimPrefix(testAccount.Address.Hex(), "0x") + + // set up mock genesis with balance on the testAddress + core.GenesisAccounts = []byte(`{ + "` + testAddress + `": {"balance": "` + testBalance + `"} + }`) + + // only use minimalistic stack with no networking + ethereum, err = eth.New(ð.Config{ + DataDir: "/tmp/eth-natspec", + AccountManager: am, + MaxPeers: 0, + }) + + if err != nil { + panic(err) + } + + return +} + +func testInit(t *testing.T) (self *testFrontend) { + // initialise and start minimal ethereum stack + ethereum, err := testEth(t) + if err != nil { + t.Errorf("error creating ethereum: %v", err) + return + } + err = ethereum.Start() + if err != nil { + t.Errorf("error starting ethereum: %v", err) + return + } + + // mock frontend + self = &testFrontend{t: t, ethereum: ethereum} + self.xeth = xe.New(ethereum, self) + + addr, _ := ethereum.Etherbase() + self.coinbase = addr + self.stateDb = self.ethereum.ChainManager().State().Copy() + + // initialise the registry contracts + reg := registrar.New(self.xeth) + err = reg.SetHashReg("", addr) + if err != nil { + t.Errorf("error creating HashReg: %v", err) + } + err = reg.SetUrlHint("", addr) + if err != nil { + t.Errorf("error creating UrlHint: %v", err) + } + self.applyTxs() + + return + +} + +// this is needed for transaction to be applied to the state in testing +// the heavy lifing is done in XEth.ApplyTestTxs +// this is fragile, +// and does process leaking since xeth loops cannot quit safely +// should be replaced by proper mining with testDAG for easy full integration tests +func (self *testFrontend) applyTxs() { + self.txc, self.xeth = self.xeth.ApplyTestTxs(self.stateDb, self.coinbase, self.txc) + return +} + +// end to end test +func TestNatspecE2E(t *testing.T) { + t.Skip() + + tf := testInit(t) + defer tf.ethereum.Stop() + + // create a contractInfo file (mock cloud-deployed contract metadocs) + // incidentally this is the info for the registry contract itself + ioutil.WriteFile("/tmp/"+testFileName, []byte(testContractInfo), os.ModePerm) + dochash := common.BytesToHash(crypto.Sha3([]byte(testContractInfo))) + + // take the codehash for the contract we wanna test + // codehex := tf.xeth.CodeAt(registar.HashRegAddr) + codeb := tf.xeth.CodeAtBytes(registrar.HashRegAddr) + codehash := common.BytesToHash(crypto.Sha3(codeb)) + + // use resolver to register codehash->dochash->url + // test if globalregistry works + // registrar.HashRefAddr = "0x0" + // registrar.UrlHintAddr = "0x0" + reg := registrar.New(tf.xeth) + _, err := reg.SetHashToHash(tf.coinbase, codehash, dochash) + if err != nil { + t.Errorf("error registering: %v", err) + } + _, err = reg.SetUrlToHash(tf.coinbase, dochash, "file:///"+testFileName) + if err != nil { + t.Errorf("error registering: %v", err) + } + // apply txs to the state + tf.applyTxs() + + // NatSpec info for register method of HashReg contract installed + // now using the same transactions to check confirm messages + + tf.wantNatSpec = true // this is set so now the backend uses natspec confirmation + _, err = reg.SetHashToHash(tf.coinbase, codehash, dochash) + if err != nil { + t.Errorf("error calling contract registry: %v", err) + } + + fmt.Printf("GlobalRegistrar: %v, HashReg: %v, UrlHint: %v\n", registrar.GlobalRegistrarAddr, registrar.HashRegAddr, registrar.UrlHintAddr) + if tf.lastConfirm != testExpNotice { + t.Errorf("Wrong confirm message. expected '%v', got '%v'", testExpNotice, tf.lastConfirm) + } + + // test unknown method + exp := fmt.Sprintf(testExpNotice2, registrar.HashRegAddr) + _, err = reg.SetOwner(tf.coinbase) + if err != nil { + t.Errorf("error setting owner: %v", err) + } + + if tf.lastConfirm != exp { + t.Errorf("Wrong confirm message, expected '%v', got '%v'", exp, tf.lastConfirm) + } + + // test unknown contract + exp = fmt.Sprintf(testExpNotice3, registrar.UrlHintAddr) + + _, err = reg.SetUrlToHash(tf.coinbase, dochash, "file:///test.content") + if err != nil { + t.Errorf("error registering: %v", err) + } + + if tf.lastConfirm != exp { + t.Errorf("Wrong confirm message, expected '%v', got '%v'", exp, tf.lastConfirm) + } + +} diff --git a/common/natspec/natspec_js.go b/common/natspec/natspec_js.go index 571044bde..ce41e72c4 100644 --- a/common/natspec/natspec_js.go +++ b/common/natspec/natspec_js.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package natspec const natspecJS = //`require=function t(e,n,r){function i(f,u){if(!n[f]){if(!e[f]){var s="function"==typeof require&&require;if(!u&&s)return s(f,!0);if(o)return o(f,!0);var c=new Error("Cannot find module '"+f+"'");throw c.code="MODULE_NOT_FOUND",c}var a=n[f]={exports:{}};e[f][0].call(a.exports,function(t){var n=e[f][1][t];return i(n?n:t)},a,a.exports,t,e,n,r)}return n[f].exports}for(var o="function"==typeof require&&require,f=0;fv;v++)d.push(g(e.slice(0,s))),e=e.slice(s);n.push(d)}else r.prefixedType("string")(t[c].type)?(a=a.slice(s),n.push(g(e.slice(0,s))),e=e.slice(s)):(n.push(g(e.slice(0,s))),e=e.slice(s))}),n},g=function(t){var e={};return t.forEach(function(t){var r=n.extractDisplayName(t.name),i=n.extractTypeName(t.name),o=function(){var e=Array.prototype.slice.call(arguments);return a(t.inputs,e)};void 0===e[r]&&(e[r]=o),e[r][i]=o}),e},m=function(t){var e={};return t.forEach(function(t){var r=n.extractDisplayName(t.name),i=n.extractTypeName(t.name),o=function(e){return h(t.outputs,e)};void 0===e[r]&&(e[r]=o),e[r][i]=o}),e};e.exports={inputParser:g,outputParser:m,formatInput:a,formatOutput:h}},{"./const":4,"./formatters":5,"./types":6,"./utils":7}],4:[function(t,e){(function(n){if("build"!==n.env.NODE_ENV)var r=t("bignumber.js");var i=["wei","Kwei","Mwei","Gwei","szabo","finney","ether","grand","Mether","Gether","Tether","Pether","Eether","Zether","Yether","Nether","Dether","Vether","Uether"];e.exports={ETH_PADDING:32,ETH_SIGNATURE_LENGTH:4,ETH_UNITS:i,ETH_BIGNUMBER_ROUNDING_MODE:{ROUNDING_MODE:r.ROUND_DOWN},ETH_POLLING_TIMEOUT:1e3}}).call(this,t("_process"))},{_process:2,"bignumber.js":8}],5:[function(t,e){(function(n){if("build"!==n.env.NODE_ENV)var r=t("bignumber.js");var i=t("./utils"),o=t("./const"),f=function(t,e,n){return new Array(e-t.length+1).join(n?n:"0")+t},u=function(t){var e=2*o.ETH_PADDING;return t instanceof r||"number"==typeof t?("number"==typeof t&&(t=new r(t)),r.config(o.ETH_BIGNUMBER_ROUNDING_MODE),t=t.round(),t.lessThan(0)&&(t=new r("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16).plus(t).plus(1)),t=t.toString(16)):t=0===t.indexOf("0x")?t.substr(2):"string"==typeof t?u(new r(t)):(+t).toString(16),f(t,e)},s=function(t){return i.fromAscii(t,o.ETH_PADDING).substr(2)},c=function(t){return"000000000000000000000000000000000000000000000000000000000000000"+(t?"1":"0")},a=function(t){return u(new r(t).times(new r(2).pow(128)))},l=function(t){return"1"===new r(t.substr(0,1),16).toString(2).substr(0,1)},p=function(t){return t=t||"0",l(t)?new r(t,16).minus(new r("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16)).minus(1):new r(t,16)},h=function(t){return t=t||"0",new r(t,16)},g=function(t){return p(t).dividedBy(new r(2).pow(128))},m=function(t){return h(t).dividedBy(new r(2).pow(128))},d=function(t){return"0x"+t},v=function(t){return"0000000000000000000000000000000000000000000000000000000000000001"===t?!0:!1},w=function(t){return i.toAscii(t)},y=function(t){return"0x"+t.slice(t.length-40,t.length)};e.exports={formatInputInt:u,formatInputString:s,formatInputBool:c,formatInputReal:a,formatOutputInt:p,formatOutputUInt:h,formatOutputReal:g,formatOutputUReal:m,formatOutputHash:d,formatOutputBool:v,formatOutputString:w,formatOutputAddress:y}}).call(this,t("_process"))},{"./const":4,"./utils":7,_process:2,"bignumber.js":8}],6:[function(t,e){var n=t("./formatters"),r=function(t){return function(e){return 0===e.indexOf(t)}},i=function(t){return function(e){return t===e}},o=function(){return[{type:r("uint"),format:n.formatInputInt},{type:r("int"),format:n.formatInputInt},{type:r("hash"),format:n.formatInputInt},{type:r("string"),format:n.formatInputString},{type:r("real"),format:n.formatInputReal},{type:r("ureal"),format:n.formatInputReal},{type:i("address"),format:n.formatInputInt},{type:i("bool"),format:n.formatInputBool}]},f=function(){return[{type:r("uint"),format:n.formatOutputUInt},{type:r("int"),format:n.formatOutputInt},{type:r("hash"),format:n.formatOutputHash},{type:r("string"),format:n.formatOutputString},{type:r("real"),format:n.formatOutputReal},{type:r("ureal"),format:n.formatOutputUReal},{type:i("address"),format:n.formatOutputAddress},{type:i("bool"),format:n.formatOutputBool}]};e.exports={prefixedType:r,namedType:i,inputTypes:o,outputTypes:f}},{"./formatters":5}],7:[function(t,e){var n=t("./const"),r=function(t,e){for(var n=!1,r=0;rn;n+=2){var i=parseInt(t.substr(n,2),16);if(0===i)break;e+=String.fromCharCode(i)}return e},o=function(t){for(var e="",n=0;n3e3&&rr?"i":"").test(c))return m(a,c,u,r);u?(a.s=0>1/t?(c=c.slice(1),-1):1,$&&c.replace(/^0\.0*|\./,"").length>15&&U(L,O,t),u=!1):a.s=45===c.charCodeAt(0)?(c=c.slice(1),-1):1,c=n(c,10,r,a.s)}else{if(t instanceof e)return a.s=t.s,a.e=t.e,a.c=(t=t.c)?t.slice():t,void(L=0);if((u="number"==typeof t)&&0*t==0){if(a.s=0>1/t?(t=-t,-1):1,t===~~t){for(o=0,f=t;f>=10;f/=10,o++);return a.e=o,a.c=[t],void(L=0)}c=t+""}else{if(!d.test(c=t+""))return m(a,c,u);a.s=45===c.charCodeAt(0)?(c=c.slice(1),-1):1}}for((o=c.indexOf("."))>-1&&(c=c.replace(".","")),(f=c.search(/e/i))>0?(0>o&&(o=f),o+=+c.slice(f+1),c=c.substring(0,f)):0>o&&(o=c.length),f=0;48===c.charCodeAt(f);f++);for(s=c.length;48===c.charCodeAt(--s););if(c=c.slice(f,s+1))if(s=c.length,u&&$&&s>15&&U(L,O,a.s*t),o=o-f-1,o>q)a.c=a.e=null;else if(k>o)a.c=[a.e=0];else{if(a.e=o,a.c=[],f=(o+1)%I,0>o&&(f+=I),s>f){for(f&&a.c.push(+c.slice(0,f)),s-=I;s>f;)a.c.push(+c.slice(f,f+=I));c=c.slice(f),f=I-c.length}else f-=s;for(;f--;c+="0");a.c.push(+c)}else a.c=[a.e=0];L=0}function n(t,n,r,i){var f,u,s,a,p,h,g,m=t.indexOf("."),d=B,v=H;for(37>r&&(t=t.toLowerCase()),m>=0&&(s=Y,Y=0,t=t.replace(".",""),g=new e(r),p=g.pow(t.length-m),Y=s,g.c=c(l(o(p.c),p.e),10,n),g.e=g.c.length),h=c(t,r,n),u=s=h.length;0==h[--s];h.pop());if(!h[0])return"0";if(0>m?--u:(p.c=h,p.e=u,p.s=i,p=G(p,g,d,v,n),h=p.c,a=p.r,u=p.e),f=u+d+1,m=h[f],s=n/2,a=a||0>f||null!=h[f+1],a=4>v?(null!=m||a)&&(0==v||v==(p.s<0?3:2)):m>s||m==s&&(4==v||a||6==v&&1&h[f-1]||v==(p.s<0?8:7)),1>f||!h[0])t=a?l("1",-d):"0";else{if(h.length=f,a)for(--n;++h[--f]>n;)h[f]=0,f||(++u,h.unshift(1));for(s=h.length;!h[--s];);for(m=0,t="";s>=m;t+=N.charAt(h[m++]));t=l(t,u)}return t}function h(t,n,r,i){var f,u,s,c,p;if(r=null!=r&&z(r,0,8,i,b)?0|r:H,!t.c)return t.toString();if(f=t.c[0],s=t.e,null==n)p=o(t.c),p=19==i||24==i&&C>=s?a(p,s):l(p,s);else if(t=F(new e(t),n,r),u=t.e,p=o(t.c),c=p.length,19==i||24==i&&(u>=n||C>=u)){for(;n>c;p+="0",c++);p=a(p,u)}else if(n-=s,p=l(p,u),u+1>c){if(--n>0)for(p+=".";n--;p+="0");}else if(n+=u-c,n>0)for(u+1==c&&(p+=".");n--;p+="0");return t.s<0&&f?"-"+p:p}function S(t,n){var r,i,o=0;for(s(t[0])&&(t=t[0]),r=new e(t[0]);++ot||t>n||t!=p(t))&&U(r,(i||"decimal places")+(e>t||t>n?" out of range":" not an integer"),t),!0}function R(t,e,n){for(var r=1,i=e.length;!e[--i];e.pop());for(i=e[0];i>=10;i/=10,r++);return(n=r+n*I-1)>q?t.c=t.e=null:k>n?t.c=[t.e=0]:(t.e=n,t.c=e),t}function U(t,e,n){var r=new Error(["new BigNumber","cmp","config","div","divToInt","eq","gt","gte","lt","lte","minus","mod","plus","precision","random","round","shift","times","toDigits","toExponential","toFixed","toFormat","toFraction","pow","toPrecision","toString","BigNumber"][t]+"() "+e+": "+n);throw r.name="BigNumber Error",L=0,r}function F(t,e,n,r){var i,o,f,u,s,c,a,l=t.c,p=_;if(l){t:{for(i=1,u=l[0];u>=10;u/=10,i++);if(o=e-i,0>o)o+=I,f=e,s=l[c=0],a=s/p[i-f-1]%10|0;else if(c=v((o+1)/I),c>=l.length){if(!r)break t;for(;l.length<=c;l.push(0));s=a=0,i=1,o%=I,f=o-I+1}else{for(s=u=l[c],i=1;u>=10;u/=10,i++);o%=I,f=o-I+i,a=0>f?0:s/p[i-f-1]%10|0}if(r=r||0>e||null!=l[c+1]||(0>f?s:s%p[i-f-1]),r=4>n?(a||r)&&(0==n||n==(t.s<0?3:2)):a>5||5==a&&(4==n||r||6==n&&(o>0?f>0?s/p[i-f]:0:l[c-1])%10&1||n==(t.s<0?8:7)),1>e||!l[0])return l.length=0,r?(e-=t.e+1,l[0]=p[e%I],t.e=-e||0):l[0]=t.e=0,t;if(0==o?(l.length=c,u=1,c--):(l.length=c+1,u=p[I-o],l[c]=f>0?w(s/p[i-f]%p[f])*u:0),r)for(;;){if(0==c){for(o=1,f=l[0];f>=10;f/=10,o++);for(f=l[0]+=u,u=1;f>=10;f/=10,u++);o!=u&&(t.e++,l[0]==E&&(l[0]=1));break}if(l[c]+=u,l[c]!=E)break;l[c--]=0,u=1}for(o=l.length;0===l[--o];l.pop());}t.e>q?t.c=t.e=null:t.en?null!=(t=i[n++]):void 0};return f(e="DECIMAL_PLACES")&&z(t,0,D,2,e)&&(B=0|t),r[e]=B,f(e="ROUNDING_MODE")&&z(t,0,8,2,e)&&(H=0|t),r[e]=H,f(e="EXPONENTIAL_AT")&&(s(t)?z(t[0],-D,0,2,e)&&z(t[1],0,D,2,e)&&(C=0|t[0],j=0|t[1]):z(t,-D,D,2,e)&&(C=-(j=0|(0>t?-t:t)))),r[e]=[C,j],f(e="RANGE")&&(s(t)?z(t[0],-D,-1,2,e)&&z(t[1],1,D,2,e)&&(k=0|t[0],q=0|t[1]):z(t,-D,D,2,e)&&(0|t?k=-(q=0|(0>t?-t:t)):$&&U(2,e+" cannot be zero",t))),r[e]=[k,q],f(e="ERRORS")&&(t===!!t||1===t||0===t?(L=0,z=($=!!t)?A:u):$&&U(2,e+y,t)),r[e]=$,f(e="CRYPTO")&&(t===!!t||1===t||0===t?(V=!(!t||!g||"object"!=typeof g),t&&!V&&$&&U(2,"crypto unavailable",g)):$&&U(2,e+y,t)),r[e]=V,f(e="MODULO_MODE")&&z(t,0,9,2,e)&&(W=0|t),r[e]=W,f(e="POW_PRECISION")&&z(t,0,D,2,e)&&(Y=0|t),r[e]=Y,f(e="FORMAT")&&("object"==typeof t?Z=t:$&&U(2,e+" not an object",t)),r[e]=Z,r},e.max=function(){return S(arguments,M.lt)},e.min=function(){return S(arguments,M.gt)},e.random=function(){var t=9007199254740992,n=Math.random()*t&2097151?function(){return w(Math.random()*t)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(t){var r,i,o,f,u,s=0,c=[],a=new e(P);if(t=null!=t&&z(t,0,D,14)?0|t:B,f=v(t/I),V)if(g&&g.getRandomValues){for(r=g.getRandomValues(new Uint32Array(f*=2));f>s;)u=131072*r[s]+(r[s+1]>>>11),u>=9e15?(i=g.getRandomValues(new Uint32Array(2)),r[s]=i[0],r[s+1]=i[1]):(c.push(u%1e14),s+=2);s=f/2}else if(g&&g.randomBytes){for(r=g.randomBytes(f*=7);f>s;)u=281474976710656*(31&r[s])+1099511627776*r[s+1]+4294967296*r[s+2]+16777216*r[s+3]+(r[s+4]<<16)+(r[s+5]<<8)+r[s+6],u>=9e15?g.randomBytes(7).copy(r,s):(c.push(u%1e14),s+=7);s=f/7}else $&&U(14,"crypto unavailable",g);if(!s)for(;f>s;)u=n(),9e15>u&&(c[s++]=u%1e14);for(f=c[--s],t%=I,f&&t&&(u=_[I-t],c[s]=w(f/u)*u);0===c[s];c.pop(),s--);if(0>s)c=[o=0];else{for(o=-1;0===c[0];c.shift(),o-=I);for(s=1,u=c[0];u>=10;u/=10,s++);I>s&&(o-=I-s)}return a.e=o,a.c=c,a}}(),G=function(){function t(t,e,n){var r,i,o,f,u=0,s=t.length,c=e%T,a=e/T|0;for(t=t.slice();s--;)o=t[s]%T,f=t[s]/T|0,r=a*o+f*c,i=c*o+r%T*T+u,u=(i/n|0)+(r/T|0)+a*f,t[s]=i%n;return u&&t.unshift(u),t}function n(t,e,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;n>i;i++)if(t[i]!=e[i]){o=t[i]>e[i]?1:-1;break}return o}function r(t,e,n,r){for(var i=0;n--;)t[n]-=i,i=t[n]1;t.shift());}return function(o,f,u,s,c){var a,l,p,h,g,m,d,v,y,b,O,N,x,_,T,D,S,A=o.s==f.s?1:-1,R=o.c,U=f.c;if(!(R&&R[0]&&U&&U[0]))return new e(o.s&&f.s&&(R?!U||R[0]!=U[0]:U)?R&&0==R[0]||!U?0*A:A/0:0/0);for(v=new e(A),y=v.c=[],l=o.e-f.e,A=u+l+1,c||(c=E,l=i(o.e/I)-i(f.e/I),A=A/I|0),p=0;U[p]==(R[p]||0);p++);if(U[p]>(R[p]||0)&&l--,0>A)y.push(1),h=!0;else{for(_=R.length,D=U.length,p=0,A+=2,g=w(c/(U[0]+1)),g>1&&(U=t(U,g,c),R=t(R,g,c),D=U.length,_=R.length),x=D,b=R.slice(0,D),O=b.length;D>O;b[O++]=0);S=U.slice(),S.unshift(0),T=U[0],U[1]>=c/2&&T++;do g=0,a=n(U,b,D,O),0>a?(N=b[0],D!=O&&(N=N*c+(b[1]||0)),g=w(N/T),g>1?(g>=c&&(g=c-1),m=t(U,g,c),d=m.length,O=b.length,a=n(m,b,d,O),1==a&&(g--,r(m,d>D?S:U,d,c))):(0==g&&(a=g=1),m=U.slice()),d=m.length,O>d&&m.unshift(0),r(b,m,O,c),-1==a&&(O=b.length,a=n(U,b,D,O),1>a&&(g++,r(b,O>D?S:U,O,c))),O=b.length):0===a&&(g++,b=[0]),y[p++]=g,a&&b[0]?b[O++]=R[x]||0:(b=[R[x]],O=1);while((x++<_||null!=b[0])&&A--);h=null!=b[0],y[0]||y.shift()}if(c==E){for(p=1,A=y[0];A>=10;A/=10,p++);F(v,u+(v.e=p+l*I-1)+1,s,h)}else v.e=l,v.r=+h;return v}}(),m==function(){var t=/^(-?)0([xbo])(\w[\w.]*$)/i,n=/^([^.]+)\.$/,r=/^\.([^.]+)$/,i=/^-?(Infinity|NaN)$/,o=/^\s*\+([\w.])|^\s+|\s+$/g;return function(f,u,s,c){var a,l=s?u:u.replace(o,"$1");if(i.test(l))f.s=isNaN(l)?null:0>l?-1:1;else{if(!s&&(l=l.replace(t,function(t,e,n){return a="x"==(n=n.toLowerCase())?16:"b"==n?2:8,c&&c!=a?t:e}),c&&(a=c,l=l.replace(n,"$1").replace(r,"0.$1")),u!=l))return new e(l,a);$&&U(L,"not a"+(c?" base "+c:"")+" number",u),f.s=null}f.c=f.e=null,L=0}}(),M.absoluteValue=M.abs=function(){var t=new e(this);return t.s<0&&(t.s=1),t},M.ceil=function(){return F(new e(this),this.e+1,2)},M.comparedTo=M.cmp=function(t,n){return L=1,f(this,new e(t,n))},M.decimalPlaces=M.dp=function(){var t,e,n=this.c;if(!n)return null;if(t=((e=n.length-1)-i(this.e/I))*I,e=n[e])for(;e%10==0;e/=10,t--);return 0>t&&(t=0),t},M.dividedBy=M.div=function(t,n){return L=3,G(this,new e(t,n),B,H)},M.dividedToIntegerBy=M.divToInt=function(t,n){return L=4,G(this,new e(t,n),0,1)},M.equals=M.eq=function(t,n){return L=5,0===f(this,new e(t,n))},M.floor=function(){return F(new e(this),this.e+1,3)},M.greaterThan=M.gt=function(t,n){return L=6,f(this,new e(t,n))>0},M.greaterThanOrEqualTo=M.gte=function(t,n){return L=7,1===(n=f(this,new e(t,n)))||0===n},M.isFinite=function(){return!!this.c},M.isInteger=M.isInt=function(){return!!this.c&&i(this.e/I)>this.c.length-2},M.isNaN=function(){return!this.s},M.isNegative=M.isNeg=function(){return this.s<0},M.isZero=function(){return!!this.c&&0==this.c[0]},M.lessThan=M.lt=function(t,n){return L=8,f(this,new e(t,n))<0},M.lessThanOrEqualTo=M.lte=function(t,n){return L=9,-1===(n=f(this,new e(t,n)))||0===n},M.minus=M.sub=function(t,n){var r,o,f,u,s=this,c=s.s;if(L=10,t=new e(t,n),n=t.s,!c||!n)return new e(0/0);if(c!=n)return t.s=-n,s.plus(t);var a=s.e/I,l=t.e/I,p=s.c,h=t.c;if(!a||!l){if(!p||!h)return p?(t.s=-n,t):new e(h?s:0/0);if(!p[0]||!h[0])return h[0]?(t.s=-n,t):new e(p[0]?s:3==H?-0:0)}if(a=i(a),l=i(l),p=p.slice(),c=a-l){for((u=0>c)?(c=-c,f=p):(l=a,f=h),f.reverse(),n=c;n--;f.push(0));f.reverse()}else for(o=(u=(c=p.length)<(n=h.length))?c:n,c=n=0;o>n;n++)if(p[n]!=h[n]){u=p[n]0)for(;n--;p[r++]=0);for(n=E-1;o>c;){if(p[--o]0?(s=u,r=a):(f=-f,r=c),r.reverse();f--;r.push(0));r.reverse()}for(f=c.length,n=a.length,0>f-n&&(r=a,a=c,c=r,n=f),f=0;n;)f=(c[--n]=c[n]+a[n]+f)/E|0,c[n]%=E;return f&&(c.unshift(f),++s),R(t,c,s)},M.precision=M.sd=function(t){var e,n,r=this,i=r.c;if(null!=t&&t!==!!t&&1!==t&&0!==t&&($&&U(13,"argument"+y,t),t!=!!t&&(t=null)),!i)return null;if(n=i.length-1,e=n*I+1,n=i[n]){for(;n%10==0;n/=10,e--);for(n=i[0];n>=10;n/=10,e++);}return t&&r.e+1>e&&(e=r.e+1),e},M.round=function(t,n){var r=new e(this);return(null==t||z(t,0,D,15))&&F(r,~~t+this.e+1,null!=n&&z(n,0,8,15,b)?0|n:H),r},M.shift=function(t){var n=this;return z(t,-x,x,16,"argument")?n.times("1e"+p(t)):new e(n.c&&n.c[0]&&(-x>t||t>x)?n.s*(0>t?0:1/0):n)},M.squareRoot=M.sqrt=function(){var t,n,r,f,u,s=this,c=s.c,a=s.s,l=s.e,p=B+4,h=new e("0.5");if(1!==a||!c||!c[0])return new e(!a||0>a&&(!c||c[0])?0/0:c?s:1/0);if(a=Math.sqrt(+s),0==a||a==1/0?(n=o(c),(n.length+l)%2==0&&(n+="0"),a=Math.sqrt(n),l=i((l+1)/2)-(0>l||l%2),a==1/0?n="1e"+l:(n=a.toExponential(),n=n.slice(0,n.indexOf("e")+1)+l),r=new e(n)):r=new e(a+""),r.c[0])for(l=r.e,a=l+p,3>a&&(a=0);;)if(u=r,r=h.times(u.plus(G(s,u,p,1))),o(u.c).slice(0,a)===(n=o(r.c)).slice(0,a)){if(r.ea&&(d=b,b=O,O=d,f=a,a=h,h=f),f=a+h,d=[];f--;d.push(0));for(v=E,w=T,f=h;--f>=0;){for(r=0,g=O[f]%w,m=O[f]/w|0,s=a,u=f+s;u>f;)l=b[--s]%w,p=b[s]/w|0,c=m*l+p*g,l=g*l+c%w*w+d[u]+r,r=(l/v|0)+(c/w|0)+m*p,d[u--]=l%v;d[u]=r}return r?++o:d.shift(),R(t,d,o)},M.toDigits=function(t,n){var r=new e(this);return t=null!=t&&z(t,1,D,18,"precision")?0|t:null,n=null!=n&&z(n,0,8,18,b)?0|n:H,t?F(r,t,n):r},M.toExponential=function(t,e){return h(this,null!=t&&z(t,0,D,19)?~~t+1:null,e,19)},M.toFixed=function(t,e){return h(this,null!=t&&z(t,0,D,20)?~~t+this.e+1:null,e,20)},M.toFormat=function(t,e){var n=h(this,null!=t&&z(t,0,D,21)?~~t+this.e+1:null,e,21);if(this.c){var r,i=n.split("."),o=+Z.groupSize,f=+Z.secondaryGroupSize,u=Z.groupSeparator,s=i[0],c=i[1],a=this.s<0,l=a?s.slice(1):s,p=l.length;if(f&&(r=o,o=f,f=r,p-=r),o>0&&p>0){for(r=p%o||o,s=l.substr(0,r);p>r;r+=o)s+=u+l.substr(r,o);f>0&&(s+=u+l.slice(r)),a&&(s="-"+s)}n=c?s+Z.decimalSeparator+((f=+Z.fractionGroupSize)?c.replace(new RegExp("\\d{"+f+"}\\B","g"),"$&"+Z.fractionGroupSeparator):c):s}return n},M.toFraction=function(t){var n,r,i,f,u,s,c,a,l,p=$,h=this,g=h.c,m=new e(P),d=r=new e(P),v=c=new e(P);if(null!=t&&($=!1,s=new e(t),$=p,(!(p=s.isInt())||s.lt(P))&&($&&U(22,"max denominator "+(p?"out of range":"not an integer"),t),t=!p&&s.c&&F(s,s.e+1,1).gte(P)?s:null)),!g)return h.toString();for(l=o(g),f=m.e=l.length-h.e-1,m.c[0]=_[(u=f%I)<0?I+u:u],t=!t||s.cmp(m)>0?f>0?m:d:s,u=q,q=1/0,s=new e(l),c.c[0]=0;a=G(s,m,0,1),i=r.plus(a.times(v)),1!=i.cmp(t);)r=v,v=i,d=c.plus(a.times(i=d)),c=i,m=s.minus(a.times(i=m)),s=i;return i=G(t.minus(r),v,0,1),c=c.plus(i.times(d)),r=r.plus(i.times(v)),c.s=d.s=h.s,f*=2,n=G(d,v,f,H).minus(h).abs().cmp(G(c,r,f,H).minus(h).abs())<1?[d.toString(),v.toString()]:[c.toString(),r.toString()],q=u,n},M.toNumber=function(){var t=this;return+t||(t.s?0*t.s:0/0)},M.toPower=M.pow=function(t){var n,r,i=w(0>t?-t:+t),o=this;if(!z(t,-x,x,23,"exponent")&&(!isFinite(t)||i>x&&(t/=0)||parseFloat(t)!=t&&!(t=0/0)))return new e(Math.pow(+o,t));for(n=Y?v(Y/I+2):0,r=new e(P);;){if(i%2){if(r=r.times(o),!r.c)break;n&&r.c.length>n&&(r.c.length=n)}if(i=w(i/2),!i)break;o=o.times(o),n&&o.c&&o.c.length>n&&(o.c.length=n)}return 0>t&&(r=P.div(r)),n?F(r,Y,H):r},M.toPrecision=function(t,e){return h(this,null!=t&&z(t,1,D,24,"precision")?0|t:null,e,24)},M.toString=function(t){var e,r=this,i=r.s,f=r.e;return null===f?i?(e="Infinity",0>i&&(e="-"+e)):e="NaN":(e=o(r.c),e=null!=t&&z(t,2,64,25,"base")?n(l(e,f),0|t,10,i):C>=f||f>=j?a(e,f):l(e,f),0>i&&r.c[0]&&(e="-"+e)),e},M.truncated=M.trunc=function(){return F(new e(this),this.e+1,1)},M.valueOf=M.toJSON=function(){return this.toString()},null!=t&&e.config(t),e}function i(t){var e=0|t;return t>0||t===e?e:e-1}function o(t){for(var e,n,r=1,i=t.length,o=t[0]+"";i>r;){for(e=t[r++]+"",n=I-e.length;n--;e="0"+e);o+=e}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function f(t,e){var n,r,i=t.c,o=e.c,f=t.s,u=e.s,s=t.e,c=e.e;if(!f||!u)return null;if(n=i&&!i[0],r=o&&!o[0],n||r)return n?r?0:-u:f;if(f!=u)return f;if(n=0>f,r=s==c,!i||!o)return r?0:!i^n?1:-1;if(!r)return s>c^n?1:-1;for(u=(s=i.length)<(c=o.length)?s:c,f=0;u>f;f++)if(i[f]!=o[f])return i[f]>o[f]^n?1:-1;return s==c?0:s>c^n?1:-1}function u(t,e,n){return(t=p(t))>=e&&n>=t}function s(t){return"[object Array]"==Object.prototype.toString.call(t)}function c(t,e,n){for(var r,i,o=[0],f=0,u=t.length;u>f;){for(i=o.length;i--;o[i]*=e);for(o[r=0]+=N.indexOf(t.charAt(f++));rn-1&&(null==o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}function a(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(0>e?"e":"e+")+e}function l(t,e){var n,r;if(0>e){for(r="0.";++e;r+="0");t=r+t}else if(n=t.length,++e>n){for(r="0",e-=n;--e;r+="0");t+=r}else n>e&&(t=t.slice(0,e)+"."+t.slice(e));return t}function p(t){return t=parseFloat(t),0>t?v(t):w(t)}var h,g,m,d=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,v=Math.ceil,w=Math.floor,y=" not a boolean or binary digit",b="rounding mode",O="number type has more than 15 significant digits",N="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_",E=1e14,I=14,x=9007199254740991,_=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],T=1e7,D=1e9;if(h=r(),"function"==typeof define&&define.amd)define(function(){return h});else if("undefined"!=typeof e&&e.exports){if(e.exports=h,!g)try{g=t("crypto")}catch(S){}}else n.BigNumber=h}(this)},{crypto:1}],natspec:[function(t,e){var n=t("./node_modules/ethereum.js/lib/abi.js"),r=function(){var t=function(t,e){Object.keys(t).forEach(function(n){e[n]=t[n]})},e=function(t){return Object.keys(t).reduce(function(t,e){return t+"var "+e+" = context['"+e+"'];\n"},"")},r=function(t,e){return t.filter(function(t){return t.name===e})[0]},i=function(t,e){var r=n.formatOutput(t.inputs,"0x"+e.params[0].data.slice(10));return t.inputs.reduce(function(t,e,n){return t[e.name]=r[n],t},{})},o=function(t,e){var n,r="",i=/\` + "`" + `(?:\\.|[^` + "`" + `\\])*\` + "`" + `/gim,o=0;try{for(;null!==(n=i.exec(t));){var f=i.lastIndex-n[0].length,u=n[0].slice(1,n[0].length-1);r+=t.slice(o,f);var s=e(u);r+=s,o=i.lastIndex}r+=t.slice(o)}catch(c){throw new Error("Natspec evaluation failed, wrong input params")}return r},f=function(n,f){var u={};if(f)try{var s=r(f.abi,f.method),c=i(s,f.transaction);t(c,u)}catch(a){throw new Error("Natspec evaluation failed, method does not exist")}var l=e(u),p=o(n,function(t){var e=new Function("context",l+"return "+t+";");return e(u).toString()});return p},u=function(t,e){try{return f(t,e)}catch(n){return n.message}};return{evaluateExpression:f,evaluateExpressionSafe:u}}();e.exports=r},{"./node_modules/ethereum.js/lib/abi.js":3}]},{},[]); diff --git a/common/natspec/natspec_test.go b/common/natspec/natspec_test.go index 05df9e750..654e3a62d 100644 --- a/common/natspec/natspec_test.go +++ b/common/natspec/natspec_test.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package natspec import ( diff --git a/common/number/int.go b/common/number/int.go index 6cc5e68b4..aa54227d7 100644 --- a/common/number/int.go +++ b/common/number/int.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package number import ( diff --git a/common/number/uint_test.go b/common/number/uint_test.go index 262d584ed..ea1d5ce1f 100644 --- a/common/number/uint_test.go +++ b/common/number/uint_test.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package number import ( diff --git a/common/package.go b/common/package.go index 7f38d8e4d..bb2d41c1e 100644 --- a/common/package.go +++ b/common/package.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package common import ( diff --git a/common/path.go b/common/path.go index 6e3259656..def2c76f4 100644 --- a/common/path.go +++ b/common/path.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package common import ( diff --git a/common/path_test.go b/common/path_test.go index 4b90c543b..410937c53 100644 --- a/common/path_test.go +++ b/common/path_test.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package common import ( diff --git a/common/registrar/contracts.go b/common/registrar/contracts.go new file mode 100644 index 000000000..ab8fc543c --- /dev/null +++ b/common/registrar/contracts.go @@ -0,0 +1,163 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + +package registrar + +const ( // built-in contracts address source code and evm code + UrlHintCode = "0x60c180600c6000396000f30060003560e060020a90048063300a3bbf14601557005b6024600435602435604435602a565b60006000f35b6000600084815260200190815260200160002054600160a060020a0316600014806078575033600160a060020a03166000600085815260200190815260200160002054600160a060020a0316145b607f5760bc565b336000600085815260200190815260200160002081905550806001600085815260200190815260200160002083610100811060b657005b01819055505b50505056" + + UrlHintSrc = ` +contract URLhint { + function register(uint256 _hash, uint8 idx, uint256 _url) { + if (owner[_hash] == 0 || owner[_hash] == msg.sender) { + owner[_hash] = msg.sender; + url[_hash][idx] = _url; + } + } + mapping (uint256 => address) owner; + (uint256 => uint256[256]) url; +} + ` + + HashRegCode = "0x609880600c6000396000f30060003560e060020a9004806331e12c2014601f578063d66d6c1014602b57005b6025603d565b60006000f35b6037600435602435605d565b60006000f35b600054600160a060020a0316600014605357605b565b336000819055505b565b600054600160a060020a031633600160a060020a031614607b576094565b8060016000848152602001908152602001600020819055505b505056" + + HashRegSrc = ` +contract HashReg { + function setowner() { + if (owner == 0) { + owner = msg.sender; + } + } + function register(uint256 _key, uint256 _content) { + if (msg.sender == owner) { + content[_key] = _content; + } + } + address owner; + mapping (uint256 => uint256) content; +} +` + + GlobalRegistrarSrc = ` +//sol + +import "owned"; + +contract NameRegister { + function addr(bytes32 _name) constant returns (address o_owner) {} + function name(address _owner) constant returns (bytes32 o_name) {} +} + +contract Registrar is NameRegister { + event Changed(bytes32 indexed name); + event PrimaryChanged(bytes32 indexed name, address indexed addr); + + function owner(bytes32 _name) constant returns (address o_owner) {} + function addr(bytes32 _name) constant returns (address o_address) {} + function subRegistrar(bytes32 _name) constant returns (address o_subRegistrar) {} + function content(bytes32 _name) constant returns (bytes32 o_content) {} + + function name(address _owner) constant returns (bytes32 o_name) {} +} + +contract GlobalRegistrar is Registrar { + struct Record { + address owner; + address primary; + address subRegistrar; + bytes32 content; + uint value; + uint renewalDate; + } + + function Registrar() { + // TODO: Populate with hall-of-fame. + } + + function reserve(bytes32 _name) { + // Don't allow the same name to be overwritten. + // TODO: bidding mechanism + if (m_toRecord[_name].owner == 0) { + m_toRecord[_name].owner = msg.sender; + Changed(_name); + } + } + + /* + TODO + > 12 chars: free + <= 12 chars: auction: + 1. new names are auctioned + - 7 day period to collect all bid bytes32es + deposits + - 1 day period to collect all bids to be considered (validity requires associated deposit to be >10% of bid) + - all valid bids are burnt except highest - difference between that and second highest is returned to winner + 2. remember when last auctioned/renewed + 3. anyone can force renewal process: + - 7 day period to collect all bid bytes32es + deposits + - 1 day period to collect all bids & full amounts - bids only uncovered if sufficiently high. + - 1% of winner burnt; original owner paid rest. + */ + + modifier onlyrecordowner(bytes32 _name) { if (m_toRecord[_name].owner == msg.sender) _ } + + function transfer(bytes32 _name, address _newOwner) onlyrecordowner(_name) { + m_toRecord[_name].owner = _newOwner; + Changed(_name); + } + + function disown(bytes32 _name) onlyrecordowner(_name) { + if (m_toName[m_toRecord[_name].primary] == _name) + { + PrimaryChanged(_name, m_toRecord[_name].primary); + m_toName[m_toRecord[_name].primary] = ""; + } + delete m_toRecord[_name]; + Changed(_name); + } + + function setAddress(bytes32 _name, address _a, bool _primary) onlyrecordowner(_name) { + m_toRecord[_name].primary = _a; + if (_primary) + { + PrimaryChanged(_name, _a); + m_toName[_a] = _name; + } + Changed(_name); + } + function setSubRegistrar(bytes32 _name, address _registrar) onlyrecordowner(_name) { + m_toRecord[_name].subRegistrar = _registrar; + Changed(_name); + } + function setContent(bytes32 _name, bytes32 _content) onlyrecordowner(_name) { + m_toRecord[_name].content = _content; + Changed(_name); + } + + function owner(bytes32 _name) constant returns (address) { return m_toRecord[_name].owner; } + function addr(bytes32 _name) constant returns (address) { return m_toRecord[_name].primary; } +// function subRegistrar(bytes32 _name) constant returns (address) { return m_toRecord[_name].subRegistrar; } // TODO: bring in on next iteration. + function register(bytes32 _name) constant returns (address) { return m_toRecord[_name].subRegistrar; } // only possible for now + function content(bytes32 _name) constant returns (bytes32) { return m_toRecord[_name].content; } + function name(address _owner) constant returns (bytes32 o_name) { return m_toName[_owner]; } + + mapping (address => bytes32) m_toName; + mapping (bytes32 => Record) m_toRecord; +} +` + GlobalRegistrarAbi = `[{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"name","outputs":[{"name":"o_name","type":"bytes32"}],"type":"function"},{"constant":true,"inputs":[{"name":"_name","type":"bytes32"}],"name":"owner","outputs":[{"name":"","type":"address"}],"type":"function"},{"constant":true,"inputs":[{"name":"_name","type":"bytes32"}],"name":"content","outputs":[{"name":"","type":"bytes32"}],"type":"function"},{"constant":true,"inputs":[{"name":"_name","type":"bytes32"}],"name":"addr","outputs":[{"name":"","type":"address"}],"type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"bytes32"}],"name":"reserve","outputs":[],"type":"function"},{"constant":true,"inputs":[{"name":"_name","type":"bytes32"}],"name":"subRegistrar","outputs":[{"name":"o_subRegistrar","type":"address"}],"type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"bytes32"},{"name":"_newOwner","type":"address"}],"name":"transfer","outputs":[],"type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"bytes32"},{"name":"_registrar","type":"address"}],"name":"setSubRegistrar","outputs":[],"type":"function"},{"constant":false,"inputs":[],"name":"Registrar","outputs":[],"type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"bytes32"},{"name":"_a","type":"address"},{"name":"_primary","type":"bool"}],"name":"setAddress","outputs":[],"type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"bytes32"},{"name":"_content","type":"bytes32"}],"name":"setContent","outputs":[],"type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"bytes32"}],"name":"disown","outputs":[],"type":"function"},{"constant":true,"inputs":[{"name":"_name","type":"bytes32"}],"name":"register","outputs":[{"name":"","type":"address"}],"type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"name","type":"bytes32"}],"name":"Changed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"name","type":"bytes32"},{"indexed":true,"name":"addr","type":"address"}],"name":"PrimaryChanged","type":"event"}]` + + GlobalRegistrarCode = `0x610b408061000e6000396000f3006000357c01000000000000000000000000000000000000000000000000000000009004806301984892146100b357806302571be3146100ce5780632dff6941146100ff5780633b3b57de1461011a578063432ced041461014b5780635a3a05bd1461016257806379ce9fac1461019357806389a69c0e146101b0578063b9f37c86146101cd578063be99a980146101de578063c3d014d614610201578063d93e75731461021e578063e1fa8e841461023557005b6100c4600480359060200150610b02565b8060005260206000f35b6100df6004803590602001506109f3565b8073ffffffffffffffffffffffffffffffffffffffff1660005260206000f35b610110600480359060200150610ad4565b8060005260206000f35b61012b600480359060200150610a3e565b8073ffffffffffffffffffffffffffffffffffffffff1660005260206000f35b61015c600480359060200150610271565b60006000f35b610173600480359060200150610266565b8073ffffffffffffffffffffffffffffffffffffffff1660005260206000f35b6101aa600480359060200180359060200150610341565b60006000f35b6101c7600480359060200180359060200150610844565b60006000f35b6101d860045061026e565b60006000f35b6101fb6004803590602001803590602001803590602001506106de565b60006000f35b61021860048035906020018035906020015061092c565b60006000f35b61022f600480359060200150610429565b60006000f35b610246600480359060200150610a89565b8073ffffffffffffffffffffffffffffffffffffffff1660005260206000f35b60005b919050565b5b565b60006001600050600083815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561033d57336001600050600083815260200190815260200160002060005060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff02191690830217905550807fa6697e974e6a320f454390be03f74955e8978f1a6971ea6730542e37b66179bc6040604090036040a25b5b50565b813373ffffffffffffffffffffffffffffffffffffffff166001600050600083815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561042357816001600050600085815260200190815260200160002060005060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff02191690830217905550827fa6697e974e6a320f454390be03f74955e8978f1a6971ea6730542e37b66179bc6040604090036040a25b505b5050565b803373ffffffffffffffffffffffffffffffffffffffff166001600050600083815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156106d95781600060005060006001600050600086815260200190815260200160002060005060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000505414156105fd576001600050600083815260200190815260200160002060005060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16827ff63780e752c6a54a94fc52715dbc5518a3b4c3c2833d301a204226548a2a85456040604090036040a36000600060005060006001600050600086815260200190815260200160002060005060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055505b6001600050600083815260200190815260200160002060006000820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556002820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556003820160005060009055600482016000506000905560058201600050600090555050817fa6697e974e6a320f454390be03f74955e8978f1a6971ea6730542e37b66179bc6040604090036040a25b505b50565b823373ffffffffffffffffffffffffffffffffffffffff166001600050600083815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561083d57826001600050600086815260200190815260200160002060005060010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055508115610811578273ffffffffffffffffffffffffffffffffffffffff16847ff63780e752c6a54a94fc52715dbc5518a3b4c3c2833d301a204226548a2a85456040604090036040a383600060005060008573ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055505b837fa6697e974e6a320f454390be03f74955e8978f1a6971ea6730542e37b66179bc6040604090036040a25b505b505050565b813373ffffffffffffffffffffffffffffffffffffffff166001600050600083815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561092657816001600050600085815260200190815260200160002060005060020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff02191690830217905550827fa6697e974e6a320f454390be03f74955e8978f1a6971ea6730542e37b66179bc6040604090036040a25b505b5050565b813373ffffffffffffffffffffffffffffffffffffffff166001600050600083815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156109ed57816001600050600085815260200190815260200160002060005060030160005081905550827fa6697e974e6a320f454390be03f74955e8978f1a6971ea6730542e37b66179bc6040604090036040a25b505b5050565b60006001600050600083815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050610a39565b919050565b60006001600050600083815260200190815260200160002060005060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050610a84565b919050565b60006001600050600083815260200190815260200160002060005060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050610acf565b919050565b600060016000506000838152602001908152602001600020600050600301600050549050610afd565b919050565b6000600060005060008373ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050549050610b3b565b91905056` +) diff --git a/common/registrar/ethreg/ethreg.go b/common/registrar/ethreg/ethreg.go new file mode 100644 index 000000000..e7df1e7f6 --- /dev/null +++ b/common/registrar/ethreg/ethreg.go @@ -0,0 +1,48 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + +package ethreg + +import ( + "math/big" + + "github.com/ethereum/go-ethereum/common/registrar" + "github.com/ethereum/go-ethereum/xeth" +) + +// implements a versioned Registrar on an archiving full node +type EthReg struct { + backend *xeth.XEth + registry *registrar.Registrar +} + +func New(xe *xeth.XEth) (self *EthReg) { + self = &EthReg{backend: xe} + self.registry = registrar.New(xe) + return +} + +func (self *EthReg) Registry() *registrar.Registrar { + return self.registry +} + +func (self *EthReg) Resolver(n *big.Int) *registrar.Registrar { + xe := self.backend + if n != nil { + xe = self.backend.AtStateNum(n.Int64()) + } + return registrar.New(xe) +} diff --git a/common/registrar/registrar.go b/common/registrar/registrar.go new file mode 100644 index 000000000..64fa97f6e --- /dev/null +++ b/common/registrar/registrar.go @@ -0,0 +1,408 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + +package registrar + +import ( + "encoding/binary" + "fmt" + "math/big" + "regexp" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/logger" + "github.com/ethereum/go-ethereum/logger/glog" +) + +/* +Registrar implements the Ethereum name registrar services mapping +- arbitrary strings to ethereum addresses +- hashes to hashes +- hashes to arbitrary strings +(likely will provide lookup service for all three) + +The Registrar is used by +* the roundtripper transport implementation of +url schemes to resolve domain names and services that register these names +* contract info retrieval (NatSpec). + +The Registrar uses 3 contracts on the blockchain: +* GlobalRegistrar: Name (string) -> Address (Owner) +* HashReg : Key Hash (hash of domain name or contract code) -> Content Hash +* UrlHint : Content Hash -> Url Hint + +These contracts are (currently) not included in the genesis block. +Each Set needs to be called once on each blockchain/network once. + +Contract addresses need to be set (HashReg and UrlHint retrieved from the global +registrar the first time any Registrar method is called in a client session + +So the caller needs to make sure the relevant environment initialised the desired +contracts +*/ +var ( + UrlHintAddr = "0x0" + HashRegAddr = "0x0" + GlobalRegistrarAddr = "0x0" + // GlobalRegistrarAddr = "0xc6d9d2cd449a754c494264e1809c50e34d64562b" + + zero = regexp.MustCompile("^(0x)?0*$") +) + +const ( + trueHex = "0000000000000000000000000000000000000000000000000000000000000001" + falseHex = "0000000000000000000000000000000000000000000000000000000000000000" +) + +func abiSignature(s string) string { + return common.ToHex(crypto.Sha3([]byte(s))[:4]) +} + +var ( + HashRegName = "HashReg" + UrlHintName = "UrlHint" + + registerContentHashAbi = abiSignature("register(uint256,uint256)") + registerUrlAbi = abiSignature("register(uint256,uint8,uint256)") + setOwnerAbi = abiSignature("setowner()") + reserveAbi = abiSignature("reserve(bytes32)") + resolveAbi = abiSignature("addr(bytes32)") + registerAbi = abiSignature("setAddress(bytes32,address,bool)") + addressAbiPrefix = falseHex[:24] +) + +// Registrar's backend is defined as an interface (implemented by xeth, but could be remote) +type Backend interface { + StorageAt(string, string) string + Transact(fromStr, toStr, nonceStr, valueStr, gasStr, gasPriceStr, codeStr string) (string, error) + Call(fromStr, toStr, valueStr, gasStr, gasPriceStr, codeStr string) (string, string, error) +} + +// TODO Registrar should also just implement The Resolver and Registry interfaces +// Simplify for now. +type VersionedRegistrar interface { + Resolver(*big.Int) *Registrar + Registry() *Registrar +} + +type Registrar struct { + backend Backend +} + +func New(b Backend) (res *Registrar) { + res = &Registrar{b} + return +} + +func (self *Registrar) SetGlobalRegistrar(namereg string, addr common.Address) (txhash string, err error) { + if namereg != "" { + GlobalRegistrarAddr = namereg + return + } + if GlobalRegistrarAddr == "0x0" || GlobalRegistrarAddr == "0x" { + if (addr == common.Address{}) { + err = fmt.Errorf("GlobalRegistrar address not found and sender for creation not given") + return + } else { + txhash, err = self.backend.Transact(addr.Hex(), "", "", "", "800000", "", GlobalRegistrarCode) + if err != nil { + err = fmt.Errorf("GlobalRegistrar address not found and sender for creation failed: %v", err) + return + } + } + } + return +} + +func (self *Registrar) SetHashReg(hashreg string, addr common.Address) (txhash string, err error) { + if hashreg != "" { + HashRegAddr = hashreg + } else { + if !zero.MatchString(HashRegAddr) { + return + } + nameHex, extra := encodeName(HashRegName, 2) + hashRegAbi := resolveAbi + nameHex + extra + glog.V(logger.Detail).Infof("\ncall HashRegAddr %v with %v\n", GlobalRegistrarAddr, hashRegAbi) + var res string + res, _, err = self.backend.Call("", GlobalRegistrarAddr, "", "", "", hashRegAbi) + if len(res) >= 40 { + HashRegAddr = "0x" + res[len(res)-40:len(res)] + } + if err != nil || zero.MatchString(HashRegAddr) { + if (addr == common.Address{}) { + err = fmt.Errorf("HashReg address not found and sender for creation not given") + return + } + + txhash, err = self.backend.Transact(addr.Hex(), "", "", "", "", "", HashRegCode) + if err != nil { + err = fmt.Errorf("HashReg address not found and sender for creation failed: %v", err) + } + glog.V(logger.Detail).Infof("created HashRegAddr @ txhash %v\n", txhash) + } else { + glog.V(logger.Detail).Infof("HashRegAddr found at @ %v\n", HashRegAddr) + return + } + } + + return +} + +func (self *Registrar) SetUrlHint(urlhint string, addr common.Address) (txhash string, err error) { + if urlhint != "" { + UrlHintAddr = urlhint + } else { + if !zero.MatchString(UrlHintAddr) { + return + } + nameHex, extra := encodeName(UrlHintName, 2) + urlHintAbi := resolveAbi + nameHex + extra + glog.V(logger.Detail).Infof("UrlHint address query data: %s to %s", urlHintAbi, GlobalRegistrarAddr) + var res string + res, _, err = self.backend.Call("", GlobalRegistrarAddr, "", "", "", urlHintAbi) + if len(res) >= 40 { + UrlHintAddr = "0x" + res[len(res)-40:len(res)] + } + if err != nil || zero.MatchString(UrlHintAddr) { + if (addr == common.Address{}) { + err = fmt.Errorf("UrlHint address not found and sender for creation not given") + return + } + txhash, err = self.backend.Transact(addr.Hex(), "", "", "", "210000", "", UrlHintCode) + if err != nil { + err = fmt.Errorf("UrlHint address not found and sender for creation failed: %v", err) + } + glog.V(logger.Detail).Infof("created UrlHint @ txhash %v\n", txhash) + } else { + glog.V(logger.Detail).Infof("UrlHint found @ %v\n", HashRegAddr) + return + } + } + + return +} + +// ReserveName(from, name) reserves name for the sender address in the globalRegistrar +// the tx needs to be mined to take effect +func (self *Registrar) ReserveName(address common.Address, name string) (txh string, err error) { + nameHex, extra := encodeName(name, 2) + abi := reserveAbi + nameHex + extra + glog.V(logger.Detail).Infof("Reserve data: %s", abi) + return self.backend.Transact( + address.Hex(), + GlobalRegistrarAddr, + "", "", "", "", + abi, + ) +} + +// SetAddressToName(from, name, addr) will set the Address to address for name +// in the globalRegistrar using from as the sender of the transaction +// the tx needs to be mined to take effect +func (self *Registrar) SetAddressToName(from common.Address, name string, address common.Address) (txh string, err error) { + nameHex, extra := encodeName(name, 6) + addrHex := encodeAddress(address) + + abi := registerAbi + nameHex + addrHex + trueHex + extra + glog.V(logger.Detail).Infof("SetAddressToName data: %s to %s ", abi, GlobalRegistrarAddr) + + return self.backend.Transact( + from.Hex(), + GlobalRegistrarAddr, + "", "", "", "", + abi, + ) +} + +// NameToAddr(from, name) queries the registrar for the address on name +func (self *Registrar) NameToAddr(from common.Address, name string) (address common.Address, err error) { + nameHex, extra := encodeName(name, 2) + abi := resolveAbi + nameHex + extra + glog.V(logger.Detail).Infof("NameToAddr data: %s", abi) + res, _, err := self.backend.Call( + from.Hex(), + GlobalRegistrarAddr, + "", "", "", + abi, + ) + if err != nil { + return + } + address = common.HexToAddress(res) + return +} + +// called as first step in the registration process on HashReg +func (self *Registrar) SetOwner(address common.Address) (txh string, err error) { + return self.backend.Transact( + address.Hex(), + HashRegAddr, + "", "", "", "", + setOwnerAbi, + ) +} + +// registers some content hash to a key/code hash +// e.g., the contract Info combined Json Doc's ContentHash +// to CodeHash of a contract or hash of a domain +func (self *Registrar) SetHashToHash(address common.Address, codehash, dochash common.Hash) (txh string, err error) { + _, err = self.SetOwner(address) + if err != nil { + return + } + codehex := common.Bytes2Hex(codehash[:]) + dochex := common.Bytes2Hex(dochash[:]) + + data := registerContentHashAbi + codehex + dochex + glog.V(logger.Detail).Infof("SetHashToHash data: %s sent to %v\n", data, HashRegAddr) + return self.backend.Transact( + address.Hex(), + HashRegAddr, + "", "", "", "", + data, + ) +} + +// SetUrlToHash(from, hash, url) registers a url to a content hash so that the content can be fetched +// address is used as sender for the transaction and will be the owner of a new +// registry entry on first time use +// FIXME: silently doing nothing if sender is not the owner +// note that with content addressed storage, this step is no longer necessary +func (self *Registrar) SetUrlToHash(address common.Address, hash common.Hash, url string) (txh string, err error) { + hashHex := common.Bytes2Hex(hash[:]) + var urlHex string + urlb := []byte(url) + var cnt byte + n := len(urlb) + + for n > 0 { + if n > 32 { + n = 32 + } + urlHex = common.Bytes2Hex(urlb[:n]) + urlb = urlb[n:] + n = len(urlb) + bcnt := make([]byte, 32) + bcnt[31] = cnt + data := registerUrlAbi + + hashHex + + common.Bytes2Hex(bcnt) + + common.Bytes2Hex(common.Hex2BytesFixed(urlHex, 32)) + txh, err = self.backend.Transact( + address.Hex(), + UrlHintAddr, + "", "", "", "", + data, + ) + if err != nil { + return + } + cnt++ + } + return +} + +// HashToHash(key) resolves contenthash for key (a hash) using HashReg +// resolution is costless non-transactional +// implemented as direct retrieval from db +func (self *Registrar) HashToHash(khash common.Hash) (chash common.Hash, err error) { + // look up in hashReg + at := HashRegAddr[2:] + key := storageAddress(storageMapping(storageIdx2Addr(1), khash[:])) + hash := self.backend.StorageAt(at, key) + + if hash == "0x0" || len(hash) < 3 || (hash == common.Hash{}.Hex()) { + err = fmt.Errorf("content hash not found for '%v'", khash.Hex()) + return + } + copy(chash[:], common.Hex2BytesFixed(hash[2:], 32)) + return +} + +// HashToUrl(contenthash) resolves the url for contenthash using UrlHint +// resolution is costless non-transactional +// implemented as direct retrieval from db +// if we use content addressed storage, this step is no longer necessary +func (self *Registrar) HashToUrl(chash common.Hash) (uri string, err error) { + // look up in URL reg + var str string = " " + var idx uint32 + for len(str) > 0 { + mapaddr := storageMapping(storageIdx2Addr(1), chash[:]) + key := storageAddress(storageFixedArray(mapaddr, storageIdx2Addr(idx))) + hex := self.backend.StorageAt(UrlHintAddr[2:], key) + str = string(common.Hex2Bytes(hex[2:])) + l := 0 + for (l < len(str)) && (str[l] == 0) { + l++ + } + + str = str[l:] + uri = uri + str + idx++ + } + + if len(uri) == 0 { + err = fmt.Errorf("GetURLhint: URL hint not found for '%v'", chash.Hex()) + } + return +} + +func storageIdx2Addr(varidx uint32) []byte { + data := make([]byte, 32) + binary.BigEndian.PutUint32(data[28:32], varidx) + return data +} + +func storageMapping(addr, key []byte) []byte { + data := make([]byte, 64) + copy(data[0:32], key[0:32]) + copy(data[32:64], addr[0:32]) + sha := crypto.Sha3(data) + return sha +} + +func storageFixedArray(addr, idx []byte) []byte { + var carry byte + for i := 31; i >= 0; i-- { + var b byte = addr[i] + idx[i] + carry + if b < addr[i] { + carry = 1 + } else { + carry = 0 + } + addr[i] = b + } + return addr +} + +func storageAddress(addr []byte) string { + return common.ToHex(addr) +} + +func encodeAddress(address common.Address) string { + return addressAbiPrefix + address.Hex()[2:] +} + +func encodeName(name string, index uint8) (string, string) { + extra := common.Bytes2Hex([]byte(name)) + if len(name) > 32 { + return fmt.Sprintf("%064x", index), extra + } + return extra + falseHex[len(extra):], "" +} diff --git a/common/registrar/registrar_test.go b/common/registrar/registrar_test.go new file mode 100644 index 000000000..4b9a77a68 --- /dev/null +++ b/common/registrar/registrar_test.go @@ -0,0 +1,112 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + +package registrar + +import ( + "testing" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto" +) + +type testBackend struct { + // contracts mock + contracts map[string](map[string]string) +} + +var ( + text = "test" + codehash = common.StringToHash("1234") + hash = common.BytesToHash(crypto.Sha3([]byte(text))) + url = "bzz://bzzhash/my/path/contr.act" +) + +func NewTestBackend() *testBackend { + HashRegAddr = common.BigToAddress(common.Big0).Hex() //[2:] + UrlHintAddr = common.BigToAddress(common.Big1).Hex() //[2:] + self := &testBackend{} + self.contracts = make(map[string](map[string]string)) + + self.contracts[HashRegAddr[2:]] = make(map[string]string) + key := storageAddress(storageMapping(storageIdx2Addr(1), codehash[:])) + self.contracts[HashRegAddr[2:]][key] = hash.Hex() + + self.contracts[UrlHintAddr[2:]] = make(map[string]string) + mapaddr := storageMapping(storageIdx2Addr(1), hash[:]) + + key = storageAddress(storageFixedArray(mapaddr, storageIdx2Addr(0))) + self.contracts[UrlHintAddr[2:]][key] = common.ToHex([]byte(url)) + key = storageAddress(storageFixedArray(mapaddr, storageIdx2Addr(1))) + self.contracts[UrlHintAddr[2:]][key] = "0x0" + return self +} + +func (self *testBackend) StorageAt(ca, sa string) (res string) { + c := self.contracts[ca] + if c == nil { + return + } + res = c[sa] + return +} + +func (self *testBackend) Transact(fromStr, toStr, nonceStr, valueStr, gasStr, gasPriceStr, codeStr string) (string, error) { + return "", nil +} + +func (self *testBackend) Call(fromStr, toStr, valueStr, gasStr, gasPriceStr, codeStr string) (string, string, error) { + return "", "", nil +} + +func TestSetGlobalRegistrar(t *testing.T) { + b := NewTestBackend() + res := New(b) + _, err := res.SetGlobalRegistrar("addresshex", common.BigToAddress(common.Big1)) + if err != nil { + t.Errorf("unexpected error: %v'", err) + } +} + +func TestHashToHash(t *testing.T) { + b := NewTestBackend() + res := New(b) + // res.SetHashReg() + + got, err := res.HashToHash(codehash) + if err != nil { + t.Errorf("expected no error, got %v", err) + } else { + if got != hash { + t.Errorf("incorrect result, expected '%v', got '%v'", hash.Hex(), got.Hex()) + } + } +} + +func TestHashToUrl(t *testing.T) { + b := NewTestBackend() + res := New(b) + // res.SetUrlHint() + + got, err := res.HashToUrl(hash) + if err != nil { + t.Errorf("expected error, got %v", err) + } else { + if got != url { + t.Errorf("incorrect result, expected '%v', got '%s'", url, got) + } + } +} diff --git a/common/resolver/contracts.go b/common/resolver/contracts.go deleted file mode 100644 index 4aad95e43..000000000 --- a/common/resolver/contracts.go +++ /dev/null @@ -1,36 +0,0 @@ -package resolver - -const ( // built-in contracts address and code - ContractCodeURLhint = "0x60c180600c6000396000f30060003560e060020a90048063300a3bbf14601557005b6024600435602435604435602a565b60006000f35b6000600084815260200190815260200160002054600160a060020a0316600014806078575033600160a060020a03166000600085815260200190815260200160002054600160a060020a0316145b607f5760bc565b336000600085815260200190815260200160002081905550806001600085815260200190815260200160002083610100811060b657005b01819055505b50505056" - /* - contract URLhint { - function register(uint256 _hash, uint8 idx, uint256 _url) { - if (owner[_hash] == 0 || owner[_hash] == msg.sender) { - owner[_hash] = msg.sender; - url[_hash][idx] = _url; - } - } - mapping (uint256 => address) owner; - mapping (uint256 => uint256[256]) url; - } - */ - - ContractCodeHashReg = "0x609880600c6000396000f30060003560e060020a9004806331e12c2014601f578063d66d6c1014602b57005b6025603d565b60006000f35b6037600435602435605d565b60006000f35b600054600160a060020a0316600014605357605b565b336000819055505b565b600054600160a060020a031633600160a060020a031614607b576094565b8060016000848152602001908152602001600020819055505b505056" - /* - contract HashReg { - function setowner() { - if (owner == 0) { - owner = msg.sender; - } - } - function register(uint256 _key, uint256 _content) { - if (msg.sender == owner) { - content[_key] = _content; - } - } - address owner; - mapping (uint256 => uint256) content; - } - */ - -) diff --git a/common/resolver/resolver.go b/common/resolver/resolver.go deleted file mode 100644 index 9016547e1..000000000 --- a/common/resolver/resolver.go +++ /dev/null @@ -1,232 +0,0 @@ -package resolver - -import ( - "encoding/binary" - "fmt" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" -) - -/* -Resolver implements the Ethereum DNS mapping -HashReg : Key Hash (hash of domain name or contract code) -> Content Hash -UrlHint : Content Hash -> Url Hint - -The resolver is meant to be called by the roundtripper transport implementation -of a url scheme -*/ - -// // contract addresses will be hardcoded after they're created -var UrlHintContractAddress, HashRegContractAddress string - -const ( - txValue = "0" - txGas = "100000" - txGasPrice = "1000000000000" -) - -func abi(s string) string { - return common.ToHex(crypto.Sha3([]byte(s))[:4]) -} - -var ( - registerContentHashAbi = abi("register(uint256,uint256)") - registerUrlAbi = abi("register(uint256,uint8,uint256)") - setOwnerAbi = abi("setowner()") -) - -type Backend interface { - StorageAt(string, string) string - Transact(fromStr, toStr, nonceStr, valueStr, gasStr, gasPriceStr, codeStr string) (string, error) -} - -type Resolver struct { - backend Backend -} - -func New(eth Backend) *Resolver { - return &Resolver{eth} -} - -// for testing and play temporarily -// ideally the HashReg and UrlHint contracts should be in the genesis block -// if we got build-in support for natspec/contract info -// there should be only one of these officially endorsed -// addresses as constants -// TODO: could get around this with namereg, check -func (self *Resolver) CreateContracts(addr common.Address) (err error) { - HashRegContractAddress, err = self.backend.Transact(addr.Hex(), "", "", txValue, txGas, txGasPrice, ContractCodeHashReg) - if err != nil { - return - } - UrlHintContractAddress, err = self.backend.Transact(addr.Hex(), "", "", txValue, txGas, txGasPrice, ContractCodeURLhint) - glog.V(logger.Detail).Infof("HashReg @ %v\nUrlHint @ %v\n", HashRegContractAddress, UrlHintContractAddress) - return -} - -// called as first step in the registration process on HashReg -func (self *Resolver) SetOwner(address common.Address) (txh string, err error) { - return self.backend.Transact( - address.Hex(), - HashRegContractAddress, - "", txValue, txGas, txGasPrice, - setOwnerAbi, - ) -} - -// registers some content hash to a key/code hash -// e.g., the contract Info combined Json Doc's ContentHash -// to CodeHash of a contract or hash of a domain -// kept -func (self *Resolver) RegisterContentHash(address common.Address, codehash, dochash common.Hash) (txh string, err error) { - _, err = self.SetOwner(address) - if err != nil { - return - } - codehex := common.Bytes2Hex(codehash[:]) - dochex := common.Bytes2Hex(dochash[:]) - - data := registerContentHashAbi + codehex + dochex - return self.backend.Transact( - address.Hex(), - HashRegContractAddress, - "", txValue, txGas, txGasPrice, - data, - ) -} - -// registers a url to a content hash so that the content can be fetched -// address is used as sender for the transaction and will be the owner of a new -// registry entry on first time use -// FIXME: silently doing nothing if sender is not the owner -// note that with content addressed storage, this step is no longer necessary -// it could be purely -func (self *Resolver) RegisterUrl(address common.Address, hash common.Hash, url string) (txh string, err error) { - hashHex := common.Bytes2Hex(hash[:]) - var urlHex string - urlb := []byte(url) - var cnt byte - n := len(urlb) - - for n > 0 { - if n > 32 { - n = 32 - } - urlHex = common.Bytes2Hex(urlb[:n]) - urlb = urlb[n:] - n = len(urlb) - bcnt := make([]byte, 32) - bcnt[31] = cnt - data := registerUrlAbi + - hashHex + - common.Bytes2Hex(bcnt) + - common.Bytes2Hex(common.Hex2BytesFixed(urlHex, 32)) - txh, err = self.backend.Transact( - address.Hex(), - UrlHintContractAddress, - "", txValue, txGas, txGasPrice, - data, - ) - if err != nil { - return - } - cnt++ - } - return -} - -func (self *Resolver) Register(address common.Address, codehash, dochash common.Hash, url string) (txh string, err error) { - - _, err = self.RegisterContentHash(address, codehash, dochash) - if err != nil { - return - } - return self.RegisterUrl(address, dochash, url) -} - -// resolution is costless non-transactional -// implemented as direct retrieval from db -func (self *Resolver) KeyToContentHash(khash common.Hash) (chash common.Hash, err error) { - // look up in hashReg - at := common.Bytes2Hex(common.FromHex(HashRegContractAddress)) - key := storageAddress(storageMapping(storageIdx2Addr(1), khash[:])) - hash := self.backend.StorageAt(at, key) - - if hash == "0x0" || len(hash) < 3 { - err = fmt.Errorf("content hash not found for '%v'", khash.Hex()) - return - } - copy(chash[:], common.Hex2BytesFixed(hash[2:], 32)) - return -} - -// retrieves the url-hint for the content hash - -// if we use content addressed storage, this step is no longer necessary -func (self *Resolver) ContentHashToUrl(chash common.Hash) (uri string, err error) { - // look up in URL reg - var str string = " " - var idx uint32 - for len(str) > 0 { - mapaddr := storageMapping(storageIdx2Addr(1), chash[:]) - key := storageAddress(storageFixedArray(mapaddr, storageIdx2Addr(idx))) - hex := self.backend.StorageAt(UrlHintContractAddress, key) - str = string(common.Hex2Bytes(hex[2:])) - l := len(str) - for (l > 0) && (str[l-1] == 0) { - l-- - } - str = str[:l] - uri = uri + str - idx++ - } - - if len(uri) == 0 { - err = fmt.Errorf("GetURLhint: URL hint not found for '%v'", chash.Hex()) - } - return -} - -func (self *Resolver) KeyToUrl(key common.Hash) (uri string, hash common.Hash, err error) { - // look up in urlHint - hash, err = self.KeyToContentHash(key) - if err != nil { - return - } - uri, err = self.ContentHashToUrl(hash) - return -} - -func storageIdx2Addr(varidx uint32) []byte { - data := make([]byte, 32) - binary.BigEndian.PutUint32(data[28:32], varidx) - return data -} - -func storageMapping(addr, key []byte) []byte { - data := make([]byte, 64) - copy(data[0:32], key[0:32]) - copy(data[32:64], addr[0:32]) - sha := crypto.Sha3(data) - return sha -} - -func storageFixedArray(addr, idx []byte) []byte { - var carry byte - for i := 31; i >= 0; i-- { - var b byte = addr[i] + idx[i] + carry - if b < addr[i] { - carry = 1 - } else { - carry = 0 - } - addr[i] = b - } - return addr -} - -func storageAddress(addr []byte) string { - return common.ToHex(addr) -} diff --git a/common/resolver/resolver_test.go b/common/resolver/resolver_test.go deleted file mode 100644 index 02d12592e..000000000 --- a/common/resolver/resolver_test.go +++ /dev/null @@ -1,93 +0,0 @@ -package resolver - -import ( - "testing" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" -) - -type testBackend struct { - // contracts mock - contracts map[string](map[string]string) -} - -var ( - text = "test" - codehash = common.StringToHash("1234") - hash = common.BytesToHash(crypto.Sha3([]byte(text))) - url = "bzz://bzzhash/my/path/contr.act" -) - -func NewTestBackend() *testBackend { - HashRegContractAddress = common.BigToAddress(common.Big0).Hex()[2:] - UrlHintContractAddress = common.BigToAddress(common.Big1).Hex()[2:] - self := &testBackend{} - self.contracts = make(map[string](map[string]string)) - - self.contracts[HashRegContractAddress] = make(map[string]string) - key := storageAddress(storageMapping(storageIdx2Addr(1), codehash[:])) - self.contracts[HashRegContractAddress][key] = hash.Hex() - - self.contracts[UrlHintContractAddress] = make(map[string]string) - mapaddr := storageMapping(storageIdx2Addr(1), hash[:]) - - key = storageAddress(storageFixedArray(mapaddr, storageIdx2Addr(0))) - self.contracts[UrlHintContractAddress][key] = common.ToHex([]byte(url)) - key = storageAddress(storageFixedArray(mapaddr, storageIdx2Addr(1))) - self.contracts[UrlHintContractAddress][key] = "0x00" - return self -} - -func (self *testBackend) StorageAt(ca, sa string) (res string) { - c := self.contracts[ca] - if c == nil { - return - } - res = c[sa] - return -} - -func (self *testBackend) Transact(fromStr, toStr, nonceStr, valueStr, gasStr, gasPriceStr, codeStr string) (string, error) { - return "", nil -} - -func TestKeyToContentHash(t *testing.T) { - b := NewTestBackend() - res := New(b) - - got, err := res.KeyToContentHash(codehash) - if err != nil { - t.Errorf("expected no error, got %v", err) - } else { - if got != hash { - t.Errorf("incorrect result, expected '%v', got '%v'", hash.Hex(), got.Hex()) - } - } -} - -func TestContentHashToUrl(t *testing.T) { - b := NewTestBackend() - res := New(b) - got, err := res.ContentHashToUrl(hash) - if err != nil { - t.Errorf("expected no error, got %v", err) - } else { - if got != url { - t.Errorf("incorrect result, expected '%v', got '%s'", url, got) - } - } -} - -func TestKeyToUrl(t *testing.T) { - b := NewTestBackend() - res := New(b) - got, _, err := res.KeyToUrl(codehash) - if err != nil { - t.Errorf("expected no error, got %v", err) - } else { - if got != url { - t.Errorf("incorrect result, expected \n'%s', got \n'%s'", url, got) - } - } -} diff --git a/common/rlp.go b/common/rlp.go index 06ac410e9..670d5b6e3 100644 --- a/common/rlp.go +++ b/common/rlp.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package common import ( diff --git a/common/rlp_test.go b/common/rlp_test.go index 2a55da928..75949c40d 100644 --- a/common/rlp_test.go +++ b/common/rlp_test.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package common import ( diff --git a/common/size.go b/common/size.go index 4ea7f7b11..2fc2dfd7b 100644 --- a/common/size.go +++ b/common/size.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package common import ( diff --git a/common/size_test.go b/common/size_test.go index cfe7efe31..48cf3cab3 100644 --- a/common/size_test.go +++ b/common/size_test.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package common import ( diff --git a/common/test_utils.go b/common/test_utils.go index 8346c147a..96ed31cad 100644 --- a/common/test_utils.go +++ b/common/test_utils.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package common import ( diff --git a/common/types.go b/common/types.go index e41112a77..69d16ad4b 100644 --- a/common/types.go +++ b/common/types.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package common import ( diff --git a/common/types_template.go b/common/types_template.go index 1c82a36dc..64ca6f73d 100644 --- a/common/types_template.go +++ b/common/types_template.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + // +build none //sed -e 's/_N_/Hash/g' -e 's/_S_/32/g' -e '1d' types_template.go | gofmt -w hash.go diff --git a/common/types_test.go b/common/types_test.go index 9f303152c..21ae5706c 100644 --- a/common/types_test.go +++ b/common/types_test.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package common import "testing" diff --git a/common/value.go b/common/value.go index c3893d565..5409a2c68 100644 --- a/common/value.go +++ b/common/value.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package common import ( diff --git a/common/value_test.go b/common/value_test.go index 38a0e9843..139a7f999 100644 --- a/common/value_test.go +++ b/common/value_test.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package common import ( diff --git a/compression/rle/read_write.go b/compression/rle/read_write.go index dde0e41ab..be5d1fbcc 100644 --- a/compression/rle/read_write.go +++ b/compression/rle/read_write.go @@ -1,3 +1,20 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + +// Package rle implements the run-length encoding used for Ethereum data. package rle import ( diff --git a/compression/rle/read_write_test.go b/compression/rle/read_write_test.go index e6aac9093..1ddaa5ffe 100644 --- a/compression/rle/read_write_test.go +++ b/compression/rle/read_write_test.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package rle import ( diff --git a/core/asm.go b/core/asm.go index f40c07904..071663992 100644 --- a/core/asm.go +++ b/core/asm.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package core import ( diff --git a/core/bad_block.go b/core/bad_block.go new file mode 100644 index 000000000..55c114645 --- /dev/null +++ b/core/bad_block.go @@ -0,0 +1,72 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + +package core + +import ( + "bytes" + "encoding/json" + "io/ioutil" + "net/http" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/logger" + "github.com/ethereum/go-ethereum/logger/glog" + "github.com/ethereum/go-ethereum/rlp" +) + +// DisabledBadBlockReporting can be set to prevent blocks being reported. +var DisableBadBlockReporting = true + +// ReportBlock reports the block to the block reporting tool found at +// badblocks.ethdev.com +func ReportBlock(block *types.Block, err error) { + if DisableBadBlockReporting { + return + } + + const url = "https://badblocks.ethdev.com" + + blockRlp, _ := rlp.EncodeToBytes(block) + data := map[string]interface{}{ + "block": common.Bytes2Hex(blockRlp), + "errortype": err.Error(), + "hints": map[string]interface{}{ + "receipts": "NYI", + "vmtrace": "NYI", + }, + } + jsonStr, _ := json.Marshal(map[string]interface{}{"method": "eth_badBlock", "params": []interface{}{data}, "id": "1", "jsonrpc": "2.0"}) + + req, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonStr)) + req.Header.Set("Content-Type", "application/json") + + client := &http.Client{} + resp, err := client.Do(req) + if err != nil { + glog.V(logger.Error).Infoln("POST err:", err) + return + } + defer resp.Body.Close() + + if glog.V(logger.Debug) { + glog.Infoln("response Status:", resp.Status) + glog.Infoln("response Headers:", resp.Header) + body, _ := ioutil.ReadAll(resp.Body) + glog.Infoln("response Body:", string(body)) + } +} diff --git a/core/bench_test.go b/core/bench_test.go index 6d851febd..645df48c2 100644 --- a/core/bench_test.go +++ b/core/bench_test.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package core import ( @@ -152,7 +168,7 @@ func benchInsertChain(b *testing.B, disk bool, gen func(int, *BlockGen)) { // Time the insertion of the new chain. // State and blocks are stored in the same DB. evmux := new(event.TypeMux) - chainman, _ := NewChainManager(genesis, db, db, FakePow{}, evmux) + chainman, _ := NewChainManager(genesis, db, db, db, FakePow{}, evmux) chainman.SetProcessor(NewBlockProcessor(db, db, FakePow{}, chainman, evmux)) defer chainman.Stop() b.ReportAllocs() diff --git a/core/block_cache.go b/core/block_cache.go index 0c747d37c..655f6c24b 100644 --- a/core/block_cache.go +++ b/core/block_cache.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package core import ( diff --git a/core/block_cache_test.go b/core/block_cache_test.go index 80d118599..abea0a654 100644 --- a/core/block_cache_test.go +++ b/core/block_cache_test.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package core import ( diff --git a/core/block_processor.go b/core/block_processor.go index 22d4c7c27..e912c0b6e 100644 --- a/core/block_processor.go +++ b/core/block_processor.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package core import ( @@ -9,12 +25,12 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/logger" "github.com/ethereum/go-ethereum/logger/glog" "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/pow" - "github.com/ethereum/go-ethereum/rlp" "gopkg.in/fatih/set.v0" ) @@ -24,8 +40,6 @@ const ( BlockChainVersion = 3 ) -var receiptsPre = []byte("receipts-") - type BlockProcessor struct { db common.Database extraDb common.Database @@ -74,15 +88,22 @@ func (self *BlockProcessor) ApplyTransaction(coinbase *state.StateObject, stated cb := statedb.GetStateObject(coinbase.Address()) _, gas, err := ApplyMessage(NewEnv(statedb, self.bc, tx, header), tx, cb) - if err != nil && (IsNonceErr(err) || state.IsGasLimitErr(err) || IsInvalidTxErr(err)) { + if err != nil { return nil, nil, err } // Update the state with pending changes - statedb.Update() + statedb.SyncIntermediate() usedGas.Add(usedGas, gas) receipt := types.NewReceipt(statedb.Root().Bytes(), usedGas) + receipt.TxHash = tx.Hash() + receipt.GasUsed = new(big.Int).Set(gas) + if MessageCreatesContract(tx) { + from, _ := tx.From() + receipt.ContractAddress = crypto.CreateAddress(from, tx.Nonce()) + } + logs := statedb.GetLogs(tx.Hash()) receipt.SetLogs(logs) receipt.Bloom = types.CreateBloom(types.Receipts{receipt}) @@ -114,7 +135,7 @@ func (self *BlockProcessor) ApplyTransactions(coinbase *state.StateObject, state statedb.StartRecord(tx.Hash(), block.Hash(), i) receipt, txGas, err := self.ApplyTransaction(coinbase, statedb, header, tx, totalUsedGas, transientProcess) - if err != nil && (IsNonceErr(err) || state.IsGasLimitErr(err) || IsInvalidTxErr(err)) { + if err != nil { return nil, err } @@ -151,7 +172,7 @@ func (sm *BlockProcessor) RetryProcess(block *types.Block) (logs state.Logs, err errch := make(chan bool) go func() { errch <- sm.Pow.Verify(block) }() - logs, err = sm.processWithParent(block, parent) + logs, _, err = sm.processWithParent(block, parent) if !<-errch { return nil, ValidationError("Block's nonce is invalid (= %x)", block.Nonce) } @@ -162,23 +183,23 @@ func (sm *BlockProcessor) RetryProcess(block *types.Block) (logs state.Logs, err // Process block will attempt to process the given block's transactions and applies them // on top of the block's parent state (given it exists) and will return wether it was // successful or not. -func (sm *BlockProcessor) Process(block *types.Block) (logs state.Logs, err error) { +func (sm *BlockProcessor) Process(block *types.Block) (logs state.Logs, receipts types.Receipts, err error) { // Processing a blocks may never happen simultaneously sm.mutex.Lock() defer sm.mutex.Unlock() if sm.bc.HasBlock(block.Hash()) { - return nil, &KnownBlockError{block.Number(), block.Hash()} + return nil, nil, &KnownBlockError{block.Number(), block.Hash()} } if !sm.bc.HasBlock(block.ParentHash()) { - return nil, ParentError(block.ParentHash()) + return nil, nil, ParentError(block.ParentHash()) } parent := sm.bc.GetBlock(block.ParentHash()) return sm.processWithParent(block, parent) } -func (sm *BlockProcessor) processWithParent(block, parent *types.Block) (logs state.Logs, err error) { +func (sm *BlockProcessor) processWithParent(block, parent *types.Block) (logs state.Logs, receipts types.Receipts, err error) { // Create a new state based on the parent's root (e.g., create copy) state := state.New(parent.Root(), sm.db) header := block.Header() @@ -192,10 +213,10 @@ func (sm *BlockProcessor) processWithParent(block, parent *types.Block) (logs st // There can be at most two uncles if len(uncles) > 2 { - return nil, ValidationError("Block can only contain maximum 2 uncles (contained %v)", len(uncles)) + return nil, nil, ValidationError("Block can only contain maximum 2 uncles (contained %v)", len(uncles)) } - receipts, err := sm.TransitionState(state, parent, block, false) + receipts, err = sm.TransitionState(state, parent, block, false) if err != nil { return } @@ -239,7 +260,7 @@ func (sm *BlockProcessor) processWithParent(block, parent *types.Block) (logs st // Commit state objects/accounts to a temporary trie (does not save) // used to calculate the state root. - state.Update() + state.SyncObjects() if header.Root != state.Root() { err = fmt.Errorf("invalid merkle root. received=%x got=%x", header.Root, state.Root()) return @@ -248,15 +269,7 @@ func (sm *BlockProcessor) processWithParent(block, parent *types.Block) (logs st // Sync the current block's state to the database state.Sync() - // This puts transactions in a extra db for rpc - for i, tx := range block.Transactions() { - putTx(sm.extraDb, tx, block, uint64(i)) - } - - // store the receipts - putReceipts(sm.extraDb, block.Hash(), receipts) - - return state.Logs(), nil + return state.Logs(), receipts, nil } var ( @@ -327,16 +340,20 @@ func (sm *BlockProcessor) VerifyUncles(statedb *state.StateDB, block, parent *ty } // GetBlockReceipts returns the receipts beloniging to the block hash -func (sm *BlockProcessor) GetBlockReceipts(bhash common.Hash) (receipts types.Receipts, err error) { - return getBlockReceipts(sm.extraDb, bhash) +func (sm *BlockProcessor) GetBlockReceipts(bhash common.Hash) types.Receipts { + if block := sm.ChainManager().GetBlock(bhash); block != nil { + return GetReceiptsFromBlock(sm.extraDb, block) + } + + return nil } // GetLogs returns the logs of the given block. This method is using a two step approach // where it tries to get it from the (updated) method which gets them from the receipts or // the depricated way by re-processing the block. func (sm *BlockProcessor) GetLogs(block *types.Block) (logs state.Logs, err error) { - receipts, err := sm.GetBlockReceipts(block.Hash()) - if err == nil && len(receipts) > 0 { + receipts := GetReceiptsFromBlock(sm.extraDb, block) + if len(receipts) > 0 { // coalesce logs for _, receipt := range receipts { logs = append(logs, receipt.Logs()...) @@ -362,6 +379,13 @@ func ValidateHeader(pow pow.PoW, block *types.Header, parent *types.Block, check return fmt.Errorf("Block extra data too long (%d)", len(block.Extra)) } + if block.Time > uint64(time.Now().Unix()) { + return BlockFutureErr + } + if block.Time <= parent.Time() { + return BlockEqualTSErr + } + expd := CalcDifficulty(int64(block.Time), int64(parent.Time()), parent.Difficulty()) if expd.Cmp(block.Difficulty) != 0 { return fmt.Errorf("Difficulty check failed for block %v, %v", block.Difficulty, expd) @@ -377,20 +401,12 @@ func ValidateHeader(pow pow.PoW, block *types.Header, parent *types.Block, check return fmt.Errorf("GasLimit check failed for block %v (%v > %v)", block.GasLimit, a, b) } - if int64(block.Time) > time.Now().Unix() { - return BlockFutureErr - } - num := parent.Number() num.Sub(block.Number, num) if num.Cmp(big.NewInt(1)) != 0 { return BlockNumberErr } - if block.Time <= uint64(parent.Time()) { - return BlockEqualTSErr //ValidationError("Block timestamp equal or less than previous block (%v - %v)", block.Time, parent.Time) - } - if checkPow { // Verify the nonce of the block. Return an error if it's not valid if !pow.Verify(types.NewBlockWithHeader(block)) { @@ -400,55 +416,3 @@ func ValidateHeader(pow pow.PoW, block *types.Header, parent *types.Block, check return nil } - -func getBlockReceipts(db common.Database, bhash common.Hash) (receipts types.Receipts, err error) { - var rdata []byte - rdata, err = db.Get(append(receiptsPre, bhash[:]...)) - - if err == nil { - err = rlp.DecodeBytes(rdata, &receipts) - } else { - glog.V(logger.Detail).Infof("getBlockReceipts error %v\n", err) - } - return -} - -func putTx(db common.Database, tx *types.Transaction, block *types.Block, i uint64) { - rlpEnc, err := rlp.EncodeToBytes(tx) - if err != nil { - glog.V(logger.Debug).Infoln("Failed encoding tx", err) - return - } - db.Put(tx.Hash().Bytes(), rlpEnc) - - var txExtra struct { - BlockHash common.Hash - BlockIndex uint64 - Index uint64 - } - txExtra.BlockHash = block.Hash() - txExtra.BlockIndex = block.NumberU64() - txExtra.Index = i - rlpMeta, err := rlp.EncodeToBytes(txExtra) - if err != nil { - glog.V(logger.Debug).Infoln("Failed encoding tx meta data", err) - return - } - db.Put(append(tx.Hash().Bytes(), 0x0001), rlpMeta) -} - -func putReceipts(db common.Database, hash common.Hash, receipts types.Receipts) error { - storageReceipts := make([]*types.ReceiptForStorage, len(receipts)) - for i, receipt := range receipts { - storageReceipts[i] = (*types.ReceiptForStorage)(receipt) - } - - bytes, err := rlp.EncodeToBytes(storageReceipts) - if err != nil { - return err - } - - db.Put(append(receiptsPre, hash[:]...), bytes) - - return nil -} diff --git a/core/block_processor_test.go b/core/block_processor_test.go index dc328a3ea..4250b897b 100644 --- a/core/block_processor_test.go +++ b/core/block_processor_test.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package core import ( @@ -18,7 +34,7 @@ func proc() (*BlockProcessor, *ChainManager) { var mux event.TypeMux genesis := GenesisBlock(0, db) - chainMan, err := NewChainManager(genesis, db, db, thePow(), &mux) + chainMan, err := NewChainManager(genesis, db, db, db, thePow(), &mux) if err != nil { fmt.Println(err) } @@ -64,12 +80,9 @@ func TestPutReceipt(t *testing.T) { Index: 0, }}) - putReceipts(db, hash, types.Receipts{receipt}) - receipts, err := getBlockReceipts(db, hash) - if err != nil { - t.Error("got err:", err) - } - if len(receipts) != 1 { - t.Error("expected to get 1 receipt, got", len(receipts)) + PutReceipts(db, types.Receipts{receipt}) + receipt = GetReceipt(db, common.Hash{}) + if receipt == nil { + t.Error("expected to get 1 receipt, got none.") } } diff --git a/core/blocks.go b/core/blocks.go index f0d39e1e1..b3a559279 100644 --- a/core/blocks.go +++ b/core/blocks.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package core import "github.com/ethereum/go-ethereum/common" diff --git a/core/canary.go b/core/canary.go index de77c4bba..710e31530 100644 --- a/core/canary.go +++ b/core/canary.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package core import ( @@ -8,10 +24,10 @@ import ( ) var ( - jeff = common.HexToAddress("9d38997c624a71b21278389ea2fdc460d000e4b2") - vitalik = common.HexToAddress("b1e570be07eaa673e4fd0c8265b64ef739385709") - christoph = common.HexToAddress("529bc43a5d93789fa28de1961db6a07e752204ae") - gav = common.HexToAddress("e3e942b2aa524293c84ff6c7f87a6635790ad5e4") + jeff = common.HexToAddress("a8edb1ac2c86d3d9d78f96cd18001f60df29e52c") + vitalik = common.HexToAddress("1baf27b88c48dd02b744999cf3522766929d2b2a") + christoph = common.HexToAddress("60d11b58744784dc97f878f7e3749c0f1381a004") + gav = common.HexToAddress("4bb7e8ae99b645c2b7860b8f3a2328aae28bd80a") ) // Canary will check the 0'd address of the 4 contracts above. diff --git a/core/chain_makers.go b/core/chain_makers.go index 72ae7970e..07670608a 100644 --- a/core/chain_makers.go +++ b/core/chain_makers.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package core import ( @@ -77,7 +93,7 @@ func (b *BlockGen) AddTx(tx *types.Transaction) { if err != nil { panic(err) } - b.statedb.Update() + b.statedb.SyncIntermediate() b.header.GasUsed.Add(b.header.GasUsed, gas) receipt := types.NewReceipt(b.statedb.Root().Bytes(), b.header.GasUsed) logs := b.statedb.GetLogs(tx.Hash()) @@ -135,7 +151,7 @@ func GenerateChain(parent *types.Block, db common.Database, n int, gen func(int, gen(i, b) } AccumulateRewards(statedb, h, b.uncles) - statedb.Update() + statedb.SyncIntermediate() h.Root = statedb.Root() return types.NewBlock(h, b.txs, b.uncles, b.receipts) } @@ -155,7 +171,7 @@ func makeHeader(parent *types.Block, state *state.StateDB) *types.Header { Root: state.Root(), ParentHash: parent.Hash(), Coinbase: parent.Coinbase(), - Difficulty: CalcDifficulty(time, parent.Time(), parent.Difficulty()), + Difficulty: CalcDifficulty(int64(time), int64(parent.Time()), parent.Difficulty()), GasLimit: CalcGasLimit(parent), GasUsed: new(big.Int), Number: new(big.Int).Add(parent.Number(), common.Big1), @@ -167,7 +183,7 @@ func makeHeader(parent *types.Block, state *state.StateDB) *types.Header { // InsertChain on the result of makeChain. func newCanonical(n int, db common.Database) (*BlockProcessor, error) { evmux := &event.TypeMux{} - chainman, _ := NewChainManager(GenesisBlock(0, db), db, db, FakePow{}, evmux) + chainman, _ := NewChainManager(GenesisBlock(0, db), db, db, db, FakePow{}, evmux) bman := NewBlockProcessor(db, db, FakePow{}, chainman, evmux) bman.bc.SetProcessor(bman) parent := bman.bc.CurrentBlock() diff --git a/core/chain_makers_test.go b/core/chain_makers_test.go index d5125e1c3..2f001be9b 100644 --- a/core/chain_makers_test.go +++ b/core/chain_makers_test.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package core import ( @@ -58,7 +74,7 @@ func ExampleGenerateChain() { // Import the chain. This runs all block validation rules. evmux := &event.TypeMux{} - chainman, _ := NewChainManager(genesis, db, db, FakePow{}, evmux) + chainman, _ := NewChainManager(genesis, db, db, db, FakePow{}, evmux) chainman.SetProcessor(NewBlockProcessor(db, db, FakePow{}, chainman, evmux)) if i, err := chainman.InsertChain(chain); err != nil { fmt.Printf("insert error (block %d): %v\n", i, err) diff --git a/core/chain_manager.go b/core/chain_manager.go index 808ccd201..bd49bafc2 100644 --- a/core/chain_manager.go +++ b/core/chain_manager.go @@ -1,7 +1,23 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + +// Package core implements the Ethereum consensus protocol. package core import ( - "bytes" "fmt" "io" "math/big" @@ -11,19 +27,15 @@ import ( "time" "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/compression/rle" "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/logger" "github.com/ethereum/go-ethereum/logger/glog" "github.com/ethereum/go-ethereum/metrics" - "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/pow" "github.com/ethereum/go-ethereum/rlp" "github.com/hashicorp/golang-lru" - "github.com/syndtr/goleveldb/leveldb" ) var ( @@ -40,59 +52,14 @@ const ( blockCacheLimit = 256 maxFutureBlocks = 256 maxTimeFutureBlocks = 30 + checkpointLimit = 200 ) -// CalcDifficulty is the difficulty adjustment algorithm. It returns -// the difficulty that a new block b should have when created at time -// given the parent block's time and difficulty. -func CalcDifficulty(time int64, parentTime int64, parentDiff *big.Int) *big.Int { - diff := new(big.Int) - adjust := new(big.Int).Div(parentDiff, params.DifficultyBoundDivisor) - if big.NewInt(time-parentTime).Cmp(params.DurationLimit) < 0 { - diff.Add(parentDiff, adjust) - } else { - diff.Sub(parentDiff, adjust) - } - if diff.Cmp(params.MinimumDifficulty) < 0 { - return params.MinimumDifficulty - } - return diff -} - -// CalcTD computes the total difficulty of block. -func CalcTD(block, parent *types.Block) *big.Int { - if parent == nil { - return block.Difficulty() - } - d := block.Difficulty() - d.Add(d, parent.Td) - return d -} - -// CalcGasLimit computes the gas limit of the next block after parent. -// The result may be modified by the caller. -func CalcGasLimit(parent *types.Block) *big.Int { - decay := new(big.Int).Div(parent.GasLimit(), params.GasLimitBoundDivisor) - contrib := new(big.Int).Mul(parent.GasUsed(), big.NewInt(3)) - contrib = contrib.Div(contrib, big.NewInt(2)) - contrib = contrib.Div(contrib, params.GasLimitBoundDivisor) - - gl := new(big.Int).Sub(parent.GasLimit(), decay) - gl = gl.Add(gl, contrib) - gl = gl.Add(gl, big.NewInt(1)) - gl.Set(common.BigMax(gl, params.MinGasLimit)) - - if gl.Cmp(params.GenesisGasLimit) < 0 { - gl.Add(parent.GasLimit(), decay) - gl.Set(common.BigMin(gl, params.GenesisGasLimit)) - } - return gl -} - type ChainManager struct { //eth EthManager blockDb common.Database stateDb common.Database + extraDb common.Database processor types.BlockProcessor eventMux *event.TypeMux genesisBlock *types.Block @@ -101,6 +68,7 @@ type ChainManager struct { chainmu sync.RWMutex tsmu sync.RWMutex + checkpoint int // checkpoint counts towards the new checkpoint td *big.Int currentBlock *types.Block lastBlockHash common.Hash @@ -109,9 +77,8 @@ type ChainManager struct { transState *state.StateDB txState *state.ManagedState - cache *lru.Cache // cache is the LRU caching - futureBlocks *lru.Cache // future blocks are blocks added for later processing - pendingBlocks *lru.Cache // pending blocks contain blocks not yet written to the db + cache *lru.Cache // cache is the LRU caching + futureBlocks *lru.Cache // future blocks are blocks added for later processing quit chan struct{} // procInterrupt must be atomically called @@ -121,11 +88,12 @@ type ChainManager struct { pow pow.PoW } -func NewChainManager(genesis *types.Block, blockDb, stateDb common.Database, pow pow.PoW, mux *event.TypeMux) (*ChainManager, error) { +func NewChainManager(genesis *types.Block, blockDb, stateDb, extraDb common.Database, pow pow.PoW, mux *event.TypeMux) (*ChainManager, error) { cache, _ := lru.New(blockCacheLimit) bc := &ChainManager{ blockDb: blockDb, stateDb: stateDb, + extraDb: extraDb, genesisBlock: GenesisBlock(42, stateDb), eventMux: mux, quit: make(chan struct{}), @@ -240,6 +208,24 @@ func (self *ChainManager) setTransState(statedb *state.StateDB) { self.transState = statedb } +func (bc *ChainManager) recover() bool { + data, _ := bc.blockDb.Get([]byte("checkpoint")) + if len(data) != 0 { + block := bc.GetBlock(common.BytesToHash(data)) + if block != nil { + err := bc.blockDb.Put([]byte("LastBlock"), block.Hash().Bytes()) + if err != nil { + glog.Fatalln("db write err:", err) + } + + bc.currentBlock = block + bc.lastBlockHash = block.Hash() + return true + } + } + return false +} + func (bc *ChainManager) setLastState() { data, _ := bc.blockDb.Get([]byte("LastBlock")) if len(data) != 0 { @@ -248,7 +234,12 @@ func (bc *ChainManager) setLastState() { bc.currentBlock = block bc.lastBlockHash = block.Hash() } else { - glog.Fatalf("Fatal. LastBlock not found. Please run removedb and resync") + glog.Infof("LastBlock (%x) not found. Recovering...\n", data) + if bc.recover() { + glog.Infof("Recover successful") + } else { + glog.Fatalf("Recover failed. Please report") + } } } else { bc.Reset() @@ -347,14 +338,19 @@ func (self *ChainManager) ExportN(w io.Writer, first uint64, last uint64) error // insert injects a block into the current chain block chain. Note, this function // assumes that the `mu` mutex is held! func (bc *ChainManager) insert(block *types.Block) { - key := append(blockNumPre, block.Number().Bytes()...) - err := bc.blockDb.Put(key, block.Hash().Bytes()) + err := WriteHead(bc.blockDb, block) if err != nil { glog.Fatal("db write fail:", err) } - err = bc.blockDb.Put([]byte("LastBlock"), block.Hash().Bytes()) - if err != nil { - glog.Fatal("db write fail:", err) + + bc.checkpoint++ + if bc.checkpoint > checkpointLimit { + err = bc.blockDb.Put([]byte("checkpoint"), block.Hash().Bytes()) + if err != nil { + glog.Fatal("db write fail:", err) + } + + bc.checkpoint = 0 } bc.currentBlock = block @@ -387,12 +383,6 @@ func (bc *ChainManager) HasBlock(hash common.Hash) bool { return true } - if bc.pendingBlocks != nil { - if _, exist := bc.pendingBlocks.Get(hash); exist { - return true - } - } - data, _ := bc.blockDb.Get(append(blockHashPre, hash[:]...)) return len(data) != 0 } @@ -423,26 +413,15 @@ func (self *ChainManager) GetBlock(hash common.Hash) *types.Block { return block.(*types.Block) } - if self.pendingBlocks != nil { - if block, _ := self.pendingBlocks.Get(hash); block != nil { - return block.(*types.Block) - } - } - - data, _ := self.blockDb.Get(append(blockHashPre, hash[:]...)) - if len(data) == 0 { - return nil - } - var block types.StorageBlock - if err := rlp.Decode(bytes.NewReader(data), &block); err != nil { - glog.V(logger.Error).Infof("invalid block RLP for hash %x: %v", hash, err) + block := GetBlockByHash(self.blockDb, hash) + if block == nil { return nil } // Add the block to the cache - self.cache.Add(hash, (*types.Block)(&block)) + self.cache.Add(hash, (*types.Block)(block)) - return (*types.Block)(&block) + return (*types.Block)(block) } func (self *ChainManager) GetBlockByNumber(num uint64) *types.Block { @@ -468,12 +447,7 @@ func (self *ChainManager) GetBlocksFromHash(hash common.Hash, n int) (blocks []* // non blocking version func (self *ChainManager) getBlockByNumber(num uint64) *types.Block { - key, _ := self.blockDb.Get(append(blockNumPre, big.NewInt(int64(num)).Bytes()...)) - if len(key) == 0 { - return nil - } - - return self.GetBlock(common.BytesToHash(key)) + return GetBlockByNumber(self.blockDb, num) } func (self *ChainManager) GetUnclesInChain(block *types.Block, length int) (uncles []*types.Header) { @@ -519,38 +493,13 @@ func (self *ChainManager) procFutureBlocks() { } } -func (self *ChainManager) enqueueForWrite(block *types.Block) { - self.pendingBlocks.Add(block.Hash(), block) -} - -func (self *ChainManager) flushQueuedBlocks() { - db, batchWrite := self.blockDb.(*ethdb.LDBDatabase) - batch := new(leveldb.Batch) - for _, key := range self.pendingBlocks.Keys() { - b, _ := self.pendingBlocks.Get(key) - block := b.(*types.Block) - - enc, _ := rlp.EncodeToBytes((*types.StorageBlock)(block)) - key := append(blockHashPre, block.Hash().Bytes()...) - if batchWrite { - batch.Put(key, rle.Compress(enc)) - } else { - self.blockDb.Put(key, enc) - } - } - - if batchWrite { - db.LDB().Write(batch, nil) - } -} - type writeStatus byte const ( - nonStatTy writeStatus = iota - canonStatTy - splitStatTy - sideStatTy + NonStatTy writeStatus = iota + CanonStatTy + SplitStatTy + SideStatTy ) // WriteBlock writes the block to the chain (or pending queue) @@ -567,10 +516,10 @@ func (self *ChainManager) WriteBlock(block *types.Block, queued bool) (status wr // during split we merge two different chains and create the new canonical chain err := self.merge(cblock, block) if err != nil { - return nonStatTy, err + return NonStatTy, err } - status = splitStatTy + status = SplitStatTy } self.mu.Lock() @@ -581,20 +530,12 @@ func (self *ChainManager) WriteBlock(block *types.Block, queued bool) (status wr self.setTransState(state.New(block.Root(), self.stateDb)) self.txState.SetState(state.New(block.Root(), self.stateDb)) - status = canonStatTy + status = CanonStatTy } else { - status = sideStatTy + status = SideStatTy } - if queued { - // Write block to database. Eventually we'll have to improve on this and throw away blocks that are - // not in the canonical chain. - self.mu.Lock() - self.enqueueForWrite(block) - self.mu.Unlock() - } else { - self.write(block) - } + self.write(block) // Delete from future blocks self.futureBlocks.Remove(block.Hash()) @@ -610,8 +551,6 @@ func (self *ChainManager) InsertChain(chain types.Blocks) (int, error) { self.chainmu.Lock() defer self.chainmu.Unlock() - self.pendingBlocks, _ = lru.New(len(chain)) - // A queued approach to delivering events. This is generally // faster than direct delivery and requires much less mutex // acquiring. @@ -629,7 +568,6 @@ func (self *ChainManager) InsertChain(chain types.Blocks) (int, error) { // Start the parallel nonce verifier. go verifyNonces(self.pow, chain, nonceQuit, nonceDone) defer close(nonceQuit) - defer self.flushQueuedBlocks() txcount := 0 for i, block := range chain { @@ -662,7 +600,7 @@ func (self *ChainManager) InsertChain(chain types.Blocks) (int, error) { // Call in to the block processor and check for errors. It's likely that if one block fails // all others will fail too (unless a known block is returned). - logs, err := self.processor.Process(block) + logs, receipts, err := self.processor.Process(block) if err != nil { if IsKnownBlockErr(err) { stats.ignored++ @@ -673,7 +611,7 @@ func (self *ChainManager) InsertChain(chain types.Blocks) (int, error) { // Allow up to MaxFuture second in the future blocks. If this limit // is exceeded the chain is discarded and processed at a later time // if given. - if max := time.Now().Unix() + maxTimeFutureBlocks; block.Time() > max { + if max := time.Now().Unix() + maxTimeFutureBlocks; int64(block.Time()) > max { return i, fmt.Errorf("%v: BlockFutureErr, %v > %v", BlockFutureErr, block.Time(), max) } @@ -690,6 +628,8 @@ func (self *ChainManager) InsertChain(chain types.Blocks) (int, error) { blockErr(block, err) + go ReportBlock(block, err) + return i, err } @@ -701,19 +641,24 @@ func (self *ChainManager) InsertChain(chain types.Blocks) (int, error) { return i, err } switch status { - case canonStatTy: + case CanonStatTy: if glog.V(logger.Debug) { glog.Infof("[%v] inserted block #%d (%d TXs %d UNCs) (%x...). Took %v\n", time.Now().UnixNano(), block.Number(), len(block.Transactions()), len(block.Uncles()), block.Hash().Bytes()[0:4], time.Since(bstart)) } queue[i] = ChainEvent{block, block.Hash(), logs} queueEvent.canonicalCount++ - case sideStatTy: + + // This puts transactions in a extra db for rpc + PutTransactions(self.extraDb, block, block.Transactions()) + // store the receipts + PutReceipts(self.extraDb, receipts) + case SideStatTy: if glog.V(logger.Detail) { glog.Infof("inserted forked block #%d (TD=%v) (%d TXs %d UNCs) (%x...). Took %v\n", block.Number(), block.Difficulty(), len(block.Transactions()), len(block.Uncles()), block.Hash().Bytes()[0:4], time.Since(bstart)) } queue[i] = ChainSideEvent{block, logs} queueEvent.sideCount++ - case splitStatTy: + case SplitStatTy: queue[i] = ChainSplitEvent{block, logs} queueEvent.splitCount++ } diff --git a/core/chain_manager_test.go b/core/chain_manager_test.go index 8b3ea9e85..92f080f01 100644 --- a/core/chain_manager_test.go +++ b/core/chain_manager_test.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package core import ( @@ -33,7 +49,7 @@ func thePow() pow.PoW { func theChainManager(db common.Database, t *testing.T) *ChainManager { var eventMux event.TypeMux genesis := GenesisBlock(0, db) - chainMan, err := NewChainManager(genesis, db, db, thePow(), &eventMux) + chainMan, err := NewChainManager(genesis, db, db, db, thePow(), &eventMux) if err != nil { t.Error("failed creating chainmanager:", err) t.FailNow() @@ -96,7 +112,7 @@ func printChain(bc *ChainManager) { func testChain(chainB types.Blocks, bman *BlockProcessor) (*big.Int, error) { td := new(big.Int) for _, block := range chainB { - _, err := bman.bc.processor.Process(block) + _, _, err := bman.bc.processor.Process(block) if err != nil { if IsKnownBlockErr(err) { continue @@ -109,8 +125,7 @@ func testChain(chainB types.Blocks, bman *BlockProcessor) (*big.Int, error) { bman.bc.mu.Lock() { - bman.bc.enqueueForWrite(block) - //bman.bc.write(block) + bman.bc.write(block) } bman.bc.mu.Unlock() } @@ -368,7 +383,7 @@ func TestGetBlocksFromHash(t *testing.T) { type bproc struct{} -func (bproc) Process(*types.Block) (state.Logs, error) { return nil, nil } +func (bproc) Process(*types.Block) (state.Logs, types.Receipts, error) { return nil, nil, nil } func makeChainWithDiff(genesis *types.Block, d []int, seed byte) []*types.Block { var chain []*types.Block @@ -391,7 +406,7 @@ func makeChainWithDiff(genesis *types.Block, d []int, seed byte) []*types.Block func chm(genesis *types.Block, db common.Database) *ChainManager { var eventMux event.TypeMux - bc := &ChainManager{blockDb: db, stateDb: db, genesisBlock: genesis, eventMux: &eventMux, pow: FakePow{}} + bc := &ChainManager{extraDb: db, blockDb: db, stateDb: db, genesisBlock: genesis, eventMux: &eventMux, pow: FakePow{}} bc.cache, _ = lru.New(100) bc.futureBlocks, _ = lru.New(100) bc.processor = bproc{} @@ -480,12 +495,12 @@ func TestGenesisMismatch(t *testing.T) { db, _ := ethdb.NewMemDatabase() var mux event.TypeMux genesis := GenesisBlock(0, db) - _, err := NewChainManager(genesis, db, db, thePow(), &mux) + _, err := NewChainManager(genesis, db, db, db, thePow(), &mux) if err != nil { t.Error(err) } genesis = GenesisBlock(1, db) - _, err = NewChainManager(genesis, db, db, thePow(), &mux) + _, err = NewChainManager(genesis, db, db, db, thePow(), &mux) if err == nil { t.Error("expected genesis mismatch error") } diff --git a/core/chain_util.go b/core/chain_util.go new file mode 100644 index 000000000..96c9a03d8 --- /dev/null +++ b/core/chain_util.go @@ -0,0 +1,114 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + +package core + +import ( + "bytes" + "math/big" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/logger" + "github.com/ethereum/go-ethereum/logger/glog" + "github.com/ethereum/go-ethereum/params" + "github.com/ethereum/go-ethereum/rlp" +) + +// CalcDifficulty is the difficulty adjustment algorithm. It returns +// the difficulty that a new block b should have when created at time +// given the parent block's time and difficulty. +func CalcDifficulty(time int64, parentTime int64, parentDiff *big.Int) *big.Int { + diff := new(big.Int) + adjust := new(big.Int).Div(parentDiff, params.DifficultyBoundDivisor) + if big.NewInt(time-parentTime).Cmp(params.DurationLimit) < 0 { + diff.Add(parentDiff, adjust) + } else { + diff.Sub(parentDiff, adjust) + } + if diff.Cmp(params.MinimumDifficulty) < 0 { + return params.MinimumDifficulty + } + return diff +} + +// CalcTD computes the total difficulty of block. +func CalcTD(block, parent *types.Block) *big.Int { + if parent == nil { + return block.Difficulty() + } + d := block.Difficulty() + d.Add(d, parent.Td) + return d +} + +// CalcGasLimit computes the gas limit of the next block after parent. +// The result may be modified by the caller. +func CalcGasLimit(parent *types.Block) *big.Int { + decay := new(big.Int).Div(parent.GasLimit(), params.GasLimitBoundDivisor) + contrib := new(big.Int).Mul(parent.GasUsed(), big.NewInt(3)) + contrib = contrib.Div(contrib, big.NewInt(2)) + contrib = contrib.Div(contrib, params.GasLimitBoundDivisor) + + gl := new(big.Int).Sub(parent.GasLimit(), decay) + gl = gl.Add(gl, contrib) + gl = gl.Add(gl, big.NewInt(1)) + gl.Set(common.BigMax(gl, params.MinGasLimit)) + + if gl.Cmp(params.GenesisGasLimit) < 0 { + gl.Add(parent.GasLimit(), decay) + gl.Set(common.BigMin(gl, params.GenesisGasLimit)) + } + return gl +} + +// GetBlockByHash returns the block corresponding to the hash or nil if not found +func GetBlockByHash(db common.Database, hash common.Hash) *types.Block { + data, _ := db.Get(append(blockHashPre, hash[:]...)) + if len(data) == 0 { + return nil + } + var block types.StorageBlock + if err := rlp.Decode(bytes.NewReader(data), &block); err != nil { + glog.V(logger.Error).Infof("invalid block RLP for hash %x: %v", hash, err) + return nil + } + return (*types.Block)(&block) +} + +// GetBlockByHash returns the canonical block by number or nil if not found +func GetBlockByNumber(db common.Database, number uint64) *types.Block { + key, _ := db.Get(append(blockNumPre, big.NewInt(int64(number)).Bytes()...)) + if len(key) == 0 { + return nil + } + + return GetBlockByHash(db, common.BytesToHash(key)) +} + +// WriteHead force writes the current head +func WriteHead(db common.Database, block *types.Block) error { + key := append(blockNumPre, block.Number().Bytes()...) + err := db.Put(key, block.Hash().Bytes()) + if err != nil { + return err + } + err = db.Put([]byte("LastBlock"), block.Hash().Bytes()) + if err != nil { + return err + } + return nil +} diff --git a/core/error.go b/core/error.go index 3f3c350df..299317a8e 100644 --- a/core/error.go +++ b/core/error.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package core import ( @@ -30,7 +46,6 @@ func ParentError(hash common.Hash) error { func IsParentErr(err error) bool { _, ok := err.(*ParentErr) - return ok } @@ -48,7 +63,6 @@ func UncleError(format string, v ...interface{}) error { func IsUncleErr(err error) bool { _, ok := err.(*UncleErr) - return ok } @@ -67,7 +81,6 @@ func ValidationError(format string, v ...interface{}) *ValidationErr { func IsValidationErr(err error) bool { _, ok := err.(*ValidationErr) - return ok } @@ -86,7 +99,6 @@ func NonceError(is, exp uint64) *NonceErr { func IsNonceErr(err error) bool { _, ok := err.(*NonceErr) - return ok } @@ -121,24 +133,6 @@ func InvalidTxError(err error) *InvalidTxErr { func IsInvalidTxErr(err error) bool { _, ok := err.(*InvalidTxErr) - - return ok -} - -type OutOfGasErr struct { - Message string -} - -func OutOfGasError() *OutOfGasErr { - return &OutOfGasErr{Message: "Out of gas"} -} -func (self *OutOfGasErr) Error() string { - return self.Message -} - -func IsOutOfGasErr(err error) bool { - _, ok := err.(*OutOfGasErr) - return ok } diff --git a/core/events.go b/core/events.go index 7b56f8bb6..e47f78923 100644 --- a/core/events.go +++ b/core/events.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package core import ( diff --git a/core/execution.go b/core/execution.go index 9fb0210de..a4734dca5 100644 --- a/core/execution.go +++ b/core/execution.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package core import ( @@ -53,7 +69,7 @@ func (self *Execution) exec(contextAddr *common.Address, code []byte, caller vm. if env.Depth() > int(params.CallCreateDepth.Int64()) { caller.ReturnGas(self.Gas, self.price) - return nil, vm.DepthError{} + return nil, vm.DepthError } vsnapshot := env.State().Copy() diff --git a/core/fees.go b/core/fees.go index bbce01b84..0eda52f6d 100644 --- a/core/fees.go +++ b/core/fees.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package core import ( diff --git a/core/filter.go b/core/filter.go index fcdf68dd0..277976a55 100644 --- a/core/filter.go +++ b/core/filter.go @@ -1,7 +1,22 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package core import ( - "fmt" "math" "github.com/ethereum/go-ethereum/common" @@ -80,7 +95,6 @@ func (self *Filter) Find() state.Logs { done: for i := 0; block != nil; i++ { - fmt.Println(block.NumberU64() == 0) // Quit on latest switch { case block.NumberU64() == 0: diff --git a/core/filter_test.go b/core/filter_test.go index 9a8bc9592..50dc64b2e 100644 --- a/core/filter_test.go +++ b/core/filter_test.go @@ -1 +1,17 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package core diff --git a/core/genesis.go b/core/genesis.go index df13466ec..2d369aae0 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package core import ( @@ -64,7 +80,7 @@ func GenesisBlockForTesting(db common.Database, addr common.Address, balance *bi statedb := state.New(common.Hash{}, db) obj := statedb.GetOrNewStateObject(addr) obj.SetBalance(balance) - statedb.Update() + statedb.SyncObjects() statedb.Sync() block := types.NewBlock(&types.Header{ Difficulty: params.GenesisDifficulty, diff --git a/core/helper_test.go b/core/helper_test.go index a308153aa..fbd900ab7 100644 --- a/core/helper_test.go +++ b/core/helper_test.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package core import ( diff --git a/core/manager.go b/core/manager.go index ba0ecf9d1..a72ef1952 100644 --- a/core/manager.go +++ b/core/manager.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package core import ( @@ -14,5 +30,6 @@ type Backend interface { TxPool() *TxPool BlockDb() common.Database StateDb() common.Database + ExtraDb() common.Database EventMux() *event.TypeMux } diff --git a/core/state/dump.go b/core/state/dump.go index f6f2f9029..d1273f9b6 100644 --- a/core/state/dump.go +++ b/core/state/dump.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package state import ( diff --git a/core/state/errors.go b/core/state/errors.go index 5a847d38b..29acb5cc8 100644 --- a/core/state/errors.go +++ b/core/state/errors.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package state import ( diff --git a/core/state/log.go b/core/state/log.go index 882977061..5351c1831 100644 --- a/core/state/log.go +++ b/core/state/log.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package state import ( diff --git a/core/state/main_test.go b/core/state/main_test.go index f3d3f7e23..03225ba8c 100644 --- a/core/state/main_test.go +++ b/core/state/main_test.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package state import ( diff --git a/core/state/managed_state.go b/core/state/managed_state.go index aa6650d9b..4dee02992 100644 --- a/core/state/managed_state.go +++ b/core/state/managed_state.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package state import ( diff --git a/core/state/managed_state_test.go b/core/state/managed_state_test.go index c7ef2b323..7ae7c0393 100644 --- a/core/state/managed_state_test.go +++ b/core/state/managed_state_test.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package state import ( diff --git a/core/state/state_object.go b/core/state/state_object.go index a31c182d2..216ce9132 100644 --- a/core/state/state_object.go +++ b/core/state/state_object.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package state import ( @@ -57,8 +73,6 @@ type StateObject struct { initCode Code // Cached storage (flushed when updated) storage Storage - // Temporary prepaid gas, reward after transition - prepaid *big.Int // Total gas pool is the total amount of gas currently // left if this object is the coinbase. Gas is directly @@ -77,14 +91,10 @@ func (self *StateObject) Reset() { } func NewStateObject(address common.Address, db common.Database) *StateObject { - // This to ensure that it has 20 bytes (and not 0 bytes), thus left or right pad doesn't matter. - //address := common.ToAddress(addr) - object := &StateObject{db: db, address: address, balance: new(big.Int), gasPool: new(big.Int), dirty: true} object.trie = trie.NewSecure((common.Hash{}).Bytes(), db) object.storage = make(Storage) object.gasPool = new(big.Int) - object.prepaid = new(big.Int) return object } @@ -110,7 +120,6 @@ func NewStateObjectFromBytes(address common.Address, data []byte, db common.Data object.trie = trie.NewSecure(extobject.Root[:], db) object.storage = make(map[string]common.Hash) object.gasPool = new(big.Int) - object.prepaid = new(big.Int) object.code, _ = db.Get(extobject.CodeHash) return object @@ -172,7 +181,6 @@ func (self *StateObject) Update() { self.setAddr([]byte(key), value) } - self.storage = make(Storage) } func (c *StateObject) GetInstr(pc *big.Int) *common.Value { diff --git a/core/state/state_test.go b/core/state/state_test.go index 00e133dab..345bd9874 100644 --- a/core/state/state_test.go +++ b/core/state/state_test.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package state import ( @@ -72,7 +88,7 @@ func TestNull(t *testing.T) { //value := common.FromHex("0x823140710bf13990e4500136726d8b55") var value common.Hash state.SetState(address, common.Hash{}, value) - state.Update() + state.SyncIntermediate() state.Sync() value = state.GetState(address, common.Hash{}) if !common.EmptyHash(value) { diff --git a/core/state/statedb.go b/core/state/statedb.go index f6f63f329..3a2ad10e2 100644 --- a/core/state/statedb.go +++ b/core/state/statedb.go @@ -1,3 +1,20 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + +// Package state provides a caching layer atop the Ethereum state trie. package state import ( @@ -18,6 +35,7 @@ import ( type StateDB struct { db common.Database trie *trie.SecureTrie + root common.Hash stateObjects map[string]*StateObject @@ -31,7 +49,7 @@ type StateDB struct { // Create a new state from a given trie func New(root common.Hash, db common.Database) *StateDB { trie := trie.NewSecure(root[:], db) - return &StateDB{db: db, trie: trie, stateObjects: make(map[string]*StateObject), refund: new(big.Int), logs: make(map[common.Hash]Logs)} + return &StateDB{root: root, db: db, trie: trie, stateObjects: make(map[string]*StateObject), refund: new(big.Int), logs: make(map[common.Hash]Logs)} } func (self *StateDB) PrintRoot() { @@ -185,7 +203,7 @@ func (self *StateDB) DeleteStateObject(stateObject *StateObject) { addr := stateObject.Address() self.trie.Delete(addr[:]) - delete(self.stateObjects, addr.Str()) + //delete(self.stateObjects, addr.Str()) } // Retrieve a state object given my the address. Nil if not found @@ -323,7 +341,8 @@ func (self *StateDB) Refunds() *big.Int { return self.refund } -func (self *StateDB) Update() { +// SyncIntermediate updates the intermediate state and all mid steps +func (self *StateDB) SyncIntermediate() { self.refund = new(big.Int) for _, stateObject := range self.stateObjects { @@ -340,6 +359,24 @@ func (self *StateDB) Update() { } } +// SyncObjects syncs the changed objects to the trie +func (self *StateDB) SyncObjects() { + self.trie = trie.NewSecure(self.root[:], self.db) + + self.refund = new(big.Int) + + for _, stateObject := range self.stateObjects { + if stateObject.remove { + self.DeleteStateObject(stateObject) + } else { + stateObject.Update() + + self.UpdateStateObject(stateObject) + } + stateObject.dirty = false + } +} + // Debug stuff func (self *StateDB) CreateOutputForDiff() { for _, stateObject := range self.stateObjects { diff --git a/core/state_transition.go b/core/state_transition.go index e2212dfef..aacf53799 100644 --- a/core/state_transition.go +++ b/core/state_transition.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package core import ( @@ -7,7 +23,6 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/vm" - "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/logger" "github.com/ethereum/go-ethereum/logger/glog" "github.com/ethereum/go-ethereum/params" @@ -56,11 +71,6 @@ type Message interface { Data() []byte } -func AddressFromMessage(msg Message) common.Address { - from, _ := msg.From() - return crypto.CreateAddress(from, msg.Nonce()) -} - func MessageCreatesContract(msg Message) bool { return msg.To() == nil } @@ -128,7 +138,7 @@ func (self *StateTransition) To() *state.StateObject { func (self *StateTransition) UseGas(amount *big.Int) error { if self.gas.Cmp(amount) < 0 { - return OutOfGasError() + return vm.OutOfGasError } self.gas.Sub(self.gas, amount) @@ -209,16 +219,23 @@ func (self *StateTransition) transitionState() (ret []byte, usedGas *big.Int, er glog.V(logger.Core).Infoln("Insufficient gas for creating code. Require", dataGas, "and have", self.gas) } } + glog.V(logger.Core).Infoln("VM create err:", err) } else { // Increment the nonce for the next transaction self.state.SetNonce(sender.Address(), sender.Nonce()+1) ret, err = vmenv.Call(sender, self.To().Address(), self.data, self.gas, self.gasPrice, self.value) + glog.V(logger.Core).Infoln("VM call err:", err) } if err != nil && IsValueTransferErr(err) { return nil, nil, InvalidTxError(err) } + // We aren't interested in errors here. Errors returned by the VM are non-consensus errors and therefor shouldn't bubble up + if err != nil { + err = nil + } + if vm.Debug { vm.StdErrFormat(vmenv.StructLogs()) } diff --git a/core/transaction_pool.go b/core/transaction_pool.go index bf28647c3..e02a3a6ac 100644 --- a/core/transaction_pool.go +++ b/core/transaction_pool.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package core import ( @@ -29,7 +45,7 @@ var ( ) const ( - maxQueued = 200 // max limit of queued txs per address + maxQueued = 64 // max limit of queued txs per address ) type stateFn func() *state.StateDB @@ -65,7 +81,7 @@ func NewTxPool(eventMux *event.TypeMux, currentStateFn stateFn, gasLimitFn func( gasLimit: gasLimitFn, minGasPrice: new(big.Int), pendingState: state.ManageState(currentStateFn()), - events: eventMux.Subscribe(ChainEvent{}, GasPriceChanged{}), + events: eventMux.Subscribe(ChainHeadEvent{}, GasPriceChanged{}), } go pool.eventLoop() @@ -80,7 +96,7 @@ func (pool *TxPool) eventLoop() { pool.mu.Lock() switch ev := ev.(type) { - case ChainEvent: + case ChainHeadEvent: pool.resetState() case GasPriceChanged: pool.minGasPrice = ev.Price @@ -129,6 +145,17 @@ func (pool *TxPool) State() *state.ManagedState { return pool.pendingState } +func (pool *TxPool) Stats() (pending int, queued int) { + pool.mu.RLock() + defer pool.mu.RUnlock() + + pending = len(pool.pending) + for _, txs := range pool.queue { + queued += len(txs) + } + return +} + // validateTx checks whether a transaction is valid according // to the consensus rules. func (pool *TxPool) validateTx(tx *types.Transaction) error { @@ -214,9 +241,6 @@ func (self *TxPool) add(tx *types.Transaction) error { glog.Infof("(t) %x => %s (%v) %x\n", from, toname, tx.Value, hash) } - // check and validate the queueue - self.checkQueue() - return nil } @@ -245,11 +269,17 @@ func (pool *TxPool) addTx(hash common.Hash, addr common.Address, tx *types.Trans } // Add queues a single transaction in the pool if it is valid. -func (self *TxPool) Add(tx *types.Transaction) error { +func (self *TxPool) Add(tx *types.Transaction) (err error) { self.mu.Lock() defer self.mu.Unlock() - return self.add(tx) + err = self.add(tx) + if err == nil { + // check and validate the queueue + self.checkQueue() + } + + return } // AddTransactions attempts to queue all valid transactions in txs. @@ -265,6 +295,9 @@ func (self *TxPool) AddTransactions(txs []*types.Transaction) { glog.V(logger.Debug).Infof("tx %x\n", h[:4]) } } + + // check and validate the queueue + self.checkQueue() } // GetTransaction returns a transaction if it is contained in the pool @@ -327,6 +360,23 @@ func (self *TxPool) RemoveTransactions(txs types.Transactions) { } } +func (pool *TxPool) removeTx(hash common.Hash) { + // delete from pending pool + delete(pool.pending, hash) + // delete from queue + for address, txs := range pool.queue { + if _, ok := txs[hash]; ok { + if len(txs) == 1 { + // if only one tx, remove entire address entry. + delete(pool.queue, address) + } else { + delete(txs, hash) + } + break + } + } +} + // checkQueue moves transactions that have become processable to main pool. func (pool *TxPool) checkQueue() { state := pool.pendingState @@ -354,13 +404,19 @@ func (pool *TxPool) checkQueue() { for i, e := range addq { // start deleting the transactions from the queue if they exceed the limit if i > maxQueued { - if glog.V(logger.Debug) { - glog.Infof("Queued tx limit exceeded for %s. Tx %s removed\n", common.PP(address[:]), common.PP(e.hash[:])) - } delete(pool.queue[address], e.hash) continue } + if e.Nonce() > guessedNonce { + if len(addq)-i > maxQueued { + if glog.V(logger.Debug) { + glog.Infof("Queued tx limit exceeded for %s. Tx %s removed\n", common.PP(address[:]), common.PP(e.hash[:])) + } + for j := i + maxQueued; j < len(addq); j++ { + delete(txs, addq[j].hash) + } + } break } delete(txs, e.hash) @@ -373,23 +429,6 @@ func (pool *TxPool) checkQueue() { } } -func (pool *TxPool) removeTx(hash common.Hash) { - // delete from pending pool - delete(pool.pending, hash) - // delete from queue - for address, txs := range pool.queue { - if _, ok := txs[hash]; ok { - if len(txs) == 1 { - // if only one tx, remove entire address entry. - delete(pool.queue, address) - } else { - delete(txs, hash) - } - break - } - } -} - // validatePool removes invalid and processed transactions from the main pool. func (pool *TxPool) validatePool() { state := pool.currentState() diff --git a/core/transaction_pool_test.go b/core/transaction_pool_test.go index ff8b9c730..fdd0a7872 100644 --- a/core/transaction_pool_test.go +++ b/core/transaction_pool_test.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package core import ( @@ -181,6 +197,8 @@ func TestTransactionDoubleNonce(t *testing.T) { if err := pool.add(tx2); err != nil { t.Error("didn't expect error", err) } + + pool.checkQueue() if len(pool.pending) != 2 { t.Error("expected 2 pending txs. Got", len(pool.pending)) } diff --git a/core/transaction_util.go b/core/transaction_util.go new file mode 100644 index 000000000..0efeddfde --- /dev/null +++ b/core/transaction_util.go @@ -0,0 +1,101 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + +package core + +import ( + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/logger" + "github.com/ethereum/go-ethereum/logger/glog" + "github.com/ethereum/go-ethereum/rlp" +) + +var receiptsPre = []byte("receipts-") + +// PutTransactions stores the transactions in the given database +func PutTransactions(db common.Database, block *types.Block, txs types.Transactions) { + for i, tx := range block.Transactions() { + rlpEnc, err := rlp.EncodeToBytes(tx) + if err != nil { + glog.V(logger.Debug).Infoln("Failed encoding tx", err) + return + } + db.Put(tx.Hash().Bytes(), rlpEnc) + + var txExtra struct { + BlockHash common.Hash + BlockIndex uint64 + Index uint64 + } + txExtra.BlockHash = block.Hash() + txExtra.BlockIndex = block.NumberU64() + txExtra.Index = uint64(i) + rlpMeta, err := rlp.EncodeToBytes(txExtra) + if err != nil { + glog.V(logger.Debug).Infoln("Failed encoding tx meta data", err) + return + } + db.Put(append(tx.Hash().Bytes(), 0x0001), rlpMeta) + } +} + +// PutReceipts stores the receipts in the current database +func PutReceipts(db common.Database, receipts types.Receipts) error { + for _, receipt := range receipts { + storageReceipt := (*types.ReceiptForStorage)(receipt) + bytes, err := rlp.EncodeToBytes(storageReceipt) + if err != nil { + return err + } + err = db.Put(append(receiptsPre, receipt.TxHash[:]...), bytes) + if err != nil { + return err + } + } + + return nil +} + +// GetReceipt returns a receipt by hash +func GetReceipt(db common.Database, txHash common.Hash) *types.Receipt { + data, _ := db.Get(append(receiptsPre, txHash[:]...)) + if len(data) == 0 { + return nil + } + + var receipt types.Receipt + err := rlp.DecodeBytes(data, &receipt) + if err != nil { + glog.V(logger.Core).Infoln("GetReceipt err:", err) + } + return &receipt +} + +// GetReceiptFromBlock returns all receipts with the given block +func GetReceiptsFromBlock(db common.Database, block *types.Block) types.Receipts { + // at some point we want: + //receipts := make(types.Receipts, len(block.Transactions())) + // but since we need to support legacy, we can't (yet) + var receipts types.Receipts + for _, tx := range block.Transactions() { + if receipt := GetReceipt(db, tx.Hash()); receipt != nil { + receipts = append(receipts, receipt) + } + } + + return receipts +} diff --git a/core/types/block.go b/core/types/block.go index b7eb700ca..562fa64b9 100644 --- a/core/types/block.go +++ b/core/types/block.go @@ -1,3 +1,20 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + +// Package types contains data types related to Ethereum consensus. package types import ( @@ -290,7 +307,7 @@ func (b *Block) MixDigest() common.Hash { return b.header.MixDigest } func (b *Block) Nonce() uint64 { return binary.BigEndian.Uint64(b.header.Nonce[:]) } func (b *Block) Bloom() Bloom { return b.header.Bloom } func (b *Block) Coinbase() common.Address { return b.header.Coinbase } -func (b *Block) Time() int64 { return int64(b.header.Time) } +func (b *Block) Time() uint64 { return b.header.Time } func (b *Block) Root() common.Hash { return b.header.Root } func (b *Block) ParentHash() common.Hash { return b.header.ParentHash } func (b *Block) TxHash() common.Hash { return b.header.TxHash } diff --git a/core/types/block_test.go b/core/types/block_test.go index 03e6881be..2c1b18b5d 100644 --- a/core/types/block_test.go +++ b/core/types/block_test.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package types import ( @@ -31,7 +47,7 @@ func TestBlockEncoding(t *testing.T) { check("Root", block.Root(), common.HexToHash("ef1552a40b7165c3cd773806b9e0c165b75356e0314bf0706f279c729f51e017")) check("Hash", block.Hash(), common.HexToHash("0a5843ac1cb04865017cb35a57b50b07084e5fcee39b5acadade33149f4fff9e")) check("Nonce", block.Nonce(), uint64(0xa13a5a8c8f2bb1c4)) - check("Time", block.Time(), int64(1426516743)) + check("Time", block.Time(), uint64(1426516743)) check("Size", block.Size(), common.StorageSize(len(blockEnc))) tx1 := NewTransaction(0, common.HexToAddress("095e7baea6a6c7c4c2dfeb977efac326af552d87"), big.NewInt(10), big.NewInt(50000), big.NewInt(10), nil) diff --git a/core/types/bloom9.go b/core/types/bloom9.go index aa76a2e9d..565c831ee 100644 --- a/core/types/bloom9.go +++ b/core/types/bloom9.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package types import ( diff --git a/core/types/bloom9_test.go b/core/types/bloom9_test.go index 3c95772ec..a3cc1922a 100644 --- a/core/types/bloom9_test.go +++ b/core/types/bloom9_test.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package types /* diff --git a/core/types/common.go b/core/types/common.go index dbdaaba0c..4a8a7b5c4 100644 --- a/core/types/common.go +++ b/core/types/common.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package types import ( @@ -10,7 +26,7 @@ import ( ) type BlockProcessor interface { - Process(*Block) (state.Logs, error) + Process(*Block) (state.Logs, Receipts, error) } const bloomLength = 256 diff --git a/core/types/derive_sha.go b/core/types/derive_sha.go index f25e5937e..c446a5f27 100644 --- a/core/types/derive_sha.go +++ b/core/types/derive_sha.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package types import ( diff --git a/core/types/receipt.go b/core/types/receipt.go index 6b4024ada..7c44e6307 100644 --- a/core/types/receipt.go +++ b/core/types/receipt.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package types import ( @@ -15,7 +31,10 @@ type Receipt struct { PostState []byte CumulativeGasUsed *big.Int Bloom Bloom + TxHash common.Hash + ContractAddress common.Address logs state.Logs + GasUsed *big.Int } func NewReceipt(root []byte, cumalativeGasUsed *big.Int) *Receipt { @@ -39,12 +58,15 @@ func (self *Receipt) DecodeRLP(s *rlp.Stream) error { PostState []byte CumulativeGasUsed *big.Int Bloom Bloom + TxHash common.Hash + ContractAddress common.Address Logs state.Logs + GasUsed *big.Int } if err := s.Decode(&r); err != nil { return err } - self.PostState, self.CumulativeGasUsed, self.Bloom, self.logs = r.PostState, r.CumulativeGasUsed, r.Bloom, r.Logs + self.PostState, self.CumulativeGasUsed, self.Bloom, self.TxHash, self.ContractAddress, self.logs, self.GasUsed = r.PostState, r.CumulativeGasUsed, r.Bloom, r.TxHash, r.ContractAddress, r.Logs, r.GasUsed return nil } @@ -56,7 +78,7 @@ func (self *ReceiptForStorage) EncodeRLP(w io.Writer) error { for i, log := range self.logs { storageLogs[i] = (*state.LogForStorage)(log) } - return rlp.Encode(w, []interface{}{self.PostState, self.CumulativeGasUsed, self.Bloom, storageLogs}) + return rlp.Encode(w, []interface{}{self.PostState, self.CumulativeGasUsed, self.Bloom, self.TxHash, self.ContractAddress, storageLogs, self.GasUsed}) } func (self *Receipt) RlpEncode() []byte { diff --git a/core/types/transaction.go b/core/types/transaction.go index 95deac36e..09fde8ebe 100644 --- a/core/types/transaction.go +++ b/core/types/transaction.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package types import ( @@ -15,6 +31,8 @@ import ( "github.com/ethereum/go-ethereum/rlp" ) +var ErrInvalidSig = errors.New("invalid v, r, s values") + func IsContractAddr(addr []byte) bool { return len(addr) == 0 } @@ -116,11 +134,21 @@ func (tx *Transaction) To() *common.Address { } } +// Hash hashes the RLP encoding of tx. +// It uniquely identifies the transaction. func (tx *Transaction) Hash() common.Hash { if hash := tx.hash.Load(); hash != nil { return hash.(common.Hash) } - v := rlpHash([]interface{}{ + v := rlpHash(tx) + tx.hash.Store(v) + return v +} + +// SigHash returns the hash to be signed by the sender. +// It does not uniquely identify the transaction. +func (tx *Transaction) SigHash() common.Hash { + return rlpHash([]interface{}{ tx.data.AccountNonce, tx.data.Price, tx.data.GasLimit, @@ -128,8 +156,6 @@ func (tx *Transaction) Hash() common.Hash { tx.data.Amount, tx.data.Payload, }) - tx.hash.Store(v) - return v } func (tx *Transaction) Size() common.StorageSize { @@ -169,7 +195,7 @@ func (tx *Transaction) SignatureValues() (v byte, r *big.Int, s *big.Int) { func (tx *Transaction) publicKey() ([]byte, error) { if !crypto.ValidateSignatureValues(tx.data.V, tx.data.R, tx.data.S) { - return nil, errors.New("invalid v, r, s values") + return nil, ErrInvalidSig } // encode the signature in uncompressed format @@ -180,7 +206,7 @@ func (tx *Transaction) publicKey() ([]byte, error) { sig[64] = tx.data.V - 27 // recover the public key from the signature - hash := tx.Hash() + hash := tx.SigHash() pub, err := crypto.Ecrecover(hash[:], sig) if err != nil { glog.V(logger.Error).Infof("Could not get pubkey from signature: ", err) @@ -204,7 +230,7 @@ func (tx *Transaction) WithSignature(sig []byte) (*Transaction, error) { } func (tx *Transaction) SignECDSA(prv *ecdsa.PrivateKey) (*Transaction, error) { - h := tx.Hash() + h := tx.SigHash() sig, err := crypto.Sign(h[:], prv) if err != nil { return nil, err diff --git a/core/types/transaction_test.go b/core/types/transaction_test.go index dd9c5e87b..77717ce28 100644 --- a/core/types/transaction_test.go +++ b/core/types/transaction_test.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package types import ( @@ -34,11 +50,11 @@ var ( ) ) -func TestTransactionHash(t *testing.T) { - if emptyTx.Hash() != common.HexToHash("c775b99e7ad12f50d819fcd602390467e28141316969f4b57f0626f74fe3b386") { +func TestTransactionSigHash(t *testing.T) { + if emptyTx.SigHash() != common.HexToHash("c775b99e7ad12f50d819fcd602390467e28141316969f4b57f0626f74fe3b386") { t.Errorf("empty transaction hash mismatch, got %x", emptyTx.Hash()) } - if rightvrsTx.Hash() != common.HexToHash("fe7a79529ed5f7c3375d06b26b186a8644e0e16c373d7a12be41c62d6042b77a") { + if rightvrsTx.SigHash() != common.HexToHash("fe7a79529ed5f7c3375d06b26b186a8644e0e16c373d7a12be41c62d6042b77a") { t.Errorf("RightVRS transaction hash mismatch, got %x", rightvrsTx.Hash()) } } diff --git a/core/vm/analysis.go b/core/vm/analysis.go index a7aa8da39..ba0a02e0a 100644 --- a/core/vm/analysis.go +++ b/core/vm/analysis.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package vm import ( diff --git a/core/vm/asm.go b/core/vm/asm.go index 83fcb0e08..c5c6ef269 100644 --- a/core/vm/asm.go +++ b/core/vm/asm.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package vm import ( diff --git a/core/vm/common.go b/core/vm/common.go index 7b8b7dc4d..c40712bfe 100644 --- a/core/vm/common.go +++ b/core/vm/common.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package vm import ( diff --git a/core/vm/context.go b/core/vm/context.go index e33324b53..05bcee86c 100644 --- a/core/vm/context.go +++ b/core/vm/context.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package vm import ( diff --git a/core/vm/contracts.go b/core/vm/contracts.go index 90e356b1d..f32df3d41 100644 --- a/core/vm/contracts.go +++ b/core/vm/contracts.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package vm import ( diff --git a/core/vm/disasm.go b/core/vm/disasm.go index 858ee684a..bb07b5816 100644 --- a/core/vm/disasm.go +++ b/core/vm/disasm.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package vm import "fmt" diff --git a/core/vm/environment.go b/core/vm/environment.go index c103049a2..2368b5170 100644 --- a/core/vm/environment.go +++ b/core/vm/environment.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package vm import ( @@ -17,7 +33,7 @@ type Environment interface { BlockNumber() *big.Int GetHash(n uint64) common.Hash Coinbase() common.Address - Time() int64 + Time() uint64 Difficulty() *big.Int GasLimit() *big.Int Transfer(from, to Account, amount *big.Int) error diff --git a/core/vm/errors.go b/core/vm/errors.go index 799eb6797..d0c332068 100644 --- a/core/vm/errors.go +++ b/core/vm/errors.go @@ -1,21 +1,30 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package vm import ( + "errors" "fmt" "github.com/ethereum/go-ethereum/params" ) -type OutOfGasError struct{} - -func (self OutOfGasError) Error() string { - return "Out Of Gas" -} - -func IsOOGErr(err error) bool { - _, ok := err.(OutOfGasError) - return ok -} +var OutOfGasError = errors.New("Out of gas") +var DepthError = fmt.Errorf("Max call depth exceeded (%d)", params.CallCreateDepth) type StackError struct { req, has int @@ -29,18 +38,7 @@ func (self StackError) Error() string { return fmt.Sprintf("stack error! require %v, have %v", self.req, self.has) } -func IsStack(err error) bool { +func IsStackErr(err error) bool { _, ok := err.(StackError) return ok } - -type DepthError struct{} - -func (self DepthError) Error() string { - return fmt.Sprintf("Max call depth exceeded (%d)", params.CallCreateDepth) -} - -func IsDepthErr(err error) bool { - _, ok := err.(DepthError) - return ok -} diff --git a/core/vm/gas.go b/core/vm/gas.go index 32f5fec04..1710ef0c9 100644 --- a/core/vm/gas.go +++ b/core/vm/gas.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package vm import ( diff --git a/core/vm/logger.go b/core/vm/logger.go index 0e2a417ae..a99b268b4 100644 --- a/core/vm/logger.go +++ b/core/vm/logger.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package vm import ( diff --git a/core/vm/memory.go b/core/vm/memory.go index ea2ee80fb..413507ae5 100644 --- a/core/vm/memory.go +++ b/core/vm/memory.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package vm import "fmt" diff --git a/core/vm/opcodes.go b/core/vm/opcodes.go index 1ea80a212..5c74220a5 100644 --- a/core/vm/opcodes.go +++ b/core/vm/opcodes.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package vm import ( diff --git a/core/vm/stack.go b/core/vm/stack.go index 2be5c3dbe..31541f38f 100644 --- a/core/vm/stack.go +++ b/core/vm/stack.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package vm import ( diff --git a/core/vm/virtual_machine.go b/core/vm/virtual_machine.go index 1fd1dcd88..44d3d5d7e 100644 --- a/core/vm/virtual_machine.go +++ b/core/vm/virtual_machine.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package vm type VirtualMachine interface { diff --git a/core/vm/vm.go b/core/vm/vm.go index 9e092300d..9b3fd0009 100644 --- a/core/vm/vm.go +++ b/core/vm/vm.go @@ -1,3 +1,20 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + +// Package vm implements the Ethereum Virtual Machine. package vm import ( @@ -116,7 +133,7 @@ func (self *Vm) Run(context *Context, input []byte) (ret []byte, err error) { context.UseGas(context.Gas) - return context.Return(nil), OutOfGasError{} + return context.Return(nil), OutOfGasError } // Resize the memory calculated previously mem.Resize(newMemSize.Uint64()) @@ -444,7 +461,7 @@ func (self *Vm) Run(context *Context, input []byte) (ret []byte, err error) { case TIMESTAMP: time := self.env.Time() - stack.push(big.NewInt(time)) + stack.push(new(big.Int).SetUint64(time)) case NUMBER: number := self.env.BlockNumber() @@ -789,7 +806,7 @@ func (self *Vm) RunPrecompiled(p *PrecompiledAccount, input []byte, context *Con return context.Return(ret), nil } else { - return nil, OutOfGasError{} + return nil, OutOfGasError } } diff --git a/core/vm/vm_jit.go b/core/vm/vm_jit.go index 991ade318..34f45b5f4 100644 --- a/core/vm/vm_jit.go +++ b/core/vm/vm_jit.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + // +build evmjit package vm @@ -18,10 +34,12 @@ import ( "bytes" "errors" "fmt" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/crypto" "math/big" "unsafe" + + "github.com/ethereum/go-ethereum/core/state" + "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/params" ) type JitVm struct { diff --git a/core/vm/vm_jit_fake.go b/core/vm/vm_jit_fake.go index d6b5be45b..66a6d833d 100644 --- a/core/vm/vm_jit_fake.go +++ b/core/vm/vm_jit_fake.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + // +build !evmjit package vm diff --git a/core/vm_env.go b/core/vm_env.go index 6dd83acde..8a39af196 100644 --- a/core/vm_env.go +++ b/core/vm_env.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package core import ( @@ -33,7 +49,7 @@ func NewEnv(state *state.StateDB, chain *ChainManager, msg Message, header *type func (self *VMEnv) Origin() common.Address { f, _ := self.msg.From(); return f } func (self *VMEnv) BlockNumber() *big.Int { return self.header.Number } func (self *VMEnv) Coinbase() common.Address { return self.header.Coinbase } -func (self *VMEnv) Time() int64 { return int64(self.header.Time) } +func (self *VMEnv) Time() uint64 { return self.header.Time } func (self *VMEnv) Difficulty() *big.Int { return self.header.Difficulty } func (self *VMEnv) GasLimit() *big.Int { return self.header.GasLimit } func (self *VMEnv) Value() *big.Int { return self.msg.Value() } diff --git a/crypto/crypto.go b/crypto/crypto.go index 153bbbc5d..0b19d25af 100644 --- a/crypto/crypto.go +++ b/crypto/crypto.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package crypto import ( @@ -209,7 +225,7 @@ func ImportBlockTestKey(privKeyBytes []byte) error { } // creates a Key and stores that in the given KeyStore by decrypting a presale key JSON -func ImportPreSaleKey(keyStore KeyStore2, keyJSON []byte, password string) (*Key, error) { +func ImportPreSaleKey(keyStore KeyStore, keyJSON []byte, password string) (*Key, error) { key, err := decryptPreSaleKey(keyJSON, password) if err != nil { return nil, err diff --git a/crypto/crypto_test.go b/crypto/crypto_test.go index 63a9c3f5e..03350ec78 100644 --- a/crypto/crypto_test.go +++ b/crypto/crypto_test.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package crypto import ( diff --git a/crypto/curve.go b/crypto/curve.go index 131a0dd2f..e07a06071 100644 --- a/crypto/curve.go +++ b/crypto/curve.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package crypto // Copyright 2010 The Go Authors. All rights reserved. diff --git a/crypto/ecies/asn1.go b/crypto/ecies/asn1.go index 3ef194ea0..0a478e435 100644 --- a/crypto/ecies/asn1.go +++ b/crypto/ecies/asn1.go @@ -1,3 +1,32 @@ +// Copyright (c) 2013 Kyle Isom +// Copyright (c) 2012 The Go Authors. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + package ecies import ( diff --git a/crypto/ecies/ecies.go b/crypto/ecies/ecies.go index 812545631..a3b520dd5 100644 --- a/crypto/ecies/ecies.go +++ b/crypto/ecies/ecies.go @@ -1,3 +1,32 @@ +// Copyright (c) 2013 Kyle Isom +// Copyright (c) 2012 The Go Authors. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + package ecies import ( diff --git a/crypto/ecies/ecies_test.go b/crypto/ecies/ecies_test.go index 943e4488e..762124954 100644 --- a/crypto/ecies/ecies_test.go +++ b/crypto/ecies/ecies_test.go @@ -1,3 +1,32 @@ +// Copyright (c) 2013 Kyle Isom +// Copyright (c) 2012 The Go Authors. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + package ecies import ( diff --git a/crypto/ecies/params.go b/crypto/ecies/params.go index fd1ceedd0..97ddb0973 100644 --- a/crypto/ecies/params.go +++ b/crypto/ecies/params.go @@ -1,3 +1,32 @@ +// Copyright (c) 2013 Kyle Isom +// Copyright (c) 2012 The Go Authors. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + package ecies // This file contains parameters for ECIES encryption, specifying the diff --git a/crypto/encrypt_decrypt_test.go b/crypto/encrypt_decrypt_test.go index 6e5b40a37..84c9325fd 100644 --- a/crypto/encrypt_decrypt_test.go +++ b/crypto/encrypt_decrypt_test.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package crypto import ( diff --git a/crypto/key.go b/crypto/key.go index 4075afd83..bf09bf232 100644 --- a/crypto/key.go +++ b/crypto/key.go @@ -1,25 +1,18 @@ -/* - This file is part of go-ethereum - - go-ethereum is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - go-ethereum is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with go-ethereum. If not, see . -*/ -/** - * @authors - * Gustav Simonsson - * @date 2015 - * - */ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . package crypto diff --git a/crypto/key_store_passphrase.go b/crypto/key_store_passphrase.go index 2000a2438..86b0b33c2 100644 --- a/crypto/key_store_passphrase.go +++ b/crypto/key_store_passphrase.go @@ -1,25 +1,18 @@ -/* - This file is part of go-ethereum - - go-ethereum is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - go-ethereum is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with go-ethereum. If not, see . -*/ -/** - * @authors - * Gustav Simonsson - * @date 2015 - * - */ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . /* @@ -41,8 +34,6 @@ import ( "errors" "fmt" "io" - "os" - "path/filepath" "reflect" "code.google.com/p/go-uuid/uuid" @@ -65,7 +56,7 @@ type keyStorePassphrase struct { keysDirPath string } -func NewKeyStorePassphrase(path string) KeyStore2 { +func NewKeyStorePassphrase(path string) KeyStore { return &keyStorePassphrase{path} } @@ -74,20 +65,23 @@ func (ks keyStorePassphrase) GenerateNewKey(rand io.Reader, auth string) (key *K } func (ks keyStorePassphrase) GetKey(keyAddr common.Address, auth string) (key *Key, err error) { - keyBytes, keyId, err := DecryptKeyFromFile(ks, keyAddr, auth) - if err != nil { - return nil, err + keyBytes, keyId, err := decryptKeyFromFile(ks.keysDirPath, keyAddr, auth) + if err == nil { + key = &Key{ + Id: uuid.UUID(keyId), + Address: keyAddr, + PrivateKey: ToECDSA(keyBytes), + } } - key = &Key{ - Id: uuid.UUID(keyId), - Address: keyAddr, - PrivateKey: ToECDSA(keyBytes), - } - return key, err + return +} + +func (ks keyStorePassphrase) Cleanup(keyAddr common.Address) (err error) { + return cleanup(ks.keysDirPath, keyAddr) } func (ks keyStorePassphrase) GetKeyAddresses() (addresses []common.Address, err error) { - return GetKeyAddresses(ks.keysDirPath) + return getKeyAddresses(ks.keysDirPath) } func (ks keyStorePassphrase) StoreKey(key *Key, auth string) (err error) { @@ -139,42 +133,40 @@ func (ks keyStorePassphrase) StoreKey(key *Key, auth string) (err error) { return err } - return WriteKeyFile(key.Address, ks.keysDirPath, keyJSON) + return writeKeyFile(key.Address, ks.keysDirPath, keyJSON) } func (ks keyStorePassphrase) DeleteKey(keyAddr common.Address, auth string) (err error) { // only delete if correct passphrase is given - _, _, err = DecryptKeyFromFile(ks, keyAddr, auth) + _, _, err = decryptKeyFromFile(ks.keysDirPath, keyAddr, auth) if err != nil { return err } - keyDirPath := filepath.Join(ks.keysDirPath, hex.EncodeToString(keyAddr[:])) - return os.RemoveAll(keyDirPath) + return deleteKey(ks.keysDirPath, keyAddr) } -func DecryptKeyFromFile(ks keyStorePassphrase, keyAddr common.Address, auth string) (keyBytes []byte, keyId []byte, err error) { - fileContent, err := GetKeyFile(ks.keysDirPath, keyAddr) - if err != nil { - return nil, nil, err - } - +func decryptKeyFromFile(keysDirPath string, keyAddr common.Address, auth string) (keyBytes []byte, keyId []byte, err error) { + fmt.Printf("%v\n", keyAddr.Hex()) m := make(map[string]interface{}) - err = json.Unmarshal(fileContent, &m) + err = getKey(keysDirPath, keyAddr, &m) + if err != nil { + return + } v := reflect.ValueOf(m["version"]) if v.Kind() == reflect.String && v.String() == "1" { k := new(encryptedKeyJSONV1) - err := json.Unmarshal(fileContent, k) + err = getKey(keysDirPath, keyAddr, &k) if err != nil { - return nil, nil, err + return } return decryptKeyV1(k, auth) } else { k := new(encryptedKeyJSONV3) - err := json.Unmarshal(fileContent, k) + err = getKey(keysDirPath, keyAddr, &k) if err != nil { - return nil, nil, err + return } return decryptKeyV3(k, auth) } diff --git a/crypto/key_store_plain.go b/crypto/key_store_plain.go index 6a8afe27d..428d01e25 100644 --- a/crypto/key_store_plain.go +++ b/crypto/key_store_plain.go @@ -1,25 +1,18 @@ -/* - This file is part of go-ethereum - - go-ethereum is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - go-ethereum is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with go-ethereum. If not, see . -*/ -/** - * @authors - * Gustav Simonsson - * @date 2015 - * - */ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . package crypto @@ -27,28 +20,30 @@ import ( "encoding/hex" "encoding/json" "fmt" - "github.com/ethereum/go-ethereum/common" "io" "io/ioutil" "os" "path/filepath" + "time" + + "github.com/ethereum/go-ethereum/common" ) -// TODO: rename to KeyStore when replacing existing KeyStore -type KeyStore2 interface { +type KeyStore interface { // create new key using io.Reader entropy source and optionally using auth string GenerateNewKey(io.Reader, string) (*Key, error) - GetKey(common.Address, string) (*Key, error) // key from addr and auth string + GetKey(common.Address, string) (*Key, error) // get key from addr and auth string GetKeyAddresses() ([]common.Address, error) // get all addresses StoreKey(*Key, string) error // store key optionally using auth string DeleteKey(common.Address, string) error // delete key by addr and auth string + Cleanup(keyAddr common.Address) (err error) } type keyStorePlain struct { keysDirPath string } -func NewKeyStorePlain(path string) KeyStore2 { +func NewKeyStorePlain(path string) KeyStore { return &keyStorePlain{path} } @@ -56,7 +51,7 @@ func (ks keyStorePlain) GenerateNewKey(rand io.Reader, auth string) (key *Key, e return GenerateNewKeyDefault(ks, rand, auth) } -func GenerateNewKeyDefault(ks KeyStore2, rand io.Reader, auth string) (key *Key, err error) { +func GenerateNewKeyDefault(ks KeyStore, rand io.Reader, auth string) (key *Key, err error) { defer func() { if r := recover(); r != nil { err = fmt.Errorf("GenerateNewKey error: %v", r) @@ -68,62 +63,149 @@ func GenerateNewKeyDefault(ks KeyStore2, rand io.Reader, auth string) (key *Key, } func (ks keyStorePlain) GetKey(keyAddr common.Address, auth string) (key *Key, err error) { - fileContent, err := GetKeyFile(ks.keysDirPath, keyAddr) - if err != nil { - return nil, err - } - key = new(Key) - err = json.Unmarshal(fileContent, key) - return key, err + err = getKey(ks.keysDirPath, keyAddr, key) + return +} + +func getKey(keysDirPath string, keyAddr common.Address, content interface{}) (err error) { + fileContent, err := getKeyFile(keysDirPath, keyAddr) + if err != nil { + return + } + return json.Unmarshal(fileContent, content) } func (ks keyStorePlain) GetKeyAddresses() (addresses []common.Address, err error) { - return GetKeyAddresses(ks.keysDirPath) + return getKeyAddresses(ks.keysDirPath) +} + +func (ks keyStorePlain) Cleanup(keyAddr common.Address) (err error) { + return cleanup(ks.keysDirPath, keyAddr) } func (ks keyStorePlain) StoreKey(key *Key, auth string) (err error) { keyJSON, err := json.Marshal(key) if err != nil { - return err + return } - err = WriteKeyFile(key.Address, ks.keysDirPath, keyJSON) - return err + err = writeKeyFile(key.Address, ks.keysDirPath, keyJSON) + return } func (ks keyStorePlain) DeleteKey(keyAddr common.Address, auth string) (err error) { - keyDirPath := filepath.Join(ks.keysDirPath, keyAddr.Hex()) - err = os.RemoveAll(keyDirPath) - return err + return deleteKey(ks.keysDirPath, keyAddr) } -func GetKeyFile(keysDirPath string, keyAddr common.Address) (fileContent []byte, err error) { - fileName := hex.EncodeToString(keyAddr[:]) - return ioutil.ReadFile(filepath.Join(keysDirPath, fileName, fileName)) +func deleteKey(keysDirPath string, keyAddr common.Address) (err error) { + var path string + path, err = getKeyFilePath(keysDirPath, keyAddr) + if err == nil { + addrHex := hex.EncodeToString(keyAddr[:]) + if path == filepath.Join(keysDirPath, addrHex, addrHex) { + path = filepath.Join(keysDirPath, addrHex) + } + err = os.RemoveAll(path) + } + return } -func WriteKeyFile(addr common.Address, keysDirPath string, content []byte) (err error) { - addrHex := hex.EncodeToString(addr[:]) - keyDirPath := filepath.Join(keysDirPath, addrHex) - keyFilePath := filepath.Join(keyDirPath, addrHex) - err = os.MkdirAll(keyDirPath, 0700) // read, write and dir search for user +func getKeyFilePath(keysDirPath string, keyAddr common.Address) (keyFilePath string, err error) { + addrHex := hex.EncodeToString(keyAddr[:]) + matches, err := filepath.Glob(filepath.Join(keysDirPath, fmt.Sprintf("*--%s", addrHex))) + if len(matches) > 0 { + if err == nil { + keyFilePath = matches[len(matches)-1] + } + return + } + keyFilePath = filepath.Join(keysDirPath, addrHex, addrHex) + _, err = os.Stat(keyFilePath) + return +} + +func cleanup(keysDirPath string, keyAddr common.Address) (err error) { + fileInfos, err := ioutil.ReadDir(keysDirPath) + if err != nil { + return + } + var paths []string + account := hex.EncodeToString(keyAddr[:]) + for _, fileInfo := range fileInfos { + path := filepath.Join(keysDirPath, fileInfo.Name()) + if len(path) >= 40 { + addr := path[len(path)-40 : len(path)] + if addr == account { + if path == filepath.Join(keysDirPath, addr, addr) { + path = filepath.Join(keysDirPath, addr) + } + paths = append(paths, path) + } + } + } + if len(paths) > 1 { + for i := 0; err == nil && i < len(paths)-1; i++ { + err = os.RemoveAll(paths[i]) + if err != nil { + break + } + } + } + return +} + +func getKeyFile(keysDirPath string, keyAddr common.Address) (fileContent []byte, err error) { + var keyFilePath string + keyFilePath, err = getKeyFilePath(keysDirPath, keyAddr) + if err == nil { + fileContent, err = ioutil.ReadFile(keyFilePath) + } + return +} + +func writeKeyFile(addr common.Address, keysDirPath string, content []byte) (err error) { + filename := keyFileName(addr) + // read, write and dir search for user + err = os.MkdirAll(keysDirPath, 0700) if err != nil { return err } - return ioutil.WriteFile(keyFilePath, content, 0600) // read, write for user + // read, write for user + return ioutil.WriteFile(filepath.Join(keysDirPath, filename), content, 0600) } -func GetKeyAddresses(keysDirPath string) (addresses []common.Address, err error) { +// keyFilePath implements the naming convention for keyfiles: +// UTC---
+func keyFileName(keyAddr common.Address) string { + ts := time.Now().UTC() + return fmt.Sprintf("UTC--%s--%s", toISO8601(ts), hex.EncodeToString(keyAddr[:])) +} + +func toISO8601(t time.Time) string { + var tz string + name, offset := t.Zone() + if name == "UTC" { + tz = "Z" + } else { + tz = fmt.Sprintf("%03d00", offset/3600) + } + return fmt.Sprintf("%04d-%02d-%02dT%02d:%02d:%02d.%09d%s", t.Year(), t.Month(), t.Day(), t.Hour(), t.Minute(), t.Second(), t.Nanosecond(), tz) +} + +func getKeyAddresses(keysDirPath string) (addresses []common.Address, err error) { fileInfos, err := ioutil.ReadDir(keysDirPath) if err != nil { return nil, err } for _, fileInfo := range fileInfos { - address, err := hex.DecodeString(fileInfo.Name()) - if err != nil { - continue + filename := fileInfo.Name() + if len(filename) >= 40 { + addr := filename[len(filename)-40 : len(filename)] + address, err := hex.DecodeString(addr) + if err == nil { + addresses = append(addresses, common.BytesToAddress(address)) + } } - addresses = append(addresses, common.BytesToAddress(address)) } return addresses, err } diff --git a/crypto/key_store_test.go b/crypto/key_store_test.go index 53b7901bd..36fa12529 100644 --- a/crypto/key_store_test.go +++ b/crypto/key_store_test.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package crypto import ( diff --git a/crypto/keypair.go b/crypto/keypair.go index cc17328cb..e471384e1 100644 --- a/crypto/keypair.go +++ b/crypto/keypair.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package crypto import ( diff --git a/crypto/mnemonic.go b/crypto/mnemonic.go index 0d690f245..98f522dbe 100644 --- a/crypto/mnemonic.go +++ b/crypto/mnemonic.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package crypto import ( diff --git a/crypto/mnemonic_test.go b/crypto/mnemonic_test.go index beff476e0..b4f9a8c6f 100644 --- a/crypto/mnemonic_test.go +++ b/crypto/mnemonic_test.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package crypto import ( diff --git a/crypto/mnemonic_words.go b/crypto/mnemonic_words.go index ebd0d2690..93b80a1db 100644 --- a/crypto/mnemonic_words.go +++ b/crypto/mnemonic_words.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package crypto var MnemonicWords []string = []string{ diff --git a/crypto/randentropy/rand_entropy.go b/crypto/randentropy/rand_entropy.go index 68bb8808b..4ac12460b 100644 --- a/crypto/randentropy/rand_entropy.go +++ b/crypto/randentropy/rand_entropy.go @@ -1,9 +1,26 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package randentropy import ( crand "crypto/rand" - "github.com/ethereum/go-ethereum/crypto/sha3" "io" + + "github.com/ethereum/go-ethereum/crypto/sha3" ) var Reader io.Reader = &randEntropy{} diff --git a/crypto/secp256k1/notes.go b/crypto/secp256k1/notes.go index 7ed16caab..656806da0 100644 --- a/crypto/secp256k1/notes.go +++ b/crypto/secp256k1/notes.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package secp256k1 /* diff --git a/crypto/secp256k1/secp256.go b/crypto/secp256k1/secp256.go index 8ed81a1ed..5c1a08cca 100644 --- a/crypto/secp256k1/secp256.go +++ b/crypto/secp256k1/secp256.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package secp256k1 // TODO: set USE_SCALAR_4X64 depending on platform? diff --git a/crypto/secp256k1/secp256_test.go b/crypto/secp256k1/secp256_test.go index 14d260beb..74f2cb9a4 100644 --- a/crypto/secp256k1/secp256_test.go +++ b/crypto/secp256k1/secp256_test.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package secp256k1 import ( diff --git a/errs/errors.go b/errs/errors.go index face9b947..7f8897776 100644 --- a/errs/errors.go +++ b/errs/errors.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package errs import ( diff --git a/errs/errors_test.go b/errs/errors_test.go index 319093987..6e7d171bf 100644 --- a/errs/errors_test.go +++ b/errs/errors_test.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package errs import ( diff --git a/eth/backend.go b/eth/backend.go index 4644b8a93..391a610e3 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -1,3 +1,20 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + +// Package eth implements the Ethereum protocol. package eth import ( @@ -11,8 +28,6 @@ import ( "strings" "time" - "github.com/ethereum/go-ethereum/metrics" - "github.com/ethereum/ethash" "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/common" @@ -26,6 +41,7 @@ import ( "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/logger" "github.com/ethereum/go-ethereum/logger/glog" + "github.com/ethereum/go-ethereum/metrics" "github.com/ethereum/go-ethereum/miner" "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/p2p/discover" @@ -57,10 +73,9 @@ var ( ) type Config struct { - Name string - ProtocolVersion int - NetworkId int - GenesisNonce int + Name string + NetworkId int + GenesisNonce int BlockChainVersion int SkipBcVersionCheck bool // e.g. blockchain export @@ -72,6 +87,7 @@ type Config struct { VmDebug bool NatSpec bool AutoDAG bool + PowTest bool MaxPeers int MaxPendingPeers int @@ -89,7 +105,7 @@ type Config struct { Shh bool Dial bool - Etherbase string + Etherbase common.Address GasPrice *big.Int MinerThreads int AccountManager *accounts.Manager @@ -223,10 +239,10 @@ type Ethereum struct { NatSpec bool DataDir string AutoDAG bool + PowTest bool autodagquit chan bool etherbase common.Address clientVersion string - ethVersionId int netVersionId int shhVersionId int } @@ -291,14 +307,20 @@ func New(config *Config) (*Ethereum, error) { nodeDb := filepath.Join(config.DataDir, "nodes") // Perform database sanity checks - d, _ := blockDb.Get([]byte("ProtocolVersion")) - protov := int(common.NewValue(d).Uint()) - if protov != config.ProtocolVersion && protov != 0 { - path := filepath.Join(config.DataDir, "blockchain") - return nil, fmt.Errorf("Database version mismatch. Protocol(%d / %d). `rm -rf %s`", protov, config.ProtocolVersion, path) - } - saveProtocolVersion(blockDb, config.ProtocolVersion) - glog.V(logger.Info).Infof("Protocol Version: %v, Network Id: %v", config.ProtocolVersion, config.NetworkId) + /* + // The databases were previously tied to protocol versions. Currently we + // are moving away from this decision as approaching Frontier. The below + // check was left in for now but should eventually be just dropped. + + d, _ := blockDb.Get([]byte("ProtocolVersion")) + protov := int(common.NewValue(d).Uint()) + if protov != config.ProtocolVersion && protov != 0 { + path := filepath.Join(config.DataDir, "blockchain") + return nil, fmt.Errorf("Database version mismatch. Protocol(%d / %d). `rm -rf %s`", protov, config.ProtocolVersion, path) + } + saveProtocolVersion(blockDb, config.ProtocolVersion) + */ + glog.V(logger.Info).Infof("Protocol Versions: %v, Network Id: %v", ProtocolVersions, config.NetworkId) if !config.SkipBcVersionCheck { b, _ := blockDb.Get([]byte("BlockchainVersion")) @@ -319,14 +341,14 @@ func New(config *Config) (*Ethereum, error) { eventMux: &event.TypeMux{}, accountManager: config.AccountManager, DataDir: config.DataDir, - etherbase: common.HexToAddress(config.Etherbase), + etherbase: config.Etherbase, clientVersion: config.Name, // TODO should separate from Name - ethVersionId: config.ProtocolVersion, netVersionId: config.NetworkId, NatSpec: config.NatSpec, MinerThreads: config.MinerThreads, SolcPath: config.SolcPath, AutoDAG: config.AutoDAG, + PowTest: config.PowTest, GpoMinGasPrice: config.GpoMinGasPrice, GpoMaxGasPrice: config.GpoMaxGasPrice, GpoFullBlockRatio: config.GpoFullBlockRatio, @@ -335,9 +357,17 @@ func New(config *Config) (*Ethereum, error) { GpobaseCorrectionFactor: config.GpobaseCorrectionFactor, } - eth.pow = ethash.New() + if config.PowTest { + glog.V(logger.Info).Infof("ethash used in test mode") + eth.pow, err = ethash.NewForTesting() + if err != nil { + return nil, err + } + } else { + eth.pow = ethash.New() + } genesis := core.GenesisBlock(uint64(config.GenesisNonce), stateDb) - eth.chainManager, err = core.NewChainManager(genesis, blockDb, stateDb, eth.pow, eth.EventMux()) + eth.chainManager, err = core.NewChainManager(genesis, blockDb, stateDb, extraDb, eth.pow, eth.EventMux()) if err != nil { return nil, err } @@ -345,7 +375,7 @@ func New(config *Config) (*Ethereum, error) { eth.blockProcessor = core.NewBlockProcessor(stateDb, extraDb, eth.pow, eth.chainManager, eth.EventMux()) eth.chainManager.SetProcessor(eth.blockProcessor) - eth.protocolManager = NewProtocolManager(config.ProtocolVersion, config.NetworkId, eth.eventMux, eth.txPool, eth.pow, eth.chainManager) + eth.protocolManager = NewProtocolManager(config.NetworkId, eth.eventMux, eth.txPool, eth.pow, eth.chainManager) eth.miner = miner.New(eth, eth.EventMux(), eth.pow) eth.miner.SetGasPrice(config.GasPrice) @@ -358,7 +388,7 @@ func New(config *Config) (*Ethereum, error) { if err != nil { return nil, err } - protocols := []p2p.Protocol{eth.protocolManager.SubProtocol} + protocols := append([]p2p.Protocol{}, eth.protocolManager.SubProtocols...) if config.Shh { protocols = append(protocols, eth.whisper.Protocol()) } @@ -462,17 +492,15 @@ func (s *Ethereum) StartMining(threads int) error { func (s *Ethereum) Etherbase() (eb common.Address, err error) { eb = s.etherbase if (eb == common.Address{}) { - primary, err := s.accountManager.Primary() - if err != nil { - return eb, err - } - if (primary == common.Address{}) { - err = fmt.Errorf("no accounts found") - return eb, err - } - eb = primary + err = fmt.Errorf("etherbase address must be explicitly specified") } - return eb, nil + return +} + +// set in js console via admin interface or wrapper from cli flags +func (self *Ethereum) SetEtherbase(etherbase common.Address) { + self.etherbase = etherbase + self.miner.SetEtherbase(etherbase) } func (s *Ethereum) StopMining() { s.miner.Stop() } @@ -495,7 +523,7 @@ func (s *Ethereum) PeerCount() int { return s.net.PeerCoun func (s *Ethereum) Peers() []*p2p.Peer { return s.net.Peers() } func (s *Ethereum) MaxPeers() int { return s.net.MaxPeers } func (s *Ethereum) ClientVersion() string { return s.clientVersion } -func (s *Ethereum) EthVersion() int { return s.ethVersionId } +func (s *Ethereum) EthVersion() int { return int(s.protocolManager.SubProtocols[0].Version) } func (s *Ethereum) NetVersion() int { return s.netVersionId } func (s *Ethereum) ShhVersion() int { return s.shhVersionId } func (s *Ethereum) Downloader() *downloader.Downloader { return s.protocolManager.downloader } @@ -504,7 +532,7 @@ func (s *Ethereum) Downloader() *downloader.Downloader { return s.protocolMana func (s *Ethereum) Start() error { jsonlogger.LogJson(&logger.LogStarting{ ClientString: s.net.Name, - ProtocolVersion: ProtocolVersion, + ProtocolVersion: s.EthVersion(), }) err := s.net.Start() if err != nil { @@ -560,7 +588,7 @@ done: func (s *Ethereum) StartForTest() { jsonlogger.LogJson(&logger.LogStarting{ ClientString: s.net.Name, - ProtocolVersion: ProtocolVersion, + ProtocolVersion: s.EthVersion(), }) } @@ -667,14 +695,20 @@ func (self *Ethereum) StopAutoDAG() { glog.V(logger.Info).Infof("Automatic pregeneration of ethash DAG OFF (ethash dir: %s)", ethash.DefaultDir) } -func saveProtocolVersion(db common.Database, protov int) { - d, _ := db.Get([]byte("ProtocolVersion")) - protocolVersion := common.NewValue(d).Uint() +/* + // The databases were previously tied to protocol versions. Currently we + // are moving away from this decision as approaching Frontier. The below + // code was left in for now but should eventually be just dropped. - if protocolVersion == 0 { - db.Put([]byte("ProtocolVersion"), common.NewValue(protov).Bytes()) + func saveProtocolVersion(db common.Database, protov int) { + d, _ := db.Get([]byte("ProtocolVersion")) + protocolVersion := common.NewValue(d).Uint() + + if protocolVersion == 0 { + db.Put([]byte("ProtocolVersion"), common.NewValue(protov).Bytes()) + } } -} +*/ func saveBlockchainVersion(db common.Database, bcVersion int) { d, _ := db.Get([]byte("BlockchainVersion")) diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go index 39976aae1..5ce98816d 100644 --- a/eth/downloader/downloader.go +++ b/eth/downloader/downloader.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + // Package downloader contains the manual full chain synchronisation. package downloader @@ -19,18 +35,24 @@ import ( "gopkg.in/fatih/set.v0" ) +const ( + eth60 = 60 // Constant to check for old protocol support + eth61 = 61 // Constant to check for new protocol support +) + var ( - MinHashFetch = 512 // Minimum amount of hashes to not consider a peer stalling - MaxHashFetch = 2048 // Amount of hashes to be fetched per retrieval request - MaxBlockFetch = 128 // Amount of blocks to be fetched per retrieval request + MinHashFetch = 512 // Minimum amount of hashes to not consider a peer stalling + MaxHashFetch = 512 // Amount of hashes to be fetched per retrieval request + MaxBlockFetch = 128 // Amount of blocks to be fetched per retrieval request hashTTL = 5 * time.Second // Time it takes for a hash request to time out blockSoftTTL = 3 * time.Second // Request completion threshold for increasing or decreasing a peer's bandwidth blockHardTTL = 3 * blockSoftTTL // Maximum time allowance before a block request is considered expired crossCheckCycle = time.Second // Period after which to check for expired cross checks - maxBannedHashes = 4096 // Number of bannable hashes before phasing old ones out - maxBlockProcess = 256 // Number of blocks to import at once into the chain + maxQueuedHashes = 256 * 1024 // Maximum number of hashes to queue for import (DOS protection) + maxBannedHashes = 4096 // Number of bannable hashes before phasing old ones out + maxBlockProcess = 256 // Number of blocks to import at once into the chain ) var ( @@ -58,6 +80,9 @@ type hashCheckFn func(common.Hash) bool // blockRetrievalFn is a callback type for retrieving a block from the local chain. type blockRetrievalFn func(common.Hash) *types.Block +// headRetrievalFn is a callback type for retrieving the head block from the local chain. +type headRetrievalFn func() *types.Block + // chainInsertFn is a callback type to insert a batch of blocks into the local chain. type chainInsertFn func(types.Blocks) (int, error) @@ -98,6 +123,7 @@ type Downloader struct { // Callbacks hasBlock hashCheckFn // Checks if a block is present in the chain getBlock blockRetrievalFn // Retrieves a block from the chain + headBlock headRetrievalFn // Retrieves the head block from the chain insertChain chainInsertFn // Injects a batch of blocks into the chain dropPeer peerDropFn // Drops a peer for misbehaving @@ -109,8 +135,9 @@ type Downloader struct { // Channels newPeerCh chan *peer - hashCh chan hashPack - blockCh chan blockPack + hashCh chan hashPack // Channel receiving inbound hashes + blockCh chan blockPack // Channel receiving inbound blocks + processCh chan bool // Channel to signal the block fetcher of new or finished work cancelCh chan struct{} // Channel to cancel mid-flight syncs cancelLock sync.RWMutex // Lock to protect the cancel channel in delivers @@ -123,7 +150,7 @@ type Block struct { } // New creates a new downloader to fetch hashes and blocks from remote peers. -func New(mux *event.TypeMux, hasBlock hashCheckFn, getBlock blockRetrievalFn, insertChain chainInsertFn, dropPeer peerDropFn) *Downloader { +func New(mux *event.TypeMux, hasBlock hashCheckFn, getBlock blockRetrievalFn, headBlock headRetrievalFn, insertChain chainInsertFn, dropPeer peerDropFn) *Downloader { // Create the base downloader downloader := &Downloader{ mux: mux, @@ -131,11 +158,13 @@ func New(mux *event.TypeMux, hasBlock hashCheckFn, getBlock blockRetrievalFn, in peers: newPeerSet(), hasBlock: hasBlock, getBlock: getBlock, + headBlock: headBlock, insertChain: insertChain, dropPeer: dropPeer, newPeerCh: make(chan *peer, 1), hashCh: make(chan hashPack, 1), blockCh: make(chan blockPack, 1), + processCh: make(chan bool, 1), } // Inject all the known bad hashes downloader.banned = set.New() @@ -175,7 +204,7 @@ func (d *Downloader) Synchronising() bool { // RegisterPeer injects a new download peer into the set of block source to be // used for fetching hashes and blocks from. -func (d *Downloader) RegisterPeer(id string, head common.Hash, getHashes hashFetcherFn, getBlocks blockFetcherFn) error { +func (d *Downloader) RegisterPeer(id string, version int, head common.Hash, getRelHashes relativeHashFetcherFn, getAbsHashes absoluteHashFetcherFn, getBlocks blockFetcherFn) error { // If the peer wants to send a banned hash, reject if d.banned.Has(head) { glog.V(logger.Debug).Infoln("Register rejected, head hash banned:", id) @@ -183,7 +212,7 @@ func (d *Downloader) RegisterPeer(id string, head common.Hash, getHashes hashFet } // Otherwise try to construct and register the peer glog.V(logger.Detail).Infoln("Registering peer", id) - if err := d.peers.Register(newPeer(id, head, getHashes, getBlocks)); err != nil { + if err := d.peers.Register(newPeer(id, version, head, getRelHashes, getAbsHashes, getBlocks)); err != nil { glog.V(logger.Error).Infoln("Register failed:", err) return err } @@ -289,12 +318,38 @@ func (d *Downloader) syncWithPeer(p *peer, hash common.Hash) (err error) { } }() - glog.V(logger.Debug).Infoln("Synchronizing with the network using:", p.id) - if err = d.fetchHashes(p, hash); err != nil { - return err - } - if err = d.fetchBlocks(); err != nil { - return err + glog.V(logger.Debug).Infof("Synchronizing with the network using: %s, eth/%d", p.id, p.version) + switch p.version { + case eth60: + // Old eth/60 version, use reverse hash retrieval algorithm + if err = d.fetchHashes60(p, hash); err != nil { + return err + } + if err = d.fetchBlocks60(); err != nil { + return err + } + case eth61: + // New eth/61, use forward, concurrent hash and block retrieval algorithm + number, err := d.findAncestor(p) + if err != nil { + return err + } + errc := make(chan error, 2) + go func() { errc <- d.fetchHashes(p, number+1) }() + go func() { errc <- d.fetchBlocks(number + 1) }() + + // If any fetcher fails, cancel the other + if err := <-errc; err != nil { + d.cancel() + <-errc + return err + } + return <-errc + + default: + // Something very wrong, stop right here + glog.V(logger.Error).Infof("Unsupported eth protocol: %d", p.version) + return errBadPeer } glog.V(logger.Debug).Infoln("Synchronization completed") @@ -326,10 +381,10 @@ func (d *Downloader) Terminate() { d.cancel() } -// fetchHahes starts retrieving hashes backwards from a specific peer and hash, +// fetchHashes60 starts retrieving hashes backwards from a specific peer and hash, // up until it finds a common ancestor. If the source peer times out, alternative // ones are tried for continuation. -func (d *Downloader) fetchHashes(p *peer, h common.Hash) error { +func (d *Downloader) fetchHashes60(p *peer, h common.Hash) error { var ( start = time.Now() active = p // active peer will help determine the current active peer @@ -346,12 +401,12 @@ func (d *Downloader) fetchHashes(p *peer, h common.Hash) error { <-timeout.C // timeout channel should be initially empty. getHashes := func(from common.Hash) { - go active.getHashes(from) + go active.getRelHashes(from) timeout.Reset(hashTTL) } // Add the hash to the queue, and start hash retrieval. - d.queue.Insert([]common.Hash{h}) + d.queue.Insert([]common.Hash{h}, false) getHashes(h) attempted[p.id] = true @@ -377,7 +432,7 @@ func (d *Downloader) fetchHashes(p *peer, h common.Hash) error { if d.banned.Has(hash) { glog.V(logger.Debug).Infof("Peer (%s) sent a known invalid chain", active.id) - d.queue.Insert(hashPack.hashes[:index+1]) + d.queue.Insert(hashPack.hashes[:index+1], false) if err := d.banBlocks(active.id, hash); err != nil { glog.V(logger.Debug).Infof("Failed to ban batch of blocks: %v", err) } @@ -395,7 +450,7 @@ func (d *Downloader) fetchHashes(p *peer, h common.Hash) error { } } // Insert all the new hashes, but only continue if got something useful - inserts := d.queue.Insert(hashPack.hashes) + inserts := d.queue.Insert(hashPack.hashes, false) if len(inserts) == 0 && !done { glog.V(logger.Debug).Infof("Peer (%s) responded with stale hashes", active.id) return errBadPeer @@ -422,9 +477,9 @@ func (d *Downloader) fetchHashes(p *peer, h common.Hash) error { continue } // We're done, prepare the download cache and proceed pulling the blocks - offset := 0 + offset := uint64(0) if block := d.getBlock(head); block != nil { - offset = int(block.NumberU64() + 1) + offset = block.NumberU64() + 1 } d.queue.Prepare(offset) finished = true @@ -481,10 +536,10 @@ func (d *Downloader) fetchHashes(p *peer, h common.Hash) error { return nil } -// fetchBlocks iteratively downloads the entire schedules block-chain, taking +// fetchBlocks60 iteratively downloads the entire schedules block-chain, taking // any available peers, reserving a chunk of blocks for each, wait for delivery // and periodically checking for timeouts. -func (d *Downloader) fetchBlocks() error { +func (d *Downloader) fetchBlocks60() error { glog.V(logger.Debug).Infoln("Downloading", d.queue.Pending(), "block(s)") start := time.Now() @@ -619,6 +674,332 @@ out: return nil } +// findAncestor tries to locate the common ancestor block of the local chain and +// a remote peers blockchain. In the general case when our node was in sync and +// on the correct chain, checking the top N blocks should already get us a match. +// In the rare scenario when we ended up on a long soft fork (i.e. none of the +// head blocks match), we do a binary search to find the common ancestor. +func (d *Downloader) findAncestor(p *peer) (uint64, error) { + glog.V(logger.Debug).Infof("%v: looking for common ancestor", p) + + // Request out head blocks to short circuit ancestor location + head := d.headBlock().NumberU64() + from := int64(head) - int64(MaxHashFetch) + if from < 0 { + from = 0 + } + go p.getAbsHashes(uint64(from), MaxHashFetch) + + // Wait for the remote response to the head fetch + number, hash := uint64(0), common.Hash{} + timeout := time.After(hashTTL) + + for finished := false; !finished; { + select { + case <-d.cancelCh: + return 0, errCancelHashFetch + + case hashPack := <-d.hashCh: + // Discard anything not from the origin peer + if hashPack.peerId != p.id { + glog.V(logger.Debug).Infof("Received hashes from incorrect peer(%s)", hashPack.peerId) + break + } + // Make sure the peer actually gave something valid + hashes := hashPack.hashes + if len(hashes) == 0 { + glog.V(logger.Debug).Infof("%v: empty head hash set", p) + return 0, errEmptyHashSet + } + // Check if a common ancestor was found + finished = true + for i := len(hashes) - 1; i >= 0; i-- { + if d.hasBlock(hashes[i]) { + number, hash = uint64(from)+uint64(i), hashes[i] + break + } + } + + case <-d.blockCh: + // Out of bounds blocks received, ignore them + + case <-timeout: + glog.V(logger.Debug).Infof("%v: head hash timeout", p) + return 0, errTimeout + } + } + // If the head fetch already found an ancestor, return + if !common.EmptyHash(hash) { + glog.V(logger.Debug).Infof("%v: common ancestor: #%d [%x]", p, number, hash[:4]) + return number, nil + } + // Ancestor not found, we need to binary search over our chain + start, end := uint64(0), head + for start+1 < end { + // Split our chain interval in two, and request the hash to cross check + check := (start + end) / 2 + + timeout := time.After(hashTTL) + go p.getAbsHashes(uint64(check), 1) + + // Wait until a reply arrives to this request + for arrived := false; !arrived; { + select { + case <-d.cancelCh: + return 0, errCancelHashFetch + + case hashPack := <-d.hashCh: + // Discard anything not from the origin peer + if hashPack.peerId != p.id { + glog.V(logger.Debug).Infof("Received hashes from incorrect peer(%s)", hashPack.peerId) + break + } + // Make sure the peer actually gave something valid + hashes := hashPack.hashes + if len(hashes) != 1 { + glog.V(logger.Debug).Infof("%v: invalid search hash set (%d)", p, len(hashes)) + return 0, errBadPeer + } + arrived = true + + // Modify the search interval based on the response + block := d.getBlock(hashes[0]) + if block == nil { + end = check + break + } + if block.NumberU64() != check { + glog.V(logger.Debug).Infof("%v: non requested hash #%d [%x], instead of #%d", p, block.NumberU64(), block.Hash().Bytes()[:4], check) + return 0, errBadPeer + } + start = check + + case <-d.blockCh: + // Out of bounds blocks received, ignore them + + case <-timeout: + glog.V(logger.Debug).Infof("%v: search hash timeout", p) + return 0, errTimeout + } + } + } + return start, nil +} + +// fetchHashes keeps retrieving hashes from the requested number, until no more +// are returned, potentially throttling on the way. +func (d *Downloader) fetchHashes(p *peer, from uint64) error { + glog.V(logger.Debug).Infof("%v: downloading hashes from #%d", p, from) + + // Create a timeout timer, and the associated hash fetcher + timeout := time.NewTimer(0) // timer to dump a non-responsive active peer + <-timeout.C // timeout channel should be initially empty + defer timeout.Stop() + + getHashes := func(from uint64) { + glog.V(logger.Detail).Infof("%v: fetching %d hashes from #%d", p, MaxHashFetch, from) + + go p.getAbsHashes(from, MaxHashFetch) + timeout.Reset(hashTTL) + } + // Start pulling hashes, until all are exhausted + getHashes(from) + for { + select { + case <-d.cancelCh: + return errCancelHashFetch + + case hashPack := <-d.hashCh: + // Make sure the active peer is giving us the hashes + if hashPack.peerId != p.id { + glog.V(logger.Debug).Infof("Received hashes from incorrect peer(%s)", hashPack.peerId) + break + } + timeout.Stop() + + // If no more hashes are inbound, notify the block fetcher and return + if len(hashPack.hashes) == 0 { + glog.V(logger.Debug).Infof("%v: no available hashes", p) + + select { + case d.processCh <- false: + case <-d.cancelCh: + } + return nil + } + // Otherwise insert all the new hashes, aborting in case of junk + glog.V(logger.Detail).Infof("%v: inserting %d hashes from #%d", p, len(hashPack.hashes), from) + + inserts := d.queue.Insert(hashPack.hashes, true) + if len(inserts) != len(hashPack.hashes) { + glog.V(logger.Debug).Infof("%v: stale hashes", p) + return errBadPeer + } + // Notify the block fetcher of new hashes, but stop if queue is full + cont := d.queue.Pending() < maxQueuedHashes + select { + case d.processCh <- cont: + default: + } + if !cont { + return nil + } + // Queue not yet full, fetch the next batch + from += uint64(len(hashPack.hashes)) + getHashes(from) + + case <-timeout.C: + glog.V(logger.Debug).Infof("%v: hash request timed out", p) + return errTimeout + } + } +} + +// fetchBlocks iteratively downloads the scheduled hashes, taking any available +// peers, reserving a chunk of blocks for each, waiting for delivery and also +// periodically checking for timeouts. +func (d *Downloader) fetchBlocks(from uint64) error { + glog.V(logger.Debug).Infof("Downloading blocks from #%d", from) + defer glog.V(logger.Debug).Infof("Block download terminated") + + // Create a timeout timer for scheduling expiration tasks + ticker := time.NewTicker(100 * time.Millisecond) + defer ticker.Stop() + + update := make(chan struct{}, 1) + + // Prepare the queue and fetch blocks until the hash fetcher's done + d.queue.Prepare(from) + finished := false + + for { + select { + case <-d.cancelCh: + return errCancelBlockFetch + + case blockPack := <-d.blockCh: + // If the peer was previously banned and failed to deliver it's pack + // in a reasonable time frame, ignore it's message. + if peer := d.peers.Peer(blockPack.peerId); peer != nil { + // Deliver the received chunk of blocks, and demote in case of errors + err := d.queue.Deliver(blockPack.peerId, blockPack.blocks) + switch err { + case nil: + // If no blocks were delivered, demote the peer (need the delivery above) + if len(blockPack.blocks) == 0 { + peer.Demote() + peer.SetIdle() + glog.V(logger.Detail).Infof("%s: no blocks delivered", peer) + break + } + // All was successful, promote the peer and potentially start processing + peer.Promote() + peer.SetIdle() + glog.V(logger.Detail).Infof("%s: delivered %d blocks", peer, len(blockPack.blocks)) + go d.process() + + case errInvalidChain: + // The hash chain is invalid (blocks are not ordered properly), abort + return err + + case errNoFetchesPending: + // Peer probably timed out with its delivery but came through + // in the end, demote, but allow to to pull from this peer. + peer.Demote() + peer.SetIdle() + glog.V(logger.Detail).Infof("%s: out of bound delivery", peer) + + case errStaleDelivery: + // Delivered something completely else than requested, usually + // caused by a timeout and delivery during a new sync cycle. + // Don't set it to idle as the original request should still be + // in flight. + peer.Demote() + glog.V(logger.Detail).Infof("%s: stale delivery", peer) + + default: + // Peer did something semi-useful, demote but keep it around + peer.Demote() + peer.SetIdle() + glog.V(logger.Detail).Infof("%s: delivery partially failed: %v", peer, err) + go d.process() + } + } + // Blocks arrived, try to update the progress + select { + case update <- struct{}{}: + default: + } + + case cont := <-d.processCh: + // The hash fetcher sent a continuation flag, check if it's done + if !cont { + finished = true + } + // Hashes arrive, try to update the progress + select { + case update <- struct{}{}: + default: + } + + case <-ticker.C: + // Sanity check update the progress + select { + case update <- struct{}{}: + default: + } + + case <-update: + // Short circuit if we lost all our peers + if d.peers.Len() == 0 { + return errNoPeers + } + // Check for block request timeouts and demote the responsible peers + for _, pid := range d.queue.Expire(blockHardTTL) { + if peer := d.peers.Peer(pid); peer != nil { + peer.Demote() + glog.V(logger.Detail).Infof("%s: block delivery timeout", peer) + } + } + // If there's noting more to fetch, wait or terminate + if d.queue.Pending() == 0 { + if d.queue.InFlight() == 0 && finished { + glog.V(logger.Debug).Infof("Block fetching completed") + return nil + } + break + } + // Send a download request to all idle peers, until throttled + for _, peer := range d.peers.IdlePeers() { + // Short circuit if throttling activated + if d.queue.Throttle() { + break + } + // Reserve a chunk of hashes for a peer. A nil can mean either that + // no more hashes are available, or that the peer is known not to + // have them. + request := d.queue.Reserve(peer, peer.Capacity()) + if request == nil { + continue + } + if glog.V(logger.Detail) { + glog.Infof("%s: requesting %d blocks", peer, len(request.Hashes)) + } + // Fetch the chunk and make sure any errors return the hashes to the queue + if err := peer.Fetch(request); err != nil { + glog.V(logger.Error).Infof("%v: fetch failed, rescheduling", peer) + d.queue.Cancel(request) + } + } + // Make sure that we have peers available for fetching. If all peers have been tried + // and all failed throw an error + if !d.queue.Throttle() && d.queue.InFlight() == 0 { + return errPeersUnavailable + } + } + } +} + // banBlocks retrieves a batch of blocks from a peer feeding us invalid hashes, // and bans the head of the retrieved batch. // diff --git a/eth/downloader/downloader_test.go b/eth/downloader/downloader_test.go index 7feca8782..ff2e59d92 100644 --- a/eth/downloader/downloader_test.go +++ b/eth/downloader/downloader_test.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package downloader import ( @@ -21,7 +37,7 @@ var ( genesis = core.GenesisBlockForTesting(testdb, common.Address{}, big.NewInt(0)) ) -// makeChain creates a chain of n blocks starting at and including +// makeChain creates a chain of n blocks starting at but not including // parent. the returned hash chain is ordered head->parent. func makeChain(n int, seed byte, parent *types.Block) ([]common.Hash, map[common.Hash]*types.Block) { blocks := core.GenerateChain(parent, testdb, n, func(i int, gen *core.BlockGen) { @@ -42,7 +58,7 @@ func makeChain(n int, seed byte, parent *types.Block) ([]common.Hash, map[common // h2[:f] are different but have a common suffix of length n-f. func makeChainFork(n, f int, parent *types.Block) (h1, h2 []common.Hash, b1, b2 map[common.Hash]*types.Block) { // Create the common suffix. - h, b := makeChain(n-f-1, 0, parent) + h, b := makeChain(n-f, 0, parent) // Create the forks. h1, b1 = makeChain(f, 1, b[h[0]]) h1 = append(h1, h[1:]...) @@ -75,7 +91,7 @@ func newTester() *downloadTester { peerHashes: make(map[string][]common.Hash), peerBlocks: make(map[string]map[common.Hash]*types.Block), } - tester.downloader = New(new(event.TypeMux), tester.hasBlock, tester.getBlock, tester.insertChain, tester.dropPeer) + tester.downloader = New(new(event.TypeMux), tester.hasBlock, tester.getBlock, tester.headBlock, tester.insertChain, tester.dropPeer) return tester } @@ -83,7 +99,13 @@ func newTester() *downloadTester { // sync starts synchronizing with a remote peer, blocking until it completes. func (dl *downloadTester) sync(id string) error { err := dl.downloader.synchronise(id, dl.peerHashes[id][0]) - for atomic.LoadInt32(&dl.downloader.processing) == 1 { + for { + // If the queue is empty and processing stopped, break + hashes, blocks := dl.downloader.queue.Size() + if hashes+blocks == 0 && atomic.LoadInt32(&dl.downloader.processing) == 0 { + break + } + // Otherwise sleep a bit and retry time.Sleep(time.Millisecond) } return err @@ -99,6 +121,11 @@ func (dl *downloadTester) getBlock(hash common.Hash) *types.Block { return dl.ownBlocks[hash] } +// headBlock retrieves the current head block from the canonical chain. +func (dl *downloadTester) headBlock() *types.Block { + return dl.getBlock(dl.ownHashes[len(dl.ownHashes)-1]) +} + // insertChain injects a new batch of blocks into the simulated chain. func (dl *downloadTester) insertChain(blocks types.Blocks) (int, error) { for i, block := range blocks { @@ -112,15 +139,15 @@ func (dl *downloadTester) insertChain(blocks types.Blocks) (int, error) { } // newPeer registers a new block download source into the downloader. -func (dl *downloadTester) newPeer(id string, hashes []common.Hash, blocks map[common.Hash]*types.Block) error { - return dl.newSlowPeer(id, hashes, blocks, 0) +func (dl *downloadTester) newPeer(id string, version int, hashes []common.Hash, blocks map[common.Hash]*types.Block) error { + return dl.newSlowPeer(id, version, hashes, blocks, 0) } // newSlowPeer registers a new block download source into the downloader, with a // specific delay time on processing the network packets sent to it, simulating // potentially slow network IO. -func (dl *downloadTester) newSlowPeer(id string, hashes []common.Hash, blocks map[common.Hash]*types.Block, delay time.Duration) error { - err := dl.downloader.RegisterPeer(id, hashes[0], dl.peerGetHashesFn(id, delay), dl.peerGetBlocksFn(id, delay)) +func (dl *downloadTester) newSlowPeer(id string, version int, hashes []common.Hash, blocks map[common.Hash]*types.Block, delay time.Duration) error { + err := dl.downloader.RegisterPeer(id, version, hashes[0], dl.peerGetRelHashesFn(id, delay), dl.peerGetAbsHashesFn(id, version, delay), dl.peerGetBlocksFn(id, delay)) if err == nil { // Assign the owned hashes and blocks to the peer (deep copy) dl.peerHashes[id] = make([]common.Hash, len(hashes)) @@ -141,10 +168,10 @@ func (dl *downloadTester) dropPeer(id string) { dl.downloader.UnregisterPeer(id) } -// peerGetBlocksFn constructs a getHashes function associated with a particular +// peerGetRelHashesFn constructs a GetHashes function associated with a specific // peer in the download tester. The returned function can be used to retrieve // batches of hashes from the particularly requested peer. -func (dl *downloadTester) peerGetHashesFn(id string, delay time.Duration) func(head common.Hash) error { +func (dl *downloadTester) peerGetRelHashesFn(id string, delay time.Duration) func(head common.Hash) error { return func(head common.Hash) error { time.Sleep(delay) @@ -174,13 +201,43 @@ func (dl *downloadTester) peerGetHashesFn(id string, delay time.Duration) func(h } } +// peerGetAbsHashesFn constructs a GetHashesFromNumber function associated with +// a particular peer in the download tester. The returned function can be used to +// retrieve batches of hashes from the particularly requested peer. +func (dl *downloadTester) peerGetAbsHashesFn(id string, version int, delay time.Duration) func(uint64, int) error { + // If the simulated peer runs eth/60, this message is not supported + if version == eth60 { + return func(uint64, int) error { return nil } + } + // Otherwise create a method to request the blocks by number + return func(head uint64, count int) error { + time.Sleep(delay) + + limit := count + if dl.maxHashFetch > 0 { + limit = dl.maxHashFetch + } + // Gather the next batch of hashes + hashes := dl.peerHashes[id] + result := make([]common.Hash, 0, limit) + for i := 0; i < limit && len(hashes)-int(head)-1-i >= 0; i++ { + result = append(result, hashes[len(hashes)-int(head)-1-i]) + } + // Delay delivery a bit to allow attacks to unfold + go func() { + time.Sleep(time.Millisecond) + dl.downloader.DeliverHashes(id, result) + }() + return nil + } +} + // peerGetBlocksFn constructs a getBlocks function associated with a particular // peer in the download tester. The returned function can be used to retrieve // batches of blocks from the particularly requested peer. func (dl *downloadTester) peerGetBlocksFn(id string, delay time.Duration) func([]common.Hash) error { return func(hashes []common.Hash) error { time.Sleep(delay) - blocks := dl.peerBlocks[id] result := make([]*types.Block, 0, len(hashes)) for _, hash := range hashes { @@ -195,13 +252,13 @@ func (dl *downloadTester) peerGetBlocksFn(id string, delay time.Duration) func([ } // Tests that simple synchronization, without throttling from a good peer works. -func TestSynchronisation(t *testing.T) { +func TestSynchronisation60(t *testing.T) { // Create a small enough block chain to download and the tester targetBlocks := blockCacheLimit - 15 hashes, blocks := makeChain(targetBlocks, 0, genesis) tester := newTester() - tester.newPeer("peer", hashes, blocks) + tester.newPeer("peer", eth60, hashes, blocks) // Synchronise with the peer and make sure all blocks were retrieved if err := tester.sync("peer"); err != nil { @@ -212,54 +269,35 @@ func TestSynchronisation(t *testing.T) { } } -// Tests that an inactive downloader will not accept incoming hashes and blocks. -func TestInactiveDownloader(t *testing.T) { - tester := newTester() - - // Check that neither hashes nor blocks are accepted - if err := tester.downloader.DeliverHashes("bad peer", []common.Hash{}); err != errNoSyncActive { - t.Errorf("error mismatch: have %v, want %v", err, errNoSyncActive) - } - if err := tester.downloader.DeliverBlocks("bad peer", []*types.Block{}); err != errNoSyncActive { - t.Errorf("error mismatch: have %v, want %v", err, errNoSyncActive) - } -} - -// Tests that a canceled download wipes all previously accumulated state. -func TestCancel(t *testing.T) { - // Create a small enough block chain to download and the tester +// Tests that simple synchronization against a canonical chain works correctly. +// In this test common ancestor lookup should be short circuited and not require +// binary searching. +func TestCanonicalSynchronisation(t *testing.T) { + // Create a small enough block chain to download targetBlocks := blockCacheLimit - 15 hashes, blocks := makeChain(targetBlocks, 0, genesis) tester := newTester() - tester.newPeer("peer", hashes, blocks) + tester.newPeer("peer", eth61, hashes, blocks) - // Make sure canceling works with a pristine downloader - tester.downloader.cancel() - hashCount, blockCount := tester.downloader.queue.Size() - if hashCount > 0 || blockCount > 0 { - t.Errorf("block or hash count mismatch: %d hashes, %d blocks, want 0", hashCount, blockCount) - } - // Synchronise with the peer, but cancel afterwards + // Synchronise with the peer and make sure all blocks were retrieved if err := tester.sync("peer"); err != nil { t.Fatalf("failed to synchronise blocks: %v", err) } - tester.downloader.cancel() - hashCount, blockCount = tester.downloader.queue.Size() - if hashCount > 0 || blockCount > 0 { - t.Errorf("block or hash count mismatch: %d hashes, %d blocks, want 0", hashCount, blockCount) + if imported := len(tester.ownBlocks); imported != targetBlocks+1 { + t.Fatalf("synchronised block mismatch: have %v, want %v", imported, targetBlocks+1) } } // Tests that if a large batch of blocks are being downloaded, it is throttled // until the cached blocks are retrieved. -func TestThrottling(t *testing.T) { +func TestThrottling60(t *testing.T) { // Create a long block chain to download and the tester targetBlocks := 8 * blockCacheLimit hashes, blocks := makeChain(targetBlocks, 0, genesis) tester := newTester() - tester.newPeer("peer", hashes, blocks) + tester.newPeer("peer", eth60, hashes, blocks) // Wrap the importer to allow stepping done := make(chan int) @@ -307,6 +345,158 @@ func TestThrottling(t *testing.T) { } } +// Tests that if a large batch of blocks are being downloaded, it is throttled +// until the cached blocks are retrieved. +func TestThrottling(t *testing.T) { + // Create a long block chain to download and the tester + targetBlocks := 8 * blockCacheLimit + hashes, blocks := makeChain(targetBlocks, 0, genesis) + + tester := newTester() + tester.newPeer("peer", eth61, hashes, blocks) + + // Wrap the importer to allow stepping + done := make(chan int) + tester.downloader.insertChain = func(blocks types.Blocks) (int, error) { + n, err := tester.insertChain(blocks) + done <- n + return n, err + } + // Start a synchronisation concurrently + errc := make(chan error) + go func() { + errc <- tester.sync("peer") + }() + // Iteratively take some blocks, always checking the retrieval count + for len(tester.ownBlocks) < targetBlocks+1 { + // Wait a bit for sync to throttle itself + var cached int + for start := time.Now(); time.Since(start) < 3*time.Second; { + time.Sleep(25 * time.Millisecond) + + cached = len(tester.downloader.queue.blockPool) + if cached == blockCacheLimit || len(tester.ownBlocks)+cached == targetBlocks+1 { + break + } + } + // Make sure we filled up the cache, then exhaust it + time.Sleep(25 * time.Millisecond) // give it a chance to screw up + if cached != blockCacheLimit && len(tester.ownBlocks)+cached < targetBlocks+1 { + t.Fatalf("block count mismatch: have %v, want %v", cached, blockCacheLimit) + } + <-done // finish previous blocking import + for cached > maxBlockProcess { + cached -= <-done + } + time.Sleep(25 * time.Millisecond) // yield to the insertion + } + <-done // finish the last blocking import + + // Check that we haven't pulled more blocks than available + if len(tester.ownBlocks) > targetBlocks+1 { + t.Fatalf("target block count mismatch: have %v, want %v", len(tester.ownBlocks), targetBlocks+1) + } + if err := <-errc; err != nil { + t.Fatalf("block synchronization failed: %v", err) + } +} + +// Tests that simple synchronization against a forked chain works correctly. In +// this test common ancestor lookup should *not* be short circuited, and a full +// binary search should be executed. +func TestForkedSynchronisation(t *testing.T) { + // Create a long enough forked chain + common, fork := MaxHashFetch, 2*MaxHashFetch + hashesA, hashesB, blocksA, blocksB := makeChainFork(common+fork, fork, genesis) + + tester := newTester() + tester.newPeer("fork A", eth61, hashesA, blocksA) + tester.newPeer("fork B", eth61, hashesB, blocksB) + + // Synchronise with the peer and make sure all blocks were retrieved + if err := tester.sync("fork A"); err != nil { + t.Fatalf("failed to synchronise blocks: %v", err) + } + if imported := len(tester.ownBlocks); imported != common+fork+1 { + t.Fatalf("synchronised block mismatch: have %v, want %v", imported, common+fork+1) + } + // Synchronise with the second peer and make sure that fork is pulled too + if err := tester.sync("fork B"); err != nil { + t.Fatalf("failed to synchronise blocks: %v", err) + } + if imported := len(tester.ownBlocks); imported != common+2*fork+1 { + t.Fatalf("synchronised block mismatch: have %v, want %v", imported, common+2*fork+1) + } +} + +// Tests that an inactive downloader will not accept incoming hashes and blocks. +func TestInactiveDownloader(t *testing.T) { + tester := newTester() + + // Check that neither hashes nor blocks are accepted + if err := tester.downloader.DeliverHashes("bad peer", []common.Hash{}); err != errNoSyncActive { + t.Errorf("error mismatch: have %v, want %v", err, errNoSyncActive) + } + if err := tester.downloader.DeliverBlocks("bad peer", []*types.Block{}); err != errNoSyncActive { + t.Errorf("error mismatch: have %v, want %v", err, errNoSyncActive) + } +} + +// Tests that a canceled download wipes all previously accumulated state. +func TestCancel60(t *testing.T) { + // Create a small enough block chain to download and the tester + targetBlocks := blockCacheLimit - 15 + hashes, blocks := makeChain(targetBlocks, 0, genesis) + + tester := newTester() + tester.newPeer("peer", eth60, hashes, blocks) + + // Make sure canceling works with a pristine downloader + tester.downloader.cancel() + hashCount, blockCount := tester.downloader.queue.Size() + if hashCount > 0 || blockCount > 0 { + t.Errorf("block or hash count mismatch: %d hashes, %d blocks, want 0", hashCount, blockCount) + } + // Synchronise with the peer, but cancel afterwards + if err := tester.sync("peer"); err != nil { + t.Fatalf("failed to synchronise blocks: %v", err) + } + tester.downloader.cancel() + hashCount, blockCount = tester.downloader.queue.Size() + if hashCount > 0 || blockCount > 0 { + t.Errorf("block or hash count mismatch: %d hashes, %d blocks, want 0", hashCount, blockCount) + } +} + +// Tests that a canceled download wipes all previously accumulated state. +func TestCancel(t *testing.T) { + // Create a small enough block chain to download and the tester + targetBlocks := blockCacheLimit - 15 + if targetBlocks >= MaxHashFetch { + targetBlocks = MaxHashFetch - 15 + } + hashes, blocks := makeChain(targetBlocks, 0, genesis) + + tester := newTester() + tester.newPeer("peer", eth61, hashes, blocks) + + // Make sure canceling works with a pristine downloader + tester.downloader.cancel() + hashCount, blockCount := tester.downloader.queue.Size() + if hashCount > 0 || blockCount > 0 { + t.Errorf("block or hash count mismatch: %d hashes, %d blocks, want 0", hashCount, blockCount) + } + // Synchronise with the peer, but cancel afterwards + if err := tester.sync("peer"); err != nil { + t.Fatalf("failed to synchronise blocks: %v", err) + } + tester.downloader.cancel() + hashCount, blockCount = tester.downloader.queue.Size() + if hashCount > 0 || blockCount > 0 { + t.Errorf("block or hash count mismatch: %d hashes, %d blocks, want 0", hashCount, blockCount) + } +} + // Tests that synchronisation from multiple peers works as intended (multi thread sanity test). func TestMultiSynchronisation(t *testing.T) { // Create various peers with various parts of the chain @@ -317,7 +507,7 @@ func TestMultiSynchronisation(t *testing.T) { tester := newTester() for i := 0; i < targetPeers; i++ { id := fmt.Sprintf("peer #%d", i) - tester.newPeer(id, hashes[i*blockCacheLimit:], blocks) + tester.newPeer(id, eth60, hashes[i*blockCacheLimit:], blocks) } // Synchronise with the middle peer and make sure half of the blocks were retrieved id := fmt.Sprintf("peer #%d", targetPeers/2) @@ -347,8 +537,8 @@ func TestSlowSynchronisation(t *testing.T) { targetIODelay := time.Second hashes, blocks := makeChain(targetBlocks, 0, genesis) - tester.newSlowPeer("fast", hashes, blocks, 0) - tester.newSlowPeer("slow", hashes, blocks, targetIODelay) + tester.newSlowPeer("fast", eth60, hashes, blocks, 0) + tester.newSlowPeer("slow", eth60, hashes, blocks, targetIODelay) // Try to sync with the peers (pull hashes from fast) start := time.Now() @@ -370,13 +560,14 @@ func TestSlowSynchronisation(t *testing.T) { func TestNonExistingParentAttack(t *testing.T) { tester := newTester() + // Forge a single-link chain with a forged header hashes, blocks := makeChain(1, 0, genesis) - tester.newPeer("valid", hashes, blocks) + tester.newPeer("valid", eth60, hashes, blocks) wrongblock := types.NewBlock(&types.Header{}, nil, nil, nil) wrongblock.Td = blocks[hashes[0]].Td hashes, blocks = makeChain(1, 0, wrongblock) - tester.newPeer("attack", hashes, blocks) + tester.newPeer("attack", eth60, hashes, blocks) // Try and sync with the malicious node and check that it fails if err := tester.sync("attack"); err == nil { @@ -401,8 +592,8 @@ func TestRepeatingHashAttack(t *testing.T) { // TODO: Is this thing valid?? // Create a valid chain, but drop the last link hashes, blocks := makeChain(blockCacheLimit, 0, genesis) - tester.newPeer("valid", hashes, blocks) - tester.newPeer("attack", hashes[:len(hashes)-1], blocks) + tester.newPeer("valid", eth60, hashes, blocks) + tester.newPeer("attack", eth60, hashes[:len(hashes)-1], blocks) // Try and sync with the malicious node errc := make(chan error) @@ -431,10 +622,10 @@ func TestNonExistingBlockAttack(t *testing.T) { // Create a valid chain, but forge the last link hashes, blocks := makeChain(blockCacheLimit, 0, genesis) - tester.newPeer("valid", hashes, blocks) + tester.newPeer("valid", eth60, hashes, blocks) hashes[len(hashes)/2] = common.Hash{} - tester.newPeer("attack", hashes, blocks) + tester.newPeer("attack", eth60, hashes, blocks) // Try and sync with the malicious node and check that it fails if err := tester.sync("attack"); err != errPeersUnavailable { @@ -453,7 +644,7 @@ func TestInvalidHashOrderAttack(t *testing.T) { // Create a valid long chain, but reverse some hashes within hashes, blocks := makeChain(4*blockCacheLimit, 0, genesis) - tester.newPeer("valid", hashes, blocks) + tester.newPeer("valid", eth60, hashes, blocks) chunk1 := make([]common.Hash, blockCacheLimit) chunk2 := make([]common.Hash, blockCacheLimit) @@ -462,7 +653,7 @@ func TestInvalidHashOrderAttack(t *testing.T) { copy(hashes[2*blockCacheLimit:], chunk1) copy(hashes[blockCacheLimit:], chunk2) - tester.newPeer("attack", hashes, blocks) + tester.newPeer("attack", eth60, hashes, blocks) // Try and sync with the malicious node and check that it fails if err := tester.sync("attack"); err != errInvalidChain { @@ -489,8 +680,8 @@ func TestMadeupHashChainAttack(t *testing.T) { rand.Read(randomHashes[i][:]) } - tester.newPeer("valid", hashes, blocks) - tester.newPeer("attack", randomHashes, nil) + tester.newPeer("valid", eth60, hashes, blocks) + tester.newPeer("attack", eth60, randomHashes, nil) // Try and sync with the malicious node and check that it fails if err := tester.sync("attack"); err != errCrossCheckFailed { @@ -517,7 +708,7 @@ func TestMadeupHashChainDrippingAttack(t *testing.T) { // Try and sync with the attacker, one hash at a time tester.maxHashFetch = 1 - tester.newPeer("attack", randomHashes, nil) + tester.newPeer("attack", eth60, randomHashes, nil) if err := tester.sync("attack"); err != errStallingPeer { t.Fatalf("synchronisation error mismatch: have %v, want %v", err, errStallingPeer) } @@ -540,7 +731,7 @@ func TestMadeupBlockChainAttack(t *testing.T) { } // Try and sync with the malicious node and check that it fails tester := newTester() - tester.newPeer("attack", gapped, blocks) + tester.newPeer("attack", eth60, gapped, blocks) if err := tester.sync("attack"); err != errCrossCheckFailed { t.Fatalf("synchronisation error mismatch: have %v, want %v", err, errCrossCheckFailed) } @@ -548,13 +739,13 @@ func TestMadeupBlockChainAttack(t *testing.T) { blockSoftTTL = defaultBlockTTL crossCheckCycle = defaultCrossCheckCycle - tester.newPeer("valid", hashes, blocks) + tester.newPeer("valid", eth60, hashes, blocks) if err := tester.sync("valid"); err != nil { t.Fatalf("failed to synchronise blocks: %v", err) } } -// tests that if one/multiple malicious peers try to feed a banned blockchain to +// Tests that if one/multiple malicious peers try to feed a banned blockchain to // the downloader, it will not keep refetching the same chain indefinitely, but // gradually block pieces of it, until its head is also blocked. func TestBannedChainStarvationAttack(t *testing.T) { @@ -565,8 +756,8 @@ func TestBannedChainStarvationAttack(t *testing.T) { // Create the tester and ban the selected hash. tester := newTester() tester.downloader.banned.Add(forkHashes[fork-1]) - tester.newPeer("valid", hashes, blocks) - tester.newPeer("attack", forkHashes, forkBlocks) + tester.newPeer("valid", eth60, hashes, blocks) + tester.newPeer("attack", eth60, forkHashes, forkBlocks) // Iteratively try to sync, and verify that the banned hash list grows until // the head of the invalid chain is blocked too. @@ -586,7 +777,7 @@ func TestBannedChainStarvationAttack(t *testing.T) { banned = bans } // Check that after banning an entire chain, bad peers get dropped - if err := tester.newPeer("new attacker", forkHashes, forkBlocks); err != errBannedHead { + if err := tester.newPeer("new attacker", eth60, forkHashes, forkBlocks); err != errBannedHead { t.Fatalf("peer registration mismatch: have %v, want %v", err, errBannedHead) } if peer := tester.downloader.peers.Peer("new attacker"); peer != nil { @@ -618,8 +809,8 @@ func TestBannedChainMemoryExhaustionAttack(t *testing.T) { MaxBlockFetch = 4 maxBannedHashes = 256 - tester.newPeer("valid", hashes, blocks) - tester.newPeer("attack", forkHashes, forkBlocks) + tester.newPeer("valid", eth60, hashes, blocks) + tester.newPeer("attack", eth60, forkHashes, forkBlocks) // Iteratively try to sync, and verify that the banned hash list grows until // the head of the invalid chain is blocked too. @@ -664,7 +855,7 @@ func TestOverlappingDeliveryAttack(t *testing.T) { // Register an attacker that always returns non-requested blocks too tester := newTester() - tester.newPeer("attack", hashes, blocks) + tester.newPeer("attack", eth60, hashes, blocks) rawGetBlocks := tester.downloader.peers.Peer("attack").getBlocks tester.downloader.peers.Peer("attack").getBlocks = func(request []common.Hash) error { @@ -712,7 +903,7 @@ func TestHashAttackerDropping(t *testing.T) { for i, tt := range tests { // Register a new peer and ensure it's presence id := fmt.Sprintf("test %d", i) - if err := tester.newPeer(id, []common.Hash{genesis.Hash()}, nil); err != nil { + if err := tester.newPeer(id, eth60, []common.Hash{genesis.Hash()}, nil); err != nil { t.Fatalf("test %d: failed to register new peer: %v", i, err) } if _, ok := tester.peerHashes[id]; !ok { @@ -744,7 +935,7 @@ func TestBlockAttackerDropping(t *testing.T) { for i, tt := range tests { // Register a new peer and ensure it's presence id := fmt.Sprintf("test %d", i) - if err := tester.newPeer(id, []common.Hash{common.Hash{}}, nil); err != nil { + if err := tester.newPeer(id, eth60, []common.Hash{common.Hash{}}, nil); err != nil { t.Fatalf("test %d: failed to register new peer: %v", i, err) } if _, ok := tester.peerHashes[id]; !ok { diff --git a/eth/downloader/events.go b/eth/downloader/events.go index 333feb976..e5c62e121 100644 --- a/eth/downloader/events.go +++ b/eth/downloader/events.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package downloader type DoneEvent struct{} diff --git a/eth/downloader/peer.go b/eth/downloader/peer.go index f36e133e4..89b40d1ac 100644 --- a/eth/downloader/peer.go +++ b/eth/downloader/peer.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + // Contains the active peer-set of the downloader, maintaining both failures // as well as reputation metrics to prioritize the block retrievals. @@ -15,7 +31,8 @@ import ( "gopkg.in/fatih/set.v0" ) -type hashFetcherFn func(common.Hash) error +type relativeHashFetcherFn func(common.Hash) error +type absoluteHashFetcherFn func(uint64, int) error type blockFetcherFn func([]common.Hash) error var ( @@ -37,20 +54,25 @@ type peer struct { ignored *set.Set // Set of hashes not to request (didn't have previously) - getHashes hashFetcherFn // Method to retrieve a batch of hashes (mockable for testing) - getBlocks blockFetcherFn // Method to retrieve a batch of blocks (mockable for testing) + getRelHashes relativeHashFetcherFn // Method to retrieve a batch of hashes from an origin hash + getAbsHashes absoluteHashFetcherFn // Method to retrieve a batch of hashes from an absolute position + getBlocks blockFetcherFn // Method to retrieve a batch of blocks + + version int // Eth protocol version number to switch strategies } // newPeer create a new downloader peer, with specific hash and block retrieval // mechanisms. -func newPeer(id string, head common.Hash, getHashes hashFetcherFn, getBlocks blockFetcherFn) *peer { +func newPeer(id string, version int, head common.Hash, getRelHashes relativeHashFetcherFn, getAbsHashes absoluteHashFetcherFn, getBlocks blockFetcherFn) *peer { return &peer{ - id: id, - head: head, - capacity: 1, - getHashes: getHashes, - getBlocks: getBlocks, - ignored: set.New(), + id: id, + head: head, + capacity: 1, + getRelHashes: getRelHashes, + getAbsHashes: getAbsHashes, + getBlocks: getBlocks, + ignored: set.New(), + version: version, } } diff --git a/eth/downloader/queue.go b/eth/downloader/queue.go index 903f043eb..a758410a5 100644 --- a/eth/downloader/queue.go +++ b/eth/downloader/queue.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + // Contains the block download scheduler to collect download tasks and schedule // them in an ordered, and throttled way. @@ -40,9 +56,9 @@ type queue struct { pendPool map[string]*fetchRequest // Currently pending block retrieval operations - blockPool map[common.Hash]int // Hash-set of the downloaded data blocks, mapping to cache indexes - blockCache []*Block // Downloaded but not yet delivered blocks - blockOffset int // Offset of the first cached block in the block-chain + blockPool map[common.Hash]uint64 // Hash-set of the downloaded data blocks, mapping to cache indexes + blockCache []*Block // Downloaded but not yet delivered blocks + blockOffset uint64 // Offset of the first cached block in the block-chain lock sync.RWMutex } @@ -53,7 +69,7 @@ func newQueue() *queue { hashPool: make(map[common.Hash]int), hashQueue: prque.New(), pendPool: make(map[string]*fetchRequest), - blockPool: make(map[common.Hash]int), + blockPool: make(map[common.Hash]uint64), blockCache: make([]*Block, blockCacheLimit), } } @@ -69,7 +85,7 @@ func (q *queue) Reset() { q.pendPool = make(map[string]*fetchRequest) - q.blockPool = make(map[common.Hash]int) + q.blockPool = make(map[common.Hash]uint64) q.blockOffset = 0 q.blockCache = make([]*Block, blockCacheLimit) } @@ -130,7 +146,7 @@ func (q *queue) Has(hash common.Hash) bool { // Insert adds a set of hashes for the download queue for scheduling, returning // the new hashes encountered. -func (q *queue) Insert(hashes []common.Hash) []common.Hash { +func (q *queue) Insert(hashes []common.Hash, fifo bool) []common.Hash { q.lock.Lock() defer q.lock.Unlock() @@ -147,7 +163,11 @@ func (q *queue) Insert(hashes []common.Hash) []common.Hash { inserts = append(inserts, hash) q.hashPool[hash] = q.hashCounter - q.hashQueue.Push(hash, float32(q.hashCounter)) // Highest gets schedules first + if fifo { + q.hashQueue.Push(hash, -float32(q.hashCounter)) // Lowest gets schedules first + } else { + q.hashQueue.Push(hash, float32(q.hashCounter)) // Highest gets schedules first + } } return inserts } @@ -175,7 +195,7 @@ func (q *queue) GetBlock(hash common.Hash) *Block { return nil } // Return the block if it's still available in the cache - if q.blockOffset <= index && index < q.blockOffset+len(q.blockCache) { + if q.blockOffset <= index && index < q.blockOffset+uint64(len(q.blockCache)) { return q.blockCache[index-q.blockOffset] } return nil @@ -202,7 +222,7 @@ func (q *queue) TakeBlocks() []*Block { for k, n := len(q.blockCache)-len(blocks), len(q.blockCache); k < n; k++ { q.blockCache[k] = nil } - q.blockOffset += len(blocks) + q.blockOffset += uint64(len(blocks)) return blocks } @@ -318,7 +338,7 @@ func (q *queue) Deliver(id string, blocks []*types.Block) (err error) { continue } // If a requested block falls out of the range, the hash chain is invalid - index := int(block.NumberU64()) - q.blockOffset + index := int(int64(block.NumberU64()) - int64(q.blockOffset)) if index >= len(q.blockCache) || index < 0 { return errInvalidChain } @@ -329,7 +349,7 @@ func (q *queue) Deliver(id string, blocks []*types.Block) (err error) { } delete(request.Hashes, hash) delete(q.hashPool, hash) - q.blockPool[hash] = int(block.NumberU64()) + q.blockPool[hash] = block.NumberU64() } // Return all failed or missing fetches to the queue for hash, index := range request.Hashes { @@ -346,7 +366,7 @@ func (q *queue) Deliver(id string, blocks []*types.Block) (err error) { } // Prepare configures the block cache offset to allow accepting inbound blocks. -func (q *queue) Prepare(offset int) { +func (q *queue) Prepare(offset uint64) { q.lock.Lock() defer q.lock.Unlock() diff --git a/eth/fetcher/fetcher.go b/eth/fetcher/fetcher.go index 256b452e1..376cf6f6f 100644 --- a/eth/fetcher/fetcher.go +++ b/eth/fetcher/fetcher.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + // Package fetcher contains the block announcement based synchonisation. package fetcher diff --git a/eth/fetcher/fetcher_test.go b/eth/fetcher/fetcher_test.go index 2c9c9bca3..5050cb742 100644 --- a/eth/fetcher/fetcher_test.go +++ b/eth/fetcher/fetcher_test.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package fetcher import ( diff --git a/eth/fetcher/metrics.go b/eth/fetcher/metrics.go index e46e3c0fb..93f328bc9 100644 --- a/eth/fetcher/metrics.go +++ b/eth/fetcher/metrics.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + // Contains the metrics collected by the fetcher. package fetcher diff --git a/eth/gasprice.go b/eth/gasprice.go index ddf1c8c09..fbb7fec3f 100644 --- a/eth/gasprice.go +++ b/eth/gasprice.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package eth import ( @@ -131,13 +147,12 @@ func (self *GasPriceOracle) processBlock(block *types.Block) { // returns the lowers possible price with which a tx was or could have been included func (self *GasPriceOracle) lowestPrice(block *types.Block) *big.Int { gasUsed := new(big.Int) - recepits, err := self.eth.BlockProcessor().GetBlockReceipts(block.Hash()) - if err != nil { - return self.eth.GpoMinGasPrice - } - if len(recepits) > 0 { - gasUsed = recepits[len(recepits)-1].CumulativeGasUsed + receipts := self.eth.BlockProcessor().GetBlockReceipts(block.Hash()) + if len(receipts) > 0 { + if cgu := receipts[len(receipts)-1].CumulativeGasUsed; cgu != nil { + gasUsed = receipts[len(receipts)-1].CumulativeGasUsed + } } if new(big.Int).Mul(gasUsed, big.NewInt(100)).Cmp(new(big.Int).Mul(block.GasLimit(), diff --git a/eth/handler.go b/eth/handler.go index 278a2bec2..bbb251812 100644 --- a/eth/handler.go +++ b/eth/handler.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package eth import ( @@ -49,7 +65,7 @@ type ProtocolManager struct { fetcher *fetcher.Fetcher peers *peerSet - SubProtocol p2p.Protocol + SubProtocols []p2p.Protocol eventMux *event.TypeMux txSub event.Subscription @@ -68,8 +84,8 @@ type ProtocolManager struct { // NewProtocolManager returns a new ethereum sub protocol manager. The Ethereum sub protocol manages peers capable // with the ethereum network. -func NewProtocolManager(protocolVersion, networkId int, mux *event.TypeMux, txpool txPool, pow pow.PoW, chainman *core.ChainManager) *ProtocolManager { - // Create the protocol manager and initialize peer handlers +func NewProtocolManager(networkId int, mux *event.TypeMux, txpool txPool, pow pow.PoW, chainman *core.ChainManager) *ProtocolManager { + // Create the protocol manager with the base fields manager := &ProtocolManager{ eventMux: mux, txpool: txpool, @@ -79,18 +95,24 @@ func NewProtocolManager(protocolVersion, networkId int, mux *event.TypeMux, txpo txsyncCh: make(chan *txsync), quitSync: make(chan struct{}), } - manager.SubProtocol = p2p.Protocol{ - Name: "eth", - Version: uint(protocolVersion), - Length: ProtocolLength, - Run: func(p *p2p.Peer, rw p2p.MsgReadWriter) error { - peer := manager.newPeer(protocolVersion, networkId, p, rw) - manager.newPeerCh <- peer - return manager.handle(peer) - }, + // Initiate a sub-protocol for every implemented version we can handle + manager.SubProtocols = make([]p2p.Protocol, len(ProtocolVersions)) + for i := 0; i < len(manager.SubProtocols); i++ { + version := ProtocolVersions[i] + + manager.SubProtocols[i] = p2p.Protocol{ + Name: "eth", + Version: version, + Length: ProtocolLengths[i], + Run: func(p *p2p.Peer, rw p2p.MsgReadWriter) error { + peer := manager.newPeer(int(version), networkId, p, rw) + manager.newPeerCh <- peer + return manager.handle(peer) + }, + } } // Construct the different synchronisation mechanisms - manager.downloader = downloader.New(manager.eventMux, manager.chainman.HasBlock, manager.chainman.GetBlock, manager.chainman.InsertChain, manager.removePeer) + manager.downloader = downloader.New(manager.eventMux, manager.chainman.HasBlock, manager.chainman.GetBlock, manager.chainman.CurrentBlock, manager.chainman.InsertChain, manager.removePeer) validator := func(block *types.Block, parent *types.Block) error { return core.ValidateHeader(pow, block.Header(), parent, true) @@ -152,31 +174,32 @@ func (pm *ProtocolManager) Stop() { } func (pm *ProtocolManager) newPeer(pv, nv int, p *p2p.Peer, rw p2p.MsgReadWriter) *peer { - td, current, genesis := pm.chainman.Status() - - return newPeer(pv, nv, genesis, current, td, p, rw) + return newPeer(pv, nv, p, rw) } +// handle is the callback invoked to manage the life cycle of an eth peer. When +// this function terminates, the peer is disconnected. func (pm *ProtocolManager) handle(p *peer) error { - // Execute the Ethereum handshake. - if err := p.handleStatus(); err != nil { + glog.V(logger.Debug).Infof("%v: peer connected [%s]", p, p.Name()) + + // Execute the Ethereum handshake + td, head, genesis := pm.chainman.Status() + if err := p.Handshake(td, head, genesis); err != nil { + glog.V(logger.Debug).Infof("%v: handshake failed: %v", p, err) return err } - - // Register the peer locally. - glog.V(logger.Detail).Infoln("Adding peer", p.id) + // Register the peer locally + glog.V(logger.Detail).Infof("%v: adding peer", p) if err := pm.peers.Register(p); err != nil { - glog.V(logger.Error).Infoln("Addition failed:", err) + glog.V(logger.Error).Infof("%v: addition failed: %v", p, err) return err } defer pm.removePeer(p.id) - // Register the peer in the downloader. If the downloader - // considers it banned, we disconnect. - if err := pm.downloader.RegisterPeer(p.id, p.Head(), p.requestHashes, p.requestBlocks); err != nil { + // Register the peer in the downloader. If the downloader considers it banned, we disconnect + if err := pm.downloader.RegisterPeer(p.id, p.version, p.Head(), p.RequestHashes, p.RequestHashesFromNumber, p.RequestBlocks); err != nil { return err } - // Propagate existing transactions. new transactions appearing // after this will be sent via broadcasts. pm.syncTransactions(p) @@ -184,13 +207,17 @@ func (pm *ProtocolManager) handle(p *peer) error { // main loop. handle incoming messages. for { if err := pm.handleMsg(p); err != nil { + glog.V(logger.Debug).Infof("%v: message handling failed: %v", p, err) return err } } return nil } +// handleMsg is invoked whenever an inbound message is received from a remote +// peer. The remote connection is torn down upon returning any error. func (pm *ProtocolManager) handleMsg(p *peer) error { + // Read the next message from the remote peer, and ensure it's fully consumed msg, err := p.rw.ReadMsg() if err != nil { return err @@ -198,58 +225,69 @@ func (pm *ProtocolManager) handleMsg(p *peer) error { if msg.Size > ProtocolMaxMsgSize { return errResp(ErrMsgTooLarge, "%v > %v", msg.Size, ProtocolMaxMsgSize) } - // make sure that the payload has been fully consumed defer msg.Discard() + // Handle the message depending on its contents switch msg.Code { case StatusMsg: + // Status messages should never arrive after the handshake return errResp(ErrExtraStatusMsg, "uncontrolled status message") - case TxMsg: - // TODO: rework using lazy RLP stream - var txs []*types.Transaction - if err := msg.Decode(&txs); err != nil { - return errResp(ErrDecode, "msg %v: %v", msg, err) - } - for i, tx := range txs { - if tx == nil { - return errResp(ErrDecode, "transaction %d is nil", i) - } - jsonlogger.LogJson(&logger.EthTxReceived{ - TxHash: tx.Hash().Hex(), - RemoteId: p.ID().String(), - }) - } - pm.txpool.AddTransactions(txs) - case GetBlockHashesMsg: - var request getBlockHashesMsgData + // Retrieve the number of hashes to return and from which origin hash + var request getBlockHashesData if err := msg.Decode(&request); err != nil { - return errResp(ErrDecode, "->msg %v: %v", msg, err) + return errResp(ErrDecode, "%v: %v", msg, err) } - if request.Amount > uint64(downloader.MaxHashFetch) { request.Amount = uint64(downloader.MaxHashFetch) } - + // Retrieve the hashes from the block chain and return them hashes := pm.chainman.GetBlockHashesFromHash(request.Hash, request.Amount) - - if glog.V(logger.Debug) { - if len(hashes) == 0 { - glog.Infof("invalid block hash %x", request.Hash.Bytes()[:4]) - } + if len(hashes) == 0 { + glog.V(logger.Debug).Infof("invalid block hash %x", request.Hash.Bytes()[:4]) } + return p.SendBlockHashes(hashes) - // returns either requested hashes or nothing (i.e. not found) - return p.sendBlockHashes(hashes) + case GetBlockHashesFromNumberMsg: + // Retrieve and decode the number of hashes to return and from which origin number + var request getBlockHashesFromNumberData + if err := msg.Decode(&request); err != nil { + return errResp(ErrDecode, "%v: %v", msg, err) + } + if request.Amount > uint64(downloader.MaxHashFetch) { + request.Amount = uint64(downloader.MaxHashFetch) + } + // Calculate the last block that should be retrieved, and short circuit if unavailable + last := pm.chainman.GetBlockByNumber(request.Number + request.Amount - 1) + if last == nil { + last = pm.chainman.CurrentBlock() + request.Amount = last.NumberU64() - request.Number + 1 + } + if last.NumberU64() < request.Number { + return p.SendBlockHashes(nil) + } + // Retrieve the hashes from the last block backwards, reverse and return + hashes := []common.Hash{last.Hash()} + hashes = append(hashes, pm.chainman.GetBlockHashesFromHash(last.Hash(), request.Amount-1)...) + + for i := 0; i < len(hashes)/2; i++ { + hashes[i], hashes[len(hashes)-1-i] = hashes[len(hashes)-1-i], hashes[i] + } + return p.SendBlockHashes(hashes) case BlockHashesMsg: + // A batch of hashes arrived to one of our previous requests msgStream := rlp.NewStream(msg.Payload, uint64(msg.Size)) + reqHashInPacketsMeter.Mark(1) var hashes []common.Hash if err := msgStream.Decode(&hashes); err != nil { break } + reqHashInTrafficMeter.Mark(int64(32 * len(hashes))) + + // Deliver them all to the downloader for queuing err := pm.downloader.DeliverHashes(p.id, hashes) if err != nil { glog.V(logger.Debug).Infoln(err) @@ -293,13 +331,14 @@ func (pm *ProtocolManager) handleMsg(p *peer) error { } list = list[:len(list)-2] + "]" - glog.Infof("Peer %s: no blocks found for requested hashes %s", p.id, list) + glog.Infof("%v: no blocks found for requested hashes %s", p, list) } - return p.sendBlocks(blocks) + return p.SendBlocks(blocks) case BlocksMsg: // Decode the arrived block message msgStream := rlp.NewStream(msg.Payload, uint64(msg.Size)) + reqBlockInPacketsMeter.Mark(1) var blocks []*types.Block if err := msgStream.Decode(&blocks); err != nil { @@ -307,8 +346,9 @@ func (pm *ProtocolManager) handleMsg(p *peer) error { blocks = nil } // Update the receive timestamp of each block - for i := 0; i < len(blocks); i++ { - blocks[i].ReceivedAt = msg.ReceivedAt + for _, block := range blocks { + reqBlockInTrafficMeter.Mark(block.Size().Int64()) + block.ReceivedAt = msg.ReceivedAt } // Filter out any explicitly requested blocks, deliver the rest to the downloader if blocks := pm.fetcher.Filter(blocks); len(blocks) > 0 { @@ -323,9 +363,12 @@ func (pm *ProtocolManager) handleMsg(p *peer) error { if err := msgStream.Decode(&hashes); err != nil { break } + propHashInPacketsMeter.Mark(1) + propHashInTrafficMeter.Mark(int64(32 * len(hashes))) + // Mark the hashes as present at the remote node for _, hash := range hashes { - p.blockHashes.Add(hash) + p.MarkBlock(hash) p.SetHead(hash) } // Schedule all the unknown hashes for retrieval @@ -336,15 +379,18 @@ func (pm *ProtocolManager) handleMsg(p *peer) error { } } for _, hash := range unknown { - pm.fetcher.Notify(p.id, hash, time.Now(), p.requestBlocks) + pm.fetcher.Notify(p.id, hash, time.Now(), p.RequestBlocks) } case NewBlockMsg: // Retrieve and decode the propagated block - var request newBlockMsgData + var request newBlockData if err := msg.Decode(&request); err != nil { return errResp(ErrDecode, "%v: %v", msg, err) } + propBlockInPacketsMeter.Mark(1) + propBlockInTrafficMeter.Mark(request.Block.Size().Int64()) + if err := request.Block.ValidateFields(); err != nil { return errResp(ErrDecode, "block validation %v: %v", msg, err) } @@ -360,7 +406,7 @@ func (pm *ProtocolManager) handleMsg(p *peer) error { RemoteId: p.ID().String(), }) // Mark the peer as owning the block and schedule it for import - p.blockHashes.Add(request.Block.Hash()) + p.MarkBlock(request.Block.Hash()) p.SetHead(request.Block.Hash()) pm.fetcher.Enqueue(p.id, request.Block) @@ -369,6 +415,29 @@ func (pm *ProtocolManager) handleMsg(p *peer) error { p.SetTd(request.TD) go pm.synchronise(p) + case TxMsg: + // Transactions arrived, parse all of them and deliver to the pool + var txs []*types.Transaction + if err := msg.Decode(&txs); err != nil { + return errResp(ErrDecode, "msg %v: %v", msg, err) + } + propTxnInPacketsMeter.Mark(1) + for i, tx := range txs { + // Validate and mark the remote transaction + if tx == nil { + return errResp(ErrDecode, "transaction %d is nil", i) + } + p.MarkTransaction(tx.Hash()) + + // Log it's arrival for later analysis + propTxnInTrafficMeter.Mark(tx.Size().Int64()) + jsonlogger.LogJson(&logger.EthTxReceived{ + TxHash: tx.Hash().Hex(), + RemoteId: p.ID().String(), + }) + } + pm.txpool.AddTransactions(txs) + default: return errResp(ErrInvalidMsgCode, "%v", msg.Code) } @@ -385,28 +454,27 @@ func (pm *ProtocolManager) BroadcastBlock(block *types.Block, propagate bool) { if propagate { transfer := peers[:int(math.Sqrt(float64(len(peers))))] for _, peer := range transfer { - peer.sendNewBlock(block) + peer.SendNewBlock(block) } glog.V(logger.Detail).Infof("propagated block %x to %d peers in %v", hash[:4], len(transfer), time.Since(block.ReceivedAt)) } // Otherwise if the block is indeed in out own chain, announce it if pm.chainman.HasBlock(hash) { for _, peer := range peers { - peer.sendNewBlockHashes([]common.Hash{hash}) + peer.SendNewBlockHashes([]common.Hash{hash}) } glog.V(logger.Detail).Infof("announced block %x to %d peers in %v", hash[:4], len(peers), time.Since(block.ReceivedAt)) } } -// BroadcastTx will propagate the block to its connected peers. It will sort -// out which peers do not contain the block in their block set and will do a -// sqrt(peers) to determine the amount of peers we broadcast to. +// BroadcastTx will propagate a transaction to all peers which are not known to +// already have the given transaction. func (pm *ProtocolManager) BroadcastTx(hash common.Hash, tx *types.Transaction) { // Broadcast transaction to a batch of peers not knowing about it peers := pm.peers.PeersWithoutTx(hash) //FIXME include this again: peers = peers[:int(math.Sqrt(float64(len(peers))))] for _, peer := range peers { - peer.sendTransaction(tx) + peer.SendTransactions(types.Transactions{tx}) } glog.V(logger.Detail).Infoln("broadcast tx to", len(peers), "peers") } diff --git a/eth/metrics.go b/eth/metrics.go new file mode 100644 index 000000000..132172cb5 --- /dev/null +++ b/eth/metrics.go @@ -0,0 +1,44 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + +package eth + +import ( + "github.com/ethereum/go-ethereum/metrics" +) + +var ( + propTxnInPacketsMeter = metrics.NewMeter("eth/prop/txns/in/packets") + propTxnInTrafficMeter = metrics.NewMeter("eth/prop/txns/in/traffic") + propTxnOutPacketsMeter = metrics.NewMeter("eth/prop/txns/out/packets") + propTxnOutTrafficMeter = metrics.NewMeter("eth/prop/txns/out/traffic") + propHashInPacketsMeter = metrics.NewMeter("eth/prop/hashes/in/packets") + propHashInTrafficMeter = metrics.NewMeter("eth/prop/hashes/in/traffic") + propHashOutPacketsMeter = metrics.NewMeter("eth/prop/hashes/out/packets") + propHashOutTrafficMeter = metrics.NewMeter("eth/prop/hashes/out/traffic") + propBlockInPacketsMeter = metrics.NewMeter("eth/prop/blocks/in/packets") + propBlockInTrafficMeter = metrics.NewMeter("eth/prop/blocks/in/traffic") + propBlockOutPacketsMeter = metrics.NewMeter("eth/prop/blocks/out/packets") + propBlockOutTrafficMeter = metrics.NewMeter("eth/prop/blocks/out/traffic") + reqHashInPacketsMeter = metrics.NewMeter("eth/req/hashes/in/packets") + reqHashInTrafficMeter = metrics.NewMeter("eth/req/hashes/in/traffic") + reqHashOutPacketsMeter = metrics.NewMeter("eth/req/hashes/out/packets") + reqHashOutTrafficMeter = metrics.NewMeter("eth/req/hashes/out/traffic") + reqBlockInPacketsMeter = metrics.NewMeter("eth/req/blocks/in/packets") + reqBlockInTrafficMeter = metrics.NewMeter("eth/req/blocks/in/traffic") + reqBlockOutPacketsMeter = metrics.NewMeter("eth/req/blocks/out/packets") + reqBlockOutTrafficMeter = metrics.NewMeter("eth/req/blocks/out/traffic") +) diff --git a/eth/peer.go b/eth/peer.go index c7045282b..ccd5d3c6f 100644 --- a/eth/peer.go +++ b/eth/peer.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package eth import ( @@ -20,25 +36,18 @@ var ( errNotRegistered = errors.New("peer is not registered") ) -type statusMsgData struct { - ProtocolVersion uint32 - NetworkId uint32 - TD *big.Int - CurrentBlock common.Hash - GenesisBlock common.Hash -} - -type getBlockHashesMsgData struct { - Hash common.Hash - Amount uint64 -} +const ( + maxKnownTxs = 32768 // Maximum transactions hashes to keep in the known list (prevent DOS) + maxKnownBlocks = 1024 // Maximum block hashes to keep in the known list (prevent DOS) +) type peer struct { *p2p.Peer rw p2p.MsgReadWriter - protv, netid int + version int // Protocol version negotiated + network int // Network ID being on id string @@ -46,27 +55,21 @@ type peer struct { td *big.Int lock sync.RWMutex - genesis, ourHash common.Hash - ourTd *big.Int - - txHashes *set.Set - blockHashes *set.Set + knownTxs *set.Set // Set of transaction hashes known to be known by this peer + knownBlocks *set.Set // Set of block hashes known to be known by this peer } -func newPeer(protv, netid int, genesis, head common.Hash, td *big.Int, p *p2p.Peer, rw p2p.MsgReadWriter) *peer { +func newPeer(version, network int, p *p2p.Peer, rw p2p.MsgReadWriter) *peer { id := p.ID() return &peer{ Peer: p, rw: rw, - genesis: genesis, - ourHash: head, - ourTd: td, - protv: protv, - netid: netid, + version: version, + network: network, id: fmt.Sprintf("%x", id[:8]), - txHashes: set.New(), - blockHashes: set.New(), + knownTxs: set.New(), + knownBlocks: set.New(), } } @@ -103,68 +106,110 @@ func (p *peer) SetTd(td *big.Int) { p.td.Set(td) } -// sendTransactions sends transactions to the peer and includes the hashes -// in it's tx hash set for future reference. The tx hash will allow the -// manager to check whether the peer has already received this particular -// transaction -func (p *peer) sendTransactions(txs types.Transactions) error { - for _, tx := range txs { - p.txHashes.Add(tx.Hash()) +// MarkBlock marks a block as known for the peer, ensuring that the block will +// never be propagated to this particular peer. +func (p *peer) MarkBlock(hash common.Hash) { + // If we reached the memory allowance, drop a previously known block hash + for p.knownBlocks.Size() >= maxKnownBlocks { + p.knownBlocks.Pop() } + p.knownBlocks.Add(hash) +} +// MarkTransaction marks a transaction as known for the peer, ensuring that it +// will never be propagated to this particular peer. +func (p *peer) MarkTransaction(hash common.Hash) { + // If we reached the memory allowance, drop a previously known transaction hash + for p.knownTxs.Size() >= maxKnownTxs { + p.knownTxs.Pop() + } + p.knownTxs.Add(hash) +} + +// SendTransactions sends transactions to the peer and includes the hashes +// in its transaction hash set for future reference. +func (p *peer) SendTransactions(txs types.Transactions) error { + propTxnOutPacketsMeter.Mark(1) + for _, tx := range txs { + propTxnOutTrafficMeter.Mark(tx.Size().Int64()) + p.knownTxs.Add(tx.Hash()) + } return p2p.Send(p.rw, TxMsg, txs) } -func (p *peer) sendBlockHashes(hashes []common.Hash) error { +// SendBlockHashes sends a batch of known hashes to the remote peer. +func (p *peer) SendBlockHashes(hashes []common.Hash) error { + reqHashOutPacketsMeter.Mark(1) + reqHashOutTrafficMeter.Mark(int64(32 * len(hashes))) + return p2p.Send(p.rw, BlockHashesMsg, hashes) } -func (p *peer) sendBlocks(blocks []*types.Block) error { +// SendBlocks sends a batch of blocks to the remote peer. +func (p *peer) SendBlocks(blocks []*types.Block) error { + reqBlockOutPacketsMeter.Mark(1) + for _, block := range blocks { + reqBlockOutTrafficMeter.Mark(block.Size().Int64()) + } return p2p.Send(p.rw, BlocksMsg, blocks) } -func (p *peer) sendNewBlockHashes(hashes []common.Hash) error { +// SendNewBlockHashes announces the availability of a number of blocks through +// a hash notification. +func (p *peer) SendNewBlockHashes(hashes []common.Hash) error { + propHashOutPacketsMeter.Mark(1) + propHashOutTrafficMeter.Mark(int64(32 * len(hashes))) + for _, hash := range hashes { - p.blockHashes.Add(hash) + p.knownBlocks.Add(hash) } return p2p.Send(p.rw, NewBlockHashesMsg, hashes) } -func (p *peer) sendNewBlock(block *types.Block) error { - p.blockHashes.Add(block.Hash()) +// SendNewBlock propagates an entire block to a remote peer. +func (p *peer) SendNewBlock(block *types.Block) error { + propBlockOutPacketsMeter.Mark(1) + propBlockOutTrafficMeter.Mark(block.Size().Int64()) + p.knownBlocks.Add(block.Hash()) return p2p.Send(p.rw, NewBlockMsg, []interface{}{block, block.Td}) } -func (p *peer) sendTransaction(tx *types.Transaction) error { - p.txHashes.Add(tx.Hash()) - - return p2p.Send(p.rw, TxMsg, []*types.Transaction{tx}) +// RequestHashes fetches a batch of hashes from a peer, starting at from, going +// towards the genesis block. +func (p *peer) RequestHashes(from common.Hash) error { + glog.V(logger.Debug).Infof("Peer [%s] fetching hashes (%d) from %x...\n", p.id, downloader.MaxHashFetch, from[:4]) + return p2p.Send(p.rw, GetBlockHashesMsg, getBlockHashesData{from, uint64(downloader.MaxHashFetch)}) } -func (p *peer) requestHashes(from common.Hash) error { - glog.V(logger.Debug).Infof("[%s] fetching hashes (%d) %x...\n", p.id, downloader.MaxHashFetch, from[:4]) - return p2p.Send(p.rw, GetBlockHashesMsg, getBlockHashesMsgData{from, uint64(downloader.MaxHashFetch)}) +// RequestHashesFromNumber fetches a batch of hashes from a peer, starting at the +// requested block number, going upwards towards the genesis block. +func (p *peer) RequestHashesFromNumber(from uint64, count int) error { + glog.V(logger.Debug).Infof("Peer [%s] fetching hashes (%d) from #%d...\n", p.id, count, from) + return p2p.Send(p.rw, GetBlockHashesFromNumberMsg, getBlockHashesFromNumberData{from, uint64(count)}) } -func (p *peer) requestBlocks(hashes []common.Hash) error { +// RequestBlocks fetches a batch of blocks corresponding to the specified hashes. +func (p *peer) RequestBlocks(hashes []common.Hash) error { glog.V(logger.Debug).Infof("[%s] fetching %v blocks\n", p.id, len(hashes)) return p2p.Send(p.rw, GetBlocksMsg, hashes) } -func (p *peer) handleStatus() error { +// Handshake executes the eth protocol handshake, negotiating version number, +// network IDs, difficulties, head and genesis blocks. +func (p *peer) Handshake(td *big.Int, head common.Hash, genesis common.Hash) error { + // Send out own handshake in a new thread errc := make(chan error, 1) go func() { - errc <- p2p.Send(p.rw, StatusMsg, &statusMsgData{ - ProtocolVersion: uint32(p.protv), - NetworkId: uint32(p.netid), - TD: p.ourTd, - CurrentBlock: p.ourHash, - GenesisBlock: p.genesis, + errc <- p2p.Send(p.rw, StatusMsg, &statusData{ + ProtocolVersion: uint32(p.version), + NetworkId: uint32(p.network), + TD: td, + CurrentBlock: head, + GenesisBlock: genesis, }) }() - - // read and handle remote status + // In the mean time retrieve the remote status message msg, err := p.rw.ReadMsg() if err != nil { return err @@ -175,31 +220,32 @@ func (p *peer) handleStatus() error { if msg.Size > ProtocolMaxMsgSize { return errResp(ErrMsgTooLarge, "%v > %v", msg.Size, ProtocolMaxMsgSize) } - - var status statusMsgData + // Decode the handshake and make sure everything matches + var status statusData if err := msg.Decode(&status); err != nil { return errResp(ErrDecode, "msg %v: %v", msg, err) } - - if status.GenesisBlock != p.genesis { - return errResp(ErrGenesisBlockMismatch, "%x (!= %x)", status.GenesisBlock, p.genesis) + if status.GenesisBlock != genesis { + return errResp(ErrGenesisBlockMismatch, "%x (!= %x)", status.GenesisBlock, genesis) } - - if int(status.NetworkId) != p.netid { - return errResp(ErrNetworkIdMismatch, "%d (!= %d)", status.NetworkId, p.netid) + if int(status.NetworkId) != p.network { + return errResp(ErrNetworkIdMismatch, "%d (!= %d)", status.NetworkId, p.network) } - - if int(status.ProtocolVersion) != p.protv { - return errResp(ErrProtocolVersionMismatch, "%d (!= %d)", status.ProtocolVersion, p.protv) + if int(status.ProtocolVersion) != p.version { + return errResp(ErrProtocolVersionMismatch, "%d (!= %d)", status.ProtocolVersion, p.version) } - // Set the total difficulty of the peer - p.td = status.TD - // set the best hash of the peer - p.head = status.CurrentBlock - + // Configure the remote peer, and sanity check out handshake too + p.td, p.head = status.TD, status.CurrentBlock return <-errc } +// String implements fmt.Stringer. +func (p *peer) String() string { + return fmt.Sprintf("Peer %s [%s]", p.id, + fmt.Sprintf("eth/%2d", p.version), + ) +} + // peerSet represents the collection of active peers currently participating in // the Ethereum sub-protocol. type peerSet struct { @@ -264,7 +310,7 @@ func (ps *peerSet) PeersWithoutBlock(hash common.Hash) []*peer { list := make([]*peer, 0, len(ps.peers)) for _, p := range ps.peers { - if !p.blockHashes.Has(hash) { + if !p.knownBlocks.Has(hash) { list = append(list, p) } } @@ -279,7 +325,7 @@ func (ps *peerSet) PeersWithoutTx(hash common.Hash) []*peer { list := make([]*peer, 0, len(ps.peers)) for _, p := range ps.peers { - if !p.txHashes.Has(hash) { + if !p.knownTxs.Has(hash) { list = append(list, p) } } diff --git a/eth/protocol.go b/eth/protocol.go index 57805d9bd..704a637e2 100644 --- a/eth/protocol.go +++ b/eth/protocol.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package eth import ( @@ -7,11 +23,15 @@ import ( "github.com/ethereum/go-ethereum/core/types" ) +// Supported versions of the eth protocol (first is primary). +var ProtocolVersions = []uint{61, 60} + +// Number of implemented message corresponding to different protocol versions. +var ProtocolLengths = []uint64{9, 8} + const ( - ProtocolVersion = 60 NetworkId = 0 - ProtocolLength = uint64(8) - ProtocolMaxMsgSize = 10 * 1024 * 1024 + ProtocolMaxMsgSize = 10 * 1024 * 1024 // Maximum cap on the size of a protocol message ) // eth protocol message codes @@ -24,6 +44,7 @@ const ( GetBlocksMsg BlocksMsg NewBlockMsg + GetBlockHashesFromNumberMsg ) type errCode int @@ -72,8 +93,31 @@ type chainManager interface { Status() (td *big.Int, currentBlock common.Hash, genesisBlock common.Hash) } -// message structs used for RLP serialization -type newBlockMsgData struct { +// statusData is the network packet for the status message. +type statusData struct { + ProtocolVersion uint32 + NetworkId uint32 + TD *big.Int + CurrentBlock common.Hash + GenesisBlock common.Hash +} + +// getBlockHashesData is the network packet for the hash based block retrieval +// message. +type getBlockHashesData struct { + Hash common.Hash + Amount uint64 +} + +// getBlockHashesFromNumberData is the network packet for the number based block +// retrieval message. +type getBlockHashesFromNumberData struct { + Number uint64 + Amount uint64 +} + +// newBlockData is the network packet for the block propagation message. +type newBlockData struct { Block *types.Block TD *big.Int } diff --git a/eth/protocol_test.go b/eth/protocol_test.go index 60fa35443..686380b40 100644 --- a/eth/protocol_test.go +++ b/eth/protocol_test.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package eth import ( @@ -39,15 +55,15 @@ func TestStatusMsgErrors(t *testing.T) { wantError: errResp(ErrNoStatusMsg, "first msg has code 2 (!= 0)"), }, { - code: StatusMsg, data: statusMsgData{10, NetworkId, td, currentBlock, genesis}, + code: StatusMsg, data: statusData{10, NetworkId, td, currentBlock, genesis}, wantError: errResp(ErrProtocolVersionMismatch, "10 (!= 0)"), }, { - code: StatusMsg, data: statusMsgData{ProtocolVersion, 999, td, currentBlock, genesis}, + code: StatusMsg, data: statusData{uint32(ProtocolVersions[0]), 999, td, currentBlock, genesis}, wantError: errResp(ErrNetworkIdMismatch, "999 (!= 0)"), }, { - code: StatusMsg, data: statusMsgData{ProtocolVersion, NetworkId, td, currentBlock, common.Hash{3}}, + code: StatusMsg, data: statusData{uint32(ProtocolVersions[0]), NetworkId, td, currentBlock, common.Hash{3}}, wantError: errResp(ErrGenesisBlockMismatch, "0300000000000000000000000000000000000000000000000000000000000000 (!= %x)", genesis), }, } @@ -165,9 +181,9 @@ func newProtocolManagerForTesting(txAdded chan<- []*types.Transaction) *Protocol var ( em = new(event.TypeMux) db, _ = ethdb.NewMemDatabase() - chain, _ = core.NewChainManager(core.GenesisBlock(0, db), db, db, core.FakePow{}, em) + chain, _ = core.NewChainManager(core.GenesisBlock(0, db), db, db, db, core.FakePow{}, em) txpool = &fakeTxPool{added: txAdded} - pm = NewProtocolManager(ProtocolVersion, 0, em, txpool, core.FakePow{}, chain) + pm = NewProtocolManager(0, em, txpool, core.FakePow{}, chain) ) pm.Start() return pm @@ -188,7 +204,7 @@ func newTestPeer(pm *ProtocolManager) (*testPeer, <-chan error) { func (p *testPeer) handshake(t *testing.T) { td, currentBlock, genesis := p.pm.chainman.Status() - msg := &statusMsgData{ + msg := &statusData{ ProtocolVersion: uint32(p.pm.protVer), NetworkId: uint32(p.pm.netId), TD: td, diff --git a/eth/sync.go b/eth/sync.go index 82abb725f..11e229af6 100644 --- a/eth/sync.go +++ b/eth/sync.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package eth import ( @@ -20,14 +36,6 @@ const ( txsyncPackSize = 100 * 1024 ) -// blockAnnounce is the hash notification of the availability of a new block in -// the network. -type blockAnnounce struct { - hash common.Hash - peer *peer - time time.Time -} - type txsync struct { p *peer txs []*types.Transaction @@ -75,7 +83,7 @@ func (pm *ProtocolManager) txsyncLoop() { // Send the pack in the background. glog.V(logger.Detail).Infof("%v: sending %d transactions (%v)", s.p.Peer, len(pack.txs), size) sending = true - go func() { done <- pack.p.sendTransactions(pack.txs) }() + go func() { done <- pack.p.SendTransactions(pack.txs) }() } // pick chooses the next pending sync. diff --git a/ethdb/database.go b/ethdb/database.go index 9ff90d167..e87b10a5a 100644 --- a/ethdb/database.go +++ b/ethdb/database.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package ethdb import ( diff --git a/ethdb/database_test.go b/ethdb/database_test.go index a80976a9a..29292d016 100644 --- a/ethdb/database_test.go +++ b/ethdb/database_test.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package ethdb import ( diff --git a/ethdb/memory_database.go b/ethdb/memory_database.go index c15c56bfb..3fba9f406 100644 --- a/ethdb/memory_database.go +++ b/ethdb/memory_database.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package ethdb import ( diff --git a/event/event.go b/event/event.go index 540fbba65..f2a3924c2 100644 --- a/event/event.go +++ b/event/event.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + // Package event implements an event multiplexer. package event diff --git a/event/event_test.go b/event/event_test.go index c7c0266c1..076d1e794 100644 --- a/event/event_test.go +++ b/event/event_test.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package event import ( diff --git a/event/example_test.go b/event/example_test.go index 2f47f6f27..5c8cb3236 100644 --- a/event/example_test.go +++ b/event/example_test.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package event import "fmt" diff --git a/event/filter/eth_filter.go b/event/filter/eth_filter.go index b0d5078a2..da0da1334 100644 --- a/event/filter/eth_filter.go +++ b/event/filter/eth_filter.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package filter // TODO make use of the generic filtering system diff --git a/event/filter/filter.go b/event/filter/filter.go index ca767f413..90bc4bd46 100644 --- a/event/filter/filter.go +++ b/event/filter/filter.go @@ -1,3 +1,20 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + +// Package filter implements event filters. package filter import "reflect" diff --git a/event/filter/filter_test.go b/event/filter/filter_test.go index 534eb56d1..28a46d426 100644 --- a/event/filter/filter_test.go +++ b/event/filter/filter_test.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package filter import ( diff --git a/event/filter/generic_filter.go b/event/filter/generic_filter.go index 2ce0f0642..a5a60ee3d 100644 --- a/event/filter/generic_filter.go +++ b/event/filter/generic_filter.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package filter type Generic struct { diff --git a/generators/defaults.go b/generators/defaults.go index d30a56434..956af32a8 100644 --- a/generators/defaults.go +++ b/generators/defaults.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + //go:generate go run defaults.go default.json defs.go package main //build !none diff --git a/jsre/bignumber_js.go b/jsre/bignumber_js.go index 7902018be..993fb9a34 100644 --- a/jsre/bignumber_js.go +++ b/jsre/bignumber_js.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package jsre const BigNumber_JS = `/* bignumber.js v2.0.3 https://github.com/MikeMcl/bignumber.js/LICENCE */ diff --git a/jsre/ethereum_js.go b/jsre/ethereum_js.go index 8d530a532..5028b2d4b 100644 --- a/jsre/ethereum_js.go +++ b/jsre/ethereum_js.go @@ -1,6 +1,23 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package jsre -const Web3_JS = `require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o. */ -/** +/** * @file coder.js * @author Marek Kotewicz * @date 2015 @@ -72,7 +89,7 @@ SolidityType.prototype.isType = function (name) { * @method formatInput * @param {Object} param - plain object, or an array of objects * @param {Bool} arrayType - true if a param should be encoded as an array - * @return {SolidityParam} encoded param wrapped in SolidityParam object + * @return {SolidityParam} encoded param wrapped in SolidityParam object */ SolidityType.prototype.formatInput = function (param, arrayType) { if (utils.isArray(param) && arrayType) { // TODO: should fail if this two are not the same @@ -82,7 +99,7 @@ SolidityType.prototype.formatInput = function (param, arrayType) { }).reduce(function (acc, current) { return acc.combine(current); }, f.formatInputInt(param.length)).withOffset(32); - } + } return this._inputFormatter(param); }; @@ -96,7 +113,7 @@ SolidityType.prototype.formatInput = function (param, arrayType) { */ SolidityType.prototype.formatOutput = function (param, arrayType) { if (arrayType) { - // let's assume, that we solidity will never return long arrays :P + // let's assume, that we solidity will never return long arrays :P var result = []; var length = new BigNumber(param.dynamicPart().slice(0, 64), 16); for (var i = 0; i < length * 64; i += 64) { @@ -137,7 +154,7 @@ var SolidityCoder = function (types) { * * @method _requireType * @param {String} type - * @returns {SolidityType} + * @returns {SolidityType} * @throws {Error} throws if no matching type is found */ SolidityCoder.prototype._requireType = function (type) { @@ -265,6 +282,13 @@ var coder = new SolidityCoder([ inputFormatter: f.formatInputBytes, outputFormatter: f.formatOutputBytes }), + new SolidityType({ + name: 'string', + match: 'strict', + mode: 'bytes', + inputFormatter: f.formatInputString, + outputFormatter: f.formatOutputString + }), new SolidityType({ name: 'real', match: 'prefix', @@ -301,7 +325,7 @@ module.exports = coder; You should have received a copy of the GNU Lesser General Public License along with ethereum.js. If not, see . */ -/** +/** * @file formatters.js * @author Marek Kotewicz * @date 2015 @@ -330,26 +354,43 @@ var formatInputInt = function (value) { }; /** - * Formats input value to byte representation of string + * Formats input bytes * * @method formatInputBytes * @param {String} * @returns {SolidityParam} */ var formatInputBytes = function (value) { - var result = utils.fromAscii(value, c.ETH_PADDING).substr(2); + var result = utils.padRight(utils.toHex(value).substr(2), 64); return new SolidityParam(result); }; +/** + * Formats input bytes + * + * @method formatDynamicInputBytes + * @param {String} + * @returns {SolidityParam} + */ +var formatInputDynamicBytes = function (value) { + value = utils.toHex(value).substr(2); + var l = Math.floor((value.length + 63) / 64); + var result = utils.padRight(value, l * 64); + var length = Math.floor(value.length / 2); + return new SolidityParam(formatInputInt(length).value + result, 32); +}; + /** * Formats input value to byte representation of string * - * @method formatInputDynamicBytes + * @method formatInputString * @param {String} * @returns {SolidityParam} */ -var formatInputDynamicBytes = function (value) { - var result = utils.fromAscii(value, c.ETH_PADDING).substr(2); +var formatInputString = function (value) { + var result = utils.fromAscii(value).substr(2); + var l = Math.floor((result.length + 63) / 64); + result = utils.padRight(result, l * 64); return new SolidityParam(formatInputInt(value.length).value + result, 32); }; @@ -426,7 +467,7 @@ var formatOutputUInt = function (param) { * @returns {BigNumber} input bytes formatted to real */ var formatOutputReal = function (param) { - return formatOutputInt(param).dividedBy(new BigNumber(2).pow(128)); + return formatOutputInt(param).dividedBy(new BigNumber(2).pow(128)); }; /** @@ -437,7 +478,7 @@ var formatOutputReal = function (param) { * @returns {BigNumber} input bytes formatted to ureal */ var formatOutputUReal = function (param) { - return formatOutputUInt(param).dividedBy(new BigNumber(2).pow(128)); + return formatOutputUInt(param).dividedBy(new BigNumber(2).pow(128)); }; /** @@ -452,27 +493,38 @@ var formatOutputBool = function (param) { }; /** - * Should be used to format output string + * Should be used to format output bytes * * @method formatOutputBytes * @param {SolidityParam} left-aligned hex representation of string - * @returns {String} ascii string + * @returns {String} hex string */ var formatOutputBytes = function (param) { - // length might also be important! - return utils.toAscii(param.staticPart()); + return '0x' + param.staticPart(); +}; + +/** + * Should be used to format output bytes + * + * @method formatOutputDynamicBytes + * @param {SolidityParam} left-aligned hex representation of string + * @returns {String} hex string + */ +var formatOutputDynamicBytes = function (param) { + var length = (new BigNumber(param.dynamicPart().slice(0, 64), 16)).toNumber() * 2; + return '0x' + param.dynamicPart().substr(64, length); }; /** * Should be used to format output string * - * @method formatOutputDynamicBytes + * @method formatOutputString * @param {SolidityParam} left-aligned hex representation of string * @returns {String} ascii string */ -var formatOutputDynamicBytes = function (param) { - // length might also be important! - return utils.toAscii(param.dynamicPart().slice(64)); +var formatOutputString = function (param) { + var length = (new BigNumber(param.dynamicPart().slice(0, 64), 16)).toNumber() * 2; + return utils.toAscii(param.dynamicPart().substr(64, length)); }; /** @@ -491,6 +543,7 @@ module.exports = { formatInputInt: formatInputInt, formatInputBytes: formatInputBytes, formatInputDynamicBytes: formatInputDynamicBytes, + formatInputString: formatInputString, formatInputBool: formatInputBool, formatInputReal: formatInputReal, formatOutputInt: formatOutputInt, @@ -500,6 +553,7 @@ module.exports = { formatOutputBool: formatOutputBool, formatOutputBytes: formatOutputBytes, formatOutputDynamicBytes: formatOutputDynamicBytes, + formatOutputString: formatOutputString, formatOutputAddress: formatOutputAddress }; @@ -521,7 +575,7 @@ module.exports = { You should have received a copy of the GNU Lesser General Public License along with ethereum.js. If not, see . */ -/** +/** * @file param.js * @author Marek Kotewicz * @date 2015 @@ -540,7 +594,7 @@ var SolidityParam = function (value, offset) { /** * This method should be used to get length of params's dynamic part - * + * * @method dynamicPartLength * @returns {Number} length of dynamic part (in bytes) */ @@ -568,7 +622,7 @@ SolidityParam.prototype.withOffset = function (offset) { * @param {SolidityParam} result of combination */ SolidityParam.prototype.combine = function (param) { - return new SolidityParam(this.value + param.value); + return new SolidityParam(this.value + param.value); }; /** @@ -600,8 +654,8 @@ SolidityParam.prototype.offsetAsBytes = function () { */ SolidityParam.prototype.staticPart = function () { if (!this.isDynamic()) { - return this.value; - } + return this.value; + } return this.offsetAsBytes(); }; @@ -633,7 +687,7 @@ SolidityParam.prototype.encode = function () { * @returns {String} */ SolidityParam.encodeList = function (params) { - + // updating offsets var totalOffset = params.length * 32; var offsetParams = params.map(function (param) { @@ -663,7 +717,7 @@ SolidityParam.encodeList = function (params) { */ SolidityParam.decodeParam = function (bytes, index) { index = index || 0; - return new SolidityParam(bytes.substr(index * 64, 64)); + return new SolidityParam(bytes.substr(index * 64, 64)); }; /** @@ -689,13 +743,14 @@ var getOffset = function (bytes, index) { */ SolidityParam.decodeBytes = function (bytes, index) { index = index || 0; - //TODO add support for strings longer than 32 bytes - //var length = parseInt('0x' + bytes.substr(offset * 64, 64)); var offset = getOffset(bytes, index); - // 2 * , cause we also parse length - return new SolidityParam(bytes.substr(offset * 2, 2 * 64), 0); + var l = parseInt('0x' + bytes.substr(offset * 2, 64)); + l = Math.floor((l + 31) / 32); + + // (1 + l) * , cause we also parse length + return new SolidityParam(bytes.substr(offset * 2, (1 + l) * 64), 0); }; /** @@ -752,13 +807,13 @@ if (typeof XMLHttpRequest === 'undefined') { /** * Utils - * + * * @module utils */ /** * Utility functions - * + * * @class [utils] config * @constructor */ @@ -824,7 +879,7 @@ module.exports = { You should have received a copy of the GNU Lesser General Public License along with ethereum.js. If not, see . */ -/** +/** * @file sha3.js * @author Marek Kotewicz * @date 2015 @@ -848,7 +903,7 @@ module.exports = function (str, isNew) { }; -},{"./utils":7,"crypto-js/sha3":33}],7:[function(require,module,exports){ +},{"./utils":7,"crypto-js/sha3":34}],7:[function(require,module,exports){ /* This file is part of ethereum.js. @@ -865,7 +920,7 @@ module.exports = function (str, isNew) { You should have received a copy of the GNU Lesser General Public License along with ethereum.js. If not, see . */ -/** +/** * @file utils.js * @author Marek Kotewicz * @date 2015 @@ -873,13 +928,13 @@ module.exports = function (str, isNew) { /** * Utils - * + * * @module utils */ /** * Utility functions - * + * * @class [utils] utils * @constructor */ @@ -927,6 +982,19 @@ var padLeft = function (string, chars, sign) { }; /** + * Should be called to pad string to expected length + * + * @method padRight + * @param {String} string to be padded + * @param {Number} characters that result string should have + * @param {String} sign, by default 0 + * @returns {String} right aligned string + */ +var padRight = function (string, chars, sign) { + return string + (new Array(chars - string.length + 1).join(sign ? sign : "0")); +}; + +/** * Should be called to get sting from it's hex representation * * @method toAscii @@ -942,18 +1010,14 @@ var toAscii = function(hex) { } for (; i < l; i+=2) { var code = parseInt(hex.substr(i, 2), 16); - if (code === 0) { - break; - } - str += String.fromCharCode(code); } return str; }; - + /** - * Shold be called to get hex representation (prefixed by 0x) of ascii string + * Shold be called to get hex representation (prefixed by 0x) of ascii string * * @method toHexNative * @param {String} string @@ -970,7 +1034,7 @@ var toHexNative = function(str) { }; /** - * Shold be called to get hex representation (prefixed by 0x) of ascii string + * Shold be called to get hex representation (prefixed by 0x) of ascii string * * @method fromAscii * @param {String} string @@ -1003,13 +1067,13 @@ var transformToFullName = function (json) { /** * Should be called to get display name of contract function - * + * * @method extractDisplayName * @param {String} name of function/event * @returns {String} display name for function/event eg. multiply(uint256) -> multiply */ var extractDisplayName = function (name) { - var length = name.indexOf('('); + var length = name.indexOf('('); return length !== -1 ? name.substr(0, length) : name; }; @@ -1055,7 +1119,7 @@ var fromDecimal = function (value) { * @return {String} */ var toHex = function (val) { - /*jshint maxcomplexity:7 */ + /*jshint maxcomplexity: 8 */ if (isBoolean(val)) return fromDecimal(+val); @@ -1069,9 +1133,11 @@ var toHex = function (val) { // if its a negative number, pass it through fromDecimal if (isString(val)) { if (val.indexOf('-0x') === 0) - return fromDecimal(val); + return fromDecimal(val); else if (!isFinite(val)) return fromAscii(val); + else if(val.indexOf('0x') === 0) + return val; } return fromDecimal(val); @@ -1105,7 +1171,7 @@ var getValueOfUnit = function (unit) { * - -- microether szabo micro * - -- milliether finney milli * - ether -- -- - * - kether einstein grand + * - kether einstein grand * - mether * - gether * - tether @@ -1118,7 +1184,7 @@ var getValueOfUnit = function (unit) { var fromWei = function(number, unit) { var returnValue = toBigNumber(number).dividedBy(getValueOfUnit(unit)); - return isBigNumber(number) ? returnValue : returnValue.toString(10); + return isBigNumber(number) ? returnValue : returnValue.toString(10); }; /** @@ -1127,12 +1193,12 @@ var fromWei = function(number, unit) { * Possible units are: * SI Short SI Full Effigy Other * - kwei femtoether ada - * - mwei picoether babbage + * - mwei picoether babbage * - gwei nanoether shannon nano * - -- microether szabo micro * - -- milliether finney milli * - ether -- -- - * - kether einstein grand + * - kether einstein grand * - mether * - gether * - tether @@ -1145,7 +1211,7 @@ var fromWei = function(number, unit) { var toWei = function(number, unit) { var returnValue = toBigNumber(number).times(getValueOfUnit(unit)); - return isBigNumber(number) ? returnValue : returnValue.toString(10); + return isBigNumber(number) ? returnValue : returnValue.toString(10); }; /** @@ -1164,7 +1230,7 @@ var toBigNumber = function(number) { if (isString(number) && (number.indexOf('0x') === 0 || number.indexOf('-0x') === 0)) { return new BigNumber(number.replace('0x',''), 16); } - + return new BigNumber(number.toString(10), 10); }; @@ -1216,7 +1282,7 @@ var toAddress = function (address) { if (isStrictAddress(address)) { return address; } - + if (/^[0-9a-f]{40}$/.test(address)) { return '0x' + address; } @@ -1230,7 +1296,7 @@ var toAddress = function (address) { * * @method isBigNumber * @param {Object} - * @return {Boolean} + * @return {Boolean} */ var isBigNumber = function (object) { return object instanceof BigNumber || @@ -1239,7 +1305,7 @@ var isBigNumber = function (object) { /** * Returns true if object is string, otherwise false - * + * * @method isString * @param {Object} * @return {Boolean} @@ -1290,12 +1356,12 @@ var isBoolean = function (object) { * @return {Boolean} */ var isArray = function (object) { - return object instanceof Array; + return object instanceof Array; }; /** * Returns true if given string is valid json object - * + * * @method isJson * @param {String} * @return {Boolean} @@ -1322,6 +1388,7 @@ var isIBAN = function (iban) { module.exports = { padLeft: padLeft, + padRight: padRight, toHex: toHex, toDecimal: toDecimal, fromDecimal: fromDecimal, @@ -1350,7 +1417,7 @@ module.exports = { },{"bignumber.js":"bignumber.js"}],8:[function(require,module,exports){ module.exports={ - "version": "0.5.0" + "version": "0.7.1" } },{}],9:[function(require,module,exports){ @@ -1436,31 +1503,25 @@ var setupProperties = function (obj, properties) { /// setups web3 object, and it's in-browser executed methods var web3 = {}; web3.providers = {}; +web3.currentProvider = null; web3.version = {}; web3.version.api = version.version; web3.eth = {}; /*jshint maxparams:4 */ -web3.eth.filter = function (fil, eventParams, options, formatter) { - - // if its event, treat it differently - // TODO: simplify and remove - if (fil._isEvent) { - return fil(eventParams, options); - } - - // output logs works for blockFilter and pendingTransaction filters? - return new Filter(fil, watches.eth(), formatter || formatters.outputLogFormatter); +web3.eth.filter = function (fil, callback) { + return new Filter(fil, watches.eth(), formatters.outputLogFormatter, callback); }; /*jshint maxparams:3 */ web3.shh = {}; -web3.shh.filter = function (fil) { - return new Filter(fil, watches.shh(), formatters.outputPostFormatter); +web3.shh.filter = function (fil, callback) { + return new Filter(fil, watches.shh(), formatters.outputPostFormatter, callback); }; web3.net = {}; web3.db = {}; web3.setProvider = function (provider) { + this.currentProvider = provider; RequestManager.getInstance().setProvider(provider); }; web3.reset = function () { @@ -1533,7 +1594,7 @@ setupMethods(web3.shh, shh.methods); module.exports = web3; -},{"./utils/config":5,"./utils/sha3":6,"./utils/utils":7,"./version.json":8,"./web3/batch":10,"./web3/db":12,"./web3/eth":14,"./web3/filter":16,"./web3/formatters":17,"./web3/method":22,"./web3/net":24,"./web3/property":25,"./web3/requestmanager":27,"./web3/shh":28,"./web3/watches":30}],10:[function(require,module,exports){ +},{"./utils/config":5,"./utils/sha3":6,"./utils/utils":7,"./version.json":8,"./web3/batch":11,"./web3/db":13,"./web3/eth":15,"./web3/filter":17,"./web3/formatters":18,"./web3/method":23,"./web3/net":25,"./web3/property":26,"./web3/requestmanager":28,"./web3/shh":29,"./web3/watches":31}],10:[function(require,module,exports){ /* This file is part of ethereum.js. @@ -1550,7 +1611,90 @@ module.exports = web3; You should have received a copy of the GNU Lesser General Public License along with ethereum.js. If not, see . */ -/** +/** + * @file allevents.js + * @author Marek Kotewicz + * @date 2014 + */ + +var sha3 = require('../utils/sha3'); +var SolidityEvent = require('./event'); +var formatters = require('./formatters'); +var utils = require('../utils/utils'); +var Filter = require('./filter'); +var watches = require('./watches'); + +var AllSolidityEvents = function (json, address) { + this._json = json; + this._address = address; +}; + +AllSolidityEvents.prototype.encode = function (options) { + options = options || {}; + var result = {}; + + ['fromBlock', 'toBlock'].filter(function (f) { + return options[f] !== undefined; + }).forEach(function (f) { + result[f] = formatters.inputBlockNumberFormatter(options[f]); + }); + + result.topics = [null, null, null, null, null]; // match all topics + result.address = this._address; + + return result; +}; + +AllSolidityEvents.prototype.decode = function (data) { + data.data = data.data || ''; + data.topics = data.topics || []; + + var eventTopic = data.topics[0].slice(2); + var match = this._json.filter(function (j) { + return eventTopic === sha3(utils.transformToFullName(j)); + })[0]; + + if (!match) { // cannot find matching event? + console.warn('cannot find event for log'); + return data; + } + + var event = new SolidityEvent(match, this._address); + return event.decode(data); +}; + +AllSolidityEvents.prototype.execute = function (options, callback) { + var o = this.encode(options); + var formatter = this.decode.bind(this); + return new Filter(o, watches.eth(), formatter, callback); +}; + +AllSolidityEvents.prototype.attachToContract = function (contract) { + var execute = this.execute.bind(this); + contract.allEvents = execute; +}; + +module.exports = AllSolidityEvents; + + +},{"../utils/sha3":6,"../utils/utils":7,"./event":16,"./filter":17,"./formatters":18,"./watches":31}],11:[function(require,module,exports){ +/* + This file is part of ethereum.js. + + ethereum.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + ethereum.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with ethereum.js. If not, see . +*/ +/** * @file batch.js * @author Marek Kotewicz * @date 2015 @@ -1590,13 +1734,13 @@ Batch.prototype.execute = function () { requests[index].callback(err, result); } }); - }); + }); }; module.exports = Batch; -},{"./requestmanager":27}],11:[function(require,module,exports){ +},{"./requestmanager":28}],12:[function(require,module,exports){ /* This file is part of ethereum.js. @@ -1613,17 +1757,18 @@ module.exports = Batch; You should have received a copy of the GNU Lesser General Public License along with ethereum.js. If not, see . */ -/** +/** * @file contract.js * @author Marek Kotewicz * @date 2014 */ -var web3 = require('../web3'); +var web3 = require('../web3'); var utils = require('../utils/utils'); var coder = require('../solidity/coder'); var SolidityEvent = require('./event'); var SolidityFunction = require('./function'); +var AllEvents = require('./allevents'); /** * Should be called to encode constructor params @@ -1669,9 +1814,14 @@ var addFunctionsToContract = function (contract, abi) { * @param {Array} abi */ var addEventsToContract = function (contract, abi) { - abi.filter(function (json) { + var events = abi.filter(function (json) { return json.type === 'event'; - }).map(function (json) { + }); + + var All = new AllEvents(events, contract.address); + All.attachToContract(contract); + + events.map(function (json) { return new SolidityEvent(json, contract.address); }).forEach(function (e) { e.attachToContract(contract); @@ -1701,7 +1851,7 @@ var ContractFactory = function (abi) { /** * Should be called to create new contract on a blockchain - * + * * @method new * @param {Any} contract constructor param1 (optional) * @param {Any} contract constructor param2 (optional) @@ -1734,14 +1884,14 @@ ContractFactory.prototype.new = function () { var address = web3.eth.sendTransaction(options); return this.at(address); } - + var self = this; web3.eth.sendTransaction(options, function (err, address) { if (err) { callback(err); } - self.at(address, callback); - }); + self.at(address, callback); + }); }; /** @@ -1755,10 +1905,10 @@ ContractFactory.prototype.new = function () { */ ContractFactory.prototype.at = function (address, callback) { // TODO: address is required - + if (callback) { callback(null, new Contract(this.abi, address)); - } + } return new Contract(this.abi, address); }; @@ -1778,7 +1928,7 @@ var Contract = function (abi, address) { module.exports = contract; -},{"../solidity/coder":1,"../utils/utils":7,"../web3":9,"./event":15,"./function":18}],12:[function(require,module,exports){ +},{"../solidity/coder":1,"../utils/utils":7,"../web3":9,"./allevents":10,"./event":16,"./function":19}],13:[function(require,module,exports){ /* This file is part of ethereum.js. @@ -1836,7 +1986,7 @@ module.exports = { methods: methods }; -},{"./method":22}],13:[function(require,module,exports){ +},{"./method":23}],14:[function(require,module,exports){ /* This file is part of ethereum.js. @@ -1853,7 +2003,7 @@ module.exports = { You should have received a copy of the GNU Lesser General Public License along with ethereum.js. If not, see . */ -/** +/** * @file errors.js * @author Marek Kotewicz * @date 2015 @@ -1876,7 +2026,7 @@ module.exports = { }; -},{}],14:[function(require,module,exports){ +},{}],15:[function(require,module,exports){ /* This file is part of ethereum.js. @@ -2031,6 +2181,13 @@ var getTransactionFromBlock = new Method({ outputFormatter: formatters.outputTransactionFormatter }); +var getTransactionReceipt = new Method({ + name: 'getTransactionReceipt', + call: 'eth_getTransactionReceipt', + params: 1, + outputFormatter: formatters.outputTransactionReceiptFormatter +}); + var getTransactionCount = new Method({ name: 'getTransactionCount', call: 'eth_getTransactionCount', @@ -2039,6 +2196,13 @@ var getTransactionCount = new Method({ outputFormatter: utils.toDecimal }); +var sendRawTransaction = new Method({ + name: 'sendRawTransaction', + call: 'eth_sendRawTransaction', + params: 1, + inputFormatter: [] +}); + var sendTransaction = new Method({ name: 'sendTransaction', call: 'eth_sendTransaction', @@ -2102,9 +2266,11 @@ var methods = [ getBlockUncleCount, getTransaction, getTransactionFromBlock, + getTransactionReceipt, getTransactionCount, call, estimateGas, + sendRawTransaction, sendTransaction, compileSolidity, compileLLL, @@ -2153,7 +2319,7 @@ module.exports = { }; -},{"../utils/utils":7,"./formatters":17,"./method":22,"./property":25}],15:[function(require,module,exports){ +},{"../utils/utils":7,"./formatters":18,"./method":23,"./property":26}],16:[function(require,module,exports){ /* This file is part of ethereum.js. @@ -2170,7 +2336,7 @@ module.exports = { You should have received a copy of the GNU Lesser General Public License along with ethereum.js. If not, see . */ -/** +/** * @file event.js * @author Marek Kotewicz * @date 2014 @@ -2178,9 +2344,10 @@ module.exports = { var utils = require('../utils/utils'); var coder = require('../solidity/coder'); -var web3 = require('../web3'); var formatters = require('./formatters'); var sha3 = require('../utils/sha3'); +var Filter = require('./filter'); +var watches = require('./watches'); /** * This prototype should be used to create event filters @@ -2239,7 +2406,7 @@ SolidityEvent.prototype.signature = function () { /** * Should be used to encode indexed params and options to one final object - * + * * @method encode * @param {Object} indexed * @param {Object} options @@ -2270,7 +2437,7 @@ SolidityEvent.prototype.encode = function (indexed, options) { if (value === undefined || value === null) { return null; } - + if (utils.isArray(value)) { return value.map(function (v) { return '0x' + coder.encodeParam(i.type, v); @@ -2292,17 +2459,17 @@ SolidityEvent.prototype.encode = function (indexed, options) { * @return {Object} result object with decoded indexed && not indexed params */ SolidityEvent.prototype.decode = function (data) { - + data.data = data.data || ''; data.topics = data.topics || []; var argTopics = this._anonymous ? data.topics : data.topics.slice(1); var indexedData = argTopics.map(function (topics) { return topics.slice(2); }).join(""); - var indexedParams = coder.decodeParams(this.types(true), indexedData); + var indexedParams = coder.decodeParams(this.types(true), indexedData); var notIndexedData = data.data.slice(2); var notIndexedParams = coder.decodeParams(this.types(false), notIndexedData); - + var result = formatters.outputLogFormatter(data); result.event = this.displayName(); result.address = data.address; @@ -2326,10 +2493,21 @@ SolidityEvent.prototype.decode = function (data) { * @param {Object} options * @return {Object} filter object */ -SolidityEvent.prototype.execute = function (indexed, options) { +SolidityEvent.prototype.execute = function (indexed, options, callback) { + + if (utils.isFunction(arguments[arguments.length - 1])) { + callback = arguments[arguments.length - 1]; + if(arguments.length === 2) + options = null; + if(arguments.length === 1) { + options = null; + indexed = {}; + } + } + var o = this.encode(indexed, options); var formatter = this.decode.bind(this); - return web3.eth.filter(o, undefined, undefined, formatter); + return new Filter(o, watches.eth(), formatter, callback); }; /** @@ -2350,7 +2528,7 @@ SolidityEvent.prototype.attachToContract = function (contract) { module.exports = SolidityEvent; -},{"../solidity/coder":1,"../utils/sha3":6,"../utils/utils":7,"../web3":9,"./formatters":17}],16:[function(require,module,exports){ +},{"../solidity/coder":1,"../utils/sha3":6,"../utils/utils":7,"./filter":17,"./formatters":18,"./watches":31}],17:[function(require,module,exports){ /* This file is part of ethereum.js. @@ -2407,7 +2585,7 @@ var getOptions = function (options) { if (utils.isString(options)) { return options; - } + } options = options || {}; @@ -2423,8 +2601,8 @@ var getOptions = function (options) { to: options.to, address: options.address, fromBlock: formatters.inputBlockNumberFormatter(options.fromBlock), - toBlock: formatters.inputBlockNumberFormatter(options.toBlock) - }; + toBlock: formatters.inputBlockNumberFormatter(options.toBlock) + }; }; /** @@ -2432,7 +2610,7 @@ Adds the callback and sets up the methods, to iterate over the results. @method getLogsAtStart @param {Object} self -@param {funciton} +@param {funciton} */ var getLogsAtStart = function(self, callback){ // call getFilterLogs for the first watch callback start @@ -2480,7 +2658,7 @@ var pollFilter = function(self) { }; -var Filter = function (options, methods, formatter) { +var Filter = function (options, methods, formatter, callback) { var self = this; var implementation = {}; methods.forEach(function (method) { @@ -2488,23 +2666,32 @@ var Filter = function (options, methods, formatter) { }); this.options = getOptions(options); this.implementation = implementation; + this.filterId = null; this.callbacks = []; this.pollFilters = []; this.formatter = formatter; this.implementation.newFilter(this.options, function(error, id){ if(error) { - self.callbacks.forEach(function(callback){ - callback(error); + self.callbacks.forEach(function(cb){ + cb(error); }); } else { self.filterId = id; - // get filter logs at start - self.callbacks.forEach(function(callback){ - getLogsAtStart(self, callback); + + // get filter logs for the already existing watch calls + self.callbacks.forEach(function(cb){ + getLogsAtStart(self, cb); }); - pollFilter(self); + if(self.callbacks.length > 0) + pollFilter(self); + + // start to watch immediately + if(callback) { + return self.watch(callback); + } } }); + }; Filter.prototype.watch = function (callback) { @@ -2550,7 +2737,7 @@ Filter.prototype.get = function (callback) { module.exports = Filter; -},{"../utils/utils":7,"./formatters":17,"./requestmanager":27}],17:[function(require,module,exports){ +},{"../utils/utils":7,"./formatters":18,"./requestmanager":28}],18:[function(require,module,exports){ /* This file is part of ethereum.js. @@ -2567,7 +2754,7 @@ module.exports = Filter; You should have received a copy of the GNU Lesser General Public License along with ethereum.js. If not, see . */ -/** +/** * @file formatters.js * @author Marek Kotewicz * @author Fabian Vogelsteller @@ -2631,15 +2818,15 @@ var inputTransactionFormatter = function (options){ options[key] = utils.fromDecimal(options[key]); }); - return options; + return options; }; /** * Formats the output of a transaction to its proper values - * + * * @method outputTransactionFormatter - * @param {Object} transaction - * @returns {Object} transaction + * @param {Object} tx + * @returns {Object} */ var outputTransactionFormatter = function (tx){ if(tx.blockNumber !== null) @@ -2653,12 +2840,36 @@ var outputTransactionFormatter = function (tx){ return tx; }; +/** + * Formats the output of a transaction receipt to its proper values + * + * @method outputTransactionReceiptFormatter + * @param {Object} receipt + * @returns {Object} +*/ +var outputTransactionReceiptFormatter = function (receipt){ + if(receipt.blockNumber !== null) + receipt.blockNumber = utils.toDecimal(receipt.blockNumber); + if(receipt.transactionIndex !== null) + receipt.transactionIndex = utils.toDecimal(receipt.transactionIndex); + receipt.cumulativeGasUsed = utils.toDecimal(receipt.cumulativeGasUsed); + receipt.gasUsed = utils.toDecimal(receipt.gasUsed); + + if(utils.isArray(receipt.logs)) { + receipt.logs = receipt.logs.map(function(log){ + return outputLogFormatter(log); + }); + } + + return receipt; +}; + /** * Formats the output of a block to its proper values * * @method outputBlockFormatter - * @param {Object} block object - * @returns {Object} block object + * @param {Object} block + * @returns {Object} */ var outputBlockFormatter = function(block) { @@ -2685,16 +2896,12 @@ var outputBlockFormatter = function(block) { /** * Formats the output of a log - * + * * @method outputLogFormatter * @param {Object} log object * @returns {Object} log */ var outputLogFormatter = function(log) { - if (log === null) { // 'pending' && 'latest' filters are nulls - return null; - } - if(log.blockNumber !== null) log.blockNumber = utils.toDecimal(log.blockNumber); if(log.transactionIndex !== null) @@ -2729,7 +2936,7 @@ var inputPostFormatter = function(post) { return utils.fromAscii(topic); }); - return post; + return post; }; /** @@ -2770,13 +2977,14 @@ module.exports = { inputPostFormatter: inputPostFormatter, outputBigNumberFormatter: outputBigNumberFormatter, outputTransactionFormatter: outputTransactionFormatter, + outputTransactionReceiptFormatter: outputTransactionReceiptFormatter, outputBlockFormatter: outputBlockFormatter, outputLogFormatter: outputLogFormatter, outputPostFormatter: outputPostFormatter }; -},{"../utils/config":5,"../utils/utils":7}],18:[function(require,module,exports){ +},{"../utils/config":5,"../utils/utils":7}],19:[function(require,module,exports){ /* This file is part of ethereum.js. @@ -2890,8 +3098,8 @@ SolidityFunction.prototype.call = function () { if (!callback) { var output = web3.eth.call(payload, defaultBlock); return this.unpackOutput(output); - } - + } + var self = this; web3.eth.call(payload, defaultBlock, function (error, output) { callback(error, self.unpackOutput(output)); @@ -2965,10 +3173,11 @@ SolidityFunction.prototype.request = function () { var callback = this.extractCallback(args); var payload = this.toPayload(args); var format = this.unpackOutput.bind(this); - + return { + method: this._constant ? 'eth_call' : 'eth_sendTransaction', callback: callback, - payload: payload, + params: [payload], format: format }; }; @@ -3012,7 +3221,7 @@ SolidityFunction.prototype.attachToContract = function (contract) { module.exports = SolidityFunction; -},{"../solidity/coder":1,"../utils/sha3":6,"../utils/utils":7,"../web3":9,"./formatters":17}],19:[function(require,module,exports){ +},{"../solidity/coder":1,"../utils/sha3":6,"../utils/utils":7,"../web3":9,"./formatters":18}],20:[function(require,module,exports){ /* This file is part of ethereum.js. @@ -3039,7 +3248,8 @@ module.exports = SolidityFunction; "use strict"; -var XMLHttpRequest = require('xmlhttprequest').XMLHttpRequest; // jshint ignore:line +// resolves the problem for electron/atom shell environments, which use node integration, but have no process variable available +var XMLHttpRequest = (typeof window !== 'undefined' && window.XMLHttpRequest) ? window.XMLHttpRequest : require('xmlhttprequest').XMLHttpRequest; // jshint ignore:line var errors = require('./errors'); var HttpProvider = function (host) { @@ -3051,7 +3261,7 @@ HttpProvider.prototype.send = function (payload) { request.open('POST', this.host, false); request.setRequestHeader('Content-type','application/json'); - + try { request.send(JSON.stringify(payload)); } catch(error) { @@ -3070,7 +3280,7 @@ HttpProvider.prototype.send = function (payload) { try { result = JSON.parse(result); } catch(e) { - throw errors.InvalidResponse(result); + throw errors.InvalidResponse(result); } return result; @@ -3086,7 +3296,7 @@ HttpProvider.prototype.sendAsync = function (payload, callback) { try { result = JSON.parse(result); } catch(e) { - error = errors.InvalidResponse(result); + error = errors.InvalidResponse(result); } callback(error, result); @@ -3095,7 +3305,7 @@ HttpProvider.prototype.sendAsync = function (payload, callback) { request.open('POST', this.host, true); request.setRequestHeader('Content-type','application/json'); - + try { request.send(JSON.stringify(payload)); } catch(error) { @@ -3106,7 +3316,7 @@ HttpProvider.prototype.sendAsync = function (payload, callback) { module.exports = HttpProvider; -},{"./errors":13,"xmlhttprequest":4}],20:[function(require,module,exports){ +},{"./errors":14,"xmlhttprequest":4}],21:[function(require,module,exports){ /* This file is part of ethereum.js. @@ -3123,7 +3333,7 @@ module.exports = HttpProvider; You should have received a copy of the GNU Lesser General Public License along with ethereum.js. If not, see . */ -/** +/** * @file icap.js * @author Marek Kotewicz * @date 2015 @@ -3216,7 +3426,7 @@ ICAP.prototype.address = function () { module.exports = ICAP; -},{"../utils/utils":7}],21:[function(require,module,exports){ +},{"../utils/utils":7}],22:[function(require,module,exports){ /* This file is part of ethereum.js. @@ -3309,7 +3519,7 @@ Jsonrpc.prototype.toBatchPayload = function (messages) { module.exports = Jsonrpc; -},{}],22:[function(require,module,exports){ +},{}],23:[function(require,module,exports){ /* This file is part of ethereum.js. @@ -3370,7 +3580,7 @@ Method.prototype.extractCallback = function (args) { /** * Should be called to check if the number of arguments is correct - * + * * @method validateArgs * @param {Array} arguments * @throws {Error} if it is not @@ -3383,7 +3593,7 @@ Method.prototype.validateArgs = function (args) { /** * Should be called to format input args of method - * + * * @method formatInput * @param {Array} * @return {Array} @@ -3411,7 +3621,7 @@ Method.prototype.formatOutput = function (result) { /** * Should attach function to method - * + * * @method attachToObject * @param {Object} * @param {Function} @@ -3425,7 +3635,7 @@ Method.prototype.attachToObject = function (obj) { obj[name[0]] = obj[name[0]] || {}; obj[name[0]][name[1]] = func; } else { - obj[name[0]] = func; + obj[name[0]] = func; } }; @@ -3483,7 +3693,7 @@ Method.prototype.send = function () { module.exports = Method; -},{"../utils/utils":7,"./errors":13,"./requestmanager":27}],23:[function(require,module,exports){ +},{"../utils/utils":7,"./errors":14,"./requestmanager":28}],24:[function(require,module,exports){ /* This file is part of ethereum.js. @@ -3500,7 +3710,7 @@ module.exports = Method; You should have received a copy of the GNU Lesser General Public License along with ethereum.js. If not, see . */ -/** +/** * @file namereg.js * @author Marek Kotewicz * @date 2015 @@ -3531,7 +3741,7 @@ var abi = [ module.exports = contract(abi).at(address); -},{"./contract":11}],24:[function(require,module,exports){ +},{"./contract":12}],25:[function(require,module,exports){ /* This file is part of ethereum.js. @@ -3581,7 +3791,7 @@ module.exports = { }; -},{"../utils/utils":7,"./property":25}],25:[function(require,module,exports){ +},{"../utils/utils":7,"./property":26}],26:[function(require,module,exports){ /* This file is part of ethereum.js. @@ -3617,7 +3827,7 @@ var Property = function (options) { /** * Should be called to format input args of method - * + * * @method formatInput * @param {Array} * @return {Array} @@ -3639,7 +3849,7 @@ Property.prototype.formatOutput = function (result) { /** * Should attach function to method - * + * * @method attachToObject * @param {Object} * @param {Function} @@ -3656,7 +3866,7 @@ Property.prototype.attachToObject = function (obj) { obj = obj[names[0]]; name = names[1]; } - + Object.defineProperty(obj, name, proto); var toAsyncName = function (prefix, name) { @@ -3699,7 +3909,7 @@ Property.prototype.getAsync = function (callback) { module.exports = Property; -},{"./requestmanager":27}],26:[function(require,module,exports){ +},{"./requestmanager":28}],27:[function(require,module,exports){ /* This file is part of ethereum.js. @@ -3734,7 +3944,7 @@ QtSyncProvider.prototype.send = function (payload) { module.exports = QtSyncProvider; -},{}],27:[function(require,module,exports){ +},{}],28:[function(require,module,exports){ /* This file is part of ethereum.js. @@ -3751,7 +3961,7 @@ module.exports = QtSyncProvider; You should have received a copy of the GNU Lesser General Public License along with ethereum.js. If not, see . */ -/** +/** * @file requestmanager.js * @author Jeffrey Wilcke * @author Marek Kotewicz @@ -3833,7 +4043,7 @@ RequestManager.prototype.sendAsync = function (data, callback) { if (err) { return callback(err); } - + if (!Jsonrpc.getInstance().isValidResponse(result)) { return callback(errors.InvalidResponse(result)); } @@ -3866,7 +4076,7 @@ RequestManager.prototype.sendBatch = function (data, callback) { } callback(err, results); - }); + }); }; /** @@ -3878,7 +4088,7 @@ RequestManager.prototype.sendBatch = function (data, callback) { RequestManager.prototype.setProvider = function (p) { this.provider = p; - if(this.provider && !this.isPolling) { + if (this.provider && !this.isPolling) { this.poll(); this.isPolling = true; } @@ -3919,9 +4129,7 @@ RequestManager.prototype.stopPolling = function (pollId) { */ RequestManager.prototype.reset = function () { for (var key in this.polls) { - if (this.polls.hasOwnProperty(key)) { - this.polls[key].uninstall(); - } + this.polls[key].uninstall(); } this.polls = {}; @@ -3941,7 +4149,7 @@ RequestManager.prototype.poll = function () { /*jshint maxcomplexity: 6 */ this.timeout = setTimeout(this.poll.bind(this), c.ETH_POLLING_TIMEOUT); - if (this.polls === {}) { + if (Object.keys(this.polls).length === 0) { return; } @@ -3953,10 +4161,8 @@ RequestManager.prototype.poll = function () { var pollsData = []; var pollsKeys = []; for (var key in this.polls) { - if (this.polls.hasOwnProperty(key)) { - pollsData.push(this.polls[key].data); - pollsKeys.push(key); - } + pollsData.push(this.polls[key].data); + pollsKeys.push(key); } if (pollsData.length === 0) { @@ -3979,13 +4185,13 @@ RequestManager.prototype.poll = function () { results.map(function (result, index) { var key = pollsKeys[index]; // make sure the filter is still installed after arrival of the request - if(self.polls[key]) { + if (self.polls[key]) { result.callback = self.polls[key].callback; return result; } else return false; }).filter(function (result) { - return (!result) ? false : true; + return !!result; }).filter(function (result) { var valid = Jsonrpc.getInstance().isValidResponse(result); if (!valid) { @@ -4003,7 +4209,7 @@ RequestManager.prototype.poll = function () { module.exports = RequestManager; -},{"../utils/config":5,"../utils/utils":7,"./errors":13,"./jsonrpc":21}],28:[function(require,module,exports){ +},{"../utils/config":5,"../utils/utils":7,"./errors":14,"./jsonrpc":22}],29:[function(require,module,exports){ /* This file is part of ethereum.js. @@ -4030,8 +4236,8 @@ var Method = require('./method'); var formatters = require('./formatters'); var post = new Method({ - name: 'post', - call: 'shh_post', + name: 'post', + call: 'shh_post', params: 1, inputFormatter: [formatters.inputPostFormatter] }); @@ -4073,7 +4279,7 @@ module.exports = { }; -},{"./formatters":17,"./method":22}],29:[function(require,module,exports){ +},{"./formatters":18,"./method":23}],30:[function(require,module,exports){ /* This file is part of ethereum.js. @@ -4090,7 +4296,7 @@ module.exports = { You should have received a copy of the GNU Lesser General Public License along with ethereum.js. If not, see . */ -/** +/** * @file transfer.js * @author Marek Kotewicz * @date 2015 @@ -4111,7 +4317,7 @@ var contract = require('./contract'); * @param {Function} callback, callback */ var transfer = function (from, iban, value, callback) { - var icap = new ICAP(iban); + var icap = new ICAP(iban); if (!icap.isValid()) { throw new Error('invalid iban address'); } @@ -4119,7 +4325,7 @@ var transfer = function (from, iban, value, callback) { if (icap.isDirect()) { return transferToAddress(from, icap.address(), value, callback); } - + if (!callback) { var address = namereg.addr(icap.institution()); return deposit(from, address, value, icap.client()); @@ -4128,7 +4334,7 @@ var transfer = function (from, iban, value, callback) { namereg.addr(icap.insitution(), function (err, address) { return deposit(from, address, value, icap.client(), callback); }); - + }; /** @@ -4169,7 +4375,7 @@ var deposit = function (from, address, value, client, callback) { module.exports = transfer; -},{"../web3":9,"./contract":11,"./icap":20,"./namereg":23}],30:[function(require,module,exports){ +},{"../web3":9,"./contract":12,"./icap":21,"./namereg":24}],31:[function(require,module,exports){ /* This file is part of ethereum.js. @@ -4285,9 +4491,9 @@ module.exports = { }; -},{"./method":22}],31:[function(require,module,exports){ +},{"./method":23}],32:[function(require,module,exports){ -},{}],32:[function(require,module,exports){ +},{}],33:[function(require,module,exports){ ;(function (root, factory) { if (typeof exports === "object") { // CommonJS @@ -4515,14 +4721,11 @@ module.exports = { var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8); } - } else if (thatWords.length > 0xffff) { + } else { // Copy one word at a time for (var i = 0; i < thatSigBytes; i += 4) { thisWords[(thisSigBytes + i) >>> 2] = thatWords[i >>> 2]; } - } else { - // Copy all words at once - thisWords.push.apply(thisWords, thatWords); } this.sigBytes += thatSigBytes; @@ -5033,7 +5236,7 @@ module.exports = { return CryptoJS; })); -},{}],33:[function(require,module,exports){ +},{}],34:[function(require,module,exports){ ;(function (root, factory, undef) { if (typeof exports === "object") { // CommonJS @@ -5357,7 +5560,7 @@ module.exports = { return CryptoJS.SHA3; })); -},{"./core":32,"./x64-core":34}],34:[function(require,module,exports){ +},{"./core":33,"./x64-core":35}],35:[function(require,module,exports){ ;(function (root, factory) { if (typeof exports === "object") { // CommonJS @@ -5662,7 +5865,7 @@ module.exports = { return CryptoJS; })); -},{"./core":32}],"bignumber.js":[function(require,module,exports){ +},{"./core":33}],"bignumber.js":[function(require,module,exports){ 'use strict'; module.exports = BigNumber; // jshint ignore:line @@ -5684,8 +5887,6 @@ if (typeof window !== 'undefined' && typeof window.web3 === 'undefined') { module.exports = web3; -},{"./lib/web3":9,"./lib/web3/contract":11,"./lib/web3/httpprovider":19,"./lib/web3/namereg":23,"./lib/web3/qtsync":26,"./lib/web3/transfer":29}]},{},["web3"]) - - +},{"./lib/web3":9,"./lib/web3/contract":12,"./lib/web3/httpprovider":20,"./lib/web3/namereg":24,"./lib/web3/qtsync":27,"./lib/web3/transfer":30}]},{},["web3"]) //# sourceMappingURL=web3-light.js.map -` \ No newline at end of file +` diff --git a/jsre/jsre.go b/jsre/jsre.go index 3d648f02c..c05af29a3 100644 --- a/jsre/jsre.go +++ b/jsre/jsre.go @@ -1,3 +1,20 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + +// Package jsre provides execution environment for JavaScript. package jsre import ( diff --git a/jsre/jsre_test.go b/jsre/jsre_test.go index 42308de88..135a5684b 100644 --- a/jsre/jsre_test.go +++ b/jsre/jsre_test.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package jsre import ( diff --git a/jsre/pp_js.go b/jsre/pp_js.go index 20821e4a1..d29e21cfa 100644 --- a/jsre/pp_js.go +++ b/jsre/pp_js.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package jsre const pp_js = ` @@ -97,7 +113,15 @@ var isMemberFunction = function(object, member) { } var isBigNumber = function (object) { - return typeof BigNumber !== 'undefined' && object instanceof BigNumber; + var result = typeof BigNumber !== 'undefined' && object instanceof BigNumber; + + if (!result) { + if(typeof(object) === "object") { + result = object.constructor.toString().indexOf("function BigNumber(") == 0; + } + } + + return result }; function prettyPrint(/* */) { diff --git a/logger/example_test.go b/logger/example_test.go index c624252b8..b1e880457 100644 --- a/logger/example_test.go +++ b/logger/example_test.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package logger import "os" diff --git a/logger/log.go b/logger/log.go index e2a35ba53..beef2c893 100644 --- a/logger/log.go +++ b/logger/log.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package logger import ( diff --git a/logger/loggers.go b/logger/loggers.go index 42c8cbc07..da93d168a 100644 --- a/logger/loggers.go +++ b/logger/loggers.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + /* Package logger implements a multi-output leveled logger. diff --git a/logger/loggers_test.go b/logger/loggers_test.go index 276b65b78..3569b519b 100644 --- a/logger/loggers_test.go +++ b/logger/loggers_test.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package logger import ( diff --git a/logger/logsystem.go b/logger/logsystem.go index 4dadb126e..16001e4d0 100644 --- a/logger/logsystem.go +++ b/logger/logsystem.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package logger import ( diff --git a/logger/sys.go b/logger/sys.go index c4d5c382a..e1309e129 100644 --- a/logger/sys.go +++ b/logger/sys.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package logger import ( diff --git a/logger/types.go b/logger/types.go index 0f70578ba..796605c84 100644 --- a/logger/types.go +++ b/logger/types.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package logger import ( diff --git a/logger/verbosity.go b/logger/verbosity.go index e052b80a3..0c026a39d 100644 --- a/logger/verbosity.go +++ b/logger/verbosity.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package logger const ( diff --git a/metrics/disk.go b/metrics/disk.go index 1b6c56773..c85ee21df 100644 --- a/metrics/disk.go +++ b/metrics/disk.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package metrics // DiskStats is the per process disk io stats. diff --git a/metrics/disk_linux.go b/metrics/disk_linux.go index 82b204534..ee7ad8756 100644 --- a/metrics/disk_linux.go +++ b/metrics/disk_linux.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + // Contains the Linux implementation of process disk IO counter retrieval. package metrics diff --git a/metrics/disk_nop.go b/metrics/disk_nop.go index 539ab8d1a..bab7d14db 100644 --- a/metrics/disk_nop.go +++ b/metrics/disk_nop.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + // +build !linux package metrics diff --git a/metrics/metrics.go b/metrics/metrics.go index 33004ee3b..09d1f8b31 100644 --- a/metrics/metrics.go +++ b/metrics/metrics.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + // Package metrics provides general system and process level metrics collection. package metrics diff --git a/miner/agent.go b/miner/agent.go index a7d017aa5..8455ed36e 100644 --- a/miner/agent.go +++ b/miner/agent.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package miner import ( diff --git a/miner/miner.go b/miner/miner.go index 7f73f3ee8..173be1a14 100644 --- a/miner/miner.go +++ b/miner/miner.go @@ -1,3 +1,20 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + +// Package miner implements Ethereum block creation and mining. package miner import ( @@ -137,3 +154,8 @@ func (self *Miner) PendingState() *state.StateDB { func (self *Miner) PendingBlock() *types.Block { return self.worker.pendingBlock() } + +func (self *Miner) SetEtherbase(addr common.Address) { + self.coinbase = addr + self.worker.setEtherbase(addr) +} diff --git a/miner/remote_agent.go b/miner/remote_agent.go index 6a44782f6..b05d9c7e0 100644 --- a/miner/remote_agent.go +++ b/miner/remote_agent.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package miner import ( diff --git a/miner/worker.go b/miner/worker.go index f06b6afa1..79514b231 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package miner import ( @@ -79,9 +95,10 @@ type worker struct { quit chan struct{} pow pow.PoW - eth core.Backend - chain *core.ChainManager - proc *core.BlockProcessor + eth core.Backend + chain *core.ChainManager + proc *core.BlockProcessor + extraDb common.Database coinbase common.Address gasPrice *big.Int @@ -105,6 +122,7 @@ func newWorker(coinbase common.Address, eth core.Backend) *worker { worker := &worker{ eth: eth, mux: eth.EventMux(), + extraDb: eth.ExtraDb(), recv: make(chan *types.Block), gasPrice: new(big.Int), chain: eth.ChainManager(), @@ -122,6 +140,12 @@ func newWorker(coinbase common.Address, eth core.Backend) *worker { return worker } +func (self *worker) setEtherbase(addr common.Address) { + self.mu.Lock() + defer self.mu.Unlock() + self.coinbase = addr +} + func (self *worker) pendingState() *state.StateDB { self.currentMu.Lock() defer self.currentMu.Unlock() @@ -233,11 +257,28 @@ func (self *worker) wait() { continue } - _, err := self.chain.WriteBlock(block, false) + parent := self.chain.GetBlock(block.ParentHash()) + if parent == nil { + glog.V(logger.Error).Infoln("Invalid block found during mining") + continue + } + if err := core.ValidateHeader(self.eth.BlockProcessor().Pow, block.Header(), parent, true); err != nil && err != core.BlockFutureErr { + glog.V(logger.Error).Infoln("Invalid header on mined block:", err) + continue + } + + stat, err := self.chain.WriteBlock(block, false) if err != nil { glog.V(logger.Error).Infoln("error writing block to chain", err) continue } + // check if canon block and write transactions + if stat == core.CanonStatTy { + // This puts transactions in a extra db for rpc + core.PutTransactions(self.extraDb, block, block.Transactions()) + // store the receipts + core.PutReceipts(self.extraDb, self.current.receipts) + } // check staleness and display confirmation var stale, confirm string @@ -252,7 +293,13 @@ func (self *worker) wait() { glog.V(logger.Info).Infof("🔨 Mined %sblock (#%v / %x). %s", stale, block.Number(), block.Hash().Bytes()[:4], confirm) // broadcast before waiting for validation - go self.mux.Post(core.NewMinedBlockEvent{block}) + go func(block *types.Block, logs state.Logs) { + self.mux.Post(core.NewMinedBlockEvent{block}) + self.mux.Post(core.ChainEvent{block, block.Hash(), logs}) + if stat == core.CanonStatTy { + self.mux.Post(core.ChainHeadEvent{block}) + } + }(block, self.current.state.Logs()) self.commitNewWork() } @@ -273,8 +320,6 @@ func (self *worker) push() { if agent.Work() != nil { agent.Work() <- self.current.block - } else { - common.Report(fmt.Sprintf("%v %T\n", agent, agent)) } } } @@ -368,8 +413,8 @@ func (self *worker) commitNewWork() { tstart := time.Now() parent := self.chain.CurrentBlock() tstamp := tstart.Unix() - if tstamp <= parent.Time() { - tstamp = parent.Time() + 1 + if tstamp <= int64(parent.Time()) { + tstamp = int64(parent.Time()) + 1 } // this will ensure we're not going off too far in the future if now := time.Now().Unix(); tstamp > now+4 { @@ -382,7 +427,7 @@ func (self *worker) commitNewWork() { header := &types.Header{ ParentHash: parent.Hash(), Number: num.Add(num, common.Big1), - Difficulty: core.CalcDifficulty(tstamp, parent.Time(), parent.Difficulty()), + Difficulty: core.CalcDifficulty(int64(tstamp), int64(parent.Time()), parent.Difficulty()), GasLimit: core.CalcGasLimit(parent), GasUsed: new(big.Int), Coinbase: self.coinbase, @@ -428,7 +473,7 @@ func (self *worker) commitNewWork() { if atomic.LoadInt32(&self.mining) == 1 { // commit state root after all state transitions. core.AccumulateRewards(self.current.state, header, uncles) - current.state.Update() + current.state.SyncObjects() self.current.state.Sync() header.Root = current.state.Root() } @@ -501,18 +546,18 @@ func (env *environment) commitTransactions(transactions types.Transactions, gasP err := env.commitTransaction(tx, proc) switch { - case core.IsNonceErr(err) || core.IsInvalidTxErr(err): - env.remove.Add(tx.Hash()) - - if glog.V(logger.Detail) { - glog.Infof("TX (%x) failed, will be removed: %v\n", tx.Hash().Bytes()[:4], err) - } case state.IsGasLimitErr(err): // ignore the transactor so no nonce errors will be thrown for this account // next time the worker is run, they'll be picked up again. env.ignoredTransactors.Add(from) glog.V(logger.Detail).Infof("Gas limit reached for (%x) in this block. Continue to try smaller txs\n", from[:4]) + case err != nil: + env.remove.Add(tx.Hash()) + + if glog.V(logger.Detail) { + glog.Infof("TX (%x) failed, will be removed: %v\n", tx.Hash().Bytes()[:4], err) + } default: env.tcount++ } @@ -522,7 +567,7 @@ func (env *environment) commitTransactions(transactions types.Transactions, gasP func (env *environment) commitTransaction(tx *types.Transaction, proc *core.BlockProcessor) error { snap := env.state.Copy() receipt, _, err := proc.ApplyTransaction(env.coinbase, env.state, env.header, tx, env.header.GasUsed, true) - if err != nil && (core.IsNonceErr(err) || state.IsGasLimitErr(err) || core.IsInvalidTxErr(err)) { + if err != nil { env.state.Set(snap) return err } diff --git a/p2p/dial.go b/p2p/dial.go index 45cd8116b..2be88e739 100644 --- a/p2p/dial.go +++ b/p2p/dial.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package p2p import ( diff --git a/p2p/dial_test.go b/p2p/dial_test.go index 78568c5ed..986b6be49 100644 --- a/p2p/dial_test.go +++ b/p2p/dial_test.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package p2p import ( diff --git a/p2p/discover/database.go b/p2p/discover/database.go index 1b73c3dea..915e55a48 100644 --- a/p2p/discover/database.go +++ b/p2p/discover/database.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + // Contains the node database, storing previously seen nodes and any collected // metadata about them for QoS purposes. diff --git a/p2p/discover/database_test.go b/p2p/discover/database_test.go index 4fce164ca..693089698 100644 --- a/p2p/discover/database_test.go +++ b/p2p/discover/database_test.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package discover import ( diff --git a/p2p/discover/node.go b/p2p/discover/node.go index a365ade15..fe65e1897 100644 --- a/p2p/discover/node.go +++ b/p2p/discover/node.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package discover import ( diff --git a/p2p/discover/node_test.go b/p2p/discover/node_test.go index 795460c49..83cc05c57 100644 --- a/p2p/discover/node_test.go +++ b/p2p/discover/node_test.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package discover import ( diff --git a/p2p/discover/table.go b/p2p/discover/table.go index f71320425..70adfaddc 100644 --- a/p2p/discover/table.go +++ b/p2p/discover/table.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + // Package discover implements the Node Discovery Protocol. // // The Node Discovery protocol provides a way to find RLPx nodes that diff --git a/p2p/discover/table_test.go b/p2p/discover/table_test.go index 829899916..ca4b517ed 100644 --- a/p2p/discover/table_test.go +++ b/p2p/discover/table_test.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package discover import ( diff --git a/p2p/discover/udp.go b/p2p/discover/udp.go index 539ccd460..95862c72b 100644 --- a/p2p/discover/udp.go +++ b/p2p/discover/udp.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package discover import ( diff --git a/p2p/discover/udp_test.go b/p2p/discover/udp_test.go index b5d035a98..032cbd499 100644 --- a/p2p/discover/udp_test.go +++ b/p2p/discover/udp_test.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package discover import ( diff --git a/p2p/message.go b/p2p/message.go index 5ab5ab73e..088fde1fc 100644 --- a/p2p/message.go +++ b/p2p/message.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package p2p import ( diff --git a/p2p/message_test.go b/p2p/message_test.go index 9a93dd347..d9befa0c8 100644 --- a/p2p/message_test.go +++ b/p2p/message_test.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package p2p import ( diff --git a/p2p/metrics.go b/p2p/metrics.go index 4b519e438..d4c3dc242 100644 --- a/p2p/metrics.go +++ b/p2p/metrics.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + // Contains the meters and timers used by the networking layer. package p2p diff --git a/p2p/nat/nat.go b/p2p/nat/nat.go index 9acb34398..1d4140aa0 100644 --- a/p2p/nat/nat.go +++ b/p2p/nat/nat.go @@ -1,4 +1,20 @@ -// Package nat provides access to common port mapping protocols. +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + +// Package nat provides access to common network port mapping protocols. package nat import ( diff --git a/p2p/nat/nat_test.go b/p2p/nat/nat_test.go index b62640b4b..de0449cc1 100644 --- a/p2p/nat/nat_test.go +++ b/p2p/nat/nat_test.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package nat import ( diff --git a/p2p/nat/natpmp.go b/p2p/nat/natpmp.go index f249c6073..aa7a87498 100644 --- a/p2p/nat/natpmp.go +++ b/p2p/nat/natpmp.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package nat import ( diff --git a/p2p/nat/natupnp.go b/p2p/nat/natupnp.go index 21a9cf8b1..5da791950 100644 --- a/p2p/nat/natupnp.go +++ b/p2p/nat/natupnp.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package nat import ( diff --git a/p2p/nat/natupnp_test.go b/p2p/nat/natupnp_test.go index 074e97c81..a63791458 100644 --- a/p2p/nat/natupnp_test.go +++ b/p2p/nat/natupnp_test.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package nat import ( diff --git a/p2p/peer.go b/p2p/peer.go index e1bda1d03..c5e1e1b8f 100644 --- a/p2p/peer.go +++ b/p2p/peer.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package p2p import ( diff --git a/p2p/peer_error.go b/p2p/peer_error.go index 6938a9801..505cf729d 100644 --- a/p2p/peer_error.go +++ b/p2p/peer_error.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package p2p import ( diff --git a/p2p/peer_test.go b/p2p/peer_test.go index d849c925f..9c43a9f9f 100644 --- a/p2p/peer_test.go +++ b/p2p/peer_test.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package p2p import ( diff --git a/p2p/protocol.go b/p2p/protocol.go index a229ba911..60dcc2a60 100644 --- a/p2p/protocol.go +++ b/p2p/protocol.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package p2p import "fmt" diff --git a/p2p/rlpx.go b/p2p/rlpx.go index 6bbf20671..eca3d9ed6 100644 --- a/p2p/rlpx.go +++ b/p2p/rlpx.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package p2p import ( diff --git a/p2p/rlpx_test.go b/p2p/rlpx_test.go index 44be46a99..ac8d7b2db 100644 --- a/p2p/rlpx_test.go +++ b/p2p/rlpx_test.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package p2p import ( diff --git a/p2p/server.go b/p2p/server.go index 9078841a8..33de4f32a 100644 --- a/p2p/server.go +++ b/p2p/server.go @@ -1,3 +1,20 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + +// Package p2p implements the Ethereum p2p network protocols. package p2p import ( diff --git a/p2p/server_test.go b/p2p/server_test.go index e8d21a188..6957984ec 100644 --- a/p2p/server_test.go +++ b/p2p/server_test.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package p2p import ( diff --git a/params/protocol_params.go b/params/protocol_params.go index d0bc2f4ad..e62bfdf8f 100755 --- a/params/protocol_params.go +++ b/params/protocol_params.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + // DO NOT EDIT!!! // AUTOGENERATED FROM generators/defaults.go diff --git a/pow/block.go b/pow/block.go index 9ae25bd4d..0c0881982 100644 --- a/pow/block.go +++ b/pow/block.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package pow import ( diff --git a/pow/dagger/dagger.go b/pow/dagger/dagger.go index b941c0eeb..f9957926e 100644 --- a/pow/dagger/dagger.go +++ b/pow/dagger/dagger.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package dagger import ( diff --git a/pow/dagger/dagger_test.go b/pow/dagger/dagger_test.go index f53f4bac9..9eb30f2b8 100644 --- a/pow/dagger/dagger_test.go +++ b/pow/dagger/dagger_test.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package dagger import ( diff --git a/pow/ezp/pow.go b/pow/ezp/pow.go index c838dd5ec..cdd1f016d 100644 --- a/pow/ezp/pow.go +++ b/pow/ezp/pow.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package ezp import ( diff --git a/pow/pow.go b/pow/pow.go index 73984a4ae..a6076e621 100644 --- a/pow/pow.go +++ b/pow/pow.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package pow type PoW interface { diff --git a/rlp/decode.go b/rlp/decode.go index 0c660426f..4462d4be4 100644 --- a/rlp/decode.go +++ b/rlp/decode.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package rlp import ( diff --git a/rlp/decode_test.go b/rlp/decode_test.go index ae65346a9..71dacaba4 100644 --- a/rlp/decode_test.go +++ b/rlp/decode_test.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package rlp import ( diff --git a/rlp/doc.go b/rlp/doc.go index aab98ea43..e274b104e 100644 --- a/rlp/doc.go +++ b/rlp/doc.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + /* Package rlp implements the RLP serialization format. diff --git a/rlp/encode.go b/rlp/encode.go index b418fb501..1fef36078 100644 --- a/rlp/encode.go +++ b/rlp/encode.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package rlp import ( diff --git a/rlp/encode_test.go b/rlp/encode_test.go index 7b70a0629..ce32c942b 100644 --- a/rlp/encode_test.go +++ b/rlp/encode_test.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package rlp import ( diff --git a/rlp/encoder_example_test.go b/rlp/encoder_example_test.go index 57bad604d..e1473ec8b 100644 --- a/rlp/encoder_example_test.go +++ b/rlp/encoder_example_test.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package rlp import ( diff --git a/rlp/typecache.go b/rlp/typecache.go index d512012e9..2abbf9f9e 100644 --- a/rlp/typecache.go +++ b/rlp/typecache.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package rlp import ( diff --git a/rpc/api/admin.go b/rpc/api/admin.go index b27482cfe..f226434ad 100644 --- a/rpc/api/admin.go +++ b/rpc/api/admin.go @@ -1,12 +1,36 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package api import ( "fmt" "io" + "math/big" "os" + "time" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/compiler" + "github.com/ethereum/go-ethereum/common/docserver" + "github.com/ethereum/go-ethereum/common/natspec" + "github.com/ethereum/go-ethereum/common/registrar" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/eth" "github.com/ethereum/go-ethereum/logger/glog" "github.com/ethereum/go-ethereum/rlp" @@ -24,17 +48,29 @@ const ( var ( // mapping between methods and handlers AdminMapping = map[string]adminhandler{ - "admin_addPeer": (*adminApi).AddPeer, - "admin_peers": (*adminApi).Peers, - "admin_nodeInfo": (*adminApi).NodeInfo, - "admin_exportChain": (*adminApi).ExportChain, - "admin_importChain": (*adminApi).ImportChain, - "admin_verbosity": (*adminApi).Verbosity, - "admin_chainSyncStatus": (*adminApi).ChainSyncStatus, - "admin_setSolc": (*adminApi).SetSolc, - "admin_datadir": (*adminApi).DataDir, - "admin_startRPC": (*adminApi).StartRPC, - "admin_stopRPC": (*adminApi).StopRPC, + "admin_addPeer": (*adminApi).AddPeer, + "admin_peers": (*adminApi).Peers, + "admin_nodeInfo": (*adminApi).NodeInfo, + "admin_exportChain": (*adminApi).ExportChain, + "admin_importChain": (*adminApi).ImportChain, + "admin_verbosity": (*adminApi).Verbosity, + "admin_chainSyncStatus": (*adminApi).ChainSyncStatus, + "admin_setSolc": (*adminApi).SetSolc, + "admin_datadir": (*adminApi).DataDir, + "admin_startRPC": (*adminApi).StartRPC, + "admin_stopRPC": (*adminApi).StopRPC, + "admin_setGlobalRegistrar": (*adminApi).SetGlobalRegistrar, + "admin_setHashReg": (*adminApi).SetHashReg, + "admin_setUrlHint": (*adminApi).SetUrlHint, + "admin_saveInfo": (*adminApi).SaveInfo, + "admin_register": (*adminApi).Register, + "admin_registerUrl": (*adminApi).RegisterUrl, + "admin_startNatSpec": (*adminApi).StartNatSpec, + "admin_stopNatSpec": (*adminApi).StopNatSpec, + "admin_getContractInfo": (*adminApi).GetContractInfo, + "admin_httpGet": (*adminApi).HttpGet, + "admin_sleepBlocks": (*adminApi).SleepBlocks, + "admin_sleep": (*adminApi).Sleep, } ) @@ -47,6 +83,7 @@ type adminApi struct { ethereum *eth.Ethereum codec codec.Codec coder codec.ApiCoder + ds *docserver.DocServer } // create a new admin api instance @@ -56,6 +93,7 @@ func NewAdminApi(xeth *xeth.XEth, ethereum *eth.Ethereum, codec codec.Codec) *ad ethereum: ethereum, codec: codec, coder: codec.New(nil), + ds: docserver.New("/"), } } @@ -244,3 +282,195 @@ func (self *adminApi) StopRPC(req *shared.Request) (interface{}, error) { comms.StopHttp() return true, nil } + +func (self *adminApi) SleepBlocks(req *shared.Request) (interface{}, error) { + args := new(SleepBlocksArgs) + if err := self.coder.Decode(req.Params, &args); err != nil { + return nil, shared.NewDecodeParamError(err.Error()) + } + var timer <-chan time.Time + var height *big.Int + var err error + if args.Timeout > 0 { + timer = time.NewTimer(time.Duration(args.Timeout) * time.Second).C + } + + height = new(big.Int).Add(self.xeth.CurrentBlock().Number(), big.NewInt(args.N)) + height, err = sleepBlocks(self.xeth.UpdateState(), height, timer) + if err != nil { + return nil, err + } + return height.Uint64(), nil +} + +func sleepBlocks(wait chan *big.Int, height *big.Int, timer <-chan time.Time) (newHeight *big.Int, err error) { + wait <- height + select { + case <-timer: + // if times out make sure the xeth loop does not block + go func() { + select { + case wait <- nil: + case <-wait: + } + }() + return nil, fmt.Errorf("timeout") + case newHeight = <-wait: + } + return +} + +func (self *adminApi) Sleep(req *shared.Request) (interface{}, error) { + args := new(SleepArgs) + if err := self.coder.Decode(req.Params, &args); err != nil { + return nil, shared.NewDecodeParamError(err.Error()) + } + time.Sleep(time.Duration(args.S) * time.Second) + return nil, nil +} + +func (self *adminApi) SetGlobalRegistrar(req *shared.Request) (interface{}, error) { + args := new(SetGlobalRegistrarArgs) + if err := self.coder.Decode(req.Params, &args); err != nil { + return nil, shared.NewDecodeParamError(err.Error()) + } + + sender := common.HexToAddress(args.ContractAddress) + + reg := registrar.New(self.xeth) + txhash, err := reg.SetGlobalRegistrar(args.NameReg, sender) + if err != nil { + return false, err + } + + return txhash, nil +} + +func (self *adminApi) SetHashReg(req *shared.Request) (interface{}, error) { + args := new(SetHashRegArgs) + if err := self.coder.Decode(req.Params, &args); err != nil { + return nil, shared.NewDecodeParamError(err.Error()) + } + + reg := registrar.New(self.xeth) + sender := common.HexToAddress(args.Sender) + txhash, err := reg.SetHashReg(args.HashReg, sender) + if err != nil { + return false, err + } + + return txhash, nil +} + +func (self *adminApi) SetUrlHint(req *shared.Request) (interface{}, error) { + args := new(SetUrlHintArgs) + if err := self.coder.Decode(req.Params, &args); err != nil { + return nil, shared.NewDecodeParamError(err.Error()) + } + + urlHint := args.UrlHint + sender := common.HexToAddress(args.Sender) + + reg := registrar.New(self.xeth) + txhash, err := reg.SetUrlHint(urlHint, sender) + if err != nil { + return nil, err + } + + return txhash, nil +} + +func (self *adminApi) SaveInfo(req *shared.Request) (interface{}, error) { + args := new(SaveInfoArgs) + if err := self.coder.Decode(req.Params, &args); err != nil { + return nil, shared.NewDecodeParamError(err.Error()) + } + + contenthash, err := compiler.SaveInfo(&args.ContractInfo, args.Filename) + if err != nil { + return nil, err + } + + return contenthash.Hex(), nil +} + +func (self *adminApi) Register(req *shared.Request) (interface{}, error) { + args := new(RegisterArgs) + if err := self.coder.Decode(req.Params, &args); err != nil { + return nil, shared.NewDecodeParamError(err.Error()) + } + + sender := common.HexToAddress(args.Sender) + // sender and contract address are passed as hex strings + codeb := self.xeth.CodeAtBytes(args.Address) + codeHash := common.BytesToHash(crypto.Sha3(codeb)) + contentHash := common.HexToHash(args.ContentHashHex) + registry := registrar.New(self.xeth) + + _, err := registry.SetHashToHash(sender, codeHash, contentHash) + if err != nil { + return false, err + } + + return true, nil +} + +func (self *adminApi) RegisterUrl(req *shared.Request) (interface{}, error) { + args := new(RegisterUrlArgs) + if err := self.coder.Decode(req.Params, &args); err != nil { + return nil, shared.NewDecodeParamError(err.Error()) + } + + sender := common.HexToAddress(args.Sender) + registry := registrar.New(self.xeth) + _, err := registry.SetUrlToHash(sender, common.HexToHash(args.ContentHash), args.Url) + if err != nil { + return false, err + } + + return true, nil +} + +func (self *adminApi) StartNatSpec(req *shared.Request) (interface{}, error) { + self.ethereum.NatSpec = true + return true, nil +} + +func (self *adminApi) StopNatSpec(req *shared.Request) (interface{}, error) { + self.ethereum.NatSpec = false + return true, nil +} + +func (self *adminApi) GetContractInfo(req *shared.Request) (interface{}, error) { + args := new(GetContractInfoArgs) + if err := self.coder.Decode(req.Params, &args); err != nil { + return nil, shared.NewDecodeParamError(err.Error()) + } + + infoDoc, err := natspec.FetchDocsForContract(args.Contract, self.xeth, self.ds) + if err != nil { + return nil, err + } + + var info interface{} + err = self.coder.Decode(infoDoc, &info) + if err != nil { + return nil, err + } + + return info, nil +} + +func (self *adminApi) HttpGet(req *shared.Request) (interface{}, error) { + args := new(HttpGetArgs) + if err := self.coder.Decode(req.Params, &args); err != nil { + return nil, shared.NewDecodeParamError(err.Error()) + } + + resp, err := self.ds.Get(args.Uri, args.Path) + if err != nil { + return nil, err + } + + return string(resp), nil +} diff --git a/rpc/api/admin_args.go b/rpc/api/admin_args.go index 5437971ca..60a1fb496 100644 --- a/rpc/api/admin_args.go +++ b/rpc/api/admin_args.go @@ -1,8 +1,25 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package api import ( "encoding/json" + "github.com/ethereum/go-ethereum/common/compiler" "github.com/ethereum/go-ethereum/rpc/shared" ) @@ -113,7 +130,7 @@ func (args *StartRPCArgs) UnmarshalJSON(b []byte) (err error) { args.ListenPort = 8545 args.Apis = "net,eth,web3" - if len(obj) >= 1 { + if len(obj) >= 1 && obj[0] != nil { if addr, ok := obj[0].(string); ok { args.ListenAddress = addr } else { @@ -121,7 +138,7 @@ func (args *StartRPCArgs) UnmarshalJSON(b []byte) (err error) { } } - if len(obj) >= 2 { + if len(obj) >= 2 && obj[1] != nil { if port, ok := obj[1].(float64); ok && port >= 0 && port <= 64*1024 { args.ListenPort = uint(port) } else { @@ -129,7 +146,7 @@ func (args *StartRPCArgs) UnmarshalJSON(b []byte) (err error) { } } - if len(obj) >= 3 { + if len(obj) >= 3 && obj[2] != nil { if corsDomain, ok := obj[2].(string); ok { args.CorsDomain = corsDomain } else { @@ -137,7 +154,7 @@ func (args *StartRPCArgs) UnmarshalJSON(b []byte) (err error) { } } - if len(obj) >= 4 { + if len(obj) >= 4 && obj[3] != nil { if apis, ok := obj[3].(string); ok { args.Apis = apis } else { @@ -147,3 +164,327 @@ func (args *StartRPCArgs) UnmarshalJSON(b []byte) (err error) { return nil } + +type SleepArgs struct { + S int +} + +func (args *SleepArgs) UnmarshalJSON(b []byte) (err error) { + + var obj []interface{} + if err := json.Unmarshal(b, &obj); err != nil { + return shared.NewDecodeParamError(err.Error()) + } + if len(obj) >= 1 { + if obj[0] != nil { + if n, err := numString(obj[0]); err == nil { + args.S = int(n.Int64()) + } else { + return shared.NewInvalidTypeError("N", "not an integer: "+err.Error()) + } + } else { + return shared.NewInsufficientParamsError(0, 1) + } + } + return nil +} + +type SleepBlocksArgs struct { + N int64 + Timeout int64 +} + +func (args *SleepBlocksArgs) UnmarshalJSON(b []byte) (err error) { + + var obj []interface{} + if err := json.Unmarshal(b, &obj); err != nil { + return shared.NewDecodeParamError(err.Error()) + } + + args.N = 1 + args.Timeout = 0 + if len(obj) >= 1 && obj[0] != nil { + if n, err := numString(obj[0]); err == nil { + args.N = n.Int64() + } else { + return shared.NewInvalidTypeError("N", "not an integer: "+err.Error()) + } + } + + if len(obj) >= 2 && obj[1] != nil { + if n, err := numString(obj[1]); err == nil { + args.Timeout = n.Int64() + } else { + return shared.NewInvalidTypeError("Timeout", "not an integer: "+err.Error()) + } + } + + return nil +} + +type SetGlobalRegistrarArgs struct { + NameReg string + ContractAddress string +} + +func (args *SetGlobalRegistrarArgs) UnmarshalJSON(b []byte) (err error) { + var obj []interface{} + if err := json.Unmarshal(b, &obj); err != nil { + return shared.NewDecodeParamError(err.Error()) + } + + if len(obj) == 0 { + return shared.NewDecodeParamError("Expected namereg address") + } + + if len(obj) >= 1 { + if namereg, ok := obj[0].(string); ok { + args.NameReg = namereg + } else { + return shared.NewInvalidTypeError("NameReg", "not a string") + } + } + + if len(obj) >= 2 && obj[1] != nil { + if addr, ok := obj[1].(string); ok { + args.ContractAddress = addr + } else { + return shared.NewInvalidTypeError("ContractAddress", "not a string") + } + } + + return nil +} + +type SetHashRegArgs struct { + HashReg string + Sender string +} + +func (args *SetHashRegArgs) UnmarshalJSON(b []byte) (err error) { + var obj []interface{} + if err := json.Unmarshal(b, &obj); err != nil { + return shared.NewDecodeParamError(err.Error()) + } + + if len(obj) >= 1 && obj[0] != nil { + if hashreg, ok := obj[0].(string); ok { + args.HashReg = hashreg + } else { + return shared.NewInvalidTypeError("HashReg", "not a string") + } + } + + if len(obj) >= 2 && obj[1] != nil { + if sender, ok := obj[1].(string); ok { + args.Sender = sender + } else { + return shared.NewInvalidTypeError("Sender", "not a string") + } + } + + return nil +} + +type SetUrlHintArgs struct { + UrlHint string + Sender string +} + +func (args *SetUrlHintArgs) UnmarshalJSON(b []byte) (err error) { + var obj []interface{} + if err := json.Unmarshal(b, &obj); err != nil { + return shared.NewDecodeParamError(err.Error()) + } + + if len(obj) >= 1 && obj[0] != nil { + if urlhint, ok := obj[0].(string); ok { + args.UrlHint = urlhint + } else { + return shared.NewInvalidTypeError("UrlHint", "not a string") + } + } + + if len(obj) >= 2 && obj[1] != nil { + if sender, ok := obj[1].(string); ok { + args.Sender = sender + } else { + return shared.NewInvalidTypeError("Sender", "not a string") + } + } + + return nil +} + +type SaveInfoArgs struct { + ContractInfo compiler.ContractInfo + Filename string +} + +func (args *SaveInfoArgs) UnmarshalJSON(b []byte) (err error) { + var obj []interface{} + if err := json.Unmarshal(b, &obj); err != nil { + return shared.NewDecodeParamError(err.Error()) + } + + if len(obj) < 2 { + return shared.NewInsufficientParamsError(len(obj), 2) + } + + if jsonraw, err := json.Marshal(obj[0]); err == nil { + if err = json.Unmarshal(jsonraw, &args.ContractInfo); err != nil { + return err + } + } else { + return err + } + + if filename, ok := obj[1].(string); ok { + args.Filename = filename + } else { + return shared.NewInvalidTypeError("Filename", "not a string") + } + + return nil +} + +type RegisterArgs struct { + Sender string + Address string + ContentHashHex string +} + +func (args *RegisterArgs) UnmarshalJSON(b []byte) (err error) { + var obj []interface{} + if err := json.Unmarshal(b, &obj); err != nil { + return shared.NewDecodeParamError(err.Error()) + } + + if len(obj) < 3 { + return shared.NewInsufficientParamsError(len(obj), 3) + } + + if len(obj) >= 1 { + if sender, ok := obj[0].(string); ok { + args.Sender = sender + } else { + return shared.NewInvalidTypeError("Sender", "not a string") + } + } + + if len(obj) >= 2 { + if address, ok := obj[1].(string); ok { + args.Address = address + } else { + return shared.NewInvalidTypeError("Address", "not a string") + } + } + + if len(obj) >= 3 { + if hex, ok := obj[2].(string); ok { + args.ContentHashHex = hex + } else { + return shared.NewInvalidTypeError("ContentHashHex", "not a string") + } + } + + return nil +} + +type RegisterUrlArgs struct { + Sender string + ContentHash string + Url string +} + +func (args *RegisterUrlArgs) UnmarshalJSON(b []byte) (err error) { + var obj []interface{} + if err := json.Unmarshal(b, &obj); err != nil { + return shared.NewDecodeParamError(err.Error()) + } + + if len(obj) >= 1 { + if sender, ok := obj[0].(string); ok { + args.Sender = sender + } else { + return shared.NewInvalidTypeError("Sender", "not a string") + } + } + + if len(obj) >= 2 { + if sender, ok := obj[1].(string); ok { + args.ContentHash = sender + } else { + return shared.NewInvalidTypeError("ContentHash", "not a string") + } + } + + if len(obj) >= 3 { + if sender, ok := obj[2].(string); ok { + args.Url = sender + } else { + return shared.NewInvalidTypeError("Url", "not a string") + } + } + + return nil +} + +type GetContractInfoArgs struct { + Contract string +} + +func (args *GetContractInfoArgs) UnmarshalJSON(b []byte) (err error) { + var obj []interface{} + if err := json.Unmarshal(b, &obj); err != nil { + return shared.NewDecodeParamError(err.Error()) + } + + if len(obj) < 1 { + return shared.NewInsufficientParamsError(len(obj), 1) + } + + if len(obj) >= 1 { + if contract, ok := obj[0].(string); ok { + args.Contract = contract + } else { + return shared.NewInvalidTypeError("Contract", "not a string") + } + } + + return nil +} + +type HttpGetArgs struct { + Uri string + Path string +} + +func (args *HttpGetArgs) UnmarshalJSON(b []byte) (err error) { + var obj []interface{} + if err := json.Unmarshal(b, &obj); err != nil { + return shared.NewDecodeParamError(err.Error()) + } + + if len(obj) < 1 { + return shared.NewInsufficientParamsError(len(obj), 1) + } + + if len(obj) >= 1 { + if uri, ok := obj[0].(string); ok { + args.Uri = uri + } else { + return shared.NewInvalidTypeError("Uri", "not a string") + } + } + + if len(obj) >= 2 && obj[1] != nil { + if path, ok := obj[1].(string); ok { + args.Path = path + } else { + return shared.NewInvalidTypeError("Path", "not a string") + } + } + + return nil +} diff --git a/rpc/api/admin_js.go b/rpc/api/admin_js.go index 97642ade7..b0ba6febb 100644 --- a/rpc/api/admin_js.go +++ b/rpc/api/admin_js.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package api const Admin_JS = ` @@ -9,73 +25,128 @@ web3._extend({ name: 'addPeer', call: 'admin_addPeer', params: 1, - inputFormatter: [web3._extend.utils.formatInputString], - outputFormatter: web3._extend.formatters.formatOutputBool + inputFormatter: [null] }), new web3._extend.Method({ name: 'exportChain', call: 'admin_exportChain', params: 1, - inputFormatter: [web3._extend.utils.formatInputString], - outputFormatter: function(obj) { return obj; } + inputFormatter: [null] }), new web3._extend.Method({ name: 'importChain', call: 'admin_importChain', params: 1, - inputFormatter: [web3._extend.utils.formatInputString], - outputFormatter: function(obj) { return obj; } + inputFormatter: [null] + }), + new web3._extend.Method({ + name: 'sleepBlocks', + call: 'admin_sleepBlocks', + params: 2, + inputFormatter: [null, null] }), new web3._extend.Method({ name: 'verbosity', call: 'admin_verbosity', params: 1, - inputFormatter: [web3._extend.utils.formatInputInt], - outputFormatter: web3._extend.formatters.formatOutputBool + inputFormatter: [web3._extend.utils.fromDecimal] }), new web3._extend.Method({ name: 'setSolc', call: 'admin_setSolc', params: 1, - inputFormatter: [web3._extend.utils.formatInputString], - outputFormatter: web3._extend.formatters.formatOutputString + inputFormatter: [null] }), new web3._extend.Method({ name: 'startRPC', call: 'admin_startRPC', params: 4, - inputFormatter: [web3._extend.utils.formatInputString,web3._extend.utils.formatInputInteger,web3._extend.utils.formatInputString,web3._extend.utils.formatInputString], - outputFormatter: web3._extend.formatters.formatOutputBool + inputFormatter: [null, null, null, null] }), new web3._extend.Method({ name: 'stopRPC', call: 'admin_stopRPC', params: 0, - inputFormatter: [], - outputFormatter: web3._extend.formatters.formatOutputBool + inputFormatter: [] + }), + new web3._extend.Method({ + name: 'setGlobalRegistrar', + call: 'admin_setGlobalRegistrar', + params: 2, + inputFormatter: [null,null] + }), + new web3._extend.Method({ + name: 'setHashReg', + call: 'admin_setHashReg', + params: 2, + inputFormatter: [null,null] + }), + new web3._extend.Method({ + name: 'setUrlHint', + call: 'admin_setUrlHint', + params: 2, + inputFormatter: [null,null] + }), + new web3._extend.Method({ + name: 'saveInfo', + call: 'admin_saveInfo', + params: 2, + inputFormatter: [null,null] + }), + new web3._extend.Method({ + name: 'register', + call: 'admin_register', + params: 3, + inputFormatter: [null,null,null] + }), + new web3._extend.Method({ + name: 'registerUrl', + call: 'admin_registerUrl', + params: 3, + inputFormatter: [null,null,null] + }), + new web3._extend.Method({ + name: 'startNatSpec', + call: 'admin_startNatSpec', + params: 0, + inputFormatter: [] + }), + new web3._extend.Method({ + name: 'stopNatSpec', + call: 'admin_stopNatSpec', + params: 0, + inputFormatter: [] + }), + new web3._extend.Method({ + name: 'getContractInfo', + call: 'admin_getContractInfo', + params: 1, + inputFormatter: [null], + }), + new web3._extend.Method({ + name: 'httpGet', + call: 'admin_httpGet', + params: 2, + inputFormatter: [null, null] }) ], properties: [ new web3._extend.Property({ name: 'nodeInfo', - getter: 'admin_nodeInfo', - outputFormatter: web3._extend.formatters.formatOutputString + getter: 'admin_nodeInfo' }), new web3._extend.Property({ name: 'peers', - getter: 'admin_peers', - outputFormatter: function(obj) { return obj; } + getter: 'admin_peers' }), new web3._extend.Property({ name: 'datadir', - getter: 'admin_datadir', - outputFormatter: web3._extend.formatters.formatOutputString + getter: 'admin_datadir' }), new web3._extend.Property({ name: 'chainSyncStatus', - getter: 'admin_chainSyncStatus', - outputFormatter: function(obj) { return obj; } + getter: 'admin_chainSyncStatus' }) ] }); diff --git a/rpc/api/api.go b/rpc/api/api.go index ca1ccb9a5..81e1e9cb2 100644 --- a/rpc/api/api.go +++ b/rpc/api/api.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package api import ( diff --git a/rpc/api/api_test.go b/rpc/api/api_test.go index 7e273ef28..8ef1d57e0 100644 --- a/rpc/api/api_test.go +++ b/rpc/api/api_test.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package api import ( @@ -76,8 +92,9 @@ func TestCompileSolidity(t *testing.T) { expLanguageVersion := "0" expSource := source - xeth := xeth.NewTest(ð.Ethereum{}, nil) - api := NewEthApi(xeth, codec.JSON) + eth := ð.Ethereum{} + xeth := xeth.NewTest(eth, nil) + api := NewEthApi(xeth, eth, codec.JSON) var rpcRequest shared.Request json.Unmarshal([]byte(jsonstr), &rpcRequest) diff --git a/rpc/api/args.go b/rpc/api/args.go index fc85448e6..3b746a50a 100644 --- a/rpc/api/args.go +++ b/rpc/api/args.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package api import ( diff --git a/rpc/api/args_test.go b/rpc/api/args_test.go index a30f247bc..73d97f659 100644 --- a/rpc/api/args_test.go +++ b/rpc/api/args_test.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package api import ( diff --git a/rpc/api/db.go b/rpc/api/db.go index 6f10d6447..eb206c4d7 100644 --- a/rpc/api/db.go +++ b/rpc/api/db.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package api import ( diff --git a/rpc/api/db_args.go b/rpc/api/db_args.go index 459616d87..7e0a37078 100644 --- a/rpc/api/db_args.go +++ b/rpc/api/db_args.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package api import ( diff --git a/rpc/api/db_js.go b/rpc/api/db_js.go index 62cdcd20e..20001883d 100644 --- a/rpc/api/db_js.go +++ b/rpc/api/db_js.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package api const Db_JS = ` @@ -5,34 +21,6 @@ web3._extend({ property: 'db', methods: [ - new web3._extend.Method({ - name: 'getString', - call: 'db_getString', - params: 2, - inputFormatter: [web3._extend.formatters.formatInputString, web3._extend.formatters.formatInputString], - outputFormatter: web3._extend.formatters.formatOutputString - }), - new web3._extend.Method({ - name: 'putString', - call: 'db_putString', - params: 3, - inputFormatter: [web3._extend.formatters.formatInputString, web3._extend.formatters.formatInputString, web3._extend.formatters.formatInputString], - outputFormatter: web3._extend.formatters.formatOutputBool - }), - new web3._extend.Method({ - name: 'getHex', - call: 'db_getHex', - params: 2, - inputFormatter: [web3._extend.formatters.formatInputString, web3._extend.formatters.formatInputString], - outputFormatter: web3._extend.formatters.formatOutputString - }), - new web3._extend.Method({ - name: 'putHex', - call: 'db_putHex', - params: 3, - inputFormatter: [web3._extend.formatters.formatInputString, web3._extend.formatters.formatInputString, web3._extend.formatters.formatInputString], - outputFormatter: web3._extend.formatters.formatOutputBool - }), ], properties: [ diff --git a/rpc/api/debug.go b/rpc/api/debug.go index f16f62d2e..2a3cda6c6 100644 --- a/rpc/api/debug.go +++ b/rpc/api/debug.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package api import ( diff --git a/rpc/api/debug_args.go b/rpc/api/debug_args.go index b72fb03ae..acac53413 100644 --- a/rpc/api/debug_args.go +++ b/rpc/api/debug_args.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package api import ( diff --git a/rpc/api/debug_js.go b/rpc/api/debug_js.go index bd3a6dfb2..faedefb27 100644 --- a/rpc/api/debug_js.go +++ b/rpc/api/debug_js.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package api const Debug_JS = ` @@ -9,50 +25,43 @@ web3._extend({ name: 'printBlock', call: 'debug_printBlock', params: 1, - inputFormatter: [web3._extend.formatters.formatInputInt], - outputFormatter: web3._extend.formatters.formatOutputString + inputFormatter: [web3._extend.formatters.inputBlockNumberFormatter] }), new web3._extend.Method({ name: 'getBlockRlp', call: 'debug_getBlockRlp', params: 1, - inputFormatter: [web3._extend.formatters.formatInputInt], - outputFormatter: web3._extend.formatters.formatOutputString + inputFormatter: [web3._extend.formatters.inputBlockNumberFormatter] }), new web3._extend.Method({ name: 'setHead', call: 'debug_setHead', params: 1, - inputFormatter: [web3._extend.formatters.formatInputInt], - outputFormatter: web3._extend.formatters.formatOutputBool + inputFormatter: [web3._extend.formatters.inputBlockNumberFormatter] }), new web3._extend.Method({ name: 'processBlock', call: 'debug_processBlock', params: 1, - inputFormatter: [web3._extend.formatters.formatInputInt], - outputFormatter: function(obj) { return obj; } + inputFormatter: [web3._extend.formatters.inputBlockNumberFormatter] }), new web3._extend.Method({ name: 'seedHash', call: 'debug_seedHash', params: 1, - inputFormatter: [web3._extend.formatters.formatInputInt], - outputFormatter: web3._extend.formatters.formatOutputString - }) , + inputFormatter: [web3._extend.formatters.inputBlockNumberFormatter] + }), new web3._extend.Method({ name: 'dumpBlock', call: 'debug_dumpBlock', params: 1, - inputFormatter: [web3._extend.formatters.formatInputInt], - outputFormatter: function(obj) { return obj; } + inputFormatter: [web3._extend.formatters.inputBlockNumberFormatter] }), new web3._extend.Method({ name: 'metrics', call: 'debug_metrics', params: 1, - inputFormatter: [web3._extend.formatters.formatInputBool], - outputFormatter: function(obj) { return obj; } + inputFormatter: [null] }) ], properties: diff --git a/rpc/api/eth.go b/rpc/api/eth.go index 962c8d0f9..6c4745504 100644 --- a/rpc/api/eth.go +++ b/rpc/api/eth.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package api import ( @@ -6,9 +22,12 @@ import ( "math/big" "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/eth" "github.com/ethereum/go-ethereum/rpc/codec" "github.com/ethereum/go-ethereum/rpc/shared" "github.com/ethereum/go-ethereum/xeth" + "gopkg.in/fatih/set.v0" ) const ( @@ -18,9 +37,10 @@ const ( // eth api provider // See https://github.com/ethereum/wiki/wiki/JSON-RPC type ethApi struct { - xeth *xeth.XEth - methods map[string]ethhandler - codec codec.ApiCoder + xeth *xeth.XEth + ethereum *eth.Ethereum + methods map[string]ethhandler + codec codec.ApiCoder } // eth callback handler @@ -71,12 +91,15 @@ var ( "eth_hashrate": (*ethApi).Hashrate, "eth_getWork": (*ethApi).GetWork, "eth_submitWork": (*ethApi).SubmitWork, + "eth_resend": (*ethApi).Resend, + "eth_pendingTransactions": (*ethApi).PendingTransactions, + "eth_getTransactionReceipt": (*ethApi).GetTransactionReceipt, } ) // create new ethApi instance -func NewEthApi(xeth *xeth.XEth, codec codec.Codec) *ethApi { - return ðApi{xeth, ethMapping, codec.New(nil)} +func NewEthApi(xeth *xeth.XEth, eth *eth.Ethereum, codec codec.Codec) *ethApi { + return ðApi{xeth, eth, ethMapping, codec.New(nil)} } // collection with supported methods @@ -548,3 +571,69 @@ func (self *ethApi) SubmitWork(req *shared.Request) (interface{}, error) { } return self.xeth.RemoteMining().SubmitWork(args.Nonce, common.HexToHash(args.Digest), common.HexToHash(args.Header)), nil } + +func (self *ethApi) Resend(req *shared.Request) (interface{}, error) { + args := new(ResendArgs) + if err := self.codec.Decode(req.Params, &args); err != nil { + return nil, shared.NewDecodeParamError(err.Error()) + } + + ret, err := self.xeth.Transact(args.Tx.From, args.Tx.To, args.Tx.Nonce, args.Tx.Value, args.GasLimit, args.GasPrice, args.Tx.Data) + if err != nil { + return nil, err + } + + self.ethereum.TxPool().RemoveTransactions(types.Transactions{args.Tx.tx}) + + return ret, nil +} + +func (self *ethApi) PendingTransactions(req *shared.Request) (interface{}, error) { + txs := self.ethereum.TxPool().GetTransactions() + + // grab the accounts from the account manager. This will help with determining which + // transactions should be returned. + accounts, err := self.ethereum.AccountManager().Accounts() + if err != nil { + return nil, err + } + + // Add the accouns to a new set + accountSet := set.New() + for _, account := range accounts { + accountSet.Add(account.Address) + } + + var ltxs []*tx + for _, tx := range txs { + if from, _ := tx.From(); accountSet.Has(from) { + ltxs = append(ltxs, newTx(tx)) + } + } + + return ltxs, nil +} + +func (self *ethApi) GetTransactionReceipt(req *shared.Request) (interface{}, error) { + args := new(HashArgs) + if err := self.codec.Decode(req.Params, &args); err != nil { + return nil, shared.NewDecodeParamError(err.Error()) + } + + txhash := common.BytesToHash(common.FromHex(args.Hash)) + tx, bhash, bnum, txi := self.xeth.EthTransactionByHash(args.Hash) + rec := self.xeth.GetTxReceipt(txhash) + // We could have an error of "not found". Should disambiguate + // if err != nil { + // return err, nil + // } + if rec != nil && tx != nil { + v := NewReceiptRes(rec) + v.BlockHash = newHexData(bhash) + v.BlockNumber = newHexNum(bnum) + v.TransactionIndex = newHexNum(txi) + return v, nil + } + + return nil, nil +} diff --git a/rpc/api/eth_args.go b/rpc/api/eth_args.go index bf8ffead6..f63b43334 100644 --- a/rpc/api/eth_args.go +++ b/rpc/api/eth_args.go @@ -1,12 +1,31 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package api import ( "encoding/json" "fmt" "math/big" + "strconv" + "strings" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/state" + "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/rpc/shared" ) @@ -858,3 +877,178 @@ func (args *SubmitWorkArgs) UnmarshalJSON(b []byte) (err error) { return nil } + +type tx struct { + tx *types.Transaction + + To string + From string + Nonce string + Value string + Data string + GasLimit string + GasPrice string +} + +func newTx(t *types.Transaction) *tx { + from, _ := t.From() + var to string + if t := t.To(); t != nil { + to = t.Hex() + } + + return &tx{ + tx: t, + To: to, + From: from.Hex(), + Value: t.Value().String(), + Nonce: strconv.Itoa(int(t.Nonce())), + Data: "0x" + common.Bytes2Hex(t.Data()), + GasLimit: t.Gas().String(), + GasPrice: t.GasPrice().String(), + } +} + +type ResendArgs struct { + Tx *tx + GasPrice string + GasLimit string +} + +func (tx *tx) UnmarshalJSON(b []byte) (err error) { + var fields map[string]interface{} + if err := json.Unmarshal(b, &fields); err != nil { + return shared.NewDecodeParamError(err.Error()) + } + + var ( + nonce uint64 + to common.Address + amount = new(big.Int).Set(common.Big0) + gasLimit = new(big.Int).Set(common.Big0) + gasPrice = new(big.Int).Set(common.Big0) + data []byte + contractCreation = true + ) + + if val, found := fields["To"]; found { + if strVal, ok := val.(string); ok && len(strVal) > 0 { + tx.To = strVal + to = common.HexToAddress(strVal) + contractCreation = false + } + } + + if val, found := fields["From"]; found { + if strVal, ok := val.(string); ok { + tx.From = strVal + } + } + + if val, found := fields["Nonce"]; found { + if strVal, ok := val.(string); ok { + tx.Nonce = strVal + if nonce, err = strconv.ParseUint(strVal, 10, 64); err != nil { + return shared.NewDecodeParamError(fmt.Sprintf("Unable to decode tx.Nonce - %v", err)) + } + } + } else { + return shared.NewDecodeParamError("tx.Nonce not found") + } + + var parseOk bool + if val, found := fields["Value"]; found { + if strVal, ok := val.(string); ok { + tx.Value = strVal + if _, parseOk = amount.SetString(strVal, 0); !parseOk { + return shared.NewDecodeParamError(fmt.Sprintf("Unable to decode tx.Amount - %v", err)) + } + } + } + + if val, found := fields["Data"]; found { + if strVal, ok := val.(string); ok { + tx.Data = strVal + if strings.HasPrefix(strVal, "0x") { + data = common.Hex2Bytes(strVal[2:]) + } else { + data = common.Hex2Bytes(strVal) + } + } + } + + if val, found := fields["GasLimit"]; found { + if strVal, ok := val.(string); ok { + tx.GasLimit = strVal + if _, parseOk = gasLimit.SetString(strVal, 0); !parseOk { + return shared.NewDecodeParamError(fmt.Sprintf("Unable to decode tx.GasLimit - %v", err)) + } + } + } + + if val, found := fields["GasPrice"]; found { + if strVal, ok := val.(string); ok { + tx.GasPrice = strVal + if _, parseOk = gasPrice.SetString(strVal, 0); !parseOk { + return shared.NewDecodeParamError(fmt.Sprintf("Unable to decode tx.GasPrice - %v", err)) + } + } + } + + if contractCreation { + tx.tx = types.NewContractCreation(nonce, amount, gasLimit, gasPrice, data) + } else { + tx.tx = types.NewTransaction(nonce, to, amount, gasLimit, gasPrice, data) + } + + return nil +} + +func (args *ResendArgs) UnmarshalJSON(b []byte) (err error) { + var obj []interface{} + if err = json.Unmarshal(b, &obj); err != nil { + return shared.NewDecodeParamError(err.Error()) + } + + if len(obj) < 1 { + return shared.NewInsufficientParamsError(len(obj), 1) + } + + data, err := json.Marshal(obj[0]) + if err != nil { + return shared.NewDecodeParamError("Unable to parse transaction object") + } + + trans := new(tx) + err = json.Unmarshal(data, trans) + if err != nil { + return shared.NewDecodeParamError("Unable to parse transaction object") + } + + if trans == nil || trans.tx == nil { + return shared.NewDecodeParamError("Unable to parse transaction object") + } + + gasLimit, gasPrice := trans.GasLimit, trans.GasPrice + + if len(obj) > 1 && obj[1] != nil { + if gp, ok := obj[1].(string); ok { + gasPrice = gp + } else { + return shared.NewInvalidTypeError("gasPrice", "not a string") + } + } + if len(obj) > 2 && obj[2] != nil { + if gl, ok := obj[2].(string); ok { + gasLimit = gl + } else { + return shared.NewInvalidTypeError("gasLimit", "not a string") + } + } + + args.Tx = trans + args.GasPrice = gasPrice + args.GasLimit = gasLimit + + return nil +} diff --git a/rpc/api/eth_js.go b/rpc/api/eth_js.go index e1268eb76..1a0810a55 100644 --- a/rpc/api/eth_js.go +++ b/rpc/api/eth_js.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package api // JS api provided by web3.js @@ -12,8 +28,20 @@ web3._extend({ name: 'sign', call: 'eth_sign', params: 2, - inputFormatter: [web3._extend.formatters.formatInputString,web3._extend.formatters.formatInputString], - outputFormatter: web3._extend.formatters.formatOutputString + inputFormatter: [web3._extend.utils.toAddress, null] + }), + new web3._extend.Method({ + name: 'resend', + call: 'eth_resend', + params: 3, + inputFormatter: [web3._extend.formatters.inputTransactionFormatter, web3._extend.utils.fromDecimal, web3._extend.utils.fromDecimal] + }) + ], + properties: + [ + new web3._extend.Property({ + name: 'pendingTransactions', + getter: 'eth_pendingTransactions' }) ] }); diff --git a/rpc/api/mergedapi.go b/rpc/api/mergedapi.go index bc4fa32e8..13230f8c0 100644 --- a/rpc/api/mergedapi.go +++ b/rpc/api/mergedapi.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package api import ( @@ -42,7 +58,7 @@ func (self *MergedApi) Methods() []string { // Call the correct API's Execute method for the given request func (self *MergedApi) Execute(req *shared.Request) (interface{}, error) { - glog.V(logger.Detail).Infof("rpc method: %s", req.Method) + glog.V(logger.Detail).Infof("%s %s", req.Method, req.Params) if res, _ := self.handle(req); res != nil { return res, nil diff --git a/rpc/api/miner.go b/rpc/api/miner.go index 7a84cb9ae..91dbc148f 100644 --- a/rpc/api/miner.go +++ b/rpc/api/miner.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package api import ( @@ -19,6 +35,7 @@ var ( "miner_makeDAG": (*minerApi).MakeDAG, "miner_setExtra": (*minerApi).SetExtra, "miner_setGasPrice": (*minerApi).SetGasPrice, + "miner_setEtherbase": (*minerApi).SetEtherbase, "miner_startAutoDAG": (*minerApi).StartAutoDAG, "miner_start": (*minerApi).StartMiner, "miner_stopAutoDAG": (*minerApi).StopAutoDAG, @@ -119,6 +136,15 @@ func (self *minerApi) SetGasPrice(req *shared.Request) (interface{}, error) { return true, nil } +func (self *minerApi) SetEtherbase(req *shared.Request) (interface{}, error) { + args := new(SetEtherbaseArgs) + if err := self.codec.Decode(req.Params, &args); err != nil { + return false, err + } + self.ethereum.SetEtherbase(args.Etherbase) + return nil, nil +} + func (self *minerApi) StartAutoDAG(req *shared.Request) (interface{}, error) { self.ethereum.StartAutoDAG() return true, nil diff --git a/rpc/api/miner_args.go b/rpc/api/miner_args.go index 7b0560c16..15741b092 100644 --- a/rpc/api/miner_args.go +++ b/rpc/api/miner_args.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package api import ( @@ -5,6 +21,7 @@ import ( "math/big" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/rpc/shared" ) @@ -76,6 +93,31 @@ func (args *GasPriceArgs) UnmarshalJSON(b []byte) (err error) { return shared.NewInvalidTypeError("Price", "not a string") } +type SetEtherbaseArgs struct { + Etherbase common.Address +} + +func (args *SetEtherbaseArgs) UnmarshalJSON(b []byte) (err error) { + var obj []interface{} + if err := json.Unmarshal(b, &obj); err != nil { + return shared.NewDecodeParamError(err.Error()) + } + + if len(obj) < 1 { + return shared.NewInsufficientParamsError(len(obj), 1) + } + + if addr, ok := obj[0].(string); ok { + args.Etherbase = common.HexToAddress(addr) + if (args.Etherbase == common.Address{}) { + return shared.NewInvalidTypeError("Etherbase", "not a valid address") + } + return nil + } + + return shared.NewInvalidTypeError("Etherbase", "not a string") +} + type MakeDAGArgs struct { BlockNumber int64 } diff --git a/rpc/api/miner_js.go b/rpc/api/miner_js.go index 6290368da..a9eb4901d 100644 --- a/rpc/api/miner_js.go +++ b/rpc/api/miner_js.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package api const Miner_JS = ` @@ -9,13 +25,18 @@ web3._extend({ name: 'start', call: 'miner_start', params: 1, - inputFormatter: [web3._extend.formatters.formatInputInt], - outputFormatter: web3._extend.formatters.formatOutputBool + inputFormatter: [null] }), new web3._extend.Method({ name: 'stop', call: 'miner_stop', params: 1, + inputFormatter: [null] + }), + new web3._extend.Method({ + name: 'setEtherbase', + call: 'miner_setEtherbase', + params: 1, inputFormatter: [web3._extend.formatters.formatInputInt], outputFormatter: web3._extend.formatters.formatOutputBool }), @@ -23,36 +44,31 @@ web3._extend({ name: 'setExtra', call: 'miner_setExtra', params: 1, - inputFormatter: [web3._extend.utils.formatInputString], - outputFormatter: web3._extend.formatters.formatOutputBool + inputFormatter: [null] }), new web3._extend.Method({ name: 'setGasPrice', call: 'miner_setGasPrice', params: 1, - inputFormatter: [web3._extend.utils.formatInputString], - outputFormatter: web3._extend.formatters.formatOutputBool + inputFormatter: [web3._extend.utils.fromDecial] }), new web3._extend.Method({ name: 'startAutoDAG', call: 'miner_startAutoDAG', params: 0, - inputFormatter: [], - outputFormatter: web3._extend.formatters.formatOutputBool + inputFormatter: [] }), new web3._extend.Method({ name: 'stopAutoDAG', call: 'miner_stopAutoDAG', params: 0, - inputFormatter: [], - outputFormatter: web3._extend.formatters.formatOutputBool + inputFormatter: [] }), new web3._extend.Method({ name: 'makeDAG', call: 'miner_makeDAG', params: 1, - inputFormatter: [web3._extend.formatters.inputDefaultBlockNumberFormatter], - outputFormatter: web3._extend.formatters.formatOutputBool + inputFormatter: [web3._extend.formatters.inputDefaultBlockNumberFormatter] }) ], properties: diff --git a/rpc/api/net.go b/rpc/api/net.go index 761654661..dbed9e11e 100644 --- a/rpc/api/net.go +++ b/rpc/api/net.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package api import ( @@ -14,10 +30,8 @@ const ( var ( // mapping between methods and handlers netMapping = map[string]nethandler{ - "net_version": (*netApi).Version, "net_peerCount": (*netApi).PeerCount, "net_listening": (*netApi).IsListening, - "net_peers": (*netApi).Peers, } ) @@ -70,11 +84,6 @@ func (self *netApi) ApiVersion() string { return NetApiVersion } -// Network version -func (self *netApi) Version(req *shared.Request) (interface{}, error) { - return self.xeth.NetworkVersion(), nil -} - // Number of connected peers func (self *netApi) PeerCount(req *shared.Request) (interface{}, error) { return newHexNum(self.xeth.PeerCount()), nil @@ -84,6 +93,3 @@ func (self *netApi) IsListening(req *shared.Request) (interface{}, error) { return self.xeth.IsListening(), nil } -func (self *netApi) Peers(req *shared.Request) (interface{}, error) { - return self.ethereum.PeersInfo(), nil -} diff --git a/rpc/api/net_js.go b/rpc/api/net_js.go index 1677d9fa6..391039eea 100644 --- a/rpc/api/net_js.go +++ b/rpc/api/net_js.go @@ -1,47 +1,35 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package api const Net_JS = ` web3._extend({ - property: 'network', + property: 'net', methods: [ new web3._extend.Method({ name: 'addPeer', call: 'net_addPeer', params: 1, - inputFormatter: [web3._extend.utils.formatInputString], - outputFormatter: web3._extend.formatters.formatOutputBool - }), - new web3._extend.Method({ - name: 'getPeerCount', - call: 'net_peerCount', - params: 0, - inputFormatter: [], - outputFormatter: web3._extend.formatters.formatOutputString + inputFormatter: [null] }) ], properties: [ - new web3._extend.Property({ - name: 'listening', - getter: 'net_listening', - outputFormatter: web3._extend.formatters.formatOutputBool - }), - new web3._extend.Property({ - name: 'peerCount', - getter: 'net_peerCount', - outputFormatter: web3._extend.utils.toDecimal - }), - new web3._extend.Property({ - name: 'peers', - getter: 'net_peers', - outputFormatter: function(obj) { return obj; } - }), - new web3._extend.Property({ - name: 'version', - getter: 'net_version', - outputFormatter: web3._extend.formatters.formatOutputString - }) ] }); ` diff --git a/rpc/api/parsing.go b/rpc/api/parsing.go index 632462c31..6e97d8a2d 100644 --- a/rpc/api/parsing.go +++ b/rpc/api/parsing.go @@ -1,6 +1,23 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package api import ( + "bytes" "encoding/binary" "encoding/hex" "encoding/json" @@ -402,6 +419,43 @@ func NewUncleRes(h *types.Header) *UncleRes { // WorkProved string `json:"workProved"` // } +type ReceiptRes struct { + TransactionHash *hexdata `json:"transactionHash"` + TransactionIndex *hexnum `json:"transactionIndex"` + BlockNumber *hexnum `json:"blockNumber"` + BlockHash *hexdata `json:"blockHash"` + CumulativeGasUsed *hexnum `json:"cumulativeGasUsed"` + GasUsed *hexnum `json:"gasUsed"` + ContractAddress *hexdata `json:"contractAddress"` + Logs *[]interface{} `json:"logs"` +} + +func NewReceiptRes(rec *types.Receipt) *ReceiptRes { + if rec == nil { + return nil + } + + var v = new(ReceiptRes) + v.TransactionHash = newHexData(rec.TxHash) + if rec.GasUsed != nil { + v.GasUsed = newHexNum(rec.GasUsed.Bytes()) + } + v.CumulativeGasUsed = newHexNum(rec.CumulativeGasUsed) + + // If the ContractAddress is 20 0x0 bytes, assume it is not a contract creation + if bytes.Compare(rec.ContractAddress.Bytes(), bytes.Repeat([]byte{0}, 20)) != 0 { + v.ContractAddress = newHexData(rec.ContractAddress) + } + + logs := make([]interface{}, len(rec.Logs())) + for i, log := range rec.Logs() { + logs[i] = NewLogRes(log) + } + v.Logs = &logs + + return v +} + func numString(raw interface{}) (*big.Int, error) { var number *big.Int // Parse as integer diff --git a/rpc/api/personal.go b/rpc/api/personal.go index b4a63ea7a..bfb12a203 100644 --- a/rpc/api/personal.go +++ b/rpc/api/personal.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package api import ( diff --git a/rpc/api/personal_args.go b/rpc/api/personal_args.go index b3e683638..8c4718d09 100644 --- a/rpc/api/personal_args.go +++ b/rpc/api/personal_args.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package api import ( diff --git a/rpc/api/personal_js.go b/rpc/api/personal_js.go index 463a2c7f5..aaa5f4f44 100644 --- a/rpc/api/personal_js.go +++ b/rpc/api/personal_js.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package api const Personal_JS = ` @@ -9,23 +25,21 @@ web3._extend({ name: 'newAccount', call: 'personal_newAccount', params: 1, - inputFormatter: [web3._extend.formatters.formatInputString], - outputFormatter: web3._extend.formatters.formatOutputString + inputFormatter: [null], + outputFormatter: web3._extend.utils.toAddress }), new web3._extend.Method({ name: 'unlockAccount', call: 'personal_unlockAccount', params: 3, - inputFormatter: [web3._extend.formatters.formatInputString,web3._extend.formatters.formatInputString,web3._extend.formatters.formatInputInt], - outputFormatter: web3._extend.formatters.formatOutputBool + inputFormatter: [null, null, null] }) ], properties: [ new web3._extend.Property({ name: 'listAccounts', - getter: 'personal_listAccounts', - outputFormatter: function(obj) { return obj; } + getter: 'personal_listAccounts' }) ] }); diff --git a/rpc/api/shh.go b/rpc/api/shh.go index 18a8fd15d..02513f8f7 100644 --- a/rpc/api/shh.go +++ b/rpc/api/shh.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package api import ( diff --git a/rpc/api/shh_args.go b/rpc/api/shh_args.go index 00abac232..516765287 100644 --- a/rpc/api/shh_args.go +++ b/rpc/api/shh_args.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package api import ( diff --git a/rpc/api/ssh_js.go b/rpc/api/ssh_js.go index f401f70f1..9fe6294ea 100644 --- a/rpc/api/ssh_js.go +++ b/rpc/api/ssh_js.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package api const Shh_JS = ` @@ -5,25 +21,13 @@ web3._extend({ property: 'shh', methods: [ - new web3._extend.Method({ - name: 'post', - call: 'shh_post', - params: 6, - inputFormatter: [web3._extend.formatters.formatInputString, - web3._extend.formatters.formatInputString, - web3._extend.formatters.formatInputString, - , - , web3._extend.formatters.formatInputInt - , web3._extend.formatters.formatInputInt], - outputFormatter: web3._extend.formatters.formatOutputBool - }), + ], properties: [ new web3._extend.Property({ name: 'version', - getter: 'shh_version', - outputFormatter: web3._extend.formatters.formatOutputInt + getter: 'shh_version' }) ] }); diff --git a/rpc/api/txpool.go b/rpc/api/txpool.go index 25ad6e9b2..14934ae13 100644 --- a/rpc/api/txpool.go +++ b/rpc/api/txpool.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package api import ( @@ -68,8 +84,9 @@ func (self *txPoolApi) ApiVersion() string { } func (self *txPoolApi) Status(req *shared.Request) (interface{}, error) { + pending, queue := self.ethereum.TxPool().Stats() return map[string]int{ - "pending": self.ethereum.TxPool().GetTransactions().Len(), - "queued": self.ethereum.TxPool().GetQueuedTransactions().Len(), + "pending": pending, + "queued": queue, }, nil } diff --git a/rpc/api/txpool_js.go b/rpc/api/txpool_js.go index 06528d1c4..ef9a0487c 100644 --- a/rpc/api/txpool_js.go +++ b/rpc/api/txpool_js.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package api const TxPool_JS = ` diff --git a/rpc/api/utils.go b/rpc/api/utils.go index 6e4835de6..a9ad3f153 100644 --- a/rpc/api/utils.go +++ b/rpc/api/utils.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package api import ( @@ -36,6 +52,7 @@ var ( "debug": []string{ "dumpBlock", "getBlockRlp", + "metrics", "printBlock", "processBlock", "seedHash", @@ -44,46 +61,38 @@ var ( "eth": []string{ "accounts", "blockNumber", - "getBalance", - "protocolVersion", + "call", + "contract", "coinbase", - "mining", - "gasPrice", - "getStorage", - "storageAt", - "getStorageAt", - "getTransactionCount", - "getBlockTransactionCountByHash", - "getBlockTransactionCountByNumber", - "getUncleCountByBlockHash", - "getUncleCountByBlockNumber", - "getData", + "compile.lll", + "compile.serpent", + "compile.solidity", + "contract", + "defaultAccount", + "defaultBlock", + "estimateGas", + "filter", + "getBalance", + "getBlock", + "getBlockTransactionCount", + "getBlockUncleCount", "getCode", - "sign", + "getCompilers", + "gasPrice", + "getStorageAt", + "getTransaction", + "getTransactionCount", + "getTransactionFromBlock", + "getTransactionReceipt", + "getUncle", + "hashrate", + "mining", + "namereg", + "pendingTransactions", + "resend", "sendRawTransaction", "sendTransaction", - "transact", - "estimateGas", - "call", - "flush", - "getBlockByHash", - "getBlockByNumber", - "getTransactionByHash", - "getTransactionByBlockHashAndIndex", - "getUncleByBlockHashAndIndex", - "getUncleByBlockNumberAndIndex", - "getCompilers", - "compileSolidity", - "newFilter", - "newBlockFilter", - "newPendingTransactionFilter", - "uninstallFilter", - "getFilterChanges", - "getFilterLogs", - "getLogs", - "hashrate", - "getWork", - "submitWork", + "sign", }, "miner": []string{ "hashrate", @@ -106,13 +115,12 @@ var ( "unlockAccount", }, "shh": []string{ - "version", "post", + "newIdentify", "hasIdentity", - "newIdentity", - "newFilter", - "uninstallFilter", - "getFilterChanges", + "newGroup", + "addToGroup", + "filter", }, "txpool": []string{ "status", @@ -149,7 +157,7 @@ func ParseApiString(apistr string, codec codec.Codec, xeth *xeth.XEth, eth *eth. case shared.DbApiName: apis[i] = NewDbApi(xeth, eth, codec) case shared.EthApiName: - apis[i] = NewEthApi(xeth, codec) + apis[i] = NewEthApi(xeth, eth, codec) case shared.MinerApiName: apis[i] = NewMinerApi(eth, codec) case shared.NetApiName: diff --git a/rpc/api/web3.go b/rpc/api/web3.go index 4c20baa25..77b8fda6b 100644 --- a/rpc/api/web3.go +++ b/rpc/api/web3.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package api import ( diff --git a/rpc/api/web3_args.go b/rpc/api/web3_args.go index 38af7191e..30b4a5c1f 100644 --- a/rpc/api/web3_args.go +++ b/rpc/api/web3_args.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package api import ( diff --git a/rpc/codec/codec.go b/rpc/codec/codec.go index 3177f77e4..733823b4b 100644 --- a/rpc/codec/codec.go +++ b/rpc/codec/codec.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package codec import ( diff --git a/rpc/codec/json.go b/rpc/codec/json.go index 0b1a90562..c78624430 100644 --- a/rpc/codec/json.go +++ b/rpc/codec/json.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package codec import ( @@ -10,7 +26,7 @@ import ( ) const ( - READ_TIMEOUT = 15 // read timeout in seconds + READ_TIMEOUT = 60 // in seconds MAX_REQUEST_SIZE = 1024 * 1024 MAX_RESPONSE_SIZE = 1024 * 1024 ) @@ -18,51 +34,43 @@ const ( // Json serialization support type JsonCodec struct { c net.Conn + d *json.Decoder } // Create new JSON coder instance func NewJsonCoder(conn net.Conn) ApiCoder { return &JsonCodec{ c: conn, + d: json.NewDecoder(conn), } } -// Serialize obj to JSON and write it to conn +// Read incoming request and parse it to RPC request func (self *JsonCodec) ReadRequest() (requests []*shared.Request, isBatch bool, err error) { - bytesInBuffer := 0 - buf := make([]byte, MAX_REQUEST_SIZE) - deadline := time.Now().Add(READ_TIMEOUT * time.Second) if err := self.c.SetDeadline(deadline); err != nil { return nil, false, err } - for { - n, err := self.c.Read(buf[bytesInBuffer:]) - if err != nil { - self.c.Close() - return nil, false, err - } - - bytesInBuffer += n - - singleRequest := shared.Request{} - err = json.Unmarshal(buf[:bytesInBuffer], &singleRequest) - if err == nil { - requests := make([]*shared.Request, 1) - requests[0] = &singleRequest - return requests, false, nil - } - - requests = make([]*shared.Request, 0) - err = json.Unmarshal(buf[:bytesInBuffer], &requests) - if err == nil { - return requests, true, nil + var incoming json.RawMessage + err = self.d.Decode(&incoming) + if err == nil { + isBatch = incoming[0] == '[' + if isBatch { + requests = make([]*shared.Request, 0) + err = json.Unmarshal(incoming, &requests) + } else { + requests = make([]*shared.Request, 1) + var singleRequest shared.Request + if err = json.Unmarshal(incoming, &singleRequest); err == nil { + requests[0] = &singleRequest + } } + return } - self.c.Close() // timeout - return nil, false, fmt.Errorf("Unable to read response") + self.c.Close() + return nil, false, err } func (self *JsonCodec) ReadResponse() (interface{}, error) { @@ -81,15 +89,15 @@ func (self *JsonCodec) ReadResponse() (interface{}, error) { } bytesInBuffer += n + var failure shared.ErrorResponse + if err = json.Unmarshal(buf[:bytesInBuffer], &failure); err == nil && failure.Error != nil { + return failure, fmt.Errorf(failure.Error.Message) + } + var success shared.SuccessResponse if err = json.Unmarshal(buf[:bytesInBuffer], &success); err == nil { return success, nil } - - var failure shared.ErrorResponse - if err = json.Unmarshal(buf[:bytesInBuffer], &failure); err == nil && failure.Error != nil { - return failure, nil - } } self.c.Close() diff --git a/rpc/codec/json_test.go b/rpc/codec/json_test.go new file mode 100644 index 000000000..acadfd76b --- /dev/null +++ b/rpc/codec/json_test.go @@ -0,0 +1,157 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + +package codec + +import ( + "bytes" + "io" + "net" + "testing" + "time" +) + +type jsonTestConn struct { + buffer *bytes.Buffer +} + +func newJsonTestConn(data []byte) *jsonTestConn { + return &jsonTestConn{ + buffer: bytes.NewBuffer(data), + } +} + +func (self *jsonTestConn) Read(p []byte) (n int, err error) { + return self.buffer.Read(p) +} + +func (self *jsonTestConn) Write(p []byte) (n int, err error) { + return self.buffer.Write(p) +} + +func (self *jsonTestConn) Close() error { + // not implemented + return nil +} + +func (self *jsonTestConn) LocalAddr() net.Addr { + // not implemented + return nil +} + +func (self *jsonTestConn) RemoteAddr() net.Addr { + // not implemented + return nil +} + +func (self *jsonTestConn) SetDeadline(t time.Time) error { + return nil +} + +func (self *jsonTestConn) SetReadDeadline(t time.Time) error { + return nil +} + +func (self *jsonTestConn) SetWriteDeadline(t time.Time) error { + return nil +} + +func TestJsonDecoderWithValidRequest(t *testing.T) { + reqdata := []byte(`{"jsonrpc":"2.0","method":"modules","params":[],"id":64}`) + decoder := newJsonTestConn(reqdata) + + jsonDecoder := NewJsonCoder(decoder) + requests, batch, err := jsonDecoder.ReadRequest() + + if err != nil { + t.Errorf("Read valid request failed - %v", err) + } + + if len(requests) != 1 { + t.Errorf("Expected to get a single request but got %d", len(requests)) + } + + if batch { + t.Errorf("Got batch indication while expecting single request") + } + + if requests[0].Id != float64(64) { + t.Errorf("Expected req.Id == 64 but got %v", requests[0].Id) + } + + if requests[0].Method != "modules" { + t.Errorf("Expected req.Method == 'modules' got '%s'", requests[0].Method) + } +} + +func TestJsonDecoderWithValidBatchRequest(t *testing.T) { + reqdata := []byte(`[{"jsonrpc":"2.0","method":"modules","params":[],"id":64}, + {"jsonrpc":"2.0","method":"modules","params":[],"id":64}]`) + decoder := newJsonTestConn(reqdata) + + jsonDecoder := NewJsonCoder(decoder) + requests, batch, err := jsonDecoder.ReadRequest() + + if err != nil { + t.Errorf("Read valid batch request failed - %v", err) + } + + if len(requests) != 2 { + t.Errorf("Expected to get two requests but got %d", len(requests)) + } + + if !batch { + t.Errorf("Got no batch indication while expecting batch request") + } + + for i := 0; i < len(requests); i++ { + if requests[i].Id != float64(64) { + t.Errorf("Expected req.Id == 64 but got %v", requests[i].Id) + } + + if requests[i].Method != "modules" { + t.Errorf("Expected req.Method == 'modules' got '%s'", requests[i].Method) + } + } +} + +func TestJsonDecoderWithInvalidIncompleteMessage(t *testing.T) { + reqdata := []byte(`{"jsonrpc":"2.0","method":"modules","pa`) + decoder := newJsonTestConn(reqdata) + + jsonDecoder := NewJsonCoder(decoder) + requests, batch, err := jsonDecoder.ReadRequest() + + if err != io.ErrUnexpectedEOF { + t.Errorf("Expected to read an incomplete request err but got %v", err) + } + + // remaining message + decoder.Write([]byte(`rams":[],"id:64"}`)) + requests, batch, err = jsonDecoder.ReadRequest() + + if err == nil { + t.Errorf("Expected an error but got nil") + } + + if len(requests) != 0 { + t.Errorf("Expected to get no requests but got %d", len(requests)) + } + + if batch { + t.Errorf("Got batch indication while expecting non batch") + } +} diff --git a/rpc/comms/comms.go b/rpc/comms/comms.go index 6e980149f..62a34167e 100644 --- a/rpc/comms/comms.go +++ b/rpc/comms/comms.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package comms import ( diff --git a/rpc/comms/http.go b/rpc/comms/http.go index ebee791bd..3fb429e65 100644 --- a/rpc/comms/http.go +++ b/rpc/comms/http.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package comms import ( diff --git a/rpc/comms/http_net.go b/rpc/comms/http_net.go index acc5f99a9..1ac7b48a2 100644 --- a/rpc/comms/http_net.go +++ b/rpc/comms/http_net.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package comms import ( diff --git a/rpc/comms/inproc.go b/rpc/comms/inproc.go index 5c84b8fd8..acaded2f3 100644 --- a/rpc/comms/inproc.go +++ b/rpc/comms/inproc.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package comms import ( diff --git a/rpc/comms/ipc.go b/rpc/comms/ipc.go index f3dda5581..440145402 100644 --- a/rpc/comms/ipc.go +++ b/rpc/comms/ipc.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package comms import ( diff --git a/rpc/comms/ipc_unix.go b/rpc/comms/ipc_unix.go index 3e71c7d32..12e51117a 100644 --- a/rpc/comms/ipc_unix.go +++ b/rpc/comms/ipc_unix.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + // +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris package comms diff --git a/rpc/comms/ipc_windows.go b/rpc/comms/ipc_windows.go index 203cd2d7b..8e8186976 100644 --- a/rpc/comms/ipc_windows.go +++ b/rpc/comms/ipc_windows.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + // +build windows package comms diff --git a/rpc/jeth.go b/rpc/jeth.go index 33fcd6efd..4a94a78b6 100644 --- a/rpc/jeth.go +++ b/rpc/jeth.go @@ -1,8 +1,26 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package rpc import ( "encoding/json" + "fmt" + "github.com/ethereum/go-ethereum/jsre" "github.com/ethereum/go-ethereum/rpc/comms" "github.com/ethereum/go-ethereum/rpc/shared" @@ -20,14 +38,13 @@ func NewJeth(ethApi shared.EthereumApi, re *jsre.JSRE, client comms.EthereumClie } func (self *Jeth) err(call otto.FunctionCall, code int, msg string, id interface{}) (response otto.Value) { - rpcerr := &shared.ErrorObject{code, msg} - call.Otto.Set("ret_jsonrpc", shared.JsonRpcVersion) - call.Otto.Set("ret_id", id) - call.Otto.Set("ret_error", rpcerr) - response, _ = call.Otto.Run(` - ret_response = { jsonrpc: ret_jsonrpc, id: ret_id, error: ret_error }; - `) - return + errObj := fmt.Sprintf("{\"message\": \"%s\", \"code\": %d}", msg, code) + retResponse := fmt.Sprintf("ret_response = JSON.parse('{\"jsonrpc\": \"%s\", \"id\": %v, \"error\": %s}');", shared.JsonRpcVersion, id, errObj) + + call.Otto.Run("ret_error = " + errObj) + res, _ := call.Otto.Run(retResponse) + + return res } func (self *Jeth) Send(call otto.FunctionCall) (response otto.Value) { @@ -56,6 +73,7 @@ func (self *Jeth) Send(call otto.FunctionCall) (response otto.Value) { return self.err(call, -32603, err.Error(), req.Id) } respif, err = self.client.Recv() + if err != nil { return self.err(call, -32603, err.Error(), req.Id) } diff --git a/rpc/shared/errors.go b/rpc/shared/errors.go index bd10b33a0..37c1c8132 100644 --- a/rpc/shared/errors.go +++ b/rpc/shared/errors.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package shared import "fmt" diff --git a/rpc/shared/types.go b/rpc/shared/types.go index 7c4b04e83..494ffed76 100644 --- a/rpc/shared/types.go +++ b/rpc/shared/types.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package shared import ( diff --git a/rpc/shared/utils.go b/rpc/shared/utils.go index e5d6ad417..7cf6e2776 100644 --- a/rpc/shared/utils.go +++ b/rpc/shared/utils.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package shared import "strings" diff --git a/rpc/xeth.go b/rpc/xeth.go index b3e844380..607f45274 100644 --- a/rpc/xeth.go +++ b/rpc/xeth.go @@ -1,3 +1,20 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + +// Package rpc implements the Ethereum JSON-RPC API. package rpc import ( diff --git a/tests/block_test.go b/tests/block_test.go index bdf983786..4b1b8bc37 100644 --- a/tests/block_test.go +++ b/tests/block_test.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package tests import ( @@ -71,3 +87,10 @@ func TestBcWallet(t *testing.T) { t.Fatal(err) } } + +func TestBcGasPricer(t *testing.T) { + err := RunBlockTest(filepath.Join(blockTestDir, "bcGasPricerTest.json"), BlockSkipTests) + if err != nil { + t.Fatal(err) + } +} diff --git a/tests/block_test_util.go b/tests/block_test_util.go index 450ef86a1..5432bf845 100644 --- a/tests/block_test_util.go +++ b/tests/block_test_util.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package tests import ( @@ -129,7 +145,7 @@ func runBlockTests(bt map[string]*BlockTest, skipTests []string) error { // if the test should be skipped, return if skipTest[name] { glog.Infoln("Skipping block test", name) - return nil + continue } // test the block @@ -180,7 +196,7 @@ func (test *BlockTest) makeEthConfig() *eth.Config { return ð.Config{ DataDir: common.DefaultDataDir(), Verbosity: 5, - Etherbase: "primary", + Etherbase: common.Address{}, AccountManager: accounts.NewManager(ks), NewDB: func(path string) (common.Database, error) { return ethdb.NewMemDatabase() }, } @@ -215,7 +231,7 @@ func (t *BlockTest) InsertPreState(ethereum *eth.Ethereum) (*state.StateDB, erro } } // sync objects to trie - statedb.Update() + statedb.SyncObjects() // sync trie to disk statedb.Sync() diff --git a/tests/files/BasicTests/RandomRLPTests/example.json b/tests/files/BasicTests/RandomRLPTests/example.json new file mode 100644 index 000000000..bd1375332 --- /dev/null +++ b/tests/files/BasicTests/RandomRLPTests/example.json @@ -0,0 +1,6 @@ +{ + "listsoflists2": { + "in": [ [], [[]], [ [], [[]] ] ], + "out": "c7c0c1c0c3c0c1c0" + }, +} diff --git a/tests/files/BasicTests/invalidRLPtest.json b/tests/files/BasicTests/invalidRLPtest.json new file mode 100644 index 000000000..f2acd371d --- /dev/null +++ b/tests/files/BasicTests/invalidRLPtest.json @@ -0,0 +1,11 @@ +{ + "int32Overflow": { + "in": "INVALID", + "out": "bf0f000000000000021111" + }, + + "int32Overflow2": { + "in": "INVALID", + "out": "ff0f000000000000021111" + }, +} diff --git a/tests/files/BlockchainTests/badBlockChain.json b/tests/files/BlockchainTests/badBlockChain.json deleted file mode 100644 index 78c5e8c49..000000000 --- a/tests/files/BlockchainTests/badBlockChain.json +++ /dev/null @@ -1,2199 +0,0 @@ -{ - "lastBlock": "0c2b92f68a67487074ba0f9ba508c191e36a9248a297d9868901e09e58c93d83", - "allotment": { - "dbdbdb2cbd23b783741e8d7fcf51e459b497e4a6": "1606938044258990275541962092341162602522202993782792835301376", - "e4157b34ea9615cfbde6b4fda419828124b70c78": "1606938044258990275541962092341162602522202993782792835301376", - "b9c015918bdaba24b4ff057a92a3873d6eb201be": "1606938044258990275541962092341162602522202993782792835301376", - "6c386a4b26f73c802f34673f7248bb118f97424a": "1606938044258990275541962092341162602522202993782792835301376", - "cd2a3d9f938e13cd947ec05abc7fe734df8dd826": "1606938044258990275541962092341162602522202993782792835301376", - "2ef47100e0787b915105fd5e3f4ff6752079d5cb": "1606938044258990275541962092341162602522202993782792835301376", - "e6716f9544a56c530d868e4bfbacb172315bdead": "1606938044258990275541962092341162602522202993782792835301376", - "1a26338f0d905e295fccb71fa9ea849ffa12aaf4": "1606938044258990275541962092341162602522202993782792835301376" - }, - "blockchain": [{ - "header": { - "parentHash": "efb4db878627027c81b3bb1c7dd3a18dae3914a49cdd24a3e40ab3bbfbb240c5", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "f99eb1626cfa6db435c0836235942d7ccaa935f1ae247d3f1c21e495685f903a", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "023101", - "number": "62", - "gasLimit": "0dddb6", - "gasUsed": "", - "timestamp": "54c98c81", - "extraData": "", - "nonce": "498e88f5c14b0b60d6e14ce9c6cc958cbe16a1df8dd90210e50d2d77562a348d" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "9d0a03fd264306a8ccf624bbd52430c18016dd734f982f8e15a94e27c6a252d5" - }, { - "header": { - "parentHash": "523bac4e339a65c633788637b4821b95cda4729439e46ffcaeb00bc12ca35fc0", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "c30ac3d048843b3fab85e57609ccd90fd283d42fb727b9765f9d7e308c354604", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "023075", - "number": "61", - "gasLimit": "0de12f", - "gasUsed": "", - "timestamp": "54c98c80", - "extraData": "", - "nonce": "87fd834b1c0c5e235e68937c0684b91903d068eccba20fd74492c6154079d898" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "efb4db878627027c81b3bb1c7dd3a18dae3914a49cdd24a3e40ab3bbfbb240c5" - }, { - "header": { - "parentHash": "90dc762139c7a07810e96e75b9f8d38ec04897e0c3ea2e0e062ea513dc76e1b0", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "6b14d4511f992a86dfd917d06ef4c3f8d9780fc8dd57b13b330f1a4373b86930", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "022fea", - "number": "60", - "gasLimit": "0de4a9", - "gasUsed": "", - "timestamp": "54c98c7f", - "extraData": "", - "nonce": "28d1ef86d6bf061198c8352a9bdf7aecfeb9b070fefe74d989fe4328426ed7dc" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "523bac4e339a65c633788637b4821b95cda4729439e46ffcaeb00bc12ca35fc0" - }, { - "header": { - "parentHash": "40fd8550974d39a181ec324d322fdbd087f8072e4e99007a84fdfd48eea5bf72", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "5818d51cb2199e144e38a64bb4f87e57633b79353cef6cd9cfcbe474b890cc10", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "022f5f", - "number": "5f", - "gasLimit": "0de824", - "gasUsed": "", - "timestamp": "54c98c7f", - "extraData": "", - "nonce": "f81bdc0d558853cca741711e8997e79f0993264bc0f3d3b9d083cdb586f51ada" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "90dc762139c7a07810e96e75b9f8d38ec04897e0c3ea2e0e062ea513dc76e1b0" - }, { - "header": { - "parentHash": "d299e0ed543ee6ea7f127bb4ec9f19cbf473ff15594325075e5489587bde5e5c", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "0722ade442f4e78f3fd61d01a050ec5894940fc91aa1c29e896fcd8faa1dd0d1", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "022ed4", - "number": "5e", - "gasLimit": "0deb9f", - "gasUsed": "", - "timestamp": "54c98c7e", - "extraData": "", - "nonce": "94b4f06308ea51ac094af81f27b3531d57ca573bf0f2b623f4d19651bf500ae6" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "40fd8550974d39a181ec324d322fdbd087f8072e4e99007a84fdfd48eea5bf72" - }, { - "header": { - "parentHash": "5f5f95cfe15816cb93c45ba289c32bdcfbb9d362ad4846eb401870ded424ef14", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "60aa5e5c42fae0f72c96341784d2ce5fad83e565b1ceef608ca7004af8177b28", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "022e49", - "number": "5d", - "gasLimit": "0def1b", - "gasUsed": "", - "timestamp": "54c98c7e", - "extraData": "", - "nonce": "62b474d5435b98fc5a63437f5cacb9a9e552b04b396b9c11dc5c4211879a6fd1" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "d299e0ed543ee6ea7f127bb4ec9f19cbf473ff15594325075e5489587bde5e5c" - }, { - "header": { - "parentHash": "27cd17b050683d1aeaff1d42df27612aefb5b99a1599fc9ab3b1dba916d7d463", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "cf1fb7cc0ffb347069ecaa8ae6575654d9bcd7db4651b4f7f187b45a17b5b0b3", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "022dbe", - "number": "5c", - "gasLimit": "0df298", - "gasUsed": "", - "timestamp": "54c98c7e", - "extraData": "", - "nonce": "61f97624a9cf28f1e562ce6c219fc03c438e014473d9cfc97f37793abb243545" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "5f5f95cfe15816cb93c45ba289c32bdcfbb9d362ad4846eb401870ded424ef14" - }, { - "header": { - "parentHash": "0e4e602ac61729a55dd8a4bf51f3bcca6efa3a27b4c9f500608132a1c758b599", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "a3e56405697df9f40bb934b3d6eace9acdab9ebbfcb0ab82803abeb3ef401873", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "022d33", - "number": "5b", - "gasLimit": "0df616", - "gasUsed": "", - "timestamp": "54c98c7d", - "extraData": "", - "nonce": "f4729e513b343b43720087ee1283ea388a1c4a06302c1345704f7c796906b975" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "27cd17b050683d1aeaff1d42df27612aefb5b99a1599fc9ab3b1dba916d7d463" - }, { - "header": { - "parentHash": "81726b10cb92362d8e9035795c8676de782a9e9170b0b33f457f25a5a17d61c5", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "77a50f12bc3381dbfab89569bbd74db2ecd34e5d85882e50b0d3dad910ea41e7", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "022ca8", - "number": "5a", - "gasLimit": "0df995", - "gasUsed": "", - "timestamp": "54c98c7d", - "extraData": "", - "nonce": "2090db40337ee76e5adb2b5993893e3065cb855e62901a3db37f31503cf77c5b" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "0e4e602ac61729a55dd8a4bf51f3bcca6efa3a27b4c9f500608132a1c758b599" - }, { - "header": { - "parentHash": "3a051558f02a29e20485d9af8a3f6b81c8fbdd7eb9c7d7c2d0e0ee3e53d9280f", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "22ceeb6cc06266de275731323b3743865bee95bc049dcca6068ec62dafd52b4b", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "022c1d", - "number": "59", - "gasLimit": "0dfd15", - "gasUsed": "", - "timestamp": "54c98c7c", - "extraData": "", - "nonce": "d341ff9bc499d589d4ac8c923aef1d5247458091d14f5b097e6505cebb95ca25" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "81726b10cb92362d8e9035795c8676de782a9e9170b0b33f457f25a5a17d61c5" - }, { - "header": { - "parentHash": "a7dc7be6b8b568b57ccbe0ce2ee81b9bc8a197dbe9c81c9bfff5860a92124edc", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "64d5c7ede628c6b4da12a61f12ae063af05299986e0e9047ddcbec2642dde4b0", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "022b93", - "number": "58", - "gasLimit": "0e0096", - "gasUsed": "", - "timestamp": "54c98c7c", - "extraData": "", - "nonce": "ec4ce81d8baa04cbe43bb15dc98178f3fb59194e1f3bf3a5808e7d880784bd04" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "3a051558f02a29e20485d9af8a3f6b81c8fbdd7eb9c7d7c2d0e0ee3e53d9280f" - }, { - "header": { - "parentHash": "a3b261bdebd4d35db48fab0800c8bbe7e04635eed74e041f24cbe2cf45dc55ab", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "d01eb17b0ce01d39e1c74c9e811b75364b9d452ffe51109607cecf44f0bdf98f", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "022b09", - "number": "57", - "gasLimit": "0e0418", - "gasUsed": "", - "timestamp": "54c98c7b", - "extraData": "", - "nonce": "4955fe6ea6d96a0eff3037c8d05ae558eb83ddf2a7a359f051446f8c19479f35" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "a7dc7be6b8b568b57ccbe0ce2ee81b9bc8a197dbe9c81c9bfff5860a92124edc" - }, { - "header": { - "parentHash": "000113b18e9085923e2be306d700f8d9ba57488d83d012ddb674c815fcc5bb17", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "5a6c90a2f5d7058362a7f1ebe6ca77995a3992d3d51c129bbde174827a569758", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "022a7f", - "number": "56", - "gasLimit": "0e079a", - "gasUsed": "", - "timestamp": "54c98c7b", - "extraData": "", - "nonce": "e08b1ccd69387af70274b1f3a72a2afa3d6b4d79d1e91aa064123926e37f4cf9" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "a3b261bdebd4d35db48fab0800c8bbe7e04635eed74e041f24cbe2cf45dc55ab" - }, { - "header": { - "parentHash": "76429484ade269578bb7a28ff7e92c6ec078e3b819e34c75d0c82e0b95a16488", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "c447ecc628c2d6a6509bf3b852c2fe859885a078f4cc8fef2281b519e6576c13", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0229f5", - "number": "55", - "gasLimit": "0e0b1d", - "gasUsed": "", - "timestamp": "54c98c7b", - "extraData": "", - "nonce": "07ab0ad4bc2ed97c7bb9ac1b7d95c882ec6439ce7ba72647195bddfeb102fa9a" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "000113b18e9085923e2be306d700f8d9ba57488d83d012ddb674c815fcc5bb17" - }, { - "header": { - "parentHash": "bfafa033596140e379af3982a4f28cfd8131a4f9c83863954480b23ccdc9458f", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "b80df67108df05f8d998ee84189f091d109f6b97ad1072ee53e3a592b0623b96", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "02296b", - "number": "54", - "gasLimit": "0e0ea1", - "gasUsed": "", - "timestamp": "54c98c7a", - "extraData": "", - "nonce": "ffc6f12effbed660aeddd1ec121b7290c8681aef304e9c9f8ea348e38d5192c7" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "76429484ade269578bb7a28ff7e92c6ec078e3b819e34c75d0c82e0b95a16488" - }, { - "header": { - "parentHash": "0be004d005852d6ebf8c5a3dbeb69e92b62fe06f3260ff8b91c2d4bd0c46afa6", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "47e82408711e4d1b9f288d5ccab751080678134470ab8d6e74a0ce3ed0db0924", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0228e1", - "number": "53", - "gasLimit": "0e1226", - "gasUsed": "", - "timestamp": "54c98c79", - "extraData": "", - "nonce": "c94bc871fe80628248629441d8b9e54d8bdbf779d551ac258efa604e3968b799" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "bfafa033596140e379af3982a4f28cfd8131a4f9c83863954480b23ccdc9458f" - }, { - "header": { - "parentHash": "24e79b813db071f910652c6f01e490a6132caf16eef31beea6804d8f5d15f3a9", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "79c789c0a942a0e270223998bba6f3d05c951042f72b19a0f2bf5178d0bde104", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "022857", - "number": "52", - "gasLimit": "0e15ac", - "gasUsed": "", - "timestamp": "54c98c79", - "extraData": "", - "nonce": "c373fb1792b9eb121d44c3fc302e2b6b5065cf41cf1ae77340fb76a35205bef1" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "0be004d005852d6ebf8c5a3dbeb69e92b62fe06f3260ff8b91c2d4bd0c46afa6" - }, { - "header": { - "parentHash": "04ce7d40402b418db6a332a6471a2e29aefebd51db685c3f28c75ed53ec97e94", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "5e5ca4d3a13872d1ca94ad005ae039466740cd30c093962dcd81bace34d01500", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0227ce", - "number": "51", - "gasLimit": "0e1933", - "gasUsed": "", - "timestamp": "54c98c78", - "extraData": "", - "nonce": "08175d9f2734ffb36911eb322a0a13122d4011fc0b66cbe5fd723b75e73471f7" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "24e79b813db071f910652c6f01e490a6132caf16eef31beea6804d8f5d15f3a9" - }, { - "header": { - "parentHash": "6432eafb41189f81e590b3e5cc07f252475ddbae1d2ca902c47c1083f1f2ff8f", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "b99171cad003f8ec8bcb8655b6446aed8bc8428490e07fd1aa0aeda179677433", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "022745", - "number": "50", - "gasLimit": "0e1cbb", - "gasUsed": "", - "timestamp": "54c98c77", - "extraData": "", - "nonce": "2dbae7c0eb18d09f48732dd481f8207a85e0fb107930e818c06f6f863237fbc4" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "04ce7d40402b418db6a332a6471a2e29aefebd51db685c3f28c75ed53ec97e94" - }, { - "header": { - "parentHash": "661dae1ee382fdda2be7860ab952e204b6283c548bc734d990300ac55ccda7b8", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "2895ad76b2d2236159799ab925d14d31999c50f2b583552dbf7e7fdc2c1b5aa7", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0226bc", - "number": "4f", - "gasLimit": "0e2044", - "gasUsed": "", - "timestamp": "54c98c76", - "extraData": "", - "nonce": "f1e9d21a798d110ab23c6268736d48f9dafcb57219f6d7ba0f768d1dc65b2ec2" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "6432eafb41189f81e590b3e5cc07f252475ddbae1d2ca902c47c1083f1f2ff8f" - }, { - "header": { - "parentHash": "69f32855ac3f05a5ffb7bf0839c229de52d76ae0422b96b13136855815cca2be", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "dad07ce70ae005894abfd7ce2402dfd509283d395419e511f66b9d70cdc31026", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "022633", - "number": "4e", - "gasLimit": "0e23cd", - "gasUsed": "", - "timestamp": "54c98c76", - "extraData": "", - "nonce": "ef51b1d3e52e74ab7b001bc6c50493ad2632fec515d1f666b011d37d93afd2a8" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "661dae1ee382fdda2be7860ab952e204b6283c548bc734d990300ac55ccda7b8" - }, { - "header": { - "parentHash": "4e83187cdc11690ab547a651b2ecfa23baf534250b946204c55fb10cbaddebd5", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "5b1f6761135cba05743aeb1652d91caae70e7cf8f82b23b86f1a1c8f662914f8", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0225aa", - "number": "4d", - "gasLimit": "0e2757", - "gasUsed": "", - "timestamp": "54c98c76", - "extraData": "", - "nonce": "c65b51031898dadca0a3c9b20ca6584f21c04b160482910c17fe888f52fc5413" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "69f32855ac3f05a5ffb7bf0839c229de52d76ae0422b96b13136855815cca2be" - }, { - "header": { - "parentHash": "e24106a4e8345312cf3139b89cd83f3af95c946ba400836fbb2ef714e0fe660c", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "4f28111e669376d3595d3c626541e614f8af84a06fbe846b9b26f6bea85b1737", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "022521", - "number": "4c", - "gasLimit": "0e2ae2", - "gasUsed": "", - "timestamp": "54c98c75", - "extraData": "", - "nonce": "39c4683f200155eabca14a32b4d4578a99771df81e2b854690ce6005b0fba6b4" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "4e83187cdc11690ab547a651b2ecfa23baf534250b946204c55fb10cbaddebd5" - }, { - "header": { - "parentHash": "74fc9ef6e244ba7dae7b75651cdd83dd1af68f6a39c7d0a45ec897df37427ef8", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "3d19404aaa521d99d72fc669a722cad5aa8de1e4d8c8cb03baadce429834df9b", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "022498", - "number": "4b", - "gasLimit": "0e2e6e", - "gasUsed": "", - "timestamp": "54c98c75", - "extraData": "", - "nonce": "4c3158dae3154260d3fdde0f817a7e436c4096bc8769b3096e8c85e3e76fff7f" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "e24106a4e8345312cf3139b89cd83f3af95c946ba400836fbb2ef714e0fe660c" - }, { - "header": { - "parentHash": "fab619c676eec1db8f92ee444f10313ed1a3710ec5295ec51425b32649b4b0e7", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "28aba7e7912b652381231a17679afee5b5c8a17e700e967ad9b5fecd06d21911", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "02240f", - "number": "4a", - "gasLimit": "0e31fb", - "gasUsed": "", - "timestamp": "54c98c74", - "extraData": "", - "nonce": "3e16fdfac5702b481e9dfb323b1934c741f4e10a0c0a9f7933d77b8fa7f38ae8" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "74fc9ef6e244ba7dae7b75651cdd83dd1af68f6a39c7d0a45ec897df37427ef8" - }, { - "header": { - "parentHash": "c8b564670d6d64bdcd11e8ab55d980458827992425133a51575f4ce2936c3f1b", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "f5b4c19c6f81349d96eb194b5b2a8613cb53c32c79628c3b2bd0c04dd58b9cf9", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "022387", - "number": "49", - "gasLimit": "0e3589", - "gasUsed": "", - "timestamp": "54c98c74", - "extraData": "", - "nonce": "f6eb0c5df257996b3d32efb86a82ae5c19649fd64c08c5a8bc4f3827df3b5b47" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "fab619c676eec1db8f92ee444f10313ed1a3710ec5295ec51425b32649b4b0e7" - }, { - "header": { - "parentHash": "3222ffebe8a05ab862fcae38609dae4212e6c882ee7692efdec07337fb8a40ed", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "3ef352bfb6bfd362d4e99cb15d51ffc68781503b409620d1c44f9066fcf8638e", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0222ff", - "number": "48", - "gasLimit": "0e3918", - "gasUsed": "", - "timestamp": "54c98c73", - "extraData": "", - "nonce": "b41dbf684ece68de88e7b4090484c779117c0eb891bb80ebdd6aec39e6ae26fb" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "c8b564670d6d64bdcd11e8ab55d980458827992425133a51575f4ce2936c3f1b" - }, { - "header": { - "parentHash": "f24268482418d4f142dce9a0530af152d35f77a55a490fda5028f4fe2506a8a2", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "60ca1d0a20f9181e2e6985ea3a9bf57955011092ba0c1e2ff7f35c5dd3ae14f2", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "022277", - "number": "47", - "gasLimit": "0e3ca8", - "gasUsed": "", - "timestamp": "54c98c72", - "extraData": "", - "nonce": "76d7242c2f8181e2aaecf92e7986637c32df07309e2bd2d4853a4e69a1d807e6" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "3222ffebe8a05ab862fcae38609dae4212e6c882ee7692efdec07337fb8a40ed" - }, { - "header": { - "parentHash": "d6f6a3b213cda00ba8f37ac71c42404c9f6e12c55540cbf25e3dffaa15069790", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "16e3755ca138284f3bb76f09b9a92eb1c5d452cb6009fe32ee1a2f3007de7f82", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0221ef", - "number": "46", - "gasLimit": "0e4039", - "gasUsed": "", - "timestamp": "54c98c72", - "extraData": "", - "nonce": "0a538273b51765e82a883a6f5ffe69c12f5b122b6001dadf98644632896924a9" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "f24268482418d4f142dce9a0530af152d35f77a55a490fda5028f4fe2506a8a2" - }, { - "header": { - "parentHash": "a8ab9c367b76d1a9aa0502b8ad25ef5a9a23d0095142c1df9b0fa5ce533b871f", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "c6f6a0172a06957edf03cf1ae1c0c37e195f1e9a3a97652bf9b7878fa1fae0df", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "022167", - "number": "45", - "gasLimit": "0e43ca", - "gasUsed": "", - "timestamp": "54c98c71", - "extraData": "", - "nonce": "cdb088cab6359531e282834eed244bd8ea72fd4f811c9de6e84a202f5a150c4a" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "d6f6a3b213cda00ba8f37ac71c42404c9f6e12c55540cbf25e3dffaa15069790" - }, { - "header": { - "parentHash": "eb10b96e5622bfc814d0003430ad6023c5cb2a48aed6c9d56e9833e269875a69", - "uncleHash": "ff28c31592b9523953c2c75acf91cad55192e6a896e84f2bc3526a45ca2ebc13", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "c98659c362ee2abd9a297f94cabe1d189a598f186f79844127ff5cd5a8e61f2d", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0220df", - "number": "44", - "gasLimit": "0e475c", - "gasUsed": "", - "timestamp": "54c98c70", - "extraData": "", - "nonce": "1b40f6a3183279fbba1f77f2cfbe07714dcc3fa6869dcc0746d72c0aff2bb11f" - }, - "transactions": [], - "uncleHeaders": [{ - "parentHash": "dc153d702e251e17a47053a5e5cd47d86dab5dfb7824dd7299d751134b828bd1", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "0e10772058cc61165d805d2ac89ddc8cb7e89d8aef3e264819c574c2cf0fe20c", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "022057", - "number": "43", - "gasLimit": "0e4aef", - "gasUsed": "", - "timestamp": "54c98c6f", - "extraData": "", - "nonce": "95846f2d756734ff730c3b0d3076abcc21c68ec4dc05375310e4bc52e7825927" - }], - "hash": "a8ab9c367b76d1a9aa0502b8ad25ef5a9a23d0095142c1df9b0fa5ce533b871f" - }, { - "header": { - "parentHash": "dc153d702e251e17a47053a5e5cd47d86dab5dfb7824dd7299d751134b828bd1", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "0e10772058cc61165d805d2ac89ddc8cb7e89d8aef3e264819c574c2cf0fe20c", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "022057", - "number": "43", - "gasLimit": "0e4aef", - "gasUsed": "", - "timestamp": "54c98c6f", - "extraData": "", - "nonce": "8753b25c6345ea98bd53a9f1fa6388b98af7a487bf24ce83873c49fb47a6d179" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "eb10b96e5622bfc814d0003430ad6023c5cb2a48aed6c9d56e9833e269875a69" - }, { - "header": { - "parentHash": "3fa6cb48201f636feef334ca61cfe03ebe61a39af953a0615baf78608ee5b1d5", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "05091ebe9bcf4d3a6853dc719de64afc1e3c644af524eb67f771d8a4a76fe6b0", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "021fd0", - "number": "42", - "gasLimit": "0e4e83", - "gasUsed": "", - "timestamp": "54c98c6e", - "extraData": "", - "nonce": "d9ae4fdcc8477cdf5571b1bbdd29508dcc311a396a0be3280d630e3aaa2365e2" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "dc153d702e251e17a47053a5e5cd47d86dab5dfb7824dd7299d751134b828bd1" - }, { - "header": { - "parentHash": "a52a8c3158f5d4b22c1e40e745e506b75c3b64db0b578867f1161d55e8553235", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "f8b32f66cade9318f8ca9a87eda25a87fe87932e0d6e8e0472c18060f2497548", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "021f49", - "number": "41", - "gasLimit": "0e5218", - "gasUsed": "", - "timestamp": "54c98c6d", - "extraData": "", - "nonce": "a25f8b675a60f4483e62336d987144c6df47fda1beab10c6b5bf73df2d01651c" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "3fa6cb48201f636feef334ca61cfe03ebe61a39af953a0615baf78608ee5b1d5" - }, { - "header": { - "parentHash": "12e8ea2be2e694cab719fb6e62d07b87a0ef4ea0f6ff1dcda472703704eec637", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "ff7d7770dc1aabbdc1641b353499ed53b0684db49b86fb8ae85672a16eb39e7d", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "021ec2", - "number": "40", - "gasLimit": "0e55ae", - "gasUsed": "", - "timestamp": "54c98c6d", - "extraData": "", - "nonce": "35cf7a0ced9e6dc852da2878fd5b388944c649b6f38cd6d93a48eac263776919" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "a52a8c3158f5d4b22c1e40e745e506b75c3b64db0b578867f1161d55e8553235" - }, { - "header": { - "parentHash": "785db22693eee8b645e43fe0a52823218c20b37f3a30951f0ce14e68225c606f", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "970a8a0eef298532fdcd87af0e19ade0177e31a5706ec58094aa2a2caacd368b", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "021e3b", - "number": "3f", - "gasLimit": "0e5945", - "gasUsed": "", - "timestamp": "54c98c6a", - "extraData": "", - "nonce": "536d03af92abebd6b667a43a657c00e7967e91ba261161fca657d91bae7ab807" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "12e8ea2be2e694cab719fb6e62d07b87a0ef4ea0f6ff1dcda472703704eec637" - }, { - "header": { - "parentHash": "421ee7337f96015408826de1071f60e7bdea8c55d5c4940a7698592af8a8943b", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "9e8b305a6453d70cb813b897d00a3572c076813d1f625667ef77c2b6aa602514", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "021db4", - "number": "3e", - "gasLimit": "0e5cdd", - "gasUsed": "", - "timestamp": "54c98c69", - "extraData": "", - "nonce": "de7d05a0409386576450912a75731008907d60559d897fada3414d21ecb8645a" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "785db22693eee8b645e43fe0a52823218c20b37f3a30951f0ce14e68225c606f" - }, { - "header": { - "parentHash": "c6a183fe9b20278088064d73522d46195391e138eee9f626b47b21933c3f5002", - "uncleHash": "64e1d0ef19a993aabfb9848c23b0edae038931f848f21120063dcc777fda9ac3", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "26ce8c56dd770d4e81f402857e3e0c866278dd5c000a5dbe09524d82493bbb08", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "021d2d", - "number": "3d", - "gasLimit": "0e6076", - "gasUsed": "", - "timestamp": "54c98c68", - "extraData": "", - "nonce": "28aa0c93f042c21a1ebb9946e1e2696cce9c986f26b7dfcbf2645d18d854128d" - }, - "transactions": [], - "uncleHeaders": [{ - "parentHash": "6892235a6b7d2a0f1e6cd3d2e406be18ee785954f7067e276e3149fa47700365", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "458f0125ebc7464d6c5b72c98825cbe2b0d57c0b1b0ce9816572fc9035f155d3", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "021ca6", - "number": "3c", - "gasLimit": "0e6410", - "gasUsed": "", - "timestamp": "54c98c68", - "extraData": "", - "nonce": "62bf715e94b1d140f193a27654dc44426ba703375f196254baea58a032bf7628" - }], - "hash": "421ee7337f96015408826de1071f60e7bdea8c55d5c4940a7698592af8a8943b" - }, { - "header": { - "parentHash": "6892235a6b7d2a0f1e6cd3d2e406be18ee785954f7067e276e3149fa47700365", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "458f0125ebc7464d6c5b72c98825cbe2b0d57c0b1b0ce9816572fc9035f155d3", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "021ca6", - "number": "3c", - "gasLimit": "0e6410", - "gasUsed": "", - "timestamp": "54c98c68", - "extraData": "", - "nonce": "fb1b2198615fbdd86475160adc6323a0554e0a536f9949cacbddd8f227d84265" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "c6a183fe9b20278088064d73522d46195391e138eee9f626b47b21933c3f5002" - }, { - "header": { - "parentHash": "7d4306928c9eaf0db49c9cc35b58a360ad88e01bbf3a1a3b0dd9f709f1335c55", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "0c166bf9e1d7d9a7fdda2d99bd61dc2d846599f9f64b547e67e5fe37978b4db7", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "021c1f", - "number": "3b", - "gasLimit": "0e67aa", - "gasUsed": "", - "timestamp": "54c98c68", - "extraData": "", - "nonce": "c1e503401ecbb1456bdf032cd57f40c71a929ce1ff593c8a1457ac786c70144b" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "6892235a6b7d2a0f1e6cd3d2e406be18ee785954f7067e276e3149fa47700365" - }, { - "header": { - "parentHash": "b1c0d480d33a06cbbcd38cee1129c6b622bb67a0e2470dffcebbf60a6b3a5416", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "4d4b2c1a8282c7cb6690d558df8e2a4863a89e3934228499164f35ad9b668fc3", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "021b99", - "number": "3a", - "gasLimit": "0e6b45", - "gasUsed": "", - "timestamp": "54c98c67", - "extraData": "", - "nonce": "b9d55c591661cd5304cce46a8fe0c2b31c6e14519c76c6a20c162abc8616e1ea" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "7d4306928c9eaf0db49c9cc35b58a360ad88e01bbf3a1a3b0dd9f709f1335c55" - }, { - "header": { - "parentHash": "b957579cd20be69ae9a8713e18270fdd1fb56885826f3d794bffa49f95ed4f14", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "84595f9e8c266a5f46b644e5ed0ebddb4eab239909d0b64fc9157d02d1ee2587", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "021b13", - "number": "39", - "gasLimit": "0e6ee1", - "gasUsed": "", - "timestamp": "54c98c66", - "extraData": "", - "nonce": "c057e978ba748d6d8997e4f308b3e006bc101de804548a051393e842584fa1cc" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "b1c0d480d33a06cbbcd38cee1129c6b622bb67a0e2470dffcebbf60a6b3a5416" - }, { - "header": { - "parentHash": "2cababd593a5997464dbff050d075b2e01bcfa4537a1100575149c8f5519d1a1", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "898b7c5d611ecacb4125b7f81c04440fc85bc249aef842bd82829f4b3378cf30", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "021a8d", - "number": "38", - "gasLimit": "0e727e", - "gasUsed": "", - "timestamp": "54c98c66", - "extraData": "", - "nonce": "c1b1785becabee7f8674a5efb228d10bd3c3b0b6fd8e002c458a4ecfe9575470" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "b957579cd20be69ae9a8713e18270fdd1fb56885826f3d794bffa49f95ed4f14" - }, { - "header": { - "parentHash": "5f2d4df15fd3db5e5ed8ead046bd4677cf361f5a262374b206e1939a55d6c182", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "8feea907b706e24d242a29cc3b94e14d36fc60b057ebb51513234df954b21e51", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "021a07", - "number": "37", - "gasLimit": "0e761c", - "gasUsed": "", - "timestamp": "54c98c65", - "extraData": "", - "nonce": "0f316d630c7e1085835c5018b8c6e2d044a46860ff17fddb6282d7129c2cada9" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "2cababd593a5997464dbff050d075b2e01bcfa4537a1100575149c8f5519d1a1" - }, { - "header": { - "parentHash": "12ac8fa01ce4a3f336631416c0fe7df485b4918047f7eeff26af275330132275", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "1b283c328cc419af68dbea0aa782df06ac53836b301db95dfb15d0f637aa3e48", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "021981", - "number": "36", - "gasLimit": "0e79bb", - "gasUsed": "", - "timestamp": "54c98c65", - "extraData": "", - "nonce": "74e3397be3115765acddd77eefa5e926fa8b29f47d407f01b1cbfaf848f9d024" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "5f2d4df15fd3db5e5ed8ead046bd4677cf361f5a262374b206e1939a55d6c182" - }, { - "header": { - "parentHash": "af53e2b46855e3d22c3b6b4b536009f770fca3018e4ea37529131f9bd861ab96", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "08d89e10ffc8ff6a9e95534760d4891fa52e62fbf8b1d3c6780c19947c891735", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0218fb", - "number": "35", - "gasLimit": "0e7d5b", - "gasUsed": "", - "timestamp": "54c98c65", - "extraData": "", - "nonce": "6c75bd40c79abf8cea83c02344555f06cb538a095e5fbfacbc5ba4d3b351b3b9" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "12ac8fa01ce4a3f336631416c0fe7df485b4918047f7eeff26af275330132275" - }, { - "header": { - "parentHash": "058fdd0356f3a26452bf1646430b2d91f8ea108fd57cb65d0bfb3ee6c77f51bc", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "bf8143f5ea2d23e3f1732de8d9fd33dcac64699dfdcc94439cb6a40bba0c2037", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "021875", - "number": "34", - "gasLimit": "0e80fc", - "gasUsed": "", - "timestamp": "54c98c64", - "extraData": "", - "nonce": "550a99bbfc3f58a8bc438ab13beca788259f32e8d4e3f76a87061f265772b9f9" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "af53e2b46855e3d22c3b6b4b536009f770fca3018e4ea37529131f9bd861ab96" - }, { - "header": { - "parentHash": "78e0f15d23ccb3bb92e0d57b0210faf1bd0d4b4d64fc71e886814b5d252a6799", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "4e963999ac25f7766c035d428f00ca5265c9500b9b3bc56b7735248c2b028e88", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0217f0", - "number": "33", - "gasLimit": "0e849e", - "gasUsed": "", - "timestamp": "54c98c63", - "extraData": "", - "nonce": "23b3df147ea9f02a3d5ce43df20bdea91272b92788d82442a879ea6a6dc2489a" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "058fdd0356f3a26452bf1646430b2d91f8ea108fd57cb65d0bfb3ee6c77f51bc" - }, { - "header": { - "parentHash": "a42a84b68fffb25a083a7d17b6964f081f0118945cf147af82a1d1411bfee7f3", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "349b2dd2a10473a8f91bc3d00b835125b8cbc70597574db735da2ab83b2cb257", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "02176b", - "number": "32", - "gasLimit": "0e8841", - "gasUsed": "", - "timestamp": "54c98c62", - "extraData": "", - "nonce": "d9f70ad8787b115c933155f5bda5299f29c616c4276e482735657c12ddb2928a" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "78e0f15d23ccb3bb92e0d57b0210faf1bd0d4b4d64fc71e886814b5d252a6799" - }, { - "header": { - "parentHash": "6cf8d1d50422a97195bc6d3bd3470db121f401805a67e5869047f90eacf640aa", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "379865ad34931528b1cb15ff374b803e90b49877d2cd78c1b90eff8b99451d38", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0216e6", - "number": "31", - "gasLimit": "0e8be4", - "gasUsed": "", - "timestamp": "54c98c61", - "extraData": "", - "nonce": "580af2e26906706e26cd0ef6e0c896a15251c88b897e2f8a076de01f7f7044df" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "a42a84b68fffb25a083a7d17b6964f081f0118945cf147af82a1d1411bfee7f3" - }, { - "header": { - "parentHash": "e099bb490084aac1cdfd08afe6f509fed6ef2e11f2e0159c31661122a7a2ea48", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "7dc6c00408bf34db5bfb61d749418cfa93572f79e739baa25ce5b9ae749643b6", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "021661", - "number": "30", - "gasLimit": "0e8f88", - "gasUsed": "", - "timestamp": "54c98c61", - "extraData": "", - "nonce": "58592a2a6dc9b193cc545e66f19f0f269052c1694cd6250e7f9195b8c241fbb1" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "6cf8d1d50422a97195bc6d3bd3470db121f401805a67e5869047f90eacf640aa" - }, { - "header": { - "parentHash": "ece1239dd071192b071e9b16bf539a53e626481967f90f339151f1017ce8aa31", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "d9b3a3b7fa49ce31eac3158b2f0caea24251617e00005b9bb15b9d71b8e7c65f", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0215dc", - "number": "2f", - "gasLimit": "0e932d", - "gasUsed": "", - "timestamp": "54c98c60", - "extraData": "", - "nonce": "9fdf18bfa76399277a7c528a46cd1beedae6f6b4a4c4e52ab57cbb3a9c8ca142" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "e099bb490084aac1cdfd08afe6f509fed6ef2e11f2e0159c31661122a7a2ea48" - }, { - "header": { - "parentHash": "cbe0cbe7e7648adf2918857a3b1c796ab2b612d61ab1e1077e6482356d3dae5f", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "0f5cf5a746f2dea05a1372164630d49751dd38bf3977403bd54c9d34d590f05d", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "021557", - "number": "2e", - "gasLimit": "0e96d3", - "gasUsed": "", - "timestamp": "54c98c5f", - "extraData": "", - "nonce": "d0244e94ccd310fc90b888af62eb08d84d260e22b5ee5c0889843af449a23012" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "ece1239dd071192b071e9b16bf539a53e626481967f90f339151f1017ce8aa31" - }, { - "header": { - "parentHash": "e4c941559cd6156704526b7d0fc980ac5ec78604ceb7b23d9575416164aa20b1", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "172f5aaeecb2eb175b6281e0b12274a9ad2bd9b2a3fd6aff8de397267d35137d", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0214d2", - "number": "2d", - "gasLimit": "0e9a7a", - "gasUsed": "", - "timestamp": "54c98c5f", - "extraData": "", - "nonce": "6e556bf0a092b89f489cf4c96b06154b11ab788c7efe9f9f9f3ded27fa6ceade" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "cbe0cbe7e7648adf2918857a3b1c796ab2b612d61ab1e1077e6482356d3dae5f" - }, { - "header": { - "parentHash": "adfcbf18ddea49eeed8be1dd1a830a1e7a3d1c3e73e9fb4feb2bc41b740cb59a", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "07827d6b56fbf14cf7b413b7cef95dc35219f490ab9c60dd33922a42c1b0e0b2", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "02144d", - "number": "2c", - "gasLimit": "0e9e22", - "gasUsed": "", - "timestamp": "54c98c5e", - "extraData": "", - "nonce": "aabfc84d1ff2785df977b9c30231fc568efbb98098be1e4c91f497746ceffaad" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "e4c941559cd6156704526b7d0fc980ac5ec78604ceb7b23d9575416164aa20b1" - }, { - "header": { - "parentHash": "405c0a75cf81bdf287d3491c8539f586cbf7ab947c752139dceec10b1c4a979f", - "uncleHash": "c1e8ce6f2c6bd9a4ac7571ea744d96c335e4e166064a20d8cd780ebd735ecd92", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "0c57738bf8737d790800c2f9a3d0965a9916fd5f956dca3d3f9c4dfd33bc5f5c", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0213c9", - "number": "2b", - "gasLimit": "0ea1cb", - "gasUsed": "", - "timestamp": "54c98c5d", - "extraData": "", - "nonce": "9fea0da34dce2af6612fb76eecab6e28429018591dbd903d7a83b609715938cf" - }, - "transactions": [], - "uncleHeaders": [{ - "parentHash": "154b4705d7e62ab88d010b727b08c97f0c83693bbaf6e3cf515dfde547f9222d", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "ab4e9e105c9c02ffe52d2834dbc7dfcc9c10b2552a35f28b7206345d195dcac9", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "021345", - "number": "2a", - "gasLimit": "0ea575", - "gasUsed": "", - "timestamp": "54c98c5d", - "extraData": "", - "nonce": "e17e8547ff6422bdca5e756e6d8d71969353e3943dc086f48eefa246282dcedb" - }], - "hash": "adfcbf18ddea49eeed8be1dd1a830a1e7a3d1c3e73e9fb4feb2bc41b740cb59a" - }, { - "header": { - "parentHash": "154b4705d7e62ab88d010b727b08c97f0c83693bbaf6e3cf515dfde547f9222d", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "ab4e9e105c9c02ffe52d2834dbc7dfcc9c10b2552a35f28b7206345d195dcac9", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "021345", - "number": "2a", - "gasLimit": "0ea575", - "gasUsed": "", - "timestamp": "54c98c5d", - "extraData": "", - "nonce": "7c3e7f1ee10049b273f693085d8b07888dffefd8d23a357fb93a340a6c03a503" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "405c0a75cf81bdf287d3491c8539f586cbf7ab947c752139dceec10b1c4a979f" - }, { - "header": { - "parentHash": "ac0545587c51fc7eb96fb4cd908f9c3e4dd118be337ded8d80359bed8404ff98", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "221aad57cb9bea1901a3b6022419d53e1b0a0db76bc9381f0d50228986c8681b", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0212c1", - "number": "29", - "gasLimit": "0ea920", - "gasUsed": "", - "timestamp": "54c98c5d", - "extraData": "", - "nonce": "afabefe7da000f2923838826701b6657dc1bc5e5ff8af35a58e8199b3d4b95e5" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "154b4705d7e62ab88d010b727b08c97f0c83693bbaf6e3cf515dfde547f9222d" - }, { - "header": { - "parentHash": "8839be302b043e308c026f5dcc578ea786df70b1c0fda99594b1383f6d629f87", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "1bd06d16cc71d71a28438c8ad36948029c563da5028f96a40d924670dd1e5b1e", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "02123d", - "number": "28", - "gasLimit": "0eaccc", - "gasUsed": "", - "timestamp": "54c98c5b", - "extraData": "", - "nonce": "57d951f11711e8e51fae057fcf40cc44ce3d5258b34451da8f01c990a6487701" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "ac0545587c51fc7eb96fb4cd908f9c3e4dd118be337ded8d80359bed8404ff98" - }, { - "header": { - "parentHash": "91b0e99dcfea2d53f742ff4be281afe1d4a2b4b8fbb81e3a5fe1b49ecc542949", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "de180f08e638175d98c5809980889324e53996316fd884208d4112751417060d", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0211b9", - "number": "27", - "gasLimit": "0eb079", - "gasUsed": "", - "timestamp": "54c98c5a", - "extraData": "", - "nonce": "6ea62532b687a79ad319dfd948362a52f51204141741ba6c7cbc33df788cd3c7" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "8839be302b043e308c026f5dcc578ea786df70b1c0fda99594b1383f6d629f87" - }, { - "header": { - "parentHash": "21476e82cf0717b7feeb650a3133248514ba90c7a6c42f720fee8a1c71d7fc84", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "b032cebd73ba40d05c211fc41f88e9325d1eb983bdaff7b018b944db7d4ce4ac", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "021135", - "number": "26", - "gasLimit": "0eb427", - "gasUsed": "", - "timestamp": "54c98c5a", - "extraData": "", - "nonce": "e441ff7c08cf84396f73e05651bdd8043ed90eb20882eca5b1c8b74f19438a64" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "91b0e99dcfea2d53f742ff4be281afe1d4a2b4b8fbb81e3a5fe1b49ecc542949" - }, { - "header": { - "parentHash": "f06d28070c4c694ec1c618ee962cd4e74417334110f468d48374ccd0d3b678d0", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "64e477eca5490d594f01576f40a18491ddf1f6074fe71afb7425194f358afdbd", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0210b1", - "number": "25", - "gasLimit": "0eb7d5", - "gasUsed": "", - "timestamp": "54c98c59", - "extraData": "", - "nonce": "a407a5482700095e367b45f97b0bed1cc7fb14609b383c284844a7f1316bb018" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "21476e82cf0717b7feeb650a3133248514ba90c7a6c42f720fee8a1c71d7fc84" - }, { - "header": { - "parentHash": "7155778d18654f003f38a67db0a835d4f01639fd0863be3520a02f3a1178ed38", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "a61b8aa03e2be1ac7bced9ea977fd4a1376befc80ec5cd65a6edb16549b9b2ad", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "02102d", - "number": "24", - "gasLimit": "0ebb84", - "gasUsed": "", - "timestamp": "54c98c57", - "extraData": "", - "nonce": "4df22750b37fc28fc731df54c4f43e77c897b21caebb565a3a9d190170e5396e" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "f06d28070c4c694ec1c618ee962cd4e74417334110f468d48374ccd0d3b678d0" - }, { - "header": { - "parentHash": "3ef9f35dbb3e78ff849f479d7c649bc372f90b6cc844e7d98d549a6b676aa5c8", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "6b02f078683a3a7a9f356cf0d1c47ac7781d670803783945b75b825730666e73", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "020faa", - "number": "23", - "gasLimit": "0ebf34", - "gasUsed": "", - "timestamp": "54c98c57", - "extraData": "", - "nonce": "9d43fb653d64b3295b2013e49686fc303d21176c931216334c243eea57ba0fea" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "7155778d18654f003f38a67db0a835d4f01639fd0863be3520a02f3a1178ed38" - }, { - "header": { - "parentHash": "0b209c7934e725f0a831b7cb095c066f1b17b314c13180fee673c34d86ccf49e", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "ac5d8bd9b44e7b50390616d058b40eb945be1f60625ab7b7cbb4e1b121697c26", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "020f27", - "number": "22", - "gasLimit": "0ec2e5", - "gasUsed": "", - "timestamp": "54c98c56", - "extraData": "", - "nonce": "687a107881e7bc0555c7fa46befbc043e8ce78526aa5a20a19eeb141788afe1f" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "3ef9f35dbb3e78ff849f479d7c649bc372f90b6cc844e7d98d549a6b676aa5c8" - }, { - "header": { - "parentHash": "a8a86805335c46f9f78a8845a1b15d970901b837addffe7811f5eb8b07d2e7a7", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "16bc622c64a114fd5af498af5c326002c85d40a8c4773af32f64fd8da11f0d76", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "020ea4", - "number": "21", - "gasLimit": "0ec697", - "gasUsed": "", - "timestamp": "54c98c55", - "extraData": "", - "nonce": "905f65010932fb85b030efa4bc39105bb334c6a7f6bcfdb6c3480af5d5cd892d" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "0b209c7934e725f0a831b7cb095c066f1b17b314c13180fee673c34d86ccf49e" - }, { - "header": { - "parentHash": "7a2f883f129132f92a7fcebdea65037930d40a86eec999159f404dd89c18a2b9", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "c9ec7aab1d6c279c977a5bfa3b883c90a9089b8983ebdd912412113a99e25593", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "020e21", - "number": "20", - "gasLimit": "0eca4a", - "gasUsed": "", - "timestamp": "54c98c53", - "extraData": "", - "nonce": "2fcb3b98c11a21821c30e34d0d1b2879912bb2ecabf926a5dd107f1a45c8f5be" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "a8a86805335c46f9f78a8845a1b15d970901b837addffe7811f5eb8b07d2e7a7" - }, { - "header": { - "parentHash": "e74d4f2d0a2d6d0d9074762d6753d564c10b11a14fd72042f3f80854f72b1aaa", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "0646d650dd5f2f0ffe2a048847d66291f92fce67815f2f20dc98bf8f3e2ea2f7", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "020d9e", - "number": "1f", - "gasLimit": "0ecdfe", - "gasUsed": "", - "timestamp": "54c98c52", - "extraData": "", - "nonce": "d61b1e1eb2cf5f1bfeacd8e9d4207249290abec808f11147c760c52853b615f6" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "7a2f883f129132f92a7fcebdea65037930d40a86eec999159f404dd89c18a2b9" - }, { - "header": { - "parentHash": "ce769bd96de6f41295fe58d16e7cbb5b364e6483999c823a1a973ead016380fb", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "4466481666ad9e0d6d14558721d617f22b1211bb0f180732cd7e77ee7dbf076d", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "020d1b", - "number": "1e", - "gasLimit": "0ed1b3", - "gasUsed": "", - "timestamp": "54c98c52", - "extraData": "", - "nonce": "671327dabf9b29918d010c7a42eecb85472452e207d8631233292412bb6bb2d4" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "e74d4f2d0a2d6d0d9074762d6753d564c10b11a14fd72042f3f80854f72b1aaa" - }, { - "header": { - "parentHash": "e212e3e8605f2fa5fecae54cb47eb76cbb0446aebabbcfe7fa85a4318833a4c8", - "uncleHash": "4f4a3aed7cd865e754a46fc4d2a9f011ca8c6c8825bdb16b620826a4da7a2edd", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "7d048a66bf7c5b881f45b365b80aac654b4a0db62e87b406fdae6f8ca688496d", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "020c98", - "number": "1d", - "gasLimit": "0ed569", - "gasUsed": "", - "timestamp": "54c98c51", - "extraData": "", - "nonce": "d7a2b7af129c9f67357b22d827fc9b0a531b2d5c61b982bcbb1eab729ca4f427" - }, - "transactions": [], - "uncleHeaders": [{ - "parentHash": "086ca69ee2bb4acdc2d98e97a9b28bd1073e69bf9d4b6ca34c808cf0322fced6", - "uncleHash": "199a5ac1082648984b669a8c0f2659c1d5ba366e187f18df2cbb7cb1c2a81247", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "43faff75f87987754348eac015d87a6dfe36bb6a61f54210c3e42989b2b36041", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "020c15", - "number": "1c", - "gasLimit": "0ed920", - "gasUsed": "", - "timestamp": "54c98c51", - "extraData": "", - "nonce": "271a8ffab04393a209cc69537afa468e0f52f9270cfd10769f9e9e2379eea518" - }], - "hash": "ce769bd96de6f41295fe58d16e7cbb5b364e6483999c823a1a973ead016380fb" - }, { - "header": { - "parentHash": "086ca69ee2bb4acdc2d98e97a9b28bd1073e69bf9d4b6ca34c808cf0322fced6", - "uncleHash": "199a5ac1082648984b669a8c0f2659c1d5ba366e187f18df2cbb7cb1c2a81247", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "43faff75f87987754348eac015d87a6dfe36bb6a61f54210c3e42989b2b36041", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "020c15", - "number": "1c", - "gasLimit": "0ed920", - "gasUsed": "", - "timestamp": "54c98c51", - "extraData": "", - "nonce": "f247b9f198bc0b964b865f3bdc3eeb35a99a6cb0a7fd69596ed7c41246833474" - }, - "transactions": [], - "uncleHeaders": [{ - "parentHash": "5ecb68b9ac7d36f4aaa85547190e9ed43c9e49a30caa64f7305b27e53609039b", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "32809e393a1cb8e1f926ed39ff7b28595c4d47a10b1584e1c77005b851b4f8fe", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "020b93", - "number": "1b", - "gasLimit": "0edcd8", - "gasUsed": "", - "timestamp": "54c98c4f", - "extraData": "", - "nonce": "d89357fdf5d158f25909dd8a7d25e4380439673330d1f5608ac1bcbf0711ef25" - }], - "hash": "e212e3e8605f2fa5fecae54cb47eb76cbb0446aebabbcfe7fa85a4318833a4c8" - }, { - "header": { - "parentHash": "5ecb68b9ac7d36f4aaa85547190e9ed43c9e49a30caa64f7305b27e53609039b", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "32809e393a1cb8e1f926ed39ff7b28595c4d47a10b1584e1c77005b851b4f8fe", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "020b93", - "number": "1b", - "gasLimit": "0edcd8", - "gasUsed": "", - "timestamp": "54c98c4f", - "extraData": "", - "nonce": "cb1c6295e8b151c14b01e56ebdd8b36a7b820cdf37fb281be528bb25f9aab9d4" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "086ca69ee2bb4acdc2d98e97a9b28bd1073e69bf9d4b6ca34c808cf0322fced6" - }, { - "header": { - "parentHash": "a0705b5845fce7b2b2e019941930dbb82d8903774e345094419069be11c1c22c", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "019a14b6f8ff5fc9c8ed661e7cb4056e729e9867c8f71352508e59c343e77117", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "020b11", - "number": "1a", - "gasLimit": "0ee091", - "gasUsed": "", - "timestamp": "54c98c4e", - "extraData": "", - "nonce": "6e1916ae82930deca8fe6b28e6318244cd4f0765db5bb38d8ee6a8726163a90a" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "5ecb68b9ac7d36f4aaa85547190e9ed43c9e49a30caa64f7305b27e53609039b" - }, { - "header": { - "parentHash": "91ed626750eeff3f7c07c309b38b71f442575072ce18ed94a8487f2659e335a9", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "f09f049bce7a869f8ad54663d8e10b0eb560f8b141dcc927f08af9f8abc6dc0d", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "020a8f", - "number": "19", - "gasLimit": "0ee44b", - "gasUsed": "", - "timestamp": "54c98c4d", - "extraData": "", - "nonce": "918f4628f6c7d79f0c3b8a4d384d3970f9f9ba581d4b45fece506ea9deaf2571" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "a0705b5845fce7b2b2e019941930dbb82d8903774e345094419069be11c1c22c" - }, { - "header": { - "parentHash": "abce0fd799d8b1c6c9e4bfb1fceada61edbf36a23c1a93baabc31fecc225c9fe", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "7ca0df1724fe6ce438feb1e8fe4f52ef315bedefc92f4d3d5dc841498c7d9770", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "020a0d", - "number": "18", - "gasLimit": "0ee806", - "gasUsed": "", - "timestamp": "54c98c4b", - "extraData": "", - "nonce": "d75bcd11f60a52f6bb0dbaf5d2f5744d2c3010a12284a79b0772c20464848c01" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "91ed626750eeff3f7c07c309b38b71f442575072ce18ed94a8487f2659e335a9" - }, { - "header": { - "parentHash": "13fd100334d3cd6ed3ca478d10ac4556a577d5ebb1fc8156a1d92fda7d7d652c", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "af444c45f6f7ca394f562997f705f47bc19e8f8f998e4f479befa4710d68ae7c", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "02098b", - "number": "17", - "gasLimit": "0eebc1", - "gasUsed": "", - "timestamp": "54c98c4a", - "extraData": "", - "nonce": "190b2238adbf8358f2232e3bdf539f215a830fd408c94fe065cb33a647b0ca9b" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "abce0fd799d8b1c6c9e4bfb1fceada61edbf36a23c1a93baabc31fecc225c9fe" - }, { - "header": { - "parentHash": "92bb3c98b0a3bf50ecaef3f1e1f4e6c45f7e789e8bb0a1282195f95dae647457", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "04338b43bc7e7424dcb7889315bf21b630e862893cca3f5dad1ae77f3019e564", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "020909", - "number": "16", - "gasLimit": "0eef7d", - "gasUsed": "", - "timestamp": "54c98c4a", - "extraData": "", - "nonce": "4f453a3030699d8b521053dc3681917bfc678f01cbf91ae150e0c19bb3ca6200" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "13fd100334d3cd6ed3ca478d10ac4556a577d5ebb1fc8156a1d92fda7d7d652c" - }, { - "header": { - "parentHash": "edafeaa77271ba5f11806dd3c9b04197887c875907291a75fd0e111d611a8f8a", - "uncleHash": "abbc1be1540f17e0b6c76412c3e3963ef51b82db00b41ed91780e94cd6bc0a37", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "a400e6a7abd0281275c6df47a18852acf9ace04479beed8eff777c088b42dcb4", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "020887", - "number": "15", - "gasLimit": "0ef33a", - "gasUsed": "", - "timestamp": "54c98c49", - "extraData": "", - "nonce": "e593fd880056aa7ffb39a469397d0674fbd182ac9642b02d8f1761cbbf09b7a3" - }, - "transactions": [], - "uncleHeaders": [{ - "parentHash": "00b132c7f2fc505108e68b50ca20d0d8401e407392f4ca4fdfefdd9e51791c05", - "uncleHash": "14283a8d578976745fe4a4506c21d32050333e6827c6d07ae082f30c63e71ce2", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "8d0b02e51662e344c05941d4c1352d75702e8aea54b1dfa56e89cfea507640c4", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "020805", - "number": "14", - "gasLimit": "0ef6f8", - "gasUsed": "", - "timestamp": "54c98c48", - "extraData": "", - "nonce": "0fb6a33ec259630a235d91aa079458122f9acbcb16868801842eca594903fa60" - }], - "hash": "92bb3c98b0a3bf50ecaef3f1e1f4e6c45f7e789e8bb0a1282195f95dae647457" - }, { - "header": { - "parentHash": "00b132c7f2fc505108e68b50ca20d0d8401e407392f4ca4fdfefdd9e51791c05", - "uncleHash": "14283a8d578976745fe4a4506c21d32050333e6827c6d07ae082f30c63e71ce2", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "8d0b02e51662e344c05941d4c1352d75702e8aea54b1dfa56e89cfea507640c4", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "020805", - "number": "14", - "gasLimit": "0ef6f8", - "gasUsed": "", - "timestamp": "54c98c48", - "extraData": "", - "nonce": "668024077bf888e88b12a0806b0d049ce64be59edafddae34689812e05092860" - }, - "transactions": [], - "uncleHeaders": [{ - "parentHash": "978c697f7b46a3d9a13fdb239de7644b5c1aed4e6c6bba153db80215d25b50dd", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "4d04480e4fbddfed00f5d02e5afdeb661ec7dd172929578b6377433893c8fbbf", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "020784", - "number": "13", - "gasLimit": "0efab7", - "gasUsed": "", - "timestamp": "54c98c47", - "extraData": "", - "nonce": "e63f7c980582cabb7b255997b6b593aea6ead59a35b96ae76fce1162015ba84a" - }], - "hash": "edafeaa77271ba5f11806dd3c9b04197887c875907291a75fd0e111d611a8f8a" - }, { - "header": { - "parentHash": "978c697f7b46a3d9a13fdb239de7644b5c1aed4e6c6bba153db80215d25b50dd", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "4d04480e4fbddfed00f5d02e5afdeb661ec7dd172929578b6377433893c8fbbf", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "020784", - "number": "13", - "gasLimit": "0efab7", - "gasUsed": "", - "timestamp": "54c98c47", - "extraData": "", - "nonce": "ed01a8fb5bfa03f68dfd04e017e7c5b4189cc869c2f097150f16b9fed2cbe242" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "00b132c7f2fc505108e68b50ca20d0d8401e407392f4ca4fdfefdd9e51791c05" - }, { - "header": { - "parentHash": "e02a518cc4aebc79097e6887b4358e5867867627d742a738ba03fe31847b0937", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "8d336cdac51e7b6f9ae441fbf8005121ff5fd19f642e7a75f4f0b150cc4225e5", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "020703", - "number": "12", - "gasLimit": "0efe77", - "gasUsed": "", - "timestamp": "54c98c47", - "extraData": "", - "nonce": "c3a28113d0f0830614097aa85d8f489e5b16c472e80274a0cf978ad4abd05292" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "978c697f7b46a3d9a13fdb239de7644b5c1aed4e6c6bba153db80215d25b50dd" - }, { - "header": { - "parentHash": "0c2b92f68a67487074ba0f9ba508c191e36a9248a297d9868901e09e58c93d83", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "23ed6770e626153f0b34d820b5e73adfa2d65e180c27ff72e02342141655403c", - "transactionsTrie": "56e81f171bca55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "020682", - "number": "11", - "gasLimit": "0f0238", - "gasUsed": "", - "timestamp": "54c98c46", - "extraData": "", - "nonce": "23b2f6c22fe30cf1ad56568b7ab5cd5932acff4f9ed327523fdf658ac2ef13fb" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "e02a518cc4aebc79097e6887b4358e5867867627d742a738ba03fe31847b0937" - }, { - "header": { - "parentHash": "c288aeb5d6f5d28441273be039c1b83561cdf280ed3606268fdd75d8d6dc4df7", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "45cfaf48995fd8a55b07887bfd8c673dac5d2be510227622c8e9dd0bdfa656e7", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "020601", - "number": "10", - "gasLimit": "0f05fa", - "gasUsed": "", - "timestamp": "54c98c46", - "extraData": "", - "nonce": "08fb5ba6cf88b2b2af4c85086171047680018a6c680244f169fa73cd6da58aca" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "0c2b92f68a67487074ba0f9ba508c191e36a9248a297d9868901e09e58c93d83" - }, { - "header": { - "parentHash": "ded747ac29138a5d6133d03222cf15c5a3b8ddd1d5c35f9d770003a48b8b740e", - "uncleHash": "d1655d461275bd960d22e2e697e6ba783415eecb8ac3f2bb0cd3ad9d904c740a", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "6c87f841f0aacb7d4ffa66c5b3c5172b26bd73fe7979cb9f166299d3c7bb04bb", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "020580", - "number": "0f", - "gasLimit": "0f09bd", - "gasUsed": "", - "timestamp": "54c98c45", - "extraData": "", - "nonce": "1de51dae01afbb5910d6acdcb7df58912cc91c168cc63fbed7eb4b2332bc1966" - }, - "transactions": [], - "uncleHeaders": [{ - "parentHash": "f2a0b5532d490597480f4975e47181d4be85d8620e2e45d902213be70e27b2c9", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "307bc52f59984d22290b2a401ca82869e7fc2a160d38b66f8d7697021f37c894", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0204ff", - "number": "0e", - "gasLimit": "0f0d81", - "gasUsed": "", - "timestamp": "54c98c45", - "extraData": "", - "nonce": "19ca0cc768f0321a395ba6441d026d9a73a24d4433d9004428e49ade3c24bb38" - }], - "hash": "c288aeb5d6f5d28441273be039c1b83561cdf280ed3606268fdd75d8d6dc4df7" - }, { - "header": { - "parentHash": "f2a0b5532d490597480f4975e47181d4be85d8620e2e45d902213be70e27b2c9", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "307bc52f59984d22290b2a401ca82869e7fc2a160d38b66f8d7697021f37c894", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0204ff", - "number": "0e", - "gasLimit": "0f0d81", - "gasUsed": "", - "timestamp": "54c98c45", - "extraData": "", - "nonce": "2541df78725461b521a887046c45aea551c311bbe6dde879464569c3553d1cc5" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "ded747ac29138a5d6133d03222cf15c5a3b8ddd1d5c35f9d770003a48b8b740e" - }, { - "header": { - "parentHash": "d2c5da1d2c893045c89687bef90b1b5f6dd5b5b48ec285e7a37cdedb082c891b", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "4f116c5af97ee4f6c317166f34de24a763e171df1d11663c7092643296c1d0be", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "02047e", - "number": "0d", - "gasLimit": "0f1146", - "gasUsed": "", - "timestamp": "54c98c45", - "extraData": "", - "nonce": "c771a408d73a99425e8e5c34c328df221e24285c050bdbd45ce6a550aa5946bf" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "f2a0b5532d490597480f4975e47181d4be85d8620e2e45d902213be70e27b2c9" - }, { - "header": { - "parentHash": "4446d5c09320dc46bea5fa6561a2fe1cce6c18b70e6c42e269bd8789625c912f", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "aea1845b078feee175b72ea533dbaf896de44e0ba0a394318262dd12340bf921", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0203fe", - "number": "0c", - "gasLimit": "0f150c", - "gasUsed": "", - "timestamp": "54c98c44", - "extraData": "", - "nonce": "7e1ba0bbe42990e10624325578c948a45ecd1dd55a2b0c95a4eef60e9d1b0558" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "d2c5da1d2c893045c89687bef90b1b5f6dd5b5b48ec285e7a37cdedb082c891b" - }, { - "header": { - "parentHash": "311add2981c7c8cb21f5ceea4ebe250239b0ad013cc98b02b3c38cb6fbdccc09", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "4b0316893bc357368efd5b1dad32ef9f3e1bb65a1d50df9bfb0254c4ff0daad0", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "02037e", - "number": "0b", - "gasLimit": "0f18d3", - "gasUsed": "", - "timestamp": "54c98c44", - "extraData": "", - "nonce": "86f60539080e2033f0954189bd1c195bd9ab44dc09ee66f0f9c102aaa828119d" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "4446d5c09320dc46bea5fa6561a2fe1cce6c18b70e6c42e269bd8789625c912f" - }, { - "header": { - "parentHash": "57c8595e442b7d8d6da27b290b9b49162f5482f9ac3347015634e4a9bffff5b3", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "32e2d89075067acc840e5efc04cd05d3a50dfbf0cc7c35a66be61faeb962f3c8", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0202fe", - "number": "0a", - "gasLimit": "0f1c9b", - "gasUsed": "", - "timestamp": "54c98c42", - "extraData": "", - "nonce": "60dda84f569a4e5ed8d2be8454de24961230cc535047e4eb68c97c06a9ac2e85" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "311add2981c7c8cb21f5ceea4ebe250239b0ad013cc98b02b3c38cb6fbdccc09" - }, { - "header": { - "parentHash": "b1d90d644c04a1f383951bbb6ac813a21f0db0af76cd8acbc4832fa05b3ae32f", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "8df867b3a6a24ab47b123e07af3af51cb66a7b2fd71d7c7e6b3ccafc46ee2910", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "02027e", - "number": "09", - "gasLimit": "0f2064", - "gasUsed": "", - "timestamp": "54c98c42", - "extraData": "", - "nonce": "3a51111ab11894b383623f33ff3bca79763237c60236cabdb9116e8ba97f8af8" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "57c8595e442b7d8d6da27b290b9b49162f5482f9ac3347015634e4a9bffff5b3" - }, { - "header": { - "parentHash": "68ec20bc35a69f48abf23669a98cbe55f0faa1a1760c4ceb28427779adad015d", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "87885daec6cd5d2c12e7caf3479ceae2ff80625deff8e680780e48b05b423881", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0201fe", - "number": "08", - "gasLimit": "0f242e", - "gasUsed": "", - "timestamp": "54c98c41", - "extraData": "", - "nonce": "77e9bedf66653f8178af2deb0d21fead507e7a083fb136186929321265ba8b12" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "b1d90d644c04a1f383951bbb6ac813a21f0db0af76cd8acbc4832fa05b3ae32f" - }, { - "header": { - "parentHash": "b9f39a67afe055ad2dc65765e959ebeeda4431a83d8670210b58e7878b9f717d", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "c0dd0ac9fdf641805cb6de868606eb47c4c05548c94da688373d0eb4178ac95c", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "02017e", - "number": "07", - "gasLimit": "0f27f8", - "gasUsed": "", - "timestamp": "54c98c41", - "extraData": "", - "nonce": "fd373d77d68e238c43c8275d7d70dc8df35a46437b2f0b17abff8b7bf557e03b" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "68ec20bc35a69f48abf23669a98cbe55f0faa1a1760c4ceb28427779adad015d" - }, { - "header": { - "parentHash": "c04ea6045e78d912531e176fdec192f3248f8336b7c851ebbf0f51b18e9ba185", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "5e0e549e0a89bb926ca1254b179a163d06c592277378c9861c344fa4424c42c7", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0200fe", - "number": "06", - "gasLimit": "0f2bc3", - "gasUsed": "", - "timestamp": "54c98c40", - "extraData": "", - "nonce": "652c55ff7c5570f670748c04f8064f74b9e0bf93f11503af7caad334bd38842f" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "b9f39a67afe055ad2dc65765e959ebeeda4431a83d8670210b58e7878b9f717d" - }, { - "header": { - "parentHash": "22a53c1af652b5fa9a55740846f80d1e66ff1340afba9a459dd3b906c647eee4", - "uncleHash": "6e457e10d8df224c4b47b538970627f839960145483a110878da075f22adc7f1", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "854b7c0fe63b0677ae130a997881464aed9736a50d3fd45979863a0186110d09", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "02007e", - "number": "05", - "gasLimit": "0f2f8f", - "gasUsed": "", - "timestamp": "54c98c3f", - "extraData": "", - "nonce": "638f9ce17a9919b44ca3ec64af26cff3e2ede4859bb2ed90cd013ebf9e8c655f" - }, - "transactions": [], - "uncleHeaders": [{ - "parentHash": "6ea79b5de5b0203b34384ace2e8613cca965f4fe5d25a27119df4a144661b7d5", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "17e921e481b7ae367764c9100594ca494845f9c352f0a782852d36ad5a30fa3d", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "01ffff", - "number": "04", - "gasLimit": "0f335c", - "gasUsed": "", - "timestamp": "54c98c3f", - "extraData": "", - "nonce": "b2a3fe54dfd6a74fe885bbc25674f66662b30a02a2e4e6abeb012752fdc2ba6b" - }], - "hash": "c04ea6045e78d912531e176fdec192f3248f8336b7c851ebbf0f51b18e9ba185" - }, { - "header": { - "parentHash": "6ea79b5de5b0203b34384ace2e8613cca965f4fe5d25a27119df4a144661b7d5", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "17e921e481b7ae367764c9100594ca494845f9c352f0a782852d36ad5a30fa3d", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "01ffff", - "number": "04", - "gasLimit": "0f335c", - "gasUsed": "", - "timestamp": "54c98c3f", - "extraData": "", - "nonce": "4d88603ca485ada9342c84f1003d2f877f01c73aa5534c37fa457809d5dc81c6" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "22a53c1af652b5fa9a55740846f80d1e66ff1340afba9a459dd3b906c647eee4" - }, { - "header": { - "parentHash": "da0bc84f4881690dcfbd8cfe5201ae729698e318397ab71df29fb0c42064fd04", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "483d4e48ad679804bd089049626d00c37a632b685f4a314147618a421463ebde", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "01ff80", - "number": "03", - "gasLimit": "0f372a", - "gasUsed": "", - "timestamp": "54c98c3e", - "extraData": "", - "nonce": "2e13f39b771db75c16128b81e3527df1eebdcef22a807036db6daeda440238c7" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "6ea79b5de5b0203b34384ace2e8613cca965f4fe5d25a27119df4a144661b7d5" - }, { - "header": { - "parentHash": "c753d3dc40dce12c4004f84e68f125924f57f655d182b6b3c88bd23b4957aa8b", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "ae79b8ceed8fc796da2e2128764b747f525b8639cce84b8549d876874ab0d8b8", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "01ff01", - "number": "02", - "gasLimit": "0f3af9", - "gasUsed": "", - "timestamp": "54c98c3e", - "extraData": "", - "nonce": "69c4cb5f302e23b248fe31ed3acc69129c33d878642ddd2662f6be218b107811" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "da0bc84f4881690dcfbd8cfe5201ae729698e318397ab71df29fb0c42064fd04" - }, { - "header": { - "parentHash": "c9cb614fddd89b3bc6e2f0ed1f8e58e8a0d826612a607a6151be6f39c991a941", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "8888f1f195afa192cfee860698584c030f4c9db1", - "stateRoot": "e808aa6f1ae98bf6c78f044412a1ec3e374e5ed11399658a5e2a8bdcdff79194", - "transactionsTrie": "02e0e754bed54edb9146793b31a144d982b4011a207879d0aa73044e5da56be9", - "receiptTrie": "3562d8ac0eaeb66147f75edc7309aa72dd04736d459ab715bd9497d6fc01866a", - "bloom": "04010008001000000000010002000002000000050004020000000000200040048000001000000042208003025000000000008500028082002000008040046000", - "difficulty": "01ff80", - "number": "01", - "gasLimit": "0f3e6f", - "gasUsed": "012b50", - "timestamp": "54c98c1a", - "extraData": "", - "nonce": "84eb5c47eef17fe98cb0b39da5ab26c8ccd74c9e8e32eaed1304c1eb43c55009" - }, - "transactions": [{ - "nonce": "", - "gasPrice": "09184e72a000", - "gasLimit": "0f3e6f", - "to": "", - "value": "", - "data": "60056013565b6101918061001d6000396000f35b3360008190555056006001600060e060020a6000350480630a874df61461003a57806341c0e1b514610058578063a02b161e14610066578063dbbdf0831461007757005b610045600435610149565b80600160a060020a031660005260206000f35b610060610161565b60006000f35b6100716004356100d4565b60006000f35b61008560043560243561008b565b60006000f35b600054600160a060020a031632600160a060020a031614156100ac576100b1565b6100d0565b8060018360005260205260406000208190555081600060005260206000a15b5050565b600054600160a060020a031633600160a060020a031614158015610118575033600160a060020a0316600182600052602052604060002054600160a060020a031614155b61012157610126565b610146565b600060018260005260205260406000208190555080600060005260206000a15b50565b60006001826000526020526040600020549050919050565b600054600160a060020a031633600160a060020a0316146101815761018f565b600054600160a060020a0316ff5b56", - "v": "1b", - "r": "d4287e915ebac7a8af390560fa53c8f0b7f13802ba0393d7afa5823c2560ca89", - "s": "ae75db31a34f7e386ad459646de98ec3a1c88cc91b11620b4ffd86871f579942" - }, { - "nonce": "01", - "gasPrice": "09184e72a000", - "gasLimit": "0f2bac", - "to": "", - "value": "", - "data": "6100096001610030565b610011610027565b61001961007b565b610263806101ae6000396000f35b33600081905550565b73c6d9d2cd449a754c494264e1809c50e34d64562b63dbbdf0838060e060020a026000528260045230600160a060020a0316602452600060006044600060008660155a03f150505050565b7f436f6e6669670000000000000000000000000000000000000000000000000000600173c6d9d2cd449a754c494264e1809c50e34d64562b60005260205260406000208190555073c6d9d2cd449a754c494264e1809c50e34d64562b60027f436f6e66696700000000000000000000000000000000000000000000000000006000526020526040600020819055507f4e616d6552656700000000000000000000000000000000000000000000000000600130600160a060020a03166000526020526040600020819055503060027f4e616d655265670000000000000000000000000000000000000000000000000060005260205260406000208190555073c6d9d2cd449a754c494264e1809c50e34d64562b600060005260206000a130600160a060020a0316600060005260206000a156006001600060e060020a6000350480635fd4b08a146100505780636be16bed146100655780639988197f14610076578063e5811b3514610094578063e79a198f146100b2578063f5c57382146100c057005b61005b60043561025c565b8060005260206000f35b6100706004356100d5565b60006000f35b61008160043561021c565b80600160a060020a031660005260206000f35b61009f600435610255565b80600160a060020a031660005260206000f35b6100ba610197565b60006000f35b6100cb600435610234565b8060005260206000f35b6000600282600052602052604060002054600160a060020a031614156100fa576100ff565b610194565b600133600160a060020a03166000526020526040600020546000141561012457610150565b60006002600133600160a060020a03166000526020526040600020546000526020526040600020819055505b80600133600160a060020a03166000526020526040600020819055503360028260005260205260406000208190555033600160a060020a0316600060005260206000a15b50565b6000600133600160a060020a03166000526020526040600020549050806000146101c0576101c5565b610219565b600281600052602052604060002054600160a060020a0316600060005260206000a16000600133600160a060020a031660005260205260406000208190555060006002826000526020526040600020819055505b50565b60006002826000526020526040600020549050919050565b6000600182600160a060020a03166000526020526040600020549050919050565b6000919050565b600091905056", - "v": "1b", - "r": "e44840971732e6de536be0b008229d6ffed7eaa90c75dd2ba689f89887044d2b", - "s": "96a39bfff3ffb67b554fb747a3de15ced81d7aedd7cb902fd945ddab3a8c30d8" - }, { - "nonce": "02", - "gasPrice": "09184e72a000", - "gasLimit": "0f02a8", - "to": "", - "value": "0de0b6b3a7640000", - "data": "6100096002610096565b6100327f47617673696e6f000000000000000000000000000000000000000000000000006100ea565b61003a6100e1565b610042610050565b6105a68061015c6000396000f35b60003411610065576001600481905550610076565b66038d7ea4c6800034046004819055505b600454600333600160a060020a0316600052602052604060002081905550565b73c6d9d2cd449a754c494264e1809c50e34d64562b63dbbdf0838060e060020a026000528260045230600160a060020a0316602452600060006044600060008660155a03f150505050565b33600081905550565b73c6d9d2cd449a754c494264e1809c50e34d64562b630a874df68060e060020a026000526001600452602060006024600060008660155a03f1505050600051600160a060020a0316636be16bed8060e060020a0260005282600452600060006024600060008660155a03f15050505056006001600060e060020a6000350480633a98ef39146100a857806350e3b157146100ba57806353aab434146100cf5780635c7b79f5146100dd5780637ab75718146100ee57806391a0ac6a146101065780639790782714610118578063983f637a1461012a5780639aedabca1461013e578063a2393ff814610150578063aa5ee35414610165578063b2f7914814610176578063cadf338f14610187578063f2a75fe41461019c57005b6100b061059c565b8060005260206000f35b6100c5600435610585565b8060005260206000f35b6100d761043c565b60006000f35b6100e8600435610482565b60006000f35b6100fc600435602435610363565b8060005260206000f35b61010e61052a565b8060005260206000f35b61012061050b565b8060005260206000f35b6101386004356024356101aa565b60006000f35b610146610542565b8060005260206000f35b61015b6004356103f6565b8060005260206000f35b610170600435610204565b60006000f35b6101816004356102bb565b60006000f35b61019260043561056e565b8060005260206000f35b6101a4610411565b60006000f35b34600290815401908190555034600182600052602052604060002081905550816001826000526020526040600020600101819055504360018260005260205260406000206002018190555080600060005260206000a15050565b6000600060008360005260206000209250600060018460005260205260406000205411610230576102b5565b60c86001846000526020526040600020540491508161024f8486610363565b01905033600160a060020a03166000826000600060006000848787f1505050506001836000526020526040600020546002908154039081905550600183600052602052604060002060008155600101600081556001016000905582600060005260206000a15b50505050565b60006001826000526020526040600020541180156102ee5750600181600052602052604060002060020154610100014310155b6102f757610360565b33600160a060020a0316600060c8600184600052602052604060002054046000600060006000848787f150505050600181600052602052604060002054600290815403908190555060018160005260205260406000206000815560010160008155600101600090555b50565b600060018360005260205260406000206002015460ff0143111580156103b85750600183600052602052604060002060010154826001856000526020526040600020600201544060005260206000201860ff16105b6103c1576103f0565b600183600052602052604060002060010154606460018560005260205260406000205460630204610100020490505b92915050565b600061040a82600052602060002083610363565b9050919050565b600054600160a060020a0316600030600160a060020a0316316000600060006000848787f150505050565b600061044734610585565b905080600333600160a060020a031660005260205260406000209081540190819055508060049081540190819055508060005260206000a050565b6000600333600160a060020a03166000526020526040600020548211156104a857610507565b6104b18261056e565b905033600160a060020a03166000826000600060006000848787f15050505081600490815403908190555081600333600160a060020a031660005260205260406000209081540390819055508060005260206000a05b5050565b6000600333600160a060020a0316600052602052604060002054905090565b60006002543430600160a060020a0316310303905090565b6000600454600333600160a060020a031660005260205260406000205461056761052a565b0204905090565b60006004548261057c61052a565b02049050919050565b600061058f61052a565b6004548302049050919050565b600060045490509056", - "v": "1b", - "r": "afcc26fefd78fcb86248d33b37743ae606548c58b52fec030a89810036e006fc", - "s": "ba9d7a21b6ff5287ae4eccef82140e4f24cbca9da7ab4e03ac14188522ddda9c" - }, { - "nonce": "03", - "gasPrice": "09184e72a000", - "gasLimit": "0eb952", - "to": "", - "value": "", - "data": "6007600360ad565b602e7f436f696e52656700000000000000000000000000000000000000000000000000603c565b61023d806100f96000396000f35b73c6d9d2cd449a754c494264e1809c50e34d64562b630a874df68060e060020a026000526001600452602060006024600060008660155a03f1505050600051600160a060020a0316636be16bed8060e060020a0260005282600452600060006024600060008660155a03f150505050565b73c6d9d2cd449a754c494264e1809c50e34d64562b63dbbdf0838060e060020a026000528260045230600160a060020a0316602452600060006044600060008660155a03f15050505056006001600060e060020a60003504806306661abd1461003a5780632e3405991461004c578063a832e17914610072578063e79a198f1461008657005b6100426101ed565b8060005260206000f35b6100576004356101f7565b82600160a060020a0316600052816020528060405260606000f35b610080600435602435610094565b60006000f35b61008e6100e9565b60006000f35b3360016000546000526020526040600020819055508160016000546000526020526040600020600101819055508060016000546000526020526040600020600201819055506000805490816001019055505050565b600060008054908160019003905550600090505b6000548110156101c85733600160a060020a0316600182600052602052604060002054600160a060020a031614610133576101bd565b600054811415610142576101b8565b6001600054600052602052604060002054600182600052602052604060002081905550600160005460005260205260406000206001015460018260005260205260406000206001018190555060016000546000526020526040600020600201546001826000526020526040600020600201819055505b6101c8565b8060010190506100fd565b6001600054600052602052604060002060008155600101600081556001016000905550565b6000600054905090565b600060006000600184600052602052604060002054925060018460005260205260406000206001015491506001846000526020526040600020600201549050919390925056", - "v": "1c", - "r": "d57b3e7ae5ed89febcce1c02c625d1e3bbdb7ae33c81e1745773d085a538b169", - "s": "a9185724c3166fe6bdf2b6d75c50caeccfb6457b89f2fa48376ebc8724203a11" - }, { - "nonce": "04", - "gasPrice": "09184e72a000", - "gasLimit": "0e96c5", - "to": "", - "value": "", - "data": "6100287f476176436f696e00000000000000000000000000000000000000000000000000610072565b6100547f47415600000000000000000000000000000000000000000000000000000000006103e86100ec565b61005c6100e3565b610064610162565b6103ed8061018e6000396000f35b73c6d9d2cd449a754c494264e1809c50e34d64562b630a874df68060e060020a026000526001600452602060006024600060008660155a03f1505050600051600160a060020a0316636be16bed8060e060020a0260005282600452600060006024600060008660155a03f150505050565b33600081905550565b73c6d9d2cd449a754c494264e1809c50e34d64562b630a874df68060e060020a026000526003600452602060006024600060008660155a03f1505050600051600160a060020a031663a832e1798060e060020a026000528360045282602452600060006044600060008660155a03f15050505050565b633b9aca006001600054600160a060020a03166000526020526040600020819055504360038190555056006001600060e060020a6000350480631fa03a2b14610066578063673448dd1461007e57806367eae6721461009357806399f4b251146100aa578063bbd39ac0146100b8578063c86a90fe146100cd578063d26c8a8a146100e1578063daea85c5146100f357005b610074600435602435610319565b8060005260206000f35b6100896004356102e3565b8060005260206000f35b6100a4600435602435604435610104565b60006000f35b6100b2610350565b60006000f35b6100c360043561026d565b8060005260206000f35b6100db6004356024356101c4565b60006000f35b6100e961024e565b8060005260206000f35b6100fe60043561028e565b60006000f35b81600184600160a060020a0316600052602052604060002054101580156101545750600283600160a060020a0316600052602052604060002033600160a060020a03166000526020526040600020545b61015d576101bf565b81600184600160a060020a0316600052602052604060002090815403908190555081600182600160a060020a0316600052602052604060002090815401908190555080600160a060020a031683600160a060020a031660008460005260206000a35b505050565b81600133600160a060020a031660005260205260406000205410156101e85761024a565b81600133600160a060020a0316600052602052604060002090815403908190555081600182600160a060020a0316600052602052604060002090815401908190555080600160a060020a031633600160a060020a031660008460005260206000a35b5050565b6000600133600160a060020a0316600052602052604060002054905090565b6000600182600160a060020a03166000526020526040600020549050919050565b6001600233600160a060020a0316600052602052604060002082600160a060020a031660005260205260406000208190555080600160a060020a031633600160a060020a03166001600060005260206000a350565b6000600233600160a060020a0316600052602052604060002082600160a060020a03166000526020526040600020549050919050565b6000600283600160a060020a0316600052602052604060002082600160a060020a0316600052602052604060002054905092915050565b60006003544303905060008111610366576103ea565b33600160a060020a03166002826103e80260005260206000a241600160a060020a03166003826103e80260005260206000a2806103e802600133600160a060020a03166000526020526040600020908154019081905550806103e802600141600160a060020a03166000526020526040600020908154019081905550436003819055505b5056", - "v": "1b", - "r": "5850d4c676bf8251ba0671b7ab1c69a11de741abaa396d5a340e2240bca84f46", - "s": "6e08b879d5a75089a12b1e19f1d2b43b0a5cc4a50d80021a55f4aeb5f173c24c" - }, { - "nonce": "05", - "gasPrice": "09184e72a000", - "gasLimit": "0e5941", - "to": "", - "value": "", - "data": "60267f5265676973747261720000000000000000000000000000000000000000000000603c565b602c603a565b6104cb806100ae6000396000f35b565b73c6d9d2cd449a754c494264e1809c50e34d64562b630a874df68060e060020a026000526001600452602060006024600060008660155a03f1505050600051600160a060020a0316636be16bed8060e060020a0260005282600452600060006024600060008660155a03f15050505056006001600060e060020a6000350480631c83171b14610092578063574e1af4146100a35780635d574e32146100d25780635fd4b08a146100e6578063779a31c3146100fb5780637d2e3ce91461010c5780639e71f3571461011f5780639ea1956614610133578063c284bc2a14610148578063e50f599a14610159578063e5811b3514610170578063f218cb111461018e57005b61009d6004356101ac565b60006000f35b6100ae6004356103e5565b83600160a060020a031660005282600160a060020a03166020528060405260606000f35b6100e060043560243561039e565b60006000f35b6100f16004356104aa565b8060005260206000f35b610106600435610474565b60006000f35b6101196004356000610357565b60006000f35b61012d6004356024356101ea565b60006000f35b61013e60043561048f565b8060005260206000f35b61015360043561022e565b60006000f35b61016a6004356024356044356102e8565b60006000f35b61017b600435610459565b80600160a060020a031660005260206000f35b610199600435610441565b80600160a060020a031660005260206000f35b600181600052602052604060002054600160a060020a03166000146101d0576101e7565b336001826000526020526040600020600101819055505b50565b33600160a060020a0316600183600052602052604060002054600160a060020a0316146102165761022a565b806001836000526020526040600020819055505b5050565b33600160a060020a0316600182600052602052604060002054600160a060020a03161461025a576102e5565b806000600183600052602052604060002060010154600160a060020a03166000526020526040600020541461028e576102bd565b60006000600183600052602052604060002060010154600160a060020a03166000526020526040600020819055505b6001816000526020526040600020600081556001016000815560010160008155600101600090555b50565b33600160a060020a0316600184600052602052604060002054600160a060020a03161461031457610352565b816001846000526020526040600020600101819055508061033457610351565b82600083600160a060020a03166000526020526040600020819055505b5b505050565b33600160a060020a0316600183600052602052604060002054600160a060020a0316146103835761039a565b806001836000526020526040600020600201819055505b5050565b33600160a060020a0316600183600052602052604060002054600160a060020a0316146103ca576103e1565b806001836000526020526040600020600301819055505b5050565b600060006000600060018560005260205260406000205493506001856000526020526040600020600101549250600185600052602052604060002060020154915060018560005260205260406000206003015490509193509193565b60006001826000526020526040600020549050919050565b60006001826000526020526040600020600101549050919050565b60006001826000526020526040600020600201549050919050565b60006001826000526020526040600020600301549050919050565b6000600082600160a060020a0316600052602052604060002054905091905056", - "v": "1c", - "r": "c2574f5d342e0e02d7449c90cd8e334ba65b2b2aab4c3638407c9531942f19f7", - "s": "2a5bd7feabdfabbd4fd935ee6dda65ff559f51f96334096657c8ff1a92a4972c" - }, { - "nonce": "06", - "gasPrice": "09184e72a000", - "gasLimit": "0e213d", - "to": "8888f1f195afa192cfee860698584c030f4c9db1", - "value": "056bc75e2d63100000", - "data": "", - "v": "1c", - "r": "d74becf74f3729db42fce983a57d28acec72e251b1bc3b85074581a236896191", - "s": "c9381be2d10f93533cdd73bd749497420917ea81e71778951bfa0d70b779f4ee" - }, { - "nonce": "07", - "gasPrice": "09184e72a000", - "gasLimit": "2710", - "to": "fddf0e4d3dd8292cf927c3d92970a3636df9349c", - "value": "", - "data": "6be16bed4761760000000000000000000000000000000000000000000000000000000000", - "v": "1b", - "r": "ccb58da5e97bc9c8489ceacec0659e7091a8b2ad8abf03dd80aea478121627fe", - "s": "83857f506b04d54e9c3900f256a27f5e2f22ce27acc658e11eb2478a215bf0ec" - }, { - "nonce": "", - "gasPrice": "09184e72a000", - "gasLimit": "2710", - "to": "fddf0e4d3dd8292cf927c3d92970a3636df9349c", - "value": "", - "data": "6be16bed47617620576f756c640000000000000000000000000000000000000000000000", - "v": "1b", - "r": "c4eb9906a4ea53823e57832ba6401007e7742dbd208d8360e4ac6bdd73995c88", - "s": "89556e50204f288a7c49949085a9fd85242779e1508cea5b6e15b97c1fae53a0" - }], - "uncleHeaders": [], - "hash": "c753d3dc40dce12c4004f84e68f125924f57f655d182b6b3c88bd23b4957aa8b" - }] -} diff --git a/tests/files/BlockchainTests/basicBlockChain.json b/tests/files/BlockchainTests/basicBlockChain.json deleted file mode 100644 index 4cda9964b..000000000 --- a/tests/files/BlockchainTests/basicBlockChain.json +++ /dev/null @@ -1,894 +0,0 @@ -{ - "lastBlock": "9d0a03fd264306a8ccf624bbd52430c18016dd734f982f8e15a94e27c6a252d5", - "allotment": { - "dbdbdb2cbd23b783741e8d7fcf51e459b497e4a6": "1606938044258990275541962092341162602522202993782792835301376", - "e4157b34ea9615cfbde6b4fda419828124b70c78": "1606938044258990275541962092341162602522202993782792835301376", - "b9c015918bdaba24b4ff057a92a3873d6eb201be": "1606938044258990275541962092341162602522202993782792835301376", - "6c386a4b26f73c802f34673f7248bb118f97424a": "1606938044258990275541962092341162602522202993782792835301376", - "cd2a3d9f938e13cd947ec05abc7fe734df8dd826": "1606938044258990275541962092341162602522202993782792835301376", - "2ef47100e0787b915105fd5e3f4ff6752079d5cb": "1606938044258990275541962092341162602522202993782792835301376", - "e6716f9544a56c530d868e4bfbacb172315bdead": "1606938044258990275541962092341162602522202993782792835301376", - "1a26338f0d905e295fccb71fa9ea849ffa12aaf4": "1606938044258990275541962092341162602522202993782792835301376" - }, - "blockchain": [{ - "header": { - "parentHash": "17f5f7876fa8619927cff728e7206124b309f79ce343b8fddb0e72fc3fce3a46", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "ca88d8a06020473dd34be02d62688c7e891133c0", - "stateRoot": "5ac4233eba430450d5110ad512ac91b4189876f8ac17f9bec0c6615a57d0351e", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "021135", - "number": "2c", - "gasLimit": "0e9dcc", - "gasUsed": "", - "timestamp": "54e9b165", - "extraData": "", - "nonce": "01710c3ef74088767bd2deb076722b3b5d8ea5c64ab229d1c6d58867a6bd84f6" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "9cb0aec1a19b5b6d10a3d9dc66ed042cc348305d054f9b4edee90e8dabb64957" - }, { - "header": { - "parentHash": "de3e095bc127368a69bf7b9c4e631f4cf095f9b44a74bee756357486ba62a181", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "ca88d8a06020473dd34be02d62688c7e891133c0", - "stateRoot": "5931d1de34d4930bc32ef8df0eda0e4b8ece345bbffd1bc93a5fe7f23c962684", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0210b1", - "number": "2b", - "gasLimit": "0ea175", - "gasUsed": "", - "timestamp": "54e9b160", - "extraData": "", - "nonce": "c92a3731683baaa0a2d1fdbf6cb6d3eac6bafa61abb1f2a7ab677ae81b1746be" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "17f5f7876fa8619927cff728e7206124b309f79ce343b8fddb0e72fc3fce3a46" - }, { - "header": { - "parentHash": "5e4133b05db11f0034a93c727affe2df68911e850f43ea52d74cea8966ef82f0", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "ca88d8a06020473dd34be02d62688c7e891133c0", - "stateRoot": "ff2de5fe6315220c5bac3e451314a4e06af8c65cf6d5fcfe483df4d2d4881647", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "021135", - "number": "2a", - "gasLimit": "0ea51f", - "gasUsed": "", - "timestamp": "54e9b154", - "extraData": "", - "nonce": "fbe537ec3796c571f9a3ab832a33f13c6f214146dd6efe77f9701e32dc06e911" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "de3e095bc127368a69bf7b9c4e631f4cf095f9b44a74bee756357486ba62a181" - }, { - "header": { - "parentHash": "4f3f8351791aa121b770efba92b7d0004f56f25fd83b906c210b0a2a456af7f0", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "ca88d8a06020473dd34be02d62688c7e891133c0", - "stateRoot": "080305875c9e00e5bb303a1c6eadd3d7427f9b23a912758709f1fe95c4f86662", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0210b1", - "number": "29", - "gasLimit": "0ea8ca", - "gasUsed": "", - "timestamp": "54e9b14f", - "extraData": "", - "nonce": "9779ab82f80d1c99c2eb8c5e34362915300134396d06a0e6a96e0a639bbc3f96" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "5e4133b05db11f0034a93c727affe2df68911e850f43ea52d74cea8966ef82f0" - }, { - "header": { - "parentHash": "485722aa1f4bf16e6148dea95becc488ca8133d621d5cc7a417be87895149904", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "ca88d8a06020473dd34be02d62688c7e891133c0", - "stateRoot": "223f4d435057e055ee36f4eebf9583ed2c7cd6a0062d6b15ec457634f24d6f26", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "021135", - "number": "28", - "gasLimit": "0eac76", - "gasUsed": "", - "timestamp": "54e9b147", - "extraData": "", - "nonce": "9fed5a521fa71290d833b881a7acfeae90e41e2814e87c964ca51092625a656a" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "4f3f8351791aa121b770efba92b7d0004f56f25fd83b906c210b0a2a456af7f0" - }, { - "header": { - "parentHash": "d702bdf065a69dc32de4e50f53dfcb0cc03149033f7adf8bc9e303b7de067b4a", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "ca88d8a06020473dd34be02d62688c7e891133c0", - "stateRoot": "7103d2dd5a8029b9ded6b8d2c8f5622be582ed9e104a0b7c6c31c9481cbd0ea3", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0211b9", - "number": "27", - "gasLimit": "0eb023", - "gasUsed": "", - "timestamp": "54e9b137", - "extraData": "", - "nonce": "b9d80baedc182c6b33ab0b2dedd65d1031b8d49b699207608ac26db418efda77" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "485722aa1f4bf16e6148dea95becc488ca8133d621d5cc7a417be87895149904" - }, { - "header": { - "parentHash": "c93fc51e4c17a3a1ebf9b30c88ee370e940c7e61392f91de084fba988d05bcbe", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "ca88d8a06020473dd34be02d62688c7e891133c0", - "stateRoot": "5ee07dd1cb29f73bf4c8699e6b751d766496c3b54bcea49c39f069a518c278fc", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "021135", - "number": "26", - "gasLimit": "0eb3d0", - "gasUsed": "", - "timestamp": "54e9b132", - "extraData": "", - "nonce": "4ebc923f7d2f94b9a0604db0fd43712ed69230cff1cb1ba131abd3bbb5125525" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "d702bdf065a69dc32de4e50f53dfcb0cc03149033f7adf8bc9e303b7de067b4a" - }, { - "header": { - "parentHash": "9a0d07af43683842ad85ea08790ec1285363b5b122d94811162747d666f4b225", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "ca88d8a06020473dd34be02d62688c7e891133c0", - "stateRoot": "a555d37170f7288b6919dc01c757987d6e0236642ab1f6e72726329b099782e0", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0210b1", - "number": "25", - "gasLimit": "0eb77e", - "gasUsed": "", - "timestamp": "54e9b131", - "extraData": "", - "nonce": "5299dc47a724872e84d1ca83b2ca04c9ebff1f2044059a3243ee2bdaa5162411" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "c93fc51e4c17a3a1ebf9b30c88ee370e940c7e61392f91de084fba988d05bcbe" - }, { - "header": { - "parentHash": "0dd2562dac8d7ca927ffc762d846a4a8ac6d765cf1865d500359e0aa29c08a80", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "ca88d8a06020473dd34be02d62688c7e891133c0", - "stateRoot": "3437e952c5e5f7d9591201d1dc1324281846b7761739555fb799661d88ffc74f", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "02102d", - "number": "24", - "gasLimit": "0ebb2d", - "gasUsed": "", - "timestamp": "54e9b130", - "extraData": "", - "nonce": "b034d9df64cb62da9ed40ff9c6452ab3971e041a40125d1fa2f36a1c3e1a4d67" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "9a0d07af43683842ad85ea08790ec1285363b5b122d94811162747d666f4b225" - }, { - "header": { - "parentHash": "b2e241703fd4b42e2d4ca98b77b8c864825d9cc753f51df86dc5e8b8917d7fb7", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "ca88d8a06020473dd34be02d62688c7e891133c0", - "stateRoot": "f51101893ab72e7164ec3136d3f73f5d5b42a38878aac6aaf796835cf6e7e277", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "020faa", - "number": "23", - "gasLimit": "0ebedd", - "gasUsed": "", - "timestamp": "54e9b12f", - "extraData": "", - "nonce": "549c10206f0a3b03355bced4da7fe8b4c92c626d34d70fc1249b1583e9524a59" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "0dd2562dac8d7ca927ffc762d846a4a8ac6d765cf1865d500359e0aa29c08a80" - }, { - "header": { - "parentHash": "80ae6069869bb97449896a792d4d79411fbe9b40f3a80ac52f1e90a0387a13a8", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "ca88d8a06020473dd34be02d62688c7e891133c0", - "stateRoot": "81cd317f95618f5abaf210b870e49252f0b0b1b206e02fff9d5ae273143d372e", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "020f27", - "number": "22", - "gasLimit": "0ec28e", - "gasUsed": "", - "timestamp": "54e9b12e", - "extraData": "", - "nonce": "3b85097c2e69ab210f29f284dab5abf85b21b2fbbb14dacd5e2f566d7b286157" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "b2e241703fd4b42e2d4ca98b77b8c864825d9cc753f51df86dc5e8b8917d7fb7" - }, { - "header": { - "parentHash": "2a7b89c16544da6bc0ea388244f62aa2b6828735c22251c39568816b57844a72", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "ca88d8a06020473dd34be02d62688c7e891133c0", - "stateRoot": "a438f7b7ba572ece08c383ba44747547c8b593a386c20bbe468102d520c599d2", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "020ea4", - "number": "21", - "gasLimit": "0ec640", - "gasUsed": "", - "timestamp": "54e9b12c", - "extraData": "", - "nonce": "ceefd261b0594d0d7a2e901783f0ae251b269ca28ae898d52e00b71d9c727350" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "80ae6069869bb97449896a792d4d79411fbe9b40f3a80ac52f1e90a0387a13a8" - }, { - "header": { - "parentHash": "faa7e44b6d01075a06df6e42abf1398986b9388235b8d011087384af50a2eb29", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "ca88d8a06020473dd34be02d62688c7e891133c0", - "stateRoot": "84556fdcfc4e4156792cf57b6dcb279b9aa8e5a32a49c13623c47cad8dc9aa29", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "020e21", - "number": "20", - "gasLimit": "0ec9f3", - "gasUsed": "", - "timestamp": "54e9b12b", - "extraData": "", - "nonce": "f9de444570c3015119b75cdb65f13491517dc88d7c9a4fce57f0b896420341f2" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "2a7b89c16544da6bc0ea388244f62aa2b6828735c22251c39568816b57844a72" - }, { - "header": { - "parentHash": "80976f42a2dce307f300318176c849b1998f11b2fa9697c2574f0c77bc0ea5ec", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "ca88d8a06020473dd34be02d62688c7e891133c0", - "stateRoot": "95650876231c490df67274a529b86b8d6fc5a1cc4c4a9881d9021d30e0cfd02f", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "020d9e", - "number": "1f", - "gasLimit": "0ecda7", - "gasUsed": "", - "timestamp": "54e9b12a", - "extraData": "", - "nonce": "9ffc289952b58cf1f32f28f3a66900c5f50984886e5107c3ce1c0ae0ab7f56fe" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "faa7e44b6d01075a06df6e42abf1398986b9388235b8d011087384af50a2eb29" - }, { - "header": { - "parentHash": "34e3880b1e36190969ba677ea5f06fb17b545dadfe8faccee4195a2ae1b6948c", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "ca88d8a06020473dd34be02d62688c7e891133c0", - "stateRoot": "ceed5bf60fdcf557beb1be2a0d096025adaa1769c62e6973de7403bff06daecc", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "020d1b", - "number": "1e", - "gasLimit": "0ed15c", - "gasUsed": "", - "timestamp": "54e9b129", - "extraData": "", - "nonce": "8c66ea93701777a168c5ee2ddb635bd8b280e991f12cd28c604ba68da1d19fe7" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "80976f42a2dce307f300318176c849b1998f11b2fa9697c2574f0c77bc0ea5ec" - }, { - "header": { - "parentHash": "c0b10384be60194d183e60e72ea7e1b45b6ecbb98eee96fba093d427cf58eeae", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "ca88d8a06020473dd34be02d62688c7e891133c0", - "stateRoot": "9ea041b65ef9f83b9c656f1037fb901db9c9f0365dfb6d9c17e4fa667979a049", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "020c98", - "number": "1d", - "gasLimit": "0ed512", - "gasUsed": "", - "timestamp": "54e9b128", - "extraData": "", - "nonce": "b04c1f53feb4f8fa7de1079c4ccfdd8004412ed1a4644c3a741a8defd936c5ed" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "34e3880b1e36190969ba677ea5f06fb17b545dadfe8faccee4195a2ae1b6948c" - }, { - "header": { - "parentHash": "cfd8e3ff0f0d25b22613eae33ad850a29da0146c201d3cc8911ecc03e11feb6d", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "ca88d8a06020473dd34be02d62688c7e891133c0", - "stateRoot": "37310521bb90bac09111f04d35195eff8d2fffcd498fe0fb3b28a9e7a257e63d", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "020c15", - "number": "1c", - "gasLimit": "0ed8c9", - "gasUsed": "", - "timestamp": "54e9b123", - "extraData": "", - "nonce": "9b12bb8586b416030af1816e02d878cb4dbcf0fecf313d0c097122f9ef7380f2" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "c0b10384be60194d183e60e72ea7e1b45b6ecbb98eee96fba093d427cf58eeae" - }, { - "header": { - "parentHash": "47e0d13c120962763c3b729e4a8df6e3e8b1852c8dcaa4fc1924abb8781a0784", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "ca88d8a06020473dd34be02d62688c7e891133c0", - "stateRoot": "9573260fa6f4958aec5d73c552c9fcc8438e5d8321fd401d34601ef6183a3aca", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "020b93", - "number": "1b", - "gasLimit": "0edc81", - "gasUsed": "", - "timestamp": "54e9b121", - "extraData": "", - "nonce": "05ab50820967bef2037a610cd9bdc9481bc3f3bbd57a551b1bc7f78ea54c037b" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "cfd8e3ff0f0d25b22613eae33ad850a29da0146c201d3cc8911ecc03e11feb6d" - }, { - "header": { - "parentHash": "82240f2c32a7711538a34be9829f651bc69a5e17e00a43401cdc1ff23b7ed9af", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "ca88d8a06020473dd34be02d62688c7e891133c0", - "stateRoot": "fa0d3d37d993b6195845e203136194c923bed511438096e30d370005a3b8c3f8", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "020b11", - "number": "1a", - "gasLimit": "0ee03a", - "gasUsed": "", - "timestamp": "54e9b11a", - "extraData": "", - "nonce": "697eecb07bccf538aa4a2c60303b8142fa7c443576c7dabac55cdf3ac0bc74f0" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "47e0d13c120962763c3b729e4a8df6e3e8b1852c8dcaa4fc1924abb8781a0784" - }, { - "header": { - "parentHash": "facc4b2872b3d44015ec0836dfd2b399a222efc137b3fd55332566f47aa6e723", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "ca88d8a06020473dd34be02d62688c7e891133c0", - "stateRoot": "d36de624c8e97b2daed5bbb92bf51f37ede589f6ec7b9da9bf88b580d6ffae7b", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "020a8f", - "number": "19", - "gasLimit": "0ee3f3", - "gasUsed": "", - "timestamp": "54e9b119", - "extraData": "", - "nonce": "a6217fe54461239a0dbc9b2a5ade4a6c33b5e5c4d9d09253df2f6839564a3f0c" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "82240f2c32a7711538a34be9829f651bc69a5e17e00a43401cdc1ff23b7ed9af" - }, { - "header": { - "parentHash": "0a40eacc838453b834705c8e7b8799397ec10fcc8bf83018fc9fad8618235e66", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "ca88d8a06020473dd34be02d62688c7e891133c0", - "stateRoot": "aa62f6767925273173da1a26ee2244bbb413986617a2757db262ef3287c4846e", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "020a0d", - "number": "18", - "gasLimit": "0ee7ad", - "gasUsed": "", - "timestamp": "54e9b113", - "extraData": "", - "nonce": "fddf4f44902957534c21d12811ae72e579e1a65a1af013f02ef4f40977676cca" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "facc4b2872b3d44015ec0836dfd2b399a222efc137b3fd55332566f47aa6e723" - }, { - "header": { - "parentHash": "0ab06bfbe1dc1ee4f049cdd043e621d905bdacbaaf2864c656ecd2635fa1081e", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "ca88d8a06020473dd34be02d62688c7e891133c0", - "stateRoot": "72a6bb5cfacaaa12c34c79a22fd06b052df63c9f350aa4dcbe9de5bd6ed9c0a8", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "02098b", - "number": "17", - "gasLimit": "0eeb68", - "gasUsed": "", - "timestamp": "54e9b111", - "extraData": "", - "nonce": "3a93edebfa668f3bfbcbb8f278c3b81e16b4e8e4c67b5d13967ac6a32baab886" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "0a40eacc838453b834705c8e7b8799397ec10fcc8bf83018fc9fad8618235e66" - }, { - "header": { - "parentHash": "15cfaec1aa2446d107ac361f135840bf1efa2bba2ce8f31440e1d284886622c9", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "ca88d8a06020473dd34be02d62688c7e891133c0", - "stateRoot": "7cae9a3b93b3d9a11663b463e9823cf05b8cb42e39a27e0ae4e29a06ddbdceb3", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "020909", - "number": "16", - "gasLimit": "0eef24", - "gasUsed": "", - "timestamp": "54e9b10e", - "extraData": "", - "nonce": "457179ef35182337d2053d4e9c67e2a4169449fe0539b32f8c99f53e27d52fa9" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "0ab06bfbe1dc1ee4f049cdd043e621d905bdacbaaf2864c656ecd2635fa1081e" - }, { - "header": { - "parentHash": "5548b4b3204897c7bcbf21bef662264acbc6bf8796ab7cfe0aa8dc7ac0356a1b", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "ca88d8a06020473dd34be02d62688c7e891133c0", - "stateRoot": "f8607682bd5194a77fb758703445e524c11a794ef479977102262d215fd36fc7", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "020887", - "number": "15", - "gasLimit": "0ef2e1", - "gasUsed": "", - "timestamp": "54e9b10c", - "extraData": "", - "nonce": "ee559544e7aaa6e37f12f0964db8fb53baa95e5c69c4743e5b9151e13e783044" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "15cfaec1aa2446d107ac361f135840bf1efa2bba2ce8f31440e1d284886622c9" - }, { - "header": { - "parentHash": "77b5256e7b66511e8b75922ebab5ba83cc4333320cd30dda457842bc1b0854dd", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "ca88d8a06020473dd34be02d62688c7e891133c0", - "stateRoot": "778f915524b807e1eef42db2b08587dbd732a32250c06fc0c4a590bcbc06476a", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "020805", - "number": "14", - "gasLimit": "0ef69f", - "gasUsed": "", - "timestamp": "54e9b10b", - "extraData": "", - "nonce": "6cc3b29c7501269190cab3af934f4298f962041507d5b65c7b11d6418e6e23a9" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "5548b4b3204897c7bcbf21bef662264acbc6bf8796ab7cfe0aa8dc7ac0356a1b" - }, { - "header": { - "parentHash": "6e61f563877b6659288176c19b648f02494c8a28b34ddcb633b13e705b2ec64b", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "ca88d8a06020473dd34be02d62688c7e891133c0", - "stateRoot": "2704e5b76bf5c76d528d4f39da477f01175801fc1c72ed5b14da7b405e417caa", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "020784", - "number": "13", - "gasLimit": "0efa5e", - "gasUsed": "", - "timestamp": "54e9b10a", - "extraData": "", - "nonce": "20cb8a17e0ef5a6f9bbfc7781a85ed6a84cf4bb802b76200a102e372233d12c7" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "77b5256e7b66511e8b75922ebab5ba83cc4333320cd30dda457842bc1b0854dd" - }, { - "header": { - "parentHash": "5c6b0202efdde8e744aa862330302224ece3d1e0d49f4e6253186d728122f51e", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "ca88d8a06020473dd34be02d62688c7e891133c0", - "stateRoot": "47d1d13e0b2dd6a15d42882c77d21cdd3163d5dd86bb8214c91b8f9d0c51c1be", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "020703", - "number": "12", - "gasLimit": "0efe1e", - "gasUsed": "", - "timestamp": "54e9b109", - "extraData": "", - "nonce": "301a97e0d24a9d9bab5a3f75f1b0a0a0172230971a69ff5cf79cfc8ef34ff4eb" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "6e61f563877b6659288176c19b648f02494c8a28b34ddcb633b13e705b2ec64b" - }, { - "header": { - "parentHash": "512d65776af768a03954e05530998d1103d36a4a8a706a5fea8db0d8e8cc39c7", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "ca88d8a06020473dd34be02d62688c7e891133c0", - "stateRoot": "12f5a4ee36b34b27c8bee0f825ff895e015c9278fd079827953cf7e9d83bd707", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "020682", - "number": "11", - "gasLimit": "0f01df", - "gasUsed": "", - "timestamp": "54e9b103", - "extraData": "", - "nonce": "32dda5b67edca2f202244d6ca2292cd11611545cd66ce2caa1cffbb3de41e10e" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "5c6b0202efdde8e744aa862330302224ece3d1e0d49f4e6253186d728122f51e" - }, { - "header": { - "parentHash": "e5a7dd6869e520b2593888fca1ac347468388b72ffd5a661249dfc0cf307d32a", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "ca88d8a06020473dd34be02d62688c7e891133c0", - "stateRoot": "07ade1abf59e350811923db810a79249ff5e96013ec917dcc66d487d200bd915", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "020601", - "number": "10", - "gasLimit": "0f05a1", - "gasUsed": "", - "timestamp": "54e9b102", - "extraData": "", - "nonce": "4ab10f4a85fcb51ec8d298a2ebdfb2154b5872cadbddc0dd25041561f963dea8" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "512d65776af768a03954e05530998d1103d36a4a8a706a5fea8db0d8e8cc39c7" - }, { - "header": { - "parentHash": "8f5de8a2256485c40e639c59c80d27ec2751cd796e46ea100fa04e48af4382f8", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "ca88d8a06020473dd34be02d62688c7e891133c0", - "stateRoot": "c5ca7b683fc860f9471e08b139aac320858544fe9be95360a0561d4e5760993c", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "020580", - "number": "0f", - "gasLimit": "0f0964", - "gasUsed": "", - "timestamp": "54e9b100", - "extraData": "", - "nonce": "a37729b5ec5beb84f45c48a68f4686629f8368a7ef4d9630805de6b046a6add6" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "e5a7dd6869e520b2593888fca1ac347468388b72ffd5a661249dfc0cf307d32a" - }, { - "header": { - "parentHash": "f68a2b928ccae5484cdb6e864e9cdc134b6eb07dfbd1c67b00485ba3816bce2f", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "ca88d8a06020473dd34be02d62688c7e891133c0", - "stateRoot": "d87b954b5256f1d6cd283e20b6165b9d44e85b03000682e16b2948dd498de5c3", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0204ff", - "number": "0e", - "gasLimit": "0f0d28", - "gasUsed": "", - "timestamp": "54e9b0ff", - "extraData": "", - "nonce": "d240a448fd513012e1a790fb4d6abbb38971d9fdda144208e4bf28634604671d" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "8f5de8a2256485c40e639c59c80d27ec2751cd796e46ea100fa04e48af4382f8" - }, { - "header": { - "parentHash": "d4cdf0cd535b9886e6d0215858427f734b9969b6237e8c7090d7769c136e6e77", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "ca88d8a06020473dd34be02d62688c7e891133c0", - "stateRoot": "b045425f3cb828d9c8e9345cae9994a472b64e10223cd86dc29b0e0492cf9ec9", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "02047e", - "number": "0d", - "gasLimit": "0f10ed", - "gasUsed": "", - "timestamp": "54e9b0fe", - "extraData": "", - "nonce": "59525245fb1306dda1a58349b3403c9daa3b9a4975c12559f716a8502f2f44d8" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "f68a2b928ccae5484cdb6e864e9cdc134b6eb07dfbd1c67b00485ba3816bce2f" - }, { - "header": { - "parentHash": "a752d24894c7c718d5488e1b77566fdae08b6085e0913299c8824e85be574691", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "ca88d8a06020473dd34be02d62688c7e891133c0", - "stateRoot": "668218908bcb93e6c4da1846e66e86bf3eaf7d5466ebfad77773a71b3b4dffff", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0203fe", - "number": "0c", - "gasLimit": "0f14b3", - "gasUsed": "", - "timestamp": "54e9b0fb", - "extraData": "", - "nonce": "0468221d2e51e35eae74f5a327b8b20ec051eaefdc527cdbc7fa873d7e5fb55b" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "d4cdf0cd535b9886e6d0215858427f734b9969b6237e8c7090d7769c136e6e77" - }, { - "header": { - "parentHash": "f29eb66f6642a2e8f9ba4d0e3f57bc6840e4d2a46440e3dac5542e64182095b7", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "ca88d8a06020473dd34be02d62688c7e891133c0", - "stateRoot": "3e6d4456ee291b181704e0597f9932a3d4e1328ed955533db6b3b01a1df3a6a5", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "02037e", - "number": "0b", - "gasLimit": "0f187a", - "gasUsed": "", - "timestamp": "54e9b0f8", - "extraData": "", - "nonce": "a2be3d3068a3e0ffab112f026847117bf9326a95546ad11e6c4bde3b894991e3" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "a752d24894c7c718d5488e1b77566fdae08b6085e0913299c8824e85be574691" - }, { - "header": { - "parentHash": "77c888a706f4fdddc79907ccdf82653cb33e239b8726d65282907429e38c4992", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "ca88d8a06020473dd34be02d62688c7e891133c0", - "stateRoot": "94c6025f7fcff1313d3fc03d616217d37b8d88f6265e35597b478ad5c63c6d54", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0202fe", - "number": "0a", - "gasLimit": "0f1c42", - "gasUsed": "", - "timestamp": "54e9b0f7", - "extraData": "", - "nonce": "e5a095d1a14270b70e0aeab43b63142284aa6b64b383f51cbaf329baf4905aa3" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "f29eb66f6642a2e8f9ba4d0e3f57bc6840e4d2a46440e3dac5542e64182095b7" - }, { - "header": { - "parentHash": "850acdcc6b0e1694752f33643b0d7a6a5b5fa94b9701b5cf147075cd49d98de2", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "ca88d8a06020473dd34be02d62688c7e891133c0", - "stateRoot": "3eabcf6f3817931c45e77c41df252b7bc975b92ab9d6be805377f69bcfe72b41", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "02027e", - "number": "09", - "gasLimit": "0f200b", - "gasUsed": "", - "timestamp": "54e9b0f5", - "extraData": "", - "nonce": "634a1dfe569dbeeb6dd587747303b6e70ccc2e40ca9fde243982414798f3e548" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "77c888a706f4fdddc79907ccdf82653cb33e239b8726d65282907429e38c4992" - }, { - "header": { - "parentHash": "f6ead5457d182d8d242b5f245eebf3653cd19c7f0236519172ab401f00dd3cef", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "ca88d8a06020473dd34be02d62688c7e891133c0", - "stateRoot": "cdd40fb5f3df32caf2b38959c52789e7c2c5bbc84875fd9ebada901a2019cd7f", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0201fe", - "number": "08", - "gasLimit": "0f23d4", - "gasUsed": "", - "timestamp": "54e9b0f4", - "extraData": "", - "nonce": "3e9cb1c0b0c2c8bbc5366a9852ce0f874cc3bb11e71ad4fb12a04175e5f83433" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "850acdcc6b0e1694752f33643b0d7a6a5b5fa94b9701b5cf147075cd49d98de2" - }, { - "header": { - "parentHash": "c1574000aa9edb42edcbaea775907d2bcb47b6322fac291c3e304fcade2bfc95", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "ca88d8a06020473dd34be02d62688c7e891133c0", - "stateRoot": "0d8d85079967ef6fc92c9c8504a7c6d41ec7b82c75f7e13005f853c5ecec165f", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "02017e", - "number": "07", - "gasLimit": "0f279e", - "gasUsed": "", - "timestamp": "54e9b0f2", - "extraData": "", - "nonce": "e12bc8519a5f3c836e97eb116cad688b185e2e30b4e38397c8c9c01a2a878be7" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "f6ead5457d182d8d242b5f245eebf3653cd19c7f0236519172ab401f00dd3cef" - }, { - "header": { - "parentHash": "285d614571ec06a160748efc721dade5ddd12aaba725a44d40f830bb2c31dd73", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "ca88d8a06020473dd34be02d62688c7e891133c0", - "stateRoot": "e3cdb5680bfe6c6ec669a12a0e75fb734b0921715b37a374c879ff9b64515b67", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "0200fe", - "number": "06", - "gasLimit": "0f2b69", - "gasUsed": "", - "timestamp": "54e9b0ef", - "extraData": "", - "nonce": "c6d2be434b84c331a80129ece58b5bcc26b3d1a8c88b03ff4856222a8ce0755a" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "c1574000aa9edb42edcbaea775907d2bcb47b6322fac291c3e304fcade2bfc95" - }, { - "header": { - "parentHash": "25dde3cae308f67e1dd50d69d41887a8f4879c01a940a3379985e40269b0418b", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "ca88d8a06020473dd34be02d62688c7e891133c0", - "stateRoot": "fdf0372bc339540a155dadcac082027ced4e1e583f94d4b3837849f1bb6ed127", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "02007e", - "number": "05", - "gasLimit": "0f2f35", - "gasUsed": "", - "timestamp": "54e9b0ee", - "extraData": "", - "nonce": "d31fb87ec89caf9e7b66c9db8c700faa645ac6eaeb56a926c0e5dc4992289a41" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "285d614571ec06a160748efc721dade5ddd12aaba725a44d40f830bb2c31dd73" - }, { - "header": { - "parentHash": "278cce88acf613ff474296dfe0c6a3cdc1d004ba6c042f23987e7aabfcb8d2f9", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "ca88d8a06020473dd34be02d62688c7e891133c0", - "stateRoot": "cd92387b3fdc64d8de8d2d3e30421874f80993a4e801ca48d20531b408810000", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "01ffff", - "number": "04", - "gasLimit": "0f3302", - "gasUsed": "", - "timestamp": "54e9b0ea", - "extraData": "", - "nonce": "716e94452609a259aa964e719aa16e86b9a2fc34012861b7348c7dfd354d9682" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "25dde3cae308f67e1dd50d69d41887a8f4879c01a940a3379985e40269b0418b" - }, { - "header": { - "parentHash": "ffaed89c4a14511ada3d88e046f879a2342ed23d6a75547bc7c3c761179b1eb5", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "ca88d8a06020473dd34be02d62688c7e891133c0", - "stateRoot": "6b886bc05041920a3fdc98751df59bae3186767a04020e44b4f90d6d01930277", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "01ff80", - "number": "03", - "gasLimit": "0f36d0", - "gasUsed": "", - "timestamp": "54e9b0e9", - "extraData": "", - "nonce": "025695e9afe2bd799808dc02ffb084ecdf2973f73fa2c51742e9cab59db1a0cf" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "278cce88acf613ff474296dfe0c6a3cdc1d004ba6c042f23987e7aabfcb8d2f9" - }, { - "header": { - "parentHash": "516dccada94c7dd9936747c6819be3d28f9e91a46f18aada525d036ef09867be", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "ca88d8a06020473dd34be02d62688c7e891133c0", - "stateRoot": "f16124aca07d0b8c2af084eac551a9eee12f5244fc9bbc686373d3b1fe69ff9f", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "01ff01", - "number": "02", - "gasLimit": "0f3a9f", - "gasUsed": "", - "timestamp": "54e9b0e7", - "extraData": "", - "nonce": "802332c62bfb912f72f4424cd24faa08146a183a1902a126dd889a6b068dbe72" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "ffaed89c4a14511ada3d88e046f879a2342ed23d6a75547bc7c3c761179b1eb5" - }, { - "header": { - "parentHash": "32d9162f861a01bc8274e70b3cdb9d688fd7d8566f2f8c25cf1a882f244081c4", - "uncleHash": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "coinbase": "ca88d8a06020473dd34be02d62688c7e891133c0", - "stateRoot": "df6e5bdfabb7cbe94a785064093e1b9d4202eddfb40a1e3bbffe82d953968c0e", - "transactionsTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "receiptTrie": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "difficulty": "01ff80", - "number": "01", - "gasLimit": "0f3e6f", - "gasUsed": "", - "timestamp": "54e9adc1", - "extraData": "", - "nonce": "e981144a7fe1d90bf9efbd037174f5642b7fac214550b3eda788ca9a0a007ef8" - }, - "transactions": [], - "uncleHeaders": [], - "hash": "516dccada94c7dd9936747c6819be3d28f9e91a46f18aada525d036ef09867be" - }] -} diff --git a/tests/files/BlockTests/bcBruncleTest.json b/tests/files/BlockchainTests/bcBruncleTest.json similarity index 100% rename from tests/files/BlockTests/bcBruncleTest.json rename to tests/files/BlockchainTests/bcBruncleTest.json diff --git a/tests/files/BlockTests/bcForkBlockTest.json b/tests/files/BlockchainTests/bcForkBlockTest.json similarity index 91% rename from tests/files/BlockTests/bcForkBlockTest.json rename to tests/files/BlockchainTests/bcForkBlockTest.json index 304ac236d..f2e241389 100644 --- a/tests/files/BlockTests/bcForkBlockTest.json +++ b/tests/files/BlockchainTests/bcForkBlockTest.json @@ -8,18 +8,18 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "e6b9733f0b922036b3ba8de0e077c160b553fef8935f5a0f1d8dd46325b26733", "mixHash" : "79a516ea16b8b0071c9a83c89ebfd96d29e614f1bd519f733ea82cb76287ca6c", "nonce" : "3c37bc117e5135d8", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, @@ -27,25 +27,25 @@ "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a079a516ea16b8b0071c9a83c89ebfd96d29e614f1bd519f733ea82cb76287ca6c883c37bc117e5135d8c0c0", "postState" : { "8888f1f195afa192cfee860698584c030f4c9db1" : { - "balance" : "1500000000000000000", + "balance" : "0x14d1120d7b160000", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -61,18 +61,18 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "55e75bec293d5d5f38213bded3d27435ca91cee285c1f76a658ddccdccd08d00", "mixHash" : "2afb8dc82d0d45cce72967ed9c00892fb808bb92e9ff22fe1c51a6b842c783e5", "nonce" : "f9d04b2fcc151a74", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, @@ -80,14 +80,14 @@ "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a02afb8dc82d0d45cce72967ed9c00892fb808bb92e9ff22fe1c51a6b842c783e588f9d04b2fcc151a74c0c0", "postState" : { "8888f1f195afa192cfee860698584c030f4c9db1" : { - "balance" : "1500000000000000000", + "balance" : "0x14d1120d7b160000", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", "nonce" : "1", "storage" : { @@ -96,9 +96,9 @@ }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -114,18 +114,18 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "fe8971aa67f2b822d705da25733a5915216649b723157e72cde735fdd0bbbfe6", "mixHash" : "e49f57f3c1eec112b86bf41733f03a1d82f402941c11219e250574514627e577", "nonce" : "aa40d3c520d10cc8", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "781413a37d7ceb31dd5e02ed699bb19f875904a6cd46e003a5238121fdef623b", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, @@ -133,39 +133,39 @@ "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0781413a37d7ceb31dd5e02ed699bb19f875904a6cd46e003a5238121fdef623ba056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0e49f57f3c1eec112b86bf41733f03a1d82f402941c11219e250574514627e57788aa40d3c520d10cc8c0c0", "postState" : { "8888f1f195afa192cfee860698584c030f4c9db1" : { - "balance" : "1500000000000000000", + "balance" : "0x14d1120d7b160000", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } }, "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x6012600055", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } }, "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x6012600055", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -181,18 +181,18 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "e58728c5c414ab020e2ea1afc57c6d568d59c15da6e865fba417ffeff4194c63", "mixHash" : "27e9f3fd3617f1c02782709eba97fe7920b03961de1bd88dabc4a8c431facdad", "nonce" : "be030eed4ae24d69", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "5b53ecce92ad44bada5b97cdfc139c770a9d253d4e3c72e925cc1ea11cfe6082", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, @@ -200,23 +200,23 @@ "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a05b53ecce92ad44bada5b97cdfc139c770a9d253d4e3c72e925cc1ea11cfe6082a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a027e9f3fd3617f1c02782709eba97fe7920b03961de1bd88dabc4a8c431facdad88be030eed4ae24d69c0c0", "postState" : { "8888f1f195afa192cfee860698584c030f4c9db1" : { - "balance" : "1500000000000000000", + "balance" : "0x14d1120d7b160000", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", "nonce" : "1", "storage" : { } }, "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x6032600055", - "nonce" : "0", + "nonce" : "0x00", "storage" : { "0x" : "0x12" } @@ -224,16 +224,16 @@ }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } }, "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x6032600055", - "nonce" : "0", + "nonce" : "0x00", "storage" : { "0x" : "0x12" } @@ -250,18 +250,18 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "b3eb70baa54ac60fb26770e2bd62108db9f2e189375660af7f47ef276f520551", "mixHash" : "99d5457ad6de954e86e0c80f56ca1fbc81c692766cd2206d2038b1880f98ff38", "nonce" : "99f1656c715f2fa8", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "309e578cb5523a22eb5b4580ae2faa53906d5637f6fd9fd171211ef3c503a5e6", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, @@ -269,23 +269,23 @@ "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0309e578cb5523a22eb5b4580ae2faa53906d5637f6fd9fd171211ef3c503a5e6a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a099d5457ad6de954e86e0c80f56ca1fbc81c692766cd2206d2038b1880f98ff388899f1656c715f2fa8c0c0", "postState" : { "8888f1f195afa192cfee860698584c030f4c9db1" : { - "balance" : "1500000000000000000", + "balance" : "0x14d1120d7b160000", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", "nonce" : "1", "storage" : { } }, "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x60006000556000600155600060025560006003556000600455", - "nonce" : "0", + "nonce" : "0x00", "storage" : { "0x" : "0x12", "0x01" : "0x12", @@ -297,16 +297,16 @@ }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } }, "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x60006000556000600155600060025560006003556000600455", - "nonce" : "0", + "nonce" : "0x00", "storage" : { "0x" : "0x12", "0x01" : "0x12", @@ -318,3 +318,4 @@ } } } + diff --git a/tests/files/BlockTests/bcGasPricerTest.json b/tests/files/BlockchainTests/bcGasPricerTest.json similarity index 100% rename from tests/files/BlockTests/bcGasPricerTest.json rename to tests/files/BlockchainTests/bcGasPricerTest.json diff --git a/tests/files/BlockTests/bcInvalidHeaderTest.json b/tests/files/BlockchainTests/bcInvalidHeaderTest.json similarity index 76% rename from tests/files/BlockTests/bcInvalidHeaderTest.json rename to tests/files/BlockchainTests/bcInvalidHeaderTest.json index e74840d47..036356164 100644 --- a/tests/files/BlockTests/bcInvalidHeaderTest.json +++ b/tests/files/BlockchainTests/bcInvalidHeaderTest.json @@ -2,7 +2,7 @@ "DifferentExtraData1025" : { "blocks" : [ { - "rlp" : "0xf90665f905fca0801e9dfc2d12f33d8372ee4192bb02e65f4af5a870745aed2910a6ab4e115cd2a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b3afc95220fb6e2df7fca71206d36e81b458ecfaff6c18b1c3414d30ad6b64efa0bd320f0acf90f5a246c237637f11ef21b05d76fdd9f647f9c3267bb34a743de7a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fefd882560b84557ff4c0b904010101020304050607080910111213141516171819202122232410000000000000000000200000000000000000003000000000000000000040000000000000000000500000000000000000006000000000000000000070000000000000000000800000000000000000009000000000000000000010000000000000000000100000000000000000002000000000000000000030000000000000000000400000000000000000005000000000000000000060000000000000000000700000000000000000008000000000000000000090000000000000000000100000000000000000001000000000000000000020000000000000000000300000000000000000004000000000000000000050000000000000000000600000000000000000007000000000000000000080000000000000000000900000000000000000001000000000000000000010000000000000000000200000000000000000003000000000000000000040000000000000000000500000000000000000006000000000000000000070000000000000000000800000000000000000009000000000000000000010000000000000000000100000000000000000002000000000000000000030000000000000000000400000000000000000005000000000000000000060000000000000000000700000000000000000008000000000000000000090000000000000000000100000000000000000001000000000000000000020000000000000000000300000000000000000004000000000000000000050000000000000000000600000000000000000007000000000000000000080000000000000000000900000000000000000001000000000000000000010000000000000000000200000000000000000003000000000000000000040000000000000000000500000000000000000006000000000000000000070000000000000000000800000000000000000009000000000000000000010000000000000000000100000000000000000002000000000000000000030000000000000000000400000000000000000005000000000000000000060000000000000000000700000000000000000008000000000000000000090000000000000000000100000000000000000001000000000000000000020000000000000000000300000000000000000004000000000000000000050000000000000000000600000000000000000007000000000000000000080000000000000000000900000000000000000001000000000000000000010000000000000000000200000000000000000003000000000000000000040000000000000000000500000000000000000006000000000000000000070000000000000000000800000000000000000009000000000000000000010000000000000000000a0da2d90bff4f835b72117284c8eb34446b9121dba6d14006b2766a579f5f003858869b0977b1699157df863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ca042756f995aaedcbb380ecbf42e8b38249c8918ba0b0950ee997570a390f111b4a0f731d1b73239601cd56f1b1d0c6e13343e029f89737e3fcecbf0b12a85f5f62dc0" + "rlp" : "0xf90665f905fca0f2df82c592edbf4ddacb42b96856641484e1dc7e569ad5a4faf7d80e283c95daa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b3afc95220fb6e2df7fca71206d36e81b458ecfaff6c18b1c3414d30ad6b64efa0f7de2b8f7bde12fac856bd9aed6edabb998a2d215a684f18840d67ef81ae87c0a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fefd882560b8455800847b904010101020304050607080910111213141516171819202122232410000000000000000000200000000000000000003000000000000000000040000000000000000000500000000000000000006000000000000000000070000000000000000000800000000000000000009000000000000000000010000000000000000000100000000000000000002000000000000000000030000000000000000000400000000000000000005000000000000000000060000000000000000000700000000000000000008000000000000000000090000000000000000000100000000000000000001000000000000000000020000000000000000000300000000000000000004000000000000000000050000000000000000000600000000000000000007000000000000000000080000000000000000000900000000000000000001000000000000000000010000000000000000000200000000000000000003000000000000000000040000000000000000000500000000000000000006000000000000000000070000000000000000000800000000000000000009000000000000000000010000000000000000000100000000000000000002000000000000000000030000000000000000000400000000000000000005000000000000000000060000000000000000000700000000000000000008000000000000000000090000000000000000000100000000000000000001000000000000000000020000000000000000000300000000000000000004000000000000000000050000000000000000000600000000000000000007000000000000000000080000000000000000000900000000000000000001000000000000000000010000000000000000000200000000000000000003000000000000000000040000000000000000000500000000000000000006000000000000000000070000000000000000000800000000000000000009000000000000000000010000000000000000000100000000000000000002000000000000000000030000000000000000000400000000000000000005000000000000000000060000000000000000000700000000000000000008000000000000000000090000000000000000000100000000000000000001000000000000000000020000000000000000000300000000000000000004000000000000000000050000000000000000000600000000000000000007000000000000000000080000000000000000000900000000000000000001000000000000000000010000000000000000000200000000000000000003000000000000000000040000000000000000000500000000000000000006000000000000000000070000000000000000000800000000000000000009000000000000000000010000000000000000000a033640cb9a11598e0fadce2c87f9f5f7d230a773f037ae74ea20a8b6a8e7c5ecc8872d6fe13f2b7e84af863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ca0d8ea4f45bc954612046851fb2500fa493e03fe16b69cc3f255983778c6943a4aa0236ec6196ca23ace9377bc8d21abb8d51adc96f82fc9397384249a72c43ee4dac0" } ], "genesisBlockHeader" : { @@ -12,9 +12,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "801e9dfc2d12f33d8372ee4192bb02e65f4af5a870745aed2910a6ab4e115cd2", - "mixHash" : "ca735c79245c5304ec6d8a6b02db4c6c7993b49a9f782efd6210034a42beb8c1", - "nonce" : "2ae839b01a3709f9", + "hash" : "f2df82c592edbf4ddacb42b96856641484e1dc7e569ad5a4faf7d80e283c95da", + "mixHash" : "3fa47be9efa6aec036f21237f44475a82f0f3e36fa841284e50dd2b785cd8eda", + "nonce" : "7658452a151e0c18", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -23,8 +23,67 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0ca735c79245c5304ec6d8a6b02db4c6c7993b49a9f782efd6210034a42beb8c1882ae839b01a3709f9c0c0", - "lastblockhash" : "801e9dfc2d12f33d8372ee4192bb02e65f4af5a870745aed2910a6ab4e115cd2", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a03fa47be9efa6aec036f21237f44475a82f0f3e36fa841284e50dd2b785cd8eda887658452a151e0c18c0c0", + "lastblockhash" : "f2df82c592edbf4ddacb42b96856641484e1dc7e569ad5a4faf7d80e283c95da", + "postState" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "0x64", + "code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600052600060206000a1", + "nonce" : "0x00", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x174876e800", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + } + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "0x64", + "code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600052600060206000a1", + "nonce" : "0x00", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x174876e800", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + } + } + }, + "DifficultyIsZero" : { + "blocks" : [ + { + "rlp" : "0xf9025ff901f6a04efc2b6b144b10f2b2135c366987d6cb555dd0fead6fd882473ab147322b1dd4a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b3afc95220fb6e2df7fca71206d36e81b458ecfaff6c18b1c3414d30ad6b64efa0e9182d73ae54a19133317d6d9e79cb553a808ea77a011e9c96dd0103ad694382a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008001832fefd882560b845580084980a05bc208495337a5f0cb8b9b46ea8f913b1524e9b7d2ef75bb6d9fa95bae112a498896b338dc74a778c6f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ca00a14e437cc02b72178261f95942743b6973cb0a0710af72b4d3d0672d45ba5f9a05ea4e42817b98f870cea2a735aa9a777134d139284c4241dd262b79faccbde5ec0" + } + ], + "genesisBlockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "0x020000", + "extraData" : "0x42", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", + "hash" : "4efc2b6b144b10f2b2135c366987d6cb555dd0fead6fd882473ab147322b1dd4", + "mixHash" : "bcbaf3f0c8118e37456bb28cd013e88d8dc2dfbacac80b56d367561f262229d8", + "nonce" : "5793175f47637584", + "number" : "0x00", + "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", + "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056", + "timestamp" : "0x54c98c81", + "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0bcbaf3f0c8118e37456bb28cd013e88d8dc2dfbacac80b56d367561f262229d8885793175f47637584c0c0", + "lastblockhash" : "4efc2b6b144b10f2b2135c366987d6cb555dd0fead6fd882473ab147322b1dd4", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x64", @@ -61,7 +120,7 @@ "GasLimitIsZero" : { "blocks" : [ { - "rlp" : "0xf9025ff901f6a0294fb6f9125c5926ab028dac7c344ee39ade18aee1a188c817c391f1897a2655a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b3afc95220fb6e2df7fca71206d36e81b458ecfaff6c18b1c3414d30ad6b64efa0c93866bffee7bcec3910a365091aff84edd9e8a621a121898a4901c9c146e538a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b901000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000004000000000000000000000000000000000000000000000000000000083020000018082560b84557ff4c380a0a5782206a67c90a7fa20b54ab6afb246956bef23482a39c8eac9abe90b1103b4883cd9dcee62bb1ed9f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0a4043e901d565fe6f80663e0a7b109d7d3c5d41d1ad0c584713a592adab2ef8fa04dde69b415e3bd757aca11b3ff9b62fbd0139b6b1168d23d832622ce68053bfcc0" + "rlp" : "0xf9025ff901f6a06117295771e58087b01113f0713e61b69cf3d3aca70ad65a6a68009c5b3027dda01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b3afc95220fb6e2df7fca71206d36e81b458ecfaff6c18b1c3414d30ad6b64efa0d64fc98b44a9b4f15353ad30793d2c129ee30f0d30c02de4cd24a6ccbd45c9afa05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b901000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000004000000000000000000000000000000000000000000000000000000083020000018082560b845580084c80a0c3b39b50f343269b63e34c0ba6499f5c8857cc40b81314553d51ec9334cc62f088abbdbd9520846324f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0889eac0ecc0e3b7a77b82d16af0223437b94c5c777f480d322b790b62d77bbcda080ba813d53d5c867ebf7bf9389ff59c157372c6da24909b80e7660f7e5f0f725c0" } ], "genesisBlockHeader" : { @@ -71,9 +130,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "294fb6f9125c5926ab028dac7c344ee39ade18aee1a188c817c391f1897a2655", - "mixHash" : "a9d33ca61587dc9d28c0860a4f5d6a78c82e29b2207c570a886a6668a2f16c88", - "nonce" : "d475b1cdd15c16cd", + "hash" : "6117295771e58087b01113f0713e61b69cf3d3aca70ad65a6a68009c5b3027dd", + "mixHash" : "564c77bd01aff933da09b1f5df3924af34f6c7321cdb2a7271bc18f0e820ec9d", + "nonce" : "c853e269579f97f4", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -82,8 +141,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0a9d33ca61587dc9d28c0860a4f5d6a78c82e29b2207c570a886a6668a2f16c8888d475b1cdd15c16cdc0c0", - "lastblockhash" : "294fb6f9125c5926ab028dac7c344ee39ade18aee1a188c817c391f1897a2655", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0564c77bd01aff933da09b1f5df3924af34f6c7321cdb2a7271bc18f0e820ec9d88c853e269579f97f4c0c0", + "lastblockhash" : "6117295771e58087b01113f0713e61b69cf3d3aca70ad65a6a68009c5b3027dd", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x64", @@ -120,7 +179,7 @@ "log1_wrongBlockNumber" : { "blocks" : [ { - "rlp" : "0xf90262f901f9a0620e681cb4df774ab54c0232376b909199e24b42ff5c84507fe8b08ff43b09e2a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b3afc95220fb6e2df7fca71206d36e81b458ecfaff6c18b1c3414d30ad6b64efa0dd1cea4016b2072a0c5f4e3c7d734fc8607d223db9a96b6a3e0d490334e29af9a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000002832fefd882560b84557ff4c680a0b8f5d358696f4f8f6dc7b305b235ef1f19cbf1900c6edfa060e99279419055bb88a587b355bfe6e26ff863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ca07b27f8b769a18c5e45961c6f058c68317703391b92b490e12dcade6a8b7bcb63a0c13691e75e2fdc8a7bf12cab717d8a735201e6cde67c879bea240005d930026fc0" + "rlp" : "0xf90262f901f9a02dcf0ccb6e901540cf88deda20f5bd15aa949b44da371ab64f1880517dabf9e1a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b3afc95220fb6e2df7fca71206d36e81b458ecfaff6c18b1c3414d30ad6b64efa066be40d9d0d16a4cc61763a7b1cc38eb239cc5e7c170b15af22cc4a0bb7f10ada05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000002832fefd882560b845580085080a05166bbfcc4cf9b9e345a11a0e7168f69bf1f43574a0f324dda36c6e3a4106b0c88ebd598f84d5177fff863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba03c651b4a8a56701d07a51225f454c6dc23a40e46c6d153434fb0fafc3e51982ca07f14fbb8b155fa6342ca60f6eb5a510a88b311e58bee5e76b7c69972b139af8cc0" } ], "genesisBlockHeader" : { @@ -130,9 +189,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "620e681cb4df774ab54c0232376b909199e24b42ff5c84507fe8b08ff43b09e2", - "mixHash" : "86f621add0bb4a000fb726f614f83287fbe63e9584195d87ad7b245a8b756a72", - "nonce" : "b80c084b56a750fa", + "hash" : "2dcf0ccb6e901540cf88deda20f5bd15aa949b44da371ab64f1880517dabf9e1", + "mixHash" : "bda860a39cc929d3d39fb0c2e15725ad61ea2cbbb3efed8cc7b4bb8b401040cc", + "nonce" : "e21965d1308a6c9b", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -141,8 +200,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a086f621add0bb4a000fb726f614f83287fbe63e9584195d87ad7b245a8b756a7288b80c084b56a750fac0c0", - "lastblockhash" : "620e681cb4df774ab54c0232376b909199e24b42ff5c84507fe8b08ff43b09e2", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0bda860a39cc929d3d39fb0c2e15725ad61ea2cbbb3efed8cc7b4bb8b401040cc88e21965d1308a6c9bc0c0", + "lastblockhash" : "2dcf0ccb6e901540cf88deda20f5bd15aa949b44da371ab64f1880517dabf9e1", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x64", @@ -179,7 +238,7 @@ "log1_wrongBloom" : { "blocks" : [ { - "rlp" : "0xf90262f901f9a061816f6181fedda93826656e70683c8bfbb3acd4b00964bc65b4835c7f1ae41da01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b3afc95220fb6e2df7fca71206d36e81b458ecfaff6c18b1c3414d30ad6b64efa098535fe3c1eb69c7d218780e728f89d3b3e2c76d20953c1242e4bca37a778360a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882560b84557ff4ca80a0b41717f2daecff0cd492e10d411be5214dc30b7b1fd99e69e39002d552802c75880bbc6ced3ce651a9f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba08d0c6e6b1db2f976c0167887f418dfaaa317fb3268dbef25a56c67d6b8aca7b3a02775f6b29f3057b451b069b09281e79591e247f88d068d202e5ce5364217dda1c0" + "rlp" : "0xf90262f901f9a0cc5bc79a736ec0ad1699dd73ab77112734de1ea792157e91ce9935b83bc21deaa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b3afc95220fb6e2df7fca71206d36e81b458ecfaff6c18b1c3414d30ad6b64efa07476267ff3457850f6d613f8b92a9ae957cfd67193fb264fc1f4267a63eace0ca05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd882560b845580085480a02397352bac153f3ca8d05efd1a89739eceee838a3b4731a1d71e1c46a0b37cf488c692af15dcf799a5f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ca08a2c157de4eac26537d0be0376b21fe1b0d698b94ce240f6b3e95ad72e97797fa0dca636858489f5ba346bb8672b4022cf10b29d3d33bcbc09fdcfd536a9a12050c0" } ], "genesisBlockHeader" : { @@ -189,9 +248,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "61816f6181fedda93826656e70683c8bfbb3acd4b00964bc65b4835c7f1ae41d", - "mixHash" : "fd7c4c44729ca29af51db4c3cefaabd8ae09899ae8c7a77413e941062fb90792", - "nonce" : "5633654b840d2d49", + "hash" : "cc5bc79a736ec0ad1699dd73ab77112734de1ea792157e91ce9935b83bc21dea", + "mixHash" : "1f1dddbe4d3a8b309dadf982b448a1cfe5e4b46348d22f66e31ae87144c56e59", + "nonce" : "8fda695e58f532d2", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -200,8 +259,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0fd7c4c44729ca29af51db4c3cefaabd8ae09899ae8c7a77413e941062fb90792885633654b840d2d49c0c0", - "lastblockhash" : "61816f6181fedda93826656e70683c8bfbb3acd4b00964bc65b4835c7f1ae41d", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a01f1dddbe4d3a8b309dadf982b448a1cfe5e4b46348d22f66e31ae87144c56e59888fda695e58f532d2c0c0", + "lastblockhash" : "cc5bc79a736ec0ad1699dd73ab77112734de1ea792157e91ce9935b83bc21dea", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x64", @@ -238,7 +297,7 @@ "wrongCoinbase" : { "blocks" : [ { - "rlp" : "0xf90262f901f9a0203d78c55325b7d2b33def1e65799b3e8a697bd2d38be07912d89c521d0a831ba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347949888f1f195afa192cfee860698584c030f4c9db1a0b3afc95220fb6e2df7fca71206d36e81b458ecfaff6c18b1c3414d30ad6b64efa0ee1f71f8612a1a0dc36d8c318576c4d5dca3f67c1a1111e06874a7187a75e273a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fefd882560b84557ff4cc80a02871566a90428b72b54900bbed49a3b42bcc5f6ff4bc135d63550ad3638b110488ceb940b576899ec8f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0c39dfc246695c6d84a7c59b5bee73c249507d1ce8c35b1473bf70366225a8212a038bf288841a713102009c8d4ff66bf8e5463c503e3995b21366e1cd078eef248c0" + "rlp" : "0xf90262f901f9a00a70aa945840114b42bbb5e6836109dfb646121aa595f99b2dcd07a18e6b5e00a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347949888f1f195afa192cfee860698584c030f4c9db1a0b3afc95220fb6e2df7fca71206d36e81b458ecfaff6c18b1c3414d30ad6b64efa071f875b55a0693e1eaa279b770a61d95422685ffec4f75d3f03cfa43a85dc16ea05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fefd882560b845580085680a022c207a0b02d52f36880b90ba5d86a36c52264eb5b396b59ff9574a51e21d5c988a0641e41838c1ce2f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba05586d876cea5773348816f58a1c8448120fa1aaea0230ffaf3b44380fe49cccaa0ef768dcab00378ee77791711b35f4470a632ef9e9a3c4b73fc2ec1094677c1b8c0" } ], "genesisBlockHeader" : { @@ -248,9 +307,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "203d78c55325b7d2b33def1e65799b3e8a697bd2d38be07912d89c521d0a831b", - "mixHash" : "1bc0f803c19f1a996cbed7db7cd04bc061de6a1078dd25fbdadbf2eb051f518a", - "nonce" : "18c615f04cd1a057", + "hash" : "0a70aa945840114b42bbb5e6836109dfb646121aa595f99b2dcd07a18e6b5e00", + "mixHash" : "9a0df7f98f85563c59f10cb9963770bebd6b14191db7a2270eb556b72bbbf3c2", + "nonce" : "883b6eb4ef09a367", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -259,8 +318,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a01bc0f803c19f1a996cbed7db7cd04bc061de6a1078dd25fbdadbf2eb051f518a8818c615f04cd1a057c0c0", - "lastblockhash" : "203d78c55325b7d2b33def1e65799b3e8a697bd2d38be07912d89c521d0a831b", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a09a0df7f98f85563c59f10cb9963770bebd6b14191db7a2270eb556b72bbbf3c288883b6eb4ef09a367c0c0", + "lastblockhash" : "0a70aa945840114b42bbb5e6836109dfb646121aa595f99b2dcd07a18e6b5e00", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x64", @@ -297,7 +356,7 @@ "wrongDifficulty" : { "blocks" : [ { - "rlp" : "0xf90261f901f8a0e26518455a4d9989da691c2ace65c758795e586c24f085a55c3d81c14e142a7ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b3afc95220fb6e2df7fca71206d36e81b458ecfaff6c18b1c3414d30ad6b64efa0a3367304ab7d594d34e0983ee5152d44c77a9018d38ef582c33f3b3beca3505ea05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b901000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000004000000000000000000000000000000000000000000000000000000082271001832fefd882560b84557ff4cf80a0e73f7cc84d40e67259477ba9bf046e746bc83c7d9d648533ab249c2f8247313288ef74b1391e6bea87f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ca0094bd4e29d134267f5d5f040601a8520225990a22c69aad1a27fe45861fcaf96a0afe5fc4870e4b6e5d82dd3e4939291097d858c1223314e05eda817169641483fc0" + "rlp" : "0xf90261f901f8a09607334834720d2868bbf844718a3251e1402d1c309306b67bd49d3f6f3a9b2ea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b3afc95220fb6e2df7fca71206d36e81b458ecfaff6c18b1c3414d30ad6b64efa060d31ad940b25fa51ab3af787be6196620709c19dbc485ac05ab1b698da453cea05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b901000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000004000000000000000000000000000000000000000000000000000000082271001832fefd882560b845580085980a0576a6142032d0a0b1baf0e485659834bead8fb3041f9b8d1c4140646af5b11428829dbc563ef0fa59df863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ca004897eeb8b02f06c7c621be84da533459238edcfa2e11aa97f5f4f2bd0261065a0694b87b243818d6eea8e12efe8e5d4d78860e5c8b0a052ffa9e5e1af88badbd5c0" } ], "genesisBlockHeader" : { @@ -307,9 +366,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "e26518455a4d9989da691c2ace65c758795e586c24f085a55c3d81c14e142a7c", - "mixHash" : "39a07d831e0d27a8b433d2cefba7992a4bc10d1b8cc44d9dde945c7cddb2f170", - "nonce" : "d2fbfc19d43f1e0f", + "hash" : "9607334834720d2868bbf844718a3251e1402d1c309306b67bd49d3f6f3a9b2e", + "mixHash" : "ab34ab179ac18c54cc4472bc3f82563ced95db14a0f86a85f5a229c842804b32", + "nonce" : "1556220ed8b865ef", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -318,8 +377,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a039a07d831e0d27a8b433d2cefba7992a4bc10d1b8cc44d9dde945c7cddb2f17088d2fbfc19d43f1e0fc0c0", - "lastblockhash" : "e26518455a4d9989da691c2ace65c758795e586c24f085a55c3d81c14e142a7c", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0ab34ab179ac18c54cc4472bc3f82563ced95db14a0f86a85f5a229c842804b32881556220ed8b865efc0c0", + "lastblockhash" : "9607334834720d2868bbf844718a3251e1402d1c309306b67bd49d3f6f3a9b2e", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x64", @@ -356,7 +415,7 @@ "wrongGasLimit" : { "blocks" : [ { - "rlp" : "0xf90262f901f9a0cc1c0a26f21579ac40bbc494604824fc473b6faa3fd3d68edd433fa8f70c932da01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b3afc95220fb6e2df7fca71206d36e81b458ecfaff6c18b1c3414d30ad6b64efa093a856cb300c99471e166d0b11d4a22450987b4bac8c35338c233cedcc67be1da05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001830186a082560b84557ff4d280a053b148958caa66dee6417a154c348297614883976b8c16f03cf5b268b0e893e8888106219c66e62361f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba082e54b7f7d5671d0ee93138b0300f0e807bd115ce3bd1bc99e21925f7bd96e0ba0d0217b852d89ae38d5681c6975ec492f69e4c411c6046a8668f044db2864483ac0" + "rlp" : "0xf90262f901f9a0514147c3b1f629ef4cf60ff39ef538f4c9f5748f5ba8444e41d5d9164875d481a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b3afc95220fb6e2df7fca71206d36e81b458ecfaff6c18b1c3414d30ad6b64efa06d235ce90b45dbba00a431f064796ff58bd66c6ffaddca9c540d4601471164cca05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001830186a082560b845580085c80a087e809fc8d77aaadab95297a6a6933f634b7cbaf6a77d937ae64afc49d7537f888c0744f48abfdf9b2f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ca0403a338b092033ae519eace003746c2a5dbf56f076440fc9151266146ba23e40a0191583f085949b046424f4c2262ecb5df5e64ad7d921e517fd5b7eb59cbc248ac0" } ], "genesisBlockHeader" : { @@ -366,9 +425,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "cc1c0a26f21579ac40bbc494604824fc473b6faa3fd3d68edd433fa8f70c932d", - "mixHash" : "b033eeba6bf1a9d293f067d0d395e1893d2cc788992182bb14bea5f220c7be5a", - "nonce" : "5246583fa42e6da0", + "hash" : "514147c3b1f629ef4cf60ff39ef538f4c9f5748f5ba8444e41d5d9164875d481", + "mixHash" : "466beebb6b34ee6e945b2b3c2714a0962274742600e6d6931873986dd7eef85a", + "nonce" : "c4baed9c9955f8ec", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -377,8 +436,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0b033eeba6bf1a9d293f067d0d395e1893d2cc788992182bb14bea5f220c7be5a885246583fa42e6da0c0c0", - "lastblockhash" : "cc1c0a26f21579ac40bbc494604824fc473b6faa3fd3d68edd433fa8f70c932d", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0466beebb6b34ee6e945b2b3c2714a0962274742600e6d6931873986dd7eef85a88c4baed9c9955f8ecc0c0", + "lastblockhash" : "514147c3b1f629ef4cf60ff39ef538f4c9f5748f5ba8444e41d5d9164875d481", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x64", @@ -415,7 +474,7 @@ "wrongGasUsed" : { "blocks" : [ { - "rlp" : "0xf90260f901f7a0dd8be3fc6598a9c6c9c210a994b2e4e28c75e4f4fca5fe8cf657cd06d9002085a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b3afc95220fb6e2df7fca71206d36e81b458ecfaff6c18b1c3414d30ad6b64efa00a9b78ba07eed41fbc66630ed6b4d01e96231a4a130c4bbb39f272368dc79642a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fefd88084557ff4d580a0b237b0476170afbcde1e949c44c60176dc86a77df0b3ac7a19227e3afe798502884e1ce1bf32090576f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ca0f5ec14a149f51a6507fab88f921df3c51417d98feabfbaacfa3bb39ec75d0ccfa00255304a957f4779c19cc5700b0bd44d80436e52327f97cb9f3b9340942317b7c0" + "rlp" : "0xf90260f901f7a00d76833d6a375f38be538c51f36db8be646549cdfcc7091434cd9368088199f5a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b3afc95220fb6e2df7fca71206d36e81b458ecfaff6c18b1c3414d30ad6b64efa000040f9d47e05d71e7f4fb27bbff396b795dca920b9047db30d682aa0f7ac702a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fefd880845580085f80a071e97bbc34f48a185827fe90b629eb66104828d420000c75ca8322edb09598a58875c311e6572dfd47f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ca0e1667ac0d091aa81081df965cdba35ee56ef8c5f16c477aa713241c200f6b959a053f4084793e3dd38ec7a2fca9e57139a5fa8b8545312587605ad82d3ce134981c0" } ], "genesisBlockHeader" : { @@ -425,9 +484,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "dd8be3fc6598a9c6c9c210a994b2e4e28c75e4f4fca5fe8cf657cd06d9002085", - "mixHash" : "4417af0859b6d2e10793172a151ad1e6a03f34cbd7c2f2cfbb863426925702a7", - "nonce" : "44f1d62f7b9b0a78", + "hash" : "0d76833d6a375f38be538c51f36db8be646549cdfcc7091434cd9368088199f5", + "mixHash" : "123be1d12fec65d2b6e649e2e4b69bbd1e8a2981773810ee264155927ae4a341", + "nonce" : "25d37433409555df", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -436,8 +495,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a04417af0859b6d2e10793172a151ad1e6a03f34cbd7c2f2cfbb863426925702a78844f1d62f7b9b0a78c0c0", - "lastblockhash" : "dd8be3fc6598a9c6c9c210a994b2e4e28c75e4f4fca5fe8cf657cd06d9002085", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0123be1d12fec65d2b6e649e2e4b69bbd1e8a2981773810ee264155927ae4a3418825d37433409555dfc0c0", + "lastblockhash" : "0d76833d6a375f38be538c51f36db8be646549cdfcc7091434cd9368088199f5", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x64", @@ -474,7 +533,7 @@ "wrongMixHash" : { "blocks" : [ { - "rlp" : "0xf90262f901f9a034071a807d83f8e634082378e3c236b5d790c5bb3f6f5e81b857067eb0a8679fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b3afc95220fb6e2df7fca71206d36e81b458ecfaff6c18b1c3414d30ad6b64efa0b7d4d7f8d724567a6837e3872f014100704c2848ad2b1d2a3e0d410b35c81280a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fefd882560b84557ff4d880a0bad81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421889626a46727781363f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba06d7dc3c29c4473543b574413536b608d7afa4c96bbfbbf033473a088e6662ff8a07be035d2fa3e7a2b0c8ac6dea2f53dcde4ebc9020f008057bb90c044e6cfb895c0" + "rlp" : "0xf90262f901f9a095ecab43d8e58e74aba8e41d872b0c737fdd38856ee9b73adba7264ead771b7aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b3afc95220fb6e2df7fca71206d36e81b458ecfaff6c18b1c3414d30ad6b64efa079bcae8f675be0b9c9f42d722b4d1fb1f67db13181831b77d87b09046ecf8dc7a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fefd882560b845580086580a0bad81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b4218802343185552f08baf863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ca00efb9f69c284ce3a9724e4fd02e832c8eb13725e0d82cb1995b7f283ab540668a06345a2c4c23355763de6f7d08176001d86f09fc414962c3aa838b7c3158eec61c0" } ], "genesisBlockHeader" : { @@ -484,9 +543,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "34071a807d83f8e634082378e3c236b5d790c5bb3f6f5e81b857067eb0a8679f", - "mixHash" : "c7f735b359771b6bf60f2aa2e3a32398e9ee3632b1764ea4d825cc3fc2472610", - "nonce" : "68e84fc7fccee640", + "hash" : "95ecab43d8e58e74aba8e41d872b0c737fdd38856ee9b73adba7264ead771b7a", + "mixHash" : "c4a5a1e102f00ee6bbd14cb709393974cf92d582dd87b6107af51b278cf013c1", + "nonce" : "dae383a3bcb463f4", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -495,8 +554,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0c7f735b359771b6bf60f2aa2e3a32398e9ee3632b1764ea4d825cc3fc24726108868e84fc7fccee640c0c0", - "lastblockhash" : "34071a807d83f8e634082378e3c236b5d790c5bb3f6f5e81b857067eb0a8679f", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0c4a5a1e102f00ee6bbd14cb709393974cf92d582dd87b6107af51b278cf013c188dae383a3bcb463f4c0c0", + "lastblockhash" : "95ecab43d8e58e74aba8e41d872b0c737fdd38856ee9b73adba7264ead771b7a", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x64", @@ -533,7 +592,7 @@ "wrongNonce" : { "blocks" : [ { - "rlp" : "0xf90262f901f9a09f8661c236c947e990a8ec6a36826a04116a3b8b538580fb11b4c24c002414aea01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b3afc95220fb6e2df7fca71206d36e81b458ecfaff6c18b1c3414d30ad6b64efa0c0bd2a6e974187ddf5947f6da175d1ba181571fe404596b18566719b1d1f1a10a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fefd882560b84557ff4db80a0d606f0a099a1665471070b58a59e8c010bc0f5e4cdc21bb7a3fd8e019e04ba3e880102030405060708f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ca0e0ac29311ef444214c39a01dda74283660281755b080f736525ead2a44ef43d2a00601b2fd9fde08b0642a0ea65648ede9f90b4d038e8297849cb9546b78d3cd78c0" + "rlp" : "0xf90262f901f9a05a2ab57bc5dc222f521de0d5cc1e49469019f989235f82c475253d5db6656fcca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b3afc95220fb6e2df7fca71206d36e81b458ecfaff6c18b1c3414d30ad6b64efa0665f3db02fa03b0cc1c7fba2fb3f9d2ef4e309de73a966f88207e542f3bd67f0a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fefd882560b845580086980a0f96def921818962e16267c228f3781edb5e5ad80ceeeea042834a4dd1b000421880102030405060708f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ca0e484433ad0626add65420d33579a590e34124b64e530082d759c415d1a23fa8aa032cc56cd8f144496dd351ea847a4108d7bfd191c68b86260efe23e9ed051d6a0c0" } ], "genesisBlockHeader" : { @@ -543,9 +602,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "9f8661c236c947e990a8ec6a36826a04116a3b8b538580fb11b4c24c002414ae", - "mixHash" : "7bba8aacca3f5f41b164a5fe9be14d4423482a8db61567be534fba8487c4542b", - "nonce" : "f9e12735eac5c35e", + "hash" : "5a2ab57bc5dc222f521de0d5cc1e49469019f989235f82c475253d5db6656fcc", + "mixHash" : "862066b5a444f2559cc5140db8bd69b8632afe4fdc83e526716209cb92a4810e", + "nonce" : "ce813f205b1b7559", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -554,8 +613,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a07bba8aacca3f5f41b164a5fe9be14d4423482a8db61567be534fba8487c4542b88f9e12735eac5c35ec0c0", - "lastblockhash" : "9f8661c236c947e990a8ec6a36826a04116a3b8b538580fb11b4c24c002414ae", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0862066b5a444f2559cc5140db8bd69b8632afe4fdc83e526716209cb92a4810e88ce813f205b1b7559c0c0", + "lastblockhash" : "5a2ab57bc5dc222f521de0d5cc1e49469019f989235f82c475253d5db6656fcc", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x64", @@ -592,7 +651,7 @@ "wrongNumber" : { "blocks" : [ { - "rlp" : "0xf90262f901f9a0355330178117d2d83a04982501753442e9cb04e037f7df1f9eca29ddea6666baa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b3afc95220fb6e2df7fca71206d36e81b458ecfaff6c18b1c3414d30ad6b64efa02209b441926c515a6da60653f83b71e448236e1ae5240847b2e316b725521649a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000080832fefd882560b84557ff4dd80a086286d028f067a84fd47ad22b04492dda6ee99fb1e0f84b60e9e12b3b2fd55ec88831fba7fec7ee0d4f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ca0f6e994176cfd1896f4cbf8bf15afa87b3471aa18c5d2fa0ed27a4c5b32ccef49a0d41553c633e2857252a873728f1260c6dfb6c034eb3e16cee7eec2432351d4f8c0" + "rlp" : "0xf90262f901f9a05e4fb1654ae8f9a32c458fb449f596b5d600a669e27f1f0c0fa067ff4598d54fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b3afc95220fb6e2df7fca71206d36e81b458ecfaff6c18b1c3414d30ad6b64efa0425b074e9da4241a68732ae50fa3d3f2acb56b1ca1170f1965ef375e0ec62c54a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000080832fefd882560b845580086c80a04d1f8b361a5f4443143ac2ac27bb53964d4c48462d3fec19e2519f2d1dea0cd3884ea6731f2800324df863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0b7fa143e0d51b1e6d49f56a3325507242b7858c56e79287d91d04686304335e3a091290444af585b3d1a9017e73fb7a372c68c08f69b2c58285df979a82f5b1bd7c0" } ], "genesisBlockHeader" : { @@ -602,9 +661,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "355330178117d2d83a04982501753442e9cb04e037f7df1f9eca29ddea6666ba", - "mixHash" : "7acac5570c7e5c6b105b8c16a3072a5bf79e2dabddda3b732ea1aee2c5ddec63", - "nonce" : "3129a41a4c150512", + "hash" : "5e4fb1654ae8f9a32c458fb449f596b5d600a669e27f1f0c0fa067ff4598d54f", + "mixHash" : "5bcefb1f3e7c5ccaf0d84bc63c907de380ad3c75600f7867c699010026134edc", + "nonce" : "9db829b4cb087473", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -613,8 +672,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a07acac5570c7e5c6b105b8c16a3072a5bf79e2dabddda3b732ea1aee2c5ddec63883129a41a4c150512c0c0", - "lastblockhash" : "355330178117d2d83a04982501753442e9cb04e037f7df1f9eca29ddea6666ba", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a05bcefb1f3e7c5ccaf0d84bc63c907de380ad3c75600f7867c699010026134edc889db829b4cb087473c0c0", + "lastblockhash" : "5e4fb1654ae8f9a32c458fb449f596b5d600a669e27f1f0c0fa067ff4598d54f", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x64", @@ -651,7 +710,7 @@ "wrongParentHash" : { "blocks" : [ { - "rlp" : "0xf90262f901f9a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b3afc95220fb6e2df7fca71206d36e81b458ecfaff6c18b1c3414d30ad6b64efa0e9cfddb76c058b94c8617f5aec0e88b4ab114245e268a33b1a70decfb68bb9f5a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fefd882560b84557ff4e080a07fbef8b98816e481ae842f068d73295123a84bf5f836faa4968233552542fef688c22ccbe4f4fd97d4f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0df47648ebbd41ebb39b9b82a2cfa6221f86848d3cc9325719eedea1cb5e3236ea0a70f89fb9954ae52f9a9823a28c5973fedd07dca3728585524f7ddf36c4a2699c0" + "rlp" : "0xf90262f901f9a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b3afc95220fb6e2df7fca71206d36e81b458ecfaff6c18b1c3414d30ad6b64efa09bcef24279d734ec0f5151448d92728101bbbb71b7c1ba3adce079bf655328a4a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fefd882560b845580086f80a00866e96be83d0237c593eee154fecd6b25aa482efe22b3d88b5b9c3affbc878588ee154394248920a0f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba04f54d5080a085c2a62afd4b98a32d1c2a654c2cb9a08ad77184f3f2a176e6585a0dd9f28fb91941ebd2c010e8bc90a78b02ed25747998f20137651b4906c9c38acc0" } ], "genesisBlockHeader" : { @@ -661,9 +720,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "19ba95521795315095932fdbcdfd6252f5be122ed9e11a4bdc76ff37d9e01126", - "mixHash" : "da98a6b8dff33e89dc016b90c713bb001a50654a90fbf004929b85a629e0ec98", - "nonce" : "df4c80f3d5a91dad", + "hash" : "364fda1ab2268356c2b62c535175f3f34e9c13e7efe080c77c55c06d5b96160a", + "mixHash" : "18a9fbd004aab480e4524113be86ec637754e1686ae6ea3720feb79c19e09daf", + "nonce" : "a3c68869e5eeee96", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -672,8 +731,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0da98a6b8dff33e89dc016b90c713bb001a50654a90fbf004929b85a629e0ec9888df4c80f3d5a91dadc0c0", - "lastblockhash" : "19ba95521795315095932fdbcdfd6252f5be122ed9e11a4bdc76ff37d9e01126", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a018a9fbd004aab480e4524113be86ec637754e1686ae6ea3720feb79c19e09daf88a3c68869e5eeee96c0c0", + "lastblockhash" : "364fda1ab2268356c2b62c535175f3f34e9c13e7efe080c77c55c06d5b96160a", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x64", @@ -710,7 +769,7 @@ "wrongParentHash2" : { "blocks" : [ { - "rlp" : "0xf90262f901f9a06151889c8f14ab46e32ee0b1894bc276416385d068a1ade000d0dadef9b08b18a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b3afc95220fb6e2df7fca71206d36e81b458ecfaff6c18b1c3414d30ad6b64efa08447f44931420a82dc813998fc980608ba69b6e989d8e067ed54f4e4d1b00516a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fefd882560b84557ff4e480a0a96d9d00cb83d9a3eaa10269ac9e3297f9af79ebe15b02033bd6c1f6a237836c88f99d1d09396a9c18f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0a830793b992f6725dda16af6d2a3e7c8b5b6d39bd15cf15fa13ed68caa5d8db1a04fb1a8166dba1eb68377ded6cc8f416762401ca12c7bda444356e320a2fbbd3fc0" + "rlp" : "0xf90262f901f9a06151889c8f14ab46e32ee0b1894bc276416385d068a1ade000d0dadef9b08b18a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b3afc95220fb6e2df7fca71206d36e81b458ecfaff6c18b1c3414d30ad6b64efa06000aacffdd01c3b296e1219bad0986d9a1d89b91047383e926f352c8644b64fa05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fefd882560b845580087280a0d9bf2ce6631f9d17925e22bb359ad29286fc5c9bf6ebccf9814bc4adbfc92ddc88e27271ef80a5cff5f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ca0ca1a5b328644f9e429d97671643acd200e1455cc37e93eb12ffcec1110101a8ba05a2b98a506cb70cfc8841ffa27cdfbb8d6c2804f79671e1fea15207b5d56c14bc0" } ], "genesisBlockHeader" : { @@ -720,9 +779,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "5272d5baa3babce753a5f092b5c3634743ab41d6f40de3fb867b044cdfa50a4c", - "mixHash" : "4ff65189a4cb2b2f799783a0551050eb4797e0e6260eae53676780be9939d97f", - "nonce" : "fcb284742b76ee35", + "hash" : "59c8cb6d65b73e8cb894a6f20542e2ff242a291b6267ed3db62a43247d240c41", + "mixHash" : "f0bf8c7437ccb8d5223a6c1ba259ec9f480c66a75aa19ffe1e69c5aa1504e3e2", + "nonce" : "e90cf83a53a88bf4", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -731,8 +790,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a04ff65189a4cb2b2f799783a0551050eb4797e0e6260eae53676780be9939d97f88fcb284742b76ee35c0c0", - "lastblockhash" : "5272d5baa3babce753a5f092b5c3634743ab41d6f40de3fb867b044cdfa50a4c", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0f0bf8c7437ccb8d5223a6c1ba259ec9f480c66a75aa19ffe1e69c5aa1504e3e288e90cf83a53a88bf4c0c0", + "lastblockhash" : "59c8cb6d65b73e8cb894a6f20542e2ff242a291b6267ed3db62a43247d240c41", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x64", @@ -769,7 +828,7 @@ "wrongReceiptTrie" : { "blocks" : [ { - "rlp" : "0xf90262f901f9a06605eef6ead056d45d2b56c83703faad6172fb0081e486f9f249949fe7d5e953a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b3afc95220fb6e2df7fca71206d36e81b458ecfaff6c18b1c3414d30ad6b64efa035c5334d1e4423d1373bdcfece52dc1dbe7b74d0deff46c3384f212150b50282a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fefd882560b84557ff4e880a06026e2cfa76464cd9f33e8f3a29181323530cd68243ba848725d11e81af0b63b8892b0b0478ae521f9f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ca0ce136fc0dd98a87f038919adff9146a56f47dee178e08fec457fd5e8ffedeb96a0877183fd1b9c22c05a7d48efac8d14f4d7826a32f0f1c917bcb995df201f21c2c0" + "rlp" : "0xf90262f901f9a03ed497b84bb6be18a3caa02c3aeb9271b9367ebc227033e8ab780cf66c1d9062a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b3afc95220fb6e2df7fca71206d36e81b458ecfaff6c18b1c3414d30ad6b64efa0d547257434c73520b2958de3368feecaadaec13fe2ed7c1841c51eb65ee85388a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fefd882560b845580087580a04bafa084097d4dec7a1ce4b445e7569481bef76f1d173d82e02e0e009b13bdaf886f4b992147f4acccf863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0be6a87a493597aeeb164fa15708b879023dd8f52411bd4bd3bc51d20f8b6a1fca059277aac4b6bfda0e63352237ff10a057dad8a431020d58f8d36fccf1da55168c0" } ], "genesisBlockHeader" : { @@ -779,9 +838,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "6605eef6ead056d45d2b56c83703faad6172fb0081e486f9f249949fe7d5e953", - "mixHash" : "b3fdfcbef5c525dbb62f57a184a555b0c58d97c77e09268598d8c4c60d2ea77d", - "nonce" : "7858c0f32c2ed54f", + "hash" : "3ed497b84bb6be18a3caa02c3aeb9271b9367ebc227033e8ab780cf66c1d9062", + "mixHash" : "4c9b926ce017c4e50ba066437a89d814f95bed53f5326c5a610847b03222a078", + "nonce" : "668c2e238f9a096c", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -790,8 +849,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0b3fdfcbef5c525dbb62f57a184a555b0c58d97c77e09268598d8c4c60d2ea77d887858c0f32c2ed54fc0c0", - "lastblockhash" : "6605eef6ead056d45d2b56c83703faad6172fb0081e486f9f249949fe7d5e953", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a04c9b926ce017c4e50ba066437a89d814f95bed53f5326c5a610847b03222a07888668c2e238f9a096cc0c0", + "lastblockhash" : "3ed497b84bb6be18a3caa02c3aeb9271b9367ebc227033e8ab780cf66c1d9062", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x64", @@ -828,7 +887,7 @@ "wrongStateRoot" : { "blocks" : [ { - "rlp" : "0xf90262f901f9a0edcba92aa67f033d719c6d1b619c6a53df9a572219b9e553e4949e5e11e42be7a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0f99eb1626cfa6db435c0836235942d7ccaa935f1ae247d3f1c21e495685f903aa00220feb94650793c6e5b5c82da3bc726257b8578952f2007f5a43a221cf644dda05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fefd882560b84557ff4eb80a03655fc3d30ce560424d4276b783df42363da9127557f80b452f0057e0093303e882db7f68a9bac0f8df863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ca0172577eb4010360f0104a92844e03b56ac437157135ca3e22a5ed6326e0ecfc9a01e27afa553dd478cf4881a671e8da268c9cb5dfa00cdc25539a14268cc069527c0" + "rlp" : "0xf90262f901f9a0af0b430f986c9eaa44096cfbdaec6af6f7e85dc5321d9d41773caaa159faefc4a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0f99eb1626cfa6db435c0836235942d7ccaa935f1ae247d3f1c21e495685f903aa021103590c059df97971664e2655eefd20db46fd711bcecb691eadf3844d0b355a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fefd882560b845580087980a0440d000bf14d0a72eb1e5fc528942ffaff7917946c0156eaf41d4b94c9d2fd998891b1ed3a9d8d9edef863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba02b554cbe7f00eef1a6e328e1982cbb0b73350c9c6cd7ecab52abf9c35837f3dda02417a809ed67dbac0cd5e2a1f7da3c132b3ab89ff770985aae5948036d29e27bc0" } ], "genesisBlockHeader" : { @@ -838,9 +897,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "edcba92aa67f033d719c6d1b619c6a53df9a572219b9e553e4949e5e11e42be7", - "mixHash" : "88af4ef320f4e007fe1eb3b683fdf9adbf38c98e8d4e350bed853e2bb63552bd", - "nonce" : "7bf2e2bf22b302c9", + "hash" : "af0b430f986c9eaa44096cfbdaec6af6f7e85dc5321d9d41773caaa159faefc4", + "mixHash" : "1895fae398d313e792b4bb6780f602b71d93f36db891b687fbb53189440fac90", + "nonce" : "ba308a91e503ff4a", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -849,8 +908,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a088af4ef320f4e007fe1eb3b683fdf9adbf38c98e8d4e350bed853e2bb63552bd887bf2e2bf22b302c9c0c0", - "lastblockhash" : "edcba92aa67f033d719c6d1b619c6a53df9a572219b9e553e4949e5e11e42be7", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a01895fae398d313e792b4bb6780f602b71d93f36db891b687fbb53189440fac9088ba308a91e503ff4ac0c0", + "lastblockhash" : "af0b430f986c9eaa44096cfbdaec6af6f7e85dc5321d9d41773caaa159faefc4", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x64", @@ -887,7 +946,7 @@ "wrongTimestamp" : { "blocks" : [ { - "rlp" : "0xf90262f901f9a0325d37a5c37719331172d7d393211fa6f768c27cd6caf54134d0f821769404aaa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b3afc95220fb6e2df7fca71206d36e81b458ecfaff6c18b1c3414d30ad6b64efa0c33dadd6c3c8060f83d1f94e481b0940ea2bdea2dc32d773205bcc6083856f43a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fefd882560b8454c98c8080a0fc1df352eae9084145df1a657decd03ef7fd842798f4ef3ac9090c2faf0095f28858d51dbe68417246f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ca021a1e6616055d70e7d5e47789985356469bc6027c5515c9ed758ce80b6874d17a0d270a747a2c1fdb4b6bbd4b7465db93a72cb13068e196a04c7b4660ae5625175c0" + "rlp" : "0xf90262f901f9a07e0c4dc229e760d17ca0f8a8375886881a964125cd4cc5518730ab2b97340122a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b3afc95220fb6e2df7fca71206d36e81b458ecfaff6c18b1c3414d30ad6b64efa0d3cbc67fa7558e25e25631956d9a2eef49a3ae080707349e5ef6ce1ccca31ce1a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fefd882560b8454c98c8080a026845b0a63445af7d7430f8851ff9bccfd6fd0e0e957ac8f89469378200a54aa883ef67d58d5523d1bf863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0e6e9bea53437519889644cf8701e1addeb88994ec1c0f1dffdf9f44386a8eb68a062ecb4acf823edea6f690284f9d4863b07222d830e15e8ac95025ba624187b39c0" } ], "genesisBlockHeader" : { @@ -897,9 +956,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "325d37a5c37719331172d7d393211fa6f768c27cd6caf54134d0f821769404aa", - "mixHash" : "136c26720914f9bd3a463d9b77845cd9e87072f741a7816c20fcde7f0788765d", - "nonce" : "58912a71e2613c86", + "hash" : "7e0c4dc229e760d17ca0f8a8375886881a964125cd4cc5518730ab2b97340122", + "mixHash" : "f5dd7227023cc3e42cd2dfeffbbaf182129677c36dd00a804fbf25b8e90b4c69", + "nonce" : "ea1a64cbda5dd7f9", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -908,8 +967,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0136c26720914f9bd3a463d9b77845cd9e87072f741a7816c20fcde7f0788765d8858912a71e2613c86c0c0", - "lastblockhash" : "325d37a5c37719331172d7d393211fa6f768c27cd6caf54134d0f821769404aa", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0f5dd7227023cc3e42cd2dfeffbbaf182129677c36dd00a804fbf25b8e90b4c6988ea1a64cbda5dd7f9c0c0", + "lastblockhash" : "7e0c4dc229e760d17ca0f8a8375886881a964125cd4cc5518730ab2b97340122", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x64", @@ -946,7 +1005,7 @@ "wrongTransactionsTrie" : { "blocks" : [ { - "rlp" : "0xf90262f901f9a06a3767b6a08363f58f77cfa98fc68a70279cecc75e1961967851b9cdd04210c9a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b3afc95220fb6e2df7fca71206d36e81b458ecfaff6c18b1c3414d30ad6b64efa055e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fefd882560b84557ff4f280a0bf84dfbf14c6f38086a79c92c5544cb40793646234a78ac75e30430f436743a788faf2ad3f0d068414f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba042bf238a8911d8c3606b17b889a5eb28cd9615b92a3786f2ec9923dc8a583982a073fe353a68edd8e3ef69b6bbfcd7c2e4aa5ac4cd30799359022e992a0b05a33fc0" + "rlp" : "0xf90262f901f9a03b19ebcfaeb573a81c87c0f5645755b408ff7ac9d51716f707962ec4ffaeb0f9a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b3afc95220fb6e2df7fca71206d36e81b458ecfaff6c18b1c3414d30ad6b64efa055e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fefd882560b845580088180a04380d8e8ed2a1130f4adc14d7c60f77ad4eea8e0d2084da440a6ef8ff5e1141a8880d245443bdba17cf863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0d4d2fe5bb107a11bc741a4d6649e2ce616d3fc1d618bd3ae8eefd8ba588e6b3ca0c106cdd9670273cfefead66a425b2e84861e319efa36cc119bc26bdc04a25878c0" } ], "genesisBlockHeader" : { @@ -956,9 +1015,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "6a3767b6a08363f58f77cfa98fc68a70279cecc75e1961967851b9cdd04210c9", - "mixHash" : "12f8ecbe70493ad82c374c2790718cb4cbe715811e368b59e5571194aeab640e", - "nonce" : "43ede73455d20c96", + "hash" : "3b19ebcfaeb573a81c87c0f5645755b408ff7ac9d51716f707962ec4ffaeb0f9", + "mixHash" : "8db646afe41ccfb281ceee822d83bcb206fae519fc33928cbb2237c9ec54e5cc", + "nonce" : "a7da800b080801c2", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -967,8 +1026,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a012f8ecbe70493ad82c374c2790718cb4cbe715811e368b59e5571194aeab640e8843ede73455d20c96c0c0", - "lastblockhash" : "6a3767b6a08363f58f77cfa98fc68a70279cecc75e1961967851b9cdd04210c9", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a08db646afe41ccfb281ceee822d83bcb206fae519fc33928cbb2237c9ec54e5cc88a7da800b080801c2c0c0", + "lastblockhash" : "3b19ebcfaeb573a81c87c0f5645755b408ff7ac9d51716f707962ec4ffaeb0f9", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x64", @@ -1005,7 +1064,7 @@ "wrongUncleHash" : { "blocks" : [ { - "rlp" : "0xf90262f901f9a02fdc5ea2e08e8ae80a0aed1efc05125f25e5f109f3c6d0e2e71e663c20efd382a00dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b3afc95220fb6e2df7fca71206d36e81b458ecfaff6c18b1c3414d30ad6b64efa06923d4c8153b65641c6d4474e419e2ee39805bf80f7e898428f8a7db312505a5a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fefd882560b84557ff4f680a07e8315ad74c3e73b3a0e0ca1b34d33d244c27fa3863a76f131bea4f561fee93a888358852fea734303f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ba0195aff059a6627625b77818df5cd44a4aa84c21a2afcc60fd92531ac00860503a0f1fa453ebdacb26ebfcc302a5fc3fa9e4fec0646dfbfe4e45fad937a868fd76dc0" + "rlp" : "0xf90262f901f9a0f86a84d48f2b23a69dd4d6089d19be8ef8a8e6f6c918e80628593eb9d6bffb16a00dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b3afc95220fb6e2df7fca71206d36e81b458ecfaff6c18b1c3414d30ad6b64efa0bdb4ee73274ec0a6b488ec9053da8e5776d0e8e74dd30defebbe0ab8b7915fd4a05e7d8bf8bc817405813b0866e3bfa1ad048f982be5b81ab17b4db03266b24b26b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fefd882560b845580088380a028219f11c12eb335867a29722e677158b49751866db3cda447658de07e9521e288ceede1e19a136236f863f861800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d87821388801ca07882718cb4b1a3fd98c2335718e9e6e9cb8fa9d9f35e6b5e1c2e95c6b140747aa0d24721e675983de4e66e3cf7685801b186b3150545ec4e31de1c2437d8fe34b5c0" } ], "genesisBlockHeader" : { @@ -1015,9 +1074,9 @@ "extraData" : "0x42", "gasLimit" : "0x2fefd8", "gasUsed" : "0x00", - "hash" : "2fdc5ea2e08e8ae80a0aed1efc05125f25e5f109f3c6d0e2e71e663c20efd382", - "mixHash" : "caebfc33a6b7811665aefadc1104c5d32aec2a1637a468c157c6de7ffcec13c9", - "nonce" : "9eddc636c8cb7c86", + "hash" : "f86a84d48f2b23a69dd4d6089d19be8ef8a8e6f6c918e80628593eb9d6bffb16", + "mixHash" : "5b997f0654da65676b318bbf1a9e942910b72027f8d675684a1e9a1ffe00344e", + "nonce" : "185358fefb4cca5d", "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", @@ -1026,8 +1085,8 @@ "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a0caebfc33a6b7811665aefadc1104c5d32aec2a1637a468c157c6de7ffcec13c9889eddc636c8cb7c86c0c0", - "lastblockhash" : "2fdc5ea2e08e8ae80a0aed1efc05125f25e5f109f3c6d0e2e71e663c20efd382", + "genesisRLP" : "0xf901fcf901f7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0b7829295a16db7cae65a071afbb272390f893dc1b0d3f098504148a7056f8056a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080832fefd8808454c98c8142a05b997f0654da65676b318bbf1a9e942910b72027f8d675684a1e9a1ffe00344e88185358fefb4cca5dc0c0", + "lastblockhash" : "f86a84d48f2b23a69dd4d6089d19be8ef8a8e6f6c918e80628593eb9d6bffb16", "postState" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x64", diff --git a/tests/files/BlockTests/bcInvalidRLPTest.json b/tests/files/BlockchainTests/bcInvalidRLPTest.json similarity index 91% rename from tests/files/BlockTests/bcInvalidRLPTest.json rename to tests/files/BlockchainTests/bcInvalidRLPTest.json index c4324819a..10555df17 100644 --- a/tests/files/BlockTests/bcInvalidRLPTest.json +++ b/tests/files/BlockchainTests/bcInvalidRLPTest.json @@ -5,40 +5,39 @@ "rlp" : "0xfb00000260f901f9a02a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0ef1552a40b7165c3cd773806b9e0c165b75356e0314bf0706f279c729f51e017a0b6c9fd1447d0b414a1f05957927746f58ef5a2ebde17db631d460eaf6a93b18da0bc37d79753ad738a6dac4921e57392f145d8887476de3f783dfa7edae9283e52b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd8825208845509814280a00451dd53d9c09f3cfb627b51d9d80632ed801f6330ee584bffc26caac9b9249f88c7bffe5ebd94cc2ff861f85f800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba098c3a099885a281885f487fd37550de16436e8c47874cd213531b10fe751617fa044b6b81011ce57bffcaf610bf728fb8a7237ad261ea2d937423d78eb9e137076c0" } ], - "lastblockhash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "lastblockhash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -51,40 +50,39 @@ "rlp" : "0xf9026ef901f9a02a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0ef1552a40b7165c3cd773806b9e0c165b75356e0314bf0706f279c729f51e017a0b6c9fd1447d0b414a1f05957927746f58ef5a2ebde17db631d460eaf6a93b18da0bc37d79753ad738a6dac4921e57392f145d8887476de3f783dfa7edae9283e52b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd8825208845509814280a00451dd53d9c09f3cfb627b51d9d80632ed801f6330ee584bffc26caac9b9249f88c7bffe5ebd94cc2ff861f85f800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba098c3a099885a281885f487fd37550de16436e8c47874cd213531b10fe751617fa044b6b81011ce57bffcaf610bf728fb8a7237ad261ea2d937423d78eb9e137076c0" } ], - "lastblockhash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "lastblockhash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -97,40 +95,39 @@ "rlp" : "0xb90260f901f9a02a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0ef1552a40b7165c3cd773806b9e0c165b75356e0314bf0706f279c729f51e017a0b6c9fd1447d0b414a1f05957927746f58ef5a2ebde17db631d460eaf6a93b18da0bc37d79753ad738a6dac4921e57392f145d8887476de3f783dfa7edae9283e52b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd8825208845509814280a00451dd53d9c09f3cfb627b51d9d80632ed801f6330ee584bffc26caac9b9249f88c7bffe5ebd94cc2ff861f85f800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba098c3a099885a281885f487fd37550de16436e8c47874cd213531b10fe751617fa044b6b81011ce57bffcaf610bf728fb8a7237ad261ea2d937423d78eb9e137076c0" } ], - "lastblockhash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "lastblockhash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -143,40 +140,39 @@ "rlp" : "0xf90260f90207a02a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0ef1552a40b7165c3cd773806b9e0c165b75356e0314bf0706f279c729f51e017a0b6c9fd1447d0b414a1f05957927746f58ef5a2ebde17db631d460eaf6a93b18da0bc37d79753ad738a6dac4921e57392f145d8887476de3f783dfa7edae9283e52b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd8825208845509814280a00451dd53d9c09f3cfb627b51d9d80632ed801f6330ee584bffc26caac9b9249f88c7bffe5ebd94cc2ff861f85f800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba098c3a099885a281885f487fd37550de16436e8c47874cd213531b10fe751617fa044b6b81011ce57bffcaf610bf728fb8a7237ad261ea2d937423d78eb9e137076c0" } ], - "lastblockhash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "lastblockhash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -189,40 +185,39 @@ "rlp" : "0xf90260b901f9a02a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0ef1552a40b7165c3cd773806b9e0c165b75356e0314bf0706f279c729f51e017a0b6c9fd1447d0b414a1f05957927746f58ef5a2ebde17db631d460eaf6a93b18da0bc37d79753ad738a6dac4921e57392f145d8887476de3f783dfa7edae9283e52b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd8825208845509814280a00451dd53d9c09f3cfb627b51d9d80632ed801f6330ee584bffc26caac9b9249f88c7bffe5ebd94cc2ff861f85f800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba098c3a099885a281885f487fd37550de16436e8c47874cd213531b10fe751617fa044b6b81011ce57bffcaf610bf728fb8a7237ad261ea2d937423d78eb9e137076c0" } ], - "lastblockhash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "lastblockhash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -240,35 +235,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -281,40 +276,39 @@ "rlp" : "0xf90262f901fba02a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d493479600008888f1f195afa192cfee860698584c030f4c9db1a0ef1552a40b7165c3cd773806b9e0c165b75356e0314bf0706f279c729f51e017a0b6c9fd1447d0b414a1f05957927746f58ef5a2ebde17db631d460eaf6a93b18da0bc37d79753ad738a6dac4921e57392f145d8887476de3f783dfa7edae9283e52b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd8825208845509814280a00451dd53d9c09f3cfb627b51d9d80632ed801f6330ee584bffc26caac9b9249f88c7bffe5ebd94cc2ff861f85f800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba098c3a099885a281885f487fd37550de16436e8c47874cd213531b10fe751617fa044b6b81011ce57bffcaf610bf728fb8a7237ad261ea2d937423d78eb9e137076c0" } ], - "lastblockhash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "lastblockhash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -327,40 +321,39 @@ "rlp" : "0xf90262f901fba02a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934796ef3d8888f1f195afa192cfee860698584c030f4c9db1a0ef1552a40b7165c3cd773806b9e0c165b75356e0314bf0706f279c729f51e017a0b6c9fd1447d0b414a1f05957927746f58ef5a2ebde17db631d460eaf6a93b18da0bc37d79753ad738a6dac4921e57392f145d8887476de3f783dfa7edae9283e52b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd8825208845509814280a00451dd53d9c09f3cfb627b51d9d80632ed801f6330ee584bffc26caac9b9249f88c7bffe5ebd94cc2ff861f85f800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba098c3a099885a281885f487fd37550de16436e8c47874cd213531b10fe751617fa044b6b81011ce57bffcaf610bf728fb8a7237ad261ea2d937423d78eb9e137076c0" } ], - "lastblockhash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "lastblockhash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -373,40 +366,39 @@ "rlp" : "0xf9025ef901f7a02a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934792f1f195afa192cfee860698584c030f4c9db1a0ef1552a40b7165c3cd773806b9e0c165b75356e0314bf0706f279c729f51e017a0b6c9fd1447d0b414a1f05957927746f58ef5a2ebde17db631d460eaf6a93b18da0bc37d79753ad738a6dac4921e57392f145d8887476de3f783dfa7edae9283e52b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd8825208845509814280a00451dd53d9c09f3cfb627b51d9d80632ed801f6330ee584bffc26caac9b9249f88c7bffe5ebd94cc2ff861f85f800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba098c3a099885a281885f487fd37550de16436e8c47874cd213531b10fe751617fa044b6b81011ce57bffcaf610bf728fb8a7237ad261ea2d937423d78eb9e137076c0" } ], - "lastblockhash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "lastblockhash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -419,40 +411,39 @@ "rlp" : "0xf90260f901f9a02a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347d48888f1f195afa192cfee860698584c030f4c9db1a0ef1552a40b7165c3cd773806b9e0c165b75356e0314bf0706f279c729f51e017a0b6c9fd1447d0b414a1f05957927746f58ef5a2ebde17db631d460eaf6a93b18da0bc37d79753ad738a6dac4921e57392f145d8887476de3f783dfa7edae9283e52b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000001832fefd8825208845509814280a00451dd53d9c09f3cfb627b51d9d80632ed801f6330ee584bffc26caac9b9249f88c7bffe5ebd94cc2ff861f85f800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba098c3a099885a281885f487fd37550de16436e8c47874cd213531b10fe751617fa044b6b81011ce57bffcaf610bf728fb8a7237ad261ea2d937423d78eb9e137076c0" } ], - "lastblockhash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "lastblockhash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -469,35 +460,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -514,35 +505,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -559,35 +550,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -604,35 +595,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -649,35 +640,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -694,35 +685,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -739,35 +730,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -784,35 +775,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -829,35 +820,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -874,35 +865,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -919,35 +910,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -964,35 +955,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -1009,35 +1000,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -1054,35 +1045,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -1099,35 +1090,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -1144,35 +1135,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -1189,35 +1180,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -1234,35 +1225,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -1279,35 +1270,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -1324,35 +1315,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -1369,35 +1360,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -1414,35 +1405,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -1459,35 +1450,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -1504,35 +1495,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -1549,35 +1540,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -1594,35 +1585,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -1639,35 +1630,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -1684,35 +1675,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -1729,35 +1720,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -1774,35 +1765,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -1819,35 +1810,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -1864,35 +1855,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -1909,35 +1900,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -1954,35 +1945,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -1999,35 +1990,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -2044,35 +2035,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -2089,35 +2080,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -2134,35 +2125,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -2179,35 +2170,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -2224,35 +2215,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -2269,35 +2260,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -2314,35 +2305,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -2359,35 +2350,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -2404,35 +2395,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -2449,35 +2440,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -2494,35 +2485,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -2539,35 +2530,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -2584,35 +2575,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -2629,35 +2620,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -2674,35 +2665,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -2719,35 +2710,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -2764,35 +2755,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -2809,35 +2800,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -2854,35 +2845,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -2899,35 +2890,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -2944,35 +2935,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -2989,35 +2980,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -3034,35 +3025,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -3079,35 +3070,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -3124,35 +3115,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -3169,35 +3160,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -3214,35 +3205,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -3259,35 +3250,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -3304,35 +3295,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -3349,35 +3340,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -3394,35 +3385,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -3439,35 +3430,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -3484,35 +3475,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -3529,35 +3520,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -3574,35 +3565,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -3619,35 +3610,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -3664,35 +3655,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -3709,35 +3700,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -3754,35 +3745,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -3799,35 +3790,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -3844,35 +3835,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -3889,35 +3880,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -3934,35 +3925,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -3979,35 +3970,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -4024,35 +4015,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -4069,35 +4060,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -4114,35 +4105,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -4159,35 +4150,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -4204,35 +4195,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -4249,35 +4240,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -4294,35 +4285,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -4339,35 +4330,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -4384,35 +4375,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -4429,35 +4420,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -4474,35 +4465,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -4519,35 +4510,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -4564,35 +4555,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -4609,35 +4600,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -4654,35 +4645,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -4699,35 +4690,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -4744,35 +4735,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -4789,35 +4780,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -4834,35 +4825,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -4879,35 +4870,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -4924,35 +4915,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -4969,35 +4960,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -5014,35 +5005,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -5059,35 +5050,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -5104,35 +5095,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -5149,35 +5140,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -5194,35 +5185,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -5239,35 +5230,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -5284,35 +5275,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -5329,35 +5320,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -5374,35 +5365,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -5419,35 +5410,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -5464,35 +5455,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -5509,35 +5500,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -5554,35 +5545,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -5599,35 +5590,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -5644,35 +5635,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -5689,35 +5680,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -5734,35 +5725,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -5779,35 +5770,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -5824,35 +5815,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -5869,35 +5860,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -5914,35 +5905,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -5959,35 +5950,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -6004,35 +5995,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } @@ -6049,35 +6040,35 @@ "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "131072", + "difficulty" : "0x20000", "extraData" : "0x42", - "gasLimit" : "3141592", - "gasUsed" : "0", + "gasLimit" : "0x2fefd8", + "gasUsed" : "0x00", "hash" : "2a3c692012a15502ba9c39f3aebb36694eed978c74b52e6c0cf210d301dbf325", "mixHash" : "885d54819df29e91b6a2bc165c4c674c7a0e33acce8dfa48de980b45a06c0207", "nonce" : "50f61b04c9785721", - "number" : "0", + "number" : "0x00", "parentHash" : "0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "cafd881ab193703b83816c49ff6c2bf6ba6f464a1be560c42106128c8dbc35e7", - "timestamp" : "1422494849", + "timestamp" : "0x54c98c81", "transactionsTrie" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "postState" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "0x2540be400", "code" : "0x", - "nonce" : "0", + "nonce" : "0x00", "storage" : { } } diff --git a/tests/files/BlockTests/bcRPC_API_Test.json b/tests/files/BlockchainTests/bcRPC_API_Test.json similarity index 100% rename from tests/files/BlockTests/bcRPC_API_Test.json rename to tests/files/BlockchainTests/bcRPC_API_Test.json diff --git a/tests/files/BlockTests/bcTotalDifficultyTest.json b/tests/files/BlockchainTests/bcTotalDifficultyTest.json similarity index 100% rename from tests/files/BlockTests/bcTotalDifficultyTest.json rename to tests/files/BlockchainTests/bcTotalDifficultyTest.json diff --git a/tests/files/BlockTests/bcUncleHeaderValiditiy.json b/tests/files/BlockchainTests/bcUncleHeaderValiditiy.json similarity index 100% rename from tests/files/BlockTests/bcUncleHeaderValiditiy.json rename to tests/files/BlockchainTests/bcUncleHeaderValiditiy.json diff --git a/tests/files/BlockTests/bcUncleTest.json b/tests/files/BlockchainTests/bcUncleTest.json similarity index 100% rename from tests/files/BlockTests/bcUncleTest.json rename to tests/files/BlockchainTests/bcUncleTest.json diff --git a/tests/files/BlockTests/bcValidBlockTest.json b/tests/files/BlockchainTests/bcValidBlockTest.json similarity index 100% rename from tests/files/BlockTests/bcValidBlockTest.json rename to tests/files/BlockchainTests/bcValidBlockTest.json diff --git a/tests/files/BlockTests/bcWalletTest.json b/tests/files/BlockchainTests/bcWalletTest.json similarity index 100% rename from tests/files/BlockTests/bcWalletTest.json rename to tests/files/BlockchainTests/bcWalletTest.json diff --git a/tests/files/StateTests/stPrecompiledContractsTransaction.json b/tests/files/StateTests/stPreCompiledContractsTransaction.json similarity index 99% rename from tests/files/StateTests/stPrecompiledContractsTransaction.json rename to tests/files/StateTests/stPreCompiledContractsTransaction.json index afe63ad09..0117bf288 100644 --- a/tests/files/StateTests/stPrecompiledContractsTransaction.json +++ b/tests/files/StateTests/stPreCompiledContractsTransaction.json @@ -8,7 +8,6 @@ "currentTimestamp" : "0x01", "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, - "expectOut" : "0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", "logs" : [ ], "out" : "0x", @@ -64,7 +63,6 @@ "currentTimestamp" : "0x01", "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, - "expectOut" : "0x0000000000000000000000000000000000000000000000000000000000000000", "logs" : [ ], "out" : "0x", @@ -120,7 +118,6 @@ "currentTimestamp" : "0x01", "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, - "expectOut" : "0x", "logs" : [ ], "out" : "0x", @@ -162,7 +159,6 @@ "currentTimestamp" : "0x01", "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, - "expectOut" : "0x0000000000000000000000000000000000000000000000000000000000000000", "logs" : [ ], "out" : "0x", @@ -218,7 +214,6 @@ "currentTimestamp" : "0x01", "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, - "expectOut" : "0x0000000000000000000000000000000000000000000000000000000000000000", "logs" : [ ], "out" : "0x", @@ -274,7 +269,6 @@ "currentTimestamp" : "0x01", "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, - "expectOut" : "0x000000000000000000000000e4319f4b631c6d0fcfc84045dbcb676865fe5e13", "logs" : [ ], "out" : "0x", @@ -330,7 +324,6 @@ "currentTimestamp" : "0x01", "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, - "expectOut" : "0x0000000000000000000000003f17f1962b36e491b30a40b2405849e597ba5fb5", "logs" : [ ], "out" : "0x", @@ -386,7 +379,6 @@ "currentTimestamp" : "0x01", "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, - "expectOut" : "0x0000000000000000000000000000000000000000000000000000000000000001", "logs" : [ ], "out" : "0x", @@ -442,7 +434,6 @@ "currentTimestamp" : "0x01", "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, - "expectOut" : "0x", "logs" : [ ], "out" : "0x", @@ -498,7 +489,6 @@ "currentTimestamp" : "0x01", "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, - "expectOut" : "0x", "logs" : [ ], "out" : "0x", @@ -554,7 +544,6 @@ "currentTimestamp" : "0x01", "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, - "expectOut" : "0x0000000000000000000000000000000000000000000000000000000000000000f34578907f", "logs" : [ ], "out" : "0x", @@ -610,7 +599,6 @@ "currentTimestamp" : "0x01", "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, - "expectOut" : "0x000000000000000000000000000000000000000000000000000000f34578907f0000000000", "logs" : [ ], "out" : "0x", @@ -666,7 +654,6 @@ "currentTimestamp" : "0x01", "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, - "expectOut" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", "logs" : [ ], "out" : "0x", @@ -722,7 +709,6 @@ "currentTimestamp" : "0x01", "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, - "expectOut" : "0x", "logs" : [ ], "out" : "0x", @@ -771,7 +757,6 @@ "currentTimestamp" : "0x01", "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, - "expectOut" : "#35659", "logs" : [ ], "out" : "0x", @@ -827,7 +812,6 @@ "currentTimestamp" : "0x01", "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, - "expectOut" : "0x000000000000000000000000ae387fcfeb723c3f5964509af111cf5a67f30661", "logs" : [ ], "out" : "0x", @@ -883,7 +867,6 @@ "currentTimestamp" : "0x01", "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, - "expectOut" : "0x0000000000000000000000009c1185a5c5e9fc54612808977ee8f548b2258d31", "logs" : [ ], "out" : "0x", @@ -939,7 +922,6 @@ "currentTimestamp" : "0x01", "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, - "expectOut" : "0x000000000000000000000000dbc100f916bfbc53535573d98cf0cbb3a5b36124", "logs" : [ ], "out" : "0x", @@ -995,7 +977,6 @@ "currentTimestamp" : "0x01", "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, - "expectOut" : "0x000000000000000000000000316750573f9be26bc17727b47cacedbd0ab3e6ca", "logs" : [ ], "out" : "0x", @@ -1051,7 +1032,6 @@ "currentTimestamp" : "0x01", "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, - "expectOut" : "0x0000000000000000000000001cf4e77f5966e13e109703cd8a0df7ceda7f3dc3", "logs" : [ ], "out" : "0x", @@ -1107,7 +1087,6 @@ "currentTimestamp" : "0x01", "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, - "expectOut" : "0x", "logs" : [ ], "out" : "0x", @@ -1156,7 +1135,6 @@ "currentTimestamp" : "0x01", "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, - "expectOut" : "0xec4916dd28fc4c10d78e287ca5d9cc51ee1ae73cbfde08c6b37324cbfaac8bc5", "logs" : [ ], "out" : "0x", @@ -1212,7 +1190,6 @@ "currentTimestamp" : "0x01", "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, - "expectOut" : "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "logs" : [ ], "out" : "0x", @@ -1268,7 +1245,6 @@ "currentTimestamp" : "0x01", "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, - "expectOut" : "0xcb39b3bde22925b2f931111130c774761d8895e0e08437c9b396c1e97d10f34d", "logs" : [ ], "out" : "0x", @@ -1324,7 +1300,6 @@ "currentTimestamp" : "0x01", "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, - "expectOut" : "0x7392925565d67be8e9620aacbcfaecd8cb6ec58d709d25da9eccf1d08a41ce35", "logs" : [ ], "out" : "0x", @@ -1380,7 +1355,6 @@ "currentTimestamp" : "0x01", "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, - "expectOut" : "0xaf9613760f72635fbdb44a5a0a63c39f12af30f950a6ee5c971be188e89c4051", "logs" : [ ], "out" : "0x", @@ -1436,7 +1410,6 @@ "currentTimestamp" : "0x01", "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, - "expectOut" : "0x259911ec9f4b02b7975dfa3f5da78fc58b7066604bdaea66c4485c90f6f55bec", "logs" : [ ], "out" : "0x", @@ -1492,7 +1465,6 @@ "currentTimestamp" : "0x01", "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, - "expectOut" : "0x0000000000000000000000000000000000000000000000000000000000000000", "logs" : [ ], "out" : "0x", diff --git a/tests/files/StateTests/stSpecialTest.json b/tests/files/StateTests/stSpecialTest.json index 28b81ac25..9a41ef6e0 100644 --- a/tests/files/StateTests/stSpecialTest.json +++ b/tests/files/StateTests/stSpecialTest.json @@ -164,6 +164,447 @@ "value" : "0x01f5" } }, + "block504980" : { + "env" : { + "currentCoinbase" : "1cdc8315bdb1362de8b7b2fa9ee75dc873037179", + "currentDifficulty" : "0x04e44ea721", + "currentGasLimit" : "0x2fefd8", + "currentNumber" : "0x07b494", + "currentTimestamp" : "0x01", + "previousHash" : "9ff4de714e01da9f8b61992efdab9b51ca14ac42d43f4c24df1d002a1239b1e9" + }, + "logs" : [ + ], + "out" : "0x0000000000000000000000000000000000000000000000000000000000000003", + "post" : { + "0000000000000000000000000000000000000000" : { + "balance" : "0x01", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "0000000000000000000000000000000000000001" : { + "balance" : "0x01", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "0000000000000000000000000000000000000002" : { + "balance" : "0x01", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "0000000000000000000000000000000000000003" : { + "balance" : "0x01", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "0000000000000000000000000000000000000004" : { + "balance" : "0x01", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "0ea65418d7bf32680f55572c943a94b590804998" : { + "balance" : "0x00", + "code" : "0x600061289f537c01000000000000000000000000000000000000000000000000000000006000350473c9ae5868651bf7b7db6e360217db49ce4e69c07e60205263c4982a8581141561012757600435606052602435608052608060805990590160009052600081526060518160200152608051816040015260008160600152809050205460a05260a051806020026020015990590160009052818152602081019050905060e0526000610140525b60a05161014051121561010b5760a060a0599059016000905260008152606051816020015260805181604001526001816060015261014051816080015280905020546101405160200260e051015260016101405101610140526100ad565b60e05160206040820352602060208203510260400160408203f3505b63cc1c944e8114156101765760043560605260243560805260806080599059016000905260008152606051816020015260805181604001526000816060015280905020546101a05260206101a0f35b6395a405b98114156101d5576004356060526024356080526044356101e05260a060a059905901600090526000815260605181602001526080518160400152600181606001526101e05181608001528090502054610200526020610200f35b6371ebb662811415610224576004356060526024356080526080608059905901600090526000815260605181602001526080518160400152600281606001528090502054610240526020610240f35b637a57a3db811415610325576004356060526024356080526044356102805260c060c0599059016000905260008152606051816020015260805181604001526003816060015261028051816080015260008160a0015280905020608060805990590160009052600081526060518160200152608051816040015260008160600152809050205460200280806020015990590160009052818152602081019050905060005b602083048112156102e95780840154816020028301526001810190506102c8565b602083066020036101000a60000381850154168160200283015281905090509050905060206040820352602060208203510260400160408203f3505b63f73dc690811415610394576004356060526024356080526044356103c0526064356103e05260c060c059905901600090526000815260605181602001526080518160400152600381606001526103c05181608001526103e0518160a001528090502054610400526020610400f35b6354cc61098114156103f3576004356060526024356080526044356103c05260a060a059905901600090526000815260605181602001526080518160400152600481606001526103c05181608001528090502054610440526020610440f35b63c63ef546811415610442576004356060526024356080526080608059905901600090526000815260605181602001526080518160400152600581606001528090502054610480526020610480f35b639381779b8114156105335760043560605260243560805260a060a059905901600090526000815260605181602001526080518160400152600681606001526000816080015280905020608060805990590160009052600081526060518160200152608051816040015260058160600152809050205460200280806020015990590160009052818152602081019050905060005b602083048112156104f75780840154816020028301526001810190506104d6565b602083066020036101000a60000381850154168160200283015281905090509050905060206040820352602060208203510260400160408203f3505b634f9c6eeb8114156106245760043560605260243560805260a060a059905901600090526000815260605181602001526080518160400152600781606001526000816080015280905020608060805990590160009052600081526060518160200152608051816040015260058160600152809050205460200280806020015990590160009052818152602081019050905060005b602083048112156105e85780840154816020028301526001810190506105c7565b602083066020036101000a60000381850154168160200283015281905090509050905060206040820352602060208203510260400160408203f3505b637dc121958114156107155760043560605260243560805260a060a059905901600090526000815260605181602001526080518160400152600881606001526000816080015280905020608060805990590160009052600081526060518160200152608051816040015260058160600152809050205460200280806020015990590160009052818152602081019050905060005b602083048112156106d95780840154816020028301526001810190506106b8565b602083066020036101000a60000381850154168160200283015281905090509050905060206040820352602060208203510260400160408203f3505b63fa9832d18114156108065760043560605260243560805260a060a059905901600090526000815260605181602001526080518160400152600981606001526000816080015280905020608060805990590160009052600081526060518160200152608051816040015260008160600152809050205460200280806020015990590160009052818152602081019050905060005b602083048112156107ca5780840154816020028301526001810190506107a9565b602083066020036101000a60000381850154168160200283015281905090509050905060206040820352602060208203510260400160408203f3505b632c5a40d58114156108f75760043560605260243560805260a060a059905901600090526000815260605181602001526080518160400152600a81606001526000816080015280905020608060805990590160009052600081526060518160200152608051816040015260058160600152809050205460200280806020015990590160009052818152602081019050905060005b602083048112156108bb57808401548160200283015260018101905061089a565b602083066020036101000a60000381850154168160200283015281905090509050905060206040820352602060208203510260400160408203f3505b63e05dcb568114156109eb5760043560605260243560805260a060a059905901600090526000815260605181602001526080518160400152600b81606001526000816080015280905020600260806080599059016000905260008152606051816020015260805181604001526000816060015280905020546020020180806020015990590160009052818152602081019050905060005b602083048112156109af57808401548160200283015260018101905061098e565b602083066020036101000a60000381850154168160200283015281905090509050905060206040820352602060208203510260400160408203f3505b63586b5be0811415610a3a576004356060526024356080526080608059905901600090526000815260605181602001526080518160400152600c81606001528090502054610b80526020610b80f35b63eb8af5aa811415610b585760043560605260243560805260a060a059905901600090526000815260605181602001526080518160400152600d81606001526000816080015280905020608060805990590160009052600081526060518160200152608051816040015260008160600152809050205460806080599059016000905260008152606051816020015260805181604001526005816060015280905020540560200280806020015990590160009052818152602081019050905060005b60208304811215610b1c578084015481602002830152600181019050610afb565b602083066020036101000a60000381850154168160200283015281905090509050905060206040820352602060208203510260400160408203f3505b637ab6ea8a811415610c765760043560605260243560805260a060a059905901600090526000815260605181602001526080518160400152600e81606001526000816080015280905020608060805990590160009052600081526060518160200152608051816040015260008160600152809050205460806080599059016000905260008152606051816020015260805181604001526005816060015280905020540560200280806020015990590160009052818152602081019050905060005b60208304811215610c3a578084015481602002830152600181019050610c19565b602083066020036101000a60000381850154168160200283015281905090509050905060206040820352602060208203510260400160408203f3505b632b810cb9811415610d945760043560605260243560805260a060a059905901600090526000815260605181602001526080518160400152600f81606001526000816080015280905020608060805990590160009052600081526060518160200152608051816040015260008160600152809050205460806080599059016000905260008152606051816020015260805181604001526005816060015280905020540560200280806020015990590160009052818152602081019050905060005b60208304811215610d58578084015481602002830152600181019050610d37565b602083066020036101000a60000381850154168160200283015281905090509050905060206040820352602060208203510260400160408203f3505b637fb42e46811415610e855760043560605260243560805260a060a059905901600090526000815260605181602001526080518160400152601081606001526000816080015280905020608060805990590160009052600081526060518160200152608051816040015260008160600152809050205460200280806020015990590160009052818152602081019050905060005b60208304811215610e49578084015481602002830152600181019050610e28565b602083066020036101000a60000381850154168160200283015281905090509050905060206040820352602060208203510260400160408203f3505b63734fa727811415610f765760043560605260243560805260a060a059905901600090526000815260605181602001526080518160400152601181606001526000816080015280905020608060805990590160009052600081526060518160200152608051816040015260008160600152809050205460200280806020015990590160009052818152602081019050905060005b60208304811215610f3a578084015481602002830152600181019050610f19565b602083066020036101000a60000381850154168160200283015281905090509050905060206040820352602060208203510260400160408203f3505b63c67fa8578114156110675760043560605260243560805260a060a059905901600090526000815260605181602001526080518160400152601281606001526000816080015280905020608060805990590160009052600081526060518160200152608051816040015260008160600152809050205460200280806020015990590160009052818152602081019050905060005b6020830481121561102b57808401548160200283015260018101905061100a565b602083066020036101000a60000381850154168160200283015281905090509050905060206040820352602060208203510260400160408203f3505b635ed853e48114156111855760043560605260243560805260a060a059905901600090526000815260605181602001526080518160400152601381606001526000816080015280905020608060805990590160009052600081526060518160200152608051816040015260008160600152809050205460806080599059016000905260008152606051816020015260805181604001526005816060015280905020540560200280806020015990590160009052818152602081019050905060005b60208304811215611149578084015481602002830152600181019050611128565b602083066020036101000a60000381850154168160200283015281905090509050905060206040820352602060208203510260400160408203f3505b63b86f51258114156112a35760043560605260243560805260a060a059905901600090526000815260605181602001526080518160400152601481606001526000816080015280905020608060805990590160009052600081526060518160200152608051816040015260008160600152809050205460806080599059016000905260008152606051816020015260805181604001526005816060015280905020540560200280806020015990590160009052818152602081019050905060005b60208304811215611267578084015481602002830152600181019050611246565b602083066020036101000a60000381850154168160200283015281905090509050905060206040820352602060208203510260400160408203f3505b63bc3d7d858114156113945760043560605260243560805260a060a059905901600090526000815260605181602001526080518160400152601581606001526000816080015280905020608060805990590160009052600081526060518160200152608051816040015260008160600152809050205460200280806020015990590160009052818152602081019050905060005b60208304811215611358578084015481602002830152600181019050611337565b602083066020036101000a60000381850154168160200283015281905090509050905060206040820352602060208203510260400160408203f3505b63a2302f2f81141561148157600435606052602435611680526044356116a0526116a05160a060a0599059016000905260008152606051816020015261168051816040015260018160600152608060805990590160009052600081526060518160200152611680518160400152600081606001528090502054816080015280905020556001608060805990590160009052600081526060518160200152611680518160400152600081606001528090502054016080608059905901600090526000815260605181602001526116805181604001526000816060015280905020556001611740526020611740f35b63058ca2bc8114156114dd576004356060526024356080526044356117605261176051608060805990590160009052600081526060518160200152608051816040015260028160600152809050205560016117a05260206117a0f35b635d3b965b8114156116175736599059016000905236600482376004356060526024356080526044356102805260643560208201016117e052608435611800525060c060c0599059016000905260008152606051816020015260805181604001526003816060015261028051816080015260008160a001528090502060206117e05103516020026020810460005b8181121561158c57806020026117e05101518482015560018101905061156b565b602083066020036101000a600003816020026117e05101511684820155505050506118005160806080599059016000905260008152606051816020015260805181604001526002816060015280905020540160806080599059016000905260008152606051816020015260805181604001526002816060015280905020556001611900526020611900f35b63b0e14f0f81141561167357600435606052602435608052604435611920526119205160806080599059016000905260008152606051816020015260805181604001526005816060015280905020556001611960526020611960f35b636acccdbc8114156117395736599059016000905236600482376004356060526024356080526044356020820101611980525060a060a05990590160009052600081526060518160200152608051816040015260068160600152600081608001528090502060206119805103516020026020810460005b8181121561170b5780602002611980510151848201556001810190506116ea565b602083066020036101000a600003816020026119805101511684820155505050506001611a40526020611a40f35b63a1fa51f98114156117ff5736599059016000905236600482376004356060526024356080526044356020820101611a60525060a060a0599059016000905260008152606051816020015260805181604001526007816060015260008160800152809050206020611a605103516020026020810460005b818112156117d15780602002611a60510151848201556001810190506117b0565b602083066020036101000a60000381602002611a605101511684820155505050506001611b20526020611b20f35b63cd87f43a8114156118c55736599059016000905236600482376004356060526024356080526044356020820101611b40525060a060a0599059016000905260008152606051816020015260805181604001526008816060015260008160800152809050206020611b405103516020026020810460005b818112156118975780602002611b4051015184820155600181019050611876565b602083066020036101000a60000381602002611b405101511684820155505050506001611c00526020611c00f35b63222a866381141561198b5736599059016000905236600482376004356060526024356080526044356020820101611c20525060a060a0599059016000905260008152606051816020015260805181604001526009816060015260008160800152809050206020611c205103516020026020810460005b8181121561195d5780602002611c205101518482015560018101905061193c565b602083066020036101000a60000381602002611c205101511684820155505050506001611ce0526020611ce0f35b63b39e1faa811415611a515736599059016000905236600482376004356060526024356080526044356020820101611d00525060a060a059905901600090526000815260605181602001526080518160400152600a816060015260008160800152809050206020611d005103516020026020810460005b81811215611a235780602002611d0051015184820155600181019050611a02565b602083066020036101000a60000381602002611d005101511684820155505050506001611dc0526020611dc0f35b63e365736b811415611b175736599059016000905236600482376004356060526024356080526044356020820101611de0525060a060a059905901600090526000815260605181602001526080518160400152600b816060015260008160800152809050206020611de05103516020026020810460005b81811215611ae95780602002611de051015184820155600181019050611ac8565b602083066020036101000a60000381602002611de05101511684820155505050506001611ea0526020611ea0f35b63aad7d6e3811415611b7357600435606052602435608052604435611ec052611ec0516080608059905901600090526000815260605181602001526080518160400152600c816060015280905020556001611f00526020611f00f35b6301112b27811415611c395736599059016000905236600482376004356060526024356080526044356020820101611f20525060a060a059905901600090526000815260605181602001526080518160400152600d816060015260008160800152809050206020611f205103516020026020810460005b81811215611c0b5780602002611f2051015184820155600181019050611bea565b602083066020036101000a60000381602002611f205101511684820155505050506001611fe0526020611fe0f35b63bdbb239b811415611cff5736599059016000905236600482376004356060526024356080526044356020820101612000525060a060a059905901600090526000815260605181602001526080518160400152600e8160600152600081608001528090502060206120005103516020026020810460005b81811215611cd1578060200261200051015184820155600181019050611cb0565b602083066020036101000a6000038160200261200051015116848201555050505060016120c05260206120c0f35b6305a0cd48811415611dc557365990590160009052366004823760043560605260243560805260443560208201016120e0525060a060a059905901600090526000815260605181602001526080518160400152600f8160600152600081608001528090502060206120e05103516020026020810460005b81811215611d9757806020026120e051015184820155600181019050611d76565b602083066020036101000a600003816020026120e051015116848201555050505060016121a05260206121a0f35b63aaa1fe35811415611e8b57365990590160009052366004823760043560605260243560805260443560208201016121c0525060a060a05990590160009052600081526060518160200152608051816040015260108160600152600081608001528090502060206121c05103516020026020810460005b81811215611e5d57806020026121c051015184820155600181019050611e3c565b602083066020036101000a600003816020026121c05101511684820155505050506001612280526020612280f35b632be4935d811415611f5157365990590160009052366004823760043560605260243560805260443560208201016122a0525060a060a05990590160009052600081526060518160200152608051816040015260118160600152600081608001528090502060206122a05103516020026020810460005b81811215611f2357806020026122a051015184820155600181019050611f02565b602083066020036101000a600003816020026122a05101511684820155505050506001612360526020612360f35b6313a8350d8114156120175736599059016000905236600482376004356060526024356080526044356020820101612380525060a060a05990590160009052600081526060518160200152608051816040015260128160600152600081608001528090502060206123805103516020026020810460005b81811215611fe9578060200261238051015184820155600181019050611fc8565b602083066020036101000a600003816020026123805101511684820155505050506001612440526020612440f35b63cb540b458114156120dd5736599059016000905236600482376004356060526024356080526044356020820101612460525060a060a05990590160009052600081526060518160200152608051816040015260138160600152600081608001528090502060206124605103516020026020810460005b818112156120af57806020026124605101518482015560018101905061208e565b602083066020036101000a600003816020026124605101511684820155505050506001612520526020612520f35b63be0306278114156121a35736599059016000905236600482376004356060526024356080526044356020820101612540525060a060a05990590160009052600081526060518160200152608051816040015260148160600152600081608001528090502060206125405103516020026020810460005b81811215612175578060200261254051015184820155600181019050612154565b602083066020036101000a600003816020026125405101511684820155505050506001612600526020612600f35b6383fd77f08114156122695736599059016000905236600482376004356060526024356080526044356020820101612620525060a060a05990590160009052600081526060518160200152608051816040015260158160600152600081608001528090502060206126205103516020026020810460005b8181121561223b57806020026126205101518482015560018101905061221a565b602083066020036101000a6000038160200261262051015116848201555050505060016126e05260206126e0f35b63594622058114156122d5576004356060526024356080526044356103c052606435612700526127005160a060a059905901600090526000815260605181602001526080518160400152600481606001526103c051816080015280905020556001612740526020612740f35b63bb8e419681141561244857600435606052602435612760526044356127805260006127a0525b6080608059905901600090526000815260605181602001526001612760510381604001526000816060015280905020546127a051121561243b5760a060a05990590160009052600081526060518160200152600161276051038160400152600181606001526127a0518160800152809050205460a060a05990590160009052600081526060518160200152612780518160400152600181606001526080608059905901600090526000815260605181602001526127805181604001526000816060015280905020548160800152809050205560016080608059905901600090526000815260605181602001526127805181604001526000816060015280905020540160806080599059016000905260008152606051816020015261278051816040015260008160600152809050205560016127a051016127a0526122fc565b6001612880526020612880f35b50", + "nonce" : "0x00", + "storage" : { + "0x065d5efdfcc0fba693dc9e467f633097ffdc97401901463ad0e28855486d1edf" : "0xb9d69098a6acfe0c6411bcaaf430f78d363a9adc32b78bc2e15ccd6e883e9784", + "0x12643ff300762717d27efb567b82c65560d7b43249d908504e5510863ab82aac" : "0x154cf60e137c594516a065149610b6a3989396a42581d5fd8919e711c55da225", + "0x1489023d18c5d10427c4aa8dc726e840eb5ae7f604a8e9243c61634fb009e4d7" : "0x04", + "0x1489023d18c5d10427c4aa8dc726e840eb5ae7f604a8e9243c61634fb009e4d8" : "0x01", + "0x1489023d18c5d10427c4aa8dc726e840eb5ae7f604a8e9243c61634fb009e4da" : "0xe365736b", + "0x1489023d18c5d10427c4aa8dc726e840eb5ae7f604a8e9243c61634fb009e4db" : "0x0f69b5", + "0x1489023d18c5d10427c4aa8dc726e840eb5ae7f604a8e9243c61634fb009e4dc" : "0x629e", + "0x1489023d18c5d10427c4aa8dc726e840eb5ae7f604a8e9243c61634fb009e4dd" : "0x60", + "0x1489023d18c5d10427c4aa8dc726e840eb5ae7f604a8e9243c61634fb009e4e0" : "0x2200", + "0x1489023d18c5d10427c4aa8dc726e840eb5ae7f604a8e9243c61634fb009e4e4" : "0x146000000000000000000000000000000000000000000000000000000000", + "0x1489023d18c5d10427c4aa8dc726e840eb5ae7f604a8e9243c61634fb009e4e6" : "0xe365736b00000000000000000000000000000000000000000000000000000000", + "0x1489023d18c5d10427c4aa8dc726e840eb5ae7f604a8e9243c61634fb009e4e7" : "0x0f69b500000000000000000000000000000000000000000000000000000000", + "0x1489023d18c5d10427c4aa8dc726e840eb5ae7f604a8e9243c61634fb009e4e8" : "0x629e00000000000000000000000000000000000000000000000000000000", + "0x1489023d18c5d10427c4aa8dc726e840eb5ae7f604a8e9243c61634fb009e4e9" : "0x6000000000000000000000000000000000000000000000000000000000", + "0x19efb13d6576359514ace5211988a8d51379fa88ccd2b886b409f842b13d7932" : "0xc849cc595b452d11c206d2eb8cdfa06de211e3ff19ee0e0276dc857c05d4fe", + "0x1b37e91bf8580c7c6bcf8cdff25c7ed78180124a94af6f30c40d476a3d079ad6" : "0xaba4cd295118a482a0a62579e35e4ba5bdd76146cc9e4d96172fce8be8977ab4", + "0x2bf9fd8facdd6fd9c84657f5ad7381a5aecf670cda68cb3c5829b6532c865506" : "0x53098a1d111586dbcc0d051846284f5803c63c313e7f7e6d84430435d11d4c50", + "0x3111bfd25728c0adfad0f8c1ad79cb1b91167267deca98de88f156ed25caeedc" : "0xad393086f30b49511b08fdd27ac78810b084c7cd7de6ac354f614c18ea9e7df4", + "0x3379e7ae125c5c5d623d1d993c1459b61d6723b1c30d1aa026c48f6a6155b8ea" : "0x8c4183732567a99a8a718e363391e102532f9a640e42968cf2354d9acc908bb0", + "0x34cabe0c7e64a2caa93fd8d6a0defc07acb9d44b13430fa3ae9282fffd40dee2" : "0x01", + "0x34cabe0c7e64a2caa93fd8d6a0defc07acb9d44b13430fa3ae9282fffd40dee3" : "0x01", + "0x34cabe0c7e64a2caa93fd8d6a0defc07acb9d44b13430fa3ae9282fffd40dee4" : "0x01", + "0x34cabe0c7e64a2caa93fd8d6a0defc07acb9d44b13430fa3ae9282fffd40dee5" : "0x01", + "0x39050607fe892059a6344ab0f594f382fb0b345cab373497246dbe86fe7e14e7" : "0x2b3bca833e482737e7e47b1568e6f890f8e1666490d38fe130abd6f0ccb109cf", + "0x417be8bc6791807372e0222a350bb8a5d67bbc8d7595c301d8a5a8372cfdcef1" : "0xabd4971b4605a7155802f70e08298b1ceb0e4e4eaccccd348f77a77227f73a7f", + "0x41e9a54b3ee0c276aa076babb161de12b0f8916b47f8f6fb85cc387cf34696dd" : "0x22f2f444ebda9d2913ffef5059b039ec9b5876aa71821991c2515bf79f64935e", + "0x45ceb8da6fb8936592d3bce4883f1a6a34d636f559e0a1070a5802a65ac39bd5" : "0x57a5122ff3bf737b0de0f9f08011a8648c19e43ff071fb7086234723c9383f1f", + "0x4aa6b934608a45c8f53a945c05ddee1814a3b9f63a048fc7ad3d47e67156f024" : "0xd03862becedada67b4825a0238f3e67495ccb595cd7d08f1bd5d3160644b9299", + "0x4b8b58f0b0e326a5907d1a810e5ff31e05b4cab45125b776db8577e7dbc46bce" : "0x2f0000000000000000", + "0x4c33460347337bfc7df08bf182988301b7b426a27a67f1c6c634f637c60e87ac" : "0xbab4ab2ad4eafe7c84ef6a8cd69157d9ce6b843793a2cd0877b8e91f63cb2d4d", + "0x58da0c0c256bba101ce36fad8bf838717a57e6ab850a191dc9c09da9ce56bf1b" : "0x05", + "0x5cb38b16db1d632086d4af695de7f5f242a6e40947067f96edd566fe2ac438ef" : "0x6d0be832b2007ea28cda705b73922cbf9794c5a25b89bd2f28b7347ed2b96c86", + "0x64a9621cc4ba92bf738c55010c609dfaa3972a1138c30b5adcef1ba2363b360e" : "0xd7953bfe8cb591f129fd0862a9e9c421151e2b5831560ff5215d23f751364b35", + "0x696664a5f0ab5acd9304a377fb684f2d3fe6bb60b8a95cb2bdbb57db767e7a84" : "0x154cf60e137c594516a065149610b6a3989396a42581d5fd8919e711c55da225", + "0x69ad1d19e617936abdf05133bf268dc8ced6b518f22b249b5860967d07006487" : "0x8c803b48b383ddabd1b3afe858efb48c203229b7317dd76149dddab4253b858a", + "0x70b3bf53996fac325eb67608a4eeb0cd0b55def6255d7ed42ad28ec07238b5d6" : "0x45e9723e9232b37207ecac1c97b8647d053625a578d450f7456280b2ff8efc27", + "0x7a9dcee62e3e02cc8e020f372df2efdeb835f091c1ef1dbe221072d1095aabd2" : "0x2f0000000000000000", + "0x7e4d8c0f6d8abb4ce1ae45b254046aceedabfa9548851b8b5d3e2c0637c985fd" : "0x0b", + "0x7e95f3cc3315d289c52253baaba29b1b00c86816e6b788d50795279a8baa00db" : "0x45e9723e9232b37207ecac1c97b8647d053625a578d450f7456280b2ff8efc27", + "0x8da187157087529ee4e9c381f8e3149c56acf3bdfda29b8b9b4532f24b83f5fe" : "0x8c4183732567a99a8a718e363391e102532f9a640e42968cf2354d9acc908bb0", + "0x9001f91ddaef87bc067886e874c0749998c9b58b2ec8472ca014ca8b55f88578" : "0x0fb76974eefca01f33fb38646c2d3c1536f1a763d7aff53ab7f877d4c5ea7fd0", + "0x9ed0cedd2a9a78d949f40019f53d10031aef6ed342c97e01fc03b481ee56b3cb" : "0x04", + "0x9fddf1db29caa5c1239edd86e9e0835cdfe41f7253ec78f62d3da8558d6f3cd7" : "0x104eef8fa35bf39f677d81855bc0b9f42317f32792e98e95e4df441deb634211", + "0xa0953566119395c11186b334805fc1a16175ecac0ecc93ae0322264f0dc2e40d" : "0x10c5a00466ab7c0adae1e93537cc275ea8cf23ff509d5466a1fd6f56b0a61d1b", + "0xaa0dbf8241ef3ae07c254e6869e84895ba2be0779a7f261c8308a3114be1c54a" : "0x04", + "0xaffe808b495d13a14391ce5f27c211c36da12826969cd7841ee0d81e5b900e2d" : "0x01", + "0xaffe808b495d13a14391ce5f27c211c36da12826969cd7841ee0d81e5b900e2e" : "0x01", + "0xb4a2b68c48ef78aeb641ee538fad51781022fd23ed9d93d211017db6a02376ce" : "0x0fbc06642245cf2fed7ed46ea0a18a7185830b6f2c4e0a4ca55246041e8bfa72", + "0xba8d79990898383919e437f2458b93b340072c89d963808d9e04f51858e3c5ec" : "0x41d2cac534d90a0dbd199117481a63e32cc11411dab2eaa36c91c0eec62823cf", + "0xbb3bc1a2015123750df57d4ceff7e28cb847910b79b34841de905b59a8bb177c" : "0x734417eb19e1873427257f1ea1594748c16cfa866a7b7cf896e281f2ec774a40", + "0xbf30cdcb83ab2bd5f5eee691ffa4107b58b75ba6a5c2e6754d4c5c0437f2876c" : "0x05", + "0xc2a26b80067fc36b8268b0d5b31afff953fa91cebea39f191e2763d6e71259b9" : "0x02a43c547fe8de2400d2a141016550e8bae058d41164247c099e787ddd40e789", + "0xc98339d275eef16e0562ca8521212cef61aa0f39b12e2a27502aaa97a9e5e70f" : "0x5a3de2a5c268cdb75f4b01507aa80c4e4a1bc67bcb0df265bbb00060774e5978", + "0xcbd6ae6bd61bc9270ec836f1919b3268113abe076c7febfdb8cf573b199ce9a9" : "0xf402b17773c1f7534034ee58dc0d2a3421470a7a67daf4fa790dc3b420eef790", + "0xd2c8cbb562fccd0c9a3d0d491b7f65cc6a89856498f933427d9d21b745b9d50e" : "0x3625a26fdb7b747501f1ee2500f98c49d9cd290383a21254587c3c49d2805321", + "0xd66f52a4e24585238ccc03443b2fdb8b2b100259bc7260f39097c7c339211ffe" : "0x1641851904381915c86b60df7e288896fb5f8ebad65d594829fb9f2b59cd1da6", + "0xd8f720c05a5526dd621d1831ae122abddd3dfecd8b63b0ba4c92fa7b2ade44ff" : "0xad393086f30b49511b08fdd27ac78810b084c7cd7de6ac354f614c18ea9e7df4", + "0xdc22d3171b82817c910bbeac1f8b50c8de99f8c524f172aef3491981bd5ed4fb" : "0x94b8cba4ea090d1c392fbc94b82fb9ef9f468a15bbc537f4d051776f4d422b1d", + "0xdce8adbdefa929dbe60245f359446db4174c62824b42e5d4d9e7b834b4d61deb" : "0x2c9069845b2e74c577ff1cd18df6bc452805f527a9ee91fd4a059e0408b5dea6", + "0xdd9493073db9e42fd955e834c89a74089f99196186ee0b2688124989be00d196" : "0x01", + "0xdd9493073db9e42fd955e834c89a74089f99196186ee0b2688124989be00d197" : "0x01", + "0xdd9493073db9e42fd955e834c89a74089f99196186ee0b2688124989be00d198" : "0x01", + "0xdd9493073db9e42fd955e834c89a74089f99196186ee0b2688124989be00d199" : "0x01", + "0xdd9493073db9e42fd955e834c89a74089f99196186ee0b2688124989be00d19a" : "0x01", + "0xe54f074c81bfa60b5bf413934c108086298b77291560edfeead8aa1232e95236" : "0x0f40aaa24323c9e6983ccffafeebe4b426509b901e8c98b8a40d881804804e6b", + "0xe66c0f55f66c752edf73027d45b7b1ae729ae15e1c67c362dbc6f25edf8d76ff" : "0x01", + "0xe983d899f807bbcb5881f2ddf875b2ebb5cb8a7a4e77a8c98a40aaae6a468735" : "0x6d0be832b2007ea28cda705b73922cbf9794c5a25b89bd2f28b7347ed2b96c86", + "0xed7d6e2d40fbd5046412ffad1c45b63d87c6197182d6dbc66bb1e5c6e4ded5c7" : "0xaba4cd295118a482a0a62579e35e4ba5bdd76146cc9e4d96172fce8be8977ab4", + "0xf043b5a1952847579f233706a8f130889a484d2da3e574fdd5859f05aaf52111" : "0x02", + "0xf40f4cfdacb62dd799f36b580349fac1f4a4caf8dd3383cc387c35adb6574e21" : "0x2f0000000000000000", + "0xf60fa6e25e9028a6dc6b26bbc1eadae3da157df0d1d6f6628bc33cad68a7e455" : "0x2d7d00618c059ebe40593b9497c633e1ac6e161dadbd5bb734c2663cd3e8a8e1", + "0xfd280ac5182d5b2366122f38acfa6dc471240ffde9d5feb985ce7a2325c960e7" : "0x03" + } + }, + "142a6927cf0060133187ba8a8e74d641438f0c1c" : { + "balance" : "0x00", + "code" : "0x600061031f537c01000000000000000000000000000000000000000000000000000000006000350473c9ae5868651bf7b7db6e360217db49ce4e69c07e602052730ea65418d7bf32680f55572c943a94b5908049986040526327138bfb81141561038d57600435608052601c6044599059016000905201637a66d7ca601c8203526080516004820152602060e06024836000602051602d5a03f15060e051905060a052601c604459905901600090520163c60409c6601c820352608051600482015260206101206024836000602051602d5a03f150610120519050430561010052600061014052600061016052600061018052600260a051016101005112151561010a576001610140525b60006101a052610100516101c0525b606461010051016101c051121561018457601c606459905901600090520163cc1c944e601c82035260805160048201526101c051602482015260206101e06044836000604051602d5a03f1506101e05190506101a051016101a05260016101c051016101c052610119565b6005601c606459905901600090520163cc1c944e601c820352608051600482015260a051602482015260206102006044836000604051602d5a03f1506102005190501280156101d357806101db565b600a6101a051125b9050156101eb57610140516101ee565b60005b1561033657601c604459905901600090520163c5476efe601c820352608051600482015260206102406024836000602051602d5a03f15061024051905050601c6064599059016000905201637265802d601c82035260805160048201526000602482015260206102606044836000602051602d5a03f15061026051905050601c606459905901600090520163c286273a601c82035260805160048201526000602482015260206102806044836000602051602d5a03f15061028051905050601c6044599059016000905201637a66d7ca601c820352608051600482015260206102a06024836000602051602d5a03f1506102a051905060a052601c608459905901600090520163bb8e4196601c820352608051600482015260a051602482015261010051604482015260206102c06064836000604051602d5a03f1506102c051905050610343565b6001610160526001610180525b61014051156103555761016051610358565b60005b156103665761018051610369565b60005b1561037f5760016102e05260206102e0f361038c565b6000610300526020610300f35b5b50", + "nonce" : "0x00", + "storage" : { + } + }, + "1cdc8315bdb1362de8b7b2fa9ee75dc873037179" : { + "balance" : "0xa783508eacef4001", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "9761fecf88590592cf05ce545504d376d1693ab3" : { + "balance" : "0x00", + "code" : "0x60006105df537c010000000000000000000000000000000000000000000000000000000060003504730ea65418d7bf32680f55572c943a94b59080499860205273e509e3a93beb1eba72f8cb8d25f93a85e2d54afb60405273c9ae5868651bf7b7db6e360217db49ce4e69c07e60605273f1562e1c0d0baa3ea746442bb7f11153fcf5cfda60805263546fdeb381141561038d5760043560c05260243560e05260443561010052606435610120526084356101405260026101005101601c606459905901600090520163e05dcb56601c82035260c051600482015260e05160248201526002610100510160408160200201599059016000905281602002604001816044856000602051602d5a03f150604081019050905090506000600161010051016020028201511415610250576060601c61014c59905901600090520163e365736b601c82035260c051600482015260e0516024820152601c6084599059016000905201632f300bee601c82035260026004820152600560248201526101005160448201528460408160200201599059016000905281602002604001816064856000608051602d5a03f1506040810190509050905060208103516020026020018360448401526020820360a4840152806101088401528084019350505081600401599059016000905260648160648460006004601cf16101fc57fe5b6064810192506101088201518080858260a487015160006004600a8705601201f161022357fe5b50808401935050808303602061028082846000602051602d5a03f15061028051905090509050905061037d565b6060601c61014c59905901600090520163e365736b601c82035260c051600482015260e0516024820152601c6084599059016000905201632f300bee601c820352600160016101005101602002850151036004820152600560248201526101005160448201528460408160200201599059016000905281602002604001816064856000608051602d5a03f1506040810190509050905060208103516020026020018360448401526020820360a4840152806101088401528084019350505081600401599059016000905260648160648460006004601cf161032d57fe5b6064810192506101088201518080858260a487015160006004600a8705601201f161035457fe5b5080840193505080830360206102c082846000602051602d5a03f1506102c05190509050905090505b5060016102e05260206102e0f350505b63de9080c88114156107645760043560c05260243560e05260443561010052606435610120526084356101405260026101005101601c606459905901600090520163e05dcb56601c82035260c051600482015260e05160248201528160408160200201599059016000905281602002604001816044856000602051602d5a03f15060408101905090509050601c6064599059016000905201632c5a40d5601c82035260c051600482015260e05160248201526101405160408160200201599059016000905281602002604001816044856000602051602d5a03f1506040810190509050905061012051806020026020015990590160009052818152602081019050905060005b610120518112156104ee57601c60645990590160009052016328c8b315601c82035260c051600482015281602482015260206103606044836000604051602d5a03f15061036051905081602002830152600181019050610493565b5060a0601c61020c59905901600090520163a647a5b9601c8203528460208103516020026020018360048401526020820360a484015280610148840152808401935050508360208103516020026020018360248401526020820360c484015280610168840152808401935050508260208103516020026020018360448401526020820360e4840152806101888401528084019350505061012051606482015261010051608482015281600401599059016000905260a48160a484600060046022f16105b557fe5b60a4810192506101488201518080858260a487015160006004600a8705601201f16105dc57fe5b508084019350506101688201518080858260c487015160006004600a8705601201f161060457fe5b508084019350506101888201518080858260e487015160006004600a8705601201f161062c57fe5b5080840193505080830387604081602002015990590160009052816020026040018184866000608051602d5a03f1506040810190509050905090509050905092506060601c61014c59905901600090520163e365736b601c82035260c051600482015260e05160248201528460208103516020026020018360448401526020820360a4840152806101088401528084019350505081600401599059016000905260648160648460006004601cf16106df57fe5b6064810192506101088201518080858260a487015160006004600a8705601201f161070657fe5b5080840193505080830360206103c082846000602051602d5a03f1506103c05190509050905090505060006101005160200284015114156107525760006103e05260206103e0f361075f565b6001610400526020610400f35b505050505b63384ca8dd811415610a665760043560c05260243560e052604435610100526064356101205260843561014052601c606459905901600090520163e05dcb56601c82035260c051600482015260e05160248201526002610100510160408160200201599059016000905281602002604001816044856000602051602d5a03f15060408101905090509050601c606459905901600090520163fa9832d1601c82035260c051600482015260e05160248201526101005160408160200201599059016000905281602002604001816044856000602051602d5a03f15060408101905090509050601c608459905901600090520163aad7d6e3601c82035260c051600482015260e05160248201526060601c61014c599059016000905201635b180229601c8203528360208103516020026020018360048401526020820360648401528060c8840152808401935050508460208103516020026020018360248401526020820360848401528060e88401528084019350505061010051604482015281600401599059016000905260648160648460006004601cf161090157fe5b60648101925060c882015180808582606487015160006004600a8705601201f161092757fe5b5080840193505060e882015180808582608487015160006004600a8705601201f161094e57fe5b50808401935050808303602061044082846000608051602d5a03f150610440519050905090509050604482015260206104606064836000602051602d5a03f150610460519050506060601c61014c59905901600090520163222a8663601c82035260c051600482015260e05160248201528260208103516020026020018360448401526020820360a4840152806101088401528084019350505081600401599059016000905260648160648460006004601cf1610a0757fe5b6064810192506101088201518080858260a487015160006004600a8705601201f1610a2e57fe5b50808401935050808303602061048082846000602051602d5a03f1506104805190509050905090505060016104a05260206104a0f350505b63d5dc5af1811415610d4b5760043560c05260243560e052604435610100526064356101205260843561014052601c606459905901600090520163e05dcb56601c82035260c051600482015260e05160248201526002610100510160408160200201599059016000905281602002604001816044856000602051602d5a03f15060408101905090509050601c6064599059016000905201632c5a40d5601c82035260c051600482015260e05160248201526101405160408160200201599059016000905281602002604001816044856000602051602d5a03f150604081019050905090506080601c6101ac59905901600090520163f4ca7dc4601c82035283602081035160200260200183600484015260208203608484015280610108840152808401935050508260208103516020026020018360248401526020820360a4840152806101288401528084019350505061012051604482015261010051606482015281600401599059016000905260848160848460006004601ff1610be757fe5b60848101925061010882015180808582608487015160006004600a8705601201f1610c0e57fe5b508084019350506101288201518080858260a487015160006004600a8705601201f1610c3657fe5b5080840193505080830361014051604081602002015990590160009052816020026040018184866000608051602d5a03f1506040810190509050905090509050905090506060601c61014c59905901600090520163b39e1faa601c82035260c051600482015260e05160248201528260208103516020026020018360448401526020820360a4840152806101088401528084019350505081600401599059016000905260648160648460006004601cf1610cec57fe5b6064810192506101088201518080858260a487015160006004600a8705601201f1610d1357fe5b5080840193505080830360206104c082846000602051602d5a03f1506104c05190509050905090505060016104e05260206104e0f350505b630939aa8c81141561114c5760043560c05260243560e052604435610100526064356101205260843561014052601c606459905901600090520163e05dcb56601c82035260c051600482015260e05160248201526002610100510160408160200201599059016000905281602002604001816044856000602051602d5a03f15060408101905090509050601c6064599059016000905201637dc12195601c82035260c051600482015260e05160248201526101405160408160200201599059016000905281602002604001816044856000602051602d5a03f15060408101905090509050601c606459905901600090520163586b5be0601c82035260c051600482015260e051602482015260206105006044836000602051602d5a03f150610500519050601c606459905901600090520163eb8af5aa601c82035260c051600482015260e05160248201526101205160408160200201599059016000905281602002604001816044856000602051602d5a03f1506040810190509050905060c0601c61026c59905901600090520163232b2734601c8203528260208103516020026020018360048401526020820360c484015280610188840152808401935050508560208103516020026020018360248401526020820360e4840152806101a88401528084019350505084602081035160200260200183604484015260208203610104840152806101c8840152808401935050508360648201526101205160848201526101005160a482015281600401599059016000905260c48160c484600060046025f1610f9657fe5b60c4810192506101888201518080858260c487015160006004600a8705601201f1610fbd57fe5b508084019350506101a88201518080858260e487015160006004600a8705601201f1610fe557fe5b508084019350506101c88201518080858261010487015160006004600a8705601201f161100e57fe5b5080840193505080830361012051604081602002015990590160009052816020026040018184866000608051602d5a03f1506040810190509050905090509050905090506060601c61014c5990590160009052016301112b27601c82035260c051600482015260e05160248201528260208103516020026020018360448401526020820360a4840152806101088401528084019350505081600401599059016000905260648160648460006004601cf16110c457fe5b6064810192506101088201518080858260a487015160006004600a8705601201f16110eb57fe5b50808401935050808303602061058082846000602051602d5a03f15061058051905090509050905050600060016101005101602002850151141561113a5760006105a05260206105a0f3611147565b60016105c05260206105c0f35b505050505b50", + "nonce" : "0x00", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0xd82fa36688cd90c000", + "code" : "0x", + "nonce" : "0x01", + "storage" : { + } + }, + "b03f030056db7d467d778326658bac0d1b35d8f7" : { + "balance" : "0x00", + "code" : "0x600061075f537c010000000000000000000000000000000000000000000000000000000060003504731e147037f0a63df228fe6e7aef730f1ea31c8ce3602052730ea65418d7bf32680f55572c943a94b59080499860405273e509e3a93beb1eba72f8cb8d25f93a85e2d54afb60605273c9ae5868651bf7b7db6e360217db49ce4e69c07e60805273142a6927cf0060133187ba8a8e74d641438f0c1c60a05273b163e767e4c1ba5ae88b2ee7594f3a3fec2bb09660c05273ba7b277319128ef4c22635534d0f61dffdaa13ab60e052739761fecf88590592cf05ce545504d376d1693ab36101005273f70bbc50f1468cecae0761ef09386a87c1c696ea6101205273a89d22f049aaa5bbfb5f1a1939fff3ae7a26ae746101405273174827f7e53e8ce13b047adcac0eb3f2cb0c3285610160526336a560bd811415610a88576004356101a052601c60445990590160009052016327138bfb601c8203526101a051600482015260206101e0602483600060a051602d5a03f1506101e05190501515610195576001600003610200526020610200f35b601c6044599059016000905201637a66d7ca601c8203526101a051600482015260206102206024836000608051602d5a03f150610220519050601c606459905901600090520163cc1c944e601c8203526101a05160048201528160248201526020610260604483600061028051602d5a03f150610260519050601c60445990590160009052016380b5e7bd601c8203526101a051600482015260206102a06024836000606051602d5a03f1506102a0519050808202601c60445990590160009052016318633576601c8203526101a051600482015260206103006024836000608051602d5a03f150610300519050600981141561036d57601c60c459905901600090520163ac44d71e601c8203526101a0516004820152856024820152846044820152836064820152826084820152602061036060a483600061016051602d5a03f15061036051905050601c6064599059016000905201637265802d601c8203526101a05160048201526000602482015260206103806044836000608051602d5a03f15061038051905050601c604459905901600090520163c5476efe601c8203526101a051600482015260206103a06024836000608051602d5a03f1506103a051905050600185016103c05260206103c0f3610a3a565b60008114156103cd57601c60c459905901600090520163ef72638a601c8203526101a051600482015285602482015284604482015283606482015282608482015260206103e060a483600060c051602d5a03f1506103e051905050610a39565b600181141561042d57601c60c459905901600090520163a63e976c601c8203526101a0516004820152856024820152846044820152836064820152826084820152602061040060a483600060e051602d5a03f15061040051905050610a38565b600281141561048d57601c60c459905901600090520163533ea0ed601c8203526101a0516004820152856024820152846044820152836064820152826084820152602061042060a483600060e051602d5a03f15061042051905050610a37565b600381141561085057601c606459905901600090520163e05dcb56601c8203526101a0516004820152856024820152600285016040816020020159905901600090528160200260400181604485600061028051602d5a03f15060408101905090509050601c6044599059016000905201633d905045601c8203526101a051600482015260206104806024836000608051602d5a03f150610480519050600481141561063357601c60c4599059016000905201630939aa8c601c8203526101a051600482015287602482015286604482015285606482015284608482015260206104e060a483600061010051602d5a03f1506104e05190506104c052601c606459905901600090520163c286273a601c8203526101a05160048201526000602482015260206105006044836000608051602d5a03f1506105005190505060016104c05114156105e55782610520526020610520f361062e565b601c604459905901600090520163aac2ffb5601c8203526101a051600482015260206105406024836000608051602d5a03f1506105405190505060018301610560526020610560f35b610804565b600081141561069457601c60c459905901600090520163546fdeb3601c8203526101a0516004820152876024820152866044820152856064820152846084820152602061058060a483600061010051602d5a03f15061058051905050610803565b6001811415610742576000601c60c459905901600090520163de9080c8601c8203526101a051600482015288602482015287604482015286606482015285608482015260206105a060a483600061010051602d5a03f1506105a0519050141561073257601c6044599059016000905201631cda01ef601c8203526101a051600482015260206105c06024836000608051602d5a03f1506105c0519050505b826105e05260206105e0f3610802565b60028114156107a357601c60c459905901600090520163384ca8dd601c8203526101a0516004820152876024820152866044820152856064820152846084820152602061060060a483600061010051602d5a03f15061060051905050610801565b600381141561080057601c60c459905901600090520163d5dc5af1601c8203526101a0516004820152876024820152866044820152856064820152846084820152602061062060a483600061010051602d5a03f150610620519050505b5b5b5b5b601c6044599059016000905201631cda01ef601c8203526101a051600482015260206106406024836000608051602d5a03f1506106405190505082610660526020610660f35050610a36565b60048114156108b157601c60c459905901600090520163f6559853601c8203526101a0516004820152856024820152846044820152836064820152826084820152602061068060a483600061012051602d5a03f15061068051905050610a35565b600581141561091257601c60c459905901600090520163d8e5473d601c8203526101a051600482015285602482015284604482015283606482015282608482015260206106a060a483600061012051602d5a03f1506106a051905050610a34565b600681141561097357601c60c459905901600090520163090507ea601c8203526101a051600482015285602482015284604482015283606482015282608482015260206106c060a483600061012051602d5a03f1506106c051905050610a33565b60078114156109d457601c60c4599059016000905201635b911842601c8203526101a051600482015285602482015284604482015283606482015282608482015260206106e060a483600061014051602d5a03f1506106e051905050610a32565b6008811415610a3157601c60c459905901600090520163abe22b84601c8203526101a0516004820152856024820152846044820152836064820152826084820152602061070060a483600061014051602d5a03f150610700519050505b5b5b5b5b5b5b5b5b5b601c604459905901600090520163aac2ffb5601c8203526101a051600482015260206107206024836000608051602d5a03f1506107205190505060018101610740526020610740f350505050505b50", + "nonce" : "0x00", + "storage" : { + } + }, + "c9ae5868651bf7b7db6e360217db49ce4e69c07e" : { + "balance" : "0x00", + "code" : "0x600061083f537c010000000000000000000000000000000000000000000000000000000060003504637a66d7ca8114156100665760043560405260606060599059016000905260008152604051816020015260008160400152809050205460605260206060f35b63c60409c68114156100a55760043560405260606060599059016000905260008152604051816020015260018160400152809050205460a052602060a0f35b63186335768114156100e45760043560405260606060599059016000905260008152604051816020015260028160400152809050205460e052602060e0f35b63b3903c8a8114156101bc57600435604052606060605990590160009052600081526040518160200152600581604001528090502054610120526101205180602002602001599059016000905281815260208101905090506101605260006101c0525b610120516101c051121561019f57608060805990590160009052600081526040518160200152600481604001526101c051816060015280905020546101c05160200261016051015260016101c051016101c052610147565b6101605160206040820352602060208203510260400160408203f3505b636824e0fb8114156101fd57600435604052606060605990590160009052600081526040518160200152600581604001528090502054610220526020610220f35b633db16be381141561023e57600435604052606060605990590160009052600081526040518160200152600681604001528090502054610260526020610260f35b63c33878588114156102e05760006102a0526000546102c0526102c05180602002602001599059016000905281815260208101905090506102e0525b6102c0516102a05112156102c357604060405990590160009052600181526102a051816020015280905020546102a0516020026102e051015260016102a051016102a05261027a565b6102e05160206040820352602060208203510260400160408203f3505b63175c63228114156102fa57600054610380526020610380f35b63d861f2b4811415610336576004356103a052604060405990590160009052600181526103a051816020015280905020546103c05260206103c0f35b63b0dab01f81141561044f57600435610400526024356104205260443561044052606435610460526000606060605990590160009052600081526104005181602001526001816040015280905020541415610441576104205160606060599059016000905260008152610400518160200152600081604001528090502055610440516060606059905901600090526000815261040051816020015260018160400152809050205561046051606060605990590160009052600081526104005181602001526006816040015280905020556104005160406040599059016000905260018152600054816020015280905020556001600054016000556001610520526020610520f361044e565b6000610540526020610540f35b5b63aac2ffb58114156104b95760043560405260016060606059905901600090526000815260405181602001526002816040015280905020540160606060599059016000905260008152604051816020015260028160400152809050205560016105a05260206105a0f35b637265802d811415610507576004356040526024356105c0526105c0516060606059905901600090526000815260405181602001526002816040015280905020556001610600526020610600f35b63c5476efe811415610571576004356040526001606060605990590160009052600081526040518160200152600081604001528090502054016060606059905901600090526000815260405181602001526000816040015280905020556001610660526020610660f35b63c551e31e81141561063b576004356040526024356106805260606060599059016000905260008152604051816020015260058160400152809050205461012052610680516080608059905901600090526000815260405181602001526004816040015261012051816060015280905020556001606060605990590160009052600081526040518160200152600581604001528090502054016060606059905901600090526000815260405181602001526005816040015280905020556001610720526020610720f35b633d90504581141561067c57600435604052606060605990590160009052600081526040518160200152600381604001528090502054610740526020610740f35b631cda01ef8114156106e65760043560405260016060606059905901600090526000815260405181602001526003816040015280905020540160606060599059016000905260008152604051816020015260038160400152809050205560016107c05260206107c0f35b63c286273a811415610734576004356040526024356107e0526107e0516060606059905901600090526000815260405181602001526003816040015280905020556001610820526020610820f35b50", + "nonce" : "0x00", + "storage" : { + "0x00" : "0x01", + "0x0a4470e9d0419df71f6257fcdfd2c0a3bad96a23f5ab414bc10aaf1a31a536a7" : "0xb4876148229c22bd2291f1a4f5468c8c789b23639370c4d447f270ba341dbbec", + "0x16ef4193a274568d283ff919c299729e07696d9ada48187b81d68e12e7b962de" : "0x0a103c04e7ecb9b3395f77c7b0cad28e62c85f042de4767ccc6c005e6f47f8d4", + "0x1f1866e966f321b84535705846689749d34d5dc02994613e2931973c605d9e93" : "0xc723d0aa4a60529fe42277c8094aa19263aff36650136efc5edfd0785d457634", + "0x252a4ec7133643fddcdb22a86c415f78b2dd251f18d1efcd6a44acf590c4ae72" : "0x9caf94b82715869e71d3cee986094ea612f0258570b7e5ef47b5d09e9515322b", + "0x41b451e8d86d28add758cbd3f48a18fd04b11a80288c1dc434a5bf2d8fb1ca64" : "0xb602498f12a8b4af3a1fca357cea6b19bcd163dfec1d845364ce1395f7c21fa7", + "0x491d10658c1ec762152d8ad2d890ad59111b1ee7b4bc25736046923d3534d9a5" : "0x629e", + "0x5b0e8552efd72a845e47318abbbef9dc9fcdfe0d1a06cda44494401301581511" : "0xfbc98f4017ae5c20459daadaa6bee519b6de871d3dbaa9ab3f34340fef4cb643", + "0x5b672a107ba6fab01cbddf079042e9f6176a8e6f154584fc4df4b15674c9456e" : "0x1603da41d610854d85536b37d000e5eb7ca09786c43f50e7441c0afbff1de0a9", + "0x605b934bd26c9ecdf7029a7dc062d3a6b87338511cff96e0c5f13de9eea3462e" : "0xf0d24f3d0eda573fc5d43e3d0680993c51293752cd6de205040d3197f412f475", + "0x618355e25491dfe86175f9d9b3147e4d680aa561d98384e3621dc6a3088b0846" : "0x6b2e6d2d5deb27dffec973f23af4caf111e66d1397f467dbbedf5ab2192fb6b6", + "0x65112936bec0f1e84fda6623fb54e12baadc8a4a208c8c4eb3ed5e79cbd7e85f" : "0xa59ac24e3e0663413d0f87516ba8fb44c6c3e14da8eaabbde80f8ee285f65934", + "0x687cb2122de7bacf42b9cd380b04ff2a2ce92a0b63706a9a78263b3ce86f3313" : "0x0200000000000000", + "0x72a539b064c98d29a514ee55694225e05fb41fe63e5fe710e4536bd9ba3591b4" : "0x338ecfe6c523ed1184918b19584d97dd1095ecaadc49c7ba9da62b8b513026e0", + "0x7aeb0a0ce8882a12d853078382a2bc72f7a94af6109f167de37b36c0a7deb828" : "0x4c428400ea8a7bd7c46ba9895b508770efa4551f0d793e1beb1207da01d9962f", + "0x7c8f4a98e086f64e28c75f54712b5d44bec3c29b5c70519e8880d3046a5618dc" : "0xaafc1f2601752b114d722070f75539bfec7faf49f0d48a48d27862f0c3b09903", + "0x809c325f50acf5787776e960985e72443b4330ad1e2f466557fffee16ba51d44" : "0xb940a56e64b5b661d87919b8ef03640ec077a6d72dd0b524adedaa7ddc91ff7a", + "0x84e4a80d33c5d2abd2b0a5aec0fdc5eaeed90ab31db556e404a81718ea286e39" : "0x1c", + "0x877305412fa2486f563c457b744e5c8b1e4d0eca73371de5e771f2abc263f4dc" : "0x7088a36f67276d475aa62127cfde9790cc802fdf3a54df49461a25eb8bf15707", + "0x922a8f2fc1cbe67c8acc6a8a720983c366d71d3e2e78e3048949ebc913ea611a" : "0x50fb9f913ca102534bb0a8eb8ebf19c68dfd16ffe5e207bcc580084cd4ecd8b4", + "0x987cb9ecfd8ce499d9d0e9e6b7da29617aa02774a34f4a8ea54442f44a1e1936" : "0x5179f98f555f1e9f1d4a335d16f41154579a53e361e9859269b6fa74ea9c7d21", + "0xada5013122d395ba3c54772283fb069b10426056ef8ca54750cb9bb552a59e7d" : "0x0f69b5", + "0xb16b117660f31197087f4d6fe50d3d4579152244956f753f9653ccf85f4b35c4" : "0x830272e3bb35226b047244cbdc46f1b6b864a280461e7a592f70e0863f4f1d33", + "0xb1f1aaedfb83c7755a2bffc9e2557f1723f9abe5642397963e76248c9209af57" : "0xe9be955c5fbfcd846d7425eaea05ce897786aefad99665342cbf30761b352526", + "0xb7bd50fdf7b043411c9ac33f0af2cebc69c393eb0b91f4976946f9c7b15ad0da" : "0xfccca0e7832bae9afe799a6d6177dc3869fa6c5b5105f8df6f365de5723820ec", + "0xbc96058eb03504ee6f5c0a9582f8720d99a6e9738b171499507facff0b2c0b5b" : "0x9db6a4f2766b51013b8d2f9038131d1bb4af725d019d111d7e26ff96c023b23f", + "0xc186c4f377b7f13892ade9656acd1522aa1f8ac151ac4f62457b5073241d79fc" : "0x7289738fef00f1770eeb098db9bd486c01ac12398d79cdf935514a128c585c51", + "0xcae57ae3017972d63effd8eae44f5054402c3e890d154b905ed6b5b533327fa9" : "0xd2e4bf465e61993d13089b940a7c55017a5117d8e43e4115550a139e1d4b3e3a", + "0xcf569ee7bf3accc0f893dffd04f1a757f373efe80893eff504fb3678f688ec1d" : "0x03", + "0xd69b7284545a9f5275df64ce94848dc954fcb8a8b525e7ac801517c12a75af84" : "0x4202995350abae303b43e564aa79121a30b5f1aea31f69cd25e07dd3fa64dce7", + "0xd8f6f90f51e657690ee28d1cc80d81bc1b89290065891fdd853d09caaaf756aa" : "0x01", + "0xde72f8eed43cc2a5a3eaa51483d14b17dc92bb26c154ae184cee4b4895011edc" : "0x47ce2b6fdb72c3fabb9c74f82c1e3e522bcd42e614fd85c208ac3c4c840cea72", + "0xe0e687ddf317f3d2b209ae3884148eff0f636e16827f82eded14ada8fc603009" : "0xfa7c8939f9b033162cf8d75ea69671bb8a27041bd4cdc76594e61e99333cb041", + "0xe8cda339d72a1a350b62f1e3fa52e254c395cc9fdd9f60adb21c7633fbdab531" : "0x128c4fdf4801a30eae99dd58f0f3ff5ca65f71b66a9ac0f38dd450fb24b4aaaa", + "0xec5e7f54fa5e516e616b04f9d5a0ee433a80e09ed47d7e5269afd76c05ff251e" : "0x14", + "0xf9a3bf5f2ccb903ee1a7644113b794db0260de404fb8f11203e75a7fff151618" : "0xbd94773c0d85c68240ae8dfd53d9d33cd137509bfc5d3433381299df768c8377" + } + }, + "e509e3a93beb1eba72f8cb8d25f93a85e2d54afb" : { + "balance" : "0x00", + "code" : "0x6000610b7f537c01000000000000000000000000000000000000000000000000000000006000350473c9ae5868651bf7b7db6e360217db49ce4e69c07e6020526308d3d58781141561024557600435606052606060605990590160009052600081526060518160200152600181604001528090502054608052600060806080599059016000905260008152606051816020015260028160400152328160600152809050205414151561014e57608060805990590160009052600081526060518160200152600281604001523281606001528090502054608052682f000000000000000060a060a059905901600090526000815260605181602001526000816040015260805181606001526000816080015280905020553260a060a05990590160009052600081526060518160200152600081604001526080518160600152600181608001528090502055610238565b608051608060805990590160009052600081526060518160200152600281604001523281606001528090502055682f000000000000000060a060a059905901600090526000815260605181602001526000816040015260805181606001526000816080015280905020553260a060a059905901600090526000815260605181602001526000816040015260805181606001526001816080015280905020556001606060605990590160009052600081526060518160200152600181604001528090502054016060606059905901600090526000815260605181602001526001816040015280905020555b60016101e05260206101e0f35b6328c8b31581141561029d576004356060526024356102005260a060a0599059016000905260008152606051816020015260008160400152610200518160600152600081608001528090502054610220526020610220f35b6374af23ec8114156103865760043560605260243561026052608060805990590160009052600081526060518160200152600281604001526102605181606001528090502054610200526000610200511415610332576102605160a060a05990590160009052600081526060518160200152600081604001526102005181606001526001816080015280905020541415610335565b60005b156103475760006102c05260206102c0f35b60a060a05990590160009052600081526060518160200152600081604001526102005181606001526000816080015280905020546102e05260206102e0f35b6384d646ee8114156103dc5760043560605260243560805260a060a05990590160009052600081526060518160200152600081604001526080518160600152600181608001528090502054610320526020610320f35b63f42294278114156106f45760043561026052601c602459905901600090520163175c6322601c82035260206103a06004836000602051602d5a03f1506103a0519050610360526102605115610581576103605160020280602002602001599059016000905281815260208101905090506103c05261036051806020026020015990590160009052818152602081019050905061042052601c602459905901600090520163c3387858601c8203526103605160408160200201599059016000905281602002604001816004856000602051602d5a03f150604081019050905090506104205260006104c05260006104e0525b610360516104c051121561057c576104c051602002610420510151606052601c60645990590160009052016374af23ec601c82035260605160048201526102605160248201526020610520604483600030602d5a03f1506105205190506105005260006105005114151561056c576060516104e0516020026103c05101526105005160016104e051016020026103c051015260026104e051016104e0525b60016104c051016104c0526104ce565b6106d7565b32610260526103605160020280602002602001599059016000905281815260208101905090506103c05261036051806020026020015990590160009052818152602081019050905061042052601c602459905901600090520163c3387858601c8203526103605160408160200201599059016000905281602002604001816004856000602051602d5a03f150604081019050905090506104205260006104c05260006104e0525b610360516104c05112156106d6576104c051602002610420510151606052601c60645990590160009052016374af23ec601c820352606051600482015261026051602482015260206105c0604483600030602d5a03f1506105c0519050610500526000610500511415156106c6576060516104e0516020026103c05101526105005160016104e051016020026103c051015260026104e051016104e0525b60016104c051016104c052610628565b5b6103c05160206040820352602060208203510260400160408203f3505b6380b5e7bd81141561073557600435606052606060605990590160009052600081526060518160200152600181604001528090502054610600526020610600f35b63156f1c328114156107865760043560605260243561064052608060805990590160009052600081526060518160200152600281604001526106405181606001528090502054610660526020610660f35b63b3a24fc081141561087857365990590160009052366004823760043560208201016106c0526024356106e05250600260206106c0510351018060200260200159905901600090528181526020810190509050610700523261070051526106e051602061070051015260026104c0525b600260206106c0510351016104c05112156108385760026104c051036020026106c05101516104c05160200261070051015260016104c051016104c0526107f6565b60206107005103516020026020599059016000905260208183610700516000600287604801f15080519050905061076052610760516107c05260206107c0f35b63e346f5fc811415610a1c576004356107e0526024356108005260006104c0525b606060605990590160009052600081526107e05181602001526001816040015280905020546104c05112156109e65760a060a05990590160009052600081526107e0518160200152600081604001526104c0518160600152600181608001528090502054610840526108405160a060a0599059016000905260008152610800518160200152600081604001526104c051816060015260018160800152809050205560a060a05990590160009052600081526107e0518160200152600081604001526104c051816060015260008160800152809050205460a060a0599059016000905260008152610800518160200152600081604001526104c05181606001526000816080015280905020556104c0516080608059905901600090526000815261080051816020015260028160400152610840518160600152809050205560016104c051016104c052610899565b6104c051606060605990590160009052600081526108005181602001526001816040015280905020556001610920526020610920f35b633fb57036811415610b5457600435606052602435610940526060606059905901600090526000815260605181602001526001816040015280905020546109605261096051608060805990590160009052600081526060518160200152600281604001526109405181606001528090502055600060a060a05990590160009052600081526060518160200152600081604001526109605181606001526000816080015280905020556109405160a060a05990590160009052600081526060518160200152600081604001526109605181606001526001816080015280905020556001606060605990590160009052600081526060518160200152600181604001528090502054016060606059905901600090526000815260605181602001526001816040015280905020556001610a40526020610a40f35b6312709a33811415610beb57600435606052602435608052604435610a6052610a605160a060a059905901600090526000815260605181602001526000816040015260805181606001526000816080015280905020540160a060a059905901600090526000815260605181602001526000816040015260805181606001526000816080015280905020556001610ac0526020610ac0f35b633229cf6e811415610c8257600435606052602435608052604435610a6052610a605160a060a059905901600090526000815260605181602001526000816040015260805181606001526000816080015280905020540360a060a059905901600090526000815260605181602001526000816040015260805181606001526000816080015280905020556001610b20526020610b20f35b63a75f5c6a811415610ce557600435606052602435608052604435610a6052610a605160a060a059905901600090526000815260605181602001526000816040015260805181606001526000816080015280905020556001610b60526020610b60f35b50", + "nonce" : "0x00", + "storage" : { + "0x0f299dbbe3a7a5d949fe794e9a47b3106699c8110ff986eb84921c183e69e7f0" : "0x2f0000000000000000", + "0x1edcd36f61cae5dc6414157dfbadf9f11ca013ac763e27f8af55feaa8a239c89" : "0x01", + "0x689082d076ec3c02cbe4b99f6d9833e3c4a161072fd42fb7649eee5189a67ccc" : "0x63524e3fe4791aefce1e932bbfb3fdf375bfad89", + "0xaf1d6676be3ab502a59d91f6f5c49baffc15b2cfc65a41c4d96857c0f535adba" : "0x01d60000000000000000", + "0xdf1a770f69d93d1719292f384fdb4da22c0e88aef2ba462bff16674bc7848730" : "0x1c11aa45c792e202e9ffdc2f12f99d0d209bef70", + "0xec5e7f54fa5e516e616b04f9d5a0ee433a80e09ed47d7e5269afd76c05ff251e" : "0x02" + } + }, + "f1562e1c0d0baa3ea746442bb7f11153fcf5cfda" : { + "balance" : "0x00", + "code" : "0x600061067f537c010000000000000000000000000000000000000000000000000000000060003504632f300bee8114156100ac576004356040526024356060526044356080526002608051018080602002602001599059016000905281815260208101905090506801000000000000000081526060516080516020028201526001604051036001608051016020028201528060206040820352602060208203510260400160408203f35050505b63a647a5b98114156102c85736599059016000905236600482376004356020820101610100526024356020820101610160526044356020820101610180526064356101a05260843560805250602061010051035180806020026020015990590160009052818152602081019050905060005b6101a0518112156101d557600060005b608051811215610162578060200261010051015181608051850201602002610160510151028201915060018101905061012e565b50680100000000000000008105905060005b6080518112156101c857700100000000000000000000000000000000836020026101805101518260805186020160200261016051015184020205816020028501510381602002850152600181019050610174565b505060018101905061011e565b50600060005b60805181121561020357806020028301518160200284015102820191506001810190506101db565b5068010000000000000000810590506002810560005b600b81121561024257600282680100000000000000008502058301059150600181019050610219565b5060005b60805181121561027657816801000000000000000082602002860151020581602002850152600181019050610246565b5050506001608051602002610100510151036080516020028201526001608051016020026101005101516001608051016020028201528060206040820352602060208203510260400160408203f35050505b635b18022981141561037957365990590160009052366004823760043560208201016103005260243560208201016103205260443560805250600060005b60805181121561033f57680100000000000000008160200261032051015182602002610300510151020582019150600181019050610306565b6000610320515114151561036657610320515168010000000000000000830205915061036b565b600091505b81610380526020610380f350505b63f4ca7dc481141561057157365990590160009052366004823760043560208201016103a05260243560208201016103c0526044356101a0526064356080525060206103c051035160026080510a806020026020015990590160009052818152602081019050905060005b60805181121561044d5760005b6080518112156104415768010000000000000000816020026103a0510151836020026103a051015102058160805184020160200284015101816080518402016020028401526001810190506103f1565b506001810190506103e4565b81905090508180602002602001599059016000905281815260208101905090506080516101a05102806020026020015990590160009052818152602081019050905060005b6101a05181121561051e5760005b6080518112156105125760005b608051811215610506576801000000000000000082608051830201602002870151826080518602016020026103c051015102058260805185020160200285015101826080518502016020028501526001810190506104ad565b506001810190506104a0565b50600181019050610492565b819050905060005b848112156105525780602002820151816020026103c05101510381602002840152600181019050610526565b508160206040820352602060208203510260400160408203f350505050505b63232b273481141561069d57365990590160009052366004823760043560208201016106205260243560208201016102805260443560208201016103c052606435610640526084356101a05260a435608052506000610280515112156106025760005b6080518112156106005780602002610280510151600003816020026102805101526001810190506105d4565b505b60005b6101a05181121561067f5760005b60805181121561067357680100000000000000006801000000000000000082602002610280510151610640510205826080518502016020026103c05101510205826020026106205101510182602002610620510152600181019050610613565b50600181019050610605565b6106205160206040820352602060208203510260400160408203f350505b50", + "nonce" : "0x00", + "storage" : { + } + } + }, + "postStateRoot" : "4ac24e3a630456e47fc48b3eaca67086047443b5152267eefc5f08a337f1ac03", + "pre" : { + "0000000000000000000000000000000000000000" : { + "balance" : "0x01", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "0000000000000000000000000000000000000001" : { + "balance" : "0x01", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "0000000000000000000000000000000000000002" : { + "balance" : "0x01", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "0000000000000000000000000000000000000003" : { + "balance" : "0x01", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "0000000000000000000000000000000000000004" : { + "balance" : "0x01", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "0ea65418d7bf32680f55572c943a94b590804998" : { + "balance" : "0x00", + "code" : "0x600061289f537c01000000000000000000000000000000000000000000000000000000006000350473c9ae5868651bf7b7db6e360217db49ce4e69c07e60205263c4982a8581141561012757600435606052602435608052608060805990590160009052600081526060518160200152608051816040015260008160600152809050205460a05260a051806020026020015990590160009052818152602081019050905060e0526000610140525b60a05161014051121561010b5760a060a0599059016000905260008152606051816020015260805181604001526001816060015261014051816080015280905020546101405160200260e051015260016101405101610140526100ad565b60e05160206040820352602060208203510260400160408203f3505b63cc1c944e8114156101765760043560605260243560805260806080599059016000905260008152606051816020015260805181604001526000816060015280905020546101a05260206101a0f35b6395a405b98114156101d5576004356060526024356080526044356101e05260a060a059905901600090526000815260605181602001526080518160400152600181606001526101e05181608001528090502054610200526020610200f35b6371ebb662811415610224576004356060526024356080526080608059905901600090526000815260605181602001526080518160400152600281606001528090502054610240526020610240f35b637a57a3db811415610325576004356060526024356080526044356102805260c060c0599059016000905260008152606051816020015260805181604001526003816060015261028051816080015260008160a0015280905020608060805990590160009052600081526060518160200152608051816040015260008160600152809050205460200280806020015990590160009052818152602081019050905060005b602083048112156102e95780840154816020028301526001810190506102c8565b602083066020036101000a60000381850154168160200283015281905090509050905060206040820352602060208203510260400160408203f3505b63f73dc690811415610394576004356060526024356080526044356103c0526064356103e05260c060c059905901600090526000815260605181602001526080518160400152600381606001526103c05181608001526103e0518160a001528090502054610400526020610400f35b6354cc61098114156103f3576004356060526024356080526044356103c05260a060a059905901600090526000815260605181602001526080518160400152600481606001526103c05181608001528090502054610440526020610440f35b63c63ef546811415610442576004356060526024356080526080608059905901600090526000815260605181602001526080518160400152600581606001528090502054610480526020610480f35b639381779b8114156105335760043560605260243560805260a060a059905901600090526000815260605181602001526080518160400152600681606001526000816080015280905020608060805990590160009052600081526060518160200152608051816040015260058160600152809050205460200280806020015990590160009052818152602081019050905060005b602083048112156104f75780840154816020028301526001810190506104d6565b602083066020036101000a60000381850154168160200283015281905090509050905060206040820352602060208203510260400160408203f3505b634f9c6eeb8114156106245760043560605260243560805260a060a059905901600090526000815260605181602001526080518160400152600781606001526000816080015280905020608060805990590160009052600081526060518160200152608051816040015260058160600152809050205460200280806020015990590160009052818152602081019050905060005b602083048112156105e85780840154816020028301526001810190506105c7565b602083066020036101000a60000381850154168160200283015281905090509050905060206040820352602060208203510260400160408203f3505b637dc121958114156107155760043560605260243560805260a060a059905901600090526000815260605181602001526080518160400152600881606001526000816080015280905020608060805990590160009052600081526060518160200152608051816040015260058160600152809050205460200280806020015990590160009052818152602081019050905060005b602083048112156106d95780840154816020028301526001810190506106b8565b602083066020036101000a60000381850154168160200283015281905090509050905060206040820352602060208203510260400160408203f3505b63fa9832d18114156108065760043560605260243560805260a060a059905901600090526000815260605181602001526080518160400152600981606001526000816080015280905020608060805990590160009052600081526060518160200152608051816040015260008160600152809050205460200280806020015990590160009052818152602081019050905060005b602083048112156107ca5780840154816020028301526001810190506107a9565b602083066020036101000a60000381850154168160200283015281905090509050905060206040820352602060208203510260400160408203f3505b632c5a40d58114156108f75760043560605260243560805260a060a059905901600090526000815260605181602001526080518160400152600a81606001526000816080015280905020608060805990590160009052600081526060518160200152608051816040015260058160600152809050205460200280806020015990590160009052818152602081019050905060005b602083048112156108bb57808401548160200283015260018101905061089a565b602083066020036101000a60000381850154168160200283015281905090509050905060206040820352602060208203510260400160408203f3505b63e05dcb568114156109eb5760043560605260243560805260a060a059905901600090526000815260605181602001526080518160400152600b81606001526000816080015280905020600260806080599059016000905260008152606051816020015260805181604001526000816060015280905020546020020180806020015990590160009052818152602081019050905060005b602083048112156109af57808401548160200283015260018101905061098e565b602083066020036101000a60000381850154168160200283015281905090509050905060206040820352602060208203510260400160408203f3505b63586b5be0811415610a3a576004356060526024356080526080608059905901600090526000815260605181602001526080518160400152600c81606001528090502054610b80526020610b80f35b63eb8af5aa811415610b585760043560605260243560805260a060a059905901600090526000815260605181602001526080518160400152600d81606001526000816080015280905020608060805990590160009052600081526060518160200152608051816040015260008160600152809050205460806080599059016000905260008152606051816020015260805181604001526005816060015280905020540560200280806020015990590160009052818152602081019050905060005b60208304811215610b1c578084015481602002830152600181019050610afb565b602083066020036101000a60000381850154168160200283015281905090509050905060206040820352602060208203510260400160408203f3505b637ab6ea8a811415610c765760043560605260243560805260a060a059905901600090526000815260605181602001526080518160400152600e81606001526000816080015280905020608060805990590160009052600081526060518160200152608051816040015260008160600152809050205460806080599059016000905260008152606051816020015260805181604001526005816060015280905020540560200280806020015990590160009052818152602081019050905060005b60208304811215610c3a578084015481602002830152600181019050610c19565b602083066020036101000a60000381850154168160200283015281905090509050905060206040820352602060208203510260400160408203f3505b632b810cb9811415610d945760043560605260243560805260a060a059905901600090526000815260605181602001526080518160400152600f81606001526000816080015280905020608060805990590160009052600081526060518160200152608051816040015260008160600152809050205460806080599059016000905260008152606051816020015260805181604001526005816060015280905020540560200280806020015990590160009052818152602081019050905060005b60208304811215610d58578084015481602002830152600181019050610d37565b602083066020036101000a60000381850154168160200283015281905090509050905060206040820352602060208203510260400160408203f3505b637fb42e46811415610e855760043560605260243560805260a060a059905901600090526000815260605181602001526080518160400152601081606001526000816080015280905020608060805990590160009052600081526060518160200152608051816040015260008160600152809050205460200280806020015990590160009052818152602081019050905060005b60208304811215610e49578084015481602002830152600181019050610e28565b602083066020036101000a60000381850154168160200283015281905090509050905060206040820352602060208203510260400160408203f3505b63734fa727811415610f765760043560605260243560805260a060a059905901600090526000815260605181602001526080518160400152601181606001526000816080015280905020608060805990590160009052600081526060518160200152608051816040015260008160600152809050205460200280806020015990590160009052818152602081019050905060005b60208304811215610f3a578084015481602002830152600181019050610f19565b602083066020036101000a60000381850154168160200283015281905090509050905060206040820352602060208203510260400160408203f3505b63c67fa8578114156110675760043560605260243560805260a060a059905901600090526000815260605181602001526080518160400152601281606001526000816080015280905020608060805990590160009052600081526060518160200152608051816040015260008160600152809050205460200280806020015990590160009052818152602081019050905060005b6020830481121561102b57808401548160200283015260018101905061100a565b602083066020036101000a60000381850154168160200283015281905090509050905060206040820352602060208203510260400160408203f3505b635ed853e48114156111855760043560605260243560805260a060a059905901600090526000815260605181602001526080518160400152601381606001526000816080015280905020608060805990590160009052600081526060518160200152608051816040015260008160600152809050205460806080599059016000905260008152606051816020015260805181604001526005816060015280905020540560200280806020015990590160009052818152602081019050905060005b60208304811215611149578084015481602002830152600181019050611128565b602083066020036101000a60000381850154168160200283015281905090509050905060206040820352602060208203510260400160408203f3505b63b86f51258114156112a35760043560605260243560805260a060a059905901600090526000815260605181602001526080518160400152601481606001526000816080015280905020608060805990590160009052600081526060518160200152608051816040015260008160600152809050205460806080599059016000905260008152606051816020015260805181604001526005816060015280905020540560200280806020015990590160009052818152602081019050905060005b60208304811215611267578084015481602002830152600181019050611246565b602083066020036101000a60000381850154168160200283015281905090509050905060206040820352602060208203510260400160408203f3505b63bc3d7d858114156113945760043560605260243560805260a060a059905901600090526000815260605181602001526080518160400152601581606001526000816080015280905020608060805990590160009052600081526060518160200152608051816040015260008160600152809050205460200280806020015990590160009052818152602081019050905060005b60208304811215611358578084015481602002830152600181019050611337565b602083066020036101000a60000381850154168160200283015281905090509050905060206040820352602060208203510260400160408203f3505b63a2302f2f81141561148157600435606052602435611680526044356116a0526116a05160a060a0599059016000905260008152606051816020015261168051816040015260018160600152608060805990590160009052600081526060518160200152611680518160400152600081606001528090502054816080015280905020556001608060805990590160009052600081526060518160200152611680518160400152600081606001528090502054016080608059905901600090526000815260605181602001526116805181604001526000816060015280905020556001611740526020611740f35b63058ca2bc8114156114dd576004356060526024356080526044356117605261176051608060805990590160009052600081526060518160200152608051816040015260028160600152809050205560016117a05260206117a0f35b635d3b965b8114156116175736599059016000905236600482376004356060526024356080526044356102805260643560208201016117e052608435611800525060c060c0599059016000905260008152606051816020015260805181604001526003816060015261028051816080015260008160a001528090502060206117e05103516020026020810460005b8181121561158c57806020026117e05101518482015560018101905061156b565b602083066020036101000a600003816020026117e05101511684820155505050506118005160806080599059016000905260008152606051816020015260805181604001526002816060015280905020540160806080599059016000905260008152606051816020015260805181604001526002816060015280905020556001611900526020611900f35b63b0e14f0f81141561167357600435606052602435608052604435611920526119205160806080599059016000905260008152606051816020015260805181604001526005816060015280905020556001611960526020611960f35b636acccdbc8114156117395736599059016000905236600482376004356060526024356080526044356020820101611980525060a060a05990590160009052600081526060518160200152608051816040015260068160600152600081608001528090502060206119805103516020026020810460005b8181121561170b5780602002611980510151848201556001810190506116ea565b602083066020036101000a600003816020026119805101511684820155505050506001611a40526020611a40f35b63a1fa51f98114156117ff5736599059016000905236600482376004356060526024356080526044356020820101611a60525060a060a0599059016000905260008152606051816020015260805181604001526007816060015260008160800152809050206020611a605103516020026020810460005b818112156117d15780602002611a60510151848201556001810190506117b0565b602083066020036101000a60000381602002611a605101511684820155505050506001611b20526020611b20f35b63cd87f43a8114156118c55736599059016000905236600482376004356060526024356080526044356020820101611b40525060a060a0599059016000905260008152606051816020015260805181604001526008816060015260008160800152809050206020611b405103516020026020810460005b818112156118975780602002611b4051015184820155600181019050611876565b602083066020036101000a60000381602002611b405101511684820155505050506001611c00526020611c00f35b63222a866381141561198b5736599059016000905236600482376004356060526024356080526044356020820101611c20525060a060a0599059016000905260008152606051816020015260805181604001526009816060015260008160800152809050206020611c205103516020026020810460005b8181121561195d5780602002611c205101518482015560018101905061193c565b602083066020036101000a60000381602002611c205101511684820155505050506001611ce0526020611ce0f35b63b39e1faa811415611a515736599059016000905236600482376004356060526024356080526044356020820101611d00525060a060a059905901600090526000815260605181602001526080518160400152600a816060015260008160800152809050206020611d005103516020026020810460005b81811215611a235780602002611d0051015184820155600181019050611a02565b602083066020036101000a60000381602002611d005101511684820155505050506001611dc0526020611dc0f35b63e365736b811415611b175736599059016000905236600482376004356060526024356080526044356020820101611de0525060a060a059905901600090526000815260605181602001526080518160400152600b816060015260008160800152809050206020611de05103516020026020810460005b81811215611ae95780602002611de051015184820155600181019050611ac8565b602083066020036101000a60000381602002611de05101511684820155505050506001611ea0526020611ea0f35b63aad7d6e3811415611b7357600435606052602435608052604435611ec052611ec0516080608059905901600090526000815260605181602001526080518160400152600c816060015280905020556001611f00526020611f00f35b6301112b27811415611c395736599059016000905236600482376004356060526024356080526044356020820101611f20525060a060a059905901600090526000815260605181602001526080518160400152600d816060015260008160800152809050206020611f205103516020026020810460005b81811215611c0b5780602002611f2051015184820155600181019050611bea565b602083066020036101000a60000381602002611f205101511684820155505050506001611fe0526020611fe0f35b63bdbb239b811415611cff5736599059016000905236600482376004356060526024356080526044356020820101612000525060a060a059905901600090526000815260605181602001526080518160400152600e8160600152600081608001528090502060206120005103516020026020810460005b81811215611cd1578060200261200051015184820155600181019050611cb0565b602083066020036101000a6000038160200261200051015116848201555050505060016120c05260206120c0f35b6305a0cd48811415611dc557365990590160009052366004823760043560605260243560805260443560208201016120e0525060a060a059905901600090526000815260605181602001526080518160400152600f8160600152600081608001528090502060206120e05103516020026020810460005b81811215611d9757806020026120e051015184820155600181019050611d76565b602083066020036101000a600003816020026120e051015116848201555050505060016121a05260206121a0f35b63aaa1fe35811415611e8b57365990590160009052366004823760043560605260243560805260443560208201016121c0525060a060a05990590160009052600081526060518160200152608051816040015260108160600152600081608001528090502060206121c05103516020026020810460005b81811215611e5d57806020026121c051015184820155600181019050611e3c565b602083066020036101000a600003816020026121c05101511684820155505050506001612280526020612280f35b632be4935d811415611f5157365990590160009052366004823760043560605260243560805260443560208201016122a0525060a060a05990590160009052600081526060518160200152608051816040015260118160600152600081608001528090502060206122a05103516020026020810460005b81811215611f2357806020026122a051015184820155600181019050611f02565b602083066020036101000a600003816020026122a05101511684820155505050506001612360526020612360f35b6313a8350d8114156120175736599059016000905236600482376004356060526024356080526044356020820101612380525060a060a05990590160009052600081526060518160200152608051816040015260128160600152600081608001528090502060206123805103516020026020810460005b81811215611fe9578060200261238051015184820155600181019050611fc8565b602083066020036101000a600003816020026123805101511684820155505050506001612440526020612440f35b63cb540b458114156120dd5736599059016000905236600482376004356060526024356080526044356020820101612460525060a060a05990590160009052600081526060518160200152608051816040015260138160600152600081608001528090502060206124605103516020026020810460005b818112156120af57806020026124605101518482015560018101905061208e565b602083066020036101000a600003816020026124605101511684820155505050506001612520526020612520f35b63be0306278114156121a35736599059016000905236600482376004356060526024356080526044356020820101612540525060a060a05990590160009052600081526060518160200152608051816040015260148160600152600081608001528090502060206125405103516020026020810460005b81811215612175578060200261254051015184820155600181019050612154565b602083066020036101000a600003816020026125405101511684820155505050506001612600526020612600f35b6383fd77f08114156122695736599059016000905236600482376004356060526024356080526044356020820101612620525060a060a05990590160009052600081526060518160200152608051816040015260158160600152600081608001528090502060206126205103516020026020810460005b8181121561223b57806020026126205101518482015560018101905061221a565b602083066020036101000a6000038160200261262051015116848201555050505060016126e05260206126e0f35b63594622058114156122d5576004356060526024356080526044356103c052606435612700526127005160a060a059905901600090526000815260605181602001526080518160400152600481606001526103c051816080015280905020556001612740526020612740f35b63bb8e419681141561244857600435606052602435612760526044356127805260006127a0525b6080608059905901600090526000815260605181602001526001612760510381604001526000816060015280905020546127a051121561243b5760a060a05990590160009052600081526060518160200152600161276051038160400152600181606001526127a0518160800152809050205460a060a05990590160009052600081526060518160200152612780518160400152600181606001526080608059905901600090526000815260605181602001526127805181604001526000816060015280905020548160800152809050205560016080608059905901600090526000815260605181602001526127805181604001526000816060015280905020540160806080599059016000905260008152606051816020015261278051816040015260008160600152809050205560016127a051016127a0526122fc565b6001612880526020612880f35b50", + "nonce" : "0x00", + "storage" : { + "0x065d5efdfcc0fba693dc9e467f633097ffdc97401901463ad0e28855486d1edf" : "0xb9d69098a6acfe0c6411bcaaf430f78d363a9adc32b78bc2e15ccd6e883e9784", + "0x12643ff300762717d27efb567b82c65560d7b43249d908504e5510863ab82aac" : "0x154cf60e137c594516a065149610b6a3989396a42581d5fd8919e711c55da225", + "0x1489023d18c5d10427c4aa8dc726e840eb5ae7f604a8e9243c61634fb009e4d7" : "0x05", + "0x1489023d18c5d10427c4aa8dc726e840eb5ae7f604a8e9243c61634fb009e4d8" : "0x01", + "0x19efb13d6576359514ace5211988a8d51379fa88ccd2b886b409f842b13d7932" : "0xc849cc595b452d11c206d2eb8cdfa06de211e3ff19ee0e0276dc857c05d4fe", + "0x1b37e91bf8580c7c6bcf8cdff25c7ed78180124a94af6f30c40d476a3d079ad6" : "0xaba4cd295118a482a0a62579e35e4ba5bdd76146cc9e4d96172fce8be8977ab4", + "0x2bf9fd8facdd6fd9c84657f5ad7381a5aecf670cda68cb3c5829b6532c865506" : "0x53098a1d111586dbcc0d051846284f5803c63c313e7f7e6d84430435d11d4c50", + "0x3111bfd25728c0adfad0f8c1ad79cb1b91167267deca98de88f156ed25caeedc" : "0xad393086f30b49511b08fdd27ac78810b084c7cd7de6ac354f614c18ea9e7df4", + "0x3379e7ae125c5c5d623d1d993c1459b61d6723b1c30d1aa026c48f6a6155b8ea" : "0x8c4183732567a99a8a718e363391e102532f9a640e42968cf2354d9acc908bb0", + "0x34cabe0c7e64a2caa93fd8d6a0defc07acb9d44b13430fa3ae9282fffd40dee2" : "0x01", + "0x34cabe0c7e64a2caa93fd8d6a0defc07acb9d44b13430fa3ae9282fffd40dee3" : "0x01", + "0x34cabe0c7e64a2caa93fd8d6a0defc07acb9d44b13430fa3ae9282fffd40dee4" : "0x01", + "0x34cabe0c7e64a2caa93fd8d6a0defc07acb9d44b13430fa3ae9282fffd40dee5" : "0x01", + "0x39050607fe892059a6344ab0f594f382fb0b345cab373497246dbe86fe7e14e7" : "0x2b3bca833e482737e7e47b1568e6f890f8e1666490d38fe130abd6f0ccb109cf", + "0x417be8bc6791807372e0222a350bb8a5d67bbc8d7595c301d8a5a8372cfdcef1" : "0xabd4971b4605a7155802f70e08298b1ceb0e4e4eaccccd348f77a77227f73a7f", + "0x41e9a54b3ee0c276aa076babb161de12b0f8916b47f8f6fb85cc387cf34696dd" : "0x22f2f444ebda9d2913ffef5059b039ec9b5876aa71821991c2515bf79f64935e", + "0x45ceb8da6fb8936592d3bce4883f1a6a34d636f559e0a1070a5802a65ac39bd5" : "0x57a5122ff3bf737b0de0f9f08011a8648c19e43ff071fb7086234723c9383f1f", + "0x4aa6b934608a45c8f53a945c05ddee1814a3b9f63a048fc7ad3d47e67156f024" : "0xd03862becedada67b4825a0238f3e67495ccb595cd7d08f1bd5d3160644b9299", + "0x4b8b58f0b0e326a5907d1a810e5ff31e05b4cab45125b776db8577e7dbc46bce" : "0x2f0000000000000000", + "0x4c33460347337bfc7df08bf182988301b7b426a27a67f1c6c634f637c60e87ac" : "0xbab4ab2ad4eafe7c84ef6a8cd69157d9ce6b843793a2cd0877b8e91f63cb2d4d", + "0x58da0c0c256bba101ce36fad8bf838717a57e6ab850a191dc9c09da9ce56bf1b" : "0x05", + "0x5cb38b16db1d632086d4af695de7f5f242a6e40947067f96edd566fe2ac438ef" : "0x6d0be832b2007ea28cda705b73922cbf9794c5a25b89bd2f28b7347ed2b96c86", + "0x64a9621cc4ba92bf738c55010c609dfaa3972a1138c30b5adcef1ba2363b360e" : "0xd7953bfe8cb591f129fd0862a9e9c421151e2b5831560ff5215d23f751364b35", + "0x696664a5f0ab5acd9304a377fb684f2d3fe6bb60b8a95cb2bdbb57db767e7a84" : "0x154cf60e137c594516a065149610b6a3989396a42581d5fd8919e711c55da225", + "0x69ad1d19e617936abdf05133bf268dc8ced6b518f22b249b5860967d07006487" : "0x8c803b48b383ddabd1b3afe858efb48c203229b7317dd76149dddab4253b858a", + "0x70b3bf53996fac325eb67608a4eeb0cd0b55def6255d7ed42ad28ec07238b5d6" : "0x45e9723e9232b37207ecac1c97b8647d053625a578d450f7456280b2ff8efc27", + "0x7a9dcee62e3e02cc8e020f372df2efdeb835f091c1ef1dbe221072d1095aabd2" : "0x2f0000000000000000", + "0x7e4d8c0f6d8abb4ce1ae45b254046aceedabfa9548851b8b5d3e2c0637c985fd" : "0x0b", + "0x7e95f3cc3315d289c52253baaba29b1b00c86816e6b788d50795279a8baa00db" : "0x45e9723e9232b37207ecac1c97b8647d053625a578d450f7456280b2ff8efc27", + "0x8da187157087529ee4e9c381f8e3149c56acf3bdfda29b8b9b4532f24b83f5fe" : "0x8c4183732567a99a8a718e363391e102532f9a640e42968cf2354d9acc908bb0", + "0x9001f91ddaef87bc067886e874c0749998c9b58b2ec8472ca014ca8b55f88578" : "0x0fb76974eefca01f33fb38646c2d3c1536f1a763d7aff53ab7f877d4c5ea7fd0", + "0x9ed0cedd2a9a78d949f40019f53d10031aef6ed342c97e01fc03b481ee56b3cb" : "0x04", + "0x9fddf1db29caa5c1239edd86e9e0835cdfe41f7253ec78f62d3da8558d6f3cd7" : "0x104eef8fa35bf39f677d81855bc0b9f42317f32792e98e95e4df441deb634211", + "0xa0953566119395c11186b334805fc1a16175ecac0ecc93ae0322264f0dc2e40d" : "0x10c5a00466ab7c0adae1e93537cc275ea8cf23ff509d5466a1fd6f56b0a61d1b", + "0xaa0dbf8241ef3ae07c254e6869e84895ba2be0779a7f261c8308a3114be1c54a" : "0x04", + "0xaffe808b495d13a14391ce5f27c211c36da12826969cd7841ee0d81e5b900e2d" : "0x01", + "0xaffe808b495d13a14391ce5f27c211c36da12826969cd7841ee0d81e5b900e2e" : "0x01", + "0xb4a2b68c48ef78aeb641ee538fad51781022fd23ed9d93d211017db6a02376ce" : "0x0fbc06642245cf2fed7ed46ea0a18a7185830b6f2c4e0a4ca55246041e8bfa72", + "0xba8d79990898383919e437f2458b93b340072c89d963808d9e04f51858e3c5ec" : "0x41d2cac534d90a0dbd199117481a63e32cc11411dab2eaa36c91c0eec62823cf", + "0xbb3bc1a2015123750df57d4ceff7e28cb847910b79b34841de905b59a8bb177c" : "0x734417eb19e1873427257f1ea1594748c16cfa866a7b7cf896e281f2ec774a40", + "0xbf30cdcb83ab2bd5f5eee691ffa4107b58b75ba6a5c2e6754d4c5c0437f2876c" : "0x05", + "0xc2a26b80067fc36b8268b0d5b31afff953fa91cebea39f191e2763d6e71259b9" : "0x02a43c547fe8de2400d2a141016550e8bae058d41164247c099e787ddd40e789", + "0xc98339d275eef16e0562ca8521212cef61aa0f39b12e2a27502aaa97a9e5e70f" : "0x5a3de2a5c268cdb75f4b01507aa80c4e4a1bc67bcb0df265bbb00060774e5978", + "0xcbd6ae6bd61bc9270ec836f1919b3268113abe076c7febfdb8cf573b199ce9a9" : "0xf402b17773c1f7534034ee58dc0d2a3421470a7a67daf4fa790dc3b420eef790", + "0xd2c8cbb562fccd0c9a3d0d491b7f65cc6a89856498f933427d9d21b745b9d50e" : "0x3625a26fdb7b747501f1ee2500f98c49d9cd290383a21254587c3c49d2805321", + "0xd66f52a4e24585238ccc03443b2fdb8b2b100259bc7260f39097c7c339211ffe" : "0x1641851904381915c86b60df7e288896fb5f8ebad65d594829fb9f2b59cd1da6", + "0xd8f720c05a5526dd621d1831ae122abddd3dfecd8b63b0ba4c92fa7b2ade44ff" : "0xad393086f30b49511b08fdd27ac78810b084c7cd7de6ac354f614c18ea9e7df4", + "0xdc22d3171b82817c910bbeac1f8b50c8de99f8c524f172aef3491981bd5ed4fb" : "0x94b8cba4ea090d1c392fbc94b82fb9ef9f468a15bbc537f4d051776f4d422b1d", + "0xdce8adbdefa929dbe60245f359446db4174c62824b42e5d4d9e7b834b4d61deb" : "0x2c9069845b2e74c577ff1cd18df6bc452805f527a9ee91fd4a059e0408b5dea6", + "0xdd9493073db9e42fd955e834c89a74089f99196186ee0b2688124989be00d196" : "0x01", + "0xdd9493073db9e42fd955e834c89a74089f99196186ee0b2688124989be00d197" : "0x01", + "0xdd9493073db9e42fd955e834c89a74089f99196186ee0b2688124989be00d198" : "0x01", + "0xdd9493073db9e42fd955e834c89a74089f99196186ee0b2688124989be00d199" : "0x01", + "0xdd9493073db9e42fd955e834c89a74089f99196186ee0b2688124989be00d19a" : "0x01", + "0xe54f074c81bfa60b5bf413934c108086298b77291560edfeead8aa1232e95236" : "0x0f40aaa24323c9e6983ccffafeebe4b426509b901e8c98b8a40d881804804e6b", + "0xe66c0f55f66c752edf73027d45b7b1ae729ae15e1c67c362dbc6f25edf8d76ff" : "0x01", + "0xe983d899f807bbcb5881f2ddf875b2ebb5cb8a7a4e77a8c98a40aaae6a468735" : "0x6d0be832b2007ea28cda705b73922cbf9794c5a25b89bd2f28b7347ed2b96c86", + "0xed7d6e2d40fbd5046412ffad1c45b63d87c6197182d6dbc66bb1e5c6e4ded5c7" : "0xaba4cd295118a482a0a62579e35e4ba5bdd76146cc9e4d96172fce8be8977ab4", + "0xf043b5a1952847579f233706a8f130889a484d2da3e574fdd5859f05aaf52111" : "0x02", + "0xf40f4cfdacb62dd799f36b580349fac1f4a4caf8dd3383cc387c35adb6574e21" : "0x2f0000000000000000", + "0xf60fa6e25e9028a6dc6b26bbc1eadae3da157df0d1d6f6628bc33cad68a7e455" : "0x2d7d00618c059ebe40593b9497c633e1ac6e161dadbd5bb734c2663cd3e8a8e1", + "0xfd280ac5182d5b2366122f38acfa6dc471240ffde9d5feb985ce7a2325c960e7" : "0x03" + } + }, + "142a6927cf0060133187ba8a8e74d641438f0c1c" : { + "balance" : "0x00", + "code" : "0x600061031f537c01000000000000000000000000000000000000000000000000000000006000350473c9ae5868651bf7b7db6e360217db49ce4e69c07e602052730ea65418d7bf32680f55572c943a94b5908049986040526327138bfb81141561038d57600435608052601c6044599059016000905201637a66d7ca601c8203526080516004820152602060e06024836000602051602d5a03f15060e051905060a052601c604459905901600090520163c60409c6601c820352608051600482015260206101206024836000602051602d5a03f150610120519050430561010052600061014052600061016052600061018052600260a051016101005112151561010a576001610140525b60006101a052610100516101c0525b606461010051016101c051121561018457601c606459905901600090520163cc1c944e601c82035260805160048201526101c051602482015260206101e06044836000604051602d5a03f1506101e05190506101a051016101a05260016101c051016101c052610119565b6005601c606459905901600090520163cc1c944e601c820352608051600482015260a051602482015260206102006044836000604051602d5a03f1506102005190501280156101d357806101db565b600a6101a051125b9050156101eb57610140516101ee565b60005b1561033657601c604459905901600090520163c5476efe601c820352608051600482015260206102406024836000602051602d5a03f15061024051905050601c6064599059016000905201637265802d601c82035260805160048201526000602482015260206102606044836000602051602d5a03f15061026051905050601c606459905901600090520163c286273a601c82035260805160048201526000602482015260206102806044836000602051602d5a03f15061028051905050601c6044599059016000905201637a66d7ca601c820352608051600482015260206102a06024836000602051602d5a03f1506102a051905060a052601c608459905901600090520163bb8e4196601c820352608051600482015260a051602482015261010051604482015260206102c06064836000604051602d5a03f1506102c051905050610343565b6001610160526001610180525b61014051156103555761016051610358565b60005b156103665761018051610369565b60005b1561037f5760016102e05260206102e0f361038c565b6000610300526020610300f35b5b50", + "nonce" : "0x00", + "storage" : { + } + }, + "1cdc8315bdb1362de8b7b2fa9ee75dc873037179" : { + "balance" : "0x01", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "9761fecf88590592cf05ce545504d376d1693ab3" : { + "balance" : "0x00", + "code" : "0x60006105df537c010000000000000000000000000000000000000000000000000000000060003504730ea65418d7bf32680f55572c943a94b59080499860205273e509e3a93beb1eba72f8cb8d25f93a85e2d54afb60405273c9ae5868651bf7b7db6e360217db49ce4e69c07e60605273f1562e1c0d0baa3ea746442bb7f11153fcf5cfda60805263546fdeb381141561038d5760043560c05260243560e05260443561010052606435610120526084356101405260026101005101601c606459905901600090520163e05dcb56601c82035260c051600482015260e05160248201526002610100510160408160200201599059016000905281602002604001816044856000602051602d5a03f150604081019050905090506000600161010051016020028201511415610250576060601c61014c59905901600090520163e365736b601c82035260c051600482015260e0516024820152601c6084599059016000905201632f300bee601c82035260026004820152600560248201526101005160448201528460408160200201599059016000905281602002604001816064856000608051602d5a03f1506040810190509050905060208103516020026020018360448401526020820360a4840152806101088401528084019350505081600401599059016000905260648160648460006004601cf16101fc57fe5b6064810192506101088201518080858260a487015160006004600a8705601201f161022357fe5b50808401935050808303602061028082846000602051602d5a03f15061028051905090509050905061037d565b6060601c61014c59905901600090520163e365736b601c82035260c051600482015260e0516024820152601c6084599059016000905201632f300bee601c820352600160016101005101602002850151036004820152600560248201526101005160448201528460408160200201599059016000905281602002604001816064856000608051602d5a03f1506040810190509050905060208103516020026020018360448401526020820360a4840152806101088401528084019350505081600401599059016000905260648160648460006004601cf161032d57fe5b6064810192506101088201518080858260a487015160006004600a8705601201f161035457fe5b5080840193505080830360206102c082846000602051602d5a03f1506102c05190509050905090505b5060016102e05260206102e0f350505b63de9080c88114156107645760043560c05260243560e05260443561010052606435610120526084356101405260026101005101601c606459905901600090520163e05dcb56601c82035260c051600482015260e05160248201528160408160200201599059016000905281602002604001816044856000602051602d5a03f15060408101905090509050601c6064599059016000905201632c5a40d5601c82035260c051600482015260e05160248201526101405160408160200201599059016000905281602002604001816044856000602051602d5a03f1506040810190509050905061012051806020026020015990590160009052818152602081019050905060005b610120518112156104ee57601c60645990590160009052016328c8b315601c82035260c051600482015281602482015260206103606044836000604051602d5a03f15061036051905081602002830152600181019050610493565b5060a0601c61020c59905901600090520163a647a5b9601c8203528460208103516020026020018360048401526020820360a484015280610148840152808401935050508360208103516020026020018360248401526020820360c484015280610168840152808401935050508260208103516020026020018360448401526020820360e4840152806101888401528084019350505061012051606482015261010051608482015281600401599059016000905260a48160a484600060046022f16105b557fe5b60a4810192506101488201518080858260a487015160006004600a8705601201f16105dc57fe5b508084019350506101688201518080858260c487015160006004600a8705601201f161060457fe5b508084019350506101888201518080858260e487015160006004600a8705601201f161062c57fe5b5080840193505080830387604081602002015990590160009052816020026040018184866000608051602d5a03f1506040810190509050905090509050905092506060601c61014c59905901600090520163e365736b601c82035260c051600482015260e05160248201528460208103516020026020018360448401526020820360a4840152806101088401528084019350505081600401599059016000905260648160648460006004601cf16106df57fe5b6064810192506101088201518080858260a487015160006004600a8705601201f161070657fe5b5080840193505080830360206103c082846000602051602d5a03f1506103c05190509050905090505060006101005160200284015114156107525760006103e05260206103e0f361075f565b6001610400526020610400f35b505050505b63384ca8dd811415610a665760043560c05260243560e052604435610100526064356101205260843561014052601c606459905901600090520163e05dcb56601c82035260c051600482015260e05160248201526002610100510160408160200201599059016000905281602002604001816044856000602051602d5a03f15060408101905090509050601c606459905901600090520163fa9832d1601c82035260c051600482015260e05160248201526101005160408160200201599059016000905281602002604001816044856000602051602d5a03f15060408101905090509050601c608459905901600090520163aad7d6e3601c82035260c051600482015260e05160248201526060601c61014c599059016000905201635b180229601c8203528360208103516020026020018360048401526020820360648401528060c8840152808401935050508460208103516020026020018360248401526020820360848401528060e88401528084019350505061010051604482015281600401599059016000905260648160648460006004601cf161090157fe5b60648101925060c882015180808582606487015160006004600a8705601201f161092757fe5b5080840193505060e882015180808582608487015160006004600a8705601201f161094e57fe5b50808401935050808303602061044082846000608051602d5a03f150610440519050905090509050604482015260206104606064836000602051602d5a03f150610460519050506060601c61014c59905901600090520163222a8663601c82035260c051600482015260e05160248201528260208103516020026020018360448401526020820360a4840152806101088401528084019350505081600401599059016000905260648160648460006004601cf1610a0757fe5b6064810192506101088201518080858260a487015160006004600a8705601201f1610a2e57fe5b50808401935050808303602061048082846000602051602d5a03f1506104805190509050905090505060016104a05260206104a0f350505b63d5dc5af1811415610d4b5760043560c05260243560e052604435610100526064356101205260843561014052601c606459905901600090520163e05dcb56601c82035260c051600482015260e05160248201526002610100510160408160200201599059016000905281602002604001816044856000602051602d5a03f15060408101905090509050601c6064599059016000905201632c5a40d5601c82035260c051600482015260e05160248201526101405160408160200201599059016000905281602002604001816044856000602051602d5a03f150604081019050905090506080601c6101ac59905901600090520163f4ca7dc4601c82035283602081035160200260200183600484015260208203608484015280610108840152808401935050508260208103516020026020018360248401526020820360a4840152806101288401528084019350505061012051604482015261010051606482015281600401599059016000905260848160848460006004601ff1610be757fe5b60848101925061010882015180808582608487015160006004600a8705601201f1610c0e57fe5b508084019350506101288201518080858260a487015160006004600a8705601201f1610c3657fe5b5080840193505080830361014051604081602002015990590160009052816020026040018184866000608051602d5a03f1506040810190509050905090509050905090506060601c61014c59905901600090520163b39e1faa601c82035260c051600482015260e05160248201528260208103516020026020018360448401526020820360a4840152806101088401528084019350505081600401599059016000905260648160648460006004601cf1610cec57fe5b6064810192506101088201518080858260a487015160006004600a8705601201f1610d1357fe5b5080840193505080830360206104c082846000602051602d5a03f1506104c05190509050905090505060016104e05260206104e0f350505b630939aa8c81141561114c5760043560c05260243560e052604435610100526064356101205260843561014052601c606459905901600090520163e05dcb56601c82035260c051600482015260e05160248201526002610100510160408160200201599059016000905281602002604001816044856000602051602d5a03f15060408101905090509050601c6064599059016000905201637dc12195601c82035260c051600482015260e05160248201526101405160408160200201599059016000905281602002604001816044856000602051602d5a03f15060408101905090509050601c606459905901600090520163586b5be0601c82035260c051600482015260e051602482015260206105006044836000602051602d5a03f150610500519050601c606459905901600090520163eb8af5aa601c82035260c051600482015260e05160248201526101205160408160200201599059016000905281602002604001816044856000602051602d5a03f1506040810190509050905060c0601c61026c59905901600090520163232b2734601c8203528260208103516020026020018360048401526020820360c484015280610188840152808401935050508560208103516020026020018360248401526020820360e4840152806101a88401528084019350505084602081035160200260200183604484015260208203610104840152806101c8840152808401935050508360648201526101205160848201526101005160a482015281600401599059016000905260c48160c484600060046025f1610f9657fe5b60c4810192506101888201518080858260c487015160006004600a8705601201f1610fbd57fe5b508084019350506101a88201518080858260e487015160006004600a8705601201f1610fe557fe5b508084019350506101c88201518080858261010487015160006004600a8705601201f161100e57fe5b5080840193505080830361012051604081602002015990590160009052816020026040018184866000608051602d5a03f1506040810190509050905090509050905090506060601c61014c5990590160009052016301112b27601c82035260c051600482015260e05160248201528260208103516020026020018360448401526020820360a4840152806101088401528084019350505081600401599059016000905260648160648460006004601cf16110c457fe5b6064810192506101088201518080858260a487015160006004600a8705601201f16110eb57fe5b50808401935050808303602061058082846000602051602d5a03f15061058051905090509050905050600060016101005101602002850151141561113a5760006105a05260206105a0f3611147565b60016105c05260206105c0f35b505050505b50", + "nonce" : "0x00", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0xd8d726b7177a800000", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "b03f030056db7d467d778326658bac0d1b35d8f7" : { + "balance" : "0x00", + "code" : "0x600061075f537c010000000000000000000000000000000000000000000000000000000060003504731e147037f0a63df228fe6e7aef730f1ea31c8ce3602052730ea65418d7bf32680f55572c943a94b59080499860405273e509e3a93beb1eba72f8cb8d25f93a85e2d54afb60605273c9ae5868651bf7b7db6e360217db49ce4e69c07e60805273142a6927cf0060133187ba8a8e74d641438f0c1c60a05273b163e767e4c1ba5ae88b2ee7594f3a3fec2bb09660c05273ba7b277319128ef4c22635534d0f61dffdaa13ab60e052739761fecf88590592cf05ce545504d376d1693ab36101005273f70bbc50f1468cecae0761ef09386a87c1c696ea6101205273a89d22f049aaa5bbfb5f1a1939fff3ae7a26ae746101405273174827f7e53e8ce13b047adcac0eb3f2cb0c3285610160526336a560bd811415610a88576004356101a052601c60445990590160009052016327138bfb601c8203526101a051600482015260206101e0602483600060a051602d5a03f1506101e05190501515610195576001600003610200526020610200f35b601c6044599059016000905201637a66d7ca601c8203526101a051600482015260206102206024836000608051602d5a03f150610220519050601c606459905901600090520163cc1c944e601c8203526101a05160048201528160248201526020610260604483600061028051602d5a03f150610260519050601c60445990590160009052016380b5e7bd601c8203526101a051600482015260206102a06024836000606051602d5a03f1506102a0519050808202601c60445990590160009052016318633576601c8203526101a051600482015260206103006024836000608051602d5a03f150610300519050600981141561036d57601c60c459905901600090520163ac44d71e601c8203526101a0516004820152856024820152846044820152836064820152826084820152602061036060a483600061016051602d5a03f15061036051905050601c6064599059016000905201637265802d601c8203526101a05160048201526000602482015260206103806044836000608051602d5a03f15061038051905050601c604459905901600090520163c5476efe601c8203526101a051600482015260206103a06024836000608051602d5a03f1506103a051905050600185016103c05260206103c0f3610a3a565b60008114156103cd57601c60c459905901600090520163ef72638a601c8203526101a051600482015285602482015284604482015283606482015282608482015260206103e060a483600060c051602d5a03f1506103e051905050610a39565b600181141561042d57601c60c459905901600090520163a63e976c601c8203526101a0516004820152856024820152846044820152836064820152826084820152602061040060a483600060e051602d5a03f15061040051905050610a38565b600281141561048d57601c60c459905901600090520163533ea0ed601c8203526101a0516004820152856024820152846044820152836064820152826084820152602061042060a483600060e051602d5a03f15061042051905050610a37565b600381141561085057601c606459905901600090520163e05dcb56601c8203526101a0516004820152856024820152600285016040816020020159905901600090528160200260400181604485600061028051602d5a03f15060408101905090509050601c6044599059016000905201633d905045601c8203526101a051600482015260206104806024836000608051602d5a03f150610480519050600481141561063357601c60c4599059016000905201630939aa8c601c8203526101a051600482015287602482015286604482015285606482015284608482015260206104e060a483600061010051602d5a03f1506104e05190506104c052601c606459905901600090520163c286273a601c8203526101a05160048201526000602482015260206105006044836000608051602d5a03f1506105005190505060016104c05114156105e55782610520526020610520f361062e565b601c604459905901600090520163aac2ffb5601c8203526101a051600482015260206105406024836000608051602d5a03f1506105405190505060018301610560526020610560f35b610804565b600081141561069457601c60c459905901600090520163546fdeb3601c8203526101a0516004820152876024820152866044820152856064820152846084820152602061058060a483600061010051602d5a03f15061058051905050610803565b6001811415610742576000601c60c459905901600090520163de9080c8601c8203526101a051600482015288602482015287604482015286606482015285608482015260206105a060a483600061010051602d5a03f1506105a0519050141561073257601c6044599059016000905201631cda01ef601c8203526101a051600482015260206105c06024836000608051602d5a03f1506105c0519050505b826105e05260206105e0f3610802565b60028114156107a357601c60c459905901600090520163384ca8dd601c8203526101a0516004820152876024820152866044820152856064820152846084820152602061060060a483600061010051602d5a03f15061060051905050610801565b600381141561080057601c60c459905901600090520163d5dc5af1601c8203526101a0516004820152876024820152866044820152856064820152846084820152602061062060a483600061010051602d5a03f150610620519050505b5b5b5b5b601c6044599059016000905201631cda01ef601c8203526101a051600482015260206106406024836000608051602d5a03f1506106405190505082610660526020610660f35050610a36565b60048114156108b157601c60c459905901600090520163f6559853601c8203526101a0516004820152856024820152846044820152836064820152826084820152602061068060a483600061012051602d5a03f15061068051905050610a35565b600581141561091257601c60c459905901600090520163d8e5473d601c8203526101a051600482015285602482015284604482015283606482015282608482015260206106a060a483600061012051602d5a03f1506106a051905050610a34565b600681141561097357601c60c459905901600090520163090507ea601c8203526101a051600482015285602482015284604482015283606482015282608482015260206106c060a483600061012051602d5a03f1506106c051905050610a33565b60078114156109d457601c60c4599059016000905201635b911842601c8203526101a051600482015285602482015284604482015283606482015282608482015260206106e060a483600061014051602d5a03f1506106e051905050610a32565b6008811415610a3157601c60c459905901600090520163abe22b84601c8203526101a0516004820152856024820152846044820152836064820152826084820152602061070060a483600061014051602d5a03f150610700519050505b5b5b5b5b5b5b5b5b5b601c604459905901600090520163aac2ffb5601c8203526101a051600482015260206107206024836000608051602d5a03f1506107205190505060018101610740526020610740f350505050505b50", + "nonce" : "0x00", + "storage" : { + } + }, + "c9ae5868651bf7b7db6e360217db49ce4e69c07e" : { + "balance" : "0x00", + "code" : "0x600061083f537c010000000000000000000000000000000000000000000000000000000060003504637a66d7ca8114156100665760043560405260606060599059016000905260008152604051816020015260008160400152809050205460605260206060f35b63c60409c68114156100a55760043560405260606060599059016000905260008152604051816020015260018160400152809050205460a052602060a0f35b63186335768114156100e45760043560405260606060599059016000905260008152604051816020015260028160400152809050205460e052602060e0f35b63b3903c8a8114156101bc57600435604052606060605990590160009052600081526040518160200152600581604001528090502054610120526101205180602002602001599059016000905281815260208101905090506101605260006101c0525b610120516101c051121561019f57608060805990590160009052600081526040518160200152600481604001526101c051816060015280905020546101c05160200261016051015260016101c051016101c052610147565b6101605160206040820352602060208203510260400160408203f3505b636824e0fb8114156101fd57600435604052606060605990590160009052600081526040518160200152600581604001528090502054610220526020610220f35b633db16be381141561023e57600435604052606060605990590160009052600081526040518160200152600681604001528090502054610260526020610260f35b63c33878588114156102e05760006102a0526000546102c0526102c05180602002602001599059016000905281815260208101905090506102e0525b6102c0516102a05112156102c357604060405990590160009052600181526102a051816020015280905020546102a0516020026102e051015260016102a051016102a05261027a565b6102e05160206040820352602060208203510260400160408203f3505b63175c63228114156102fa57600054610380526020610380f35b63d861f2b4811415610336576004356103a052604060405990590160009052600181526103a051816020015280905020546103c05260206103c0f35b63b0dab01f81141561044f57600435610400526024356104205260443561044052606435610460526000606060605990590160009052600081526104005181602001526001816040015280905020541415610441576104205160606060599059016000905260008152610400518160200152600081604001528090502055610440516060606059905901600090526000815261040051816020015260018160400152809050205561046051606060605990590160009052600081526104005181602001526006816040015280905020556104005160406040599059016000905260018152600054816020015280905020556001600054016000556001610520526020610520f361044e565b6000610540526020610540f35b5b63aac2ffb58114156104b95760043560405260016060606059905901600090526000815260405181602001526002816040015280905020540160606060599059016000905260008152604051816020015260028160400152809050205560016105a05260206105a0f35b637265802d811415610507576004356040526024356105c0526105c0516060606059905901600090526000815260405181602001526002816040015280905020556001610600526020610600f35b63c5476efe811415610571576004356040526001606060605990590160009052600081526040518160200152600081604001528090502054016060606059905901600090526000815260405181602001526000816040015280905020556001610660526020610660f35b63c551e31e81141561063b576004356040526024356106805260606060599059016000905260008152604051816020015260058160400152809050205461012052610680516080608059905901600090526000815260405181602001526004816040015261012051816060015280905020556001606060605990590160009052600081526040518160200152600581604001528090502054016060606059905901600090526000815260405181602001526005816040015280905020556001610720526020610720f35b633d90504581141561067c57600435604052606060605990590160009052600081526040518160200152600381604001528090502054610740526020610740f35b631cda01ef8114156106e65760043560405260016060606059905901600090526000815260405181602001526003816040015280905020540160606060599059016000905260008152604051816020015260038160400152809050205560016107c05260206107c0f35b63c286273a811415610734576004356040526024356107e0526107e0516060606059905901600090526000815260405181602001526003816040015280905020556001610820526020610820f35b50", + "nonce" : "0x00", + "storage" : { + "0x00" : "0x01", + "0x0a4470e9d0419df71f6257fcdfd2c0a3bad96a23f5ab414bc10aaf1a31a536a7" : "0xb4876148229c22bd2291f1a4f5468c8c789b23639370c4d447f270ba341dbbec", + "0x16ef4193a274568d283ff919c299729e07696d9ada48187b81d68e12e7b962de" : "0x0a103c04e7ecb9b3395f77c7b0cad28e62c85f042de4767ccc6c005e6f47f8d4", + "0x1f1866e966f321b84535705846689749d34d5dc02994613e2931973c605d9e93" : "0xc723d0aa4a60529fe42277c8094aa19263aff36650136efc5edfd0785d457634", + "0x252a4ec7133643fddcdb22a86c415f78b2dd251f18d1efcd6a44acf590c4ae72" : "0x9caf94b82715869e71d3cee986094ea612f0258570b7e5ef47b5d09e9515322b", + "0x41b451e8d86d28add758cbd3f48a18fd04b11a80288c1dc434a5bf2d8fb1ca64" : "0xb602498f12a8b4af3a1fca357cea6b19bcd163dfec1d845364ce1395f7c21fa7", + "0x491d10658c1ec762152d8ad2d890ad59111b1ee7b4bc25736046923d3534d9a5" : "0x629e", + "0x5b0e8552efd72a845e47318abbbef9dc9fcdfe0d1a06cda44494401301581511" : "0xfbc98f4017ae5c20459daadaa6bee519b6de871d3dbaa9ab3f34340fef4cb643", + "0x5b672a107ba6fab01cbddf079042e9f6176a8e6f154584fc4df4b15674c9456e" : "0x1603da41d610854d85536b37d000e5eb7ca09786c43f50e7441c0afbff1de0a9", + "0x605b934bd26c9ecdf7029a7dc062d3a6b87338511cff96e0c5f13de9eea3462e" : "0xf0d24f3d0eda573fc5d43e3d0680993c51293752cd6de205040d3197f412f475", + "0x618355e25491dfe86175f9d9b3147e4d680aa561d98384e3621dc6a3088b0846" : "0x6b2e6d2d5deb27dffec973f23af4caf111e66d1397f467dbbedf5ab2192fb6b6", + "0x65112936bec0f1e84fda6623fb54e12baadc8a4a208c8c4eb3ed5e79cbd7e85f" : "0xa59ac24e3e0663413d0f87516ba8fb44c6c3e14da8eaabbde80f8ee285f65934", + "0x687cb2122de7bacf42b9cd380b04ff2a2ce92a0b63706a9a78263b3ce86f3313" : "0x0200000000000000", + "0x72a539b064c98d29a514ee55694225e05fb41fe63e5fe710e4536bd9ba3591b4" : "0x338ecfe6c523ed1184918b19584d97dd1095ecaadc49c7ba9da62b8b513026e0", + "0x7aeb0a0ce8882a12d853078382a2bc72f7a94af6109f167de37b36c0a7deb828" : "0x4c428400ea8a7bd7c46ba9895b508770efa4551f0d793e1beb1207da01d9962f", + "0x7c8f4a98e086f64e28c75f54712b5d44bec3c29b5c70519e8880d3046a5618dc" : "0xaafc1f2601752b114d722070f75539bfec7faf49f0d48a48d27862f0c3b09903", + "0x809c325f50acf5787776e960985e72443b4330ad1e2f466557fffee16ba51d44" : "0xb940a56e64b5b661d87919b8ef03640ec077a6d72dd0b524adedaa7ddc91ff7a", + "0x84e4a80d33c5d2abd2b0a5aec0fdc5eaeed90ab31db556e404a81718ea286e39" : "0x1c", + "0x877305412fa2486f563c457b744e5c8b1e4d0eca73371de5e771f2abc263f4dc" : "0x7088a36f67276d475aa62127cfde9790cc802fdf3a54df49461a25eb8bf15707", + "0x922a8f2fc1cbe67c8acc6a8a720983c366d71d3e2e78e3048949ebc913ea611a" : "0x50fb9f913ca102534bb0a8eb8ebf19c68dfd16ffe5e207bcc580084cd4ecd8b4", + "0x987cb9ecfd8ce499d9d0e9e6b7da29617aa02774a34f4a8ea54442f44a1e1936" : "0x5179f98f555f1e9f1d4a335d16f41154579a53e361e9859269b6fa74ea9c7d21", + "0xada5013122d395ba3c54772283fb069b10426056ef8ca54750cb9bb552a59e7d" : "0x0f69b5", + "0xb16b117660f31197087f4d6fe50d3d4579152244956f753f9653ccf85f4b35c4" : "0x830272e3bb35226b047244cbdc46f1b6b864a280461e7a592f70e0863f4f1d33", + "0xb1f1aaedfb83c7755a2bffc9e2557f1723f9abe5642397963e76248c9209af57" : "0xe9be955c5fbfcd846d7425eaea05ce897786aefad99665342cbf30761b352526", + "0xb7bd50fdf7b043411c9ac33f0af2cebc69c393eb0b91f4976946f9c7b15ad0da" : "0xfccca0e7832bae9afe799a6d6177dc3869fa6c5b5105f8df6f365de5723820ec", + "0xbc96058eb03504ee6f5c0a9582f8720d99a6e9738b171499507facff0b2c0b5b" : "0x9db6a4f2766b51013b8d2f9038131d1bb4af725d019d111d7e26ff96c023b23f", + "0xc186c4f377b7f13892ade9656acd1522aa1f8ac151ac4f62457b5073241d79fc" : "0x7289738fef00f1770eeb098db9bd486c01ac12398d79cdf935514a128c585c51", + "0xcae57ae3017972d63effd8eae44f5054402c3e890d154b905ed6b5b533327fa9" : "0xd2e4bf465e61993d13089b940a7c55017a5117d8e43e4115550a139e1d4b3e3a", + "0xcf569ee7bf3accc0f893dffd04f1a757f373efe80893eff504fb3678f688ec1d" : "0x03", + "0xd69b7284545a9f5275df64ce94848dc954fcb8a8b525e7ac801517c12a75af84" : "0x4202995350abae303b43e564aa79121a30b5f1aea31f69cd25e07dd3fa64dce7", + "0xd8f6f90f51e657690ee28d1cc80d81bc1b89290065891fdd853d09caaaf756aa" : "0x01", + "0xde72f8eed43cc2a5a3eaa51483d14b17dc92bb26c154ae184cee4b4895011edc" : "0x47ce2b6fdb72c3fabb9c74f82c1e3e522bcd42e614fd85c208ac3c4c840cea72", + "0xe0e687ddf317f3d2b209ae3884148eff0f636e16827f82eded14ada8fc603009" : "0xfa7c8939f9b033162cf8d75ea69671bb8a27041bd4cdc76594e61e99333cb041", + "0xe8cda339d72a1a350b62f1e3fa52e254c395cc9fdd9f60adb21c7633fbdab531" : "0x128c4fdf4801a30eae99dd58f0f3ff5ca65f71b66a9ac0f38dd450fb24b4aaaa", + "0xec5e7f54fa5e516e616b04f9d5a0ee433a80e09ed47d7e5269afd76c05ff251e" : "0x14", + "0xf9a3bf5f2ccb903ee1a7644113b794db0260de404fb8f11203e75a7fff151618" : "0xbd94773c0d85c68240ae8dfd53d9d33cd137509bfc5d3433381299df768c8377" + } + }, + "e509e3a93beb1eba72f8cb8d25f93a85e2d54afb" : { + "balance" : "0x00", + "code" : "0x6000610b7f537c01000000000000000000000000000000000000000000000000000000006000350473c9ae5868651bf7b7db6e360217db49ce4e69c07e6020526308d3d58781141561024557600435606052606060605990590160009052600081526060518160200152600181604001528090502054608052600060806080599059016000905260008152606051816020015260028160400152328160600152809050205414151561014e57608060805990590160009052600081526060518160200152600281604001523281606001528090502054608052682f000000000000000060a060a059905901600090526000815260605181602001526000816040015260805181606001526000816080015280905020553260a060a05990590160009052600081526060518160200152600081604001526080518160600152600181608001528090502055610238565b608051608060805990590160009052600081526060518160200152600281604001523281606001528090502055682f000000000000000060a060a059905901600090526000815260605181602001526000816040015260805181606001526000816080015280905020553260a060a059905901600090526000815260605181602001526000816040015260805181606001526001816080015280905020556001606060605990590160009052600081526060518160200152600181604001528090502054016060606059905901600090526000815260605181602001526001816040015280905020555b60016101e05260206101e0f35b6328c8b31581141561029d576004356060526024356102005260a060a0599059016000905260008152606051816020015260008160400152610200518160600152600081608001528090502054610220526020610220f35b6374af23ec8114156103865760043560605260243561026052608060805990590160009052600081526060518160200152600281604001526102605181606001528090502054610200526000610200511415610332576102605160a060a05990590160009052600081526060518160200152600081604001526102005181606001526001816080015280905020541415610335565b60005b156103475760006102c05260206102c0f35b60a060a05990590160009052600081526060518160200152600081604001526102005181606001526000816080015280905020546102e05260206102e0f35b6384d646ee8114156103dc5760043560605260243560805260a060a05990590160009052600081526060518160200152600081604001526080518160600152600181608001528090502054610320526020610320f35b63f42294278114156106f45760043561026052601c602459905901600090520163175c6322601c82035260206103a06004836000602051602d5a03f1506103a0519050610360526102605115610581576103605160020280602002602001599059016000905281815260208101905090506103c05261036051806020026020015990590160009052818152602081019050905061042052601c602459905901600090520163c3387858601c8203526103605160408160200201599059016000905281602002604001816004856000602051602d5a03f150604081019050905090506104205260006104c05260006104e0525b610360516104c051121561057c576104c051602002610420510151606052601c60645990590160009052016374af23ec601c82035260605160048201526102605160248201526020610520604483600030602d5a03f1506105205190506105005260006105005114151561056c576060516104e0516020026103c05101526105005160016104e051016020026103c051015260026104e051016104e0525b60016104c051016104c0526104ce565b6106d7565b32610260526103605160020280602002602001599059016000905281815260208101905090506103c05261036051806020026020015990590160009052818152602081019050905061042052601c602459905901600090520163c3387858601c8203526103605160408160200201599059016000905281602002604001816004856000602051602d5a03f150604081019050905090506104205260006104c05260006104e0525b610360516104c05112156106d6576104c051602002610420510151606052601c60645990590160009052016374af23ec601c820352606051600482015261026051602482015260206105c0604483600030602d5a03f1506105c0519050610500526000610500511415156106c6576060516104e0516020026103c05101526105005160016104e051016020026103c051015260026104e051016104e0525b60016104c051016104c052610628565b5b6103c05160206040820352602060208203510260400160408203f3505b6380b5e7bd81141561073557600435606052606060605990590160009052600081526060518160200152600181604001528090502054610600526020610600f35b63156f1c328114156107865760043560605260243561064052608060805990590160009052600081526060518160200152600281604001526106405181606001528090502054610660526020610660f35b63b3a24fc081141561087857365990590160009052366004823760043560208201016106c0526024356106e05250600260206106c0510351018060200260200159905901600090528181526020810190509050610700523261070051526106e051602061070051015260026104c0525b600260206106c0510351016104c05112156108385760026104c051036020026106c05101516104c05160200261070051015260016104c051016104c0526107f6565b60206107005103516020026020599059016000905260208183610700516000600287604801f15080519050905061076052610760516107c05260206107c0f35b63e346f5fc811415610a1c576004356107e0526024356108005260006104c0525b606060605990590160009052600081526107e05181602001526001816040015280905020546104c05112156109e65760a060a05990590160009052600081526107e0518160200152600081604001526104c0518160600152600181608001528090502054610840526108405160a060a0599059016000905260008152610800518160200152600081604001526104c051816060015260018160800152809050205560a060a05990590160009052600081526107e0518160200152600081604001526104c051816060015260008160800152809050205460a060a0599059016000905260008152610800518160200152600081604001526104c05181606001526000816080015280905020556104c0516080608059905901600090526000815261080051816020015260028160400152610840518160600152809050205560016104c051016104c052610899565b6104c051606060605990590160009052600081526108005181602001526001816040015280905020556001610920526020610920f35b633fb57036811415610b5457600435606052602435610940526060606059905901600090526000815260605181602001526001816040015280905020546109605261096051608060805990590160009052600081526060518160200152600281604001526109405181606001528090502055600060a060a05990590160009052600081526060518160200152600081604001526109605181606001526000816080015280905020556109405160a060a05990590160009052600081526060518160200152600081604001526109605181606001526001816080015280905020556001606060605990590160009052600081526060518160200152600181604001528090502054016060606059905901600090526000815260605181602001526001816040015280905020556001610a40526020610a40f35b6312709a33811415610beb57600435606052602435608052604435610a6052610a605160a060a059905901600090526000815260605181602001526000816040015260805181606001526000816080015280905020540160a060a059905901600090526000815260605181602001526000816040015260805181606001526000816080015280905020556001610ac0526020610ac0f35b633229cf6e811415610c8257600435606052602435608052604435610a6052610a605160a060a059905901600090526000815260605181602001526000816040015260805181606001526000816080015280905020540360a060a059905901600090526000815260605181602001526000816040015260805181606001526000816080015280905020556001610b20526020610b20f35b63a75f5c6a811415610ce557600435606052602435608052604435610a6052610a605160a060a059905901600090526000815260605181602001526000816040015260805181606001526000816080015280905020556001610b60526020610b60f35b50", + "nonce" : "0x00", + "storage" : { + "0x0f299dbbe3a7a5d949fe794e9a47b3106699c8110ff986eb84921c183e69e7f0" : "0x2f0000000000000000", + "0x1edcd36f61cae5dc6414157dfbadf9f11ca013ac763e27f8af55feaa8a239c89" : "0x01", + "0x689082d076ec3c02cbe4b99f6d9833e3c4a161072fd42fb7649eee5189a67ccc" : "0x63524e3fe4791aefce1e932bbfb3fdf375bfad89", + "0xaf1d6676be3ab502a59d91f6f5c49baffc15b2cfc65a41c4d96857c0f535adba" : "0x01d60000000000000000", + "0xdf1a770f69d93d1719292f384fdb4da22c0e88aef2ba462bff16674bc7848730" : "0x1c11aa45c792e202e9ffdc2f12f99d0d209bef70", + "0xec5e7f54fa5e516e616b04f9d5a0ee433a80e09ed47d7e5269afd76c05ff251e" : "0x02" + } + }, + "f1562e1c0d0baa3ea746442bb7f11153fcf5cfda" : { + "balance" : "0x00", + "code" : "0x600061067f537c010000000000000000000000000000000000000000000000000000000060003504632f300bee8114156100ac576004356040526024356060526044356080526002608051018080602002602001599059016000905281815260208101905090506801000000000000000081526060516080516020028201526001604051036001608051016020028201528060206040820352602060208203510260400160408203f35050505b63a647a5b98114156102c85736599059016000905236600482376004356020820101610100526024356020820101610160526044356020820101610180526064356101a05260843560805250602061010051035180806020026020015990590160009052818152602081019050905060005b6101a0518112156101d557600060005b608051811215610162578060200261010051015181608051850201602002610160510151028201915060018101905061012e565b50680100000000000000008105905060005b6080518112156101c857700100000000000000000000000000000000836020026101805101518260805186020160200261016051015184020205816020028501510381602002850152600181019050610174565b505060018101905061011e565b50600060005b60805181121561020357806020028301518160200284015102820191506001810190506101db565b5068010000000000000000810590506002810560005b600b81121561024257600282680100000000000000008502058301059150600181019050610219565b5060005b60805181121561027657816801000000000000000082602002860151020581602002850152600181019050610246565b5050506001608051602002610100510151036080516020028201526001608051016020026101005101516001608051016020028201528060206040820352602060208203510260400160408203f35050505b635b18022981141561037957365990590160009052366004823760043560208201016103005260243560208201016103205260443560805250600060005b60805181121561033f57680100000000000000008160200261032051015182602002610300510151020582019150600181019050610306565b6000610320515114151561036657610320515168010000000000000000830205915061036b565b600091505b81610380526020610380f350505b63f4ca7dc481141561057157365990590160009052366004823760043560208201016103a05260243560208201016103c0526044356101a0526064356080525060206103c051035160026080510a806020026020015990590160009052818152602081019050905060005b60805181121561044d5760005b6080518112156104415768010000000000000000816020026103a0510151836020026103a051015102058160805184020160200284015101816080518402016020028401526001810190506103f1565b506001810190506103e4565b81905090508180602002602001599059016000905281815260208101905090506080516101a05102806020026020015990590160009052818152602081019050905060005b6101a05181121561051e5760005b6080518112156105125760005b608051811215610506576801000000000000000082608051830201602002870151826080518602016020026103c051015102058260805185020160200285015101826080518502016020028501526001810190506104ad565b506001810190506104a0565b50600181019050610492565b819050905060005b848112156105525780602002820151816020026103c05101510381602002840152600181019050610526565b508160206040820352602060208203510260400160408203f350505050505b63232b273481141561069d57365990590160009052366004823760043560208201016106205260243560208201016102805260443560208201016103c052606435610640526084356101a05260a435608052506000610280515112156106025760005b6080518112156106005780602002610280510151600003816020026102805101526001810190506105d4565b505b60005b6101a05181121561067f5760005b60805181121561067357680100000000000000006801000000000000000082602002610280510151610640510205826080518502016020026103c05101510205826020026106205101510182602002610620510152600181019050610613565b50600181019050610605565b6106205160206040820352602060208203510260400160408203f350505b50", + "nonce" : "0x00", + "storage" : { + } + } + }, + "transaction" : { + "data" : "0x36a560bd00000000000000000000000000000000000000000000000000000000000f69b5", + "gasLimit" : "0x2dc6c0", + "gasPrice" : "0x09184e72a000", + "nonce" : "0x00", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "b03f030056db7d467d778326658bac0d1b35d8f7", + "value" : "0x00" + } + }, "gasPrice0" : { "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", diff --git a/tests/files/TransactionTests/ttWrongRLPTransaction.json b/tests/files/TransactionTests/ttWrongRLPTransaction.json index 23f85bd2b..02c405906 100644 --- a/tests/files/TransactionTests/ttWrongRLPTransaction.json +++ b/tests/files/TransactionTests/ttWrongRLPTransaction.json @@ -3,6 +3,14 @@ "rlp" : "0xb8" }, + "aCrashingRLP" : { + "rlp" : "0x96dc24d6874a9b01e4a7b7e5b74db504db3731f764293769caef100f551efadf7d378a015faca6ae62ae30a9bf5e3c6aa94f58597edc381d0ec167fa0c84635e12a2d13ab965866ebf7c7aae458afedef1c17e08eb641135f592774e18401e0104f8e7f8e0d98e3230332e3133322e39342e31333784787beded84556c094cf8528c39342e3133372e342e31333982765fb840621168019b7491921722649cd1aa9608f23f8857d782e7495fb6765b821002c4aac6ba5da28a5c91b432e5fcc078931f802ffb5a3ababa42adee7a0c927ff49ef8528c3136322e3234332e34362e39829dd4b840e437a4836b77ad9d9ffe73ee782ef2614e6d8370fcf62191a6e488276e23717147073a7ce0b444d485fff5a0c34c4577251a7a990cf80d8542e21b95aa8c5e6cdd8e3230332e3133322e39342e31333788ffffffffa5aadb3a84556c095384556c0919" + }, + + "RLPHeaderSizeOverflowInt32" : { + "rlp" : "0xff0f0000000000005f030182520894b94f5374fce5edbc8e2a8697c15331677e6ebf0b0a801ca098ff921201554726367d2be8c804a7ff89ccf285ebc57dff8ae4c44b9c19ac4aa08887321be575c8095f789dd4c743dfe42c1820f9231f98a962b210e3ac2452a3" + }, + "RLPListLengthWithFirstZeros" : { "rlp" : "0xf9005f030182520894b94f5374fce5edbc8e2a8697c15331677e6ebf0b0a801ca098ff921201554726367d2be8c804a7ff89ccf285ebc57dff8ae4c44b9c19ac4aa08887321be575c8095f789dd4c743dfe42c1820f9231f98a962b210e3ac2452a3" }, diff --git a/tests/init.go b/tests/init.go index 9fe98a0d1..94178af5f 100644 --- a/tests/init.go +++ b/tests/init.go @@ -1,3 +1,20 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + +// Package tests implements execution of Ethereum JSON tests. package tests import ( @@ -8,18 +25,38 @@ import ( "net/http" "os" "path/filepath" + + "github.com/ethereum/go-ethereum/core" ) var ( baseDir = filepath.Join(".", "files") - blockTestDir = filepath.Join(baseDir, "BlockTests") + blockTestDir = filepath.Join(baseDir, "BlockchainTests") stateTestDir = filepath.Join(baseDir, "StateTests") transactionTestDir = filepath.Join(baseDir, "TransactionTests") vmTestDir = filepath.Join(baseDir, "VMTests") - BlockSkipTests = []string{"SimpleTx3"} + BlockSkipTests = []string{ + // Fails in InsertPreState with: computed state root does not + // match genesis block bba25a96 0d8f85c8 Christoph said it will be + // fixed eventually + "SimpleTx3", + + // These tests are not valid, as they are out of scope for RLP and + // the consensus protocol. + "BLOCK__RandomByteAtTheEnd", + "TRANSCT__RandomByteAtTheEnd", + "BLOCK__ZeroByteAtTheEnd", + "TRANSCT__ZeroByteAtTheEnd", + } + + /* Go does not support transaction (account) nonces above 2^64. This + technically breaks consensus but is regarded as "reasonable + engineering constraint" as accounts cannot easily reach such high + nonce values in practice + */ TransSkipTests = []string{"TransactionWithHihghNonce256"} - StateSkipTests = []string{"mload32bitBound_return", "mload32bitBound_return2"} + StateSkipTests = []string{} VmSkipTests = []string{} ) @@ -29,6 +66,7 @@ func readJson(reader io.Reader, value interface{}) error { return fmt.Errorf("Error reading JSON file", err.Error()) } + core.DisableBadBlockReporting = true if err = json.Unmarshal(data, &value); err != nil { if syntaxerr, ok := err.(*json.SyntaxError); ok { line := findLine(data, syntaxerr.Offset) diff --git a/tests/state_test.go b/tests/state_test.go index e58f588f4..eaec4708c 100644 --- a/tests/state_test.go +++ b/tests/state_test.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package tests import ( diff --git a/tests/state_test_util.go b/tests/state_test_util.go index 2f3d497be..547924811 100644 --- a/tests/state_test_util.go +++ b/tests/state_test_util.go @@ -1,7 +1,24 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package tests import ( "bytes" + "encoding/hex" "fmt" "io" "math/big" @@ -147,13 +164,12 @@ func runStateTest(test VmTest) error { func RunState(statedb *state.StateDB, env, tx map[string]string) ([]byte, state.Logs, *big.Int, error) { var ( - keyPair, _ = crypto.NewKeyPairFromSec([]byte(common.Hex2Bytes(tx["secretKey"]))) - data = common.FromHex(tx["data"]) - gas = common.Big(tx["gasLimit"]) - price = common.Big(tx["gasPrice"]) - value = common.Big(tx["value"]) - nonce = common.Big(tx["nonce"]).Uint64() - caddr = common.HexToAddress(env["currentCoinbase"]) + data = common.FromHex(tx["data"]) + gas = common.Big(tx["gasLimit"]) + price = common.Big(tx["gasPrice"]) + value = common.Big(tx["value"]) + nonce = common.Big(tx["nonce"]).Uint64() + caddr = common.HexToAddress(env["currentCoinbase"]) ) var to *common.Address @@ -168,14 +184,16 @@ func RunState(statedb *state.StateDB, env, tx map[string]string) ([]byte, state. coinbase := statedb.GetOrNewStateObject(caddr) coinbase.SetGasLimit(common.Big(env["currentGasLimit"])) - message := NewMessage(common.BytesToAddress(keyPair.Address()), to, data, value, gas, price, nonce) + key, _ := hex.DecodeString(tx["secretKey"]) + addr := crypto.PubkeyToAddress(crypto.ToECDSA(key).PublicKey) + message := NewMessage(addr, to, data, value, gas, price, nonce) vmenv := NewEnvFromMap(statedb, env, tx) - vmenv.origin = common.BytesToAddress(keyPair.Address()) + vmenv.origin = addr ret, _, err := core.ApplyMessage(vmenv, message, coinbase) if core.IsNonceErr(err) || core.IsInvalidTxErr(err) || state.IsGasLimitErr(err) { statedb.Set(snapshot) } - statedb.Update() + statedb.SyncObjects() return ret, vmenv.state.Logs(), vmenv.Gas, err } diff --git a/tests/transaction_test.go b/tests/transaction_test.go index 70aa65cdd..b098379ee 100644 --- a/tests/transaction_test.go +++ b/tests/transaction_test.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package tests import ( diff --git a/tests/transaction_test_util.go b/tests/transaction_test_util.go index 1c92090db..7f24f22d7 100644 --- a/tests/transaction_test_util.go +++ b/tests/transaction_test_util.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package tests import ( diff --git a/tests/util.go b/tests/util.go index 67650c188..2f7e3a358 100644 --- a/tests/util.go +++ b/tests/util.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package tests import ( @@ -120,7 +136,7 @@ type Env struct { coinbase common.Address number *big.Int - time int64 + time uint64 difficulty *big.Int gasLimit *big.Int @@ -150,7 +166,7 @@ func NewEnvFromMap(state *state.StateDB, envValues map[string]string, exeValues //env.parent = common.Hex2Bytes(envValues["previousHash"]) env.coinbase = common.HexToAddress(envValues["currentCoinbase"]) env.number = common.Big(envValues["currentNumber"]) - env.time = common.Big(envValues["currentTimestamp"]).Int64() + env.time = common.Big(envValues["currentTimestamp"]).Uint64() env.difficulty = common.Big(envValues["currentDifficulty"]) env.gasLimit = common.Big(envValues["currentGasLimit"]) env.Gas = new(big.Int) @@ -163,7 +179,7 @@ func (self *Env) BlockNumber() *big.Int { return self.number } //func (self *Env) PrevHash() []byte { return self.parent } func (self *Env) Coinbase() common.Address { return self.coinbase } -func (self *Env) Time() int64 { return self.time } +func (self *Env) Time() uint64 { return self.time } func (self *Env) Difficulty() *big.Int { return self.difficulty } func (self *Env) State() *state.StateDB { return self.state } func (self *Env) GasLimit() *big.Int { return self.gasLimit } diff --git a/tests/vm_test.go b/tests/vm_test.go index 4e417da5a..9121811db 100644 --- a/tests/vm_test.go +++ b/tests/vm_test.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package tests import ( diff --git a/tests/vm_test_util.go b/tests/vm_test_util.go index 286991764..25e2398fe 100644 --- a/tests/vm_test_util.go +++ b/tests/vm_test_util.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package tests import ( diff --git a/trie/cache.go b/trie/cache.go index cb805d2f2..2a5288353 100644 --- a/trie/cache.go +++ b/trie/cache.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package trie import ( diff --git a/trie/encoding.go b/trie/encoding.go index 5c42c556f..8c2d6a3f7 100644 --- a/trie/encoding.go +++ b/trie/encoding.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package trie import ( diff --git a/trie/encoding_test.go b/trie/encoding_test.go index 193c898f3..86b69636f 100644 --- a/trie/encoding_test.go +++ b/trie/encoding_test.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package trie import ( diff --git a/trie/fullnode.go b/trie/fullnode.go index 522fdb373..06edf6a60 100644 --- a/trie/fullnode.go +++ b/trie/fullnode.go @@ -1,17 +1,32 @@ -package trie +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . -import "fmt" +package trie type FullNode struct { trie *Trie nodes [17]Node + dirty bool } func NewFullNode(t *Trie) *FullNode { return &FullNode{trie: t} } -func (self *FullNode) Dirty() bool { return true } +func (self *FullNode) Dirty() bool { return self.dirty } func (self *FullNode) Value() Node { self.nodes[16] = self.trie.trans(self.nodes[16]) return self.nodes[16] @@ -24,9 +39,10 @@ func (self *FullNode) Copy(t *Trie) Node { nnode := NewFullNode(t) for i, node := range self.nodes { if node != nil { - nnode.nodes[i] = node.Copy(t) + nnode.nodes[i] = node } } + nnode.dirty = true return nnode } @@ -60,11 +76,8 @@ func (self *FullNode) RlpData() interface{} { } func (self *FullNode) set(k byte, value Node) { - if _, ok := value.(*ValueNode); ok && k != 16 { - fmt.Println(value, k) - } - self.nodes[int(k)] = value + self.dirty = true } func (self *FullNode) branch(i byte) Node { @@ -75,3 +88,7 @@ func (self *FullNode) branch(i byte) Node { } return nil } + +func (self *FullNode) setDirty(dirty bool) { + self.dirty = dirty +} diff --git a/trie/hashnode.go b/trie/hashnode.go index 8125cc3c9..a6ab084a8 100644 --- a/trie/hashnode.go +++ b/trie/hashnode.go @@ -1,14 +1,31 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package trie import "github.com/ethereum/go-ethereum/common" type HashNode struct { - key []byte - trie *Trie + key []byte + trie *Trie + dirty bool } func NewHash(key []byte, trie *Trie) *HashNode { - return &HashNode{key, trie} + return &HashNode{key, trie, false} } func (self *HashNode) RlpData() interface{} { @@ -19,6 +36,10 @@ func (self *HashNode) Hash() interface{} { return self.key } +func (self *HashNode) setDirty(dirty bool) { + self.dirty = dirty +} + // These methods will never be called but we have to satisfy Node interface func (self *HashNode) Value() Node { return nil } func (self *HashNode) Dirty() bool { return true } diff --git a/trie/iterator.go b/trie/iterator.go index fda7c6cbe..ea299c0c1 100644 --- a/trie/iterator.go +++ b/trie/iterator.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package trie import ( diff --git a/trie/iterator_test.go b/trie/iterator_test.go index 74d9e903c..8ebac5d3d 100644 --- a/trie/iterator_test.go +++ b/trie/iterator_test.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package trie import "testing" diff --git a/trie/node.go b/trie/node.go index 0d8a7cff9..a16800e2b 100644 --- a/trie/node.go +++ b/trie/node.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package trie import "fmt" @@ -11,6 +27,7 @@ type Node interface { fstring(string) string Hash() interface{} RlpData() interface{} + setDirty(dirty bool) } // Value node diff --git a/trie/secure_trie.go b/trie/secure_trie.go index f7a1950e5..944bd53ac 100644 --- a/trie/secure_trie.go +++ b/trie/secure_trie.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package trie import "github.com/ethereum/go-ethereum/crypto" diff --git a/trie/shortnode.go b/trie/shortnode.go index edd490b4d..ebc6c532b 100644 --- a/trie/shortnode.go +++ b/trie/shortnode.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package trie import "github.com/ethereum/go-ethereum/common" @@ -6,20 +22,22 @@ type ShortNode struct { trie *Trie key []byte value Node + dirty bool } func NewShortNode(t *Trie, key []byte, value Node) *ShortNode { - return &ShortNode{t, []byte(CompactEncode(key)), value} + return &ShortNode{t, []byte(CompactEncode(key)), value, false} } func (self *ShortNode) Value() Node { self.value = self.trie.trans(self.value) return self.value } -func (self *ShortNode) Dirty() bool { return true } +func (self *ShortNode) Dirty() bool { return self.dirty } func (self *ShortNode) Copy(t *Trie) Node { - node := &ShortNode{t, nil, self.value.Copy(t)} + node := &ShortNode{t, nil, self.value.Copy(t), self.dirty} node.key = common.CopyBytes(self.key) + node.dirty = true return node } @@ -33,3 +51,7 @@ func (self *ShortNode) Hash() interface{} { func (self *ShortNode) Key() []byte { return CompactDecode(string(self.key)) } + +func (self *ShortNode) setDirty(dirty bool) { + self.dirty = dirty +} diff --git a/trie/slice.go b/trie/slice.go index f53b6c749..de3f7acf8 100644 --- a/trie/slice.go +++ b/trie/slice.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package trie import ( diff --git a/trie/trie.go b/trie/trie.go index d990338ee..30c2569fa 100644 --- a/trie/trie.go +++ b/trie/trie.go @@ -1,3 +1,20 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + +// Package trie implements Merkle Patricia Tries. package trie import ( @@ -117,7 +134,9 @@ func (self *Trie) Update(key, value []byte) Node { k := CompactHexDecode(string(key)) if len(value) != 0 { - self.root = self.insert(self.root, k, &ValueNode{self, value}) + node := NewValueNode(self, value) + node.dirty = true + self.root = self.insert(self.root, k, node) } else { self.root = self.delete(self.root, k) } @@ -157,7 +176,9 @@ func (self *Trie) insert(node Node, key []byte, value Node) Node { } if node == nil { - return NewShortNode(self, key, value) + node := NewShortNode(self, key, value) + node.dirty = true + return node } switch node := node.(type) { @@ -165,7 +186,10 @@ func (self *Trie) insert(node Node, key []byte, value Node) Node { k := node.Key() cnode := node.Value() if bytes.Equal(k, key) { - return NewShortNode(self, key, value) + node := NewShortNode(self, key, value) + node.dirty = true + return node + } var n Node @@ -176,6 +200,7 @@ func (self *Trie) insert(node Node, key []byte, value Node) Node { pnode := self.insert(nil, k[matchlength+1:], cnode) nnode := self.insert(nil, key[matchlength+1:], value) fulln := NewFullNode(self) + fulln.dirty = true fulln.set(k[matchlength], pnode) fulln.set(key[matchlength], nnode) n = fulln @@ -184,11 +209,14 @@ func (self *Trie) insert(node Node, key []byte, value Node) Node { return n } - return NewShortNode(self, key[:matchlength], n) + snode := NewShortNode(self, key[:matchlength], n) + snode.dirty = true + return snode case *FullNode: cpy := node.Copy(self).(*FullNode) cpy.set(key[0], self.insert(node.branch(key[0]), key[1:], value)) + cpy.dirty = true return cpy @@ -242,8 +270,10 @@ func (self *Trie) delete(node Node, key []byte) Node { case *ShortNode: nkey := append(k, child.Key()...) n = NewShortNode(self, nkey, child.Value()) + n.(*ShortNode).dirty = true case *FullNode: sn := NewShortNode(self, node.Key(), child) + sn.dirty = true sn.key = node.key n = sn } @@ -256,6 +286,7 @@ func (self *Trie) delete(node Node, key []byte) Node { case *FullNode: n := node.Copy(self).(*FullNode) n.set(key[0], self.delete(n.branch(key[0]), key[1:])) + n.dirty = true pos := -1 for i := 0; i < 17; i++ { @@ -271,6 +302,7 @@ func (self *Trie) delete(node Node, key []byte) Node { var nnode Node if pos == 16 { nnode = NewShortNode(self, []byte{16}, n.branch(byte(pos))) + nnode.(*ShortNode).dirty = true } else if pos >= 0 { cnode := n.branch(byte(pos)) switch cnode := cnode.(type) { @@ -278,8 +310,10 @@ func (self *Trie) delete(node Node, key []byte) Node { // Stitch keys k := append([]byte{byte(pos)}, cnode.Key()...) nnode = NewShortNode(self, k, cnode.Value()) + nnode.(*ShortNode).dirty = true case *FullNode: nnode = NewShortNode(self, []byte{byte(pos)}, n.branch(byte(pos))) + nnode.(*ShortNode).dirty = true } } else { nnode = n @@ -304,7 +338,7 @@ func (self *Trie) mknode(value *common.Value) Node { if value.Get(0).Len() != 0 { key := CompactDecode(string(value.Get(0).Bytes())) if key[len(key)-1] == 16 { - return NewShortNode(self, key, &ValueNode{self, value.Get(1).Bytes()}) + return NewShortNode(self, key, NewValueNode(self, value.Get(1).Bytes())) } else { return NewShortNode(self, key, self.mknode(value.Get(1))) } @@ -318,10 +352,10 @@ func (self *Trie) mknode(value *common.Value) Node { return fnode } case 32: - return &HashNode{value.Bytes(), self} + return NewHash(value.Bytes(), self) } - return &ValueNode{self, value.Bytes()} + return NewValueNode(self, value.Bytes()) } func (self *Trie) trans(node Node) Node { @@ -338,7 +372,11 @@ func (self *Trie) store(node Node) interface{} { data := common.Encode(node) if len(data) >= 32 { key := crypto.Sha3(data) - self.cache.Put(key, data) + if node.Dirty() { + //fmt.Println("save", node) + //fmt.Println() + self.cache.Put(key, data) + } return key } diff --git a/trie/trie_test.go b/trie/trie_test.go index 9a58958d8..cfb162e21 100644 --- a/trie/trie_test.go +++ b/trie/trie_test.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package trie import ( @@ -152,7 +168,7 @@ func TestReplication(t *testing.T) { } trie.Commit() - trie2 := New(trie.roothash, trie.cache.backend) + trie2 := New(trie.Root(), trie.cache.backend) if string(trie2.GetString("horse")) != "stallion" { t.Error("expected to have horse => stallion") } diff --git a/trie/valuenode.go b/trie/valuenode.go index 7bf8ff06e..ef9e88ebb 100644 --- a/trie/valuenode.go +++ b/trie/valuenode.go @@ -1,15 +1,42 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package trie import "github.com/ethereum/go-ethereum/common" type ValueNode struct { - trie *Trie - data []byte + trie *Trie + data []byte + dirty bool } -func (self *ValueNode) Value() Node { return self } // Best not to call :-) -func (self *ValueNode) Val() []byte { return self.data } -func (self *ValueNode) Dirty() bool { return true } -func (self *ValueNode) Copy(t *Trie) Node { return &ValueNode{t, common.CopyBytes(self.data)} } +func NewValueNode(trie *Trie, data []byte) *ValueNode { + return &ValueNode{trie, data, false} +} + +func (self *ValueNode) Value() Node { return self } // Best not to call :-) +func (self *ValueNode) Val() []byte { return self.data } +func (self *ValueNode) Dirty() bool { return self.dirty } +func (self *ValueNode) Copy(t *Trie) Node { + return &ValueNode{t, common.CopyBytes(self.data), self.dirty} +} func (self *ValueNode) RlpData() interface{} { return self.data } func (self *ValueNode) Hash() interface{} { return self.data } + +func (self *ValueNode) setDirty(dirty bool) { + self.dirty = dirty +} diff --git a/update-license.go b/update-license.go deleted file mode 100644 index ea7ab67c5..000000000 --- a/update-license.go +++ /dev/null @@ -1,248 +0,0 @@ -// +build none - -/* -This command generates GPL license headers on top of all source files. -You can run it once per month, before cutting a release or just -whenever you feel like it. - - go run update-license.go - -The copyright in each file is assigned to any authors for which git -can find commits in the file's history. It will try to follow renames -throughout history. The author names are mapped and deduplicated using -the .mailmap file. You can use .mailmap to set the canonical name and -address for each author. See git-shortlog(1) for an explanation -of the .mailmap format. - -Please review the resulting diff to check whether the correct -copyright assignments are performed. -*/ -package main - -import ( - "bufio" - "bytes" - "fmt" - "io/ioutil" - "os" - "os/exec" - "path/filepath" - "regexp" - "runtime" - "sort" - "strings" - "sync" - "text/template" -) - -var ( - // only files with these extensions will be considered - extensions = []string{".go", ".js", ".qml"} - - // paths with any of these prefixes will be skipped - skipPrefixes = []string{"Godeps/", "tests/files/", "cmd/mist/assets/ext/", "cmd/mist/assets/muted/"} - - // paths with this prefix are licensed as GPL. all other files are LGPL. - gplPrefixes = []string{"cmd/"} - - // this regexp must match the entire license comment at the - // beginning of each file. - licenseCommentRE = regexp.MustCompile(`(?s)^/\*\s*(Copyright|This file is part of) .*?\*/\n*`) - - // this line is used when git doesn't find any authors for a file - defaultCopyright = "Copyright (C) 2014 Jeffrey Wilcke " -) - -// this template generates the license comment. -// its input is an info structure. -var licenseT = template.Must(template.New("").Parse(`/* - {{.Copyrights}} - - This file is part of go-ethereum - - go-ethereum is free software: you can redistribute it and/or modify - it under the terms of the GNU {{.License}} as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - go-ethereum is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU {{.License}} for more details. - - You should have received a copy of the GNU {{.License}} - along with go-ethereum. If not, see . -*/ - -`)) - -type info struct { - file string - mode os.FileMode - authors map[string][]string // map keys are authors, values are years - gpl bool -} - -func (i info) Copyrights() string { - var lines []string - for name, years := range i.authors { - lines = append(lines, "Copyright (C) "+strings.Join(years, ", ")+" "+name) - } - if len(lines) == 0 { - lines = []string{defaultCopyright} - } - sort.Strings(lines) - return strings.Join(lines, "\n\t") -} - -func (i info) License() string { - if i.gpl { - return "General Public License" - } else { - return "Lesser General Public License" - } -} - -func (i info) ShortLicense() string { - if i.gpl { - return "GPL" - } else { - return "LGPL" - } -} - -func (i *info) addAuthorYear(name, year string) { - for _, y := range i.authors[name] { - if y == year { - return - } - } - i.authors[name] = append(i.authors[name], year) - sort.Strings(i.authors[name]) -} - -func main() { - files := make(chan string) - infos := make(chan *info) - wg := new(sync.WaitGroup) - - go getFiles(files) - for i := runtime.NumCPU(); i >= 0; i-- { - // getting file info is slow and needs to be parallel - wg.Add(1) - go getInfo(files, infos, wg) - } - go func() { wg.Wait(); close(infos) }() - writeLicenses(infos) -} - -func getFiles(out chan<- string) { - cmd := exec.Command("git", "ls-tree", "-r", "--name-only", "HEAD") - err := doLines(cmd, func(line string) { - for _, p := range skipPrefixes { - if strings.HasPrefix(line, p) { - return - } - } - ext := filepath.Ext(line) - for _, wantExt := range extensions { - if ext == wantExt { - goto send - } - } - return - - send: - out <- line - }) - if err != nil { - fmt.Println("error getting files:", err) - } - close(out) -} - -func getInfo(files <-chan string, out chan<- *info, wg *sync.WaitGroup) { - for file := range files { - stat, err := os.Lstat(file) - if err != nil { - fmt.Printf("ERROR %s: %v\n", file, err) - continue - } - if !stat.Mode().IsRegular() { - continue - } - info, err := fileInfo(file) - if err != nil { - fmt.Printf("ERROR %s: %v\n", file, err) - continue - } - info.mode = stat.Mode() - out <- info - } - wg.Done() -} - -func fileInfo(file string) (*info, error) { - info := &info{file: file, authors: make(map[string][]string)} - for _, p := range gplPrefixes { - if strings.HasPrefix(file, p) { - info.gpl = true - break - } - } - cmd := exec.Command("git", "log", "--follow", "--find-copies", "--pretty=format:%ai | %aN <%aE>", "--", file) - err := doLines(cmd, func(line string) { - sep := strings.IndexByte(line, '|') - year, name := line[:4], line[sep+2:] - info.addAuthorYear(name, year) - }) - return info, err -} - -func writeLicenses(infos <-chan *info) { - buf := new(bytes.Buffer) - for info := range infos { - content, err := ioutil.ReadFile(info.file) - if err != nil { - fmt.Printf("ERROR: couldn't read %s: %v\n", info.file, err) - continue - } - - // construct new file content - buf.Reset() - licenseT.Execute(buf, info) - if m := licenseCommentRE.FindIndex(content); m != nil && m[0] == 0 { - buf.Write(content[m[1]:]) - } else { - buf.Write(content) - } - - if !bytes.Equal(content, buf.Bytes()) { - fmt.Println("writing", info.ShortLicense(), info.file) - if err := ioutil.WriteFile(info.file, buf.Bytes(), info.mode); err != nil { - fmt.Printf("ERROR: couldn't write %s: %v", info.file, err) - } - } - } -} - -func doLines(cmd *exec.Cmd, f func(string)) error { - stdout, err := cmd.StdoutPipe() - if err != nil { - return err - } - if err := cmd.Start(); err != nil { - return err - } - s := bufio.NewScanner(stdout) - for s.Scan() { - f(s.Text()) - } - if s.Err() != nil { - return s.Err() - } - if err := cmd.Wait(); err != nil { - return fmt.Errorf("%v (for %s)", err, strings.Join(cmd.Args, " ")) - } - return nil -} diff --git a/whisper/doc.go b/whisper/doc.go index 986df8fb9..d1d2a0cf0 100644 --- a/whisper/doc.go +++ b/whisper/doc.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + /* Package whisper implements the Whisper PoC-1. diff --git a/whisper/envelope.go b/whisper/envelope.go index a4e2fa031..0cf4c4612 100644 --- a/whisper/envelope.go +++ b/whisper/envelope.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + // Contains the Whisper protocol Envelope element. For formal details please see // the specs at https://github.com/ethereum/wiki/wiki/Whisper-PoC-1-Protocol-Spec#envelopes. diff --git a/whisper/envelope_test.go b/whisper/envelope_test.go index b64767b2e..024d9b312 100644 --- a/whisper/envelope_test.go +++ b/whisper/envelope_test.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package whisper import ( diff --git a/whisper/filter.go b/whisper/filter.go index c946d9380..3a3ff842b 100644 --- a/whisper/filter.go +++ b/whisper/filter.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + // Contains the message filter for fine grained subscriptions. package whisper diff --git a/whisper/filter_test.go b/whisper/filter_test.go index ca28fd83c..eb457adf5 100644 --- a/whisper/filter_test.go +++ b/whisper/filter_test.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package whisper import ( diff --git a/whisper/main.go b/whisper/main.go index 3c8c3801f..e0552af95 100644 --- a/whisper/main.go +++ b/whisper/main.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + // +build none // Contains a simple whisper peer setup and self messaging to allow playing diff --git a/whisper/message.go b/whisper/message.go index a80380a92..7141deb80 100644 --- a/whisper/message.go +++ b/whisper/message.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + // Contains the Whisper protocol Message element. For formal details please see // the specs at https://github.com/ethereum/wiki/wiki/Whisper-PoC-1-Protocol-Spec#messages. diff --git a/whisper/message_test.go b/whisper/message_test.go index 0b4a24c24..53ac9ccd5 100644 --- a/whisper/message_test.go +++ b/whisper/message_test.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package whisper import ( diff --git a/whisper/peer.go b/whisper/peer.go index 0d9538ffc..541ba3829 100644 --- a/whisper/peer.go +++ b/whisper/peer.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package whisper import ( diff --git a/whisper/peer_test.go b/whisper/peer_test.go index 9008cdc59..8d0067a63 100644 --- a/whisper/peer_test.go +++ b/whisper/peer_test.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package whisper import ( diff --git a/whisper/topic.go b/whisper/topic.go index c47c94ae1..fa39dd025 100644 --- a/whisper/topic.go +++ b/whisper/topic.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + // Contains the Whisper protocol Topic element. For formal details please see // the specs at https://github.com/ethereum/wiki/wiki/Whisper-PoC-1-Protocol-Spec#topics. diff --git a/whisper/topic_test.go b/whisper/topic_test.go index 976f3e88d..cba517355 100644 --- a/whisper/topic_test.go +++ b/whisper/topic_test.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package whisper import ( diff --git a/whisper/whisper.go b/whisper/whisper.go index 994b4e506..c6c26052d 100644 --- a/whisper/whisper.go +++ b/whisper/whisper.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package whisper import ( diff --git a/whisper/whisper_test.go b/whisper/whisper_test.go index 7c5067f51..4469f319b 100644 --- a/whisper/whisper_test.go +++ b/whisper/whisper_test.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package whisper import ( diff --git a/xeth/frontend.go b/xeth/frontend.go index fe1d57c50..967ccbaf5 100644 --- a/xeth/frontend.go +++ b/xeth/frontend.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package xeth // Frontend should be implemented by users of XEth. Its methods are diff --git a/xeth/state.go b/xeth/state.go index 669cf91e6..434c4aae9 100644 --- a/xeth/state.go +++ b/xeth/state.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package xeth import ( diff --git a/xeth/types.go b/xeth/types.go index ed64dc45e..f584b69ba 100644 --- a/xeth/types.go +++ b/xeth/types.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package xeth import ( @@ -60,7 +76,7 @@ type Block struct { Hash string `json:"hash"` Transactions *common.List `json:"transactions"` Uncles *common.List `json:"uncles"` - Time int64 `json:"time"` + Time uint64 `json:"time"` Coinbase string `json:"coinbase"` Name string `json:"name"` GasLimit string `json:"gasLimit"` @@ -149,7 +165,8 @@ func NewTx(tx *types.Transaction) *Transaction { if to := tx.To(); to != nil { receiver = to.Hex() } else { - receiver = core.AddressFromMessage(tx).Hex() + from, _ := tx.From() + receiver = crypto.CreateAddress(from, tx.Nonce()).Hex() } createsContract := core.MessageCreatesContract(tx) @@ -167,16 +184,6 @@ func (self *Transaction) ToString() string { return self.ref.String() } -type Key struct { - Address string `json:"address"` - PrivateKey string `json:"privateKey"` - PublicKey string `json:"publicKey"` -} - -func NewKey(key *crypto.KeyPair) *Key { - return &Key{common.ToHex(key.Address()), common.ToHex(key.PrivateKey), common.ToHex(key.PublicKey)} -} - type PReceipt struct { CreatedContract bool `json:"createdContract"` Address string `json:"address"` diff --git a/xeth/whisper.go b/xeth/whisper.go index edb62c748..6deae4e5c 100644 --- a/xeth/whisper.go +++ b/xeth/whisper.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + // Contains the external API to the whisper sub-protocol. package xeth diff --git a/xeth/whisper_filter.go b/xeth/whisper_filter.go index 52e70e041..b6c94ef83 100644 --- a/xeth/whisper_filter.go +++ b/xeth/whisper_filter.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + // Contains the external API side message filter for watching, pooling and polling // matched whisper messages, also serializing data access to avoid duplications. diff --git a/xeth/whisper_message.go b/xeth/whisper_message.go index c8195cec1..3c48561ec 100644 --- a/xeth/whisper_message.go +++ b/xeth/whisper_message.go @@ -1,3 +1,19 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + // Contains the external API representation of a whisper message. package xeth diff --git a/xeth/xeth.go b/xeth/xeth.go index 0dbedff43..d1085dc92 100644 --- a/xeth/xeth.go +++ b/xeth/xeth.go @@ -1,4 +1,20 @@ -// eXtended ETHereum +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + +// Package xeth is the interface to all Ethereum functionality. package xeth import ( @@ -203,34 +219,6 @@ func (self *XEth) AtStateNum(num int64) *XEth { return self.WithState(st) } -// applies queued transactions originating from address onto the latest state -// and creates a block -// only used in tests -// - could be removed in favour of mining on testdag (natspec e2e + networking) -// + filters -func (self *XEth) ApplyTestTxs(statedb *state.StateDB, address common.Address, txc uint64) (uint64, *XEth) { - chain := self.backend.ChainManager() - header := chain.CurrentBlock().Header() - coinbase := statedb.GetStateObject(address) - coinbase.SetGasLimit(big.NewInt(10000000)) - txs := self.backend.TxPool().GetQueuedTransactions() - - for i := 0; i < len(txs); i++ { - for _, tx := range txs { - if tx.Nonce() == txc { - _, _, err := core.ApplyMessage(core.NewEnv(statedb, self.backend.ChainManager(), tx, header), tx, coinbase) - if err != nil { - panic(err) - } - txc++ - } - } - } - - xeth := self.WithState(statedb) - return txc, xeth -} - func (self *XEth) WithState(statedb *state.StateDB) *XEth { xeth := &XEth{ backend: self.backend, @@ -364,22 +352,12 @@ func (self *XEth) CurrentBlock() *types.Block { return self.backend.ChainManager().CurrentBlock() } -func (self *XEth) GetBlockReceipts(bhash common.Hash) (receipts types.Receipts, err error) { +func (self *XEth) GetBlockReceipts(bhash common.Hash) types.Receipts { return self.backend.BlockProcessor().GetBlockReceipts(bhash) } -func (self *XEth) GetTxReceipt(txhash common.Hash) (receipt *types.Receipt, err error) { - _, bhash, _, txi := self.EthTransactionByHash(common.ToHex(txhash[:])) - var receipts types.Receipts - receipts, err = self.backend.BlockProcessor().GetBlockReceipts(bhash) - if err == nil { - if txi < uint64(len(receipts)) { - receipt = receipts[txi] - } else { - err = fmt.Errorf("Invalid tx index") - } - } - return +func (self *XEth) GetTxReceipt(txhash common.Hash) *types.Receipt { + return core.GetReceipt(self.backend.ExtraDb(), txhash) } func (self *XEth) GasLimit() *big.Int { @@ -477,7 +455,10 @@ func (self *XEth) IsListening() bool { } func (self *XEth) Coinbase() string { - eb, _ := self.backend.Etherbase() + eb, err := self.backend.Etherbase() + if err != nil { + return "0x0" + } return eb.Hex() } @@ -511,15 +492,6 @@ func (self *XEth) IsContract(address string) bool { return len(self.State().SafeGet(address).Code()) > 0 } -func (self *XEth) SecretToAddress(key string) string { - pair, err := crypto.NewKeyPairFromSec(common.FromHex(key)) - if err != nil { - return "" - } - - return common.ToHex(pair.Address()) -} - func (self *XEth) UninstallFilter(id int) bool { defer self.filterManager.UninstallFilter(id) @@ -802,7 +774,12 @@ func (self *XEth) PushTx(encodedTx string) (string, error) { } if tx.To() == nil { - addr := core.AddressFromMessage(tx) + from, err := tx.From() + if err != nil { + return "", err + } + + addr := crypto.CreateAddress(from, tx.Nonce()) glog.V(logger.Info).Infof("Tx(%x) created: %x\n", tx.Hash(), addr) return addr.Hex(), nil } else { @@ -969,17 +946,17 @@ func (self *XEth) Transact(fromStr, toStr, nonceStr, valueStr, gasStr, gasPriceS } if contractCreation { - addr := core.AddressFromMessage(tx) + addr := crypto.CreateAddress(from, nonce) glog.V(logger.Info).Infof("Tx(%x) created: %x\n", tx.Hash(), addr) - return addr.Hex(), nil } else { glog.V(logger.Info).Infof("Tx(%x) to: %x\n", tx.Hash(), tx.To()) } - return tx.Hash().Hex(), nil + + return signed.Hash().Hex(), nil } func (self *XEth) sign(tx *types.Transaction, from common.Address, didUnlock bool) (*types.Transaction, error) { - hash := tx.Hash() + hash := tx.SigHash() sig, err := self.doSign(from, hash, didUnlock) if err != nil { return tx, err