|
| 1 | +export const invalidData = { |
| 2 | + source: 'https://github.com/ethereum/tests/blob/develop/RLPTests/invalidRLPTest.json', |
| 3 | + version: 'ethereum/tests v7.0.1', |
| 4 | + commit: '7693364be004b4a00f0efd8c1cba77becf2f87e0', |
| 5 | + date: '2019-06-23', |
| 6 | + tests: { |
| 7 | + int32Overflow: { |
| 8 | + in: 'INVALID', |
| 9 | + out: '0xbf0f000000000000021111', |
| 10 | + }, |
| 11 | + |
| 12 | + int32Overflow2: { |
| 13 | + in: 'INVALID', |
| 14 | + out: '0xff0f000000000000021111', |
| 15 | + }, |
| 16 | + |
| 17 | + wrongSizeList: { |
| 18 | + in: 'INVALID', |
| 19 | + out: '0xf80180', |
| 20 | + }, |
| 21 | + |
| 22 | + wrongSizeList2: { |
| 23 | + in: 'INVALID', |
| 24 | + out: '0xf80100', |
| 25 | + }, |
| 26 | + |
| 27 | + incorrectLengthInArray: { |
| 28 | + in: 'INVALID', |
| 29 | + out: '0xb9002100dc2b275d0f74e8a53e6f4ec61b27f24278820be3f82ea2110e582081b0565df0', |
| 30 | + }, |
| 31 | + |
| 32 | + randomRLP: { |
| 33 | + in: 'INVALID', |
| 34 | + out: '0xf861f83eb9002100dc2b275d0f74e8a53e6f4ec61b27f24278820be3f82ea2110e582081b0565df027b90015002d5ef8325ae4d034df55d4b58d0dfba64d61ddd17be00000b9001a00dae30907045a2f66fa36f2bb8aa9029cbb0b8a7b3b5c435ab331', |
| 35 | + }, |
| 36 | + |
| 37 | + bytesShouldBeSingleByte00: { |
| 38 | + in: 'INVALID', |
| 39 | + out: '0x8100', |
| 40 | + }, |
| 41 | + |
| 42 | + bytesShouldBeSingleByte01: { |
| 43 | + in: 'INVALID', |
| 44 | + out: '0x8101', |
| 45 | + }, |
| 46 | + |
| 47 | + bytesShouldBeSingleByte7F: { |
| 48 | + in: 'INVALID', |
| 49 | + out: '0x817F', |
| 50 | + }, |
| 51 | + |
| 52 | + leadingZerosInLongLengthArray1: { |
| 53 | + in: 'INVALID', |
| 54 | + out: 'b90040000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f', |
| 55 | + }, |
| 56 | + |
| 57 | + leadingZerosInLongLengthArray2: { |
| 58 | + in: 'INVALID', |
| 59 | + out: 'b800', |
| 60 | + }, |
| 61 | + |
| 62 | + leadingZerosInLongLengthList1: { |
| 63 | + in: 'INVALID', |
| 64 | + out: 'fb00000040000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f', |
| 65 | + }, |
| 66 | + |
| 67 | + leadingZerosInLongLengthList2: { |
| 68 | + in: 'INVALID', |
| 69 | + out: 'f800', |
| 70 | + }, |
| 71 | + |
| 72 | + nonOptimalLongLengthArray1: { |
| 73 | + in: 'INVALID', |
| 74 | + out: 'b81000112233445566778899aabbccddeeff', |
| 75 | + }, |
| 76 | + |
| 77 | + nonOptimalLongLengthArray2: { |
| 78 | + in: 'INVALID', |
| 79 | + out: 'b801ff', |
| 80 | + }, |
| 81 | + |
| 82 | + nonOptimalLongLengthList1: { |
| 83 | + in: 'INVALID', |
| 84 | + out: 'f810000102030405060708090a0b0c0d0e0f', |
| 85 | + }, |
| 86 | + |
| 87 | + nonOptimalLongLengthList2: { |
| 88 | + in: 'INVALID', |
| 89 | + out: 'f803112233', |
| 90 | + }, |
| 91 | + |
| 92 | + lessThanShortLengthArray1: { |
| 93 | + in: 'INVALID', |
| 94 | + out: '81', |
| 95 | + }, |
| 96 | + |
| 97 | + lessThanShortLengthArray2: { |
| 98 | + in: 'INVALID', |
| 99 | + out: 'a0000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e', |
| 100 | + }, |
| 101 | + |
| 102 | + lessThanShortLengthList1: { |
| 103 | + in: 'INVALID', |
| 104 | + out: 'c5010203', |
| 105 | + }, |
| 106 | + |
| 107 | + lessThanShortLengthList2: { |
| 108 | + in: 'INVALID', |
| 109 | + out: 'e201020304050607', |
| 110 | + }, |
| 111 | + |
| 112 | + lessThanLongLengthArray1: { |
| 113 | + in: 'INVALID', |
| 114 | + out: 'ba010000aabbccddeeff', |
| 115 | + }, |
| 116 | + |
| 117 | + lessThanLongLengthArray2: { |
| 118 | + in: 'INVALID', |
| 119 | + out: 'b840ffeeddccbbaa99887766554433221100', |
| 120 | + }, |
| 121 | + |
| 122 | + lessThanLongLengthList1: { |
| 123 | + in: 'INVALID', |
| 124 | + out: 'f90180', |
| 125 | + }, |
| 126 | + |
| 127 | + lessThanLongLengthList2: { |
| 128 | + in: 'INVALID', |
| 129 | + out: 'ffffffffffffffffff0001020304050607', |
| 130 | + }, |
| 131 | + }, |
| 132 | +} |
0 commit comments