You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having a native constant for the chain ID in Clarity is very useful for various reasons. One can build triggers based on mainnet/testnet, etc., but it is specifically useful for signed message verification. A common way to prevent replay protection across forks is to add a chain ID to the message somewhere. Right now that means you have to hardcode the chain ID.
The chain ID is expressed as 4 bytes in a transaction and as a u32 in Rust:
0x00000001 or 1 for mainnet
0x80000000 or 2147483648 for testnet
My suggestion is to expose it as chain-id with a type of either uint or (buff 4).
The text was updated successfully, but these errors were encountered:
Having a native constant for the chain ID in Clarity is very useful for various reasons. One can build triggers based on mainnet/testnet, etc., but it is specifically useful for signed message verification. A common way to prevent replay protection across forks is to add a chain ID to the message somewhere. Right now that means you have to hardcode the chain ID.
The chain ID is expressed as 4 bytes in a transaction and as a
u32
in Rust:0x00000001
or1
for mainnet0x80000000
or2147483648
for testnetMy suggestion is to expose it as
chain-id
with a type of eitheruint
or(buff 4)
.The text was updated successfully, but these errors were encountered: