GithubHelp home page GithubHelp logo

Comments (9)

conor10 avatar conor10 commented on May 14, 2024 1

Fixed in v1.1.2.

from web3j.

conor10 avatar conor10 commented on May 14, 2024

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

from web3j.

gagarin55 avatar gagarin55 commented on May 14, 2024

$ 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}

from web3j.

gagarin55 avatar gagarin55 commented on May 14, 2024

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

from web3j.

conor10 avatar conor10 commented on May 14, 2024

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

from web3j.

gagarin55 avatar gagarin55 commented on May 14, 2024

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

from web3j.

splix avatar splix commented on May 14, 2024

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

from web3j.

splix avatar splix commented on May 14, 2024

@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

from web3j.

conor10 avatar conor10 commented on May 14, 2024

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

from web3j.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.