Skip to content

Commit

Permalink
to allow the tests to work, we must put back the blocks.bin and no lo…
Browse files Browse the repository at this point in the history
…nger generate it during the build. adding the nonce to the blocks.json file should solve this problem

Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
  • Loading branch information
matkt committed Mar 6, 2020
1 parent e165240 commit 6327f5a
Show file tree
Hide file tree
Showing 45 changed files with 75 additions and 86 deletions.
3 changes: 2 additions & 1 deletion ethereum/api/build.gradle
Expand Up @@ -134,4 +134,5 @@ task generateTestBlockchain() {
}
}
}
test.dependsOn(generateTestBlockchain)
// TODO must be reactivated when we can generate the block.bin file during build
//test.dependsOn(generateTestBlockchain)
Expand Up @@ -162,15 +162,13 @@ private void checkResponse(final ObjectNode responseBody, final ObjectNode expec
final ObjectMapper mapper = new ObjectMapper();
mapper.configure(INDENT_OUTPUT, true);
assertThat(
sanitizeResultResponse(
mapper
.writerWithDefaultPrettyPrinter()
.writeValueAsString(mapper.readTree(actualResult))))
mapper
.writerWithDefaultPrettyPrinter()
.writeValueAsString(mapper.readTree(actualResult)))
.isEqualTo(
sanitizeResultResponse(
mapper
.writerWithDefaultPrettyPrinter()
.writeValueAsString(mapper.readTree(expectedResult))));
mapper
.writerWithDefaultPrettyPrinter()
.writeValueAsString(mapper.readTree(expectedResult)));
}

// Check error
Expand All @@ -181,8 +179,4 @@ private void checkResponse(final ObjectNode responseBody, final ObjectNode expec
assertThat(actualError).isEqualToIgnoringWhitespace(expectedError);
}
}

protected String sanitizeResultResponse(final String resultResponse) {
return resultResponse;
}
}
Expand Up @@ -51,10 +51,4 @@ public static Object[][] specs() {
"trace/specs/replay-trace-transaction/all",
"trace/specs/replay-trace-transaction/halt-cases");
}

@Override
protected String sanitizeResultResponse(final String resultResponse) {
// just check blockHash presence and not value
return resultResponse.replaceAll("\"blockHash\" : \".+?\"", "\"blockHash\" : \"\"");
}
}
Binary file not shown.
Expand Up @@ -19,7 +19,7 @@
"to": "0x00e0000000000000000000000000000000000000",
"value": "0x0"
},
"blockHash": "0x1d1fe689ad2b6a11234261d2cd55b0bf0c4ce26afaf4a1b955c804662e3bd6c7",
"blockHash": "0xac0fc3d6e82e2193529e5b08d3efe41d2a8621dd08680e5bf5c16a7fe23d4475",
"blockNumber": 16,
"error": "Bad jump destination",
"subtraces": 0,
Expand Down
Expand Up @@ -19,7 +19,7 @@
"to": "0x00c0000000000000000000000000000000000000",
"value": "0x0"
},
"blockHash": "0x1d1fe689ad2b6a11234261d2cd55b0bf0c4ce26afaf4a1b955c804662e3bd6c7",
"blockHash": "0xac0fc3d6e82e2193529e5b08d3efe41d2a8621dd08680e5bf5c16a7fe23d4475",
"blockNumber": 16,
"error": "Bad instruction",
"subtraces": 0,
Expand Down
Expand Up @@ -19,7 +19,7 @@
"to": "0x00d0000000000000000000000000000000000000",
"value": "0x0"
},
"blockHash": "0x1d1fe689ad2b6a11234261d2cd55b0bf0c4ce26afaf4a1b955c804662e3bd6c7",
"blockHash": "0xac0fc3d6e82e2193529e5b08d3efe41d2a8621dd08680e5bf5c16a7fe23d4475",
"blockNumber": 16,
"error": "Stack underflow",
"subtraces": 0,
Expand Down
Expand Up @@ -19,7 +19,7 @@
"to": "0x00f0000000000000000000000000000000000000",
"value": "0x0"
},
"blockHash": "0x427c4a40adabe2107257fd71a3e5bb65c032c11d5bb768ca2d17f5fef1dc4795",
"blockHash": "0x491c2e3e73c5c7ab48070ccd6ff3f8053c4b62963e34b3a1c3c77c0cd06c44ca",
"blockNumber": 17,
"result": {
"gasUsed": "0xf",
Expand Down
Expand Up @@ -19,7 +19,7 @@
"to": "0x0100000000000000000000000000000000000000",
"value": "0x0"
},
"blockHash": "0x755f18769450ede1ac4b5aa4280cb46088800fba355a7d73b495fc412728ad33",
"blockHash": "0x2ed8995e9c4b7c5748d639a7533d5e5d1d06d2e825539447362012977773b89e",
"blockNumber": 18,
"result": {
"gasUsed": "0x1e",
Expand Down
Expand Up @@ -19,7 +19,7 @@
"to": "0x0110000000000000000000000000000000000000",
"value": "0x0"
},
"blockHash": "0x755f18769450ede1ac4b5aa4280cb46088800fba355a7d73b495fc412728ad33",
"blockHash": "0x2ed8995e9c4b7c5748d639a7533d5e5d1d06d2e825539447362012977773b89e",
"blockNumber": 18,
"error": "Reverted",
"subtraces": 0,
Expand Down
Expand Up @@ -18,7 +18,7 @@
"init": "0x6004600c60003960046000f3600035ff",
"value": "0x0"
},
"blockHash": "0xd30c568a4eec375bfaf28c3c35b61dffcd6b68e540f98f7500017f2c8c3579e2",
"blockHash": "0x7e9a993adc6f043c0a9b6a385e6ed3fa370586c55823251b8fa7033cf89d414e",
"blockNumber": 19,
"result": {
"address": "0x8f0483125fcb9aaaefa9209d8e9d7b9c8b9fb90f",
Expand Down
Expand Up @@ -18,7 +18,7 @@
"init": "0x60006000600060006000732c2b9c9a4a25e24b174f26114e8926a9f2128fe45af2600060006000600060007300a00000000000000000000000000000000000005af2",
"value": "0x0"
},
"blockHash": "0xd30c568a4eec375bfaf28c3c35b61dffcd6b68e540f98f7500017f2c8c3579e2",
"blockHash": "0x7e9a993adc6f043c0a9b6a385e6ed3fa370586c55823251b8fa7033cf89d414e",
"blockNumber": 19,
"result": {
"address": "0x30753e4a8aad7f8597332e813735def5dd395028",
Expand All @@ -40,7 +40,7 @@
"to": "0x2c2b9c9a4a25e24b174f26114e8926a9f2128fe4",
"value": "0x0"
},
"blockHash": "0xd30c568a4eec375bfaf28c3c35b61dffcd6b68e540f98f7500017f2c8c3579e2",
"blockHash": "0x7e9a993adc6f043c0a9b6a385e6ed3fa370586c55823251b8fa7033cf89d414e",
"blockNumber": 19,
"result": {
"gasUsed": "0x138e",
Expand All @@ -60,7 +60,7 @@
"balance": "0x0",
"refundAddress": "0x0000000000000000000000000000000000000000"
},
"blockHash": "0xd30c568a4eec375bfaf28c3c35b61dffcd6b68e540f98f7500017f2c8c3579e2",
"blockHash": "0x7e9a993adc6f043c0a9b6a385e6ed3fa370586c55823251b8fa7033cf89d414e",
"blockNumber": 19,
"result": null,
"subtraces": 0,
Expand All @@ -81,7 +81,7 @@
"to": "0x00a0000000000000000000000000000000000000",
"value": "0x0"
},
"blockHash": "0xd30c568a4eec375bfaf28c3c35b61dffcd6b68e540f98f7500017f2c8c3579e2",
"blockHash": "0x7e9a993adc6f043c0a9b6a385e6ed3fa370586c55823251b8fa7033cf89d414e",
"blockNumber": 19,
"result": {
"gasUsed": "0x30b",
Expand Down
Expand Up @@ -18,7 +18,7 @@
"init": "0x60006000600060006000738f0483125fcb9aaaefa9209d8e9d7b9c8b9fb90f5af1600060006000600060007300a00000000000000000000000000000000000005af1",
"value": "0x0"
},
"blockHash": "0xd30c568a4eec375bfaf28c3c35b61dffcd6b68e540f98f7500017f2c8c3579e2",
"blockHash": "0x7e9a993adc6f043c0a9b6a385e6ed3fa370586c55823251b8fa7033cf89d414e",
"blockNumber": 19,
"result": {
"address": "0x9fbda871d559710256a2502a2517b794b482db40",
Expand All @@ -40,7 +40,7 @@
"to": "0x8f0483125fcb9aaaefa9209d8e9d7b9c8b9fb90f",
"value": "0x0"
},
"blockHash": "0xd30c568a4eec375bfaf28c3c35b61dffcd6b68e540f98f7500017f2c8c3579e2",
"blockHash": "0x7e9a993adc6f043c0a9b6a385e6ed3fa370586c55823251b8fa7033cf89d414e",
"blockNumber": 19,
"result": {
"gasUsed": "0x138e",
Expand All @@ -60,7 +60,7 @@
"balance": "0x0",
"refundAddress": "0x0000000000000000000000000000000000000000"
},
"blockHash": "0xd30c568a4eec375bfaf28c3c35b61dffcd6b68e540f98f7500017f2c8c3579e2",
"blockHash": "0x7e9a993adc6f043c0a9b6a385e6ed3fa370586c55823251b8fa7033cf89d414e",
"blockNumber": 19,
"result": null,
"subtraces": 0,
Expand All @@ -81,7 +81,7 @@
"to": "0x00a0000000000000000000000000000000000000",
"value": "0x0"
},
"blockHash": "0xd30c568a4eec375bfaf28c3c35b61dffcd6b68e540f98f7500017f2c8c3579e2",
"blockHash": "0x7e9a993adc6f043c0a9b6a385e6ed3fa370586c55823251b8fa7033cf89d414e",
"blockNumber": 19,
"result": {
"gasUsed": "0x30b",
Expand Down
Expand Up @@ -18,7 +18,7 @@
"init": "0x6004600c60003960046000f3600035ff",
"value": "0x0"
},
"blockHash": "0xd30c568a4eec375bfaf28c3c35b61dffcd6b68e540f98f7500017f2c8c3579e2",
"blockHash": "0x7e9a993adc6f043c0a9b6a385e6ed3fa370586c55823251b8fa7033cf89d414e",
"blockNumber": 19,
"result": {
"address": "0xfb88de099e13c3ed21f80a7a1e49f8caecf10df6",
Expand Down
Expand Up @@ -18,7 +18,7 @@
"init": "0x600060006000600073fb88de099e13c3ed21f80a7a1e49f8caecf10df65af460006000600060007300a00000000000000000000000000000000000005af4",
"value": "0x0"
},
"blockHash": "0xd30c568a4eec375bfaf28c3c35b61dffcd6b68e540f98f7500017f2c8c3579e2",
"blockHash": "0x7e9a993adc6f043c0a9b6a385e6ed3fa370586c55823251b8fa7033cf89d414e",
"blockNumber": 19,
"result": {
"address": "0xaa588d3737b611bafd7bd713445b314bd453a5c8",
Expand All @@ -40,7 +40,7 @@
"to": "0xfb88de099e13c3ed21f80a7a1e49f8caecf10df6",
"value": "0x0"
},
"blockHash": "0xd30c568a4eec375bfaf28c3c35b61dffcd6b68e540f98f7500017f2c8c3579e2",
"blockHash": "0x7e9a993adc6f043c0a9b6a385e6ed3fa370586c55823251b8fa7033cf89d414e",
"blockNumber": 19,
"result": {
"gasUsed": "0x138e",
Expand All @@ -60,7 +60,7 @@
"balance": "0x0",
"refundAddress": "0x0000000000000000000000000000000000000000"
},
"blockHash": "0xd30c568a4eec375bfaf28c3c35b61dffcd6b68e540f98f7500017f2c8c3579e2",
"blockHash": "0x7e9a993adc6f043c0a9b6a385e6ed3fa370586c55823251b8fa7033cf89d414e",
"blockNumber": 19,
"result": null,
"subtraces": 0,
Expand All @@ -81,7 +81,7 @@
"to": "0x00a0000000000000000000000000000000000000",
"value": "0x0"
},
"blockHash": "0xd30c568a4eec375bfaf28c3c35b61dffcd6b68e540f98f7500017f2c8c3579e2",
"blockHash": "0x7e9a993adc6f043c0a9b6a385e6ed3fa370586c55823251b8fa7033cf89d414e",
"blockNumber": 19,
"result": {
"gasUsed": "0x30b",
Expand Down
Expand Up @@ -18,7 +18,7 @@
"init": "0x6004600c60003960046000f3600035ff",
"value": "0x0"
},
"blockHash": "0xd30c568a4eec375bfaf28c3c35b61dffcd6b68e540f98f7500017f2c8c3579e2",
"blockHash": "0x7e9a993adc6f043c0a9b6a385e6ed3fa370586c55823251b8fa7033cf89d414e",
"blockNumber": 19,
"result": {
"address": "0x2c2b9c9a4a25e24b174f26114e8926a9f2128fe4",
Expand Down
Expand Up @@ -19,7 +19,7 @@
"to": "0x0140000000000000000000000000000000000000",
"value": "0x0"
},
"blockHash": "0x9f2f4a277db2eaf595c47cf00f185bd4bd810f8f905be721f6f284d067d3d5ae",
"blockHash": "0x2529164a7ea3786d0b8e4b98bd322d4ba41b5ee69da55fbd1eb0396d1b140484",
"blockNumber": 20,
"result": {
"gasUsed": "0x16b87",
Expand All @@ -39,7 +39,7 @@
"init": "0x600160015560015460025560ff60005360016000f3",
"value": "0x0"
},
"blockHash": "0x9f2f4a277db2eaf595c47cf00f185bd4bd810f8f905be721f6f284d067d3d5ae",
"blockHash": "0x2529164a7ea3786d0b8e4b98bd322d4ba41b5ee69da55fbd1eb0396d1b140484",
"blockNumber": 20,
"result": {
"address": "0x0deea5bd06fb86553643c1e94a2f5aac632b9ec9",
Expand Down
Expand Up @@ -19,7 +19,7 @@
"to": "0x0130000000000000000000000000000000000000",
"value": "0x0"
},
"blockHash": "0x9f2f4a277db2eaf595c47cf00f185bd4bd810f8f905be721f6f284d067d3d5ae",
"blockHash": "0x2529164a7ea3786d0b8e4b98bd322d4ba41b5ee69da55fbd1eb0396d1b140484",
"blockNumber": 20,
"result": {
"gasUsed": "0x16c46",
Expand All @@ -39,7 +39,7 @@
"init": "0x600160015560015460025561ffff6000526002601ef3",
"value": "0x0"
},
"blockHash": "0x9f2f4a277db2eaf595c47cf00f185bd4bd810f8f905be721f6f284d067d3d5ae",
"blockHash": "0x2529164a7ea3786d0b8e4b98bd322d4ba41b5ee69da55fbd1eb0396d1b140484",
"blockNumber": 20,
"result": {
"address": "0xaac0627078c038eb3d06e04b57d020fe212be97d",
Expand Down
Expand Up @@ -19,7 +19,7 @@
"to": "0x0040000000000000000000000000000000000000",
"value": "0x0"
},
"blockHash": "0x228f880baf3b7360c00899c85248979d1b14c9509a04bd9551f17a1a97ef6ce7",
"blockHash": "0x87a075063bbc369bfb2265e4e2a91427e78070a0bedc03daca3a0d3f0a8fc9d8",
"blockNumber": 21,
"result": {
"gasUsed": "0x2a29",
Expand All @@ -40,7 +40,7 @@
"to": "0x0010000000000000000000000000000000000000",
"value": "0x0"
},
"blockHash": "0x228f880baf3b7360c00899c85248979d1b14c9509a04bd9551f17a1a97ef6ce7",
"blockHash": "0x87a075063bbc369bfb2265e4e2a91427e78070a0bedc03daca3a0d3f0a8fc9d8",
"blockNumber": 21,
"result": {
"gasUsed": "0x2728",
Expand Down
Expand Up @@ -19,7 +19,7 @@
"to": "0x0040000000000000000000000000000000000000",
"value": "0x0"
},
"blockHash": "0x228f880baf3b7360c00899c85248979d1b14c9509a04bd9551f17a1a97ef6ce7",
"blockHash": "0x87a075063bbc369bfb2265e4e2a91427e78070a0bedc03daca3a0d3f0a8fc9d8",
"blockNumber": 21,
"result": {
"gasUsed": "0x19c1",
Expand All @@ -40,7 +40,7 @@
"to": "0x0010000000000000000000000000000000000000",
"value": "0x0"
},
"blockHash": "0x228f880baf3b7360c00899c85248979d1b14c9509a04bd9551f17a1a97ef6ce7",
"blockHash": "0x87a075063bbc369bfb2265e4e2a91427e78070a0bedc03daca3a0d3f0a8fc9d8",
"blockNumber": 21,
"result": {
"gasUsed": "0x16c0",
Expand Down
Expand Up @@ -19,7 +19,7 @@
"to": "0x0040000000000000000000000000000000000000",
"value": "0x0"
},
"blockHash": "0x228f880baf3b7360c00899c85248979d1b14c9509a04bd9551f17a1a97ef6ce7",
"blockHash": "0x87a075063bbc369bfb2265e4e2a91427e78070a0bedc03daca3a0d3f0a8fc9d8",
"blockNumber": 21,
"result": {
"gasUsed": "0x9f59",
Expand All @@ -40,7 +40,7 @@
"to": "0x0010000000000000000000000000000000000000",
"value": "0x0"
},
"blockHash": "0x228f880baf3b7360c00899c85248979d1b14c9509a04bd9551f17a1a97ef6ce7",
"blockHash": "0x87a075063bbc369bfb2265e4e2a91427e78070a0bedc03daca3a0d3f0a8fc9d8",
"blockNumber": 21,
"result": {
"gasUsed": "0x9c58",
Expand Down
Expand Up @@ -19,7 +19,7 @@
"to": "0x0040000000000000000000000000000000000000",
"value": "0x0"
},
"blockHash": "0x228f880baf3b7360c00899c85248979d1b14c9509a04bd9551f17a1a97ef6ce7",
"blockHash": "0x87a075063bbc369bfb2265e4e2a91427e78070a0bedc03daca3a0d3f0a8fc9d8",
"blockNumber": 21,
"result": {
"gasUsed": "0x19c1",
Expand All @@ -40,7 +40,7 @@
"to": "0x0010000000000000000000000000000000000000",
"value": "0x0"
},
"blockHash": "0x228f880baf3b7360c00899c85248979d1b14c9509a04bd9551f17a1a97ef6ce7",
"blockHash": "0x87a075063bbc369bfb2265e4e2a91427e78070a0bedc03daca3a0d3f0a8fc9d8",
"blockNumber": 21,
"result": {
"gasUsed": "0x16c0",
Expand Down
Expand Up @@ -19,7 +19,7 @@
"to": "0x0060000000000000000000000000000000000000",
"value": "0x0"
},
"blockHash": "0x55128a3f0b4b4c7736a080ab4b7dbd812ee5a6dc9c061364cb119a915f4da754",
"blockHash": "0x141693c1682c2d2768abb892b329cd9d7053d9b5cd9e3e39a01923c1049c5a13",
"blockNumber": 22,
"result": {
"gasUsed": "0x9f57",
Expand All @@ -40,7 +40,7 @@
"to": "0x0010000000000000000000000000000000000000",
"value": "0x0"
},
"blockHash": "0x55128a3f0b4b4c7736a080ab4b7dbd812ee5a6dc9c061364cb119a915f4da754",
"blockHash": "0x141693c1682c2d2768abb892b329cd9d7053d9b5cd9e3e39a01923c1049c5a13",
"blockNumber": 22,
"result": {
"gasUsed": "0x9c58",
Expand Down
Expand Up @@ -19,7 +19,7 @@
"to": "0x0060000000000000000000000000000000000000",
"value": "0x0"
},
"blockHash": "0x55128a3f0b4b4c7736a080ab4b7dbd812ee5a6dc9c061364cb119a915f4da754",
"blockHash": "0x141693c1682c2d2768abb892b329cd9d7053d9b5cd9e3e39a01923c1049c5a13",
"blockNumber": 22,
"result": {
"gasUsed": "0x2a27",
Expand All @@ -40,7 +40,7 @@
"to": "0x0010000000000000000000000000000000000000",
"value": "0x0"
},
"blockHash": "0x55128a3f0b4b4c7736a080ab4b7dbd812ee5a6dc9c061364cb119a915f4da754",
"blockHash": "0x141693c1682c2d2768abb892b329cd9d7053d9b5cd9e3e39a01923c1049c5a13",
"blockNumber": 22,
"result": {
"gasUsed": "0x2728",
Expand Down
Expand Up @@ -19,7 +19,7 @@
"to": "0x0060000000000000000000000000000000000000",
"value": "0x0"
},
"blockHash": "0x55128a3f0b4b4c7736a080ab4b7dbd812ee5a6dc9c061364cb119a915f4da754",
"blockHash": "0x141693c1682c2d2768abb892b329cd9d7053d9b5cd9e3e39a01923c1049c5a13",
"blockNumber": 22,
"result": {
"gasUsed": "0x19bf",
Expand All @@ -40,7 +40,7 @@
"to": "0x0010000000000000000000000000000000000000",
"value": "0x0"
},
"blockHash": "0x55128a3f0b4b4c7736a080ab4b7dbd812ee5a6dc9c061364cb119a915f4da754",
"blockHash": "0x141693c1682c2d2768abb892b329cd9d7053d9b5cd9e3e39a01923c1049c5a13",
"blockNumber": 22,
"result": {
"gasUsed": "0x16c0",
Expand Down

0 comments on commit 6327f5a

Please sign in to comment.