Closed buhtignew closed 2 months ago
The reason for the first error you got was: the combination --payto
without --payamount
didn't work due to a bug in a code branch. Even if it was not mentioned in the help, the function supports this (in this case all is paid to the address mentioned after --payto). So I fixed the branching and now it should work (pre-tested here, it works).
Improved error catching (all errors should now be shown in red, to get details use --debug).
By the way what is the format to set up the lock time?
Locktime should be the same than in Bitcoin, i.e. under 500000000 (500 million) it's assumed to be a number of blocks, and from 500000000 on it should be Unix time.
4.
And have seen that the transaction was confirmed earlier the block I've set up originally with the -l flag.
Strange. The locktime was correctly set (you can see it in slimcoind getrawtransaction 37c876eee0a186a1fe1536bb00c2b9e203b94991da83f0b85ac8098ae5cbe96d 1
but you're correct, it was confirmed two blocks earlier. Looks like a Slimcoin bug, can't do anything about that :(
I generally think we should discourage the use of the Locktime parameter. For now I added "not recommended, buggy in SLM" to the help. I will think about eliminating it completely for PoBtoken, ATtoken and dPoDtoken commands (in some, I saw I already trashed it) and leave it intact only for vanilla commands. Will have to think if there are any significant use cases.
Regarding low locktimes like 0 and 100, as far as I understand the mechanism this would be simply ignored, as the blocks 0 and 100 have passed a long time ago.
Regarding the test you made with two transactions in the same block the result is expected (even if you put locktime values on them). One of both transactions - the one later in the block - will be ignored (and not even shown by token transfers
) because it will be deemed as "duplicate". You can see with the getblock
command that the tx starting with bb1 ... was indeed earlier than the tx starting with 4ac... .
While a claim transaction was not confirmed, you can still claim but the transaction will be invalid.
Commits of the changes is: 13a41bc
Can be closed if there are no open questions nor problems.
Strangely enough my slimcoind getrawtransaction 37c876eee0a186a1fe1536bb00c2b9e203b94991da83f0b85ac8098ae5cbe96d 1
output is:
error: {"code":-5,"message":"No information available about transaction"}
both on client as on server.
_
If I run pobtoken claim ATTokenNewSpec2_local f7d94d3391230e997c0120cab4ea6a8e02fe06408ddd0adc1fc1c4a9d70ed08c --payto new_after_refill8
I'm getting:
File "~/.local/bin/pacli", line 8, in <module>
sys.exit(main())
^^^^^^
File "~/.local/lib/python3.12/site-packages/pacli/__main__.py", line 479, in main
fire.Fire({
File "~/.local/lib/python3.12/site-packages/fire/core.py", line 143, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/.local/lib/python3.12/site-packages/fire/core.py", line 477, in _Fire
component, remaining_args = _CallAndUpdateTrace(
^^^^^^^^^^^^^^^^^^^^
File "~/.local/lib/python3.12/site-packages/fire/core.py", line 693, in _CallAndUpdateTrace
component = fn(*varargs, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^
File "~/.local/lib/python3.12/site-packages/pacli/at_classes.py", line 132, in claim
ei.run_command(self.__claim, **kwargs)
File "~/.local/lib/python3.12/site-packages/pacli/extended_interface.py", line 34, in run_command
result = c(*args, **kwargs)
^^^^^^^^^^^^^^^^^^
File "~/.local/lib/python3.12/site-packages/pacli/at_classes.py", line 162, in __claim
asset_specific_data, amount, receiver = au.create_at_issuance_data(deck, txid, Settings.key.address, amounts=amounts, receivers=receiver_list, payto=payto, payamount=dec_payamount, debug=debug, force=force)
^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'receiver_list' where it is not associated with a value
Since the transaction f7d94d3391230e997c0120cab4ea6a8e02fe06408ddd0adc1fc1c4a9d70ed08c
is already claimed, as per OP, by picking the unclaimed transaction aa1cbf418cb440b32e84e53002602aef616a5873c0fecaab8785c9b6ad377350
from my transaction list ATTokenNewSpec2_local -b -u
output and running pobtoken claim ATTokenNewSpec2_local aa1cbf418cb440b32e84e53002602aef616a5873c0fecaab8785c9b6ad377350 --payto new_after_refill8
I'm getting the same error.
The same if I replace the label of the --payto
address with the address itself (like this pobtoken claim ATTokenNewSpec2_local aa1cbf418cb440b32e84e53002602aef616a5873c0fecaab8785c9b6ad377350 --payto mkxLRzTvrEpPbFxkp4tnRGXQ6UKcKH25TA
).
_
I will think about eliminating it completely for PoBtoken, ATtoken and dPoDtoken commands
Probably it would make sense. I thought it was needed for the dex
operations, but if there no particular reason to keep it getting rid of it would make the command's usage easier.
Uh, I confused the block hash with the tx hash, sorry. What you check to see the locktime is of course slimcoind getrawtransaction f5be5c9ffe46fc4dbc209e786644ab8316bd85f25217abdd7a24db9eb4c89de6 1
. :)
37c876eee0a186a1fe1536bb00c2b9e203b94991da83f0b85ac8098ae5cbe96d
is the block where it was confirmed. So with slimcoind getblock 37c876eee0a186a1fe1536bb00c2b9e203b94991da83f0b85ac8098ae5cbe96d
you can see the height.
Second error (UnboundLocalError) was a small mistake I made when fixing the issue with the -r
flag of that command. Fixed in commit 5705843.
Having thought a bit about use cases of the Locktime parameter, the main use case I see is, apart from one command of the dex, the burn_coins/create_tx commands in the case of PoB or AT tokens with block limits (i.e. where only burn transactions from a certain block on are taken into account). In addition, the claim
command of dPoD tokens also could benefit from it because claiming is only allowed from a certain block on.
For AT/PoB tokens claiming I see no benefit for the Locktime parameter instead, because once the transaction is confirmed you can claim. So I'll remove the parameter from attoken/pobtoken claim.
I hope this can be closed now :)
While my
slimcoind
was stuck at the block 485344 I've runpobtoken claim ATTokenNewSpec2_local f7d94d3391230e997c0120cab4ea6a8e02fe06408ddd0adc1fc1c4a9d70ed08c -l 485355
command and have produced the following output:Then I've seen with the
transaction list fb93cce7aceb9f7fda228bc0c0c2eca8c56c09c1d846a04bd6a59cae2a895974 -b -u
command that the transaction was still considered unclaimed so without restartingslimcoind
(so it was still at the block 485344) I've runpobtoken claim ATTokenNewSpec2_local f7d94d3391230e997c0120cab4ea6a8e02fe06408ddd0adc1fc1c4a9d70ed08c --payto new_after_refill8
and got the following output:(I don't know whether this error message is important to consider though).
Then I've restarted slimcoind and it got updated. I've looked into
transaction show f5be5c9ffe46fc4dbc209e786644ab8316bd85f25217abdd7a24db9eb4c89de6 -s
output:And have seen that the transaction was confirmed earlier the block I've set up originally with the -l flag.
By the way what is the format to set up the lock time? _ Update 10-07-2024
I've burned other coins using
pobtoken burn_coins 3.21
command and have produced transaction5f72d5894fa789920ca2073b22ee8145069f0c9c0e54fa05fd39269dba528077
. Later on when myslimcoind
was on the block 485804 I've runpobtoken claim ATTokenNewSpec2_local 5f72d5894fa789920ca2073b22ee8145069f0c9c0e54fa05fd39269dba528077 -l 0
and have produced transactionbb11f5a66a702432f1d9fa4a3c3e281bb5d53717ec906e80bae3f224fac35eeb
. While my slimcoind was still on the same block I've launchedpobtoken claim ATTokenNewSpec2_local 5f72d5894fa789920ca2073b22ee8145069f0c9c0e54fa05fd39269dba528077 -l 100
from the same main address, n3MtPoPaAREU5GEhAErBPuju83bVog2opz, and have produced the transaction4ac754e9d34d025babd3d7c6cc411e0cb15f8c8008c8f5910ba6de34fb224c8c
. Then I've restartedslimcoind
and both transactions were confirmed at the block 485808. Here is thetransaction show bb11f5a66a702432f1d9fa4a3c3e281bb5d53717ec906e80bae3f224fac35eeb -s
output:and here is the
transaction show 4ac754e9d34d025babd3d7c6cc411e0cb15f8c8008c8f5910ba6de34fb224c8c -s
output:After that I was not able to produce claim transactions from the same burn transaction (5f72d5894fa789920ca2073b22ee8145069f0c9c0e54fa05fd39269dba528077). The PoB balance of the address n3MtPoPaAREU5GEhAErBPuju83bVog2opz has been increased by the expected balance 321 PoB tokens. My
token transfers ATTokenNewSpec2_local -s
output shows the transactionbb11f5a66a702432f1d9fa4a3c3e281bb5d53717ec906e80bae3f224fac35eeb
but doesn't show the transaction4ac754e9d34d025babd3d7c6cc411e0cb15f8c8008c8f5910ba6de34fb224c8c
.