Closed begetan closed 4 months ago
I have the same issue with subgraphs allocations. Build & install indexer-agent from source, version v0.20.3. Run with pm2 as a script. (node v14.20.0)
Set the rules for subgraphs:
graph indexer rules set QmW8Cbb2R4ZHWGsrYjNJKRjoKKcPeDTNK6rdipfQQaAhd6 parallelAllocations 1
graph indexer rules set QmWq1pmnhEvx25qxpYYj9Yp6E1xMKMVoUjXVQBxUJmreSe parallelAllocations 1
graph indexer rules set QmSqJEGHp1PcgvBYKFF2u8vhJZt8JTq18EV7mCuuZZiutX parallelAllocations 1
graph indexer rules set QmeVXKzGKSyfEQib4MzeZveJgDYJCYDMMHc1pPevWeSbsq parallelAllocations 1
$graph indexer rules get all
─────┬──────────┬─────────────────────┬────────┬───────────────┬──────────────────┐
│ identifier │ identifierType │ allocationAmount │ allocationLifetime │ autoRenewal │ parallelAllocations │ maxAllocationPercentage │ minSignal │ maxSignal │ minStake │ minAverageQueryFees │ custom │ decisionBasis │ requireSupported │
├────────────────────────────────────────────────┼────────────────┼──────────────────┼────────────────────┼─────────────┼─────────────────────┼─────────────────────────┼───────────┼───────────┼──────────┼─────────────────────┼────────┼───────────────┼──────────────────┤
│ global │ group │ 100.0 │ null │ true │ 1 │ null │ null │ null │ null │ null │ null │ rules │ true │
├────────────────────────────────────────────────┼────────────────┼──────────────────┼────────────────────┼─────────────┼─────────────────────┼─────────────────────────┼───────────┼───────────┼──────────┼─────────────────────┼────────┼───────────────┼──────────────────┤
│ QmeVXKzGKSyfEQib4MzeZveJgDYJCYDMMHc1pPevWeSbsq │ deployment │ 4,000.0 │ null │ true │ 1 │ null │ null │ null │ null │ null │ null │ always │ true │
├────────────────────────────────────────────────┼────────────────┼──────────────────┼────────────────────┼─────────────┼─────────────────────┼─────────────────────────┼───────────┼───────────┼──────────┼─────────────────────┼────────┼───────────────┼──────────────────┤
│ QmSqJEGHp1PcgvBYKFF2u8vhJZt8JTq18EV7mCuuZZiutX │ deployment │ 5,000.0 │ null │ true │ 1 │ null │ null │ null │ null │ null │ null │ always │ true │
├────────────────────────────────────────────────┼────────────────┼──────────────────┼────────────────────┼─────────────┼─────────────────────┼─────────────────────────┼───────────┼───────────┼──────────┼─────────────────────┼────────┼───────────────┼──────────────────┤
│ QmW8Cbb2R4ZHWGsrYjNJKRjoKKcPeDTNK6rdipfQQaAhd6 │ deployment │ 5,000.0 │ null │ true │ 1 │ null │ null │ null │ null │ null │ null │ always │ true │
├────────────────────────────────────────────────┼────────────────┼──────────────────┼────────────────────┼─────────────┼─────────────────────┼─────────────────────────┼───────────┼───────────┼──────────┼─────────────────────┼────────┼───────────────┼──────────────────┤
│ QmWq1pmnhEvx25qxpYYj9Yp6E1xMKMVoUjXVQBxUJmreSe │ deployment │ 5,000.0 │ null │ true │ 1 │ null │ null │ null │ null │ null │ null │ always │ true │
└────────────────────────────────────────────────┴────────────────┴──────────────────┴────────
$graph indexer status --output=yaml
url: http://localhost:7600/
address: "0x........................"
registered: true
location: 9.115583896636963,10.751087665557861
endpoints:
- name: service
url: http://localhost:7600/
status: up
tests:
- test: URL validation
error: null
possibleActions: []
__typename: IndexerEndpointTest
- test: http get http://localhost:7600/
error: null
possibleActions: []
__typename: IndexerEndpointTest
- name: status
url: http://localhost:7600/status
status: up
tests:
- test: URL validation
error: null
possibleActions: []
__typename: IndexerEndpointTest
- test: http post http://localhost:7600/status query="{ indexingStatuses {
subgraph } }"
error: null
possibleActions: []
__typename: IndexerEndpointTest
indexerDeployments:
- subgraphDeployment: QmSqJEGHp1PcgvBYKFF2u8vhJZt8JTq18EV7mCuuZZiutX
synced: true
health: healthy
fatalError: null
node: default
chains:
- network: gnosis
latestBlock:
number: 24459209
__typename: BlockPointer
chainHeadBlock:
number: 24525063
__typename: BlockPointer
earliestBlock:
number: 14861343
__typename: BlockPointer
__typename: ChainIndexingStatus
__typename: IndexerDeployment
- subgraphDeployment: QmW8Cbb2R4ZHWGsrYjNJKRjoKKcPeDTNK6rdipfQQaAhd6
synced: false
health: healthy
fatalError: null
node: default
chains:
- network: gnosis
latestBlock:
number: 21342398
__typename: BlockPointer
chainHeadBlock:
number: 24525063
__typename: BlockPointer
earliestBlock:
number: 14735903
__typename: BlockPointer
__typename: ChainIndexingStatus
__typename: IndexerDeployment
- subgraphDeployment: QmWq1pmnhEvx25qxpYYj9Yp6E1xMKMVoUjXVQBxUJmreSe
synced: true
health: healthy
fatalError: null
node: default
chains:
- network: gnosis
latestBlock:
number: 24459209
__typename: BlockPointer
chainHeadBlock:
number: 24525063
__typename: BlockPointer
earliestBlock:
number: 18410654
__typename: BlockPointer
__typename: ChainIndexingStatus
__typename: IndexerDeployment
- subgraphDeployment: QmeVXKzGKSyfEQib4MzeZveJgDYJCYDMMHc1pPevWeSbsq
synced: false
health: healthy
fatalError: null
node: default
chains:
- network: gnosis
latestBlock:
number: 22629840
__typename: BlockPointer
chainHeadBlock:
number: 24525063
__typename: BlockPointer
earliestBlock:
number: 17890041
__typename: BlockPointer
__typename: ChainIndexingStatus
__typename: IndexerDeployment
indexerAllocations: []
indexingRules:
- identifier: QmWq1pmnhEvx25qxpYYj9Yp6E1xMKMVoUjXVQBxUJmreSe
identifierType: deployment
allocationAmount:
type: BigNumber
hex: "0x010f0cf064dd59200000"
allocationLifetime: null
autoRenewal: true
parallelAllocations: 1
maxAllocationPercentage: null
minSignal: null
maxSignal: null
minStake: null
minAverageQueryFees: null
custom: null
decisionBasis: always
requireSupported: true
- identifier: QmW8Cbb2R4ZHWGsrYjNJKRjoKKcPeDTNK6rdipfQQaAhd6
identifierType: deployment
allocationAmount:
type: BigNumber
hex: "0x010f0cf064dd59200000"
allocationLifetime: null
autoRenewal: true
parallelAllocations: 1
maxAllocationPercentage: null
minSignal: null
maxSignal: null
minStake: null
minAverageQueryFees: null
custom: null
decisionBasis: always
requireSupported: true
- identifier: QmSqJEGHp1PcgvBYKFF2u8vhJZt8JTq18EV7mCuuZZiutX
identifierType: deployment
allocationAmount:
type: BigNumber
hex: "0x010f0cf064dd59200000"
allocationLifetime: null
autoRenewal: true
parallelAllocations: 1
maxAllocationPercentage: null
minSignal: null
maxSignal: null
minStake: null
minAverageQueryFees: null
custom: null
decisionBasis: always
requireSupported: true
- identifier: QmeVXKzGKSyfEQib4MzeZveJgDYJCYDMMHc1pPevWeSbsq
identifierType: deployment
allocationAmount:
type: BigNumber
hex: "0xd8d726b7177a800000"
allocationLifetime: null
autoRenewal: true
parallelAllocations: 1
maxAllocationPercentage: null
minSignal: null
maxSignal: null
minStake: null
minAverageQueryFees: null
custom: null
decisionBasis: always
requireSupported: true
- identifier: global
identifierType: group
allocationAmount:
type: BigNumber
hex: "0x056bc75e2d63100000"
allocationLifetime: null
autoRenewal: true
parallelAllocations: 1
maxAllocationPercentage: null
minSignal: null
maxSignal: null
minStake: null
minAverageQueryFees: null
custom: null
decisionBasis: rules
requireSupported: true
Hey @begetan & @papadritta 👋
It appears the indexer-agent is operating off of old or incorrect subgraph data. More specifically it looks like the agent is querying the network subgraph, seeing that there are no allocations for your indexer and then deciding to create them. In the status output you shared @papadritta, the indexerAllocations
array is returning as empty.
Could you provide some detail around your network subgraph setup? What do you have set for network-subgraph-deployment
and network-subgraph-endpoint
?
Hey @fordN
I used old config set as network-subgraph-endpoint https://gateway.testnet.thegraph.com/network
and now switch to the new network-subgraph-endpoint https://api.thegraph.com/subgraphs/name/graphprotocol/graph-network-goerli
and add network-subgraph-deployment QmNhsC5jwSvwgYFdjBrjcc2YW8o7Xmo2WNZUHDukfRvzD4
and restart the agent. The graph-node version is v0.28.1
@fordN This is my config:
"INDEXER_AGENT_NETWORK_SUBGRAPH_ENDPOINT=https://gateway.testnet.thegraph.com/network"
"INDEXER_AGENT_NETWORK_SUBGRAPH_DEPLOYMENT=",
Network subgraph deployment is empty
@begetan, you should change your api to network-subgraph-endpoint https://api.thegraph.com/subgraphs/name/graphprotocol/graph-network-goerli
and delete network-subgraph-deployment QmNhsC5jwSvwgYFdjBrjcc2YW8o7Xmo2WNZUHDukfRvzD4 because this subgraph broken and restart the agent
I set finally network-subgraph-endpoint
equal to https://api.thegraph.com/subgraphs/name/graphprotocol/graph-network-goerli
And left network-subgraph-deployment
blank
Please be aware, that StakeSquid setup embeds broken default value in several place like here
I changed configuration to a single variable in .env file and replaced default value with this variable in docke-compose file:
.env:
NETWORK_SUBGRAPH_ENDPOINT=https://api.thegraph.com/subgraphs/name/graphprotocol/graph-network-goerli
docker-compose.yml:
INDEXER_SERVICE_NETWORK_SUBGRAPH_ENDPOINT: ${NETWORK_SUBGRAPH_ENDPOINT}
INDEXER_AGENT_NETWORK_SUBGRAPH_ENDPOINT: ${NETWORK_SUBGRAPH_ENDPOINT}
- subgraph_endpoint=${NETWORK_SUBGRAPH_ENDPOINT}
(repeated it three times around the whole config)
Closing this issue as it's old.
It looks like indexer agent is trying to open allocations despite of they are already processed onchain.
indexer version 0.20.4
Set deployment rules
Indexer agent is trying to open the same allocations again and again:
How to reproduce:
graph indexer actions get
After several hours it already open 16 allocations. It looks like every 2 hours it adds new allocations