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

Failure_LockHash_Unknown_Hash on some nodes #776

Open
keiyow opened this issue Mar 12, 2021 · 5 comments
Open

Failure_LockHash_Unknown_Hash on some nodes #776

keiyow opened this issue Mar 12, 2021 · 5 comments

Comments

@keiyow
Copy link

keiyow commented Mar 12, 2021

I announced an AggregateBonded Transaction with two simple Transfers and a HashLock Transaction.
When I went over all the published nodes, I found a few nodes with transactionStatus outputting an error Failure_LockHash_Unknown_Hash.
I tested out the same thing several times, and nodes that generated this error were not the same nodes every time.

http://api-01.us-west-1.testnet.symboldev.network:3000 : Failure_LockHash_Unknown_Hash
http://api-01.us-west-2.testnet.symboldev.network:3000 : Failure_LockHash_Unknown_Hash
http://62.171.160.205:3000 : Failure_LockHash_Unknown_Hash
http://34.207.105.94:3000 : Failure_LockHash_Unknown_Hash
http://sym-test.opening-line.jp:3000 : Failure_LockHash_Unknown_Hash
http://13.212.224.184:3000 : Failure_LockHash_Unknown_Hash
http://sym-test-18.opening-line.jp:3000 : Failure_LockHash_Unknown_Hash
http://54.196.112.115:3000 : Failure_LockHash_Unknown_Hash
http://210.158.180.49:3000 : Failure_LockHash_Unknown_Hash

And when I look through the error on one node, I found the lockhash information but no partial information there.

$ curl -Ss https://sym-test.opening-line.jp:3001/transactionStatus/6C308A4E9488E7C2868F17FD9F831DCB9CBB822876072FAE4EE9E9492C975FFE | jq -r
{
 "hash": "6C308A4E9488E7C2868F17FD9F831DCB9CBB822876072FAE4EE9E9492C975FFE",
 "code": "Failure_LockHash_Unknown_Hash",
 "deadline": "42098735088",
 "group": "failed"
}
$ curl -Ss https://sym-test.opening-line.jp:3001/transactions/partial/6C308A4E9488E7C2868F17FD9F831DCB9CBB822876072FAE4EE9E9492C975FFE | jq -r
{
 "code": "ResourceNotFound",
 "message": "no resource exists with id '6C308A4E9488E7C2868F17FD9F831DCB9CBB822876072FAE4EE9E9492C975FFE'"
}
$ curl -Ss https://sym-test.opening-line.jp:3001/lock/hash/6C308A4E9488E7C2868F17FD9F831DCB9CBB822876072FAE4EE9E9492C975FFE | jq -r
{
 "lock": {
  "version": 1,
  "ownerAddress": "98EFE782487345F7401180A3034F1542117583E19DDA95EB",
  "mosaicId": "2CF403E85507F39E",
  "amount": "10000000",
  "endHeight": "180915",
  "status": 0,
  "hash": "6C308A4E9488E7C2868F17FD9F831DCB9CBB822876072FAE4EE9E9492C975FFE"
 },
 "id": "604AE8E7CFAE2A0907D01F7B"
}
@gimre-xymcity
Copy link
Member

gimre-xymcity commented Mar 13, 2021

transaction hash lock needs to be known/present BEFORE you create aggregate bonded transaction.
tbh It's pretty surprising that the last node returned anything...

ignore the above, maybe I misunderstood something, can you write exactly what transactionS you have made and in what order?

@keiyow
Copy link
Author

keiyow commented Mar 14, 2021

Thank you for the response.

I've created a simple transaction.
The endpoint is set to a random public URL.

https://gist.github.com/keiyow/638204e82d4b2de8e7c6366892e7a8d4

After creating the hash lock transaction, I checked on all the nodes and found the error.

txhash=[[replace txhash]]; for i in `curl -Ss http://beacon-01.us-west-2.testnet.symboldev.network:4001/nodes | jq -r ".[]|select(.roles == 2 or .roles == 3 or .roles == 6 or .roles == 7)|.url = \"http://\" + .host + \":3000\"|.url"`; do echo -n "$i : "; curl $i/transactionStatus/${txhash} -sS -m 10 | jq -r ".code" ; done

@xembook
Copy link

xembook commented Mar 14, 2021

I was also able to reproduce it relatively easily.

http://18.195.160.73:3000/transactionStatus/9AFAF027A3CF9FC4205A04487930D15729AEAF3106201D9C8089A78591257D68

{"hash":"9AFAF027A3CF9FC4205A04487930D15729AEAF3106201D9C8089A78591257D68","code":"Failure_LockHash_Unknown_Hash","deadline":"42309932708","group":"failed"}

http://18.195.160.73:3000/transactions/partial/9AFAF027A3CF9FC4205A04487930D15729AEAF3106201D9C8089A78591257D68

{"code":"ResourceNotFound","message":"no resource exists with id '9AFAF027A3CF9FC4205A04487930D15729AEAF3106201D9C8089A78591257D68'"}

http://18.195.160.73:3000/lock/hash/9AFAF027A3CF9FC4205A04487930D15729AEAF3106201D9C8089A78591257D68

{"lock":{"version":1,"ownerAddress":"985B967F057904AACFB08B4B6584DA811E671E4733CA6F9E","mosaicId":"2CF403E85507F39E","amount":"10000000","endHeight":"187427","status":0,"hash":"9AFAF027A3CF9FC4205A04487930D15729AEAF3106201D9C8089A78591257D68"},"id":"604E21B56C1EC462E4E00ED8"}

I think 18.195.160.73 is api-01-eu-central-1
script is like this

tx = nem.TransferTransaction.create(
    nem.Deadline.create(epochAdjustment),
    alice.address, 
    [],
    nem.PlainMessage.create('test'),
    networkType
);

feeTx = nem.TransferTransaction.create(
    nem.Deadline.create(epochAdjustment),
    bob.address, 
    [networkCurrency.createRelative(1)],
    nem.EmptyMessage,
    networkType
);

aggregateTx = nem.AggregateTransaction.createBonded(
    nem.Deadline.create(epochAdjustment),
    [
    feeTx.toAggregate(alice.publicAccount),
    tx.toAggregate(bob.publicAccount),
    ],
    networkType,[],
).setMaxFeeForAggregate(500, 1);

signedAggregateTx = alice.sign(aggregateTx, generationHash);

hashLockTx = nem.HashLockTransaction.create(
    nem.Deadline.create(epochAdjustment),
	networkCurrency.createRelative(10),
	nem.UInt64.fromUint(480),
	signedAggregateTx,
	networkType
).setMaxFee(600);

signedLockTx = alice.sign(hashLockTx, generationHash);

listener.open().then(() => {
    transactionService.announceHashLockAggregateBonded(
      signedLockTx,
      signedAggregateTx,
      listener

    ).subscribe(aggTx => console.log(aggTx))
});

@Jaguar0625
Copy link

Can you confirm if either of the transactions made it into the chain?

@Jaguar0625
Copy link

After talking with @rg911, we think this is an SDK issue and will move there.

@Jaguar0625 Jaguar0625 transferred this issue from another repository Mar 31, 2021
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

4 participants