question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Couldn't decode uint256 from ABI: 0x

See original GitHub issue

Hi,

We are trying to switch from Constellation to Tessera, using Quorum 2.1.1 and Tessera 0.7.3

When we create two vanilla instances and deploy a smart contract, as well as try to read from it, we get the following error (using web3 1.0.0 beta 35):

Couldn't decode uint256 from ABI: 0x

Log output Geth 1:

INFO [11-28|21:46:14] sending private tx                       data=608060405234801561001057600080fd5b50604051602080610114833981016040525160005560e1806100336000396000f30060806040526004361060525763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416632a1afcd98114605757806360fe47b114607b5780636d4ce63c146092575b600080fd5b348015606257600080fd5b50606960a4565b60408051918252519081900360200190f35b348015608657600080fd5b50609060043560aa565b005b348015609d57600080fd5b50606960af565b60005481565b600055565b600054905600a165627a7a723058207e05db9c7d1616bf0732f2f5e0ff9bac6ceeebe389aed5faaf1e9799c111ea0200290000000000000000000000000000000000000000000000000000000000000001 privatefrom= privatefor="[05T/CfN1a7aDhMGwXS8VZfz5qHWodjBr7nreL6X3xWg=]"
INFO [11-28|21:46:14] sent private tx                          data=a944d655f6b2d00f9d5ffea5861a98cf1282f3e896fc991a080ace534260fd9ab733e6721c20661b46e659fe6e6cbebcba46d1a125e996a324de822bbf15bb18                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         privatefrom= privatefor="[05T/CfN1a7aDhMGwXS8VZfz5qHWodjBr7nreL6X3xWg=]"
INFO [11-28|21:46:14] Submitted contract creation              fullhash=0x32e56f907cede3a25ffbe6e68dd44b51fa59282e5dbb97927ba4e91d8a6c75f8 to=0x591EB970d1ed240660A90B3C0768dA2A73e0B621
INFO [11-28|21:46:14] QUORUM-CHECKPOINT                        name=TX-CREATED tx=0x32e56f907cede3a25ffbe6e68dd44b51fa59282e5dbb97927ba4e91d8a6c75f8 to=0x591EB970d1ed240660A90B3C0768dA2A73e0B621
INFO [11-28|21:46:15] Committed                                address=0x86efab55E79F1BB79610A97A960f68458dabADB7 hash=2bd8d4…55a50a number=251
INFO [11-28|21:46:15] Successfully sealed new block            number=251 hash=2bd8d4…55a50a

Geth 2:

INFO [11-28|21:46:16] Imported new chain segment               blocks=1   txs=1 mgas=0.000 elapsed=1.233ms   mgasps=0.000 number=252 hash=e1df0e…49b221

Tessera 1:

21:41:45.943 [main] INFO  o.s.c.s.ClassPathXmlApplicationContext - Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@4ff8d125: startup date [Wed Nov 28 21:41:45 GMT 2018]; root of context hierarchy
21:41:46.053 [main] INFO  o.s.b.f.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [tessera-spring.xml]
21:41:46.425 [main] INFO  o.s.b.f.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [tessera-core-spring.xml]
21:41:48.138 [main] INFO  o.s.b.f.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [tessera-grpc-spring.xml]
21:41:48.231 [main] INFO  o.s.b.f.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [tessera-jaxrs-spring.xml]
21:41:48.930 [main] INFO  o.s.b.f.a.AutowiredAnnotationBeanPostProcessor - JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
21:41:50.139 [main] INFO  o.s.o.j.LocalContainerEntityManagerFactoryBean - Building JPA container EntityManagerFactory for persistence unit 'tessera'
21:41:50.926 [main] INFO  eclipselink.logging.all - EclipseLink, version: Eclipse Persistence Services - 2.7.3.v20180807-4be1041
21:41:52.027 [main] INFO  eclipselink.logging.connection - tessera login successful
21:41:52.146 [main] WARN  eclipselink.logging.ddl - Removing UNIQUE constraint definition from [ENCRYPTED_TRANSACTION.HASH] because it is also a primary key.
21:41:52.225 [main] INFO  o.s.o.j.LocalContainerEntityManagerFactoryBean - Initialized JPA EntityManagerFactory for persistence unit 'tessera'
21:41:55.124 [main] INFO  c.q.t.config.keys.KeyEncryptorImpl - Decrypting private key
21:41:56.827 [main] INFO  c.q.t.config.keys.KeyEncryptorImpl - Decrypted private key
21:41:57.431 [main] INFO  c.q.t.t.TesseraScheduledExecutor - Starting PartyInfoPoller
21:41:57.433 [main] INFO  c.q.t.t.TesseraScheduledExecutor - Started PartyInfoPoller
21:41:57.530 [main] INFO  c.q.t.t.TesseraScheduledExecutor - Starting SyncPoller
21:41:57.530 [main] INFO  c.q.t.t.TesseraScheduledExecutor - Started SyncPoller
21:41:58.327 [main] INFO  c.q.tessera.server.UnixSocketServer - Starting the Unix Domain Socket server
21:42:03.430 [main] INFO  o.g.grizzly.servlet.WebappContext - Starting application [WebappContext] ...
21:42:05.120 [jersey-server-managed-async-executor-0] INFO  c.quorum.tessera.api.UpCheckResource - GET upcheck
21:42:05.430 [main] INFO  o.g.grizzly.servlet.WebappContext - [WebappContext] Servlet [org.glassfish.jersey.servlet.ServletContainer] registered for url pattern(s) [[/*]].
21:42:05.431 [main] INFO  o.g.grizzly.servlet.WebappContext - Application [WebappContext] is ready to service requests.  Root: [].
21:42:05.431 [main] INFO  c.quorum.tessera.server.JerseyServer - Starting http://0.0.0.0:9000
21:42:06.435 [main] INFO  o.g.g.http.server.NetworkListener - Started listener bound to [0.0.0.0:9000]
21:42:06.523 [main] INFO  o.g.grizzly.http.server.HttpServer - [HttpServer] Started.
21:42:06.523 [main] INFO  c.quorum.tessera.server.JerseyServer - Started http://0.0.0.0:9000
21:42:06.524 [main] INFO  c.quorum.tessera.server.JerseyServer - WADL http://0.0.0.0:9000/application.wadl
21:42:07.736 [grizzly-http-server-0] INFO  c.q.tessera.api.filter.LoggingFilter - Enter Request : POST : /resend
21:42:08.425 [grizzly-http-server-0] INFO  c.q.t.t.EncryptedTransactionDAOImpl - Fetching all EncryptedTransaction database rows
21:42:09.340 [grizzly-http-server-0] INFO  c.q.tessera.api.filter.LoggingFilter - Exit Request : POST : /resend
21:42:09.341 [grizzly-http-server-0] INFO  c.q.tessera.api.filter.LoggingFilter - Response for resend : 200 OK
21:45:18.259 [grizzly-http-server-1] INFO  c.q.tessera.api.filter.LoggingFilter - Enter Request : POST : /resend
21:45:18.320 [grizzly-http-server-1] INFO  c.q.t.t.EncryptedTransactionDAOImpl - Fetching all EncryptedTransaction database rows
21:45:18.321 [grizzly-http-server-1] INFO  c.q.tessera.api.filter.LoggingFilter - Exit Request : POST : /resend
21:45:18.321 [grizzly-http-server-1] INFO  c.q.tessera.api.filter.LoggingFilter - Response for resend : 200 OK
21:45:19.563 [grizzly-http-server-1] INFO  c.q.tessera.api.filter.LoggingFilter - Enter Request : POST : /resend
21:45:19.565 [grizzly-http-server-1] INFO  c.q.t.t.EncryptedTransactionDAOImpl - Fetching all EncryptedTransaction database rows
21:45:19.566 [grizzly-http-server-1] INFO  c.q.tessera.api.filter.LoggingFilter - Exit Request : POST : /resend
21:45:19.566 [grizzly-http-server-1] INFO  c.q.tessera.api.filter.LoggingFilter - Response for resend : 200 OK
21:46:14.120 [jersey-server-managed-async-executor-0] INFO  c.q.tessera.api.filter.LoggingFilter - Enter Request : POST : /sendraw
21:46:14.431 [jersey-server-managed-async-executor-0] INFO  c.q.t.t.EncryptedTransactionDAOImpl - Stored transaction qUTWVfay0A+dX/6lhhqYzxKC8+iW/JkaCArOU0Jg/Zq3M+ZyHCBmG0bmWf5ubL68ukbRoSXplqMk3oIrvxW7GA==
21:46:14.530 [jersey-server-managed-async-executor-0] INFO  c.q.tessera.api.filter.LoggingFilter - Exit Request : POST : /sendraw
21:46:14.530 [jersey-server-managed-async-executor-0] INFO  c.q.tessera.api.filter.LoggingFilter - Response for sendraw : 200 OK

Tessera 2:

21:44:56.718 [main] INFO  o.s.c.s.ClassPathXmlApplicationContext - Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@4ff8d125: startup date [Wed Nov 28 21:44:56 GMT 2018]; root of context hierarchy
21:44:56.823 [main] INFO  o.s.b.f.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [tessera-spring.xml]
21:44:57.139 [main] INFO  o.s.b.f.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [tessera-core-spring.xml]
21:44:59.220 [main] INFO  o.s.b.f.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [tessera-grpc-spring.xml]
21:44:59.318 [main] INFO  o.s.b.f.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [tessera-jaxrs-spring.xml]
21:45:00.234 [main] INFO  o.s.b.f.a.AutowiredAnnotationBeanPostProcessor - JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
21:45:01.515 [main] INFO  o.s.o.j.LocalContainerEntityManagerFactoryBean - Building JPA container EntityManagerFactory for persistence unit 'tessera'
21:45:02.229 [main] INFO  eclipselink.logging.all - EclipseLink, version: Eclipse Persistence Services - 2.7.3.v20180807-4be1041
21:45:03.430 [main] INFO  eclipselink.logging.connection - tessera login successful
21:45:03.733 [main] INFO  o.s.o.j.LocalContainerEntityManagerFactoryBean - Initialized JPA EntityManagerFactory for persistence unit 'tessera'
21:45:07.017 [main] INFO  c.q.t.config.keys.KeyEncryptorImpl - Decrypting private key
21:45:09.223 [main] INFO  c.q.t.config.keys.KeyEncryptorImpl - Decrypted private key
21:45:10.014 [main] INFO  c.q.t.t.TesseraScheduledExecutor - Starting PartyInfoPoller
21:45:10.016 [main] INFO  c.q.t.t.TesseraScheduledExecutor - Started PartyInfoPoller
21:45:10.118 [main] INFO  c.q.t.t.TesseraScheduledExecutor - Starting SyncPoller
21:45:10.118 [main] INFO  c.q.t.t.TesseraScheduledExecutor - Started SyncPoller
21:45:11.123 [main] INFO  c.q.tessera.server.UnixSocketServer - Starting the Unix Domain Socket server
21:45:18.221 [main] INFO  o.g.grizzly.servlet.WebappContext - Starting application [WebappContext] ...
21:45:19.525 [jersey-server-managed-async-executor-0] INFO  c.quorum.tessera.api.UpCheckResource - GET upcheck
21:45:20.125 [main] INFO  o.g.grizzly.servlet.WebappContext - [WebappContext] Servlet [org.glassfish.jersey.servlet.ServletContainer] registered for url pattern(s) [[/*]].
21:45:20.126 [main] INFO  o.g.grizzly.servlet.WebappContext - Application [WebappContext] is ready to service requests.  Root: [].
21:45:20.126 [main] INFO  c.quorum.tessera.server.JerseyServer - Starting http://0.0.0.0:9000
21:45:20.728 [main] INFO  o.g.g.http.server.NetworkListener - Started listener bound to [0.0.0.0:9000]
21:45:20.731 [main] INFO  o.g.grizzly.http.server.HttpServer - [HttpServer] Started.
21:45:20.731 [main] INFO  c.quorum.tessera.server.JerseyServer - Started http://0.0.0.0:9000
21:45:20.731 [main] INFO  c.quorum.tessera.server.JerseyServer - WADL http://0.0.0.0:9000/application.wadl
21:45:21.422 [grizzly-http-server-0] INFO  c.q.tessera.api.filter.LoggingFilter - Enter Request : POST : /resend
21:45:21.825 [grizzly-http-server-0] INFO  c.q.t.t.EncryptedTransactionDAOImpl - Fetching all EncryptedTransaction database rows
21:45:22.730 [grizzly-http-server-0] INFO  c.q.tessera.api.filter.LoggingFilter - Exit Request : POST : /resend
21:45:22.731 [grizzly-http-server-0] INFO  c.q.tessera.api.filter.LoggingFilter - Response for resend : 200 OK
21:46:15.495 [jersey-server-managed-async-executor-0] INFO  c.q.tessera.api.filter.LoggingFilter - Enter Request : GET : /receiveraw
21:46:15.514 [jersey-server-managed-async-executor-0] INFO  c.q.t.t.TransactionManagerImpl - Lookup transaction qUTWVfay0A+dX/6lhhqYzxKC8+iW/JkaCArOU0Jg/Zq3M+ZyHCBmG0bmWf5ubL68ukbRoSXplqMk3oIrvxW7GA==
21:46:15.515 [jersey-server-managed-async-executor-0] INFO  c.q.t.t.EncryptedTransactionDAOImpl - Retrieving payload with hash qUTWVfay0A+dX/6lhhqYzxKC8+iW/JkaCArOU0Jg/Zq3M+ZyHCBmG0bmWf5ubL68ukbRoSXplqMk3oIrvxW7GA==
21:46:15.626 [jersey-server-managed-async-executor-0] INFO  c.q.t.a.e.TransactionNotFoundExceptionMapper - Message with hash qUTWVfay0A+dX/6lhhqYzxKC8+iW/JkaCArOU0Jg/Zq3M+ZyHCBmG0bmWf5ubL68ukbRoSXplqMk3oIrvxW7GA== was not found
21:46:15.626 [jersey-server-managed-async-executor-0] INFO  c.q.tessera.api.filter.LoggingFilter - Exit Request : GET : /receiveraw
21:46:15.626 [jersey-server-managed-async-executor-0] INFO  c.q.tessera.api.filter.LoggingFilter - Response for receiveraw : 404 Not Found

Tessera config for both instances (peers contains public URL back to itself, config has TLS disabled but runs behind Nginx):

    {
        "useWhiteList": false,
        "jdbc": {
            "username": "sa",
            "password": "",
            "url": "jdbc:h2:/qdata/db;MODE=Oracle;TRACE_LEVEL_SYSTEM_OUT=0"
        },
        "server": {
            "port": 9000,
            "hostName": "http://0.0.0.0",
            "sslConfig": {
                "tls": "OFF"
            }
        },
        "peer": [{"url":"https://<removed>/"},{"url":"https://<removed>/"},{"url":"https://<removed>/"}],
        "keys": {
            "passwordFile": "<removed>",
            "keyData": [
                {
                    "privateKeyPath": "<removed>",
                    "publicKeyPath": "<removed>"
                }
            ]
        },
        "alwaysSendTo": [],
        "unixSocketFile": "/qdata/tm.ipc"
    }

I can reproduce the issue using the following script:

const solc = require('solc') // use solc 0.4.24
const Web3 = require('web3') // use web3 1.0.0-beta.35

const accountPassword = "<paste>"

// define inputs
const rpc_1 = "<paste>"
const web3_1 = new Web3(new Web3.providers.HttpProvider(rpc_1))

const pubkey_2 = "<paste>"
const rpc_2 = "<paste>"
const web3_2 = new Web3(new Web3.providers.HttpProvider(rpc_2))

// compile contract
const sourceCode = `
pragma solidity ^0.4.0;


contract SimpleStorage {


    uint public storedData;
    
    function SimpleStorage(uint initVal) public {
        storedData = initVal;
    }
    
    function set(uint x) public {
        storedData = x;
    }
    
    function get() public constant returns (uint retVal) {
        return storedData;
    }
}
`
const compiled = solc.compile(sourceCode, 1)
const root = compiled.contracts[Object.keys(compiled.contracts)[0]]
const abi = JSON.parse(root.interface)

web3_1.eth.getAccounts()
  .then((accounts) => {
    if (!accounts) {
      return Promise.reject(new Error('No account found'))
    }
    return Promise.resolve(accounts[0])
  })
  .then((account) => {
    return web3_1.eth.personal.unlockAccount(account, accountPassword).then(() => {
      return Promise.resolve(account)
    })
  })
  .then((unlockedAccount) => {
    const contract = new web3_1.eth.Contract(abi)
    // Deploy contract and send transaction
    return contract.deploy({
      data: '0x' + root.bytecode,
      arguments: [1]
    }).send({
      from: unlockedAccount,
      gas: 300000,
      privateFor: [ pubkey_2 ]
    })
  })
  // Make sure deployed contract has an address
  .then((newContractInstance) => {
    const address = newContractInstance.options.address
    const contract = new web3_2.eth.Contract(abi, address)
    return contract.methods.get().call().then((value) => {
      console.log("Successfully read value", value)
    })
  })
  .catch((err) => {
    console.error(err)
  })

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
prd-foxcommented, Nov 29, 2018

It looks like its an issue with hostname configuration.

If you want to use 0.0.0.0 then there is an extra config option for that found here

The current config above will:

  1. bind to http://0.0.0.0:9000
  2. advertise its public key with the same address

Since I guess all nodes have that same config (achieved by having the nodes on separate machines) then they all associate the public keys with the same url as themselves, and so don’t send out the transaction.

Here is a sample piece of config to fix the issue:

{
    "port": 9000,
    "hostName": "http://<public-ip-address>",
    "bindingAddress": "http://0.0.0.0:9000",
    "sslConfig": {
        "tls": "OFF"
    }
}

where <public-ip-address> is the IP address to call of the reverse proxy (like the peers list). Since we have had this question a few times before, I’m going to update the Wiki to be more explicit, since it is a bit vague right now.

Let me know how you get on with the above.

I’m also interested in how you get on with TLS termination. The code sets both server and client SSL options together, so having the server run on HTTP, but making outbound requests on HTTPS shouldn’t be possible right now - do you intercept the outbound requests? I would love to know!

1reaction
prd-foxcommented, Nov 28, 2018

Thanks for the detailed issue! I’ll take a look at reproducing the issue and let you know how I get on.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: Couldn't decode uint256 from ABI: 0x · Issue #1629
Error: Couldn't decode uint256 from ABI: 0x #1629 ... In my node server, I created abi.js and copied the abi from etherscan.
Read more >
Couldn't decode uint256 from ABI: 0x
I'm trying to get all Transfer events from an account of an ERC721 token, I'm currently struggling with the following error. I googled...
Read more >
web3.js Error: Couldn't decode uint8 from ABI: 0x
I am trying to use a smart contract instance for a deployed contract in node.js. I am getting the error below and don't...
Read more >
ethereum/web3.js - Gitter
and I get an error Couldn't decode uint256 from ABI: 0x ... Hi - is there a way to get the ABI of...
Read more >
Programming Project - Phase 1 - Ethereum Smart Contract ...
... i try to interact with dapp on local host thru ganache network, when i use place bet function , i get this...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found