name: "Blob Transaction Test"
timeout: 1h
config:
  #walletPrivkey: ""
  #validatorPairNames: []
  #clientPairNames: []
tasks:
- name: check_clients_are_healthy
  title: "Check if at least one client is ready"
  timeout: 5m
  config:
    minClientCount: 1

# check if all client pairs propose blocks with blob transactions
- name: run_task_background
  title: "Check if all clients propose blocks with blob transactions"
  config:
    onBackgroundComplete: fail
    backgroundTask:
      name: generate_blob_transactions
      title: "Generate 2 blob transactions per block"
      config:
        childWallets: 5
        walletSeed: "blob-test"
        limitPending: 4
        limitPerBlock: 2
        randomTarget: true
        amount: 1000000
        randomAmount: true
        blobSidecars: 1
      configVars:
        privateKey: "walletPrivkey"
    foregroundTask:
      name: run_task_matrix
      title: "Check transaction inclusion with all client pairs"
      timeout: 30m
      configVars:
        matrixValues: "validatorPairNames"
      config:
        runConcurrent: true
        matrixVar: "validatorPairName"
        task:
          name: check_consensus_block_proposals
          title: "Wait for block proposal with >= 1 blobs from ${validatorPairName}"
          configVars:
            validatorNamePattern: "validatorPairName"
          config:
            minBlobCount: 1
- name: "sleep"
  title: "Wait 30sec to clear up pending transactions"
  config:
    duration: 30s

# check if blob transactions can be sent via each client pair
- name: run_task_matrix
  title: "Check if blob transactions can be sent via each client pair"
  configVars:
    matrixValues: "clientPairNames"
  config:
    runConcurrent: false
    matrixVar: "clientPairName"
    task:
      name: run_tasks
      title: "Check if blob transactions can be sent via ${clientPairName}"
      config:
        tasks:
        - name: run_task_background
          title: "Check if blob transactions can be sent via ${clientPairName}"
          config:
            onBackgroundComplete: fail
            backgroundTask:
              name: generate_blob_transactions
              title: "Generate 2 blob transactions per block and send via ${clientPairName}"
              config:
                childWallets: 5
                walletSeed: "blob-test"
                limitPending: 4
                limitPerBlock: 2
                randomTarget: true
                amount: 1000000
                randomAmount: true
                blobSidecars: 1
              configVars:
                privateKey: "walletPrivkey"
                clientPattern: "clientPairName"
            foregroundTask:
              name: check_consensus_block_proposals
              title: "Wait for block proposal with >= 1 blobs"
              config:
                minBlobCount: 1
        - name: "sleep"
          title: "Wait 30sec to clear up pending transactions"
          config:
            duration: 30s