Skip to content

Accept tip parameter to return past data #8

@whoabuddy

Description

@whoabuddy

The Stacks Blockchain API supports a tip parameter for read-only contract calls, which can bring up the data at a certain point in time based on the index_block_hash of the Stacks block height.

Ideally we could support specifying the tip as a hash, a block height, or a cycle number.

  • tip (hash) could be passed directly
  • block height would require a query to get index_tip_hash
  • cycle number would require a query to get first-block-in-cycle, then index_tip_hash

The value would be passed as part of the ReadOnlyFunctionOptions, and is accepted by micro-stacks.

image

image

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