Skip to content

fix datacarrier related command-line args#619

Merged
ca333 merged 2 commits intodevfrom
patch-data-carrier
Aug 19, 2024
Merged

fix datacarrier related command-line args#619
ca333 merged 2 commits intodevfrom
patch-data-carrier

Conversation

@DeckerSU
Copy link
Copy Markdown

No description provided.

@smk762
Copy link
Copy Markdown

smk762 commented Jun 12, 2024

Tested with increasing sizes of data field in "createrawtransaction". Results below:

komodo-cli createrawtransaction "[{"txid":"615f0df4648f98ec02ad980b41855317bf3ab5c0e27e7a6283a1997dc2f6f7e9","vout":0}]" "{"REVtLSPkPe8P7aQsKeWWwuwfUntfBnK9pp":2, "21038f274b15fe3288f8601e3a73d6aea6564f734482e9c7b182e5233851ae4e9020ac":0.637, "data":"566F746520666F7220447261676F6E686F756E64203230323420696E20616C6C20726567696F6E7321"}"

OK! TXID: 9dd5cb07b16797580838adf60031dd37eecdaf4e0e6980ea0d6bc136b66a5775

komodo-cli createrawtransaction "[{"txid":"50caa0d544e3cf449900e6c46680226ff6f17be63d3ec6dba9d541d0f50eb415","vout":20}]" "{"REVtLSPkPe8P7aQsKeWWwuwfUntfBnK9pp":8, "21038f274b15fe3288f8601e3a73d6aea6564f734482e9c7b182e5233851ae4e9020ac":0.9975, "data":"566F746520666F7220447261676F6E686F756E64203230323420696E20616C6C20726567696F6E7321566F746520666F7220447261676F6E686F756E64203230323420696E20616C6C20726567696F6E7321"}"

OK! TXID: c21b8bad077611b17000c4e8a71c7ce0aed5ebf71d427fe15243781c2d47115a

komodo-cli createrawtransaction "[{"txid":"f5cdbac408af37e39e5ba4a2e6f6c8a43845d93b475a7a272335812879911724","vout":0}]" "{"REVtLSPkPe8P7aQsKeWWwuwfUntfBnK9pp":0.18, "21038f274b15fe3288f8601e3a73d6aea6564f734482e9c7b182e5233851ae4e9020ac":0.0097, "data":"566F746520666F7220447261676F6E686F756E64203230323420696E20616C6C20726567696F6E7321566F746520666F7220447261676F6E686F756E64203230323420696E20616C6C20726567696F6E7321566F746520666F7220447261676F6E686F756E64203230323420696E20616C6C20726567696F6E7321566F746520666F7220447261676F6E686F756E64203230323420696E20616C6C20726567696F6E7321"}"

ERROR! error code: -26
error message:
64: scriptpubkey

Error occurs where expected, but is not very descriptive.

smk762
smk762 previously approved these changes Jun 13, 2024
@@ -41,6 +43,11 @@ class CScriptID : public uint160
};

static const unsigned int MAX_OP_RETURN_RELAY = 8192; //! bytes
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we still need MAX_OP_RETURN_RELAY (although you have introduced two different consts for kmd and AC)?

Copy link
Copy Markdown
Author

@DeckerSU DeckerSU Jun 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, it was just a default value, like static initialization. But you are right – since we don't use it anywhere, we can remove it. Done in a97380f .

static const unsigned int MAX_OP_RETURN_RELAY = 8192; //! bytes

static const unsigned int MAX_OP_RETURN_RELAY_KMD = 140; /* 76 bytes of nota size + 64 bytes chain name */
static const unsigned int MAX_OP_RETURN_RELAY_AC = 208; /* 144 bytes of nota size + 64 bytes chain name */
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think 208 bytes is too low for marmara (although they currently do not sync to komodo)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MCL is a different codebase. The values of MAX_OP_RETURN_RELAY_KMD and MAX_OP_RETURN_RELAY_AC were derived from the maximum possible sizes of notarization OP_RETURN in KMD itself and assetchains. Additionally, before setting these values, all existing chains were scanned to determine the maximum size of useful OP_RETURN, ensuring that everything needed would fit within the new restrictions.

@ca333 ca333 merged commit 1ca3fe8 into dev Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants