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

Asset name restriction error with createrawsendfrom #54

Open
fonimus opened this issue Mar 13, 2018 · 4 comments
Open

Asset name restriction error with createrawsendfrom #54

fonimus opened this issue Mar 13, 2018 · 4 comments

Comments

@fonimus
Copy link

fonimus commented Mar 13, 2018

Apparently we can create assets with names which do not respect the 32 characters limitations. Those assets become unusable with their names. We are currently in production with multichain 1.0.2.

How do you think you will correct this issue ?

Here is the scenario to reproduce bug:

createrawsendfrom "<my-address>" '{"<my-address>": {"issue": {"raw": 3}}}' '[{"name": "1234567890123456789012345678901234567890"}]'
>> <hex>
signrawtransaction <hex>
>> <hex>
sendrawtransaction <hex>
>> success
listassets "1234567890123456789012345678901234567890" true
>> Could not parse asset key: 1234567890123456789012345678901234567890
listassets "*" true
[ ...
    {
        "name" : "1234567890123456789012345678901234567890",
        "issuetxid" : "8ab44b100220333cdff196c763e4ff676460c4d94ec687eb28005417e058e977",
        "assetref" : "60-265-46218",
        "multiple" : 1,
        "units" : 1.00000000,
        "open" : false,
        "details" : {
        },
        "issueqty" : 3.00000000,
        "issueraw" : 3,
        "subscribed" : false,
        "issues" : [
            {
                "txid" : "8ab44b100220333cdff196c763e4ff676460c4d94ec687eb28005417e058e977",
                "qty" : 3.00000000,
                "raw" : 3,
                "details" : {
                },
                "issuers" : [
                    "<my-address>"
                ]
            }
        ]
    }
]
@gidgreen
Copy link
Contributor

gidgreen commented Mar 13, 2018

This may just be an issue in reading the asset name for the listassets API, because the value that you passed looks like a txid, rather than a genuinely inaccessible asset. Please try using a different identifier instead of the name, e.g. the issuetxid or assetref. These also work throughout all APIs as allowed substitutes for the asset name.

@fonimus
Copy link
Author

fonimus commented Mar 13, 2018

In listassets api call, I get an exception because I think the name I give is more than 31 characters.

I can still use the created asset via the issuetxid or the assetref once transaction has been confirmed.

The main issue is that there is no control over the asset name while performing createrawsendfrom, so I wonder if there will not be any side effects with those created assets which have a too long name (over 32 characters)

@gidgreen
Copy link
Contributor

You should be able to use the issuetxid even before the asset is confirmed. We will check into this but it should be fine to work around it for now.

@gidgreen
Copy link
Contributor

gidgreen commented Jun 7, 2018

Version 1.0.5 of MultiChain has just been released, and it should fix this.

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

2 participants