1

I have a Horizon server 0.12.3 and Stellar-Core 9.2.0rc6 running locally. When I send a create account operation using the root account as the source, the new account creates properly.

However, when I try to send a manage data operation, trying to save the data name "test" with value "hi", I get a tx_failed message, with a blank operations string:

{
  "type": "https://stellar.org/horizon-errors/transaction_failed",
  "title": "Transaction Failed",
  "status": 400,
  "detail": "The transaction failed when submitted to the stellar network. The `extras.result_codes` field on this response contains further details.  Descriptions of each code can be found at: https://www.stellar.org/developers/learn/concepts/list-of-operations.html",
  "extras": {
    "envelope_xdr": "AAAAAN5DEJn9DwVZhhctyWBlUcyVHQ7AXerKrur0kNQCKhM7AAAAZAAAAGcAAAABAAAAAAAAAAAAAAABAAAAAAAAAAoAAAAEdGVzdAAAAAEAAAACaGkAAAAAAAAAAAABAioTOwAAAEDBWxUL8cBuFoTRz7rYqoFxfGU4f6klq0Targt78zyvIq9j4uPHykfWnUwUjCZUHXTCIwT5dUkfMrHuHavsuj0I",
    "result_codes": {
      "transaction": "tx_failed",
      "operations": [
        ""
      ]
    },
    "result_xdr": "AAAAAAAAAGT/////AAAAAQAAAAAAAAAK/////wAAAAA="
  }
}

Error code is

QNetworkReply::NetworkError(ProtocolInvalidOperationError)

Now, when I connect to horizon-testnet.stellar.org instead of my local instance (localhost:8000) the same code I'm using works just fine. I'm using the C++ SDK.

Can someone shed some light on why the operations array returns a blank string? I don't see any logs in stellar-core itself about this transaction; if it was throwing an exception, it would be helpful.

I'm trying to save data using the new account, not the root account. The next sequence number I'm getting from the new account is 442381631488. Here's the dump of the account:

Query :

QUrl("http://localhost:8000/accounts/GDPEGEEZ7UHQKWMGC4W4SYDFKHGJKHIOYBO6VSVO5L2JBVACFIJTWZ5P")

Response:

{
  "_links": {
    "self": {
      "href": "/accounts/GDPEGEEZ7UHQKWMGC4W4SYDFKHGJKHIOYBO6VSVO5L2JBVACFIJTWZ5P"
    },
    "transactions": {
      "href": "/accounts/GDPEGEEZ7UHQKWMGC4W4SYDFKHGJKHIOYBO6VSVO5L2JBVACFIJTWZ5P/transactions{?cursor,limit,order}",
      "templated": true
    },
    "operations": {
      "href": "/accounts/GDPEGEEZ7UHQKWMGC4W4SYDFKHGJKHIOYBO6VSVO5L2JBVACFIJTWZ5P/operations{?cursor,limit,order}",
      "templated": true
    },
    "payments": {
      "href": "/accounts/GDPEGEEZ7UHQKWMGC4W4SYDFKHGJKHIOYBO6VSVO5L2JBVACFIJTWZ5P/payments{?cursor,limit,order}",
      "templated": true
    },
    "effects": {
      "href": "/accounts/GDPEGEEZ7UHQKWMGC4W4SYDFKHGJKHIOYBO6VSVO5L2JBVACFIJTWZ5P/effects{?cursor,limit,order}",
      "templated": true
    },
    "offers": {
      "href": "/accounts/GDPEGEEZ7UHQKWMGC4W4SYDFKHGJKHIOYBO6VSVO5L2JBVACFIJTWZ5P/offers{?cursor,limit,order}",
      "templated": true
    },
    "trades": {
      "href": "/accounts/GDPEGEEZ7UHQKWMGC4W4SYDFKHGJKHIOYBO6VSVO5L2JBVACFIJTWZ5P/trades{?cursor,limit,order}",
      "templated": true
    },
    "data": {
      "href": "/GDPEGEEZ7UHQKWMGC4W4SYDFKHGJKHIOYBO6VSVO5L2JBVACFIJTWZ5P/data/{key}",
      "templated": true
    }
  },
  "id": "GDPEGEEZ7UHQKWMGC4W4SYDFKHGJKHIOYBO6VSVO5L2JBVACFIJTWZ5P",
  "paging_token": "",
  "account_id": "GDPEGEEZ7UHQKWMGC4W4SYDFKHGJKHIOYBO6VSVO5L2JBVACFIJTWZ5P",
  "sequence": "442381631488",
  "subentry_count": 0,
  "thresholds": {
    "low_threshold": 0,
    "med_threshold": 0,
    "high_threshold": 0
  },
  "flags": {
    "auth_required": false,
    "auth_revocable": false
  },
  "balances": [
    {
      "balance": "50.9909000",
      "asset_type": "native"
    }
  ],
  "signers": [
    {
      "public_key": "GDPEGEEZ7UHQKWMGC4W4SYDFKHGJKHIOYBO6VSVO5L2JBVACFIJTWZ5P",
      "weight": 1,
      "key": "GDPEGEEZ7UHQKWMGC4W4SYDFKHGJKHIOYBO6VSVO5L2JBVACFIJTWZ5P",
      "type": "ed25519_public_key"
    }
  ],
  "data": {
    "test123": "asdf"
  }
}

Account address is GDPEGEEZ7UHQKWMGC4W4SYDFKHGJKHIOYBO6VSVO5L2JBVACFIJTWZ5P sequence number is 442381631488 The data you see associated with the account wasn't a successful transaction, I manually injected it into the SQL database to see if it showed up in the account dump. I have tried sending a manage data operation both before the manual injection, and after it; it yields a blank operations string either way.

2
  • Please upgrade to latest stellar-core and horizon and it will work. Commented Apr 13, 2018 at 21:54
  • I've upgraded to Stellar-core 9.2.0 with Horizon 0.12.3 and still no luck. Also tried compiling Stellar-core from the master branch which should be the latest and greatest code--still, no luck. Can you tell me which versions should work?
    – Munawar
    Commented Apr 16, 2018 at 14:31

1 Answer 1

1

The issue was with the Core using an outdated version of the protocol. I had to upgrade the protocol to version 9 by using: stellar-core -c 'upgrades?mode=set&upgradetime=yyyy-mm-ddThh:mm:ss&protocolversion=9

So, just because you're running Core version 9 doesn't mean you're actually using version 9 protocol. The command above upgrades the network.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.