Close and delete allocations
Since I myself have encountered this problem during the execution of many tasks in the MIPs program, I want to share how to delete allocations.
An important preliminary part of deleting allocations is to delete allocation rules from the table, because if you don’t do this, they can be reallocated according to the rules.
Enter the indexer shell:
./shell cli
graph indexer rules delete [deployment ID, subgraph ID]
Next close or make sure that the allocation is closed
graph indexer allocations close [options] <id> <poi>
close the allocation, usually this is done by entering the command, if the allocation is not closed try to find the reason and fix it, otherwise you can close the allocation with option --force without poi, but then you will not get any rewards for indexing. For example, a common bug was Failed to resolve CAIP2 ID from the provided network alias
which was resolved by updating the Indexer-agent.
Removing allocations from the base, at first it had to be done in a more complicated way than now, but it still works: Stop the indexer-agent to do this
docker stop indexer-agent
Start the graphman shell
./shell index-node-0
find the name of the subgraph
graphman info Qme... - get subgraphName
then use the given name to remove the subgraph with three commands: graphman remove subgraphName
graphman unused record
graphman unused remove
Exit the graphman shell exit
restart the container bash start-essential
The second way, was added to the indexer-stack later, became more convenient:
docker stop indexer-agent
./shell index-node-0
graphman drop Qme..
exit
bash start-essential
Install Celo Baremetal Archive Node
sudo apt install -y git make wget gcc pkg-config libusb-1.0-0-dev \
libudev-dev jq gcc g++ curl libssl-dev apache2-utils build-essential pkg-config
# Add to PATH
echo "export PATH=$PATH:/usr/local/go/bin:/root/.local/bin" >> /root/.bashrc
Install go You can see the current version here https://go.dev/doc/install
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.20.3.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
go version
Building the binary
git clone <https://github.com/celo-org/celo-blockchain>
cd celo-blockchain
git checkout v1.7.2
make
Setup the systemd file
nano /etc/systemd/system/celo.service
[Unit]
Description=Celo Archive Node
After=network.target
StartLimitIntervalSec=60
StartLimitBurst=3
[Service]
Type=simple
Restart=on-failure
RestartSec=5
TimeoutSec=900
User=root
Nice=0
LimitNOFILE=200000
WorkingDirectory=/root/celo-blockchain
ExecStart=/root/celo-blockchain/build/bin/geth \
--datadir=/root/.local/share/celo/datadir \
--syncmode=full \
--gcmode=archive \
--txlookuplimit=0 \
--cache.preimages \
--http \
--http.addr=0.0.0.0 \
--http.port=9656 \
--http.api=eth,net,web3,debug,admin,personal
KillSignal=SIGHUP
[Install]
WantedBy=multi-user.target
systemctl daemon-reload
systemctl restart celo
# Viewing Logs
journalctl -fu celo