harmony
harmony copied to clipboard
[testnet] tokens sent to a smart contract addr were not deducted from sender wallet
so a user tried to send some tokens back to our faucet and he wasnt able to due to lower gas price than needed.. after a few attempts and raising the gas price, he managed to do it twice - he sent two batches of 75k tokens to the faucet, while he didnt get deducted for those tokens. See:
https://explorer.testnet.harmony.one/address/0x4e8939c5f8e02c19a2a87cc0d42916d1f2ed994b
nonce 10 and 11 went through without his balance changing (its still ~90k)
I was the one who sent the transaction(s). let me know how i can assist.
Can you send another transaction with nonce 12 and record the balance of your wallet and the faucet before and after the transaction?
https://explorer.testnet.harmony.one/tx/0xc33af992ae7353127ee041a67d6ebb1b9a0d3aee605c7317a02eb550fdfd8c5c
harmony@sys2:~$ ./hmy balances one1f6ynn30cuqkpng4g0nqdg2gk68ewmx2t07vpzk | jq -c
[{"shard":0,"amount":90452.02684753438},{"shard":1,"amount":0},{"shard":2,"amount":0},{"shard":3,"amount":0}]
harmony@sys2:~$ ./hmy balances one18zf6feapd6sgae6saz4m6xs65yxkps9z7qcv77 | jq -c
[{"shard":0,"amount":7703907.664110263},{"shard":1,"amount":0},{"shard":2,"amount":0},{"shard":3,"amount":0}]
harmony@sys2:~$ ./hmy transfer --amount 75000 \
> --from one1f6ynn30cuqkpng4g0nqdg2gk68ewmx2t07vpzk \
> --to one18zf6feapd6sgae6saz4m6xs65yxkps9z7qcv77 \
> --gas-price 10 \
> --nonce 12 \
> --from-shard 0 \
> --to-shard 0 \
> --passphrase
Enter wallet keystore passphrase:
[
{
"transaction-hash": "0xc33af992ae7353127ee041a67d6ebb1b9a0d3aee605c7317a02eb550fdfd8c5c",
"blockchain-receipt": {
"blockHash": "0x92692068b014b75ba43637af86d3b815c09f18b245256bd6a3f1ce15a3d8491f",
"blockNumber": "0x10e442b",
"contractAddress": "0x0000000000000000000000000000000000000000",
"cumulativeGasUsed": "0x5208",
"from": "one1f6ynn30cuqkpng4g0nqdg2gk68ewmx2t07vpzk",
"gasUsed": "0x5208",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"root": "0x",
"shardID": 0,
"status": "0x0",
"to": "one18zf6feapd6sgae6saz4m6xs65yxkps9z7qcv77",
"transactionHash": "0xc33af992ae7353127ee041a67d6ebb1b9a0d3aee605c7317a02eb550fdfd8c5c",
"transactionIndex": "0x0"
},
"time-signed-utc": "2021-11-18 11:04:27.351823"
}
]
harmony@sys2:~$ ./hmy balances one1f6ynn30cuqkpng4g0nqdg2gk68ewmx2t07vpzk | jq -c
[{"shard":0,"amount":90452.02663753438},{"shard":1,"amount":0},{"shard":2,"amount":0},{"shard":3,"amount":0}]
harmony@sys2:~$ ./hmy balances one18zf6feapd6sgae6saz4m6xs65yxkps9z7qcv77 | jq -c
[{"shard":0,"amount":7703907.664110263},{"shard":1,"amount":0},{"shard":2,"amount":0},{"shard":3,"amount":0}]
harmony@sys2:~$
Version:
harmony@sys2:~$ ./hmy version
Harmony (C) 2020. hmy, version v1-580fa56 ([email protected] 2021-09-13T16:34:01+0000)
harmony@sys2:~$ ./harmony -V
Harmony (C) 2020. harmony, version v7195-v4.3.0-21-g42c88b55 (jenkins@ 2021-11-09T13:56:19+0000)
Retested with nonce 13 - my balance does not shrink, and the faucet does in increase.
https://explorer.testnet.harmony.one/tx/0x1711405ca718fe5b828d2ead824d3f7341f14e10bec0acfa0f5a9181ce309dff
For giggles, I decided to test sending 5000 ONE to one of my other wallet addresses. In this case the balance on both wallets is showing correct. The problem occurs when I send to the faucet.
harmony@sys2:~$ ./hmy balances one1f6ynn30cuqkpng4g0nqdg2gk68ewmx2t07vpzk | jq -c
[{"shard":0,"amount":90452.02642753438},{"shard":1,"amount":0},{"shard":2,"amount":0},{"shard":3,"amount":0}]
harmony@sys2:~$ ./hmy balances one19fs9ngavxhw6jx659lrqmxuvprvg97ancs07vp | jq -c
[{"shard":0,"amount":1848.999930975},{"shard":1,"amount":0},{"shard":2,"amount":0},{"shard":3,"amount":0}]
harmony@sys2:~$ ./hmy transfer --amount 5000 \
> --from one1f6ynn30cuqkpng4g0nqdg2gk68ewmx2t07vpzk \
> --to one19fs9ngavxhw6jx659lrqmxuvprvg97ancs07vp \
> --gas-price 10 \
> --from-shard 0 \
> --to-shard 0 \
> --passphrase
Enter wallet keystore passphrase:
[
{
"transaction-hash": "0x37fe4956a48c3a57667deda253b1b8fbf48eb5e286e8a89fe95c3e1ed3c48d31",
"blockchain-receipt": {
"blockHash": "0x0756fc651b5ddea2d087817b3991ae1611557477f40a23f742a492c0365a361b",
"blockNumber": "0x10e4c3a",
"contractAddress": "0x0000000000000000000000000000000000000000",
"cumulativeGasUsed": "0x5208",
"from": "one1f6ynn30cuqkpng4g0nqdg2gk68ewmx2t07vpzk",
"gasUsed": "0x5208",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"root": "0x",
"shardID": 0,
"status": "0x1",
"to": "one19fs9ngavxhw6jx659lrqmxuvprvg97ancs07vp",
"transactionHash": "0x37fe4956a48c3a57667deda253b1b8fbf48eb5e286e8a89fe95c3e1ed3c48d31",
"transactionIndex": "0x0"
},
"time-signed-utc": "2021-11-18 12:13:16.736381"
}
]
harmony@sys2:~$ ./hmy balances one1f6ynn30cuqkpng4g0nqdg2gk68ewmx2t07vpzk | jq -c
[{"shard":0,"amount":85452.02621753437},{"shard":1,"amount":0},{"shard":2,"amount":0},{"shard":3,"amount":0}]
harmony@sys2:~$ ./hmy balances one19fs9ngavxhw6jx659lrqmxuvprvg97ancs07vp | jq -c
[{"shard":0,"amount":6848.999930975},{"shard":1,"amount":0},{"shard":2,"amount":0},{"shard":3,"amount":0}]
Tried 20K of gas, no change in balances. Transaction succeeded according to explorer https://explorer.testnet.harmony.one/tx/0x49ef142ad2935c69b9b8f75f47afe9f1db1be29164840984bc48f99fdde999fc
harmony@sys2:~$ ./hmy balances one1f6ynn30cuqkpng4g0nqdg2gk68ewmx2t07vpzk | jq -c
[{"shard":0,"amount":85452.02621753437},{"shard":1,"amount":0},{"shard":2,"amount":0},{"shard":3,"amount":0}]
harmony@sys2:~$ ./hmy balances one18zf6feapd6sgae6saz4m6xs65yxkps9z7qcv77 | jq -c
[{"shard":0,"amount":7702907.664110263},{"shard":1,"amount":0},{"shard":2,"amount":0},{"shard":3,"amount":0}]
harmony@sys2:~$
harmony@sys2:~$ ./hmy transfer --amount 20000 \
> --from one1f6ynn30cuqkpng4g0nqdg2gk68ewmx2t07vpzk \
> --to one18zf6feapd6sgae6saz4m6xs65yxkps9z7qcv77 \
> --gas-price 20000 \
> --nonce 15 \
> --from-shard 0 \
> --to-shard 0 \
> --passphrase
Enter wallet keystore passphrase:
[
{
"transaction-hash": "0x49ef142ad2935c69b9b8f75f47afe9f1db1be29164840984bc48f99fdde999fc",
"blockchain-receipt": {
"blockHash": "0x082df26ae912cb456c71919c488300a6c21113581bfa540ce6c0f4375f38e4b6",
"blockNumber": "0x10e4e10",
"contractAddress": "0x0000000000000000000000000000000000000000",
"cumulativeGasUsed": "0x5208",
"from": "one1f6ynn30cuqkpng4g0nqdg2gk68ewmx2t07vpzk",
"gasUsed": "0x5208",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"root": "0x",
"shardID": 0,
"status": "0x0",
"to": "one18zf6feapd6sgae6saz4m6xs65yxkps9z7qcv77",
"transactionHash": "0x49ef142ad2935c69b9b8f75f47afe9f1db1be29164840984bc48f99fdde999fc",
"transactionIndex": "0x0"
},
"time-signed-utc": "2021-11-18 12:28:55.522208"
}
]
harmony@sys2:~$ ./hmy balances one1f6ynn30cuqkpng4g0nqdg2gk68ewmx2t07vpzk | jq -c
[{"shard":0,"amount":85451.60621753437},{"shard":1,"amount":0},{"shard":2,"amount":0},{"shard":3,"amount":0}]
harmony@sys2:~$ ./hmy balances one18zf6feapd6sgae6saz4m6xs65yxkps9z7qcv77 | jq -c
[{"shard":0,"amount":7702907.664110263},{"shard":1,"amount":0},{"shard":2,"amount":0},{"shard":3,"amount":0}]
ok so what we found out here is that while his first txs to the faucet addr have failed, all subsequent ones with higher gas price show success in explorer but actually fail also, since the faucet balance doesnt increase