[General] <Set up a archive node based on docker compose and pgdump> #735
-
Team or ProjectNo response EnvironmentMainnet L2 block numberNo response Provide a brief description of the functionality you're trying to implement and the issue you are running into.I need to setup archive node based on docker. So I follow docker compose file here at https://github.com/matter-labs/zksync-era/blob/main/docs/guides/external-node/docker-compose-examples/mainnet-external-node-docker-compose.yml, and after all docker run successfully, I use pg_restore command to restore pgdump file from https://storage.googleapis.com/zksync-era-mainnet-external-node-backups/external_node_latest.pgdump to postgres. But it looks to me the pgdump files restored all historical records on mainnet2 database, instead of zksync_local_ext_node used by zksync node, as shown below:
-----------------------+--------- As a result, when I run rpc request to retrieve transactions long before the current block, the node replied error messages shown as below: {"jsonrpc":"2.0","error":{"code":-32602,"message":"Block with such an ID is pruned; the first retained block is 46555998"},"id":1} Any suggestions on how to fix this issue? Thanks! Repo Link (Optional)No response Additional DetailsNo response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
It seems like the issue you're encountering is related to the database used by the ZKsync node not being correctly aligned with the restored data from the pgdump file. Here are a few steps you can take to address this issue:
If these steps do not resolve the issue, you might want to consult the ZKsync Era documentation for more detailed guidance on setting up and configuring archive nodes, or reach out to the ZKsync community or support for more specific assistance. Your feedback helps us serve you better. If this fully addresses your question, please give it a thumbs up. If it doesn't, please give it a thumbs down. This will inform the community and team so we can improve our support. |
Beta Was this translation helpful? Give feedback.
-
Hello! As far as I understand you'd like to change pruning behaviour of your node. That can be done via adjusting the following configuraitons
|
Beta Was this translation helpful? Give feedback.
I'd recommend going through this tutorial - it explains everything, including pruning.