Skip to content

Query failing with "negative substring length not allowed" #55

Description

@A60AB5450353F40E

If limit: 1 then it fails, if some greater number then it executes OK.
In this example even limit: 2 executes OK.

# Matches all spends from AnyHedge v0.11 contract template
# https://gitlab.com/GeneralProtocols/anyhedge/contracts/-/blob/development/contracts/v0.11/bytecode.asm
query {
  input(
    limit: 1
    offset: 0
    where: {
      transaction: {
        block_inclusions: {
          block: {
            height: { _gte: 780000, _lt: 780100 }
            accepted_by: { node: { name: { _eq: "bchn-mainnet" } } }
          }
        }
      }
      _or: [
        { unlocking_bytecode_pattern: { _eq: "40104010514d" } }
        { unlocking_bytecode_pattern: { _eq: "4141004d" } }
      ]
      redeem_bytecode_pattern: {
        _regex: "04040[2-4]0[2-4]0[2-8]0[2-8]21(17|19|23)(17|19|23)(00|51)21215c79009c637b695c7a7cad5b7a7cad6d6d6d6d6d51675c7a519dc3519d5f7a5f795779bb5d7a5d79577abb5c79587f77547f75817600a0695c79587f77547f75818c9d5c7a547f75815b799f695b795c7f77817600a0695979a35879a45c7a547f7581765c7aa2695b7aa2785a7a8b5b7aa5919b690276587a537a96a47c577a527994a4c4529d00cc7b9d00cd557a8851cc9d51cd547a8777777768"
      }
    }
  ) {
    transaction {
      block_inclusions {
        block {
          height
          timestamp
        }
      }
      inputs {
        outpoint_transaction_hash
        outpoint_index
        outpoint {
          value_satoshis
          transaction {
            block_inclusions {
              block {
                height
                timestamp
              }
            }
          }
        }
      }
    }
  }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions