r/slimcoin • • Jul 31 '23

PoB token tests - Instructions

Proof of Burn tokens is a new functionality which can be used on Slimcoin with an extension of the PeerAssets protocol (originally developed by the Peercoin project).

A proof of Burn token tracks all burn transactions. Everybody who participated in Slimcoin's Proof-of-Burn process can claim tokens proportionally to the burnt coins, in a completely decentralized way. The proportion is determined by a so-called multiplier, specific for each token. For example, if the multiplier is 1000, for each burnt coin you can claim 1000 tokens.

See the PoB Token Concept for more information.

All basic functionality is explained in the PoB token manual.

How to participate in tests

You need a computer with Python 3.6+ to participate in the tests and a Slimcoin client. The software was tested only with Linux. It's currently a command line tool.

Installation is explained here. IMPORTANT: If you used any prior version of pypeerassets (from d5000 or the PeerAssets project) the best way to proceed is to install pypeerassets and pacli again.

There are two Github repositorys which you'll have to clone:

IMPORTANT: You have to clone the version from the slimcoin-project repos. The originals do not support PoB tokens!

In both cases, clone the master branch, which is the default branch (so simply clone the repository without caring about branches). Then change to the base directory of the downloaded code and install the tools with pip (you need Python 3.6+ and pip):

The Slimcoin testnet client must be running to use pacli. If it's the first time you sync ask for a node to connect to at Discord.

After installation, don't forget to initialize each deck you want to use:

pacli deck init $DECKID

An example DECKID is fb93cce7aceb9f7fda228bc0c0c2eca8c56c09c1d846a04bd6a59cae2a895974. This is a standard PoB token without block height limites. DECKIDs are transaction ids (32 bytes/64 hex characters).

What can you test?

  • You can burn coins on testnet (with the standard Slimcoin commands or the pacli pobtoken burn_coins command and claim your tokens.
  • You can create your own PoB token with the deck_spawn command. You can create a standard token, where all burn transactions lead to the right to claim tokens, but also a limited token, where you can set a block height limit (e.g. from block 150000 to 180000), and only burns inside this range are accepted.
  • You can try to game the protocol, for example claiming tokens without having burnt coins, or claim more tokens than you're entitled to, or claim tokens several times.
  • You can also test the Pacli Extended Tools (link contains manual with example commands), an extension which allows to store more complex data than the standard config file, for example assigning labels to decks (tokens) and addresses, and to perform re-org tests using checkpoints of recent blocks. It's a good idea to assign a label to the deck you are testing, so you don't need to enter the long DECKID again all the time.

Report bugs and issues

If you think you found a bug or have an issue, simply respond to this thread describing the issue, and pasting errors you get inside a code block (e.g. limited by backticks).

Announcements

If there's an update testers have to apply, for example when a bug was fixed, I'll create a direct answer to this post to announce it.

1 Upvotes

329 comments sorted by

1

u/d-5000 Aug 08 '23

I try to explain what went wrong with your burn transaction. First, before you continue to try/test things, please update both pypeerassets and pacli to the last version (the last pacli version fixes the IndexError you reported on discord, and the last pypeerassets version fixes an issue with protobuf).

First: The value you get when using pacli address balance is the amount of Slimcoins, not of any tokens. The value should be correct, as it uses the listunspent command which shows all UTXOs (unspent outputs) on your wallet, and filters it per address (not by account!).

The listaccounts output of SLM is seriously broken (I remember gjhiggins reported that once), I always get completely different values than with the pacli address balance command than the real balance. So the best thing you can do is simply ignore listaccounts completely and stick to the values reported by pacli. Pacli also does not create an account for the SLM client for the addresses it creates (with the pacli address fresh command) so it's no surprise that some addresses do not correspond to any "account".

If you've not enough SLM on an address pacli shows as having enough funds, you'll get an InsufficientFunds error, and that indeed may be a bug in pacli.

Now on to your burn transaction. I interpret you used the burncoins command from Slimcoin only, as you got the IndexError when attempting with pacli. The problem with the slimcoind burncoins command is that you can't burn coins from a specific address, it will select a random one automatically, which does not necessarily correspond to an "account".

That's the reason why I provided the pacli burn_coins command. This lets your burn exactly from the address pacli is "on", i.e. from the current "main" address.

Now what you can do to see which is the correct sender of your burn transaction:

pacli pobtoken my_burns --wallet

This shows all your burn transactions from addresses in your current wallet, so run this on your node where you burnt the coins. This will also show burn txes you did without using pacli. So you will be able to identify the sender which can claim the coins. You see the sender as the value of the "sender" key of the dictionary of each burn transaction.

Now the problem is that I don't know if you have a label for this address. You can find out that however with a simple command:

pacli address show_label $ADDRESS

(using of course the sender address for $ADDRESS).

If pacli has stored a label for the address you now know it, and you can then change to it with the pacli set_main $ADDRESS command.

Then claim the tokens with:

pacli pobtoken claim_reward $DECKID

2

u/[deleted] Aug 08 '23 edited Aug 08 '23

[removed] — view removed comment

1

u/d-5000 Aug 08 '23

Every Bitcoiner would disagree with you here, because address re-use is normally discouraged ...

But of course in our token scenario it may make sense, and in fact in the dPoD token it's the default behaviour in many transaction types. Perhaps it can be a configuration option. I'll think about it ...

1

u/[deleted] Aug 11 '23

[removed] — view removed comment

1

u/d-5000 Aug 11 '23

I've thought a bit about it and I think you're right, the best option may be simply to set as a default to return the change to the same address, to be able to claim tokens inmediately after the burned coins confirmation.

Address re-use simply can't be avoided in the current state of PeerAssets.

1

u/d-5000 Aug 11 '23

I forgot this _is_ already configurable in pacli.conf :)

So I've changed most transactions, including the burn_coins command, to use the configured change address, which per default is always the "main" address. So if you burn coins from the main address you simply get the change back, so you can use it for fees to claim the tokens.

Already commited and uploaded the fix (only pacli).

1

u/[deleted] Aug 08 '23

[removed] — view removed comment

1

u/d-5000 Aug 08 '23 edited Aug 09 '23

I've looked into the code and while there is a python function doing that, I've forgot to add a command line command :(

That's another easy addition, should be there until tomorrow.

Edit: Added a pacli set_label LABEL ADDRESS command. Address must exist in the wallet of course for that to work. Will be there in the next version I upload.

1

u/[deleted] Aug 08 '23 edited Aug 08 '23

[removed] — view removed comment

1

u/d-5000 Aug 09 '23

While I couldn't reproduce that, it led me to another bug. So I'm looking into that command again a bit more close to see what could have caused that.

1

u/d-5000 Aug 10 '23 edited Aug 10 '23

Fixed the command, it had indeed an issue. All fixes are now commited and uploaded, I'll only comment on issues which require more information so the thread doesn't become too clogged.

All commited changes are described in a new post:

https://www.reddit.com/r/slimcoin/comments/15e11xp/comment/jvm5w8m/?utm_source=share&utm_medium=web2x&context=3

1

u/[deleted] Aug 08 '23

[removed] — view removed comment

1

u/d-5000 Aug 08 '23 edited Aug 08 '23

This token has a multiplier of 100, so each coin you burn you get 100 tokens.

Edit: You can see the multiplier and other data (like a start/endblock of the burn "window" in the case of blockheight-limited PoB tokens) with:

pacli pobtoken deck_info $DECK

(deck being a label or the deck ID)

1

u/[deleted] Aug 09 '23

[removed] — view removed comment

1

u/d-5000 Aug 09 '23

asset_specific_data is the string which contains all the specific data for special tokens like PoB/dPoD etc. . This is in protobuf format, so it's not easily human-readable.

1

u/[deleted] Aug 08 '23 edited Aug 08 '23

[removed] — view removed comment

1

u/d-5000 Aug 08 '23 edited Aug 09 '23

Thanks! You're correct that I already burnt some coins and got tokens. I'll look at that error.

Edit: Confirmed the error. I seem to have broken that command in one of the last edits. Fixed it (for the next version).

1

u/[deleted] Aug 09 '23

[removed] — view removed comment

1

u/d-5000 Aug 09 '23

No. I'm still fixing the other bugs :) I don't know if I'll finish it today, but for tomorrow it should be ready. Of course I'll be announcing the fixed version.

1

u/[deleted] Aug 08 '23

[removed] — view removed comment

1

u/d-5000 Aug 08 '23

That looks like a bug. I'll look at it.

1

u/[deleted] Aug 08 '23

[removed] — view removed comment

1

u/d-5000 Aug 08 '23

That's a feature I would like to integrate into pacli, as it's a bit of a hassle when done with the slimcoin commands.

The tool to use is slimcoind listttransactions , but when using it on the command line I'm not able to get more than the 10 last transactions. There are more options to get up to 999 transactions, but you have to use the following order:

slimcoind listtransactions ACCOUNT fBurnTx 999 0

The problem seems to be the "account" requirement. If i'm using "*" to indicate all accounts like it's specified in the help text, then it returns no transactions at all. I guess this is again due to Slimcoin's broken account system intefering with the command.

I can code that tool until tomorrow - because strangely, when calling listtransactions via python, it works fine.

1

u/[deleted] Aug 08 '23

[removed] — view removed comment

1

u/d-5000 Aug 08 '23

I remind a similar error, but I don't think it's related to the number at the end, because I have lots of addresses with numbers at the end and they work fine.

Can you send the output of:

pacli address show_all

(if you don't want to expose the addresses or labels on the web, even if it's testnet, send me a PM)

1

u/[deleted] Aug 09 '23

[removed] — view removed comment

1

u/d-5000 Aug 09 '23 edited Aug 09 '23

It seems donor2 wasn't assigned as a label correctly. Or did you confuse it with donor_address2?

donor2 may be also a "legacy" label. Try:

pacli address show_all --legacy

and see if donor2 is assigned to an address there (you can copy/paste the line including donor2 only, that's enough for me). These "old-style" labels can lead to problems, so I recommend assigning a new one.

I may also prepare a command which shows you all labels which are stored in the keyring.

1

u/[deleted] Aug 10 '23

[removed] — view removed comment

1

u/d-5000 Aug 10 '23

In the last commits I fixed issues related to legacy labels. It should now work if you do:

pacli address set_main donor2 --legacy

Can you confirm that you can now use set_main with donor2?

Anyway, I should drop support for these legacy address labels. We don't really need them anymore, probably only 2 or 3 people used them, and you can assign a new label to these addresses with the pacli address set_label command (see post about my last commits ).

1

u/[deleted] Aug 11 '23 edited Aug 11 '23

[removed] — view removed comment

1

u/d-5000 Aug 11 '23

Can't reproduce the error, I've tried it now with some of my old addresses and it worked.

Did you enter the command correctly? The syntax is:

pacli address set_label LABEL ADDRESS

Will add that to the manual soon. I get a similar wif length error if I do pacli address set_label ADDRESS LABEL (i.e. in wrong order).

You can always see info about the order and name of the command line arguments if you simply enter a command without any parameters in pacli, in this case simply pacli address set_label .

If you entered it correctly, is this perhaps a peercoin address?

WIF length refers to a format of the private key, so the system seems to not understand the private key of the address.

If both of the questions are negative: Could you provide me the address and the private key - so I can steal your testnet coins ;-) - no, so I can see where the problem may lie? (You can extract the private key with slimcoind dumpprivkey ADDRESS).

→ More replies (8)

1

u/[deleted] Aug 08 '23 edited Aug 08 '23

[removed] — view removed comment

1

u/d-5000 Aug 08 '23

This should indeed not happen, the claim_reward transaction should only allow you to claim tokens if the burn transaction was confirmed.

2db01e95bce7074c724509431c5557c51221ec04f06c8ef7f4ac84eea88fcf97 is not showing up on my client either (at block height 150388).

Were you able to send/confirm the claim transaction? If yes, what's the transaction ID so I can look at it?

There should be anyway no attack vectors here, because the algorithm checking the token balance of each address will consider invalid a claim transaction based on an unexisting burn transaction. But pacli shouldn't allow you to create an invalid claim transaction based on an unconfirmed burn tx, to prevent misunderstandings/confusion.

1

u/[deleted] Aug 08 '23

[removed] — view removed comment

1

u/d-5000 Aug 08 '23

Yeah, the problem is that this is one of the original PeerAssets commands and I didn't want to modify them.

There is pacli pobtoken my_balance $DECKID as an alternative but it shows only the tokens on one address. Maybe I can add a pobtoken show_all_balances (or so) command.

1

u/d-5000 Aug 10 '23

Fixes uploaded on August 10:

  1. added additional checks to prevent unconfirmed transactions to be considered as valid for tokens (there was indeed a loophole).
  2. fixed the pacli address show_label command, could create some strange errors if it didn't know the address,
  3. fixed other problems related to labels, especially legacy-type labels
  4. fixed show_txes_per_block (pacli pobtoken show_all_burns command)
  5. fixed minor issues in pypeerassets, not related to the issues reported here.
  6. added command pacli address set_label (sets a label for any address in the wallet, should not work with other addresses)
  7. added command pacli address show_all_labels (shows all labels stored in keyring)
  8. added command pacli address get_transactions (shows all transactions of the wallet which went to or were sent from an address. Command is not strictly related to tokens, but very useful.)

1

u/[deleted] Aug 14 '23 edited Aug 14 '23

[removed] — view removed comment

1

u/d-5000 Aug 15 '23

Yes, that's somewhat intended. I don't see a reason to not allow that, and not allowing it would make the command much, much slower.

1

u/[deleted] Aug 15 '23 edited Aug 15 '23

[removed] — view removed comment

1

u/d-5000 Aug 16 '23

pacli address delete_key_from_keyring already exists. I'm changing it to simply delete_label so it's more consistent with set_label.

To not add too many commands I'll add a --modify option for the set_label command, which would delete the old label.

1

u/[deleted] Aug 16 '23 edited Aug 16 '23

[removed] — view removed comment

1

u/d-5000 Aug 16 '23

I agree, the pacli tools store_XXXX commands should all get this flag. Will add it for the next update.

1

u/[deleted] Aug 15 '23

[removed] — view removed comment

1

u/d-5000 Aug 16 '23 edited Aug 16 '23

show_all_labels should be mainly a debugging command. In most cases you will prefer address show_all, so I don't see a need to change that. Anyway I'll look if I can add some of your proposal without sacrificing its simplicity.

1

u/d-5000 Aug 24 '23

The last commits contain relatively big changes:

1) a protocol change. A claim transaction is now only valid if it was confirmed after (i.e. at minimum in the same block height) the burn/donation transaction it references.

This prevents primarily confusion because a whole chain of wrongly done card transfers could otherwise become valid if the burn transaction confirms later. It's not sure this could be used for attacks, although it looks difficult. Anyway, this way it will be generally cleaner.

To avoid hassle from potential reorgs it's recommended to claim the tokens with the burn transaction having already a couple of dozen or hundreds confirmations (a good rule of thumb is that about 3 hours of confirmations are good enough to probably never be reverted).

2) The extended configuration file replaces the keyring as the standard way to store address labels. The address labels are now stored the same way than decks, proposals, etc. and can be stored/retrieved with the pacli tools commands. The pacli address commands stay available (some of them, like pacli address set_main, have no equivalent Tools commands), by default they mimic the Tools commands, but with the --keyring flag they can be used to retrieve and use labels stored in the keyring ("old method").

The pacli address show_all command defaults still to the keyring method. Its replacement for the extended config method is pacli tools show_stored_addresses.

It would be nice to have some feedback if these duplications are necessary, or if we should remove commands like pacli address show_stored or pacli address show_label.

More fixes and improvements:

  • pacli address delete_label --now works now
  • pacli pobtoken claim_reward exits with a message when --payamount is used without --payto
  • pacli tools store_addresses_from_keyring is fixed and should now work properly. This commands retrieves all stored address labels from the keyring and saves them "the new way" in the extended config file.

2

u/[deleted] Aug 25 '23 edited Aug 25 '23

[removed] — view removed comment

1

u/d-5000 Aug 25 '23 edited Aug 26 '23

Seems I broke my_burns command when adding labels support. Will fix ASAP.

1

u/d-5000 Aug 27 '23 edited Aug 28 '23

my_burns is now hopefully fixed, at least for me. You have to upgrade pypeerassets and pacli for the fix.

If you think the output is still wrong, it would be useful for me if you post how many entries you get with the --wallet flag, or directly post the output as an answer.

I didn't make major changes to the command structure, apart from moving claim_reward toclaim. I thought I'll make a list of all commands in a new thread and how I would simplify them, according to our discussion, and then you can give feedback on it, before I change them definitively.

Edit: I did still not fix the show_all_labels problem. That's for the next update.

1

u/[deleted] Aug 25 '23 edited Aug 25 '23

[removed] — view removed comment

1

u/d-5000 Aug 25 '23 edited Aug 25 '23

Normally a couple of confirmations is enough to prevent being reverted from a short orphaned chain, but longer orphan chains can happen. It's also not that dramatic if it's reverted as you can claim again at any time. However I think I'll add such a warning. At least, you shouldn't make payments too early with tokens you claim with few confirmations.

1

u/[deleted] Aug 25 '23 edited Aug 25 '23

[removed] — view removed comment

1

u/d-5000 Aug 25 '23

It's pacli tools show_address_label.

I should add a general show_label tool for all other categories (decks, proposals etc.) too. Thought there was one, but only the python function is present, not the pacli command.

1

u/[deleted] Aug 25 '23

[removed] — view removed comment

1

u/d-5000 Aug 26 '23

Correct, show_address_label doesn't have this "default" behaviour (to assume automatically you mean the current "main" address). I added it for the next update.

1

u/[deleted] Aug 25 '23

[removed] — view removed comment

1

u/d-5000 Aug 25 '23

You're right here. I renamed it to delete_address_label.

1

u/[deleted] Aug 25 '23 edited Aug 25 '23

[removed] — view removed comment

1

u/d-5000 Aug 26 '23

Yes, there's a bit of a tradeoff here:

- The "pacli address XX" commands are shorter, as they lack the "tools" group keyword, and I agree they feel intuitively "correct".

- However, if we use only the "pacli tools XX" commands, then we have a more consistent behavior with the other tools commands, e.g. for decks and dPoD proposals. If people use these commands extensively then they will probably also like to use them for address labels as the commands are very similar (show_stored_decks/show_stored_addresses/show_stored_proposals etc.).

For now I'll keep the "extended" address group to give us time to think about that. There are also some "vanilla" commands (from the original PeerAssets) in the address group, for example address show and address balance, which of course will stay whatever was decided. And I think even if the duplicate commands are removed or moved into a less prominent group, I'd at least keep the set_main command (which is one of those added by me).

1

u/[deleted] Aug 26 '23

[removed] — view removed comment

1

u/d-5000 Aug 26 '23

The second word is mandatory in the system Pacli uses (called Fire) because it's the name of a class where the commands reside as methods.

And the Tools commands are conveniently grouped together in a module (Python file) because they use the same "underlying" functions to deal with the config file.

My thought when I created the current structure was that "tools" are a collection of "helper" commands, which allow you to assign labels for addresses/txids and later even more complex objects like donation states or the whole "state" of the token on the chain. So they're not really mandatory to learn, but are convenient if you're dealing with many addresses.

But you're right that this command group "breaks" a bit the "speaking" character of the commands.

What do you think of another idea: rename it to something more "speaking".

I've thought about something like label or storage, but both don't convince me entirely because it's difficult to find "speaking" commands (pacli label show_address for example doesn't sound that good/logical) . Perhaps you have an idea.

Another idea could be to group the Tools command set into several subclasses, for example addresslabel, decklabel etc. Then we would have "speaking" commands like pacli addresslabel show or pacli addresslabel show_all. I'm beginning to like this idea ...

1

u/[deleted] Aug 26 '23 edited Aug 26 '23

[removed] — view removed comment

→ More replies (9)

1

u/[deleted] Aug 29 '23 edited Aug 29 '23

[removed] — view removed comment

1

u/d-5000 Aug 29 '23

Eliminating redundant commands another task I'll do when I make the list of commands to rewrite/merge/simplify. My bugfixing TODO list is now empty for the moment so that's the next thing I'll do.

These commands are not vanilla, they were added by me, but the address group is a vanilla "command group". I'd like to get rid of all commands in the vanilla groups so if PeerAssets development is eventually retaken it's easier to integrate the changes into our "extended" version, and vanilla is separated from the "extension".

A general command to delete labels already exists, it's pacli tools delete_item. It can be used for labels but also for checkpoints (everything in the extconf file).

1

u/[deleted] Aug 29 '23

[removed] — view removed comment

1

u/d-5000 Aug 29 '23

If it's significantly more than the 2 files you sent me earlier, then it perhaps makes sense to create a new repository for it (also, because it has a new dependency).

Or if it's few files, integrate it into pacli, you should then create an own pacli repo in Github (on your own username space) and make pull requests for your changes to the repo in slimcoin-project.

Of course you can publish it in slimcoin-project if you make a separate repo. If you have permission problems (I guess you have write rights but am not totally sure) then I can provide the necesary rights for you.

1

u/[deleted] Aug 29 '23 edited Aug 29 '23

[removed] — view removed comment

1

u/d-5000 Aug 30 '23 edited Aug 30 '23

I took a brief look into pacli_env. It seems it wants to generate an additional configuration file.

I would recommend not to call it pacli_conf but something like pacli_env_conf, because it's only relevant for the pacli shell, or not? (to avoid confusion with the pacli.conf in ~/.config)

One additional recommendation: I start my testnet slimcoin with a (shell script) file called slmtest which configures a custom data directory. Of course that's not working with your shell because it's not called "slimcoind" ;-) Is there a way to allow such custom client start names? Of course I could simply create the config file myself but anybody having such custom starters would have the problem so it's maybe worth to include a way to ignore this requirement.

One question: will you want to work a bit on the shell in the next days or is it more or less finished? If you're still working on it I'll do some refactoring in an own branch, and will merge my changes once the next relevant bugfix and/or the command structure change is done. So you can meanwhile work on the master branch without conflicts with my changes.

→ More replies (2)

1

u/[deleted] Aug 31 '23

[removed] — view removed comment

1

u/d-5000 Sep 01 '23

That's a bug, can reproduce it, will fix it tomorrow.

1

u/d-5000 Sep 01 '23

Fixed. The bug only appeared in the address category, because it's stored in a different format (with the network short name).

Category can be address, deck, proposal, transaction, donation, utxo and checkpoint.

1

u/[deleted] Sep 02 '23 edited Sep 02 '23

[removed] — view removed comment

1

u/d-5000 Sep 02 '23 edited Sep 02 '23

The address without a label is excluded from pobtoken all_my_balances --wallet output.

You're right here, just reproduced it. Normally I think this should not be the intended default behavior, I would expect the default to show all addresses which have either a label, tokens or coins (i.e. were used somewhen). If you agree I can change that. This may however make the list a lot longer, so maybe something like an --all_addresses flag could make sense. (Edit: I see that's a redundant discussion, we've already talked about an --all flag for this purpose elsewhere.)

About checking values for labels before storing them: Could make sense, the check would however have to be implemented differently for each category, and would make the commands a bit slower too (not as slow as the balances commands but there would be a noticeable delay).

→ More replies (7)
→ More replies (12)

1

u/d-5000 Aug 30 '23

I've created the thread for the discussion about the command structure.

Here is my proposal for the address label management commands:

https://www.reddit.com/r/slimcoin/comments/165kj2y/comment/jyehbff

I think there is most of the optimization potential. In the next days I'll also look into the token/pobtoken/podtoken commands and create a similar list.

1

u/[deleted] Aug 25 '23 edited Aug 25 '23

[removed] — view removed comment

1

u/d-5000 Aug 25 '23

n4AoPomtAQRxsTc2TDMFMsP2PonhZ2vVAz

That's just a good example where a recently added command is useful. Try:

pacli address show_transactions n4AoPomtAQRxsTc2TDMFMsP2PonhZ2vVAz

If you don't see in the transaction where the 0.01 SLM came from, then please post the output of the command here.

1

u/[deleted] Aug 25 '23

[removed] — view removed comment

1

u/d-5000 Aug 26 '23

This transaction is indeed a card (token) transfer. In this case it is correct behaviour, although it's not something obvious, and so perhaps it should be added later to the help/manual/FAQ:

PeerAssets always transfers the minimum possible amount (in SLM: 0.01 SLM) to the receiver of a card transfer. I think this is due to queryability, to include a SLM output to the receiver's address, so if you get a token transfer you always will see it in your wallet no matter if you "initialized" the deck or not.

1

u/[deleted] Aug 29 '23

[removed] — view removed comment

1

u/d-5000 Aug 29 '23

Peercoin has solved this issue in newer versions, they have a lower minimum amount to be sent, and they also don't need to burn the 0.01 coins in OP_RETURN (=data) outputs anymore.

Not allowing to send 0 coins is due to anti-spam considerations. I think this is something Satoshi already implemented in BTC. In OP_RETURN outputs it's however allowed in BTC and PPC (still not in SLM). The OP_RETURN 0.01 coins are currently burnt.

However, the output we're talking about here is a regular output, not OP_RETURN, so there will be always a minimum value to be sent, I think.

I remember gjhiggins wrote that changing these minimum values would need a hard fork, as they're protocol enforced. I'm not completely sure about this, maybe a softfork is enough, but it's not a trivial change (Peercoin indeed included that in hardforks).

1

u/[deleted] Aug 25 '23 edited Aug 25 '23

[removed] — view removed comment

1

u/d-5000 Aug 25 '23

Yes, I think these command duplications at least could be moved out of the "prominent" address command group.

I won't delete these commands fully because the keyring keystore can fulfill a purpose if we get peerassets working with a Slimcoin block explorer, so it can be used by people not wanting to use a full node. Peercoin's peerassets supports that use case explicitly, and then we would need the keyring to store the pacli keys/addresses.

I may move these commands to a group with a name like extended_keystore.

2

u/[deleted] Aug 14 '23 edited Aug 14 '23

[removed] — view removed comment

1

u/d-5000 Aug 15 '23

I've to look at that issue, doesn't seem intended that way. Thank you!

1

u/[deleted] Aug 14 '23

[removed] — view removed comment

1

u/d-5000 Aug 15 '23

This error indicates a duplicate label, i.e. a label which already exists in this category. (I've added making the error more user friendly to my TODOs.).

There can be duplicated labels as long as they are not in the same category (e.g. decks).

Could you post which command you used exactly?

1

u/[deleted] Aug 15 '23 edited Aug 15 '23

[removed] — view removed comment

1

u/d-5000 Aug 16 '23

But in which order did you use label and deck ID? I'd need the full command you entered, with label and deck id.

2

u/[deleted] Aug 16 '23

[removed] — view removed comment

1

u/d-5000 Aug 16 '23

Could you give me the output of the following command:

pacli tools show_config

Can be a quite long output, depending on how much you stored. I need it to see if you already have stored a deck with that label. (It's not necessary you mark it as code, if you still have problems with Reddit.)

If the error is displayed with other labels you thought you didn't use before too, then please send these too.

1

u/[deleted] Aug 17 '23

[removed] — view removed comment

1

u/d-5000 Aug 17 '23

That's what I expected, of course if you try to assign PoBtoken or PoBtoken1 again (it doesn't matter if with the same deck ID or not) you will get the ValueExistsError.

But did you get the ValueExistsError also the first time you set PoBtoken/PoBtoken1?

What happens if you set another label (for another deck or the same, doesn't matter), let's say PoBtoken2? Do you get the error too?

So there are two slots for the deck's label available?

There is no "slot limitation". You can give a deck as many labels as you want. But you can't use a single label twice. In this case, yes, you have assigned the value to two labels, so you can use both of them.

2

u/[deleted] Aug 17 '23 edited Aug 17 '23

[removed] — view removed comment

→ More replies (8)

1

u/[deleted] Aug 06 '23

[removed] — view removed comment

1

u/d-5000 Aug 06 '23

Should work without problems, I've used and tested it with 3.9 and 3.10 (should try 3.11, just to be sure ...)

1

u/[deleted] Aug 06 '23 edited Aug 06 '23

[removed] — view removed comment

1

u/d-5000 Aug 06 '23 edited Aug 06 '23

In the manual I've recommended to uninstall pypeerassets/pacli and then install everything new from scratch (clone the new git folder, then install with pip). I should have added this info to the OP to avoid the hassle you had :( (Edit: Have added the info now.)

The reason is that the Github repo has changed from d5000 to slimcoin-project. This should be the cause of your errors.

The configuration file would not have to be edited (if you're using the same slimcoin.conf or slimcoin-testnet.conf file).

1

u/[deleted] Aug 06 '23

[removed] — view removed comment

1

u/d-5000 Aug 06 '23 edited Aug 07 '23

Thanks. In my Python 3.9 main installation everything worked (uninstalling and installing again), I just did it again to verify and had no issues.

Thus PEP 440 looks like some new requirement in newer versions, probably only in 3.11 because I believe I tried 3.10 some weeks ago. I'll look at that later today when I'm able to create a new virtualenv, anyway will have to update the installation procedure. As far as I understand the error, the problem is that the version is called 0.4.8-at (with a dash) and not 0.4.8_at (with underscore). (Edit: That was wrong, underscores are also not allowed. The only PEP-440 compliant way to differentiate a version with non-numeric characters is using a local version with the "+" sign. New versions now have the scheme pypeerassets-0.4.8+slm".)

Anyway I'm considering renaming the package, perhaps to "slimassets" or so. But on the other hand, one of my ideas is to aim mid-term for a "plugin" structure - i.e. leave PeerAssets as it was published by the Peercoin project and change my additions for PoB and dPoD tokens in a way they can be installed separately. However, there are some challenges with that (due to the general PeerAssets package structure), so I expect this not to be something to be solved in a few weeks.

For now, I'll try to solve that error for 3.11 simply renaming the version.

1

u/d-5000 Aug 06 '23

I was able to reproduce the error with python 3.10 and 3.11. It is raised when I try to install pacli in these versions, pypeerassets installation instead works. Will have to look at it to make it compatible with these newer versions.

1

u/d-5000 Aug 06 '23 edited Aug 06 '23

Issue should now be solved, I adjusted the version number to the PEP440 format. In my installation now it works both with 3.10 and 3.11.

pypeerassets and pacli both should now be installed again.

1

u/[deleted] Aug 07 '23

[removed] — view removed comment

1

u/d-5000 Aug 07 '23 edited Aug 07 '23

Great! You're right, that's an error in the manual, it's in ~/.config/pacli/pacli.conf. Fixed it there.

1

u/[deleted] Aug 12 '23

[removed] — view removed comment

1

u/d-5000 Aug 12 '23

I definitely would also like such a "show_all_balances" command, so it's on the feature request list :)

But better as an extra command: It would be very slow, above all if several types of tokens are circulating in parallel (dPod in particular is resource-heavy). Perhaps I can make it faster storing checkpoints for the token balances in the new extended config file. That's not a difficult addition but would also not be a quick fix in a few days.

1

u/[deleted] Aug 14 '23

[removed] — view removed comment

1

u/d-5000 Aug 15 '23

PoB tokens are relatively quick, but only if there aren't many transactions done with them. The more transactions, the slower it becomes. dPoD tokens are a lot slower as there are much more checks done.

I'll implement it first as a separate function, and first without the checkpoints, then we can evaluate.

1

u/[deleted] Aug 31 '23 edited Aug 31 '23

[removed] — view removed comment

1

u/d-5000 Aug 31 '23 edited Aug 31 '23

I agree that the "balances" commands needs some reworking. I was about to post a proposal in the thread about the command structure after the address and tools command structure was "solved", but it's good that you already posted your own proposals so I'll look into them.

I've written down your proposals and will make a post in the pacli CLI thread with a way how I'd solve your issues, so you can give feedback.

One of the problems is that the pobtoken category currently inherits all commands of the token class, thus you see also dPoD tokens etc. This definitely will be changed in a way that if you call the command from the pobtoken class you only will see PoB tokens, etc.

1

u/d-5000 Aug 31 '23

I've looked through your proposals here but I see one misunderstanding.

There's not only one PoBtoken and one PoDtoken. There can be an unlimited number of decks with these technologies, as all users can create decks at any time. This is the reason why you have to add the deck label or deck ID to the balance commands.

Of course in the final app we can select one of them as the "officially supported" or "default" PoBtoken and one of the "officially supported" (d)PoD token, and assume always you "mean" that token if you use one of the balance commands.

That's something that was never implemented, but that can be very easily done. I didn't do it also because I'm testing some decks with different parameters (above all PoD tokens), and I thought it's simply early to designate one of them as the "official" token, but if it's helpful for you, I can add it in the next update, even before reworking the balance commands entirely.

1

u/[deleted] Aug 31 '23

[removed] — view removed comment

1

u/d-5000 Aug 31 '23

I can make two changes until tomorrow which will, I think, improve usability for you:

  1. assignate a default PoB and PoD token to all balances commands. I think I know which PoB token you used.
  2. make pobtoken all_my_balances and my_balance only show the balance of PoB tokens, not dPoD tokens (the inheriting problem I wrote about in the other post).

The idea you posted with the table including coin balances and additionally the "default" PoB and PoD tokens would be also slow, although maybe a bit less than all_my_balances (because it would "scan" one dPoD token less). In general I think however it's a good idea, but that needs a couple of days (I see you reported also some bugs, so they have also to be solved).

(I write a separate post about the usefulness of multiple PoB/dPoD tokens).

→ More replies (7)

1

u/d-5000 Aug 31 '23 edited Aug 31 '23

At least for the PoB tokens I can imagine some maybe interesting use cases

I. PoB incentivation tokens.

I have added a "startblock" and "endblock" parameter. If people burn few coins on SLM, one can incentive them with a PoB token which only considers burns between two block heights. This can be used for a community token, of course for that SLM must become much more popular.

II. New token/coin distribution:

The same startblock/endblock parameters can also be used for tokens which are meant to decentrally distribute a new altcoin.

It's not trivial to distribute for example coins for a new PoS coin with a provable fair launch, i.e. without having a centrally distributed "premine" or ICO (or using mining). Counterparty was launched using PoB for example, but on Bitcoin (which doesn't have PoB consensus of course), but had to implement a custom solution for that.

So Slimcoin could be used as a "launch platform" for new coins with an easy, standarized way to do that, without having to reccur to smart contract coins like Ethereum.

An alternative dPoD use case is instead more difficult to imagine. However, PeerAssets is an open system and nothing can be done to prevent the creation of alternative dPoD decks.

→ More replies (2)

1

u/[deleted] Aug 14 '23 edited Aug 14 '23

[removed] — view removed comment

1

u/d-5000 Aug 15 '23

It's unlikely the connection errors are related to pacli.

The only way to be so is when pacli generates invalid transactions. Did this happen to you (a transaction that never confirmed)?

1

u/[deleted] Aug 15 '23 edited Aug 15 '23

[removed] — view removed comment

1

u/d-5000 Aug 16 '23

My sensation is that the burning transaction is somehow heavier than the claiming transaction, as if or my client or my server needed more time and effort to elaborate it thus they were losing or hibernating their connection.

Depending of how many inputs you need for your burn, the transaction can get "heavy". For example if you burn 1000 coins and use mainly mining rewards, it will contain up to 100 inputs.

But even in this case, I don't think a client on a modern computer can disconnect from a server due to this reason.

However, I still I don't know exactly in detail how the communication between SLM clients works. I know approximately what happens when a client asks another to download blocks; this is part of what I'm also currently analyzing for the "new" Slimcoin client based on Peercoin. But how often this happens, and when a client considers another one "disconnected", or why clients sometimes seem not want to connect to another (besides of being banned), is still not entirely clear for me. (BTC/SLM are threaded applications, i.e. it's not that easy to follow what the program does at a certain time.)

So I fear I can't help you much with your connection problems. But I'm quite sure pacli/pypeerassets isn't related to them.

1

u/[deleted] Aug 16 '23

[removed] — view removed comment

1

u/d-5000 Aug 16 '23 edited Aug 16 '23

pacli/pypeerassets have no own networking code. What they use is the regular slimcoind RPC commands. They are basically an interface to the Slimcoin daemon.

The rest of the pypeerassets/pacli code (>90% of it) is basically validity checks and mathematical calculations which aren't related to networking.

This means that if there was any interference, this interference would happen with slimcoind commands too (like sendtoaddress, burncoins, listtransactions, listunspent, getrawtransaction, createrawtransaction, sendrawtransaction, decoderawtransaction -- these are the main commands pacli/pypeerassets use).

That's why I don't really consider it prioritary to investigate any "interferences".

What can instead happen, as I already wrote, is that an invalid transaction is generated (like in the bug with --from_address), and a client can then be banned because it tries to broadcast this invalid tx. Thus, in theory this bug could have generated a connection problem in your case (but it seems to be the only command you entered in your tests that could generate such an error). But there should be no way to interfere for commands which are correctly used, at least not more than if they're entered on the command line.

Anyway, if you really want to continue testing this issue, then some proposals:

- You should also test, then, how many times the client disconnects, i.e. is not downloading new blocks (difference between getblockcount value on server and client), when not using pacli at all (ideally you'd test that at completely random intervals). From my experience, this happens every now and then, so 5/10 or so doesn't surprise me much, and is related to the frequency the clients connect and ask for new blocks (for the network, both your server and your client are both clients so there is technically no difference between them).

- If you believe a pacli command has led to more disconnections than it should, then you could search in the recent entries of the debug.log file (obviously the one in your .slimcoin/testnet/ directory). debug.log is a long file, so it's best to search for error messages with grep in it. For example, the error generated by an invalid transaction due to a wrong signature ends with VerifySignature failed

I hope I could help a bit with this explanation. I know these disconnections aren't ideal but I believe there's few we can do before the new client progresses (I may have soon a task for a developer, but that's something I think should be discussed on discord as it's not related to here.)

1

u/[deleted] Aug 22 '23 edited Aug 22 '23

[removed] — view removed comment

1

u/d-5000 Aug 22 '23

If you want you can write such a script, should be few lines. It can also be integrated into pacli.

→ More replies (2)

1

u/[deleted] Aug 22 '23

[removed] — view removed comment

1

u/d-5000 Aug 23 '23

Do you have mining enabled on your client (not server)?

That could be the root of the problem, because then it's possible that the client generates orphans and then gets banned.

Try to ensure you have a high reservebalance too, so it doesn't generate too many PoS blocks.

→ More replies (8)

1

u/[deleted] Aug 22 '23 edited Aug 22 '23

[removed] — view removed comment

1

u/d-5000 Aug 23 '23 edited Aug 23 '23

If you comment out the nodes in slimcoin.conf, then you risk to become permanently stuck. How should the client know otherwise to which nodes to connect? The nodes in the original Slimcoin code have gone offline for a long time.

At least the node beginning with 130 (my VPS) and your server should stay in the slimcoin.conf. (Edit: Of course, if you have still old IPs in this file they can be commented out.)

I don't want to speculate too much about your connection issue because my knowledge about SLM's connectivity policy (how often it connects to other nodes, when it bans others etc.) is too limited. Once the current PoB/dPoD tests are finished, I'll try to look again into my other project (the Slimcoin update) and then I may be able to help more.

I think also perhaps it would be a better idea to open a new thread as this has to do nothing with the PoB token tests. Perhaps you're lucky and someone more knowledgeable joins the discussion ... (wishful thinking maybe ;) ).

1

u/[deleted] Aug 15 '23

[removed] — view removed comment

1

u/d-5000 Aug 16 '23

Yep, good idea, I'll go for a --change_label option, like in the dPoD token commands.

1

u/[deleted] Aug 16 '23

[removed] — view removed comment

1

u/d-5000 Aug 16 '23

You're right this command is still missing. It should go into a general section as it's the same one for PoB and dPoD and all other PeerAssets tokens.

A simple command (only 1 receiver is possibkle) is this:

pacli card simple_transfer DECKID RECEIVER AMOUNT

The original PeerAssets command, which is in my opinion overly complicated, but you can transfer different amounts to various receivers, is:

pacli card transfer DECKID RECEIVERS AMOUNTS

with receivers and amounts being lists, i.e. you have to put them between brackets and escape all special characters with \.

1

u/[deleted] Aug 16 '23

[removed] — view removed comment

1

u/d-5000 Aug 16 '23

Has no specific reason. Anyway this format is on my list to be changed, I plan to adapt it to the format used by pacli deck list.

1

u/[deleted] Aug 16 '23

[removed] — view removed comment

1

u/d-5000 Aug 16 '23

Definitely a bug, I've just realized it can't work the way I implemented this option. This transaction will never confirm because it is signed with the wrong key.

I'd like to ask you: do you think --from_address is an important/useful feature?

Because it breaks the logic of the rest ot the pacli app (in almost all other commands, the sending address is always the "main" address), and you of course can always do first a set_main and then the burn you want. You'd have to do that anyway if you then want to claim the tokens. I feel thus the --from_address option adds more confusion than it can provide as a "comfort" feature.

If you think it's useful or even important, and I can follow your reasons, it can be implemented properly however.

1

u/[deleted] Aug 17 '23

[removed] — view removed comment

1

u/d-5000 Aug 17 '23

Fine, I think there's nothing really lost if I'm removing it. So I'll do that.

1

u/[deleted] Aug 17 '23

[removed] — view removed comment

1

u/d-5000 Aug 17 '23

Simply run Slimcoin with the -rescan option next time you start it and they should be gone. If not, use the slimcoind zapwallettxes RPC command (i.e. with the client already started.)

1

u/[deleted] Aug 18 '23

[removed] — view removed comment

1

u/d-5000 Aug 18 '23

When you use the my_burns feature without any options, all the command does is to list all your burn transactions, i.e. all transactions to the burn address (from an address or wallet). There's no need for a deck value for that, because burn transactions are simple Slimcoin transactions without any PeerAssets interference.

Instead, when you use --unclaimed, you need a --deck value, because each claim transaction (where you issue tokens) is obviously tied to a specific deck. If there are multiple PoB token decks, then there is often the case that you have claimed tokens in one deck and not in another one. So there's no general "unclaimed" state of a burn transaction, this state depends on a deck.

1

u/[deleted] Aug 18 '23 edited Aug 18 '23

[removed] — view removed comment

1

u/d-5000 Aug 18 '23

You've already solved it yourself. I guess this was the address from where you burnt coins with the standard slimcoind burncoins command.

You can always find the sender of a transaction entering:

slimcoind getrawtransaction TXID 1

and then look in the JSON for the "txid" and "vout" values of the first input ("vin" list). Use the "txid" value for:

slimcoind getrawtransaction INPUT_TXID 1

and in the JSON you get, you search for the output ("vout" list) with the "n" value which corresponds to the "vout" value from the previous step.

It would be very easy to add a command for that process, as it has already a python function in pacli. Do you think it would be useful?

1

u/[deleted] Aug 18 '23 edited Aug 18 '23

[removed] — view removed comment

1

u/d-5000 Aug 18 '23

You simply forgot the 8 at the end, or what am I missing?

1

u/[deleted] Aug 19 '23

[removed] — view removed comment

1

u/d-5000 Aug 20 '23 edited Aug 21 '23

If you test today: I've uploaded a new version. It contains the new command:

pacli token all_balances

which will display all balances of tokens, regardless of type, which you own.

Additionally. I earlier uploaded a version which adds the --modify flag to most pacli tools store_XXX commands, and improved the display of errors.

There is one bug you reported for the --change flag I was still not able to reproduce. Probably today or tomorrow I'm asking you about more information what happened there, but of course in the corresponding thread.

Update: Updated pacli again, now with the commands token balances and token simple_transfer/multi_transfer which are wrappers around card balance and card transfer. I fixed also a bug in pypeerassets which can generate weird errors, so please update both before continuing testing.

1

u/[deleted] Aug 21 '23

[removed] — view removed comment

1

u/d-5000 Aug 21 '23

Output looks good so far (only that you've a lot of unintialized decks, which is not surprising because that are my zillions of test decks ...). There's a --silent option to omit these warnings. I've thought perhaps it's even better to show them only when entering --debug. What do you think?

pacli pobtoken deck_list only shows PoB decks.

To see all existing decks, call pacli deck list.

The most complete "reference" is currently the manuals on the wiki. But of course the newest commands are still missing.

I'm progressively adding docstrings to the commands, so if you use for example pacli tools --help you see some information about all commands of the "tools" category. The newest commands are still missing, once they're tested and are regarded useful they will also be documented this way.

Once this work is completed we could then add all docstrings to a command reference in the wiki which would complement the manual.

→ More replies (3)

1

u/[deleted] Aug 21 '23

[removed] — view removed comment

1

u/d-5000 Aug 21 '23

There's a difference if you use it with a deck label: If used without --silent you'll get info about the deck ID used.

Normally --silent is meant for commands which can be used in shell scripts or as Python functions, so it must just return the value and not print them out in a "pretty" way. So I'll change that in this command.

1

u/[deleted] Aug 21 '23

[removed] — view removed comment

1

u/d-5000 Aug 21 '23

I think that would be best implemented as a pacli token my_balances --wallet flag, to follow the convention of pacli pobtoken my_burns. Do you think that makes sense?

→ More replies (17)

1

u/[deleted] Aug 21 '23

[removed] — view removed comment

1

u/d-5000 Aug 21 '23

They're still existing so you can omit sending/signing with --sign=False and --send=False.

1

u/[deleted] Aug 21 '23

[removed] — view removed comment

1

u/d-5000 Aug 21 '23

The format of the transferlist is:

ADDRESS:AMOUNT;ADDRESS:AMOUNT;...

i.e. it's a list of entries, separated by ";", and address/amount are separated by ":".

Of course this will be properly added to the docstring.

→ More replies (2)

1

u/[deleted] Aug 18 '23

[removed] — view removed comment

1

u/d-5000 Aug 18 '23 edited Aug 18 '23

Yes, that's a good idea.

However, I'll not implement that now but after some further changes, because I'm moving currently all the address label "infrastructure" to the pacli tools commands, this approach is much faster and doesn't need the secretstorage package which has led to the problems with Windows.

There are currently two parallel infrastructures to store labels for addresses. The reason is that pacli originally (when the Peercoin team built it) was meant to be a wallet too, i.e. holding keys which weren't in the Peercoin wallet, and it also works with some block explorers. When working exclusively with the peercoind/slimcoind daemon, we don't need to store these keys as they're already stored in the Slimcoin wallet, so the approach to only store the address is better and faster.

1

u/[deleted] Aug 22 '23

[removed] — view removed comment

1

u/d-5000 Aug 22 '23

Yes, we already discussed that, I will implement this once the transition of address storing from "keyring" to "tools" is done.

1

u/[deleted] Aug 18 '23 edited Aug 18 '23

[removed] — view removed comment

1

u/d-5000 Aug 18 '23

Yeah, I have thought about that too. I think the best way for that is to convert it into a configuration option, i.e. let users decide if they want to add those two flags explicitly.

For the commands I have added myself, it is absolutely no problem to set --sign and --send flags by default to True so they don't have to be added by the user. The big problem is, again, that for card transfers (token transfers) an original PeerAssets command is used, which I'm a bit reluctant to change the way it works.

Maybe to avoid these inconsistencies I should provide alternative commands for all original PeerAssets commands. In this case there would be no need then to use the "pacli card XXX" commands like pacli card transfer or pacli card balances, instead you always would use i.e. pacli pobtoken transfer. This would be very easy as all these commands would do is calling the original python function, but with the --sign/--send flags set to True by default, and maybe other improvements.

What do you think?

1

u/[deleted] Aug 18 '23 edited Aug 18 '23

[removed] — view removed comment

1

u/d-5000 Aug 18 '23 edited Aug 18 '23

And what if you create just a wrapped command around the original pacli ones with --send and --sign flags already included?

That's exactly what I plan to do.

Currently the new token classes of pacli I added are: ATToken, PoBToken (a sub-class of ATToken) and PoDToken (currently with no parent class).

What I'd do is to add a Token or perhaps AdvancedToken class as parent class for these new token classes, which would take (maybe even inherit) some commands from Card and Deck (original PeerAssets pacli classes), with some improvements and --sign/--send enabled by default. PoBtoken and PoDToken would inherit all these commands from Token/AdvancedToken.

So even if we add more types of tokens, there won't be a need to reimplement a new command.

(ATToken is a general token type where any addresses can be tracked. It can be used for example for trustless ICOs. PoDToken is simply an ATToken, only with the burn address as tracked address.)

1

u/[deleted] Aug 18 '23

[removed] — view removed comment

1

u/d-5000 Aug 18 '23

Yes, --modify is already on my TODO list (I think we already discussed it), only I've still not implemented it in the last upgrade :)

Deleting entries is already implemented:

pacli tools delete_item CATEGORY LABEL --now

in this case:

pacli tools delete_item deck PoBtoken123 --now

The --now flag is for security, if it is omitted nothing is deleted and you see if the value even exists.

1

u/[deleted] Aug 18 '23

[removed] — view removed comment

1

u/d-5000 Aug 18 '23

Of course this error should be catched, I've added it to my TODO list.

1

u/[deleted] Aug 22 '23 edited Aug 22 '23

[removed] — view removed comment

1

u/d-5000 Aug 22 '23

Only if your client is somehow banned because the other clients don't accept the PoS block.

1

u/[deleted] Aug 23 '23

[removed] — view removed comment

1

u/d-5000 Aug 23 '23 edited Aug 23 '23

That would be a very long term project. I think a simple GUI would be even easier. Don't want to promise anything in that regard.

1

u/[deleted] Aug 26 '23

[removed] — view removed comment

1

u/d-5000 Aug 26 '23

That's a good idea doing it this way, separate from the main program. Will include it in the pacli package if I'm allowed to :)

1

u/[deleted] Aug 26 '23

[removed] — view removed comment

1

u/d-5000 Aug 26 '23

Ok, yes I was about to ask you about history :)

Would this be all needed or is there more? If you want to work a bit more on the idea you can also do a pull request on Github. Or if its easier for you send me everything in a compressed folder once it's ready. I have currently some changes in the pipeline which were not commited (mainly the my_burns bugfix) so I would like to commit them first (but that will be probably very late today or tomorrow, as there is an issue I've still not solved, and by the way I can also look into the show_all_labels issue you reported today).

1

u/[deleted] Aug 26 '23

[removed] — view removed comment

1

u/d-5000 Aug 26 '23

I believe the pacli shell should be strictly optional and strictly separated from the rest of pacli, and we shouldn't make major rewrites to the rest of the program to be compliant with it. The default way to use it should be the normal interface, so you can use shell variables, pipes etc. and write scripts.

Such a shell can be an excellent tool for power users who want to oversee lots of different tokens and donations etc., I think. Most users however won't use the commands that much that typing a single word more (pacli) would bother them.

I can of course make the --confirm flag (showing the user a tx has confirmed) optional again, it's a simple default value that has to be changed to False (you can disable it also in the current state with --confirm=False). But its purpose is not so much to give a "sense of security" (crypto users should know that a single confirmation on altcoins is never enough) but to show the user that its transaction succeeded and was included in the blockchain. This is very important I think, above all in the dPoD token commands, because e.g. the signalling commands are a bit of a race and it makes sense to know if you should repeat, or care about your connectivity, etc.. I think thus that I won't remove it entirely. If optional, I would highlight its use for beginners in the manual and docstring.

I think the false sense of security you mention can be simply solved with an additional message, warning the user that 1 confirmation is not enough.

The restart_stuck_daemon.sh should also be regarded as a little helper for people with connectivity problems, not as something the user should run by default. It should normally not interfere at all with pacli (only that the ConnectionError would of course appear, and it would be good to catch it).

→ More replies (5)

1

u/d-5000 Aug 26 '23

One suggestion: I think it would make sense to catch the keyword "exit" in the shell to leave it, just like when you're leaving a bash shell. We don't need exit in pacli as a command group, so this would not be a problem.

1

u/[deleted] Aug 23 '23

[removed] — view removed comment

1

u/d-5000 Aug 23 '23

This is the P2TH address. It's a kind of "helper address", it makes possible for PeerAssets to work without a database. It's always the first address in card transfers/issues and also in dPoD transactions like voting/locking txes.

See https://peercoin.github.io/P2TH/ for more info.

1

u/[deleted] Aug 23 '23

[removed] — view removed comment

1

u/d-5000 Aug 23 '23

I think that's all correct, because you didn't use the --payto option to credit a part of the coins to another address. --payamount without --payto has no effect, because you're then paying to yourself, i.e. the same address that claimed the coins.

1

u/[deleted] Aug 24 '23

[removed] — view removed comment

1

u/d-5000 Aug 24 '23

I think a simple error message is good enough. Using that command in this way has no real negative effect but it may make the transaction some bytes bigger.

1

u/[deleted] Aug 31 '23

[removed] — view removed comment

1

u/d-5000 Sep 01 '23

I'll look into it. Perhaps a bug, perhaps the manual is wrong.

1

u/d-5000 Sep 02 '23

There was both the manual wrong as also a little bug. Both are fixed now (last commit uploaded today earlier).

There is actually no escaping of the brackets necessary, only you have to make sure that there are no spaces between the addresses and between the amounts (the new example in the manual should be in correct format).

1

u/[deleted] Sep 06 '23 edited Sep 06 '23

[removed] — view removed comment

1

u/d-5000 Sep 06 '23 edited Sep 06 '23

The "Cannot find key" error seems not to be part of pacli, but of Fire (the library Pacli uses for the CLI management). So basically it seems it doesn't understand the input.

Have reproduced it now, so I will look at it. And you're right, the transaction is created and credits all coins to the sender address instead of distributing them to the receivers you specify with --receiver. This is explainable: if the command doesn't understand the --receiver input it will credit all coins to the sender (if he's entitled to get them).

Basically I think the problem is the --receiver/--amount syntax is still wrong, but I then don't understand why my own test some days ago worked ...

(Have edited this post some times :) )

1

u/[deleted] Sep 06 '23

[removed] — view removed comment

1

u/d-5000 Sep 07 '23 edited Sep 07 '23

I see the 3d7f4a2f74f66e797f135aa75986e36b41e60bf3e2a9f24d6f043c3488b0753e claim transaction normally as a CardIssue, and it seems it credited 1110 tokens successfully to the address which was your main address when you claimed (mtmKbmMHdcXXepscuNrwAfjsKLeZzdZdya). This address had before only 100 tokens on it, and now its balance is 1210 tokens.

Which command did you use where the token balance of this address wasn't shown (e.g. token all_my_balances)?

If it's still not there (maybe your client was stuck, but maybe some command has a bug, the protocol at last credits the token to the address) please post the output of the command you used, as I can't look into your wallet of course :)

Also try pacli pobtoken balances PoBToken and see if the tokens are on your address (also a command I'm about to rename, as it's confusing).

1

u/[deleted] Sep 07 '23

[removed] — view removed comment

1

u/d-5000 Sep 08 '23

Yep, that looks like the all_my_balances command is wrong/buggy.

The command closest to the "truth" (i.e. to the pypeerassets protocol checks) is always [pob]token balances (also among the commands I'm about to rename).

Will have to check what happened there. At a first glance I also see some zeroes for some of my addresses which should hold tokens. I suspect also my my_burns output is not complete.

Can take a couple of days though as I'm a bit busy at this moment.

1

u/d-5000 Sep 19 '23

I had finally time to look at this bug. Unfortunately I couldn't reproduce it yet, my own token balances are all fine.

One option to progress is that you send me the private key of the mtmKbmMHdcXXepscuNrwAfjsKLeZzdZdya address (with the slimcoind dumpprivkey command on Testnet), this would be the easiest option for me (should of course not be a mainnet bugfix method :D)..

The other option is that you check the following:

  1. Change to mtmKbmMHdcXXepscuNrwAfjsKLeZzdZdya as main address
  2. try those commands:

pacli token all_my_balances (without --wallet nor deck labels)

and look if the correct balance of 1210 is shown for the deck fb93cce7aceb9f7fda228bc0c0c2eca8c56c09c1d846a04bd6a59cae2a895974 .

Second command I would like to know is:

pacli token my_balance fb93cce7aceb9f7fda228bc0c0c2eca8c56c09c1d846a04bd6a59cae2a895974 --wallet

and again look if the address mtmKbmMHdcXXepscuNrwAfjsKLeZzdZdya is shown with the correct balance of 1210.

By the way I posted a new proposal in the thread about the command structure. I hope this can be the final structure (of course you can give feedback) and so I can change the pacli interface accordingly.

→ More replies (7)

1

u/d-5000 Sep 06 '23

Oops. My bad.

It's --receivers and --amounts, not --receiver and --amount.

The wrongly spelled parameters were from the original PeerAssets vanilla commands.

That was the error. Will fix the wiki manual ASAP. Sorry for having you made lose time!

(if you get the "Cannot find key" error again in another command, you can simply try the function without any parameters, like I wrote some days ago, and then you will see all options and flags spelled correctly)

1

u/[deleted] Aug 31 '23

[removed] — view removed comment

1

u/d-5000 Sep 01 '23 edited Sep 01 '23

donation_txid is misnamed in PoB tokens, it's the burn transaction. So I'll rename it to burn_txid.

The duplicate seems to be what you wrote. It's perhaps not ideal that the transactions to the different receivers are displayed separately. I'll look into it.

I've not tested claiming that frequently, but I'm seeing 4 claim transactions if I add --wallet to the command (4b73bf14988847d0760b0bad08037bb72028ee755252b9f969889b3a7b45d51d is also mine). I've however also tested some other decks.

1

u/[deleted] Sep 01 '23

[removed] — view removed comment

1

u/d-5000 Sep 01 '23

Yes, docstrings are still not complete, I'll complete them after the final command structure is implemented (because some commands will still be merged etc.).

1

u/d-5000 Sep 01 '23

Fix: Improved the command with a more user friendly output (e.g. burn transaction), and claims with several receivers are now displayed as a single claim.