Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contract info disappeared after re-deploy with docker #2849

Open
luckyyang opened this issue Nov 8, 2019 · 5 comments

Comments

@luckyyang
Copy link

@luckyyang luckyyang commented Nov 8, 2019

Describe your issue here.

Environment

  • Elixir & Erlang/OTP versions (elixir -version): Use official docker config file specified in Makefile
  • Operating System: Ubuntu 18
  • Blockscout Version/branch: master, commit 6bd4038

Steps to reproduce

  1. Go to branch elaeth of our repo https://github.com/cyber-republic/blockscout
  2. Change Makefile config: https://github.com/cyber-republic/blockscout/blob/elaeth/docker/Makefile
  3. Run make start to deploy
  4. Check the contract we deployed before https://explorer.elaeth.io/address/0x4ba3125005796fc05a39bb60b94df2601f6bb6ca/

Expected behaviour

Able to see contract tokens, internal transactions, code, and to read contract

Actual behaviour

  • Unable to see contract tokens, internal transactions, code
  • Code tab disappeared totally

Before deployment:
image

After deployment:
image

@vbaranov

This comment has been minimized.

Copy link
Collaborator

@vbaranov vbaranov commented Nov 14, 2019

@luckyyang could you clarify what did you do after Before deployment:? If before some actions you were seen verified code of contract and after them - no, then it means to me, that something or someone cleared the table smart_contracts in your DB. Btw, If you run docker migrate it will drop DB. Didn't you do that?

Anyways, you can fix this manually by setting consensus to false for the block where the smart-contract was created and restarting the application. Blockscout indexer will re-fetch that block and parse its transactions correctly.

@luckyyang

This comment has been minimized.

Copy link
Author

@luckyyang luckyyang commented Nov 15, 2019

@vbaranov Before deployment: I removed docker containers and images.

Actually I just run several commands to do the deployment with docker:

docker stop blockscout; 
docker rm blockscout; 
docker rmi blockscout_prod; 
docker stop postgres; 
docker rm postgres; 
docker rmi postgres; 

make start;

Would these commands cleared the table smart_contracts? I did not do 'docker migrate'.

Manually by setting consensus to false maybe a way to fix it, but I do not want to do it every time after deployment.

@vbaranov

This comment has been minimized.

Copy link
Collaborator

@vbaranov vbaranov commented Nov 15, 2019

Would these commands cleared the table smart_contracts?

Actually, it shouldn't. I cannot reproduce this behaviour.

@luckyyang

This comment has been minimized.

Copy link
Author

@luckyyang luckyyang commented Nov 15, 2019

Weird. Any guide for how to connect the DB from a client app? I could take a look at the data.

@luckyyang

This comment has been minimized.

Copy link
Author

@luckyyang luckyyang commented Nov 19, 2019

I manually set consensus to false and restart the docker container, did not resolve my issue with following commands. I found the smart_contract table is empty.

docker stop blockscout; 
docker rm blockscout; 
docker stop postgres; 
docker rm postgres; 

make start;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.