Skip to content

Relative lock-time limitation when using a block-based limit #1552

@thephez

Description

@thephez

I came across this inconsistency while reviewing BIPs. Per BIP-0068, 16 bits of the sequence number are used for the relative lock time to allow for lock times of a year. Since Dash has a block time of 2.5 minutes (vs. Bitcoin's 10 minutes), the maximum block-based relative lock time is reduced by a quarter (2^16 * 2.5 min/block = ~113.75 days).

Time-based lock times remain the same as in bitcoin (~1 year) since the granularity was not changed.

Also, to maintain the relationship between the scaling of block-based and time-based lock time values described in BIP-0068, 18 bits of the sequence number would have to be used AND the granularity would have to be changed from 9 (512 seconds) to 7 (128 seconds). Doing this would result in the same maximum lock times for both time and block-based lock-times as bitcoin due to the factor of 4 between the Dash block time and Bitcoin block time.

At a minimum, these changes would have to be made at the following location in transaction.h, but I have not considered what other implications there might be:

One complication is the affect on any existing lock-times based on the current parameters if the mask and granularity were simply changed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions