use of org.aion.zero.impl.blockchain.StandaloneBlockchain.Builder in project aion by aionnetwork.
the class MasteryConsensusTest method testImportBlock449072.
/**
* Tests importing block <a href="https://mastery.aion.network/#/block/449072">449072</a>.
*/
@Test
public void testImportBlock449072() {
TransactionTypeRule.disallowAVMContractTransaction();
// data extracted from the mastery network
Block block449070 = BlockUtil.newBlockFromRlp(Hex.decode("f909e5f90790018306da2ea0a517d41e7db9986931a0c07ba38cd0cd5d1881405e42ff05423dcab0beb77069a0a046d675210b4eac2d7840730f1f73e9f806e73d05127f74d7132311e8a55e0aa0a2b0192b7bd49c9141b81843ebdefe363825a2bafbc786ba9a2587cd3c385b4ea0a99e9e7faf20c4a26b2107ea289bac800ef57f2cf826497d8f92a6b0274e5b85a0b824c514f4ce2d0a71a0ad01afff44785b500e9171a9e66e258d10c48997c789b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000900000000000000000000000000000004fa041494f4e000000000000000000000000000000000000000000000000000000008304acae83e4de0c845b9bd9ffa06b885e1d4dbbb461ae70627d379ddd42e4807c2c07d0d7cef49e6c1606587d8fb90580029759fe1cb0e598136bca15d164e87f86c12faeca9c07c4633351d525de33116f0e61ff819e652bd739d8ab02c7678849c15254ff292808a6e866b2c13df0fa325e096ae5cd0b43966e349fcd2a152f9dc579c8ee79b5200457d981425a0229bd08a76e604753baea9947fe8aa33a5245a0e7b4d690a04db8584e324613cbaa5771e30507f49d3396010e1bc5fe3d33f9523a6ff8b7abb13d8c20e89c8832931a1e3ecf9b37b891a51cb8b7f03543ac0348264df82f0fa77edb4e3545a986c8cacd323bbd363cbc6fb3b3ead2b4701fac65ce8bf5ece8d923acd759137a47cd07b2360fcf797621a5294db944143024cadd2a952eb8c1642d60738f152dc64a589e93cfdd574230151e1be422ad6554f5bde74a881ea7bddd262939d78e26ba769782eade7af2aba442a067a7b9582e357d3b6f17636a720df9a2cc2c9a8729abdf31a1e9b3b42bc2f525611b31b193366015a2917e7e87666ebb0ed7f531ec07e142f14cc1d3ca67bb1c1cc1797c6f44ff0d37662a0ff3e9291be19f654fa20d6973a6d352e7d727a574a20ffc937c4364dbb4e8389661bdfbe0b95ae335b9eb9e1b75df49cd766a09b3bf313fa456956d4590663a59420b189d511b74c688e44aa542738b57f4db11727333eb10ba6dbaa0c1a32c76bd667af6b35c9908c1506c78f12c4ddd163d83270d9028e05ffaaad76c4e514efdab362f67df8cc57689453c285d4fc66abaa9e7e177300bee08137d8fa708205b667eac08fd97a6f8d1b08527d21609523e96eef7f209326e7338d5b743cc45e0d665c1162df4ad9f4b29af10abc85577c69b193beeee8e7c252a46e1db144079e2eb77ae566024ca99f8c9e8753b41680d4a5acf9877d46db112c5334bc37577148dbf711a39307ff2d4148b2e023e7f9e383ddf1dc9b955a36e4f0a172f4cea62cb0e24f6ca404e3a0f0374ca06512850503dc47babf1651c88d9063ec7a86343b24eb1983c526703399133bff34b277c2f170da9f3fbdd68d4bdbbd4164ce82678bf5c9e7873cae74ed1196d2cee9883bd38bd0f2ee513fa11b04b1c1376167c8d49bacaedf6f2932e5092894e30b57952a2a9ea8bb67e8aa529751439e1cb03fc5be7834a72672bfcc440023ed334872401a80ff10cec84efdcb2154715e5cf1635bcd7fbbd4020f977a3050a295ac384a629a1930348208d7912ece81b34f6ff1f9f16a9c41ce253b65ebc64f07b7f486ecfedbf0f4a033e9e5f43faf324bb00300a79a0ca3c89274b651fba4486a2c8fa5a110f39ae9c4624629855059c282d252a1577e9bfdf54657227669c3d8bf552be15ee47bbcfb95806d760b0a732ebaf573685c0526cbb899e956b5f2d0f9ccae4dab2a0c76a515a21503575b8d3054a6218870fca7f328593ad4676d72714a4168df1faa1afafe83f2e0718e300bd2991b5196b46ffa715df668b2eb4702f39bfa59c57a99d0a7afbf1b0954f9279fb69a8b1d25004d06d3260e2bcb1f8ea0a32d2098baac537b7ff96c3148b1cc2aab36225995f0e35c3991b46542db672b06412bb047748729f76ea82ff384acb170abc4f9cf2896530330ae54626003279f247326a83dc01379e851ff4760ede312c58d5b5189769cd84073bc1315b7c803ab6fe51f81bc51fbbc0ad3b29c2775abb76be2a27e0e95a4a1829aa1bcf271c11321d7451871a3ad8d77f3ffc98038228425bed3a41226dfc54c6173379179de323bd35d606bcdee46ae12ec6a2b27811761685eaad72c37654814f71fe7ec175cc12a4bb6c663953a6e2e81e89f70e24210da8e25f3928773217f64818ba9ab80496233a40bf23bdd551a402f873bcc2f54e7fc2fc38852bb0db76c20b05f7c87ef10386fab0d13f3bffb25376d6eb764c4715b1270f513262d0d48c832790c9ea3cb808527b2f6a3d874dd73f25004e26867b40a67f0387d523fba514b74a3bd7778d662feaed42936681dbe19a4a71bcf13eaaf9024ff9024c8200808000b901cb605060405234156100105760006000fd5b6040516010806101bb833981016040528080519060100190919050505b8060026000508190909055503360006000508282909180600101839055555050505b50610055565b610157806100646000396000f30060506040526000356c01000000000000000000000000900463ffffffff1680638381f58a146100495780638da5cb5b14610073578063ef5fb05b146100a457610043565b60006000fd5b34156100555760006000fd5b61005d6100ba565b6040518082815260100191505060405180910390f35b341561007f5760006000fd5b6100876100c3565b604051808383825281601001526020019250505060405180910390f35b34156100b05760006000fd5b6100b86100d2565b005b60026000505481565b60006000508060010154905482565b7fa4b2ef570a52be2758b82dc86cd15581cfe78d58e543eb1540ad79ebbbf6a5e960006000508060010154905460026000505460405180848482528160100152602001828152601001935050505060405180910390a15b5600a165627a7a72305820354ae16e86077d3760f892f2fdf13d5e00d2d0655972f946109ebf8bd817b414002900000000000000000000000000007a6988000575d6da4c097b833d09008800000002540be40001b860b7dfe3a9fd46fbd034687a6c2a3ddfd61896b8e7521402369383d6a52a591a5bffada787161e8325c279084ffdf2b58fbe7f2c59982c25c75e5bd122085bb3ad0e8da1e107958c3cd27a70dcd9ee8146f357d7e57ff7305df51052623378db0d"));
BigInteger tdAt449070 = BigInteger.valueOf(19_568_688);
Block block449071 = BlockUtil.newBlockFromRlp(Hex.decode("f90c43f90790018306da2fa01ddf2bf6b1f8d3dc82e09affead7d33a44283987465e9f3b0511c292c34f9a88a0a0450c4333e72ed26552d7462c0b3669924eec816a219b3960d5b3f0b33f7444a09b55a9763fe00bbe5e00a683025b270565cdf3bdfd51f40fd1912b583a81bfc4a049f473ed60efa21ec154f31c09e8806ff75c65a59541c5eb8a1d5a630cd174bba09aab9e5ccf3613155a737381e7af3f11b8cfd87a073dc97323ef024cb36596a2b9010000000000000000000000080000000000000001000000000040008000000000002000000000001000010000000000000400000000000000000000900002000000040000000020000400000000000000000000000000000000000000008000000100020000002001000000000000000000000000000000000001000000008000004000000000000009000000000000200008000000000000000000000000000000008008000000000200800000020000000000000000000000000000800008800000000000000000000040000000000000010000000000000000000000000000000001200000000000000000000000008000000000000000000000000000000000900000000000000000000000000000004ea041494f4e000000000000000000000000000000000000000000000000000000008301b4ea83e51743845b9bda12a0a4c3cb3280a3a3dd6cd0e924f41aa29f9774c3c67b8993bd58bbacd4d8f70932b90580001d33b19f1ea7333af7c722699acda46f4f69fee5fa15d11ea3188e0adaf984f74a9dd38a2d086ca0f9fd4204b2db7f360a48b7fc66ddc98dbf78f30dbd4a3812640642eb9dc934e2996deea722462b37b4b761b1fe545906ea9db229f2888c7812654f2f522a15eccec7762f6e091f5191c67ad6833aec015853ee817bf86226afe953131eb33888a81061e4cbc23edb858a1f351c5419840813f5a39f82a5329431da6b24362f3dcc2c5b5035bd96003578fb754758821ddc4f064e2da04b07128c3879310c057d274a1226df4bbc515d4766b424fc1e6b78b9ff0e22d50df4b30cf4580a50217b6d29e265bc3db36acc2f4c7ffce39d146b3edb6039d202e3221d9459fbc0971259509cf0b517feb78e1850b44361f78b8d472f049d1e3029310f669f49739abd7ebad7b69d49dfccaac24f29dc74ed21e674616a5a7bc1982791627d62e1be50873237e57a60ea599d76161257b2ff60c0e8d096bd202201bd1bc330bd6f093ffce1417ee2bbbd34a61d19a40d108d835793b92192a8e1fb4912f314929891d676668a0899bd6283986e556b206614948be56944382dbc5f4614399765b96a9db970fcac7b685f91bd4c28d775e93d04dff7846841d971f5fa595a870b672a25c88cfea7002460212653c6e7d9ea8d7c596dcaea5d5857853b0af40690125ad1e0adfa21792b123656dd08e1e819faeaa371a0cfbf9f2d3465b651aa911b47edcf3af9153ead0b052e5d77f42319462601d252d1779b4499f3ab71624b0e64624ac59450e7a035554621e26c130c37b9bbab750859957c84aac4713b7c0c10fe70d4236cec9138310226aba0c1f6e8187078f10c26cd6b1a1f4e19297ba1c40541cd0b97d0ad796c7d6316bdfcaa9cbce85273e7df17ca0f16a1324c93bbacd9662c6bf25a09209c31fc01124979d3112c60377375e84b3b494c64e87f4831cec14bfa7352f1c6a041ffcda0bb0a9735eabc4ca9765b1e0137f0b39bd526607f0760172c6556a75bf6fc73c1a504eeb9515597ad0d37bf336df8aed7679bf007fa20ea134a7f4a08a32c27bbe3ae6ed2d6ca1608261a6aa9bb51ff5d7af00526fcaf5ab76420fe07d7b87b31784c3c02687e6997cbf00c789ad84e0bf34a0288669e69f4d60f2e37ddc3c2414c1f15a9cccd8b7aeccd18de3ae97c0a0bafda7c80eadde5202a4bc9ff1a7936740b5c407c15a9fee353b33de864a575509c9b0c564a333a393e7501e8bb22d515a3d3b0fe09670a6a7a4fc857257f8a7305fe30f1120bf576fcf6c1574796b1b03852163d43be0d6c51d9f5b991de3f78252eb639f3a6539ced5df1792017ef41167e48c8bb8379202f5d26c6c493e6f62a34020346d9e7b27a939320f4346a8d13efc40001e68a3504783fb2d87425e4ebceaa07973334ba62dde35f3cb10aaeadd8258566de7b098127ec59b42628cdec7dc9a2209523c7cb17c1f925edfc34dc19dbb143a743a3ca4801c6c1607aa71378a3b3c75b34fb1d382f6ee43ebe561f164100ac391f3824c2ea5d5a3712a3b64bd8a39d833772094a3115d0e5a1c87e69866f54eadda395f6b3d9625aef5e5179dec675aebc76abedfad929bfb8efa3a10357fbeb757351cbd43b67317106a12324dd57952acb6fb7076fabf94b16b5f623cadf53c0b6bd1678ffbfc51234f3a225c67f049b93fe2d0bc9fe6dca5204b4aaf32a551de8fa37119d728f6c599422202eb6e8efb1449a09fd18ccc198d56d7a03b0894cc64e9d6ef8c5bdbdf81456fce8cc21617949f6125789e9e89cb8a887b0334b26b2219e689d1cff76b6c33b8dc2dad919b453ff723f44653bb2395942c22beab34d7c49821da7e2ad20ab691328f1f517524a8e593c1e240d9be845373a00748aa927653e4c2c8daf0ef9facc29258d2f5078bde238832c23c860bbea023db0a3cd942505d185fe9697acb1f6ee30148d9ec8549e4eabc4c346b689d827f73ddbf1dcc8f904adf904058301f35ba0000000000000000000000000000000000000000000000000000000000000020000b9036446d1cc291fffb2cee5a11ae992804087a79dd1a8a31f9f1aa55d32bf8a96e3b07b76bb2700000000000000000000000000000080000000000000000000000000000000d0000000000000000000000000000001200000000000000000000000000000015000000000000000000000000000000200000000000000000000000000000002b000000000000000000000000000000002076199441923cef4b0c63cf0fdfe94754981682124f2b42549e5f55984dda40bea79f4094ab811c428135723366f811fc2f6f213de449763adf98221ef203a8700000000000000000000000000000002a096bcd13b92b3d82db5ca72402c118348f94d0196536dd51db3d9bf9f90eeb2a0857d801d75e6df4d8cbcec7ea98e54986df8a02ee526cbfedd76fb78a61ee8000000000000000000000000000000020000000000000000000003e6d7ed14000000000000000000000005e96630e80000000000000000000000000000000005ffd54a38223fb0505d3a03b8c5bdc91300302578edf77d2d922cf447d7021d965ef28c555c278b49afee3171e5b684365240aeff1a026e3295ea29b505e9a0ff1062eb71a6fa290ae09813ba4c1639d2967ac706bba3abd229b910b314be0f973a77870771305f0e63b94ae7a355f5bde859a2eb49133062ec46555203659945c1c1f53160283d16cae44cc092b4ad9c7ca2b8501af421e584e665852137ce9e00000000000000000000000000000005ce4cb960453828ca236a3aed7c139a1dae6529c92f5d50f8973bedead29e86d9ba9933cd1378546c2303710eac4856e1481406ef6053cfa78ff5161cde86ce71a26c6726330b4997988c1efb4a439dfa83585048f2182494696d0363eb477ad70a925aa89fff259da08302af19306011625805cd237205b2ec16c14e27eb0e7857b401a06e551d4e2ccdb9c329c8bff98aa06699a42df91e7f1873f8db611f74000000000000000000000000000000056163b6675723c455b145130e8f65d6a210271638dca8bfec2437518f66142f0aed5d99bfa7bfe15544c45f538aa324bd7f9652134daf52f29067c8a1a9079402af2d37de4ba25ec58951bc65b8c2944e7f0c1403f207eccf8ad891525782f30682f531fa78ad0b03f879d6a107d0051aa10a05decbfee314ba18acd0a357110d59d0bfa3c772defbb9ba87ab18e964434506974059bc353b57613285b7962d0e870575d6dc1e4e10830f42408800000002540be40001b86019ab2f3355c2f74376718c3f6c96a779de2144c4592a5cab23c82b739dc44fe0eff6d1d25660e10dfe611c3e792ee275613fd3e708e277eddc9743d1229322d83b2f4280264b1b7b8238020e6b5e6b5a274e55825de4ff488d1e2117ccf6b50df8a3820081a0a04dc19bf26dbd3348b923339c937afa5dd239479ac1380af4f6cf241b90129e0084ef5fb05b88000575d6dbe90beb831e84808800000002540be40001b860b7dfe3a9fd46fbd034687a6c2a3ddfd61896b8e7521402369383d6a52a591a5baea0f9b1710f84d82f5d4059b4855f2eb753f87a80734222d2103025a7278d618f06bd1ec5694611ac728dfe6539bf2968b14a07934a88094a6e1033b16ea705"));
BigInteger tdAt449071 = BigInteger.valueOf(19_568_766);
byte[] trieDataAt449071 = Hex.decode(hexEncodedStateData("masteryStateAt449071.txt"));
// block to import
Block block449072 = BlockUtil.newBlockFromRlp(Hex.decode("f90c93f90790018306da30a032fd7b986f0c9b80e3afa2b967cb16d222498b7f2b258678432f91ea651a0ceaa0a0450c4333e72ed26552d7462c0b3669924eec816a219b3960d5b3f0b33f7444a0ff386e330b77af0f6eb1fd547fbb12601c6ca5080135f9de7a86542ec1d8e5d8a0927dcd9b9c968a3ca9ca904af9dceb532a44ad5ce19eee3dbac9df4f81bbf7a6a07c163a45806f5845a708d970c348bde210d053019334e9bac6d16071b19bb88ab90100000400000000004000402000000000000000000000008001000000000000000000000000021002000100000010000004000010000000000000005000000400000010000008000004000200010000000000000000000000000000000002200000000a0000000000000000000000000000220000100000000001000000000000008000000000000000000000004000000000004000000000000000000000000000000000000000000000000000000080000000000000000000000000800008000000020200000000080000000000000000010000000000000000000000000000400001000000000000000000000000000000000000000000000000000000000000900000000000000000000000000000004da041494f4e000000000000000000000000000000000000000000000000000000008301b0f083e4de8f845b9bda1ea008a70b5b57a19cd00bcecf72b6e65d68c84ca1c1a76de434a1216ddb3ebeaea8b905800036c1be5c9211f60addb80f831f6221e1488458a3474814b532a6d9c7f9f26a9d59284b728efc37907e217c34c4d2fa04635fe5b02e4f4c5bbecf27ca7ad2bfe73e4038171ef7b4feb07575bb575d8f482f3bcddff5aa7100e1edb5d6ceb9db7ed924279efe21c524636a71326612abb49e0e81a44a11e2d62a085caa5f08beecb779f80636878af7f27ab8f184ab14cefabde9c3f4e656083a0dba03fab051f7bbb8dd7575841a98646b533f3cd718067d3687eb0941ebac6d900766208ca3147627aed6081436055b15e51b42f3b34e1651575f2c32d64bd513a21bbfd0f24e7260617319985fddfe9178d6d7417bf88520ccfe03556692fffed155350a9ff7f96731966f3656090cc35bc1945f10b10f7132c3a64410e4bd77310e4e26d02a2e73f4d86c97f6b54ea28abdace8aabbafcd672d4e43b72413768bf3920f66b64e86a52909cde717c43a6b26dcb01cef4ef8cb86648442731bdc7a3175807303eb1c6dedd49ff7b977135dbaa7db0f266063f0c99158fe874ee926d6e47934df5ff7fb5ddd5677cc3b4e7b1bc274afb588b8a7e360282d78477e57b5fda4e9d729664535e1151cb60e3976ee987b97da102a1644ae37cb1da96719573287dbb657482f3d2a592f7327a6103b9a3691765d39373e5b631b738fa877cf6db9d2eae7505d28b219c268a7e779204d4c64ab4abe658a95c13c1ead33821dc7ed742faba0e5384435b69a4eb8439ba830820844b0406bf481386763f633e9977c88890fd6a6e6c43a4dc13d83581c473ca3f1635ba76f3a87003223a8432761ecef9a270a48b29ab02f6a26ea2389b22b3b91b46fb827ad323979b867c91595da935dd34d479ff7d6240c4dcb8866820b9ed20a132c0d0eb4026ba325ffd1a5311b66361e2d0bcdf7820a7e77fee3e2783c9375f60c148bcd2029e36b9cf754ab272089a11994ca8f9e2b7a57d70b1487877f5ce7a0bb6e19e680745796d07b44d301ad8ee931b777aaef84d30f11ac8e694512c8e5421c0edd7042f2c222d3e083b45cf0c67bcf86d53aeb03dc0571fb526404085832d1e80d3ebdd79259708f66971046fc93ad7dba47983c9a5759717b4ab9db47683419ee0466a48a0724847cab606174d26b0bfbf9767dee3d081142ee174a4b4a2336bb1e621d01ca3cb730d666e9bd0d30ca104280ffe6f14c2521c540f90bea491f761b7f21b3ca17cae8d1a1ab55bc57e812658396e313f57dd0021f5577f1b1add0337bd912087ca381313277e21ed61b7aa7f479d46e2859411b3c12f3ef3637bdfdf817b806838b772a75301bd688870ed337add47754f4b7fd94826b96ef7a1ace1cb28d52a3d76ba6708d17113e3e8508771714a203c36a3a03282b9fbb58dba6660f2c3f0a1b767392c9557d56a469756777720b3ee8c7127ee60b26cf2642ac743905beaf8740ff8d470b549740e135233ea14296545420ebb2994f500ba69ef09cba87b76d5f0304f7924e9287afb849c93b8026f715a6a29d33a6f4087d3be8d337a0f9e9a3a76b6b96a003e6e2785ccfa210faff3514f3b880223d2a15f1d5aaccd5fd401b14f421f0fff90e64fd447c40ac6d446295b92b1995effe0f04913a8575d2d325ba0119212588890a599be575cdef1343174e77673b8de1efa41ce170d4e603780216c3ce155b32ac9d89fb76686036400b0b410aad91d53fa5a81d4edc930402565b54113a6024599550e8a5bae2d20d092de04cfb55bcd2f96e48236ee378466659765bb8973801d386aa3993ccf3d2b943456655a8065f9c3ceb26245c7148abb25d27d4622529365d345d986852ec53b439e527f372ec525f3a6dab423c0bd66c0b0cac3d9b42130bed789d425539179a7b69f6de5d4ccb4596fe3ec548de67f9a3e62cfb28416859744d8172a78d1c24458f180b5321d66a29193096d222011ebb0e2820837a8b4b1aaa96fc2c43bf682472f251d50dee7c6a66baf327caf904fdf904558301f35ca0000000000000000000000000000000000000000000000000000000000000020000b903b446d1cc290197c8e17d82685dd8dac9c24c68e9af64807401da2007c6c38927014c8a3a9e00000000000000000000000000000080000000000000000000000000000000f000000000000000000000000000000160000000000000000000000000000001a0000000000000000000000000000002500000000000000000000000000000030000000000000000000000000000000003032679dab9d0e389b7cb7d16e28b6515f77b22c7ebeb4488dd5312234d751247603340469128c7036e84ab7674d53e9ea1efa8ea0059c2d010074fcf55ee4917e1a9838ac7a95b9fdaf4f7585acea9c300aeff3a19e24f98e11954cf8f1dc81100000000000000000000000000000003a0af349c2f785658bfaf793422a2932f1ad30c93a3c500a150eb9a71f95f1820a068ed417e161c5bee29ab9ba681b3fad8e2c6db2a54221ee824a46c2b979565a0380bae9fc99cd493c45c43de7ae4bc44a6022b5b27bc952912e13927a85eb2000000000000000000000000000000030000000000000000000008aae043c4000000000000000000000005e4be1920000000000000000000000003a352944000000000000000000000000000000000055ef28c555c278b49afee3171e5b684365240aeff1a026e3295ea29b505e9a0ffffd54a38223fb0505d3a03b8c5bdc91300302578edf77d2d922cf447d7021d963a77870771305f0e63b94ae7a355f5bde859a2eb49133062ec465552036599451062eb71a6fa290ae09813ba4c1639d2967ac706bba3abd229b910b314be0f97c1c1f53160283d16cae44cc092b4ad9c7ca2b8501af421e584e665852137ce9e000000000000000000000000000000052f455906d1e996acfbbe4d500c7e5d7df93a5b1e888ef441a71c3cda68a53c695f12da98ee20b7b674ec6bc1552b115d73717f0e6ce8974f6b1cdc092d6183ccadb4bcc7b40ac675aad201795ccbee47bcec1c207d3fb4eb8d61a84d77e5e7f02597cd9166bafad754a3885984921675ad544673c2d2bcf723f302b7b7093d7a5f53e86b76eb8c1621f8f2353c436d9327f1f06d6d5fdbe9c72180614122bfa9000000000000000000000000000000058c58b162c6d3c65b8090e6624288ff72fa62ebf56b88b06135d25179a081b004ae33a2912d03f37513e2c7369cfc941528b627ca0d5e33a519a9d895aa3195012f23eda2ca24027101783cf692bb22641ede60b906e36d852e53d9a16e045101dbabe92669283f07422641f2c218281019fb930b9529dc4cb75cd0f86963600f18b74f35393467f9cc3761f0127510564585886549cf9b1c623edabb073fba07870575d6dcb71b40830f42408800000002540be40001b86019ab2f3355c2f74376718c3f6c96a779de2144c4592a5cab23c82b739dc44fe0d23a065ca9dedbafdaf43a7d8d45c9dd1d368321fd20f59778b8c2239f944b737ca3adaf0ef2ef08615e943075ce16bbd3198ace62f612d62d5fed14f7087102f8a38182a0a0b88269779d225510ca880ed742e445db0c70efb1ee3159b6d56479ae3501f9872f7ff1b4a5a00080870575d6dcddfc6082d4318800000002540be40001b860b7dfe3a9fd46fbd034687a6c2a3ddfd61896b8e7521402369383d6a52a591a5b76bbb8f6986d159127e253a0e736cea6ed783806d076f167650e43c624a381e9f28f60808834819a35fe558e26ece8dba682d633c4536d693bcc3465eb3a1a07"));
BigInteger expectedTdAt449072 = BigInteger.valueOf(19_568_843);
// setup blockchain with state before imported block
StandaloneBlockchain blockchain = new Builder().withState(block449070, tdAt449070, block449071, tdAt449071, trieDataAt449071).withDetails(AddressUtils.wrapAddress("0000000000000000000000000000000000000000000000000000000000000200"), Hex.decode("f845a0000000000000000000000000000000000000000000000000000000000000020001a096d582a5cb7d7f00340928741edf104ae61ebc9a0fdb2ed4cd7c0f73998a7a7180c0")).withStorage(AddressUtils.wrapAddress("0000000000000000000000000000000000000000000000000000000000000200"), Hex.decode(hexEncodedStateData("masteryStorageAt449071.txt"))).withAvmEnabled().build().bc;
// import block
Pair<ImportResult, AionBlockSummary> results = blockchain.tryToConnectAndFetchSummary(block449072);
assertThat(results.getLeft()).isEqualTo(ImportResult.IMPORTED_BEST);
// collect the consensus information from the block & receipt.
AionBlockSummary blockSummary = results.getRight();
// check the 1st receipt
AionTxReceipt receipt = blockSummary.getSummaries().get(0).getReceipt();
assertThat(receipt.isSuccessful()).isTrue();
assertThat(receipt.getEnergyUsed()).isEqualTo(89_832);
assertThat(receipt.getPostTxState()).isEqualTo(Hex.decode("4c1570062caf5052038495e2e0b47218b4899dc39041c130b188a34353040d41"));
// check the 2nd receipt
receipt = blockSummary.getSummaries().get(1).getReceipt();
assertThat(receipt.isSuccessful()).isTrue();
assertThat(receipt.getEnergyUsed()).isEqualTo(21_000);
assertThat(receipt.getPostTxState()).isEqualTo(Hex.decode("92e42377b4d3c48a9160ca61116a2c20b922d7d44e08f93e6e63f324a8b53795"));
byte[] stateRoot = blockSummary.getBlock().getStateRoot();
byte[] blockReceiptsRoot = blockSummary.getBlock().getReceiptsRoot();
byte[] receiptTrieEncoded = receipt.getReceiptTrieEncoded();
// verify the consensus information.
String expectedRoot = "ff386e330b77af0f6eb1fd547fbb12601c6ca5080135f9de7a86542ec1d8e5d8";
String expectedReceiptsRoot = "7c163a45806f5845a708d970c348bde210d053019334e9bac6d16071b19bb88a";
String expectedReceiptsTrie = "F90125A092E42377B4D3C48A9160CA61116A2C20B922D7D44E08F93E6E63F324A8B53795B9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000C0";
assertThat(stateRoot).isEqualTo(Hex.decode(expectedRoot));
assertThat(blockReceiptsRoot).isEqualTo(Hex.decode(expectedReceiptsRoot));
assertThat(receiptTrieEncoded).isEqualTo(Hex.decode(expectedReceiptsTrie));
// checking repository state and total difficulty
assertThat(blockchain.getRepository().getRoot()).isEqualTo(Hex.decode(expectedRoot));
assertThat(blockchain.getTotalDifficulty()).isEqualTo(expectedTdAt449072);
}
use of org.aion.zero.impl.blockchain.StandaloneBlockchain.Builder in project aion by aionnetwork.
the class MasteryConsensusTest method testImportBlock250718.
/**
* Tests importing block <a href="https://mastery.aion.network/#/block/250718">250718</a>.
*/
@Test
public void testImportBlock250718() {
TransactionTypeRule.disallowAVMContractTransaction();
// data extracted from the mastery network
Block block250716 = BlockUtil.newBlockFromRlp(Hex.decode("f90791f9078d018303d35ca05f390334f14d39fba904a6b9ae142ecaffedc1e0ff2e5c2b9d5058c71a80bcc2a0a08fc457b39b03c30dc71bdb89a4d0409dd4fa42f6539a5c3ee4054af9b71f23a0ead0800286cb585dacc0dc399109a155e333ff1cbdaaa32327e726cb6b3a70f3a045b0cfc220ceec5b7c1c62c4d4193d38e4eba48e8815729ce75f9c0ab0e4c1c0a045b0cfc220ceec5b7c1c62c4d4193d38e4eba48e8815729ce75f9c0ab0e4c1c0b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009000000000000000000000000000000012a041494f4e000000000000000000000000000000000000000000000000000000008083e4d4f0845b7c8ba2a067f2089589637a28fbdf599a8dd159c083e82cc32fd945065770c0564d37dbd3b90580000c9fea2f4037a1ded6673a5513fe5985bf7bd93b9f0b74aa0b73e964c3bcd8a63a8e9d93245646bf638b4c00731c1912bb37c3bca1072e064983d1a56ef6af01c2201b7d00db24c3edd5fe22272da3be8f24bf83a4f2fd008591617f6c6f4f3208d10f2ee89096393fada749f60116007267baba7beb11ea2796864cf9e77199b969d0221471fca1e59b926bfa613bc915798319def9eaa9f835bc6bee6fa9d7cfb06f265667bb53a15652869e7a54064ca95523e842322d16b529e5856e56e6f535a7af1e1e5fb2887ac3a2c676f4332298f2a70b32c21e27e1c324bdcf1a85f6ed36700e3736be3a2ba7d7fd973e43c83807399f8a87e8597ef0ba470276e8cb589ef53538c50b5275ec20fda1fd7fe8a74cb88ea419ab55b0b30f171ff7c98d71887a222998f331796a9b4ca58d2b7d767a20fd3fb5c25314807aae8c2d9d65b5fe4342b7b7433340df8f77f026b4eb368a06b35ff3a13e9f2747ffb21b04684f7540f2d0f7e01eaa10901a8c65373205e729443e2e7f4bce069620f1739d6b5823b969cc42baba9cbb0e1b394e3a9abceaadd1de2ec5953f33e564d61d7c08231d3929febab9cbf0b99c5ab06a7375a8b50ffeeaf1071ffda805c9705bff635009ccb0f4df7dcb2077afff19f16b2623167aceb1df8727f7ca836f531092dc1ba1170ef314d8b409a6b84a242427e5ea77284ca6fd29e752e8abec2f564f12667203680c2bc6fc997da3edb71115157c5ec5e7e62bebe5269f498a99d6be91c9fa5d183afca221e7444a4cd3341f62daa9a53c6dd4fdb800e854a1e20f73e7a3fb6c8c36624cb70752bae52d7c93556f10527b06a70142dde07475fd9ee46b9b6a4db5b8d5171cf0aa0ad531e3e861e6429e831de5197e25facdfa3e22b66d5064756afb82a4853e766dfcba9d2ff7f114288d1ab06b5917276b2d1e2fb0baec66dacb93ed184d3cc132f09d6889c0291b4742c3e30f26b9c9c139e209001ecde8e2da6fb27081189cebb7eb2b4a93a8fe7f3e0d4589b07a151e3e1acfe1514a8e16ff9892c36ece930f8bec49c205dadd752d435772cbcd58fc6410f792703060ca4bd6cc9902fc47fe4c1f2f641f4649f05ef9d50788525653a1e96cbd9f44110472eca0a36eb5334f73232666928158828e29b3ca45808b91af0c1e47fa94e91191daea283352b295c2a436614a0cc463a1bb59f95d428ec9b25cf785e771d9345a8ca3afe47c03e7f3938407a698a2456098fc434d1e9f536ec73cec697472054f1ee662a0f4c2666fdb82ca8b43baa877fe4919793f300a0ff7086832522577bd152a440318ef436dec6edad939b847bde708bef7716f675eb6d5a2aa87d4b429ef170c0a4c9a346e62383fe8381f3292d2a5a37a4df5bddc22aa9a727b634126286d09408c8e42562ced99bd227720f991d04dbc7bbb3842ef63f305acda56a2e0ea251a53836f58f8f7626a63d2f1646b560a78abfeebbd6c8c01a421f6b572c05fe8cdfd47b88bbca08d71fefeee5d3f5b668ba16b30dcbfbc507e0b72fa800f4efabd593913095fa3ed963e007993595ad6a37d4d775ed3b51913190843f5a7b977273e87f93f85d3feaa5d1a5ebff24803f7d464b464cda36955fe0823eb29dc35de5973f3af294bc57821287a85fbefc83ccd4e290dc8d8e6a8494e04cafd17f47994cb3ca4e867687f235a8905caaf859d38139dd733473f31e636455eac23a26de87c0a75bfd901b931e278c25dd0ea28b22fd1112dbcb81aeeb19fad16240fb7cef2642d93e40228e179a511bc225cf3709e047be73862bb2feaf4288423ebc264ac8598fcdb1db8048e389b92c9a131ff88d71f32371b35b43fe1d32eb612da7d6816598c5f348ca528a64962018429b27deec81c53d0f40b14871cd7f3593bb1a685a048e7213ca1311b3c5a5751e4ff7d7fb8481b73d2e60d78f96370028237eb72e22896209a231f276226aaea03c6b39e76ccffc0"));
BigInteger tdAt250716 = BigInteger.valueOf(4_114_127);
Block block250717 = BlockUtil.newBlockFromRlp(Hex.decode("f90791f9078d018303d35da0fb75d364db63c1d05cf4ab6e7569aa754c84635c4247f9691d1ebc4031f6b2f2a0a08fc457b39b03c30dc71bdb89a4d0409dd4fa42f6539a5c3ee4054af9b71f23a0aa7ed7f11d46e4aa493c6a00659e873542fce66f740068d73dc12982e219c92ca045b0cfc220ceec5b7c1c62c4d4193d38e4eba48e8815729ce75f9c0ab0e4c1c0a045b0cfc220ceec5b7c1c62c4d4193d38e4eba48e8815729ce75f9c0ab0e4c1c0b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009000000000000000000000000000000012a041494f4e000000000000000000000000000000000000000000000000000000008083e50e25845b7c8bada0a6eabd5bccf63ac51a5e68cc276ee51efc57222680cbdc8ea18f025bf3314512b905800015d2c77440563a60e4dc52f04f5a204a07bbac88b207bd47268b45e9a9ef3f7a2237433478f9bb5fafd9c707b98e9b6615251a5c71257f91c64dea0cd385b6ac8710b10a5be132fd97605a6a22c1a28ff322658a0cbbd5067c80d74f24919f9babd057f097752216130ba9463213210da64d7aec7ff1a03d54b8725337082532e3aab8131744e9b9a30bc4118550322cfa6f21d9e73aae198735202209d7938fdea5fea9594a23d6ec163199da57bb00c447bd5477f300fc44e639e536d7fa645442951d2906bcff72b1d3b23ae9af9b07475525bb18e288b956851abd7bf1fbfd30f1fce0ee567477f633f8c2a4b601e52137d2915f6510caafc61047cef5c9daba9ed971a72d0674b6191eb15e8279cc51175f3890447900193652dd08a1e21923e521171d143014f9279b932a3bc169778429b9e51199e49c259be1483319e35b57a5bea8ae77103e01f1e8170aea3f779c7a64b7d6c9216c2409b6f09601e807a0c1a11793e13c1b534229945c89abdf35f7062f55b20eecbd39c9bd3f023662a9d0c42a6dc733439d08d99e97949db4863f27380910ad515e4aa7c52c851715dc947f43c76455fad7ef4b62669b61777ecea5a57a0d11fab681e29f0f3c5b6f29f60dfb2e4ef5937ca0ef298596b80e6556471a75d02a5a2f554ab5619f194dda19b8a6ea773b7b1bb897a42836616aab65eb2eb7ddd14047e5c84b659fc966ba4e5f5effcea71773c1ffaa3a0c82b9b7a1182a26a520e6289be3b284c7d1e6b3c6d117ec1d831cc25c9d976b1c59db86aa5ac6ab30ac7fc4100747ea6b96c49db134253746ea505ee51afca8bc3a170572c540764b727073fa6acf07c7aa7c10a4bb11b30e9e9349fe08af6bb8b62f4c052acc91aa9e4672365d48da5677da1912fda7fbd54a206f7cd8bec9e43cfb2026f307898bea7f33be9f9b34fb56d3576715f53a28bb28ab1963b3f5150cdd3ee28b601ac7b15ac153b2d8f800f528a717a34ced25e926252812f9057c5053b3029d11096531c4759a36b63ad520f357be930c63e471c9aa3babdd687e589512e7434d5cd032fe4f9dd4717b8a75526687755d8747827afeea5e014a988b76e777a89b3f109a9a41dfa631373d170a2c13fac211a98c40ee593413a066562c4e221af8a594325467c3818a07c7ade47d11c75cbec18e87d4bfca8a3ea4b161ea43f06dfd51131ddda4baa4f76be8dfda917956b38b9dedbbcb7fda1002c67a31fa78243829b0ae2f973ea461f621c4a14d2c34ac178981a68c89ddabe27f6ec798fdda13827fdefa0943558b632d26ce7928601b5aee7c1ac47ac7f3492e2cfda7d5711b1051f9fd3d36317123f676eb82a660d3056ae8a7352914a02d71178450d65c89bb89a236c1b21005a35970c39388da1af81375e57c02841235a7e21608e2a4942f129c7d34c82b680a3625ec968eebf7c7c50f26aaf2d5e63838ad74de333a34d04d3ea3de3be413012e38d4b056e8a6a62dac14a7276b4aa14d4be51f5c260746972a44ab0efe77a82f416ee62a27e8573d227d0b1cf439477be78bb3d0e74752870a19a5e1f9b31a8d471e15449a6929d2e4d96f6b7205cc8e67d6bc7597d0107b294599dc03a6fb3bc411f53150be68612ff2d92a3e34beab259aa6f8b517a77d976651f7486ee47ae85418ea721d05ccf363b797c47836a3d3363affef3cf0da2c4a331aa1e961b6ef972d8015ffaa76e9384bff24d301d02d23dfb5170ae569fd5d3e5765d89b0197fd9ee523cd3d13795abc74748c2a3406edc1eea68ec362bd6f13392be48a0a5b3769c60c292c0e6e94e7f2bf762c8f1f5fa2f72c648b0463104d3e4d1d349f84b65b7706270237681f327a7f97ac35f702ce423a1f7075a977bff207f1dfb22044ee7b25e5714b5b63cd086b08c339bc2302ad444e4790dfba60734a1daf31d378552ea215e5851d5e67b99ff471ac9570e430e877b42c3aef0d7d0391c0"));
BigInteger tdAt250717 = BigInteger.valueOf(4_114_145);
byte[] trieDataAt250717 = Hex.decode(hexEncodedStateData("masteryStateAt250717.txt"));
// block to import
Block block250718 = BlockUtil.newBlockFromRlp(Hex.decode("f90857f9078f018303d35ea0491d1f9c3efa6410faa9b259579b40853c9ef77de5acbad0073608ba09b5b2b0a0a08fc457b39b03c30dc71bdb89a4d0409dd4fa42f6539a5c3ee4054af9b71f23a037d47d9fa827ef34c2dd844e2cd72a2fe4a06d23bbdb2d97226cb4fb7c8432dba0932a9ff2b9c4d2279c12534a0169ed4c992fc5e6e87d6236cf92148bb790c115a0224e0b2f1c4e49fb7c57c8d34dbbb395ea350c1c03e8c1e1dc518cabfe26366bb90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009000000000000000000000000000000012a041494f4e0000000000000000000000000000000000000000000000000000000082ad1083e4d4e2845b7c8bb5a010e644780ded32431f4c8711558e0ce846c47bbebaf6100b2261a4684bdca726b90580001a3eb752b130f7a1e2ef1ea3d1fb1885f0fad96fa81f9b32bf4b13da9ef812c724dc6bb9f6a37f2794888e0cf6cb118bf7d1255fea0237360df13ef41f52a59fc21c67225e071584ad6de2282477479376e8fde27528040164fae1fdaac343b2a918292b666a140a84a7b97d5b22b79ab7eae9adc970a7be336982abbb7c2591befe06116ebb7f2beb0fa63668794a19f71570d813f5b77ecb15a0e59b1d63940062dd19b169f6c62ebecb63fc62ec06822e785248feda6510bc6ed9b6f9370b579c392124252c64aa9b127dea2ef1824968d2dc79e9376db4cb0e202d388f70880173e0a6b1392393d502fa3330af6a97206decb47274334a3f04c456c2597d029761ce3e34fb1f7b074ad1b3723f5d65d73ea0578338f5ae6d5bbae140c00907aa1dd1b9fe717e583bfa884c8e9d27faf2fc23a82cb687ac7029f2c5ad2c0b14bd2924633a97b083260009c2d0f8beefe58a285ffb2798017ce0b03e63eb018b76a3292cb09fb34ee82ede9779667e48c5badc085853d70a6097afc565cfc794802b316b1af33b71aeff232f758a7ff338f42499fd35d57ecdc56a9a496ac2aa270912b30543c15ad223a92e699a69a8a33cc0fbbd3c04312ddcf2da45b0f811af2b1bd541d67c7433b752b9301c5a0ae294271ad6d3734fc712fb5e551ae6ffbce028bde277ed972b23ad591f502b9fb1aab58de861efff37dd7796e2e57fab9b3fdb37e2d6e7fc798281f1866a01e9fa2ab0d397713adbac98d5ced80eec21a47dfce64abce6831de88f92e2f0055e220fe10f862362bbdb8108f6d2ee1a65b9005f79b00a74be3efae2cc40e6d7a3782c9ab604e9c6726f1f518e6e16d2a85ae30fedaf2b02993fe80428a2062e5d080c39aa53a2257dbfebe13d09e3bdc503ce9261fd3ceb150d3d9e5b077d9cbed4b0063d403fbd63ea5a77babd38167a1d71580be7682ace2100e2ad642cbe5fb92aa45913abc3101609f779cd1902103ac7650a8032f63ae34b7707f6f03b8135f760d01524f2fddc93ee2cb4b9ad77d312e570877f87fce6c4024205854784831f2ab54a5f6971ffdd77b92069fb8e1b29056a5502b63d9600d71c890f290ec5befe28120a0e54c0b6c39639bd2b57da2f387fd0c76dad6efb27b516b8de081c687c7737515150dd2185cb95916e973e261a6851892aa3e161df4a902e8e692defd4bcff9b1fcd1be0554c7f6833087349122301ee3fe4e7d7a469eebc03315d056207a150fffa3d855cd34a7c7a0667ecd62206d8f34b51d1f8d0fc9ef953428bdc0657a653f6125a2e015984646922ccbc31a94d0fdab59518f47bb0c8414364972cc4a958e9a810036536b1b723f9f8d0fccbbd053aa4196933595399be5a4038b6eb8385ef15ad14f939440f6be2c663baf3aafc934ade92794d5cb4794ad50e289e23dc7b83953c52c14b2cb6081c36549fe2596f1b61dfed42b3fbde725b5743ddde10573aa1f038189403cb8d19d985a4427b71e32815fb2fed534ed92b5de9049eaba8ddf96e77a788f146891d8de76d1c24fae0421d97e1e7f931e50d1dc31f2fa3e21f87b35304a1b244214b82c5d285c739e68f2850631683b3b62ed72e9236058f4cdcc9b3166b63df611e290a3e29d7229b9ee7f318eeda757f854a08f789ac5513ae52447723612a41571842cd686f64b7593719281d88f14d93c39609242a661b146fcb67d3b0845151552e0be5ba51a35c5c9a5b4906c22eb254a13e995d9b151bb564dd92a42b5d58c7d919487b8dfda33c532458f194c74319653ac3e1abc461106645a81106bf22686e51e2d9b397bfef3d953dad0039062a4e5a950da878d64b625ae32c0e7f79c6ffdf0107dd4fde2bf46ee63e5663138870da60d2f743317ab21d366f4a39223c692399616764e73aa27cd2de7f97df0814cffc041a9e8879036f56e1e23841fe6a797df8552b467d086f98815f2555db61265751f2db1e5af327e2f8c3f8c101a0000000000000000000000000000000000000000000000000000000000000020000a4a6f9dae1a048613dd3cb89685cb3f9cfa410ecf606c7ec7320e721edacd194050828c6b088000573f9295f73ba830186a08800000002540be40001b8608e0d3601d00f6503a32bb6f06cebae21a1aecfae6839c9e4ddc92a6b1e639a241d37cd1cb25bf50ce468b6aabc54282e405ba79449bf04b3ffcc9b70b584287796c1b30baebd63e79837eea201f3017abcaf572ead90933b1ffc73fb35402909"));
BigInteger expectedTdAt250718 = BigInteger.valueOf(4_114_163);
// setup blockchain with state before imported block
StandaloneBlockchain blockchain = new Builder().withState(block250716, tdAt250716, block250717, tdAt250717, trieDataAt250717).withDetails(AddressUtils.wrapAddress("0000000000000000000000000000000000000000000000000000000000000200"), Hex.decode("f845a0000000000000000000000000000000000000000000000000000000000000020001a045b0cfc220ceec5b7c1c62c4d4193d38e4eba48e8815729ce75f9c0ab0e4c1c080c0")).withAvmEnabled().build().bc;
// import block
Pair<ImportResult, AionBlockSummary> results = blockchain.tryToConnectAndFetchSummary(block250718);
assertThat(results.getLeft()).isEqualTo(ImportResult.IMPORTED_BEST);
// collect the consensus information from the block & receipt.
AionBlockSummary blockSummary = results.getRight();
// check the receipt
AionTxReceipt receipt = blockSummary.getSummaries().get(0).getReceipt();
assertThat(receipt.isSuccessful()).isTrue();
System.out.println(receipt);
assertThat(receipt.getEnergyUsed()).isEqualTo(44_304);
assertThat(receipt.getPostTxState()).isEqualTo(Hex.decode("b365067f1b0151b0064f5d31caa78c0d8590b11a56f7ece859b5b766e6612c92"));
byte[] stateRoot = blockSummary.getBlock().getStateRoot();
byte[] blockReceiptsRoot = blockSummary.getBlock().getReceiptsRoot();
byte[] receiptTrieEncoded = receipt.getReceiptTrieEncoded();
// verify the consensus information.
String expectedRoot = "37d47d9fa827ef34c2dd844e2cd72a2fe4a06d23bbdb2d97226cb4fb7c8432db";
String expectedReceiptsRoot = "224e0b2f1c4e49fb7c57c8d34dbbb395ea350c1c03e8c1e1dc518cabfe26366b";
String expectedReceiptsTrie = "F90125A0B365067F1B0151B0064F5D31CAA78C0D8590B11A56F7ECE859B5B766E6612C92B9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000C0";
assertThat(stateRoot).isEqualTo(Hex.decode(expectedRoot));
assertThat(blockReceiptsRoot).isEqualTo(Hex.decode(expectedReceiptsRoot));
assertThat(receiptTrieEncoded).isEqualTo(Hex.decode(expectedReceiptsTrie));
// checking repository state and total difficulty
assertThat(blockchain.getRepository().getRoot()).isEqualTo(Hex.decode(expectedRoot));
assertThat(blockchain.getTotalDifficulty()).isEqualTo(expectedTdAt250718);
}
use of org.aion.zero.impl.blockchain.StandaloneBlockchain.Builder in project aion by aionnetwork.
the class MasteryConsensusTest method testImportBlock255652.
/**
* Block <a href="https://mastery.aion.network/#/block/255652">255652</a> contains the first
* bridge contract transaction on mastery:
*/
@Test
public void testImportBlock255652() {
TransactionTypeRule.disallowAVMContractTransaction();
// data extracted from the mastery network
Block block255650 = BlockUtil.newBlockFromRlp(Hex.decode("f90791f9078d018303e6a2a079091b407ce38a1efc9e047c0e2cf4ab907965eb9a24060afff223d9479c3290a0a08fc457b39b03c30dc71bdb89a4d0409dd4fa42f6539a5c3ee4054af9b71f23a03961230ff5f8381b13060da87081db859b9eba1c758331403c8bab7ca3a767c1a045b0cfc220ceec5b7c1c62c4d4193d38e4eba48e8815729ce75f9c0ab0e4c1c0a045b0cfc220ceec5b7c1c62c4d4193d38e4eba48e8815729ce75f9c0ab0e4c1c0b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009000000000000000000000000000000012a041494f4e000000000000000000000000000000000000000000000000000000008083e4bdd1845b7d6a63a0c1c2b719718c49ce0637d4a3ae95c7d39d9b09774a0a1abe777cc0783b828bceb9058000039cbe2060a8132fb30329dd3e6432931a2c0fd474178725071ac948bffeb2f02a180660e884162b6b69c106ac315f688a9ebf38e02b151600952bfb19affd17060cb50e94d7cf75917e15766c0cb2013516e1997065110c65972bd95825f6e15ad71e5139402075d1cf2490bc1b1c44dccb3595479d22829335d702549a89c132a68b1930b6fe6a285cd5b3480825e90f721ae6bea5fb0c011c392f40870c9cf1b32080230849c532e4985f9cd38306730e1b5125fb5c5ba1d7356c5d7384463b22223cfe09656d576617fb7babaefe199ebcf768fc32bc3b75852635e92ebc7444b0e355e62b8b1a3fde540f85204cd03290c0e54449556667f5dd7bfd6301635b089733e7f2085e77fa483638effec7224eea9dea5b65a7ed97e2d1495c4541cd67b75c328c7157ed0bfc014982636efaaf0e25ad7c5b2a0516b58cae4d5f066ec19bcb9b78909f7914925ff11ad9a0f3d6c69b35d7382e4bdd75b7d1a301d0402b94c7140eed629c06934615876750913a842120a760baa91372a74e209d53caeafcc037fb183c57fb03c9574d3cac4d5d3d89372e61c15f22992a2bef6e53138851428e37159bfd1ce42ec416056f34a178fffc6c06d03cc0eef495396eb675113ee09428440fc9391b27358dd6eb1b764b9bee61bb891dc6e159dc5fa7fb39d554527b31a7cfcdf63f39cb63d7be1ae3568e6e3e6dc25d3d8df890ee08f43f1167894edb7198fe32ce3d3928067e6a91f0b3bc3efa29921d9e8f8a68d374ae1d14131dff233b35f463f6b0002221bca277b7ebdf906fb24d0b6c656650c3441357ce933bd5a9969c241b77349f412d5ab6654c5ba2343051b63af9dd4c0a43d5fcdef6920938be2324e470dd560a3048d09142e5957c816bec8427dbefee873379857a95a66b2e83748b378ac632e6fc0cbc23c034f0e9528550eb49562720901a184c7077031af081d6af16f4e822fe3123e698d5ac6553ceb4a5e0005a153514b389f2f99d0e539bbdac2fc85fc76da7f900e5665790791705b9e7ea28be95e8721d23ec3c80310bc0a07a2931acd04d65f254bc2b24694a1d24340c8c491776f66f772236e24e115b7896b43fa9f137f4440f00acbc4c993495529d10b8073311993b14d44d9b92c827afa319be88deffe9ca0c34b46d4f82f5b8bb3cc62408427b98826545f76166e45c0ab19f48396332b89f8020436482619c372db4f92dcb2003f2b3fe888fba4e5100a4e3d5edb77137e35afa2c2dfa853b5807ed61c7f5147a69d65ab49d2974b960a7c32f5a50dea1527ea0142eb8c90cf90686a89f868765775e27b23746c2bdaf3945559e5b90a486fdf3f4315a2cd71bb45bb86d3c4c27053b9ebb90c7cbaa2c368f408c93298f8da7c7bc7bf80e84670bc63122d8d5576e19f5562f4b8b1386aed5e205a6b88e8fa78d133fe06a097b82a115c3e52894c90114fc3bec5082c08073aafe1fe292026832895c9b45c0025dfde549c26e9df729960d2bba312ee32a686ae87f12f979044f747d28e6aaa239a91793021b3df5759c0b0fc151efd0e34525e81cf439db4bd27f73ec3eb414f23604a566f4647c6f6567939e2e12a68c7afa3fb7e88202edfbf13f926e8f27bc5c1fd248c1175311a3e3a6ea34b58204ddd3efe41133be5b251f7521fb258f3ba3f10e42e6f787a2924ba1fccf13b8d9e893e701a23c325e0f1aeb836da9fe11755ed31bdba65629875e972d5014049f031c63234a0d4dd95a4357a7e07906ed819e352714eca474c3d2537f6013e4277c89aaf023fe6d7488f90a410ec226c8a9d32f91fc1be9d9186563622f317a3f195e29157c1ebad5fb14ed6aa7b2cdcd872d4d7eba88125f3253842acc18ad7723595909d83b35cfee78ddb747d4cd2c2236686e5dd7424c487e5d55dc4699f6be4d3c7cd9cd4bc740ba2651804e2243479f1c2e7eb8acff5a9bfb04c727013c5ec7d85c970650be0cd91978eafec0"));
BigInteger tdAt255650 = BigInteger.valueOf(4_199_115);
Block block255651 = BlockUtil.newBlockFromRlp(Hex.decode("f90791f9078d018303e6a3a0c68dba85e8edf42cc3cfc265a165ce589f84a59a5ab7adf4a7737c85d634e050a0a08fc457b39b03c30dc71bdb89a4d0409dd4fa42f6539a5c3ee4054af9b71f23a06bb3257ac1ecf01f6c70495851f4833eacb847659df8e2186d5d2331cc8d9622a045b0cfc220ceec5b7c1c62c4d4193d38e4eba48e8815729ce75f9c0ab0e4c1c0a045b0cfc220ceec5b7c1c62c4d4193d38e4eba48e8815729ce75f9c0ab0e4c1c0b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009000000000000000000000000000000012a041494f4e000000000000000000000000000000000000000000000000000000008083e4f700845b7d6a6da0d3348ebe66e1c2a3d5977daea6e638a8d5854f915a82136d910146b12bc237bcb90580000fe1148c4a970d2f3e8f3f879ebb60ad4253f6c2e431e361126344000e34b62a3947f693e565d90c302703010d94b8792b4ce87a17862d55e9c198c44b5ca91ca533081b96e4aad0d82d5b0b3994abbf7be7d21dfc3c4e0ec752acb191f171cdd1711665a1df7898c0622891220f7483632cb53725bda406105eb78dee11a42e9e8a8a15f8e7aa4a0570ac27e3b51fb40bf65606399033769a33d35f0217597230f7441693ee0358908c6b2cf5dd740087746d2abb72f3bad2d27f6ed3323118c872263e51104a7aa76642f79ebae3496f6e4dd97c89cb3071a3511d50a4e83d927ae72d94a93fa033ca983b85233042713a27f1743f4994c56cb15c77d6d75a3fdbbcfb2fe7a50fdaa33c2444931cd5a51430f333043c93cdedee209e516f3ac4b2b535313b3acf81933bb72e2d9e40fe0d34227090e6505897fdf08b1d33e755be3a5470b8ab00fb3015854e3118ee977e94266f690261a69a8751f155c20073960a18573fddf2cdce0e7c103a5d5dc8d9796ef90e6f8cc7666c7362fb46a81cba1d1e45357eb1e77cdc25ae7610d1795483f0b25d440ed2682178b16eb19d66345621f249c8d886a77b5434f98292d5a6ed18ac141b0420e908fc02109759d8a00659b30741313e03b7315940955d377e0538f9db46304cbe4dfcde366742783d03053dc8bf64055a1476483c0dd7ae296e2323f87c2ff11b6e8a6b20d64f47efebc6801e4a9083dc49657e66f501dc5a62effe95cc3b832d13e65b1a389790af7b32a23b1c4d7f0325b11973457a9fe3838e076a3492f65eb80798c32e1eba45c9aa761180254232a77af4663ecc0725a3acb026c494dbd878db330c1fe79a08fd34b17edb1097eec6d7b1c17a9012a844539d1e469f9aaf7f9e4d1327b2fc5a5234bb6a558a4e5a061a1abc950277e0421277ad5f90e4027930087b3bacd58a4f1459d69e02054268ea3295153d7a31b141b8ec8348017ba1053bb37500bbefe91ffcf9b1b77ade3d0875a5f2c84dd8fa55b2068f475a2f33d877545bc6414c2d68c64771ac7b0113068890a040c25b26d27d6541c01609a5093f97e725de0da3af5ccbe7cacae2d2b662508e0984866fe7754ec902e56a937256e461293b802d1760f548cc831b339d202a1b25553d252c1416850c32c8f1ae26438d78679435237493cfb61bafbf74d5e424d2334613e5b1da795dec43c037de1c148ecbf870e18ec62720ee28ff6f66509003be795b933e8b2f7cfa561e899ad5b0185be723b67421840efd86c4d89673e8b2438386b32158d273f8c9513e4d653bde073e5d224b045c425f3ccacb020379d975471fc62b805cff3bf5b25c5d5def86fc26f8fb72664f05bf2e571889ecbd374c1b34c8b696e4cc0a7c3e5cd35ae2f68e4357c579247fe4a18c2697edaa60fa72cc2b0893836f70552ed832db560902190043ad69d4780ca9226181c83324b3b9b5898130ded2af5535f9647680fd015ae9725e00becf3f61f30c99720c5c9640955ca835162717bca7362830df40bd1c1feefd7a48769faeb4b40c9346db5c93319975d1934190013d90f9773eb3c88f41f9af26a33a888a7fa6a24cd5472b6c8539be9a56730385b5f8893256b56aa2f536af7ad9b8d4a63ce1ee8008804728640ccaacf38f1553a501574a7b65ccf67286086179820060e5be2f0d09809c372144889dc27853dc2c97656b8ca791663c07a272b547b93859d505b8f49504175f02f6d52491a0658325e7b31a29532106abcc16443f4d892a052d82ef50b27df7a6e0537bef65701ca716ad7e5ca2a21d2fb892122fa1d2a1ebb6b695b1115325e80e6e56933c3a68205d3c1942bac659b1726c9e6a0a9cd55a026179a43aa54313a862c75762c94be85a2114d2fa3db8c4660f5e3d7189caf78f8beed2937f9a9817141a4add17b423af755021223995f2633680e6c8fc184ffc78d5a43345d969205e0fdaa420e9d93fba27adc0"));
BigInteger tdAt255651 = BigInteger.valueOf(4_199_133);
byte[] trieDataAt255651 = Hex.decode("f908b2f897a03561d92626d7acd37bc985c7176fc845ae1d876ad6bcd99756ba6fec30ca3573b874f872a020ababb7fc6699d3178df12ebdd141b095ec0076586b8c4d4fae7f5a563c8263b84ff84d01890180446bd24f656000a045b0cfc220ceec5b7c1c62c4d4193d38e4eba48e8815729ce75f9c0ab0e4c1c0a00e5751c026e543b2e8ab2eb06099daa1d1e5df47778f7787faab45cdf12fe3a8f898a0fd402a3f60772cb69eab2b98211715892642226a4f4470b4ca409282feaa6148b875f873a03f34ec94586099470869e74064bcfd4747cbf5864e72a5966f25e4a3d32b1bb8b850f84e808a152d02c7e14af6800000a045b0cfc220ceec5b7c1c62c4d4193d38e4eba48e8815729ce75f9c0ab0e4c1c0a00e5751c026e543b2e8ab2eb06099daa1d1e5df47778f7787faab45cdf12fe3a8f845a05386c67c941dbca06b7102bfa15a75ff84416e68319d8fd17c571a7dc71d12ffa3e216a0fc73fb16f40138d1a0e84d81aefeb897da1693fd943e26088ecc1ad6cc770560f8f6a06bb3257ac1ecf01f6c70495851f4833eacb847659df8e2186d5d2331cc8d9622b8d3f8d180a0fd402a3f60772cb69eab2b98211715892642226a4f4470b4ca409282feaa6148a05386c67c941dbca06b7102bfa15a75ff84416e68319d8fd17c571a7dc71d12ff8080808080a0beb637c787490ee23d2946583d43a8cd6c444d05e9f2a3c64ff1e38eca50b40f808080a074dc43c8dd9d4be02ffd8dff0ff7fc240136bc27ada45cf38e37ee069b52b4c3a0fac91580acb88359fbf41ccedad5addf8d5aaad9327f15da87b1e7ff60e4f31c80a08044eb2b9ffb917591b14cfc09f5d41ae6d9abdbfdf3a369a6c6480d5524d0a680f897a022bbf941b5b0ac42f58c8e5f44fec0d59663114448655e4b0ad45af8b713b44ab874f872a0200a76619d1898d7265ded662bdf5b10c9df8d2ab8b73d18872929b781fbecd7b84ff84d8089740186c333383422c9a045b0cfc220ceec5b7c1c62c4d4193d38e4eba48e8815729ce75f9c0ab0e4c1c0a00e5751c026e543b2e8ab2eb06099daa1d1e5df47778f7787faab45cdf12fe3a8f896a0fc73fb16f40138d1a0e84d81aefeb897da1693fd943e26088ecc1ad6cc770560b873f8718080a02ca1e2c8c83220e39798af4cb90818a5b5707d62bd29e241aad486a1d282fb7c8080a08241e5823bfeb4a2cea2723f61af7d791b3196d49cbdc4b560012d4597ebacc6a08f14e141468950801dd25cdef983a4cce8f5578fc897ef6816e881446c59147680808080808080808080f88da02ca1e2c8c83220e39798af4cb90818a5b5707d62bd29e241aad486a1d282fb7cb86af8689f3c9c384cf112b1e912494855d1116041a2bff4882321627af7d872dc77463cb846f8448080a04a435027d518cfc80088380b12468c5a53fbe0d669c5a471008558df81f1763ca00e5751c026e543b2e8ab2eb06099daa1d1e5df47778f7787faab45cdf12fe3a8f88ea01718b04fa8c28bd5159e183827b0ee227590fb3d28383bf0d4a167d5594416aab86bf869a0205ff8943e102428313e141d414bda168a65c16f3a7b75e9cf5ccd5702cf7a66b846f8448080a005fd02342b56544ead95ab1e477b0baaa70f75b109b23098a84b67bf52c25deba00e5751c026e543b2e8ab2eb06099daa1d1e5df47778f7787faab45cdf12fe3a8f896a08f14e141468950801dd25cdef983a4cce8f5578fc897ef6816e881446c591476b873f8719f361fcb81bb95f43debaae8999fd36f79786d6a7b9e6aa51297de65096571d7b84ff84d8089276fe409db2f37f37ba045b0cfc220ceec5b7c1c62c4d4193d38e4eba48e8815729ce75f9c0ab0e4c1c0a00e5751c026e543b2e8ab2eb06099daa1d1e5df47778f7787faab45cdf12fe3a8f89aa08440ae2e1c5820a19962771a4a265e29a08ae8433f213d836f109057b6722d1ab877f875a020955bfb84f3efa2043bed4bfa90ff3cd072b419b3f601c8dc930f6029e9c171b852f850048c010391b8b9a85d52a4cc6000a045b0cfc220ceec5b7c1c62c4d4193d38e4eba48e8815729ce75f9c0ab0e4c1c0a00e5751c026e543b2e8ab2eb06099daa1d1e5df47778f7787faab45cdf12fe3a8f897a08241e5823bfeb4a2cea2723f61af7d791b3196d49cbdc4b560012d4597ebacc6b874f8729f3f2af53c805b6b31dbb9ad5a5cb4a3f89961fffc76ae93e3575d2688260d71b850f84e808a3befd747b9966a597102a045b0cfc220ceec5b7c1c62c4d4193d38e4eba48e8815729ce75f9c0ab0e4c1c0a00e5751c026e543b2e8ab2eb06099daa1d1e5df47778f7787faab45cdf12fe3a8f876a0fac91580acb88359fbf41ccedad5addf8d5aaad9327f15da87b1e7ff60e4f31cb853f85180a03561d92626d7acd37bc985c7176fc845ae1d876ad6bcd99756ba6fec30ca35738080808080808080808080a08440ae2e1c5820a19962771a4a265e29a08ae8433f213d836f109057b6722d1a808080f897a08044eb2b9ffb917591b14cfc09f5d41ae6d9abdbfdf3a369a6c6480d5524d0a6b874f872a03baa19fd2249424c6876a14b4e1313aaaec2776dfa5b51c7169658ab3c03b8edb84ff84d0e8901e9fd58efa8625000a045b0cfc220ceec5b7c1c62c4d4193d38e4eba48e8815729ce75f9c0ab0e4c1c0a00e5751c026e543b2e8ab2eb06099daa1d1e5df47778f7787faab45cdf12fe3a8f898a074dc43c8dd9d4be02ffd8dff0ff7fc240136bc27ada45cf38e37ee069b52b4c3b875f873a03159efc25eac3a247b2e85333234f1a984e5a026618911c65ffb1debe7d6c099b850f84e028a152cf4e4d8a795e2a000a045b0cfc220ceec5b7c1c62c4d4193d38e4eba48e8815729ce75f9c0ab0e4c1c0a00e5751c026e543b2e8ab2eb06099daa1d1e5df47778f7787faab45cdf12fe3a8f876a0beb637c787490ee23d2946583d43a8cd6c444d05e9f2a3c64ff1e38eca50b40fb853f851a01718b04fa8c28bd5159e183827b0ee227590fb3d28383bf0d4a167d5594416aa8080808080808080808080808080a022bbf941b5b0ac42f58c8e5f44fec0d59663114448655e4b0ad45af8b713b44a80");
// block to import
Block block255652 = BlockUtil.newBlockFromRlp(Hex.decode("f90836f9078f018303e6a4a0d09c3970f17ba0e2b0ce87504ab63b32e49ebd6b1dbc426ca3f02d2a131675dba0a08fc457b39b03c30dc71bdb89a4d0409dd4fa42f6539a5c3ee4054af9b71f23a0fa81460e89314a8c61376a97d8600dcab3ab257c2979bd00bf72acbef65f5111a04467e38380e1b477ae071597c371449ae14b63cac7deb37b4d6799e3bd23418ca0dc9c736f63cfc0deb0ee64c760ec8c88db5392dce951b0328b374fbcd5d91fbfb90100000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000001000001000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000089000000000000000000000000000000012a041494f4e0000000000000000000000000000000000000000000000000000000082a51083e4bdc3845b7d6a7fa0d8eb38888fb26fca1221fae985bf417f79e60646664de9e61db03d74dfe0cd43b9058000358d400b257d343e760b641c32ff1b5ad3a1ff277c02bcfde7ddf233055864a0099c3b906c8a378d7833d0026dd1755ae4b5a2610d9a639d2354d90c25ddb4e994063c005996b60803b6face61278f748b786c55e318140669002bdb29e76a6ae24062ab41ee57d8001c68bd37316617c1f584cb683e7b979c60eb191e0d5c163fb15a13efdff746a944a634a6253c94bf3d62777a78230cb6341381ad6c99be7facc55648b8934c7796699d5eddec0265d4c0b098339f651b0a140d41424ad1eab7dfed2d24012930a062e4e734945d2a2fdf8d57a5f3d97ba8b606040f8acc88dab9a4ee49217b3f03649350aae803d41cc6ce80d4faf00a3c2f3a3e8f455f110688c0f6a516109ccdca75a7e8dbe3a8ac39ca4f4d6bbb2abb7f26a775555745ac9a2060af4708821cf6c8b85b8072b7f4a21f693dcf8525d30d2891a25464fa4781f6e0211c38902c43e6298405f7ad6759f35343dd63dd0684515e6d470045f034ccc13c6ac9805b182fbf125964307b5540a204b0badd84c68ffe774a9d21758eb813e30b9360873503071593cc03e3206adae305315e49706abb8679c6d368a2228fbfd6b735374a4678497ac54678506e2f66e8113344b4b5e58a899c611740d6e20db1c41a12eb7e981b45825509138e2eea2b4b588402927bf8bbbd6a550915961ace7c746f1a3f598016aec922e664cde15d536e4588626a2a9a6b472ef76c5d2c827569bfb8b23f9ef6077ad3c4ede674d2a69bf70ef7c7d09cdbcec233b6e30dda8048bc5ad3feb0850d6cc88a5f6e7904cce7cbe12b6c96caa99785afacb83a7c6cce72618c3acebd5fb43abf9268dae6b394afbf169133c2df8c693f4abd765615a3f68346662b6d9915412e7ae347152cfcb139345d273ae4cc46c62fd869ae306b19c79ebf58a033a91acd1daf2ed796b72736fc388d42a2653e9686a487642a9727c887e96d08bf6667c6ad933236e44cbe1a76bbd3c7005fb8929e20784de2b5782ff73d5d7a5386fe619aff0ac8c10ff9633623f7b04f170c20b91ef9188cfce47d16dcb19728e318c4ace659281a41de9d755e5926f2f147027ded0cc5b17bf83c2771f0abdc2f3a45ee7a73dd13652cab2d96c858271edb5ca221bdf6285620b20ca513e1e8955251b6d7b6a1fb16be1f0a58e877b66af98e17f650fcf6f28e3f8b5d48261d6e826577177523ea172a10ffa675695c5c310b473e1cbea9ce54661e30d94709099cadd5bb6a5bbd7f6b50832d98bafd061779ed360b1a1626111115be3793063cc5330b1c0642f87eabb30e00d6fd2452b2679270bd1bb928ccb512bf89fbf91e101d4df6adf35a1fde0f681d7665bb93dc737b7697d6108e3b7061e17ca75aed8d25cd41c0d486026e6fa73a189e7b0b8ec54a71ad107924fe12e8b3da8fb83eb91941cdc549bc36abd439389c7cef3f1ab7492a03e8711f44b27ebb58547220dddcc4b1dc6349a49de1a0bec1c40408d67c5250c3e4b9572695ad0fa36eda11547076a00e757c44fae4be5c3242047477962709894e70ad9eef1eab1fbaa295ca981e0857421425364736b8196c9482321b77eb7a6466f72bda3b5a421da941aa4de1359828140d5340aba14684c9ecb615b2724061c4b0b824fc663b833b9edcc797a0310bc45748f70baaeaaf5534603817a2bb76256c7029325b59980fe2a6f1ea92652dbe20579149f0016b7d6dfac0fc6ef755c70f595800a75cc1054d364dd155277ea287e8470b237aa38c86d43a0851382de5c01e6639fc205c8c5c2a8fb98d78076a715b1b2afa9148bd175b12671d7c585fd6c02629e9c8ed514d38d1fe1e4d4bef6efb2fc03ec5fe65bc09db2fb6e3810604de46ec9b4062f2c1b909d5f6fd69359afbe284f34040e27b2d37b9186efdcfa60903a81ffaffe5aceb60064938ba2e7d98cab7c644b428f798de6ec2403d055e4d948b7530559278e2796f6e45d6535bbe4b5d7b531ef8a2f8a000a00000000000000000000000000000000000000000000000000000000000000200008479ba50978705740672392de8831e84808800000002540be40001b8602a80540535d30c63024afbc491efac24f40ccfbc5c81bc1babb81bcb8da231661d7354a33bf644f3a8569e18389f3aff5911192ca5accf2bce8c98a9540a6ab1098b9e0bb86611e11e5cf067401841b1c7c646dbdd5c38efb1c10228eda14f0b"));
BigInteger expectedTdAt255652 = BigInteger.valueOf(4_199_151);
// setup blockchain with state before imported block
StandaloneBlockchain blockchain = new Builder().withState(block255650, tdAt255650, block255651, tdAt255651, trieDataAt255651).withDetails(AddressUtils.wrapAddress("0000000000000000000000000000000000000000000000000000000000000200"), Hex.decode("f845a0000000000000000000000000000000000000000000000000000000000000020001a00251c8e62e0ac02f0bd4d9f2e786e65f4aaab627c46f2a6aca6aa32055d0c1ba80c0")).withStorage(AddressUtils.wrapAddress("0000000000000000000000000000000000000000000000000000000000000200"), Hex.decode("f9020bf876a0359d315474b06a3da0342531f4e30331aaf5d45f42a3ea4de00157bc46f0e197b853f8518080808080a00579563dec924478bad405984207dbc957431a3a39a15ae4298052fe29a3a9df808080a01f6483962c4706b81578f451b998dd66f71dae6876ad0d477dd14b12762c48d480808080808080f868a07aa7374e4d3ae18d1a6818a2a4a254a2ae4d2eb312c714d8c9045d9deea23e74b845f843a035c749bcf708d70b69d4d2f4ebd726038bcbebf9ea7ce8481b6acc1e12014e4ca1a0a048613dd3cb89685cb3f9cfa410ecf606c7ec7320e721edacd194050828c6b0f845a0eefd522785c3bc1f41e83e3f6b55c2960b9fe022185d4a4c7c65255705b3defaa3e2a020bcbc2f082f4a7561a5c1a2cfd3353274a2cd5162cde722a9a8b3b8df0c7bfb01f868a07e793d9c960a9dc3b49ed8b369135a164d391af681a5ad5a52ba3d51ee08a916b845f843a020c1c088cc9453996779630ad3af45cbd92814828dd784cf2aa12df95d1b8afea1a0a008d7b29e8d1f4bfab428adce89dc219c4714b2c6bf3fd1131b688f9ad804aaf876a060bae2e58defa34db5c4e96b5f3d520d0e139ae15dcb437b9d554471b12ddf7fb853f85180808080a001a75cef37a238361422c5898fb6d57db4372e7faac3e366b23e323229093ebd8080808080a091233354246b19eae15423058df04dfdf291d4ab333b04709ce12a34c2b24951808080808080")).withAvmEnabled().build().bc;
// import block
Pair<ImportResult, AionBlockSummary> results = blockchain.tryToConnectAndFetchSummary(block255652);
assertThat(results.getLeft()).isEqualTo(ImportResult.IMPORTED_BEST);
// collect the consensus information from the block & receipt.
AionBlockSummary blockSummary = results.getRight();
// check the receipt
AionTxReceipt receipt = blockSummary.getSummaries().get(0).getReceipt();
assertThat(receipt.isSuccessful()).isTrue();
assertThat(receipt.getEnergyUsed()).isEqualTo(42256);
assertThat(receipt.getPostTxState()).isEqualTo(Hex.decode("9e54adf6b73f759068f1791cf62f05c4a09ea80c57433b052b258093312cf492"));
byte[] stateRoot = blockSummary.getBlock().getStateRoot();
byte[] blockReceiptsRoot = blockSummary.getBlock().getReceiptsRoot();
byte[] receiptTrieEncoded = receipt.getReceiptTrieEncoded();
// verify the consensus information.
String expectedRoot = "fa81460e89314a8c61376a97d8600dcab3ab257c2979bd00bf72acbef65f5111";
String expectedReceiptsRoot = "dc9c736f63cfc0deb0ee64c760ec8c88db5392dce951b0328b374fbcd5d91fbf";
String expectedReceiptsTrie = "F9018EA09E54ADF6B73F759068F1791CF62F05C4A09EA80C57433B052B258093312CF492B9010000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000100000100000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000008F868F866A00000000000000000000000000000000000000000000000000000000000000200F842A0A701229F4B9DDF00AA1C7228D248E6320EE7C581D856DDFBA036E73947CD0D13A0A048613DD3CB89685CB3F9CFA410ECF606C7EC7320E721EDACD194050828C6B080";
assertThat(stateRoot).isEqualTo(Hex.decode(expectedRoot));
assertThat(blockReceiptsRoot).isEqualTo(Hex.decode(expectedReceiptsRoot));
assertThat(receiptTrieEncoded).isEqualTo(Hex.decode(expectedReceiptsTrie));
// checking repository state and total difficulty
assertThat(blockchain.getRepository().getRoot()).isEqualTo(Hex.decode(expectedRoot));
assertThat(blockchain.getTotalDifficulty()).isEqualTo(expectedTdAt255652);
}
use of org.aion.zero.impl.blockchain.StandaloneBlockchain.Builder in project aion by aionnetwork.
the class MainnetConsensusTest method testImportBlock1088454.
/**
* Test for importing block <a href="https://mainnet.aion.network/#/block/1088454">1088454</a>.
*/
@Test
public void testImportBlock1088454() {
// data extracted from the mastery network
Block grandparentBlock = BlockUtil.newBlockFromRlp(Hex.decode("f90791f9078d0183109bc4a01adf7705adb5e315efbd54ba6ff7f4ff45ebe2b7e03973e7ae2d2ffd0c8a40d1a0a08091ab0325e384ac45e560d2f85e4b741363aa98881d52d54233a02b33fcaaa0057d2398f866b01d7f66e5f55cbdd491016c849a793dbf60d78c9884e798464fa045b0cfc220ceec5b7c1c62c4d4193d38e4eba48e8815729ce75f9c0ab0e4c1c0a045b0cfc220ceec5b7c1c62c4d4193d38e4eba48e8815729ce75f9c0ab0e4c1c0b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000090000000000000000000000000011a3573a04c55584f520000000000000000000000000000000000000000000000000000008083e4bb84845b8d1a3ca000000000000000000000000010002d8500000000070000003140f10000000000b90580002c63a4b352472a5190580704e071987977666c05fa259c790800c656effe7b16369b3613e497dde465f2470367383a9e334817d39ca83736b708bf4ebaa17f5651311a516b1b677e41b92b263e3ca5df0d08eefcb8dd98058600d9900116f9cf48839e541b52d2be2cde3cfefa15897fe6c6116040e46a003469b9dcf2f7720bed2ef40f7e837f1413f431f104901c44a4af17250c9d5d75524c0cd6619b95229ff2b96f5ee60fa1e776434be22994024c4c2ab01092830b81277f1e6f20471f5d58ff233d11484647b08af36df2a5f55a5fdfc92a663e33bfe29602cb932c9b82cfe7dff5f6149725c1759c10bf3526dd1dd103d3b37632387e89cb2f81ca904ef60de061dadd17982b3a75853ada7f6b9d6b276743d34ba7942f5adc33fb2f0b1aeb00ca3051eb573049f9d567df3aa97a1219d3c6720fb6b57f63fd068d9f8e51048bf989bf28b4272f2bec4796486c2de045347f75cfc93775a3be5d960308e7a6265155172d76b8144b91d117b281f63e0634099fa4a9432e6e6a7fc29f16495ddf02d1d646d4d6c314874e4708e1be55370d001d6f7e55eb72e858f1948119d9e994e60f07e4fd5e6124b216d66a726d424c67ea052400db08513eaab85d651a7602a24cf8e9796d1736248c9cff78750dfb54ce74778257c99007c2d4a6978f06680d2d5239042f3408b9093cbb9d14c34ac920819528008a23c995f5171b07713a2c9b09a86c96a23fa4f7059498f803c3c768abaca11789ea8c9cd3072577d39405bc27231e14fd71786de93ea88fdcb8f66fc82294441c039b829f6217c330810f39643de8bd86fd1021c42a49373e1168ad3285fa259b6b5155ca12a70ba3b7a1e208bc07f4a740a74e901ad629105d254799b2ea30b1993e3175b5d90a91b23f8bd85a5b229be8164cfe2ad1ce111650987a3701d13ce0a3360a922803e3b07eb213cf16eb64635682b6ede3a27534e21a314b0a9c15ef091e01e7d5428a324e4321d5a64d3bb2bac008c8937d141834f3113587e8e1657555565f772da2ed790f8627c39d07928e2b32323fb6bb4cb4272089c133dd0bf8bb114120ebd5581a239a78729e762ed03baee049122979e1d40215a13be1997c4eede84a0eb514471d031e863e0b9002ad1cadcefa790db32ede575efb1140a7d27c621bae038258ab587352526d218132cbc2ca3f979560fc47940993ce9a3979ee11ec3474845f073f72ed35ff76aca40554de9ad950aa038d2cad1631fbaf68abc0dcb80269425d3711ea6454f19b3175a4cb33183b2b148cae88340d08fc82c86fd1067fd6000f6338f8fbf5a1b45a91883726965e609501da654a568065621b24a92ccf30a26a0932a4548e424c4a2db4b90ccaf961728aba4a3de2b71a4e746ee226e5a7ea01344a0a55f5b7a6b44d709e5b132521671d3479c3344ba7366ba7da69f38c2739fdf42be759b02618b1bf2d556c58bb8731371843f237390c025eff6e7cb1b4dd29fc42791cf622dbfbec0636ca8b20566ea66892ae93e9a083923dcef1ff6a67c26c91d50911ecd45c6132a856f4072a60bd13c78c508a351f113a26914467e8d7ed6ee41b49b79767a6469d119f46c907797ff5bf009a30041dbc0c8f2b20092847c4a984c9152dc8ea486b6b97ef72465e8c964d5d37723239cd750af9a479074133604efeb140ce32544066b061a109d00be126d3d898f302b0fbdc1cc83db98123464f972dad06e22bea5408a343f391822f922f0a6e483d1d2c1f3d26a817fb19868520fd74a14104a1f5fda4518fb24dad25049b58aef96118fc159027c0d376c42678536a0caa2fbfd2014de4d680dbb9c4461296367475d04eef9111161cf4782a398baca8d22d2d02a1015535318ed78e8d34aad518a8fcf7a5f88ba33b5a8315d3a621432fc73b164876dd4cd31181e60d19b596fbd724ebb9b0b92f27368bbb7bf6857a1766955e43445eec19359d0a38f890c0"));
BigInteger totalDifficultyForGrandparent = new BigInteger("11658225838160");
Block parentBlock = BlockUtil.newBlockFromRlp(Hex.decode("f90791f9078d0183109bc5a09e119db329aa05bd056fa9e39fc4f12fa7a3ce99855aa86fda22456e77865bf2a0a08091ab0325e384ac45e560d2f85e4b741363aa98881d52d54233a02b33fcaaa0c96a11f96017ea0da9e0c7be63e28a31febc509dc9320aa57bbf2be018b46ffda045b0cfc220ceec5b7c1c62c4d4193d38e4eba48e8815729ce75f9c0ab0e4c1c0a045b0cfc220ceec5b7c1c62c4d4193d38e4eba48e8815729ce75f9c0ab0e4c1c0b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000090000000000000000000000000011a3573a04c55584f520000000000000000000000000000000000000000000000000000008083e4f4b2845b8d1a46a000000000000000000000000010002b430000000000000000000000007a184104b9058000630d69a5f201d2d5b403828bfaf572c8e7cc7dd0e6093c31200181b7a4e1494e3e8e7ec275c78e97b1211117bff3310d54f94230c31b221350caf106a2803938181c4692f75e56d74bf061d25d4cfa368ccc85d6baef381261d551d2b50b62b59fa2be173fbde8cc27f5790dea3cc7ccfdd834d625749f34a9766beb4b7aaf4eaadf11201c8d9ea0b3e50c114538699e12440c76d8ccbfe39a3e2b99de0f559d0b9c983785de22184789e618bf8094044a05c764c2961d0ca3b23939712bc1d8e124e6b2622311110dafd418ea6441202e6df1c27e45b1e3ed043005d550d7569ddf9abecedc6db137ac24d7b91ae59f021f12c3ce02ba0e8fb4882158c265e8d2aa989035fdc409e80836a1a3f7edfd59ed16032a9917d77bcb32d498127130b667f4fe169daeb81790ab60bd26e53025fd1a11452a16b5edfaf1bd7c2c9f2d5304f55ad4ce73c8fd275774cee1d293fe0ef8da42d01f6e16975bd4bb6e36009b26deb1e29e670faeb84842d9579b5769dde9036317b918de4f81871c1d8eab29a0db3dc5e3f26a64f5c60fc362a2b4966035ed543c1eea23b83d167bc727fa641ae6f8f0063b32473c826a32416e55fff5de8e9aa99b03ce772f886a51c2b9c9f0138cc8e2909165d266253e92919bb1e67b814b7b9be9a6052755bd1bb139732a9008c5d7e40d135e015f8a0e177cd0c53f773e6c72d56039d26e330ac4ff19b253c74b456744d3d655aaaa5ec101e77ecf6231c07208d38c6675939f4c0b15d1376fb402b113ccf6d2ebfabe36b12c81c3411345b6f6b6a3610717ed20bff891ac2cc2c10c1c033bc7862c8fad704e0b3d4bd1e9849e985b501d2fff1a713277dfffff4c9e11f48e5e8be73c547d1e5b67dfff29d9070af3bff444274e70a653c4bda07ff79041cd33f9eb19262b3a1c313dce5945da95af373d81785a60dae6bc273a9b6c353b60e6f3593d1898fb321bb7858667dc035c42127a57ae025d4be7d8207c4d7e29c02419b3d6dc36df795d26744e03cb3ad7a61d81a3cdb17d6b46139f1a8315f1e2f6060ba86fd50888f46ddc90144de6f6ff6d6955f99fb609a7d7fa14328b995ba3b53466f7aaf2bcdb133495aa02c0358e5b57dfd1e46ed836096637cee4dde93d2df20ff90128cc646ed83c5ee94d3331f740a755dbe257680ddfa83afa84f281282f5b44746ea06904afc0777b7b2009023ef8660a5e2de7112bfc5b8517463578bcd2610978e6affb355c1ee4b15512148a28162b98aef0eb2f4e51a2422beae8bc75d308b6eff3ad17ad66ed7b0a652fb06f12d55b5720bf192d511237f00c06a3c21b5679399c4be3cccd431cff6279a494836fa9beed817be7b810f1aee85a840d4e2538e47c3816b006fbe4b3f5d93b1337e90377029d061ad1761daa827074c464222e4777368fa3179d692c1e6dc23b4802fd21071492d92b7fc47bd2474ecf4b09cafa60047bd3330fd66c8e213a35e90407b8b57636b16d65efcf5c5fe68467caa4b87c5d541c9db2f52b8207c9113dfa42ede7f326670fa92b7b7a202e42fc06e920bdfe5c7365d6b27fc74a3c0178bfbf20b85df0bf440c635f7878d3f52b5a066f0655bff9fe074120a5dcc5ca621ced4a1d11e5c7da53b94fb915c30b7fcad053a20fee11740f32604ea45647f119aae5f41afcc5f444a80e97e12bff30f3e9ba5196b68f78bb473586630e5809f5123aec6d4ba49340be46b8a3276bd80484393e419b88acfc7d5840aa8d45f40856d6abaa9b08151055ef0a19bfad37ab68c3d688034d1b8c3aa80e18359faddc48dab9ee8ed7676e1b3dedea612eeabb8a8078b32adec84905b9ba698baef6b486d8fdb8eab5a90694982bc1f1b3b61ecbdd0a4cc78e93193ac9317d3b2d1563aa68073f653bb0d68fc6437c56a9be60a93c78199e16103e76c3d7b3fc4f3db38a741468c506b776ed2971a1c5765bb76db78f0f9ad34f51b9fb1858760dd3c0"));
BigInteger totalDifficultyForParent = new BigInteger("11658244332995");
byte[] worldStateAfterParentImport = Hex.decode(hexEncodedStateData("mainnetStateAt1088453.txt"));
// block to import
Block blockToImport = BlockUtil.newBlockFromRlp(Hex.decode("f95803f907900183109bc6a07be60ba68c2b3c3acd9e21fbbed92ae7381bc34ad07c0c3c4ab5ea22818029a0a0a0061525a5e19470069c176cdeb7f578d537debdfce2fde7f656498f969a5981a08d2ebcd33aae15e660d1bbc305d9e292341d445287294ce6eb53ef803a82951ca0a529f86c43f34cb58615eae18f18fa7880e79d36e6786efc346cb47bbf4ff488a081b1fe0467ae46709932e99917122c33b39788e92aac4e05e429b1030f25a5a8b901000000000000000000000000000000000000000000000001400008000000000000000000000000000000000000000000000000008000000000100000000000000000000000000000010000000000000080000000000000000004000000000000000000000000000000000020000000000000000000000000000000000802000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000020000000000000000000000000001000000000000000000000000000000000800000000000000000000000000000000000090000000000000000000000000011a3573a041494f4e00000000000000000000000000000000000000000000000000000000832f8af683e4bb75845b8d1a4ba04cddc49e000001f30000000000000000000000000000000000000006f7436d04b9058000448361c83ec0bdfb7fb208121f96736daa5579fe3f2141831f4c246b217d2f693eff7b35301876f273c8be0ca9005d5554f512d536a429868d3d6837cbd26ce8643eb605ef2436aa9e73b7794ebc11737506949fa56d890bdfc3b34e4285729acf936d8442bc21785ea0ec5d5236fefd3bffe5fdd032a5224819f7621e5b01ecbfef8a1dc9f8f2199440c2e923b234a0ff8df6edfba8be35472342e58ac648cf1f2ff48b774db7d202be8da13d695201a7c534b478869f2cc9ea2c44c39ec41d090cb9937612f5e89cae546be66c4346432fdec52f3d34f97d8f570f0df9c4cac316a2d3b907169f1d690c833ffe5f4cc014d5bf4e8521934bf486a96c8932910ee979eefda7cd043f1534f983b63034420f7de60be7e93929e42814e13db9e6e0eab66d6c64e3269202f34c7f8be4e8f00c4005216c90568322740f71d10b2e4bf81873b49bedc1ff070c49d07624b9916cfdda293026921c852c1dee10850332758bb503d11d32af521710e393f7d761e92d9e5c37fee70cf85c7315f393d338585571fe49307429d79309b028e020f4404a726dc81ab4122c8c74f7b03fa94c2cb0327adbe7a205a18cb244433dccdc97c51a7e13480f317689091266c794510d29d3bd1231f46b193ba5741f8300f0bbb964c1308a612e8adcc26238c3b3e48a2b1f3a19a0d51a9ae6fa81853a1d6b25111724b6ad5f7a357177a181fb2d4e7553ce43b7dac573a9b06c2b1fc105fbe475c737d8fb2743f70edc7e925d45f14c70e11933e76d72681426ab68a29674920787c1eb9fffb4d3f70918c5a97426e626aa621c3e4592ecb52ca8a875425459e38375b26c82b7fb4f8c6d73a9fdb55a1c627cb8d40966e0aed791c5102f9d2f33d732449f8d7292b7b4000c7d05d03e055d0e3d52db36723fc7040c83a07261e70d1b154c8475633de2dcc020688b1c0645922bbcc2a3504556cecf7bb19ebfc4f66f4a1759a279686af837630046cb75f73384a77939de279d167a4c38eb5a795dda081fe4fd9ad4ff8296e2900e4cb716ebd3ee6bf79ebe005821ab28c08185ce39a972d57f743cd7f103e16ec62c6fa75f9bbd89d1395404307298f4df98a3a53cdbfd025efa12cfe56fa6a9d83c77123be2cad90d097c19d528a8bfcaf517cc5fb93da6a691dad81e0cae2eb45f92060b98df2d60d3b3f14a12069411f7fca1eea47f46262876f6e6b0b4c6f01829d444a9c721fc7c7af8f6398301d63ab16cb44db2b8703d03f30a223b35e02d2a535e11f7a4705af65091276e65490ebea29fb8941968973f0e7e752b781b8291bfbc411be84e98c6a3f6c9b79273162060e1bd5233015e1e48250aaa60960a56b8f6114207ead70f0462ab5c92d03029ba53de19b5647decd27f0c392e1b10573002ac95ce0d612c8111a59f2de4177929f4f50876e2f151ce674365b5a2cba6b7209fbf394039499ed75e263d20add4d945a3ede273bde605be2a8303ec4f710fa04612c5dfea1a849226fc32ce24ef1eac3a5f33841cf442a4ad8b968374038f765f26a87d8a1a0fff278fd1d8896367852d15d174a7ef62a847e2ac9d1c5d9e2128e2582ff5401f2a3239dbd60c40773b31da1d0040bff397de6b20bfb4555cd55616d95a91eded3c2fca854830ebbc4e79ca9c43a9ab59ce589347af6cf044ed022a33ebad24be569d452ceea8d634751620932547f62da132ed30e6ff8cdd4d1c89e011691aa4b405cf08148633a67cf38334b1a417e8fd145d0573db73171c1bb79ac8bf2ae1adf350d8ac09b78e586caca0791de62fb33b6b29e3e86e1c7d8530a2d26e0c4b83a3f026ca86231b0d512d7c4138e1749b4f7aeabdcb020c2f473e09f2b662d6f7e2eb221a811dbb03de756788c6b818ba0e439d89d271cc3334c3844d3093955df729155e950f1240b0f00711dca9a776393f5f51301827746c295e531a53ce78b0d2fb5aa463d822dcf93a633240aec9f547f9506df90e32008000b90db3605060405234156100105760006000fd5b5b3360036000508282909180600101839055555050506001600160005060003382528160100152602001908152601001600020905060006101000a81548160ff0219169083151502179055505b610062565b610d42806100716000396000f3006050604052361561008b576000356c01000000000000000000000000900463ffffffff1680632f1166ba146100915780633e8a80091461012f578063429b62e5146101a95780634b0bddd2146101ed5780634cfdfa2a14610224578063565974d3146102c2578063679c3bfc146103525780638da5cb5b146103d5578063fbbf93a0146104065761008b565b60006000fd5b341561009d5760006000fd5b6100b36004808035906010019091905050610496565b6040518080601001828103825283818151815260100191508051906010019080838360005b838110156100f45780820151818401525b6010810190506100d8565b50505050905090810190600f1680156101215780820380516001836010036101000a031916815260100191505b509250505060405180910390f35b341561013b5760006000fd5b61018f6004808035906010019082018035906010019191908080600f01601080910402601001604051908101604052809392919081815260100183838082843782019150505050505090909190505061063d565b604051808215151515815260100191505060405180910390f35b34156101b55760006000fd5b6101d36004808080601001359035909160200190919290505061077b565b604051808215151515815260100191505060405180910390f35b34156101f95760006000fd5b6102226004808080601001359035909160200190919290803515159060100190919050506107a7565b005b34156102305760006000fd5b6102466004808035906010019091905050610800565b6040518080601001828103825283818151815260100191508051906010019080838360005b838110156102875780820151818401525b60108101905061026b565b50505050905090810190600f1680156102b45780820380516001836010036101000a031916815260100191505b509250505060405180910390f35b34156102ce5760006000fd5b6102d66108b7565b6040518080601001828103825283818151815260100191508051906010019080838360005b838110156103175780820151818401525b6010810190506102fb565b50505050905090810190600f1680156103445780820380516001836010036101000a031916815260100191505b509250505060405180910390f35b341561035e5760006000fd5b6103bb6004808035906010019091908035906010019082018035906010019191908080600f01601080910402601001604051908101604052809392919081815260100183838082843782019150505050505090909190505061095a565b604051808215151515815260100191505060405180910390f35b34156103e15760006000fd5b6103e9610acd565b604051808383825281601001526020019250505060405180910390f35b34156104125760006000fd5b61041a610adc565b6040518080601001828103825283818151815260100191508051906010019080838360005b8381101561045b5780820151818401525b60108101905061043f565b50505050905090810190600f1680156104885780820380516001836010036101000a031916815260100191505b509250505060405180910390f35b61049e610c4d565b7f7d945ac917fabecae7ffaeb906ed643a7772886cd62d1b802af7d9f64aec768c83600060005060008681526010019081526010016000209050600050604051808381526010018060100182810382528381815460018160011615610100020316600290048152601001915080546001816001161561010002031660029004801561056c5780600f1061053f5761010080835404028352916010019161056c565b8201919060005260106000209050905b81548152906001019060100180831161054f57829003600f168201915b5050935050505060405180910390a16000600050600083815260100190815260100160002090506000508054600181600116156101000203166002900480600f01601080910402601001604051908101604052809291908181526010018280546001816001161561010002031660029004801561062c5780600f106105ff5761010080835404028352916010019161062c565b8201919060005260106000209050905b81548152906001019060100180831161060f57829003600f168201915b50505050509050610638565b919050565b600060036000508060010154905433909114919014161580156106885750600160005060003382528160100152602001908152601001600020905060009054906101000a900460ff16155b156106935760006000fd5b81600260005090805190601001906106ac929190610c64565b507f49db7f1c394f47bef5ab4b075aace7b956117c254730d64ac4e9fbfad57efdd16002600050604051808060100182810382528381815460018160011615610100020316600290048152601001915080546001816001161561010002031660029004801561075e5780600f106107315761010080835404028352916010019161075e565b8201919060005260106000209050905b81548152906001019060100180831161074157829003600f168201915b50509250505060405180910390a160019050610775565b5b919050565b60016000506020528181600052601052603060002090506000915091509054906101000a900460ff1681565b600360005080600101549054339091149190141615156107c357fe5b8060016000506000858582528160100152602001908152601001600020905060006101000a81548160ff0219169083151502179055505b5b505050565b600060005060105280600052602060002090506000915090508054600181600116156101000203166002900480600f0160108091040260100160405190810160405280929190818152601001828054600181600116156101000203166002900480156108af5780600f10610882576101008083540402835291601001916108af565b8201919060005260106000209050905b81548152906001019060100180831161089257829003600f168201915b505050505081565b60026000508054600181600116156101000203166002900480600f0160108091040260100160405190810160405280929190818152601001828054600181600116156101000203166002900480156109525780600f1061092557610100808354040283529160100191610952565b8201919060005260106000209050905b81548152906001019060100180831161093557829003600f168201915b505050505081565b600060036000508060010154905433909114919014161580156109a55750600160005060003382528160100152602001908152601001600020905060009054906101000a900460ff16155b156109b05760006000fd5b8160006000506000858152601001908152601001600020905060005090805190601001906109df929190610c64565b507f7d945ac917fabecae7ffaeb906ed643a7772886cd62d1b802af7d9f64aec768c846000600050600087815260100190815260100160002090506000506040518083815260100180601001828103825283818154600181600116156101000203166002900481526010019150805460018160011615610100020316600290048015610aae5780600f10610a8157610100808354040283529160100191610aae565b8201919060005260106000209050905b815481529060010190601001808311610a9157829003600f168201915b5050935050505060405180910390a160019050610ac6565b5b92915050565b60036000508060010154905482565b610ae4610c4d565b7f49db7f1c394f47bef5ab4b075aace7b956117c254730d64ac4e9fbfad57efdd160026000506040518080601001828103825283818154600181600116156101000203166002900481526010019150805460018160011615610100020316600290048015610b955780600f10610b6857610100808354040283529160100191610b95565b8201919060005260106000209050905b815481529060010190601001808311610b7857829003600f168201915b50509250505060405180910390a160026000508054600181600116156101000203166002900480600f016010809104026010016040519081016040528092919081815260100182805460018160011615610100020316600290048015610c3e5780600f10610c1157610100808354040283529160100191610c3e565b8201919060005260106000209050905b815481529060010190601001808311610c2157829003600f168201915b50505050509050610c4a565b90565b601060405190810160405280600081526010015090565b8280546001816001161561010002031660029004906000526010600020905090600f016010900481019282600f10610ca757805160ff1916838001178555610cda565b82800160010185558215610cda579182015b82811115610cd95782518260005090905591601001919060010190610cb9565b5b509050610ce79190610ceb565b5090565b610d139190610cf5565b80821115610d0f5760008181506000905550600101610cf5565b5090565b905600a165627a7a7230582092f5a291bed6c4bfc827232f9e757e11edea170121ba98cef694eda4e23a4150002988000574f5b985f5d88347b7608800000002540be40001b860a36483a260b736336d0a4b78c3ec8b68588829cfb716b49fbe9e279d9b70c76bfd68efdc58c36f3b8e24eff3d6179df023d48af96f6da075e1edf5d120b8eb825e396b724b86b5fa55edd008d367135592f621646b347511a6d076bdfc7f4c0ef9010201a0a042fb7f4792e7920e9299ae7c5f149851dcbb0b6a9cad8db228c7999bbe92bd00b864679c3bfc00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000002e516d523445777337676136464e474e783255546b4b6e776b424c4565437939484669764b36505a736751624b634d000088000574f5bc4ef102831e84808800000002540be40001b860a36483a260b736336d0a4b78c3ec8b68588829cfb716b49fbe9e279d9b70c76b17d232e1ed4f00e17ed67643f94398f373d3ca2e6a732906a2c05a1cf59857a7cc96ad07fafebe20ae72f0be386dbfad4d71da59b00a5e3ad204e15b0ee71f05f90e32028000b90db3605060405234156100105760006000fd5b5b3360036000508282909180600101839055555050506001600160005060003382528160100152602001908152601001600020905060006101000a81548160ff0219169083151502179055505b610062565b610d42806100716000396000f3006050604052361561008b576000356c01000000000000000000000000900463ffffffff1680632f1166ba146100915780633e8a80091461012f578063429b62e5146101a95780634b0bddd2146101ed5780634cfdfa2a14610224578063565974d3146102c2578063679c3bfc146103525780638da5cb5b146103d5578063fbbf93a0146104065761008b565b60006000fd5b341561009d5760006000fd5b6100b36004808035906010019091905050610496565b6040518080601001828103825283818151815260100191508051906010019080838360005b838110156100f45780820151818401525b6010810190506100d8565b50505050905090810190600f1680156101215780820380516001836010036101000a031916815260100191505b509250505060405180910390f35b341561013b5760006000fd5b61018f6004808035906010019082018035906010019191908080600f01601080910402601001604051908101604052809392919081815260100183838082843782019150505050505090909190505061063d565b604051808215151515815260100191505060405180910390f35b34156101b55760006000fd5b6101d36004808080601001359035909160200190919290505061077b565b604051808215151515815260100191505060405180910390f35b34156101f95760006000fd5b6102226004808080601001359035909160200190919290803515159060100190919050506107a7565b005b34156102305760006000fd5b6102466004808035906010019091905050610800565b6040518080601001828103825283818151815260100191508051906010019080838360005b838110156102875780820151818401525b60108101905061026b565b50505050905090810190600f1680156102b45780820380516001836010036101000a031916815260100191505b509250505060405180910390f35b34156102ce5760006000fd5b6102d66108b7565b6040518080601001828103825283818151815260100191508051906010019080838360005b838110156103175780820151818401525b6010810190506102fb565b50505050905090810190600f1680156103445780820380516001836010036101000a031916815260100191505b509250505060405180910390f35b341561035e5760006000fd5b6103bb6004808035906010019091908035906010019082018035906010019191908080600f01601080910402601001604051908101604052809392919081815260100183838082843782019150505050505090909190505061095a565b604051808215151515815260100191505060405180910390f35b34156103e15760006000fd5b6103e9610acd565b604051808383825281601001526020019250505060405180910390f35b34156104125760006000fd5b61041a610adc565b6040518080601001828103825283818151815260100191508051906010019080838360005b8381101561045b5780820151818401525b60108101905061043f565b50505050905090810190600f1680156104885780820380516001836010036101000a031916815260100191505b509250505060405180910390f35b61049e610c4d565b7f7d945ac917fabecae7ffaeb906ed643a7772886cd62d1b802af7d9f64aec768c83600060005060008681526010019081526010016000209050600050604051808381526010018060100182810382528381815460018160011615610100020316600290048152601001915080546001816001161561010002031660029004801561056c5780600f1061053f5761010080835404028352916010019161056c565b8201919060005260106000209050905b81548152906001019060100180831161054f57829003600f168201915b5050935050505060405180910390a16000600050600083815260100190815260100160002090506000508054600181600116156101000203166002900480600f01601080910402601001604051908101604052809291908181526010018280546001816001161561010002031660029004801561062c5780600f106105ff5761010080835404028352916010019161062c565b8201919060005260106000209050905b81548152906001019060100180831161060f57829003600f168201915b50505050509050610638565b919050565b600060036000508060010154905433909114919014161580156106885750600160005060003382528160100152602001908152601001600020905060009054906101000a900460ff16155b156106935760006000fd5b81600260005090805190601001906106ac929190610c64565b507f49db7f1c394f47bef5ab4b075aace7b956117c254730d64ac4e9fbfad57efdd16002600050604051808060100182810382528381815460018160011615610100020316600290048152601001915080546001816001161561010002031660029004801561075e5780600f106107315761010080835404028352916010019161075e565b8201919060005260106000209050905b81548152906001019060100180831161074157829003600f168201915b50509250505060405180910390a160019050610775565b5b919050565b60016000506020528181600052601052603060002090506000915091509054906101000a900460ff1681565b600360005080600101549054339091149190141615156107c357fe5b8060016000506000858582528160100152602001908152601001600020905060006101000a81548160ff0219169083151502179055505b5b505050565b600060005060105280600052602060002090506000915090508054600181600116156101000203166002900480600f0160108091040260100160405190810160405280929190818152601001828054600181600116156101000203166002900480156108af5780600f10610882576101008083540402835291601001916108af565b8201919060005260106000209050905b81548152906001019060100180831161089257829003600f168201915b505050505081565b60026000508054600181600116156101000203166002900480600f0160108091040260100160405190810160405280929190818152601001828054600181600116156101000203166002900480156109525780600f1061092557610100808354040283529160100191610952565b8201919060005260106000209050905b81548152906001019060100180831161093557829003600f168201915b505050505081565b600060036000508060010154905433909114919014161580156109a55750600160005060003382528160100152602001908152601001600020905060009054906101000a900460ff16155b156109b05760006000fd5b8160006000506000858152601001908152601001600020905060005090805190601001906109df929190610c64565b507f7d945ac917fabecae7ffaeb906ed643a7772886cd62d1b802af7d9f64aec768c846000600050600087815260100190815260100160002090506000506040518083815260100180601001828103825283818154600181600116156101000203166002900481526010019150805460018160011615610100020316600290048015610aae5780600f10610a8157610100808354040283529160100191610aae565b8201919060005260106000209050905b815481529060010190601001808311610a9157829003600f168201915b5050935050505060405180910390a160019050610ac6565b5b92915050565b60036000508060010154905482565b610ae4610c4d565b7f49db7f1c394f47bef5ab4b075aace7b956117c254730d64ac4e9fbfad57efdd160026000506040518080601001828103825283818154600181600116156101000203166002900481526010019150805460018160011615610100020316600290048015610b955780600f10610b6857610100808354040283529160100191610b95565b8201919060005260106000209050905b815481529060010190601001808311610b7857829003600f168201915b50509250505060405180910390a160026000508054600181600116156101000203166002900480600f016010809104026010016040519081016040528092919081815260100182805460018160011615610100020316600290048015610c3e5780600f10610c1157610100808354040283529160100191610c3e565b8201919060005260106000209050905b815481529060010190601001808311610c2157829003600f168201915b50505050509050610c4a565b90565b601060405190810160405280600081526010015090565b8280546001816001161561010002031660029004906000526010600020905090600f016010900481019282600f10610ca757805160ff1916838001178555610cda565b82800160010185558215610cda579182015b82811115610cd95782518260005090905591601001919060010190610cb9565b5b509050610ce79190610ceb565b5090565b610d139190610cf5565b80821115610d0f5760008181506000905550600101610cf5565b5090565b905600a165627a7a7230582092f5a291bed6c4bfc827232f9e757e11edea170121ba98cef694eda4e23a4150002988000574f5bc50173f8347b7608800000002540be40001b860a36483a260b736336d0a4b78c3ec8b68588829cfb716b49fbe9e279d9b70c76b302dbc5d644dd902fd24f323fd5a6c3c1d0a77d352543d9b841825d73ac5973fe4c6cbe9dfc8b911c8f2c3603f078caad1717e8259b96d33738ea8d84753bf00f9010203a0a0664db2873ad38208295809cb226ad6c383cf1aab3e0b5f6a22edfa2fd81d4a00b864679c3bfc00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000002e516d62586e4864647453553161634b723967597137623579776d45674366554a694d714a48375236727556385473000088000574f5be9d1f42831e84808800000002540be40001b860a36483a260b736336d0a4b78c3ec8b68588829cfb716b49fbe9e279d9b70c76bf9570602fc2940ed5d6a395553a215c3fcbc02c63b4db47f69babfcce6586769cd0ed4c1b37250e71f988546940e4c94255e910f96793af7960cd7aa9c1ad601f90e32048000b90db3605060405234156100105760006000fd5b5b3360036000508282909180600101839055555050506001600160005060003382528160100152602001908152601001600020905060006101000a81548160ff0219169083151502179055505b610062565b610d42806100716000396000f3006050604052361561008b576000356c01000000000000000000000000900463ffffffff1680632f1166ba146100915780633e8a80091461012f578063429b62e5146101a95780634b0bddd2146101ed5780634cfdfa2a14610224578063565974d3146102c2578063679c3bfc146103525780638da5cb5b146103d5578063fbbf93a0146104065761008b565b60006000fd5b341561009d5760006000fd5b6100b36004808035906010019091905050610496565b6040518080601001828103825283818151815260100191508051906010019080838360005b838110156100f45780820151818401525b6010810190506100d8565b50505050905090810190600f1680156101215780820380516001836010036101000a031916815260100191505b509250505060405180910390f35b341561013b5760006000fd5b61018f6004808035906010019082018035906010019191908080600f01601080910402601001604051908101604052809392919081815260100183838082843782019150505050505090909190505061063d565b604051808215151515815260100191505060405180910390f35b34156101b55760006000fd5b6101d36004808080601001359035909160200190919290505061077b565b604051808215151515815260100191505060405180910390f35b34156101f95760006000fd5b6102226004808080601001359035909160200190919290803515159060100190919050506107a7565b005b34156102305760006000fd5b6102466004808035906010019091905050610800565b6040518080601001828103825283818151815260100191508051906010019080838360005b838110156102875780820151818401525b60108101905061026b565b50505050905090810190600f1680156102b45780820380516001836010036101000a031916815260100191505b509250505060405180910390f35b34156102ce5760006000fd5b6102d66108b7565b6040518080601001828103825283818151815260100191508051906010019080838360005b838110156103175780820151818401525b6010810190506102fb565b50505050905090810190600f1680156103445780820380516001836010036101000a031916815260100191505b509250505060405180910390f35b341561035e5760006000fd5b6103bb6004808035906010019091908035906010019082018035906010019191908080600f01601080910402601001604051908101604052809392919081815260100183838082843782019150505050505090909190505061095a565b604051808215151515815260100191505060405180910390f35b34156103e15760006000fd5b6103e9610acd565b604051808383825281601001526020019250505060405180910390f35b34156104125760006000fd5b61041a610adc565b6040518080601001828103825283818151815260100191508051906010019080838360005b8381101561045b5780820151818401525b60108101905061043f565b50505050905090810190600f1680156104885780820380516001836010036101000a031916815260100191505b509250505060405180910390f35b61049e610c4d565b7f7d945ac917fabecae7ffaeb906ed643a7772886cd62d1b802af7d9f64aec768c83600060005060008681526010019081526010016000209050600050604051808381526010018060100182810382528381815460018160011615610100020316600290048152601001915080546001816001161561010002031660029004801561056c5780600f1061053f5761010080835404028352916010019161056c565b8201919060005260106000209050905b81548152906001019060100180831161054f57829003600f168201915b5050935050505060405180910390a16000600050600083815260100190815260100160002090506000508054600181600116156101000203166002900480600f01601080910402601001604051908101604052809291908181526010018280546001816001161561010002031660029004801561062c5780600f106105ff5761010080835404028352916010019161062c565b8201919060005260106000209050905b81548152906001019060100180831161060f57829003600f168201915b50505050509050610638565b919050565b600060036000508060010154905433909114919014161580156106885750600160005060003382528160100152602001908152601001600020905060009054906101000a900460ff16155b156106935760006000fd5b81600260005090805190601001906106ac929190610c64565b507f49db7f1c394f47bef5ab4b075aace7b956117c254730d64ac4e9fbfad57efdd16002600050604051808060100182810382528381815460018160011615610100020316600290048152601001915080546001816001161561010002031660029004801561075e5780600f106107315761010080835404028352916010019161075e565b8201919060005260106000209050905b81548152906001019060100180831161074157829003600f168201915b50509250505060405180910390a160019050610775565b5b919050565b60016000506020528181600052601052603060002090506000915091509054906101000a900460ff1681565b600360005080600101549054339091149190141615156107c357fe5b8060016000506000858582528160100152602001908152601001600020905060006101000a81548160ff0219169083151502179055505b5b505050565b600060005060105280600052602060002090506000915090508054600181600116156101000203166002900480600f0160108091040260100160405190810160405280929190818152601001828054600181600116156101000203166002900480156108af5780600f10610882576101008083540402835291601001916108af565b8201919060005260106000209050905b81548152906001019060100180831161089257829003600f168201915b505050505081565b60026000508054600181600116156101000203166002900480600f0160108091040260100160405190810160405280929190818152601001828054600181600116156101000203166002900480156109525780600f1061092557610100808354040283529160100191610952565b8201919060005260106000209050905b81548152906001019060100180831161093557829003600f168201915b505050505081565b600060036000508060010154905433909114919014161580156109a55750600160005060003382528160100152602001908152601001600020905060009054906101000a900460ff16155b156109b05760006000fd5b8160006000506000858152601001908152601001600020905060005090805190601001906109df929190610c64565b507f7d945ac917fabecae7ffaeb906ed643a7772886cd62d1b802af7d9f64aec768c846000600050600087815260100190815260100160002090506000506040518083815260100180601001828103825283818154600181600116156101000203166002900481526010019150805460018160011615610100020316600290048015610aae5780600f10610a8157610100808354040283529160100191610aae565b8201919060005260106000209050905b815481529060010190601001808311610a9157829003600f168201915b5050935050505060405180910390a160019050610ac6565b5b92915050565b60036000508060010154905482565b610ae4610c4d565b7f49db7f1c394f47bef5ab4b075aace7b956117c254730d64ac4e9fbfad57efdd160026000506040518080601001828103825283818154600181600116156101000203166002900481526010019150805460018160011615610100020316600290048015610b955780600f10610b6857610100808354040283529160100191610b95565b8201919060005260106000209050905b815481529060010190601001808311610b7857829003600f168201915b50509250505060405180910390a160026000508054600181600116156101000203166002900480600f016010809104026010016040519081016040528092919081815260100182805460018160011615610100020316600290048015610c3e5780600f10610c1157610100808354040283529160100191610c3e565b8201919060005260106000209050905b815481529060010190601001808311610c2157829003600f168201915b50505050509050610c4a565b90565b601060405190810160405280600081526010015090565b8280546001816001161561010002031660029004906000526010600020905090600f016010900481019282600f10610ca757805160ff1916838001178555610cda565b82800160010185558215610cda579182015b82811115610cd95782518260005090905591601001919060010190610cb9565b5b509050610ce79190610ceb565b5090565b610d139190610cf5565b80821115610d0f5760008181506000905550600101610cf5565b5090565b905600a165627a7a7230582092f5a291bed6c4bfc827232f9e757e11edea170121ba98cef694eda4e23a4150002988000574f5be9d34eb8347b7608800000002540be40001b860a36483a260b736336d0a4b78c3ec8b68588829cfb716b49fbe9e279d9b70c76bb92734544d538b98a3f9a15fdde8d34f351852cbf7adcb3149fde9d1f7dca79644da2066dd8003f53ee479f4e014d2d137021174fa141b0fe9b3b3df60a3d00af9010205a0a0d48c7bfe57920d7df204377b4f5c1769649ec2222167078f3ba8600a63d75100b864679c3bfc00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000002e516d6159746d3136484b34784251444d7158647233797845486b64466f385062594a644a456d44445773574d4747000088000574f5c223347c831e84808800000002540be40001b860a36483a260b736336d0a4b78c3ec8b68588829cfb716b49fbe9e279d9b70c76b2da266b28bc343be7b0acac9b1b0c44c18350502513a8785297390424d615c54e3b0e6955cbe07b9bd38d383ca799db5a7ecb0ff35a5e689002cbfb7515f5b02f90e32068000b90db3605060405234156100105760006000fd5b5b3360036000508282909180600101839055555050506001600160005060003382528160100152602001908152601001600020905060006101000a81548160ff0219169083151502179055505b610062565b610d42806100716000396000f3006050604052361561008b576000356c01000000000000000000000000900463ffffffff1680632f1166ba146100915780633e8a80091461012f578063429b62e5146101a95780634b0bddd2146101ed5780634cfdfa2a14610224578063565974d3146102c2578063679c3bfc146103525780638da5cb5b146103d5578063fbbf93a0146104065761008b565b60006000fd5b341561009d5760006000fd5b6100b36004808035906010019091905050610496565b6040518080601001828103825283818151815260100191508051906010019080838360005b838110156100f45780820151818401525b6010810190506100d8565b50505050905090810190600f1680156101215780820380516001836010036101000a031916815260100191505b509250505060405180910390f35b341561013b5760006000fd5b61018f6004808035906010019082018035906010019191908080600f01601080910402601001604051908101604052809392919081815260100183838082843782019150505050505090909190505061063d565b604051808215151515815260100191505060405180910390f35b34156101b55760006000fd5b6101d36004808080601001359035909160200190919290505061077b565b604051808215151515815260100191505060405180910390f35b34156101f95760006000fd5b6102226004808080601001359035909160200190919290803515159060100190919050506107a7565b005b34156102305760006000fd5b6102466004808035906010019091905050610800565b6040518080601001828103825283818151815260100191508051906010019080838360005b838110156102875780820151818401525b60108101905061026b565b50505050905090810190600f1680156102b45780820380516001836010036101000a031916815260100191505b509250505060405180910390f35b34156102ce5760006000fd5b6102d66108b7565b6040518080601001828103825283818151815260100191508051906010019080838360005b838110156103175780820151818401525b6010810190506102fb565b50505050905090810190600f1680156103445780820380516001836010036101000a031916815260100191505b509250505060405180910390f35b341561035e5760006000fd5b6103bb6004808035906010019091908035906010019082018035906010019191908080600f01601080910402601001604051908101604052809392919081815260100183838082843782019150505050505090909190505061095a565b604051808215151515815260100191505060405180910390f35b34156103e15760006000fd5b6103e9610acd565b604051808383825281601001526020019250505060405180910390f35b34156104125760006000fd5b61041a610adc565b6040518080601001828103825283818151815260100191508051906010019080838360005b8381101561045b5780820151818401525b60108101905061043f565b50505050905090810190600f1680156104885780820380516001836010036101000a031916815260100191505b509250505060405180910390f35b61049e610c4d565b7f7d945ac917fabecae7ffaeb906ed643a7772886cd62d1b802af7d9f64aec768c83600060005060008681526010019081526010016000209050600050604051808381526010018060100182810382528381815460018160011615610100020316600290048152601001915080546001816001161561010002031660029004801561056c5780600f1061053f5761010080835404028352916010019161056c565b8201919060005260106000209050905b81548152906001019060100180831161054f57829003600f168201915b5050935050505060405180910390a16000600050600083815260100190815260100160002090506000508054600181600116156101000203166002900480600f01601080910402601001604051908101604052809291908181526010018280546001816001161561010002031660029004801561062c5780600f106105ff5761010080835404028352916010019161062c565b8201919060005260106000209050905b81548152906001019060100180831161060f57829003600f168201915b50505050509050610638565b919050565b600060036000508060010154905433909114919014161580156106885750600160005060003382528160100152602001908152601001600020905060009054906101000a900460ff16155b156106935760006000fd5b81600260005090805190601001906106ac929190610c64565b507f49db7f1c394f47bef5ab4b075aace7b956117c254730d64ac4e9fbfad57efdd16002600050604051808060100182810382528381815460018160011615610100020316600290048152601001915080546001816001161561010002031660029004801561075e5780600f106107315761010080835404028352916010019161075e565b8201919060005260106000209050905b81548152906001019060100180831161074157829003600f168201915b50509250505060405180910390a160019050610775565b5b919050565b60016000506020528181600052601052603060002090506000915091509054906101000a900460ff1681565b600360005080600101549054339091149190141615156107c357fe5b8060016000506000858582528160100152602001908152601001600020905060006101000a81548160ff0219169083151502179055505b5b505050565b600060005060105280600052602060002090506000915090508054600181600116156101000203166002900480600f0160108091040260100160405190810160405280929190818152601001828054600181600116156101000203166002900480156108af5780600f10610882576101008083540402835291601001916108af565b8201919060005260106000209050905b81548152906001019060100180831161089257829003600f168201915b505050505081565b60026000508054600181600116156101000203166002900480600f0160108091040260100160405190810160405280929190818152601001828054600181600116156101000203166002900480156109525780600f1061092557610100808354040283529160100191610952565b8201919060005260106000209050905b81548152906001019060100180831161093557829003600f168201915b505050505081565b600060036000508060010154905433909114919014161580156109a55750600160005060003382528160100152602001908152601001600020905060009054906101000a900460ff16155b156109b05760006000fd5b8160006000506000858152601001908152601001600020905060005090805190601001906109df929190610c64565b507f7d945ac917fabecae7ffaeb906ed643a7772886cd62d1b802af7d9f64aec768c846000600050600087815260100190815260100160002090506000506040518083815260100180601001828103825283818154600181600116156101000203166002900481526010019150805460018160011615610100020316600290048015610aae5780600f10610a8157610100808354040283529160100191610aae565b8201919060005260106000209050905b815481529060010190601001808311610a9157829003600f168201915b5050935050505060405180910390a160019050610ac6565b5b92915050565b60036000508060010154905482565b610ae4610c4d565b7f49db7f1c394f47bef5ab4b075aace7b956117c254730d64ac4e9fbfad57efdd160026000506040518080601001828103825283818154600181600116156101000203166002900481526010019150805460018160011615610100020316600290048015610b955780600f10610b6857610100808354040283529160100191610b95565b8201919060005260106000209050905b815481529060010190601001808311610b7857829003600f168201915b50509250505060405180910390a160026000508054600181600116156101000203166002900480600f016010809104026010016040519081016040528092919081815260100182805460018160011615610100020316600290048015610c3e5780600f10610c1157610100808354040283529160100191610c3e565b8201919060005260106000209050905b815481529060010190601001808311610c2157829003600f168201915b50505050509050610c4a565b90565b601060405190810160405280600081526010015090565b8280546001816001161561010002031660029004906000526010600020905090600f016010900481019282600f10610ca757805160ff1916838001178555610cda565b82800160010185558215610cda579182015b82811115610cd95782518260005090905591601001919060010190610cb9565b5b509050610ce79190610ceb565b5090565b610d139190610cf5565b80821115610d0f5760008181506000905550600101610cf5565b5090565b905600a165627a7a7230582092f5a291bed6c4bfc827232f9e757e11edea170121ba98cef694eda4e23a4150002988000574f5c2234d098347b7608800000002540be40001b860a36483a260b736336d0a4b78c3ec8b68588829cfb716b49fbe9e279d9b70c76b2f596df5157bbc07dfb06d9bda66d379122619a751881392f62161e47b2a6e8e8f60ffb3b801feb42e8e474b80320d1189c6a3dc611e2841b92ce3b0ce088605f9010207a0a0e4b1a6b6e0528e01ab5fcd419fd4450929a809f21a873b3ed0b4a01be62e7900b864679c3bfc00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000002e516d5766333974617867664a716636376a375a4b6e724e3754636f514d727336326262626b7a47564b7064585831000088000574f5c41a9f44831e84808800000002540be40001b860a36483a260b736336d0a4b78c3ec8b68588829cfb716b49fbe9e279d9b70c76bafc64297bb825021de6935a4c7c47c12527c863a25164eaf14b197afb429b246cdc7aa38281f52c423db0205182bf63aa179772b365d016f8905d03df9c89103f90e32088000b90db3605060405234156100105760006000fd5b5b3360036000508282909180600101839055555050506001600160005060003382528160100152602001908152601001600020905060006101000a81548160ff0219169083151502179055505b610062565b610d42806100716000396000f3006050604052361561008b576000356c01000000000000000000000000900463ffffffff1680632f1166ba146100915780633e8a80091461012f578063429b62e5146101a95780634b0bddd2146101ed5780634cfdfa2a14610224578063565974d3146102c2578063679c3bfc146103525780638da5cb5b146103d5578063fbbf93a0146104065761008b565b60006000fd5b341561009d5760006000fd5b6100b36004808035906010019091905050610496565b6040518080601001828103825283818151815260100191508051906010019080838360005b838110156100f45780820151818401525b6010810190506100d8565b50505050905090810190600f1680156101215780820380516001836010036101000a031916815260100191505b509250505060405180910390f35b341561013b5760006000fd5b61018f6004808035906010019082018035906010019191908080600f01601080910402601001604051908101604052809392919081815260100183838082843782019150505050505090909190505061063d565b604051808215151515815260100191505060405180910390f35b34156101b55760006000fd5b6101d36004808080601001359035909160200190919290505061077b565b604051808215151515815260100191505060405180910390f35b34156101f95760006000fd5b6102226004808080601001359035909160200190919290803515159060100190919050506107a7565b005b34156102305760006000fd5b6102466004808035906010019091905050610800565b6040518080601001828103825283818151815260100191508051906010019080838360005b838110156102875780820151818401525b60108101905061026b565b50505050905090810190600f1680156102b45780820380516001836010036101000a031916815260100191505b509250505060405180910390f35b34156102ce5760006000fd5b6102d66108b7565b6040518080601001828103825283818151815260100191508051906010019080838360005b838110156103175780820151818401525b6010810190506102fb565b50505050905090810190600f1680156103445780820380516001836010036101000a031916815260100191505b509250505060405180910390f35b341561035e5760006000fd5b6103bb6004808035906010019091908035906010019082018035906010019191908080600f01601080910402601001604051908101604052809392919081815260100183838082843782019150505050505090909190505061095a565b604051808215151515815260100191505060405180910390f35b34156103e15760006000fd5b6103e9610acd565b604051808383825281601001526020019250505060405180910390f35b34156104125760006000fd5b61041a610adc565b6040518080601001828103825283818151815260100191508051906010019080838360005b8381101561045b5780820151818401525b60108101905061043f565b50505050905090810190600f1680156104885780820380516001836010036101000a031916815260100191505b509250505060405180910390f35b61049e610c4d565b7f7d945ac917fabecae7ffaeb906ed643a7772886cd62d1b802af7d9f64aec768c83600060005060008681526010019081526010016000209050600050604051808381526010018060100182810382528381815460018160011615610100020316600290048152601001915080546001816001161561010002031660029004801561056c5780600f1061053f5761010080835404028352916010019161056c565b8201919060005260106000209050905b81548152906001019060100180831161054f57829003600f168201915b5050935050505060405180910390a16000600050600083815260100190815260100160002090506000508054600181600116156101000203166002900480600f01601080910402601001604051908101604052809291908181526010018280546001816001161561010002031660029004801561062c5780600f106105ff5761010080835404028352916010019161062c565b8201919060005260106000209050905b81548152906001019060100180831161060f57829003600f168201915b50505050509050610638565b919050565b600060036000508060010154905433909114919014161580156106885750600160005060003382528160100152602001908152601001600020905060009054906101000a900460ff16155b156106935760006000fd5b81600260005090805190601001906106ac929190610c64565b507f49db7f1c394f47bef5ab4b075aace7b956117c254730d64ac4e9fbfad57efdd16002600050604051808060100182810382528381815460018160011615610100020316600290048152601001915080546001816001161561010002031660029004801561075e5780600f106107315761010080835404028352916010019161075e565b8201919060005260106000209050905b81548152906001019060100180831161074157829003600f168201915b50509250505060405180910390a160019050610775565b5b919050565b60016000506020528181600052601052603060002090506000915091509054906101000a900460ff1681565b600360005080600101549054339091149190141615156107c357fe5b8060016000506000858582528160100152602001908152601001600020905060006101000a81548160ff0219169083151502179055505b5b505050565b600060005060105280600052602060002090506000915090508054600181600116156101000203166002900480600f0160108091040260100160405190810160405280929190818152601001828054600181600116156101000203166002900480156108af5780600f10610882576101008083540402835291601001916108af565b8201919060005260106000209050905b81548152906001019060100180831161089257829003600f168201915b505050505081565b60026000508054600181600116156101000203166002900480600f0160108091040260100160405190810160405280929190818152601001828054600181600116156101000203166002900480156109525780600f1061092557610100808354040283529160100191610952565b8201919060005260106000209050905b81548152906001019060100180831161093557829003600f168201915b505050505081565b600060036000508060010154905433909114919014161580156109a55750600160005060003382528160100152602001908152601001600020905060009054906101000a900460ff16155b156109b05760006000fd5b8160006000506000858152601001908152601001600020905060005090805190601001906109df929190610c64565b507f7d945ac917fabecae7ffaeb906ed643a7772886cd62d1b802af7d9f64aec768c846000600050600087815260100190815260100160002090506000506040518083815260100180601001828103825283818154600181600116156101000203166002900481526010019150805460018160011615610100020316600290048015610aae5780600f10610a8157610100808354040283529160100191610aae565b8201919060005260106000209050905b815481529060010190601001808311610a9157829003600f168201915b5050935050505060405180910390a160019050610ac6565b5b92915050565b60036000508060010154905482565b610ae4610c4d565b7f49db7f1c394f47bef5ab4b075aace7b956117c254730d64ac4e9fbfad57efdd160026000506040518080601001828103825283818154600181600116156101000203166002900481526010019150805460018160011615610100020316600290048015610b955780600f10610b6857610100808354040283529160100191610b95565b8201919060005260106000209050905b815481529060010190601001808311610b7857829003600f168201915b50509250505060405180910390a160026000508054600181600116156101000203166002900480600f016010809104026010016040519081016040528092919081815260100182805460018160011615610100020316600290048015610c3e5780600f10610c1157610100808354040283529160100191610c3e565b8201919060005260106000209050905b815481529060010190601001808311610c2157829003600f168201915b50505050509050610c4a565b90565b601060405190810160405280600081526010015090565b8280546001816001161561010002031660029004906000526010600020905090600f016010900481019282600f10610ca757805160ff1916838001178555610cda565b82800160010185558215610cda579182015b82811115610cd95782518260005090905591601001919060010190610cb9565b5b509050610ce79190610ceb565b5090565b610d139190610cf5565b80821115610d0f5760008181506000905550600101610cf5565b5090565b905600a165627a7a7230582092f5a291bed6c4bfc827232f9e757e11edea170121ba98cef694eda4e23a4150002988000574f5c41ab5d78347b7608800000002540be40001b860a36483a260b736336d0a4b78c3ec8b68588829cfb716b49fbe9e279d9b70c76bb71873636b453a91154615594d20d86679213c5dbe2cc9c7b29ac51d95567897c0993d9afec4017dd33b0bc84e20354dab36d43ec3dbf39bfe3f935a4c0c8200f8a88303de0ba0a0bcf7a56a0065113e4b0891d60f087ec461b3277682254ded4cf0560bf652808801828bd84741bac08088000574f5c889ad85831e84808800000002540be40001b860069bfac4250f5951353b869934835f830543d1f04c5b425638360a8308ff316d547b7517950697e27b1741af4c82b950d9bd92c1b6e2402ba83fa8e6e77bff2326803261ad2717b769fa121e3d5fb5f35de4ddf828b7570952da1e1ecaa25202f8a88303de0ca0a0bcabd0aec49def5c8611595819c871ccd87f8673f4640433ceed14e4f8a421880170dfde4ed77c008088000574f5c89a08f5831e84808800000002540be40001b860069bfac4250f5951353b869934835f830543d1f04c5b425638360a8308ff316de5b8810422ed18ce0b69bc8cff6192d067940201cc9449c30a27e8a6ba849fc94be47e60e3707ab534f79b613ce07818da2596539e861ff23121716c65e64d0bf8a88303de0da0a066367cc918f97ac8cde5f9e52c405ccd9a519a3d5813e8f3e497b1ec6059748801a9dbcdf0fe39008088000574f5c8ab89fa831e84808800000002540be40001b860069bfac4250f5951353b869934835f830543d1f04c5b425638360a8308ff316de1463311cab3a45bfa137b740618e6e78a48ca9a9a7cf43166ebdd180e733774fa00b1c7bad263423111cf10c641f25c4a412c3d39cd9326783bbe69dc031d0df8a88303de0ea0a0d92d77c68bbbb693bcefe660ed5e6af9331181c35c6368c5adf876ab3dc29e88016576246039b8c08088000574f5c8bc0144831e84808800000002540be40001b860069bfac4250f5951353b869934835f830543d1f04c5b425638360a8308ff316d0c1ae7497477c10a7d34bade0ce481950f39b436325a89ad7977c66791e290577f14356445615e566a69c0eca837e780f12b17e4630fcc5418d67afc0dc4970bf8a88303de0fa0a0f499fe8fc35c31b0c8a802d947744d765f7c555d01b2b69ef7a9d894bbbfd4880a3739c3d3221e808088000574f5c8cc021f831e84808800000002540be40001b860069bfac4250f5951353b869934835f830543d1f04c5b425638360a8308ff316d6339b53f83c1eb14e7bf0b74ff1e38ab47dec70ff7774eaf0fdb925e9aff25c823ab704378afa0c8cc7d2db4e1c15bcfc9738382383223640ddd73cc550ae703f8a88303de10a0a08c1cccf49d7ac14d6e0ac19ace643df3174acfa8755ba3723e588420e644fd8801976ccf8d7c4a408088000574f5c8dbdfb6831e84808800000002540be40001b860069bfac4250f5951353b869934835f830543d1f04c5b425638360a8308ff316d8d8fb8e13adfbafffa0bafad3631d47496783b1805727b5bcf255e90252018f4751e2881b963c00e48cf82db28866545b2e8a446e9adfa13c06c381e78799d09f8a88303de11a0a04cf980fe74ed94de746ce762df6e6667a3aefb5de063ab22efb03806272c8f8801972006ff8473808088000574f5c8ec0e1e831e84808800000002540be40001b860069bfac4250f5951353b869934835f830543d1f04c5b425638360a8308ff316d8d8f170b1ef40b591dda6decba61e24313f58961746c938625db53333fdfc25e3a246dad8fd4a481a35c62251a4cc24d11d3152c25b5fa9d7ae734aa19c49a01f8a88303de12a0a04bf024251902322d99c2a6bf44128493bee03f385468ae9f625babe8a6349a8801e602f9d2da1a408088000574f5c8fc343e831e84808800000002540be40001b860069bfac4250f5951353b869934835f830543d1f04c5b425638360a8308ff316d56e5ecac11f5aad208597d8850a6fbbe272ce929a6f69b20fc82ee04139c411b8c48f8403b8c428cc5ff0aa76d70883beccc858d4f1efaf852f33d6b4488e804"));
BigInteger expectedTotalDifficultyAfterImport = new BigInteger("11658262827830");
// setup blockchain with state before imported block
StandaloneBlockchain blockchain = new Builder().withState(grandparentBlock, totalDifficultyForGrandparent, parentBlock, totalDifficultyForParent, worldStateAfterParentImport).withAvmEnabled().build().bc;
// import block
Pair<ImportResult, AionBlockSummary> results = blockchain.tryToConnectAndFetchSummary(blockToImport);
assertThat(results.getLeft()).isEqualTo(ImportResult.IMPORTED_BEST);
// collect the consensus information from the block & receipt.
AionBlockSummary blockSummary = results.getRight();
long[] energyPerTx = new long[] { 496_634L, 116_149L, 496_634L, 116_149L, 496_634L, 116_149L, 496_634L, 116_149L, 496_634L, 21_000L, 21_000L, 21_000L, 21_000L, 21_000L, 21_000L, 21_000L, 21_000L };
byte[][] postTxStates = new byte[][] { Hex.decode("5802347050ee7eb82ee28da18e7287caf2985bf145d0de695d5d25011551034c"), Hex.decode("b19582b990127716840fe6a539aeb7a51dfcd47f5f3d96bb2ef2a42137da95ff"), Hex.decode("7029ef5a462bc8cef74c121c5cafb91321deb35cf1c820596554c0f2c260799c"), Hex.decode("fe619299a305035b16de39e83ec4916dca94f4e65e0e505f4ab9dbc66b7f267b"), Hex.decode("7fc4895e5828d28c2bffb9249d4e242f8532c92b6a4b19e104b23474435078bf"), Hex.decode("42fb5a4593141d2f8aa048fce39697da7d0c6fcf4153610e028fc35958644fd6"), Hex.decode("a7be20b15fd3d518094472882187bb743e14814c6e355b4fc7d16b5a07e53954"), Hex.decode("5da41af05a2f6b779c4f63cdd386652854b9eea126591fc257b95c6653292778"), Hex.decode("d83ab8b72ff2d3c2afa2097e6ba1ae8896b83e7a0233f2ee3d642b1304e834ad"), Hex.decode("65c19b0855d3f1ae85be4a37c731f3604ac990d2df029f83a5ed2963c7fa387e"), Hex.decode("28432ea2812be6a31fec670ecaf4effdd017e1816026047adb6b20591084c6ae"), Hex.decode("a1cc1e20c901acfb027a94ad10b6fa99dc7a02c1bd84f90daf1fa0ff70b488be"), Hex.decode("4cb6817f7deebf6c2aedcf2e63a5ecc0d55f1d618d618cbcb28afc4e069b175f"), Hex.decode("26204319d8d0f05c334dffb507e8b5b312742eb8f15207dd26f550ae93c561bc"), Hex.decode("3a9847f9af67ad9862e2b2af4fac55e8e3f529e228008f20ec33d043aa7d084a"), Hex.decode("d0a20f35588d9b62305a858532c469ee267f05d6e917685c9e8e1056968b1873"), Hex.decode("7fb1f1b151335b327178093f5eb317d362bc9ffd2beedc4f3362363f09a3b13f") };
byte[][] txReceiptTrie = new byte[][] { Hex.decode("f90125a05802347050ee7eb82ee28da18e7287caf2985bf145d0de695d5d25011551034cb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0"), Hex.decode("f901cda0b19582b990127716840fe6a539aeb7a51dfcd47f5f3d96bb2ef2a42137da95ffb9010000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000080000000001000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000f8a7f8a5a0a042fb7f4792e7920e9299ae7c5f149851dcbb0b6a9cad8db228c7999bbe92bde1a07d945ac917fabecae7ffaeb906ed643a7772886cd62d1b802af7d9f64aec768cb86000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000002e516d523445777337676136464e474e783255546b4b6e776b424c4565437939484669764b36505a736751624b634d0000"), Hex.decode("f90125a07029ef5a462bc8cef74c121c5cafb91321deb35cf1c820596554c0f2c260799cb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0"), Hex.decode("f901cda0fe619299a305035b16de39e83ec4916dca94f4e65e0e505f4ab9dbc66b7f267bb9010000000000000000000000000000000000000000000000014000080000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f8a7f8a5a0a0664db2873ad38208295809cb226ad6c383cf1aab3e0b5f6a22edfa2fd81d4ae1a07d945ac917fabecae7ffaeb906ed643a7772886cd62d1b802af7d9f64aec768cb86000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000002e516d62586e4864647453553161634b723967597137623579776d45674366554a694d714a483752367275563854730000"), Hex.decode("f90125a07fc4895e5828d28c2bffb9249d4e242f8532c92b6a4b19e104b23474435078bfb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0"), Hex.decode("f901cda042fb5a4593141d2f8aa048fce39697da7d0c6fcf4153610e028fc35958644fd6b9010000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000008020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f8a7f8a5a0a0d48c7bfe57920d7df204377b4f5c1769649ec2222167078f3ba8600a63d751e1a07d945ac917fabecae7ffaeb906ed643a7772886cd62d1b802af7d9f64aec768cb86000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000002e516d6159746d3136484b34784251444d7158647233797845486b64466f385062594a644a456d44445773574d47470000"), Hex.decode("f90125a0a7be20b15fd3d518094472882187bb743e14814c6e355b4fc7d16b5a07e53954b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0"), Hex.decode("f901cda05da41af05a2f6b779c4f63cdd386652854b9eea126591fc257b95c6653292778b9010000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000f8a7f8a5a0a0e4b1a6b6e0528e01ab5fcd419fd4450929a809f21a873b3ed0b4a01be62e79e1a07d945ac917fabecae7ffaeb906ed643a7772886cd62d1b802af7d9f64aec768cb86000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000002e516d5766333974617867664a716636376a375a4b6e724e3754636f514d727336326262626b7a47564b70645858310000"), Hex.decode("f90125a0d83ab8b72ff2d3c2afa2097e6ba1ae8896b83e7a0233f2ee3d642b1304e834adb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0"), Hex.decode("f90125a065c19b0855d3f1ae85be4a37c731f3604ac990d2df029f83a5ed2963c7fa387eb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0"), Hex.decode("f90125a028432ea2812be6a31fec670ecaf4effdd017e1816026047adb6b20591084c6aeb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0"), Hex.decode("f90125a0a1cc1e20c901acfb027a94ad10b6fa99dc7a02c1bd84f90daf1fa0ff70b488beb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0"), Hex.decode("f90125a04cb6817f7deebf6c2aedcf2e63a5ecc0d55f1d618d618cbcb28afc4e069b175fb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0"), Hex.decode("f90125a026204319d8d0f05c334dffb507e8b5b312742eb8f15207dd26f550ae93c561bcb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0"), Hex.decode("f90125a03a9847f9af67ad9862e2b2af4fac55e8e3f529e228008f20ec33d043aa7d084ab9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0"), Hex.decode("f90125a0d0a20f35588d9b62305a858532c469ee267f05d6e917685c9e8e1056968b1873b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0"), Hex.decode("f90125a07fb1f1b151335b327178093f5eb317d362bc9ffd2beedc4f3362363f09a3b13fb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0") };
// check the receipts
for (int i = 0; i < 17; i++) {
AionTxReceipt receipt = blockSummary.getSummaries().get(i).getReceipt();
assertThat(receipt.isSuccessful()).isTrue();
assertThat(receipt.getEnergyUsed()).isEqualTo(energyPerTx[i]);
assertThat(receipt.getPostTxState()).isEqualTo(postTxStates[i]);
assertThat(receipt.getReceiptTrieEncoded()).isEqualTo(txReceiptTrie[i]);
}
byte[] stateRoot = blockSummary.getBlock().getStateRoot();
byte[] blockReceiptsRoot = blockSummary.getBlock().getReceiptsRoot();
// verify the consensus information.
String expectedRoot = "8d2ebcd33aae15e660d1bbc305d9e292341d445287294ce6eb53ef803a82951c";
String expectedReceiptsRoot = "81b1fe0467ae46709932e99917122c33b39788e92aac4e05e429b1030f25a5a8";
assertThat(stateRoot).isEqualTo(Hex.decode(expectedRoot));
assertThat(blockReceiptsRoot).isEqualTo(Hex.decode(expectedReceiptsRoot));
// checking repository state and total difficulty
assertThat(blockchain.getRepository().getRoot()).isEqualTo(Hex.decode(expectedRoot));
assertThat(blockchain.getTotalDifficulty()).isEqualTo(expectedTotalDifficultyAfterImport);
}
use of org.aion.zero.impl.blockchain.StandaloneBlockchain.Builder in project aion by aionnetwork.
the class MasteryConsensusTest method testImportBlock720107.
/**
* Tests importing block <a href="https://mastery.aion.network/#/block/720107">720107</a>.
*/
@Test
public void testImportBlock720107() {
TransactionTypeRule.disallowAVMContractTransaction();
// data extracted from the mastery network
Block block720105 = BlockUtil.newBlockFromRlp(Hex.decode("f90791f9078d01830afce9a0c268b39a9a9dfaa981601f3402d0a075da6c8869c6b5c0d4e41b91173658e535a0a08fc457b39b03c30dc71bdb89a4d0409dd4fa42f6539a5c3ee4054af9b71f23a08d70cb7a343d01820f803bdf9546549a00f1e3624fc3a6d01dafdec35c59e479a045b0cfc220ceec5b7c1c62c4d4193d38e4eba48e8815729ce75f9c0ab0e4c1c0a045b0cfc220ceec5b7c1c62c4d4193d38e4eba48e8815729ce75f9c0ab0e4c1c0b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000900000000000000000000000000000003da041494f4e000000000000000000000000000000000000000000000000000000008083e4ec01845bc5fc8ca0a8ac3f1baf5bdb8f116ee24bc634219d2bb5f8d2ee800481825f0113dc51ec56b9058000a142c05473b5dda6a52828817508f9f6fa10ed0d420eecf478e612402f61ea2523f0d0ce980e9aa57cfd2301b5d8b37e7948b9b392e457faf20d60fd6f98b79b6b0cd5c0cc62bbcb1fbe4e9b1c73ff72bb06bb376ddec702a586c4a5df0a58bf395c590c967bd28b7403fbb6a607e46c540745de06608ada2558d1ac2d371458ad212e16532ecfc4a337415bf15a53fccf01b537a7e76b5c4e1e3edfaf78480f8f327ea279ee0eca4ea91884a9892c01f46747b7a482555b051b09f496f7fc0414b7a233be1b8a2a4cdd92892cdb409e9999e26e5e1a47e53ba10f06fadd6d0f77472f314e6455f121e8cfb89f4d2aed8533338f5ebd17ad1c6224e7467f13a4c3faa84e2b8ed00606c0e6b3535571ac1e207e345693a66bcae232c4e80c44eec87b0e3e0bbaeb1f2575c5dffd25b28c9ce8d31bba590015076d905ec0b933f4cb800ad61983270063573a467fe5cc042f7618678f8346eac4f97d6ebb7c7a012839147a9b54d8aeaecc32a0d2a962452628bbc9ae0a782cbd84d32ccc0cdf720ab0ab0de85671177a466a10f509a91df2b253e2c8ff6415aee4d4a825d66b880f6c8a1625bdcab524ebc73c7cba4e2885f89d34fa82dc056e5ca9b2b682d5be3d51302fe53078b58658fb77e110cfc512978d54f6f7eb3b321b6ef68b492026f8624224782ff891540e99374ee530d813e5924514bd56468b408461f8beb8a849a5712e8b63e6da55f9eff4ed00b40653eed785e337c7a372544f0acb4d9b47b39ff7a98a27e38d181c235dad2011068044662b9b0edcdc7f9c3f16434736ba9c8d5db3a22e1fa3c480548820dc2b9ac41d960315ad19908df1256f3e5105a3e9a6df10f34b9413997a3e259d97dabcbc5c28e65d800023511ae1a5771b3e4f79ac03ed04f77e373f7791bc01f75067f27cbd24da629e718775692ad5fd262338d7f912a4d2a2d09a6529cb7cedbd4c42ffe90c991c9fc4178ebe193e4e3201ba1f50aac3b6fd1779f7320a1b9953c5d0995bda4d06e7c54a53a555df63af966ca1bf706fa74094a523831f03fb3402953aa4398ab34283461eb567e2a526cdad345b753d645b3325b95360a1e343d81e4c70497f7db203f7edcfede12e809b66710b07b83ec51744573cf88222eda3107de8e4c96d952e52873212d187484a79c8a9161fe3f5aaf7b0b2b06d452390693d3016af7faa2c232088e79f39a42a2f7515473b41bd14b72669aaf71fa702c2fbf6b8b49f50a30ff791ff76f0a5fb32a079fde014f122e86da4ba16fc3a5c2290cd898f327f6d7b9ad01385492dd69439cb3c253a21e0fe71a303f4a6dcc86158c3c3c0595e28a97b653d7bc7974ab83a2fa6a9fe651053eceba1c36b991cc3d5863d562f245ba198b6f69d2522c28289e525d416f3ef348b2a4d20b68e12dbe7b520ac719dabf33ec77ac4bf38b12eb81d34f94b6c2e632ab621034c236a5f2b46b72f32cb924083b5237d5e90029a5420f0156f60db34ab06a07da884237a567a47c11c29150b29f2904ba27e6331894ec93ac50069f080651931696a8111d3304bd0121cf7758e0ce4327dd7ede51c1faa1911bc512e32d8fd95cb2294f69c627777533d04b37268fda8c46828c3e10b9c966f2d01ed7363ff653dcbb650d636f2b6b09d5f48f0a1b7e3470615e7f1fe0656ab04ab67982825e4d80922d253addb37303b756d0963e6482e93af8b1aa4313d1fe1d1190523f2384dd6044b43ce1621800ad929c6508533366af835b1b6cc4c10628fe1dfa363611b4f92510c6385bf5bab2df4d72f0ac4dfa53588b3e737ecc44d852606ec05dabcb1cab418216b99386315b06294dd712e079f59fdd33c3ac0561a9c8d4e2fdc4aafba30fd552085d6413804e3a35e311d0092c3ab96bc1f6a70b52c743abcc8865a3674798c33ad72177c77dd57f662b93c24c1b62e75810b96c1b93bddf27d8c445a3823ecc372065685c17caace3b3ff3c0"));
BigInteger tdAt720105 = BigInteger.valueOf(45_970_838);
Block block720106 = BlockUtil.newBlockFromRlp(Hex.decode("f90791f9078d01830afceaa0a249182923b537b2ecba3dbbee78903cd06d908ad6bf81b1261301df294fda24a0a0b1a9886e79fb139cc2b3138795d86a750ce07a7d0d63610dd5acc2d52bc2a6a0c04b27bb03c33c8ccb3ddf87b2b9714c20d95e091994caa10e16ed191eeff7f1a045b0cfc220ceec5b7c1c62c4d4193d38e4eba48e8815729ce75f9c0ab0e4c1c0a045b0cfc220ceec5b7c1c62c4d4193d38e4eba48e8815729ce75f9c0ab0e4c1c0b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000900000000000000000000000000000003ea041494f4e000000000000000000000000000000000000000000000000000000008083e4b2c6845bc5fc95a085483817c039c40008c156f7f3fa5179730a7de8dec5dd5ab858d71c9f74f8ffb9058000509719a4e4c272135461202349a9ed19c2ddf4a94d3263ffd8d914c248961c69605b82dd3589f07271eb20035e7de3ef6fc26e3f7a2e0fd7b4af544620d7786e970d98eca2553a22b22d6b7c156c98f677f32425f3ed7f17a43078d08725dc790064276e3fc3f6be2406bacb03598f2fc97cbac235ef1be670f439cb1c2ad029317d0e321f23dcd58abfb7f2d2a853a86fdf11085a483ef10d3289454c244817d3390eb339ec895d6e85ea26d826f404e474dd179652f45ecfec6a9e59e9f21766ed6db57b0ccb8fc2d0229b057fbfc152cfaf926fc84e1e6d67cc077430b3d4c0e4353038dd377dd9aa0e7a265e7297fe363e2de1bb26b13366cccb43e9c17421b4d2fd5e0a4805069ba75656a9427fe4739bd803cef89c1eecfce9f3094e9c5d27f1c9cc8b764757671e10efc87b48fb59c4145c83fcc889e2f9361a21364b8b9f94666541bfd26e359591729ffa5f83b2d0163855516838b8d1a0b33f060154cbafd43f0897fc484e1ab2e964a59247d2a74e940a1eb7dadbb775403c442417ff63305663b090198b1f228bad2bb5e70d3ceb66f457bab3463ce707143b877f3a6163907f55a4a9e6b3e53f1313785968f163ad3e8d046a4ca1d4e7994d62699d1ef921d60e65f2957d5a560a5bbe6105b1a07c0cef9715259bfa11f299119cdcef3e09cfe8452589627173db62d516eba7f86e91230b4b77ac1e5f8cb951a9b3dab47acd0b31071acdf632e13a01f722f98fef5386be950f53e62222769da596fc5b9203afae7b480b067df717cc380079debee73392b27b4d02e059f5fe25ab52576fd72776db148cd2a9b06361f81f95061d7c94e94bf720b4363bf32c3c45d3c37cb0ac1321f0c7907d423f7e785d7609d2794bc7a96125936e1a90033573d6c681712102744aaec36f59e91271884a1735d29752f2391ce16ef9489a367ca6f98354faf7848fe287e3af6bd061b48d3397f233b3903a2dc72d473d00568d1e4149379c3b661d7c853668659dc0bd3f58be069b73effbd0a221595d0b97d1ba9d6dfa88aaaffd7229d4559df00d84dbb6e4a92eff11df4e555226eef271329756f71247cb566d8cd7362c1253f5a48dd8688ce103baddcc32314320b32985a50ae32d988b5038f9662d40d97d23de1b4b0baf78544165dd36759a8ca8ea8d6f2ccf954beae5a690ad7aac634f2b6582dc638cb6ff10474a5df8ec460f8e2f8da04de90a2694ab66ddf55a3e05d49da0eea1a64478a54e0b74d89be4f0ef1ecc6398143b99a5a8135eb67f2559168ec7e148775e001f37f40f0f563abc3cab527c2ac8461d318f2779326578b3e7168ab9b24aef1d067cca1c96015eb5856ba64d760e6812cd228a16b2eb7e50ef261b11828f26e34c0814e62e554da1e32ba5600e21b487929052f644ea5bf37c3c182aa95e80bc78776c719ff55a932fb7399a12aa3d93a1674cff72dfa8ffacfd3a7b8c83dbed749a8850ab21b101c0608b916099b26f2f7a0927ce8065b8d5537741921837276ce77b8e72fde4987795032598d901bbf5e7240ffa5d7cea6cd580f61a742db0428eadf906e1f9033d65daba805767e5a12226409fcebb13afcacc617330d906ad36fa3df3da0d622986d1e73b7e9a7e34b47da854175feea35a2444375e668f1a7273b25fc51f085680e21cca32c953b69c48fca256644d6219297a32f9309f0f22a7c9fd6f42320775183c2d426bb3d40428b277de8704baaa978c06694f201423220e5626ac6d0d6574a46d1de9dec9c5d7c59f7f708a3d737550b43a29f87f1772070e38ce3f52ec0a2aaeb47413eb5cd46ab24372cb580eb4a5c86c7a7e7e733ecc24493cbfc164edb330b19e05c88af721a50a3b73c83c30f63ab0f3dba539b878470671c2ed06fc0e8b3b5d1516765131e798753439b3615691ef1e484bacda3cda61877aeb49bfc9afdd2aa1bc58cbfb412977048dae4a46a01afaae3a3ab535fe8b1ac0"));
BigInteger tdAt720106 = BigInteger.valueOf(45_970_900);
byte[] trieDataAt720106 = Hex.decode(hexEncodedStateData("masteryStateAt720106.txt"));
// block to import
Block block720107 = BlockUtil.newBlockFromRlp(Hex.decode("f90814f9079001830afceba054b69e67645239926bd599c339475d4ece0156eecb8eb36ac69666fb9889c0d3a0a08fc457b39b03c30dc71bdb89a4d0409dd4fa42f6539a5c3ee4054af9b71f23a001edb39b08a9d8b1b9d5dc3a0b56725c11ebbfcb1bfe8f4fad4d26a91e8f58aaa0e6f3bbde6a6fecfd6208becee49dd07b9743cc956a9545effb514d3c40167075a0280e14a353e99b6b9c8df8f4c7f26a8ce336b5e8434e8b4382439d9222fb3015b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000900000000000000000000000000000003ea041494f4e0000000000000000000000000000000000000000000000000000000083035f4883e4ebf2845bc5fc9fa09e356161efa658aaa2311f4dfdf369a1b75bd14e972f70b33fdf17b4e531f8dfb90580002268a3591824cb7922d053c52b90f9a58a4da1e8161428536a1f52337f9ac60a24c01919b41603c4e4a0ed2024255c72c3802430434157c0b214ac2b9f4777cf5a30a8a54c7b55d6a13fe44d3a40769d7ac6ed24bc95370d228f9899330f61f3e5390dc2e786e7c9634266861b1b22c1960533727e335c6e237499a2d472e280b5c8d111228a1854746319d372a03718518e12e632509c737818867e719fb1b830acff3829334d8a5762fff3f384f201894303fc6ac2a97c04f03c0e6ea232d49b92f551c9127561c929757261f90103231324ecd165664799bd79052bcae7fbb5768b657efe8c6c13c4ce4cfb6ef4c996083fae8e6306133570f85661ebcad6efeb09ad7144d004a95a25aab1fd6765baa953c0efae9ee66af7b3e7920b7f2a5115e2e93a8f32801e4d3ad8fdf4d6f8635fc40ba722a49c1239d967e47717c1f223d0e6f48738f9d4387e93843295173c25a190642dcf2018dd88493d65f900b8ab47596540a85b40310294ea9795f2f1ab1bb1b93e35fe71ac1975df26e2435a835f5cfda5bcb17f74f214b24fd108cc63c03365f229c28a0e0e95e47f6db0e41a9b0f69d37d0ba8b4cec6930592a942bb0affaf8de612bec4ecca81cef622d08888de66bfe0792a4fee4295539dc7f23565ec296755e45cb5edd4f3f91571e806f913edc181bb9154411f63e51732ac86107611b872b80f5cee5247de887095ef341d6c5aaa97db1a02c07b58360a8a2d5369d4331df49e8324844f448c229cade19b761b884b026b522c3e2f29e732d3e5b1f987e0f67f32b40e4f80974f645332d547da34346a3fbac5334596e7aa2789754c3e36429032192731d4f912c17607611b2a600e3cc95b75a51603283f613f04ee71318a4514f1310e125937d4eb54c503e8c3ea1315ceec2cb146ea62d65212889614d094976193dc2f6233a364ee7b79d4baa13d22a4f138925624a7acf00254c45377bca8cddc76109b00814bc397fa709b7a7a6e0773388b08b9d2ad3e8bf107d057d01eacab687ef19b119f31510daa1ce96a5a4a018d6812d170b465e43a3b140f9a36d8f9db7ff200fb0761dac021910bb3384c7c124bff00738583c3edc6e206e4a7e13a93545d1a1aa44f930e2733960877fbfbfe15595b29eb74ed027ff76923bd70fc53dba936bbb89c3e8e52b8b23cdc2b7879e86649a76204e9b95fbbd5d55da6dbadb8c6091974a0687a347fae04184615abcd4a011c1395a5f1ae15bcc4787a3357c82449b983fb5d75051057f47a73a7628ff1253243bf7b90d3ff01d73fde25667be91ca54d09b5bd406d3a15f9b9edacc6b751172cbbf79c09c49cbf9a8a1c36e913abe73c0ea33ad44f05ac80a9dc3bf8c770753277c7c77155582b8a7b469112a4a6057b28c3b5b53a1e5ebfe7111927c7ede8de231a05ef6876745a24dc91b41d7925f88e3825a2e60cff2ee3bfd9adb4a181e95b0159b50f607c05d8d233bbad053293494b683f6577b239182e8b823d52782c1d0278080a6d66a390c5ae1e126c483cf5d50c690efbad289d0596276d9cbbad2733f2e10ee0edd556f9db29393fde05d2ab4efc06497dda25780985628bdb439488e438701416a5910652aab9cc693844dc0f0a1465238cab742b3d0cf375d8d642993630924f01233973d69303f644881939cf3b1dd3391b5cdfa520aa2e364706bff82a3aa14938f1c0567ba5afaf137b5355e618ad75d14f61209205b659231927b2857a64660da22923bf17d243300902137ac38bc8ee26cdbd9994296a28fc6a23ba4032038a08fa55de6b946b8c2463fa097639f296e42b83223de22dee1ee3a9264268f276ca8f821aca9f9b4ae82e51910d58ef191f411869eab01e4e22e178f8fbb7acb36b123c298de7d5461f8c3afbf454b61318e136a90a7e61840ffed8c1d4fde8ed7d8be11f3b3a6af0c87750f631ea14391d8034f27d83ea2b112511f59c6ace2c213efdf4f87ff87d2f8000808800057859c9e4ca49834c4b408800000002540be40001b860fb9e504d2cec93c26fb2beb06c906d2f352668d73fe8d5ac02c6f96fa9be3d8cb15dcd4b277ab4eb7e174767f0e8e53e19ccc42b2c39e890bc3895495656fe5729a225b53f1924b30c04e7ca6d20fce5a355c2b97deb0c1dca0759c0bfeebe0e"));
BigInteger expectedTdAt720107 = BigInteger.valueOf(45_970_962);
// setup blockchain with state before imported block
StandaloneBlockchain blockchain = new Builder().withState(block720105, tdAt720105, block720106, tdAt720106, trieDataAt720106).withAvmEnabled().build().bc;
// import block
Pair<ImportResult, AionBlockSummary> results = blockchain.tryToConnectAndFetchSummary(block720107);
assertThat(results.getLeft()).isEqualTo(ImportResult.IMPORTED_BEST);
// collect the consensus information from the block & receipt.
AionBlockSummary blockSummary = results.getRight();
// check the receipt
AionTxReceipt receipt = blockSummary.getSummaries().get(0).getReceipt();
assertThat(receipt.isSuccessful()).isTrue();
assertThat(receipt.getEnergyUsed()).isEqualTo(221000);
assertThat(receipt.getPostTxState()).isEqualTo(Hex.decode("3253da83f7b2c60daaedebf754442b21ba0d6a348a2e8d726e82624976d97341"));
byte[] stateRoot = blockSummary.getBlock().getStateRoot();
byte[] blockReceiptsRoot = blockSummary.getBlock().getReceiptsRoot();
byte[] receiptTrieEncoded = receipt.getReceiptTrieEncoded();
// verify the consensus information.
String expectedRoot = "01edb39b08a9d8b1b9d5dc3a0b56725c11ebbfcb1bfe8f4fad4d26a91e8f58aa";
String expectedReceiptsRoot = "280e14a353e99b6b9c8df8f4c7f26a8ce336b5e8434e8b4382439d9222fb3015";
String expectedReceiptsTrie = "F90125A03253DA83F7B2C60DAAEDEBF754442B21BA0D6A348A2E8D726E82624976D97341B9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000C0";
assertThat(stateRoot).isEqualTo(Hex.decode(expectedRoot));
assertThat(blockReceiptsRoot).isEqualTo(Hex.decode(expectedReceiptsRoot));
assertThat(receiptTrieEncoded).isEqualTo(Hex.decode(expectedReceiptsTrie));
// checking repository state and total difficulty
assertThat(blockchain.getRepository().getRoot()).isEqualTo(Hex.decode(expectedRoot));
assertThat(blockchain.getTotalDifficulty()).isEqualTo(expectedTdAt720107);
}
Aggregations