1

I apologise for being slightly off-topic here, but I'm clueless at this moment and struggling with finding an answer for some time now...

I have daemons forked from original CryptoNote source code and I have no additional ForkNote methods available in daemon. I am running both coin daemon and walletd on some remote machine and trying to use JSON RPC commands to read the blockchain and store blocks and transactions into database. However, when I send the getTransactions() request to walletd I always see transactions as an empty array in response for literally every single block in the blockchain. For example (running command on remote machine):

curl -X POST http://127.0.0.1:8070/json_rpc -H 'Cache-Control: no-cache' -H 'Content-Type: application/json' -d '{"method":"getTransactions","params":{"firstBlockIndex":90007,"blockCount":1}}'

responds with:

{
  "jsonrpc": "2.0",
  "result": {
    "items": [
      {
        "blockHash": "732b37e627eb81f2a49ed340b2e2619bf5fd1fa37ad60d82845bb7388b1cfe23",
        "transactions": []
      }
    ]
  }
}

Needless to say, there ARE transactions in that block, which, to make it even more interesting, I can prove by sending the same request to same daemons running on my own computer:

{
  "jsonrpc": "2.0",
  "result": {
    "items": [
      {
        "blockHash": "732b37e627eb81f2a49ed340b2e2619bf5fd1fa37ad60d82845bb7388b1cfe23",
        "transactions": [
          {
            "amount": 9057237,
            "blockIndex": 90007,
            "extra": "013d8a389f5430ebc07622fa2bc456caa05b7e9be8610b4b41ee0569821b4e21aa0208000000000a4f2dbc",
            "fee": 0,
            "isBase": true,
            "paymentId": "",
            "state": 0,
            "timestamp": 1518193326,
            "transactionHash": "30de50736c4f8c5bf77430090fa7928cc886865cc83a3ce59bc723026a0c2a2d",
            "transfers": [
              {
                "address": "XP1JoKorjgT7ifXK3M5yLEQH2nRtNWvUUwc1YHpeeD4ZESb1kD7wLLAKYExoEcAbDjnA6vxZQ5zzKohfNhnxHmr2qaL6HTUEq",
                "amount": 9057237,
                "type": 0
              }
            ],
            "unlockTime": 90021
          }
        ]
      }
    ]
  }
}

I wonder why is this happening? I am running both daemons on both machines in a same way, with same flags and ports defined. I'm sure that all ports are opened and I can actually verify that blockchain is in sync and has peers connected on remote machine by requesting getStatus():

curl -X POST http://127.0.0.1:8070/json_rpc -H 'Cache-Control: no-cache' -H 'Content-Type: application/json' -d '{"method":"getStatus","params":{}}'

response:

{
  "jsonrpc": "2.0",
  "result": {
    "blockCount": 94061,
    "knownBlockCount": 94061,
    "lastBlockHash": "5ec49e2a4201f1c3cad8fc79a2abec8a794d8fd24136962cb83af8781ed584dc",
    "peerCount": 23
  }
}

similar to the response from my local machine...

Am I misunderstanding the basic usage of all this? Is there any other way to use JSON RPC besides walletd JSON RPC API to get transactions info? How is it even possible that those 2 machines, with fully synced blockchain respond with different data for the same block?

2
  • Note that there were no transactions in block 90007 apart from the coinbase transaction.
    – assylias
    Commented Feb 14, 2018 at 17:12
  • 1
    Ah, sorry if I wasn’t clear enough, but this is not Monero blockchain, it’s some other coin based on original Cryponote repo... Since this is daemon related problem I thought someone here might know something about this technical-related issue...
    – errata
    Commented Feb 14, 2018 at 17:26

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.