This repository was archived by the owner on Dec 4, 2024. It is now read-only.
Length limit on the Standard/Contract principal #338
Closed
FriendsFerdinand
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The purpose of this thread is to document the discussion on the length limit of a standard/contract principal using OP_RETURN.
When depositing BTC using OP_RETURN, there is a maximum length size (by consensus) of 63 bytes for the Stacks recipient address. In the case of a contract principal, the contract length can only be at most 41 bytes (1-byte address type prefix + 20-byte address hash + 1-byte length + contract name).
In the case of OP_DROP, we won't hit the maximum length of a contract, that is, 128-bytes. Should we enforce a 41-byte address on both deposit modes?
As a bonus, in OP_DROP, we don't need 128-bytes in the witness script (only store a hash160 of 20-bytes), potentially saving on Bitcoin fees (but adding a cost to the Reveal Stacks contract call).
Beta Was this translation helpful? Give feedback.
All reactions