3 Close Allocations

This is where the allocation management for the indexer begins.

3.1 Pull Active Allocations

First let’s build the query to get the list of active allocations for the indexer:

query = '{
    allocations(where: {indexer:"0x74dbb201ecc0b16934e68377bc13013883d9417b", status: Active}, first:1000) {
      id
      status
      allocatedTokens
      createdAtEpoch
      subgraphDeployment {
        ipfsHash
      }
    }
  }'

# And update the Prometheus query to:
prometheus_query <- 'sum by (deployment) (rate(indexer_query_handler_seconds_count[1m]))'

Next let’s make the GraphQL request:

# Send POST request to the GraphQL API
response = POST(url, body = list(query = query), encode = "json")
## Response [https://gateway.thegraph.com/api/[REDACTED]/subgraphs/id/DZz4kDTdmzWLWsV373w2bSmoar3umKKH9y82SUKr5qmp]
##   Date:  1749715505
##   Status:  200
##   Content-Type:  application/json
##   Size:

Now we can get the content of the response:

content = content(response, "text", encoding='UTF-8')
## [1] "{\"data\":{\"allocations\":[{\"allocatedTokens\":\"2700000000000000000000\",\"createdAtEpoch\":922,\"id\":\"0x008fc97d580d93979d50dbc5faa07d505f4bf7d2\",\"status\":\"Active\",\"subgraphDeployment\":{\"ipfsHash\":\"QmaCNKnKiFrhY9L1CapvdaaucSqMYhVL1jdSWJSXDv72Rt\"}},{\"allocatedTokens\":\"7000000000000000000000\",\"createdAtEpoch\":922,\"id\":\"0x3f4b36b6b85c2d22fb44545d7f12efcb780ac977\",\"status\":\"Active\",\"subgraphDeployment\":{\"ipfsHash\":\"QmeWYQm1r39iZdKTzJYzNYHKmfNSWYEdq8cprPpfz44n88\"}},{\"allocatedTokens\":\"1000000000000000000000\",\"createdAtEpoch\":922,\"id\":\"0x54674f6adb7906aea9022bcd820ec9d8aadd8605\",\"status\":\"Active\",\"subgraphDeployment\":{\"ipfsHash\":\"QmTScm43kN2xfdKK9h7nWs3a7c7ypjPjtKJe1NsAsCfnCL\"}},{\"allocatedTokens\":\"500000000000000000000\",\"createdAtEpoch\":922,\"id\":\"0x6fab3f2dc2df2ddfdadca0579945a5ff7e70cdca\",\"status\":\"Active\",\"subgraphDeployment\":{\"ipfsHash\":\"QmTEQP9HPHsgQiKdNREVHS7F4waxEwCeq32eTU5hCRXgN4\"}},{\"allocatedTokens\":\"1000000000000000000000\",\"createdAtEpoch\":922,\"id\":\"0xc636d1c1ff6164d14a301f9b52e5ed184055bcb0\",\"status\":\"Active\",\"subgraphDeployment\":{\"ipfsHash\":\"QmaE9BZUMPpc9mcJPVbG9xnz6xWKDVKJeUyndcLWCi1nKr\"}},{\"allocatedTokens\":\"500000000000000000000\",\"createdAtEpoch\":922,\"id\":\"0xdb318ccf2f0f4ccb0f2cf63b6dc87b88c8c20517\",\"status\":\"Active\",\"subgraphDeployment\":{\"ipfsHash\":\"QmdUknu8tyvH1BAE1X2rshXNDBPToYtQ8JypEKTxxcdGem\"}},{\"allocatedTokens\":\"500000000000000000000\",\"createdAtEpoch\":922,\"id\":\"0xf2c6e58179f8cc8f625aa6e18224938d5d36e571\",\"status\":\"Active\",\"subgraphDeployment\":{\"ipfsHash\":\"QmevNFrcEkZcb7bji3xYuU5UWP7TZ9kurTJ4mW5VebGc9S\"}},{\"allocatedTokens\":\"500000000000000000000\",\"createdAtEpoch\":922,\"id\":\"0xfc5a16d16b28810827ce606e94898dbce1f0351e\",\"status\":\"Active\",\"subgraphDeployment\":{\"ipfsHash\":\"QmfTYPHrWaYkaFzwCwmXXshc3Vb7pp77uiqB7XmBb7g14b\"}},{\"allocatedTokens\":\"300000000000000000000\",\"createdAtEpoch\":923,\"id\":\"0xfc9564fa6a7d6503e8cf97a2b0330262d7f3b784\",\"status\":\"Active\",\"subgraphDeployment\":{\"ipfsHash\":\"Qmb7rYJk1BmDDkfYQSobCG9HSLvbEiKrRh5gqv3xXCkzNq\"}},{\"allocatedTokens\":\"100000000000000000000\",\"createdAtEpoch\":923,\"id\":\"0xfe8e0186d682e3f1df8244953d5cde11d4e28133\",\"status\":\"Active\",\"subgraphDeployment\":{\"ipfsHash\":\"Qmav5jabEyBRv2botzgLK717DJQWokk6kW3AeXxCkPWuSY\"}},{\"allocatedTokens\":\"100000000000000000000\",\"createdAtEpoch\":923,\"id\":\"0xff43774e7ded41c08379335b3d510d243cfddb5c\",\"status\":\"Active\",\"subgraphDeployment\":{\"ipfsHash\":\"QmS7wExrveyxpN5g6sfykDUkVHX7oGqvMr8Mw82SueXU8S\"}}]}}"

Next let’s parse from JSON into a dataframe:

json_data = fromJSON(content, flatten = TRUE)
## $data
## $data$allocations
##           allocatedTokens createdAtEpoch
## 1  2700000000000000000000            922
## 2  7000000000000000000000            922
## 3  1000000000000000000000            922
## 4   500000000000000000000            922
## 5  1000000000000000000000            922
## 6   500000000000000000000            922
## 7   500000000000000000000            922
## 8   500000000000000000000            922
## 9   300000000000000000000            923
## 10  100000000000000000000            923
## 11  100000000000000000000            923
##                                            id status
## 1  0x008fc97d580d93979d50dbc5faa07d505f4bf7d2 Active
## 2  0x3f4b36b6b85c2d22fb44545d7f12efcb780ac977 Active
## 3  0x54674f6adb7906aea9022bcd820ec9d8aadd8605 Active
## 4  0x6fab3f2dc2df2ddfdadca0579945a5ff7e70cdca Active
## 5  0xc636d1c1ff6164d14a301f9b52e5ed184055bcb0 Active
## 6  0xdb318ccf2f0f4ccb0f2cf63b6dc87b88c8c20517 Active
## 7  0xf2c6e58179f8cc8f625aa6e18224938d5d36e571 Active
## 8  0xfc5a16d16b28810827ce606e94898dbce1f0351e Active
## 9  0xfc9564fa6a7d6503e8cf97a2b0330262d7f3b784 Active
## 10 0xfe8e0186d682e3f1df8244953d5cde11d4e28133 Active
## 11 0xff43774e7ded41c08379335b3d510d243cfddb5c Active
##                       subgraphDeployment.ipfsHash
## 1  QmaCNKnKiFrhY9L1CapvdaaucSqMYhVL1jdSWJSXDv72Rt
## 2  QmeWYQm1r39iZdKTzJYzNYHKmfNSWYEdq8cprPpfz44n88
## 3  QmTScm43kN2xfdKK9h7nWs3a7c7ypjPjtKJe1NsAsCfnCL
## 4  QmTEQP9HPHsgQiKdNREVHS7F4waxEwCeq32eTU5hCRXgN4
## 5  QmaE9BZUMPpc9mcJPVbG9xnz6xWKDVKJeUyndcLWCi1nKr
## 6  QmdUknu8tyvH1BAE1X2rshXNDBPToYtQ8JypEKTxxcdGem
## 7  QmevNFrcEkZcb7bji3xYuU5UWP7TZ9kurTJ4mW5VebGc9S
## 8  QmfTYPHrWaYkaFzwCwmXXshc3Vb7pp77uiqB7XmBb7g14b
## 9  Qmb7rYJk1BmDDkfYQSobCG9HSLvbEiKrRh5gqv3xXCkzNq
## 10 Qmav5jabEyBRv2botzgLK717DJQWokk6kW3AeXxCkPWuSY
## 11 QmS7wExrveyxpN5g6sfykDUkVHX7oGqvMr8Mw82SueXU8S

Now we can extract the data we care about from json_data$data$allocations into a dataframe:

# get list of current allocations
current_allocations = as.data.frame(json_data$data$allocations)
## # A tibble: 11 × 5
##    allocatedTokens        createdAtEpoch id        status subgraphDeployment.i…¹
##    <chr>                           <int> <chr>     <chr>  <chr>                 
##  1 2700000000000000000000            922 0x008fc9… Active QmaCNKnKiFrhY9L1Capvd…
##  2 7000000000000000000000            922 0x3f4b36… Active QmeWYQm1r39iZdKTzJYzN…
##  3 1000000000000000000000            922 0x54674f… Active QmTScm43kN2xfdKK9h7nW…
##  4 500000000000000000000             922 0x6fab3f… Active QmTEQP9HPHsgQiKdNREVH…
##  5 1000000000000000000000            922 0xc636d1… Active QmaE9BZUMPpc9mcJPVbG9…
##  6 500000000000000000000             922 0xdb318c… Active QmdUknu8tyvH1BAE1X2rs…
##  7 500000000000000000000             922 0xf2c6e5… Active QmevNFrcEkZcb7bji3xYu…
##  8 500000000000000000000             922 0xfc5a16… Active QmfTYPHrWaYkaFzwCwmXX…
##  9 300000000000000000000             923 0xfc9564… Active Qmb7rYJk1BmDDkfYQSobC…
## 10 100000000000000000000             923 0xfe8e01… Active Qmav5jabEyBRv2botzgLK…
## 11 100000000000000000000             923 0xff4377… Active QmS7wExrveyxpN5g6sfyk…
## # ℹ abbreviated name: ¹​subgraphDeployment.ipfsHash

We still have a nested column in subgraphDeployment. Next let’s extract the ipfsHash and unnest this column to get a cleaned dataset:

# add ipfs hash
current_allocations$deployment = json_data$data$allocations$subgraphDeployment.ipfsHash
# remove old nested column
current_allocations %<>% select(-subgraphDeployment.ipfsHash) 
## # A tibble: 11 × 5
##    allocatedTokens        createdAtEpoch id                    status deployment
##    <chr>                           <int> <chr>                 <chr>  <chr>     
##  1 2700000000000000000000            922 0x008fc97d580d93979d… Active QmaCNKnKi…
##  2 7000000000000000000000            922 0x3f4b36b6b85c2d22fb… Active QmeWYQm1r…
##  3 1000000000000000000000            922 0x54674f6adb7906aea9… Active QmTScm43k…
##  4 500000000000000000000             922 0x6fab3f2dc2df2ddfda… Active QmTEQP9HP…
##  5 1000000000000000000000            922 0xc636d1c1ff6164d14a… Active QmaE9BZUM…
##  6 500000000000000000000             922 0xdb318ccf2f0f4ccb0f… Active QmdUknu8t…
##  7 500000000000000000000             922 0xf2c6e58179f8cc8f62… Active QmevNFrcE…
##  8 500000000000000000000             922 0xfc5a16d16b28810827… Active QmfTYPHrW…
##  9 300000000000000000000             923 0xfc9564fa6a7d6503e8… Active Qmb7rYJk1…
## 10 100000000000000000000             923 0xfe8e0186d682e3f1df… Active Qmav5jabE…
## 11 100000000000000000000             923 0xff43774e7ded41c083… Active QmS7wExrv…

The last thing we want to do is adjust the allocatedTokens to show the value in GRT instead of the full decimals value. We can do this by dividing the value by 10^18:

current_allocations$allocatedTokens = as.numeric(current_allocations$allocatedTokens)/10^18
## # A tibble: 11 × 5
##    allocatedTokens createdAtEpoch id                           status deployment
##              <dbl>          <int> <chr>                        <chr>  <chr>     
##  1            2700            922 0x008fc97d580d93979d50dbc5f… Active QmaCNKnKi…
##  2            7000            922 0x3f4b36b6b85c2d22fb44545d7… Active QmeWYQm1r…
##  3            1000            922 0x54674f6adb7906aea9022bcd8… Active QmTScm43k…
##  4             500            922 0x6fab3f2dc2df2ddfdadca0579… Active QmTEQP9HP…
##  5            1000            922 0xc636d1c1ff6164d14a301f9b5… Active QmaE9BZUM…
##  6             500            922 0xdb318ccf2f0f4ccb0f2cf63b6… Active QmdUknu8t…
##  7             500            922 0xf2c6e58179f8cc8f625aa6e18… Active QmevNFrcE…
##  8             500            922 0xfc5a16d16b28810827ce606e9… Active QmfTYPHrW…
##  9             300            923 0xfc9564fa6a7d6503e8cf97a2b… Active Qmb7rYJk1…
## 10             100            923 0xfe8e0186d682e3f1df8244953… Active Qmav5jabE…
## 11             100            923 0xff43774e7ded41c08379335b3… Active QmS7wExrv…

3.2 Pull Current Epoch

We can’t close any allocations that we have opened during the same epoch. We take the same process as the query to pull active allocations above, but this time we are just getting one number for the current epoch on The Graph Network:

# Don't close allocations that have been opened in the same epoch
query = '{
    graphNetworks {
      currentEpoch
    }
  }'
# Send POST request to the GraphQL API
response = POST(url, body = list(query = query), encode = "json")
# Parse the JSON response
content = content(response, "text", encoding='UTF-8')
json_data = fromJSON(content, flatten = TRUE)
# get current epoch
current_epoch = json_data$data$graphNetworks$currentEpoch[1]
# view results
current_epoch
## [1] 924

3.3 Exclude High Volume Subgraphs

When we are already serving a high number of queries on a particular subgraph, we want to avoid closing the allocation if it’s not one that’s been open that long in order to avoid disrupting queries being served.

## [1] "prometheus container IP: 172.18.0.2"
## [1] "Processed prometheus data:"
## # A tibble: 3 × 2
##   deployment                                     mean_value
##   <chr>                                               <dbl>
## 1 Qmb7rYJk1BmDDkfYQSobCG9HSLvbEiKrRh5gqv3xXCkzNq          0
## 2 Qmav5jabEyBRv2botzgLK717DJQWokk6kW3AeXxCkPWuSY          0
## 3 QmS7wExrveyxpN5g6sfykDUkVHX7oGqvMr8Mw82SueXU8S          0

The data below has been pulled from Prometheus for the indexer. For simplicity this data pull was hidden, reach out to me for more information. This step isn’t necessary, just something in place to not hurt the indexer’s ability to serve queries while also frequently unallocating.

In the data below, mean_value represents the average number of queries served on a subgraph deployment by the indexer over the previous 2 hour period:

## # A tibble: 3 × 2
##   deployment                                     mean_value
##   <chr>                                               <dbl>
## 1 Qmb7rYJk1BmDDkfYQSobCG9HSLvbEiKrRh5gqv3xXCkzNq          0
## 2 Qmav5jabEyBRv2botzgLK717DJQWokk6kW3AeXxCkPWuSY          0
## 3 QmS7wExrveyxpN5g6sfykDUkVHX7oGqvMr8Mw82SueXU8S          0

Now we can join the new data above prometheus_data_clean to our main dataset current_allocations to bring in the new field for queries served on the subgraph over the past 2 hours:

current_allocations = current_allocations %>% 
  left_join(prometheus_data_clean) 
## # A tibble: 11 × 6
##    allocatedTokens createdAtEpoch id                status deployment mean_value
##              <dbl>          <int> <chr>             <chr>  <chr>           <dbl>
##  1            2700            922 0x008fc97d580d93… Active QmaCNKnKi…         NA
##  2            7000            922 0x3f4b36b6b85c2d… Active QmeWYQm1r…         NA
##  3            1000            922 0x54674f6adb7906… Active QmTScm43k…         NA
##  4             500            922 0x6fab3f2dc2df2d… Active QmTEQP9HP…         NA
##  5            1000            922 0xc636d1c1ff6164… Active QmaE9BZUM…         NA
##  6             500            922 0xdb318ccf2f0f4c… Active QmdUknu8t…         NA
##  7             500            922 0xf2c6e58179f8cc… Active QmevNFrcE…         NA
##  8             500            922 0xfc5a16d16b2881… Active QmfTYPHrW…         NA
##  9             300            923 0xfc9564fa6a7d65… Active Qmb7rYJk1…          0
## 10             100            923 0xfe8e0186d682e3… Active Qmav5jabE…          0
## 11             100            923 0xff43774e7ded41… Active QmS7wExrv…          0

Let’s also make sure to replace any NA or infinite values with 0:

current_allocations %<>%
  mutate(mean_value = case_when(is.na(mean_value) == TRUE ~ 0,
                                is.finite(mean_value) == FALSE ~ 0,
                                TRUE ~ mean_value))
## # A tibble: 11 × 6
##    allocatedTokens createdAtEpoch id                status deployment mean_value
##              <dbl>          <int> <chr>             <chr>  <chr>           <dbl>
##  1            2700            922 0x008fc97d580d93… Active QmaCNKnKi…          0
##  2            7000            922 0x3f4b36b6b85c2d… Active QmeWYQm1r…          0
##  3            1000            922 0x54674f6adb7906… Active QmTScm43k…          0
##  4             500            922 0x6fab3f2dc2df2d… Active QmTEQP9HP…          0
##  5            1000            922 0xc636d1c1ff6164… Active QmaE9BZUM…          0
##  6             500            922 0xdb318ccf2f0f4c… Active QmdUknu8t…          0
##  7             500            922 0xf2c6e58179f8cc… Active QmevNFrcE…          0
##  8             500            922 0xfc5a16d16b2881… Active QmfTYPHrW…          0
##  9             300            923 0xfc9564fa6a7d65… Active Qmb7rYJk1…          0
## 10             100            923 0xfe8e0186d682e3… Active Qmav5jabE…          0
## 11             100            923 0xff43774e7ded41… Active QmS7wExrv…          0
# Calculate 48-hour query volume using the 'query_volume' object loaded from the previous step's snapshot.
# This object contains daily query counts per subgraph.
forty_eight_hour_volume = query_volume %>%
  # filter to the past 2 days (48 hours)
  filter(date >= Sys.Date() - days(2)) %>%
  # group by subgraph id (using the correct column name)
  group_by(subgraph_deployment_ipfs_hash) %>%
  # sum the query count over the past 2 days
  summarize(forty_eight_hour_volume = sum(query_count, na.rm = TRUE), .groups = 'drop')

# Join the 48-hour volume data using the correct column names
current_allocations %<>% left_join(forty_eight_hour_volume, by=c('deployment'='subgraph_deployment_ipfs_hash'))

# Replace NA volume with 0 for filtering purposes
current_allocations %<>%
  mutate(forty_eight_hour_volume = ifelse(is.na(forty_eight_hour_volume), 0, forty_eight_hour_volume))

# Filter allocations based on user's criteria:
# 1. Exclude allocations created in the current epoch.
# 2. Exclude allocations serving > 100k queries in the last 48h AND are less than 20 epochs old.
#    (i.e., keep allocations if they are NOT (high volume AND young))
current_allocations %<>%
  filter(createdAtEpoch != current_epoch) %>%
  filter(!(forty_eight_hour_volume > 100000 & (current_epoch - createdAtEpoch) < 20))

3.4 Close Allocations

Finally our list of subgraphs that we want to close allocations for is ready. As a first step, we create a function run_indexer_command(), which we can use to execute indexer commands through the Indexer CLI:

run_indexer_command = function(command) {
  full_command = paste0("./shell_python cli '", command, "'")
  tryCatch({
    result = system(full_command, intern = TRUE, ignore.stderr = TRUE)
    return(paste(result, collapse = "\\n"))
  }, error = function(e) {
    print(paste("Error executing command:", e$message))
    return(NULL)
  })
}

Now we can iterate through the current_allocations data and unallocate from each subgraph. By doing i in 1:nrow(current_allocations), the variable i will increment from 1 through the number of rows contained in current_allocations. So if there are 20 results in current_allocations of allocations to be closed, the variable i will have the values 1 through 20, incrementing by 1 on each iteration through the for loop.

To avoid issues, we will go one subgraph at a time, doing: 1. queue the unallocation with: graph indexer actions queue unallocate 2. approve the action to unallocate from the one subgraph with: graph indexer actions approve 3. execute the unallocation with: graph indexer actions execute approved

for (i in 1:nrow(current_allocations)){
  # print update
  print(paste('Unallocating from:', current_allocations[i,]$deployment))
  # queue unallocation
  unallocate_output = run_indexer_command(paste0("graph indexer actions queue unallocate ",current_allocations[i,]$deployment," ", current_allocations[i,]$id, " --network arbitrum-one"))
  # Replace the escaped newlines with actual newlines
  unallocate_output = gsub("\\\\n", "\n", unallocate_output)
  # show outputs
  print(unallocate_output)
  # Extract the action_id using a regular expression
  action_id = as.numeric(str_extract(unallocate_output, "(?<=\n│ )[0-9]+(?= │ arbitrum-one)"))
  # now can execute the unallocation using the extracted action_id
  run_indexer_command(paste0("graph indexer actions approve ", action_id))
  # execute unallocation
  unallocate_output = run_indexer_command("graph indexer actions execute approved")
  # show outputs
  print(unallocate_output)
}
## [1] "Unallocating from: QmaCNKnKiFrhY9L1CapvdaaucSqMYhVL1jdSWJSXDv72Rt"
## [1] "┌──────┬─────────────────┬────────────┬────────────────────────────────────────────────┬────────────────────────────────────────────┬────────┬──────┬───────┬──────────┬────────┬────────────┬────────┐\n│ id   │ protocolNetwork │ type       │ deploymentID                                   │ allocationID                               │ amount │ poi  │ force │ priority │ status │ source     │ reason │\n├──────┼─────────────────┼────────────┼────────────────────────────────────────────────┼────────────────────────────────────────────┼────────┼──────┼───────┼──────────┼────────┼────────────┼────────┤\n│ 5731 │ arbitrum-one    │ unallocate │ QmaCNKnKiFrhY9L1CapvdaaucSqMYhVL1jdSWJSXDv72Rt │ 0x008fc97d580d93979d50dbc5faa07d505f4bf7d2 │ null   │ null │ false │ 0        │ queued │ indexerCLI │ manual │\n└──────┴─────────────────┴────────────┴────────────────────────────────────────────────┴────────────────────────────────────────────┴────────┴──────┴───────┴──────────┴────────┴────────────┴────────┘"
## [1] "┌──────┬─────────────────┬────────┬────────────┬────────────────────────────────────────────────┬────────────────────────────────────────────┬────────┬──────┬───────┬───────────┬─────────────┬───────────────┬────────────┬────────┐\\n│ id   │ protocolNetwork │ status │ type       │ deploymentID                                   │ allocationID                               │ amount │ poi  │ force │ priority  │ transaction │ failureReason │ source     │ reason │\\n├──────┼─────────────────┼────────┼────────────┼────────────────────────────────────────────────┼────────────────────────────────────────────┼────────┼──────┼───────┼───────────┼─────────────┼───────────────┼────────────┼────────┤\\n│ 5731 │ arbitrum-one    │ failed │ unallocate │ QmaCNKnKiFrhY9L1CapvdaaucSqMYhVL1jdSWJSXDv72Rt │ 0x008fc97d580d93979d50dbc5faa07d505f4bf7d2 │ null   │ null │ false │ undefined │ null        │ IE069         │ indexerCLI │ manual │\\n└──────┴─────────────────┴────────┴────────────┴────────────────────────────────────────────────┴────────────────────────────────────────────┴────────┴──────┴───────┴───────────┴─────────────┴───────────────┴────────────┴────────┘"
## [1] "Unallocating from: QmeWYQm1r39iZdKTzJYzNYHKmfNSWYEdq8cprPpfz44n88"
## [1] "┌──────┬─────────────────┬────────────┬────────────────────────────────────────────────┬────────────────────────────────────────────┬────────┬──────┬───────┬──────────┬────────┬────────────┬────────┐\n│ id   │ protocolNetwork │ type       │ deploymentID                                   │ allocationID                               │ amount │ poi  │ force │ priority │ status │ source     │ reason │\n├──────┼─────────────────┼────────────┼────────────────────────────────────────────────┼────────────────────────────────────────────┼────────┼──────┼───────┼──────────┼────────┼────────────┼────────┤\n│ 5732 │ arbitrum-one    │ unallocate │ QmeWYQm1r39iZdKTzJYzNYHKmfNSWYEdq8cprPpfz44n88 │ 0x3f4b36b6b85c2d22fb44545d7f12efcb780ac977 │ null   │ null │ false │ 0        │ queued │ indexerCLI │ manual │\n└──────┴─────────────────┴────────────┴────────────────────────────────────────────────┴────────────────────────────────────────────┴────────┴──────┴───────┴──────────┴────────┴────────────┴────────┘"
## [1] "┌──────┬─────────────────┬────────┬────────────┬────────────────────────────────────────────────┬────────────────────────────────────────────┬────────┬──────┬───────┬───────────┬─────────────┬───────────────┬────────────┬────────┐\\n│ id   │ protocolNetwork │ status │ type       │ deploymentID                                   │ allocationID                               │ amount │ poi  │ force │ priority  │ transaction │ failureReason │ source     │ reason │\\n├──────┼─────────────────┼────────┼────────────┼────────────────────────────────────────────────┼────────────────────────────────────────────┼────────┼──────┼───────┼───────────┼─────────────┼───────────────┼────────────┼────────┤\\n│ 5732 │ arbitrum-one    │ failed │ unallocate │ QmeWYQm1r39iZdKTzJYzNYHKmfNSWYEdq8cprPpfz44n88 │ 0x3f4b36b6b85c2d22fb44545d7f12efcb780ac977 │ null   │ null │ false │ undefined │ null        │ IE067         │ indexerCLI │ manual │\\n└──────┴─────────────────┴────────┴────────────┴────────────────────────────────────────────────┴────────────────────────────────────────────┴────────┴──────┴───────┴───────────┴─────────────┴───────────────┴────────────┴────────┘"
## [1] "Unallocating from: QmTScm43kN2xfdKK9h7nWs3a7c7ypjPjtKJe1NsAsCfnCL"
## [1] "┌──────┬─────────────────┬────────────┬────────────────────────────────────────────────┬────────────────────────────────────────────┬────────┬──────┬───────┬──────────┬────────┬────────────┬────────┐\n│ id   │ protocolNetwork │ type       │ deploymentID                                   │ allocationID                               │ amount │ poi  │ force │ priority │ status │ source     │ reason │\n├──────┼─────────────────┼────────────┼────────────────────────────────────────────────┼────────────────────────────────────────────┼────────┼──────┼───────┼──────────┼────────┼────────────┼────────┤\n│ 5733 │ arbitrum-one    │ unallocate │ QmTScm43kN2xfdKK9h7nWs3a7c7ypjPjtKJe1NsAsCfnCL │ 0x54674f6adb7906aea9022bcd820ec9d8aadd8605 │ null   │ null │ false │ 0        │ queued │ indexerCLI │ manual │\n└──────┴─────────────────┴────────────┴────────────────────────────────────────────────┴────────────────────────────────────────────┴────────┴──────┴───────┴──────────┴────────┴────────────┴────────┘"
## [1] "┌──────┬─────────────────┬────────┬────────────┬────────────────────────────────────────────────┬────────────────────────────────────────────┬────────┬──────┬───────┬───────────┬─────────────┬───────────────┬────────────┬────────┐\\n│ id   │ protocolNetwork │ status │ type       │ deploymentID                                   │ allocationID                               │ amount │ poi  │ force │ priority  │ transaction │ failureReason │ source     │ reason │\\n├──────┼─────────────────┼────────┼────────────┼────────────────────────────────────────────────┼────────────────────────────────────────────┼────────┼──────┼───────┼───────────┼─────────────┼───────────────┼────────────┼────────┤\\n│ 5733 │ arbitrum-one    │ failed │ unallocate │ QmTScm43kN2xfdKK9h7nWs3a7c7ypjPjtKJe1NsAsCfnCL │ 0x54674f6adb7906aea9022bcd820ec9d8aadd8605 │ null   │ null │ false │ undefined │ null        │ IE069         │ indexerCLI │ manual │\\n└──────┴─────────────────┴────────┴────────────┴────────────────────────────────────────────────┴────────────────────────────────────────────┴────────┴──────┴───────┴───────────┴─────────────┴───────────────┴────────────┴────────┘"
## [1] "Unallocating from: QmTEQP9HPHsgQiKdNREVHS7F4waxEwCeq32eTU5hCRXgN4"
## [1] "┌──────┬─────────────────┬────────────┬────────────────────────────────────────────────┬────────────────────────────────────────────┬────────┬──────┬───────┬──────────┬────────┬────────────┬────────┐\n│ id   │ protocolNetwork │ type       │ deploymentID                                   │ allocationID                               │ amount │ poi  │ force │ priority │ status │ source     │ reason │\n├──────┼─────────────────┼────────────┼────────────────────────────────────────────────┼────────────────────────────────────────────┼────────┼──────┼───────┼──────────┼────────┼────────────┼────────┤\n│ 5734 │ arbitrum-one    │ unallocate │ QmTEQP9HPHsgQiKdNREVHS7F4waxEwCeq32eTU5hCRXgN4 │ 0x6fab3f2dc2df2ddfdadca0579945a5ff7e70cdca │ null   │ null │ false │ 0        │ queued │ indexerCLI │ manual │\n└──────┴─────────────────┴────────────┴────────────────────────────────────────────────┴────────────────────────────────────────────┴────────┴──────┴───────┴──────────┴────────┴────────────┴────────┘"
## [1] "┌──────┬─────────────────┬────────┬────────────┬────────────────────────────────────────────────┬────────────────────────────────────────────┬────────┬──────┬───────┬───────────┬─────────────┬───────────────┬────────────┬────────┐\\n│ id   │ protocolNetwork │ status │ type       │ deploymentID                                   │ allocationID                               │ amount │ poi  │ force │ priority  │ transaction │ failureReason │ source     │ reason │\\n├──────┼─────────────────┼────────┼────────────┼────────────────────────────────────────────────┼────────────────────────────────────────────┼────────┼──────┼───────┼───────────┼─────────────┼───────────────┼────────────┼────────┤\\n│ 5734 │ arbitrum-one    │ failed │ unallocate │ QmTEQP9HPHsgQiKdNREVHS7F4waxEwCeq32eTU5hCRXgN4 │ 0x6fab3f2dc2df2ddfdadca0579945a5ff7e70cdca │ null   │ null │ false │ undefined │ null        │ IE069         │ indexerCLI │ manual │\\n└──────┴─────────────────┴────────┴────────────┴────────────────────────────────────────────────┴────────────────────────────────────────────┴────────┴──────┴───────┴───────────┴─────────────┴───────────────┴────────────┴────────┘"
## [1] "Unallocating from: QmaE9BZUMPpc9mcJPVbG9xnz6xWKDVKJeUyndcLWCi1nKr"
## [1] "┌──────┬─────────────────┬────────────┬────────────────────────────────────────────────┬────────────────────────────────────────────┬────────┬──────┬───────┬──────────┬────────┬────────────┬────────┐\n│ id   │ protocolNetwork │ type       │ deploymentID                                   │ allocationID                               │ amount │ poi  │ force │ priority │ status │ source     │ reason │\n├──────┼─────────────────┼────────────┼────────────────────────────────────────────────┼────────────────────────────────────────────┼────────┼──────┼───────┼──────────┼────────┼────────────┼────────┤\n│ 5735 │ arbitrum-one    │ unallocate │ QmaE9BZUMPpc9mcJPVbG9xnz6xWKDVKJeUyndcLWCi1nKr │ 0xc636d1c1ff6164d14a301f9b52e5ed184055bcb0 │ null   │ null │ false │ 0        │ queued │ indexerCLI │ manual │\n└──────┴─────────────────┴────────────┴────────────────────────────────────────────────┴────────────────────────────────────────────┴────────┴──────┴───────┴──────────┴────────┴────────────┴────────┘"
## [1] "┌──────┬─────────────────┬────────┬────────────┬────────────────────────────────────────────────┬────────────────────────────────────────────┬────────┬──────┬───────┬───────────┬─────────────┬───────────────┬────────────┬────────┐\\n│ id   │ protocolNetwork │ status │ type       │ deploymentID                                   │ allocationID                               │ amount │ poi  │ force │ priority  │ transaction │ failureReason │ source     │ reason │\\n├──────┼─────────────────┼────────┼────────────┼────────────────────────────────────────────────┼────────────────────────────────────────────┼────────┼──────┼───────┼───────────┼─────────────┼───────────────┼────────────┼────────┤\\n│ 5735 │ arbitrum-one    │ failed │ unallocate │ QmaE9BZUMPpc9mcJPVbG9xnz6xWKDVKJeUyndcLWCi1nKr │ 0xc636d1c1ff6164d14a301f9b52e5ed184055bcb0 │ null   │ null │ false │ undefined │ null        │ IE069         │ indexerCLI │ manual │\\n└──────┴─────────────────┴────────┴────────────┴────────────────────────────────────────────────┴────────────────────────────────────────────┴────────┴──────┴───────┴───────────┴─────────────┴───────────────┴────────────┴────────┘"
## [1] "Unallocating from: QmdUknu8tyvH1BAE1X2rshXNDBPToYtQ8JypEKTxxcdGem"
## [1] "┌──────┬─────────────────┬────────────┬────────────────────────────────────────────────┬────────────────────────────────────────────┬────────┬──────┬───────┬──────────┬────────┬────────────┬────────┐\n│ id   │ protocolNetwork │ type       │ deploymentID                                   │ allocationID                               │ amount │ poi  │ force │ priority │ status │ source     │ reason │\n├──────┼─────────────────┼────────────┼────────────────────────────────────────────────┼────────────────────────────────────────────┼────────┼──────┼───────┼──────────┼────────┼────────────┼────────┤\n│ 5736 │ arbitrum-one    │ unallocate │ QmdUknu8tyvH1BAE1X2rshXNDBPToYtQ8JypEKTxxcdGem │ 0xdb318ccf2f0f4ccb0f2cf63b6dc87b88c8c20517 │ null   │ null │ false │ 0        │ queued │ indexerCLI │ manual │\n└──────┴─────────────────┴────────────┴────────────────────────────────────────────────┴────────────────────────────────────────────┴────────┴──────┴───────┴──────────┴────────┴────────────┴────────┘"
## [1] "┌──────┬─────────────────┬────────┬────────────┬────────────────────────────────────────────────┬────────────────────────────────────────────┬────────┬──────┬───────┬───────────┬─────────────┬───────────────┬────────────┬────────┐\\n│ id   │ protocolNetwork │ status │ type       │ deploymentID                                   │ allocationID                               │ amount │ poi  │ force │ priority  │ transaction │ failureReason │ source     │ reason │\\n├──────┼─────────────────┼────────┼────────────┼────────────────────────────────────────────────┼────────────────────────────────────────────┼────────┼──────┼───────┼───────────┼─────────────┼───────────────┼────────────┼────────┤\\n│ 5736 │ arbitrum-one    │ failed │ unallocate │ QmdUknu8tyvH1BAE1X2rshXNDBPToYtQ8JypEKTxxcdGem │ 0xdb318ccf2f0f4ccb0f2cf63b6dc87b88c8c20517 │ null   │ null │ false │ undefined │ null        │ IE069         │ indexerCLI │ manual │\\n└──────┴─────────────────┴────────┴────────────┴────────────────────────────────────────────────┴────────────────────────────────────────────┴────────┴──────┴───────┴───────────┴─────────────┴───────────────┴────────────┴────────┘"
## [1] "Unallocating from: QmevNFrcEkZcb7bji3xYuU5UWP7TZ9kurTJ4mW5VebGc9S"
## [1] "┌──────┬─────────────────┬────────────┬────────────────────────────────────────────────┬────────────────────────────────────────────┬────────┬──────┬───────┬──────────┬────────┬────────────┬────────┐\n│ id   │ protocolNetwork │ type       │ deploymentID                                   │ allocationID                               │ amount │ poi  │ force │ priority │ status │ source     │ reason │\n├──────┼─────────────────┼────────────┼────────────────────────────────────────────────┼────────────────────────────────────────────┼────────┼──────┼───────┼──────────┼────────┼────────────┼────────┤\n│ 5737 │ arbitrum-one    │ unallocate │ QmevNFrcEkZcb7bji3xYuU5UWP7TZ9kurTJ4mW5VebGc9S │ 0xf2c6e58179f8cc8f625aa6e18224938d5d36e571 │ null   │ null │ false │ 0        │ queued │ indexerCLI │ manual │\n└──────┴─────────────────┴────────────┴────────────────────────────────────────────────┴────────────────────────────────────────────┴────────┴──────┴───────┴──────────┴────────┴────────────┴────────┘"
## [1] "┌──────┬─────────────────┬────────┬────────────┬────────────────────────────────────────────────┬────────────────────────────────────────────┬────────┬──────┬───────┬───────────┬─────────────┬───────────────┬────────────┬────────┐\\n│ id   │ protocolNetwork │ status │ type       │ deploymentID                                   │ allocationID                               │ amount │ poi  │ force │ priority  │ transaction │ failureReason │ source     │ reason │\\n├──────┼─────────────────┼────────┼────────────┼────────────────────────────────────────────────┼────────────────────────────────────────────┼────────┼──────┼───────┼───────────┼─────────────┼───────────────┼────────────┼────────┤\\n│ 5737 │ arbitrum-one    │ failed │ unallocate │ QmevNFrcEkZcb7bji3xYuU5UWP7TZ9kurTJ4mW5VebGc9S │ 0xf2c6e58179f8cc8f625aa6e18224938d5d36e571 │ null   │ null │ false │ undefined │ null        │ IE069         │ indexerCLI │ manual │\\n└──────┴─────────────────┴────────┴────────────┴────────────────────────────────────────────────┴────────────────────────────────────────────┴────────┴──────┴───────┴───────────┴─────────────┴───────────────┴────────────┴────────┘"
## [1] "Unallocating from: QmfTYPHrWaYkaFzwCwmXXshc3Vb7pp77uiqB7XmBb7g14b"
## [1] "┌──────┬─────────────────┬────────────┬────────────────────────────────────────────────┬────────────────────────────────────────────┬────────┬──────┬───────┬──────────┬────────┬────────────┬────────┐\n│ id   │ protocolNetwork │ type       │ deploymentID                                   │ allocationID                               │ amount │ poi  │ force │ priority │ status │ source     │ reason │\n├──────┼─────────────────┼────────────┼────────────────────────────────────────────────┼────────────────────────────────────────────┼────────┼──────┼───────┼──────────┼────────┼────────────┼────────┤\n│ 5738 │ arbitrum-one    │ unallocate │ QmfTYPHrWaYkaFzwCwmXXshc3Vb7pp77uiqB7XmBb7g14b │ 0xfc5a16d16b28810827ce606e94898dbce1f0351e │ null   │ null │ false │ 0        │ queued │ indexerCLI │ manual │\n└──────┴─────────────────┴────────────┴────────────────────────────────────────────────┴────────────────────────────────────────────┴────────┴──────┴───────┴──────────┴────────┴────────────┴────────┘"
## [1] "┌──────┬─────────────────┬────────┬────────────┬────────────────────────────────────────────────┬────────────────────────────────────────────┬────────┬──────┬───────┬───────────┬─────────────┬───────────────┬────────────┬────────┐\\n│ id   │ protocolNetwork │ status │ type       │ deploymentID                                   │ allocationID                               │ amount │ poi  │ force │ priority  │ transaction │ failureReason │ source     │ reason │\\n├──────┼─────────────────┼────────┼────────────┼────────────────────────────────────────────────┼────────────────────────────────────────────┼────────┼──────┼───────┼───────────┼─────────────┼───────────────┼────────────┼────────┤\\n│ 5738 │ arbitrum-one    │ failed │ unallocate │ QmfTYPHrWaYkaFzwCwmXXshc3Vb7pp77uiqB7XmBb7g14b │ 0xfc5a16d16b28810827ce606e94898dbce1f0351e │ null   │ null │ false │ undefined │ null        │ IE069         │ indexerCLI │ manual │\\n└──────┴─────────────────┴────────┴────────────┴────────────────────────────────────────────────┴────────────────────────────────────────────┴────────┴──────┴───────┴───────────┴─────────────┴───────────────┴────────────┴────────┘"
## [1] "Unallocating from: Qmb7rYJk1BmDDkfYQSobCG9HSLvbEiKrRh5gqv3xXCkzNq"
## [1] "┌──────┬─────────────────┬────────────┬────────────────────────────────────────────────┬────────────────────────────────────────────┬────────┬──────┬───────┬──────────┬────────┬────────────┬────────┐\n│ id   │ protocolNetwork │ type       │ deploymentID                                   │ allocationID                               │ amount │ poi  │ force │ priority │ status │ source     │ reason │\n├──────┼─────────────────┼────────────┼────────────────────────────────────────────────┼────────────────────────────────────────────┼────────┼──────┼───────┼──────────┼────────┼────────────┼────────┤\n│ 5739 │ arbitrum-one    │ unallocate │ Qmb7rYJk1BmDDkfYQSobCG9HSLvbEiKrRh5gqv3xXCkzNq │ 0xfc9564fa6a7d6503e8cf97a2b0330262d7f3b784 │ null   │ null │ false │ 0        │ queued │ indexerCLI │ manual │\n└──────┴─────────────────┴────────────┴────────────────────────────────────────────────┴────────────────────────────────────────────┴────────┴──────┴───────┴──────────┴────────┴────────────┴────────┘"
## [1] "┌──────┬─────────────────┬─────────┬────────────┬────────────────────────────────────────────────┬────────────────────────────────────────────┬────────┬──────┬───────┬───────────┬────────────────────────────────────────────────────────────────────┬───────────────┬────────────┬────────┐\\n│ id   │ protocolNetwork │ status  │ type       │ deploymentID                                   │ allocationID                               │ amount │ poi  │ force │ priority  │ transaction                                                        │ failureReason │ source     │ reason │\\n├──────┼─────────────────┼─────────┼────────────┼────────────────────────────────────────────────┼────────────────────────────────────────────┼────────┼──────┼───────┼───────────┼────────────────────────────────────────────────────────────────────┼───────────────┼────────────┼────────┤\\n│ 5739 │ arbitrum-one    │ success │ unallocate │ Qmb7rYJk1BmDDkfYQSobCG9HSLvbEiKrRh5gqv3xXCkzNq │ 0xfc9564fa6a7d6503e8cf97a2b0330262d7f3b784 │ null   │ null │ false │ undefined │ 0x669d79ece227bcd8b134089677540afc2e846acced0991e06b750383961993ae │ null          │ indexerCLI │ manual │\\n└──────┴─────────────────┴─────────┴────────────┴────────────────────────────────────────────────┴────────────────────────────────────────────┴────────┴──────┴───────┴───────────┴────────────────────────────────────────────────────────────────────┴───────────────┴────────────┴────────┘"
## [1] "Unallocating from: Qmav5jabEyBRv2botzgLK717DJQWokk6kW3AeXxCkPWuSY"
## [1] "┌──────┬─────────────────┬────────────┬────────────────────────────────────────────────┬────────────────────────────────────────────┬────────┬──────┬───────┬──────────┬────────┬────────────┬────────┐\n│ id   │ protocolNetwork │ type       │ deploymentID                                   │ allocationID                               │ amount │ poi  │ force │ priority │ status │ source     │ reason │\n├──────┼─────────────────┼────────────┼────────────────────────────────────────────────┼────────────────────────────────────────────┼────────┼──────┼───────┼──────────┼────────┼────────────┼────────┤\n│ 5740 │ arbitrum-one    │ unallocate │ Qmav5jabEyBRv2botzgLK717DJQWokk6kW3AeXxCkPWuSY │ 0xfe8e0186d682e3f1df8244953d5cde11d4e28133 │ null   │ null │ false │ 0        │ queued │ indexerCLI │ manual │\n└──────┴─────────────────┴────────────┴────────────────────────────────────────────────┴────────────────────────────────────────────┴────────┴──────┴───────┴──────────┴────────┴────────────┴────────┘"
## [1] "┌──────┬─────────────────┬─────────┬────────────┬────────────────────────────────────────────────┬────────────────────────────────────────────┬────────┬──────┬───────┬───────────┬────────────────────────────────────────────────────────────────────┬───────────────┬────────────┬────────┐\\n│ id   │ protocolNetwork │ status  │ type       │ deploymentID                                   │ allocationID                               │ amount │ poi  │ force │ priority  │ transaction                                                        │ failureReason │ source     │ reason │\\n├──────┼─────────────────┼─────────┼────────────┼────────────────────────────────────────────────┼────────────────────────────────────────────┼────────┼──────┼───────┼───────────┼────────────────────────────────────────────────────────────────────┼───────────────┼────────────┼────────┤\\n│ 5740 │ arbitrum-one    │ success │ unallocate │ Qmav5jabEyBRv2botzgLK717DJQWokk6kW3AeXxCkPWuSY │ 0xfe8e0186d682e3f1df8244953d5cde11d4e28133 │ null   │ null │ false │ undefined │ 0xe0ab3fffaba7df431613a80030de12d490b963f18f41f24bbee96a9ff9d4825b │ null          │ indexerCLI │ manual │\\n└──────┴─────────────────┴─────────┴────────────┴────────────────────────────────────────────────┴────────────────────────────────────────────┴────────┴──────┴───────┴───────────┴────────────────────────────────────────────────────────────────────┴───────────────┴────────────┴────────┘"
## [1] "Unallocating from: QmS7wExrveyxpN5g6sfykDUkVHX7oGqvMr8Mw82SueXU8S"
## [1] "┌──────┬─────────────────┬────────────┬────────────────────────────────────────────────┬────────────────────────────────────────────┬────────┬──────┬───────┬──────────┬────────┬────────────┬────────┐\n│ id   │ protocolNetwork │ type       │ deploymentID                                   │ allocationID                               │ amount │ poi  │ force │ priority │ status │ source     │ reason │\n├──────┼─────────────────┼────────────┼────────────────────────────────────────────────┼────────────────────────────────────────────┼────────┼──────┼───────┼──────────┼────────┼────────────┼────────┤\n│ 5741 │ arbitrum-one    │ unallocate │ QmS7wExrveyxpN5g6sfykDUkVHX7oGqvMr8Mw82SueXU8S │ 0xff43774e7ded41c08379335b3d510d243cfddb5c │ null   │ null │ false │ 0        │ queued │ indexerCLI │ manual │\n└──────┴─────────────────┴────────────┴────────────────────────────────────────────────┴────────────────────────────────────────────┴────────┴──────┴───────┴──────────┴────────┴────────────┴────────┘"
## [1] "No items found"

Nice! Next we will begin the process to decide new allocations, by viewing the list of subgraphs we currently have synced. Next section

save.image('/root/github/indexer_analytics_tutorial/data/chapters_snapshots/04-close_allocations.RData')