Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't work with parity 1.4.9 after ETC DieHard Fork #44

Closed
gagarin55 opened this issue Jan 13, 2017 · 9 comments
Closed

Don't work with parity 1.4.9 after ETC DieHard Fork #44

gagarin55 opened this issue Jan 13, 2017 · 9 comments

Comments

@gagarin55
Copy link

After 3000000 ETC block I started receive errors:

 at [Source: org.apache.http.conn.EofSensorInputStream@649b30e; line: 1, column: 3478] (through reference chain: org.web3j.protocol.core.methods.response.EthBlock$TransactionObject["v"]) (through reference chain: org.web3j.protocol.core.methods.response.EthBlock["result"]->org.web3j.protocol.core.methods.response.EthBlock$Block["transactions"])
2017-01-13 20:24:36 [error] s.BlockchainListener - Error fetching next 3000002 block: Error: com.fasterxml.jackson.databind.JsonMappingException: BigInteger out of byte range
 at [Source: org.apache.http.conn.EofSensorInputStream@211c3094; line: 1, column: 3478] (through reference chain: org.web3j.protocol.core.methods.response.EthBlock$TransactionObject["v"]) (through reference chain: org.web3j.protocol.core.methods.response.EthBlock["result"]->org.web3j.protocol.core.methods.response.EthBlock$Block["transactions"])
2017-01-13 20:24:37 [error] s.BlockchainListener - Error fetching next 3000002 block: Error: com.fasterxml.jackson.databind.JsonMappingException: BigInteger out of byte range
 at [Source: org.apache.http.conn.EofSensorInputStream@59da3a9; line: 1, column: 3478] (through reference chain: org.web3j.protocol.core.methods.response.EthBlock$TransactionObject["v"]) (through reference chain: org.web3j.protocol.core.methods.response.EthBlock["result"]->org.web3j.protocol.core.methods.response.EthBlock$Block["transactions"])
2017-01-13 20:24:38 [error] s.BlockchainListener - Error fetching next 3000002 block: Error: com.fasterxml.jackson.databind.JsonMappingException: BigInteger out of byte range
 at [Source: org.apache.http.conn.EofSensorInputStream@dc91bb4; line: 1, column: 3478] (through reference chain: org.web3j.protocol.core.methods.response.EthBlock$TransactionObject["v"]) (through reference chain: org.web3j.protocol.core.methods.response.EthBlock["result"]->org.web3j.protocol.core.methods.response.EthBlock$Block["transactions"])
2017-01-13 20:24:39 [error] s.BlockchainListener - Error fetching next 3000002 block: Error: com.fasterxml.jackson.databind.JsonMappingException: BigInteger out of byte range
 at [Source: org.apache.http.conn.EofSensorInputStream@347d7475; line: 1, column: 3478] (through reference chain: org.web3j.protocol.core.methods.response.EthBlock$TransactionObject["v"]) (through reference chain: org.web3j.protocol.core.methods.response.EthBlock["result"]->org.web3j.protocol.core.methods.response.EthBlock$Block["transactions"])
2017-01-13 20:24:40 [error] s.BlockchainListener - Error fetching next 3000002 block: Error: com.fasterxml.jackson.databind.JsonMappingException: BigInteger out of byte range
 at [Source: org.apache.http.conn.EofSensorInputStream@263600c8; line: 1, column: 3478] (through reference chain: org.web3j.protocol.core.methods.response.EthBlock$TransactionObject["v"]) (through reference chain: org.web3j.protocol.core.methods.response.EthBlock["result"]->org.web3j.protocol.core.methods.response.EthBlock$Block["transactions"])
2017-01-13 20:24:41 [error] s.BlockchainListener - Error fetching next 3000002 block: Error: com.fasterxml.jackson.databind.JsonMappingException: BigInteger out of byte range
 at [Source: org.apache.http.conn.EofSensorInputStream@156614aa; line: 1, column: 3478] (through reference chain: org.web3j.protocol.core.methods.response.EthBlock$TransactionObject["v"]) (through reference chain: org.web3j.protocol.core.methods.response.EthBlock["result"]->org.web3j.protocol.core.methods.response.EthBlock$Block["transactions"])
2017-01-13 20:24:42 [error] s.BlockchainListener - Error fetching next 3000002 block: Error: com.fasterxml.jackson.databind.JsonMappingException: BigInteger out of byte range
 at [Source: org.apache.http.conn.EofSensorInputStream@745f91bf; line: 1, column: 3478] (through reference chain: org.web3j.protocol.core.methods.response.EthBlock$TransactionObject["v"]) (through reference chain: org.web3j.protocol.core.methods.response.EthBlock["result"]->org.web3j.protocol.core.methods.response.EthBlock$Block["transactions"])

Before Die Hard Fork all was OK.

@conor10
Copy link
Contributor

conor10 commented Jan 13, 2017

What value are you seeing in the JSON-RPC transaction receipt object in the "v" field? This should be a byte value encoded as a string (Geth) or byte (Parity). I'm thinking ETC is providing a non-byte value here.

See ethereum/EIPs#155 for further information. A dump of the JSON-RPC objects is fine.

In order to display the HTTP requests/response, please see https://web3j.github.io/web3j/trouble.html#i-want-to-see-details-of-the-json-rpc-requests-and-responses

@gagarin55
Copy link
Author

$ curl -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["0x2DC6C2", true],"id":1}' localhost:8545 {"jsonrpc":"2.0","result":{"author":"0x9eab4b0fc468a7f5d46228bf5a76cb52370d068d","difficulty":"0xc14a6e61547","extraData":"0x6e616e6f706f6f6c2e6f7267","gasLimit":"0x47a574","gasUsed":"0x14820","hash":"0x54987c61af2ac33b0555803bcbf438f5fffdd40324d9309b320e4880b84fdff8","logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","miner":"0x9eab4b0fc468a7f5d46228bf5a76cb52370d068d","mixHash":"0x911cdb7504946adc74f187e15ff446738a2a02e5f00a33f2bb39d372ffecff1f","nonce":"0x4105770001955b4a","number":"0x2dc6c2","parentHash":"0x44c93d248d452b0054024d00c17df1ef0ca284b6f72e345619d2e235fb528539","receiptsRoot":"0x3703afaf6f6957cce81ae62a6924c2f4241317cb74bc159de69ee45bd45ba842","sealFields":["0x911cdb7504946adc74f187e15ff446738a2a02e5f00a33f2bb39d372ffecff1f","0x4105770001955b4a"],"sha3Uncles":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","size":"0x3e1","stateRoot":"0x1d076fe1125333325c3026767bcd5a01408cde50ee07fa5ec73f700bf705b215","timestamp":"0x58792b53","totalDifficulty":"0x2a336700cfe352745","transactions":[{"blockHash":"0x54987c61af2ac33b0555803bcbf438f5fffdd40324d9309b320e4880b84fdff8","blockNumber":"0x2dc6c2","creates":null,"from":"0xdf7d7e053933b5cc24372f878c90e62dadad5d42","gas":"0x15f90","gasPrice":"0x4a817c800","hash":"0xee5d18d0a82ccab33c6dd25304ae5f12394b96a8218befdf889cb227beecdc1d","input":"0x","networkId":null,"nonce":"0x61741","publicKey":"0x8fc6373a74ad959fd61d10f0b35e9e0524de025cb9a2bf8e0ff60ccb3f5c5e4d566ebe3c159ad572c260719fc203d820598ee5d9c9fa8ae14ecc8d5a2d8a2af1","r":"0x2f9d35996f15c2c16a1b10cb8452720b6c7b26d545c65ec43e353e646dd78427","raw":"0xf870830617418504a817c80083015f909498ca72b2d180f6ff1a765c606c494d2828c5bf49880e99ea7fdfa0c0ac801ca02f9d35996f15c2c16a1b10cb8452720b6c7b26d545c65ec43e353e646dd78427a056bf5cb1e62570a98c932202ca54e9e9d7d584f33be61b4f9faa14a8479bed72","s":"0x56bf5cb1e62570a98c932202ca54e9e9d7d584f33be61b4f9faa14a8479bed72","standardV":"0x1","to":"0x98ca72b2d180f6ff1a765c606c494d2828c5bf49","transactionIndex":"0x0","v":"0x1c","value":"0xe99ea7fdfa0c0ac"},{"blockHash":"0x54987c61af2ac33b0555803bcbf438f5fffdd40324d9309b320e4880b84fdff8","blockNumber":"0x2dc6c2","creates":null,"from":"0xdf7d7e053933b5cc24372f878c90e62dadad5d42","gas":"0x15f90","gasPrice":"0x4a817c800","hash":"0x500c13796b90c151aebe434f0c7c940373774ef3aac5fb3b2a3e6bfd2841ce72","input":"0x","networkId":61,"nonce":"0x61742","publicKey":"0x8fc6373a74ad959fd61d10f0b35e9e0524de025cb9a2bf8e0ff60ccb3f5c5e4d566ebe3c159ad572c260719fc203d820598ee5d9c9fa8ae14ecc8d5a2d8a2af1","r":"0x21355678b1aa704f6ad4706fb8647f5125beadd1d84c6f9cf37dda1b62f24b1a","raw":"0xf871830617428504a817c80083015f90940123286bd94beecd40905321f5c3202c7628d685880ecab7b2bae2c27080819ea021355678b1aa704f6ad4706fb8647f5125beadd1d84c6f9cf37dda1b62f24b1aa06b4a64fd29bb6e54a2c5107e8be42ac039a8ffb631e16e7bcbd15cdfc0015ee2","s":"0x6b4a64fd29bb6e54a2c5107e8be42ac039a8ffb631e16e7bcbd15cdfc0015ee2","standardV":"0x1","to":"0x0123286bd94beecd40905321f5c3202c7628d685","transactionIndex":"0x1","v":"0x9e","value":"0xecab7b2bae2c270"},{"blockHash":"0x54987c61af2ac33b0555803bcbf438f5fffdd40324d9309b320e4880b84fdff8","blockNumber":"0x2dc6c2","creates":null,"from":"0xdf7d7e053933b5cc24372f878c90e62dadad5d42","gas":"0x15f90","gasPrice":"0x4a817c800","hash":"0xabc9eae129d6b37242dc94aed87477401f222f97e2baffab06a8f7af29aaa95e","input":"0x","networkId":61,"nonce":"0x61743","publicKey":"0x8fc6373a74ad959fd61d10f0b35e9e0524de025cb9a2bf8e0ff60ccb3f5c5e4d566ebe3c159ad572c260719fc203d820598ee5d9c9fa8ae14ecc8d5a2d8a2af1","r":"0x56ddda4245fe2977bb442bffea16ec1904a092f6b5bc8c41df6f5003a73ecb72","raw":"0xf871830617438504a817c80083015f90942941f5c7d43fa6abdd68f81f833a84c93b664c68880dfdcee88298ce9480819ea056ddda4245fe2977bb442bffea16ec1904a092f6b5bc8c41df6f5003a73ecb72a068f4e30df3628871a06e8c2bd7a1176bad2d97dfdbc18fdd21ab2b1c88a7c426","s":"0x68f4e30df3628871a06e8c2bd7a1176bad2d97dfdbc18fdd21ab2b1c88a7c426","standardV":"0x1","to":"0x2941f5c7d43fa6abdd68f81f833a84c93b664c68","transactionIndex":"0x2","v":"0x9e","value":"0xdfdcee88298ce94"},{"blockHash":"0x54987c61af2ac33b0555803bcbf438f5fffdd40324d9309b320e4880b84fdff8","blockNumber":"0x2dc6c2","creates":null,"from":"0xdf7d7e053933b5cc24372f878c90e62dadad5d42","gas":"0x15f90","gasPrice":"0x4a817c800","hash":"0x469c71a51dd10782ce715f2eb7dc8a0ac972888deb96b18ea60eb57032d8e2a0","input":"0x","networkId":61,"nonce":"0x61744","publicKey":"0x8fc6373a74ad959fd61d10f0b35e9e0524de025cb9a2bf8e0ff60ccb3f5c5e4d566ebe3c159ad572c260719fc203d820598ee5d9c9fa8ae14ecc8d5a2d8a2af1","r":"0x6a7916b9747e4316a5215640dca3a8da155864a96eb497d7a4a6a59a102c5091","raw":"0xf871830617448504a817c80083015f90942dcccb1d7e99ae0b6cffd02858f76a4e51533546880e0d934a7b23275080819da06a7916b9747e4316a5215640dca3a8da155864a96eb497d7a4a6a59a102c5091a072c41bb9cd19f5367949750c40e240de8ab02e57fbe786114494ed2e71ad1b0c","s":"0x72c41bb9cd19f5367949750c40e240de8ab02e57fbe786114494ed2e71ad1b0c","standardV":"0x0","to":"0x2dcccb1d7e99ae0b6cffd02858f76a4e51533546","transactionIndex":"0x3","v":"0x9d","value":"0xe0d934a7b232750"}],"transactionsRoot":"0x9dff469710900a3429acf25df920fed4878cc223e379d966d51157a7bdb08ba4","uncles":[]},"id":1}

@gagarin55
Copy link
Author

gagarin55 commented Jan 14, 2017

I use Parity 1.4.9

ChainID for Ethereum Classic is 0x3d

I suppose it may be issue with java byte type which you used for v field in tx

@conor10
Copy link
Contributor

conor10 commented Jan 14, 2017

Yes, but it looks like some of those chain id's are coming through with 0x9d which is a somewhat larger value.

@gagarin55
Copy link
Author

So, how we can solve it? Otherwise web3j is incompatible with Ethereum Classic :(

@splix
Copy link

splix commented Jan 14, 2017

@conor10 (0x9d - 35) / 2 == 61, so 0x9d is a correct v value for unprotected tx on chain with id 61

@splix
Copy link

splix commented Jan 14, 2017

@conor10 see here ethereum/EIPs#155

If block.number >= FORK_BLKNUM and v = CHAIN_ID * 2 + 35 or v = CHAIN_ID * 2 + 36

With CHAIN_ID equal to 61 you have:

v = 61 * 2 + 35 == 157 == 0x9d

@conor10
Copy link
Contributor

conor10 commented Jan 15, 2017

Yes - I'll change to an int for the next release.

@conor10
Copy link
Contributor

conor10 commented Jan 16, 2017

Fixed in v1.1.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants