0xHabitat / habitat-rollup

tech-repo for the habitat rollup
https://0xhabitat.org/
The Unlicense
7 stars 12 forks source link

Infura inconsistencies - Action needed #20

Open pinkiebell opened 3 years ago

pinkiebell commented 3 years ago

See: https://github.com/deora-earth/habitat/tree/master/docker

Infura has problems with consistency regarding eth_getLogs it sometimes returns events and sometimes don't, without throwing any errors. A proxy has been deployed to detect such circumstances and it is advised to use that. Otherwise the change that the bridge doesn't pick up Deposit events is high.

Please replace the second https:// with your infura url and use this as ROOT_RPC_URL:

https://rpc-proxy.fly.dev/https://mainnet.infura.io/v3/<YOUR INFURA TOKEN>
pinkiebell commented 3 years ago

@eshavkun Ping @Clearwood @johannbarbie Pinged you already yesterday, but just to make sure :)

eshavkun commented 3 years ago

I updated the config but didn't restart the node yet as Infura is down atm. Maybe we should switch to our own node?

pinkiebell commented 3 years ago

I updated the config but didn't restart the node yet as Infura is down atm. Maybe we should switch to our own node?

Probably 😂, the ethereum light mode on geht is mostly not working because it cant find any suitable peers, however I found out openethereum(parity) seems to be syncing in light mode

pinkiebell commented 3 years ago

Fyi, added a example docker compose file with openethereum, light mode seems to be deprecated but its still working, just have to wait a few minutes to get enough peers.

https://github.com/deora-earth/habitat/blob/master/docker/with-openethereum.yml

johannbarbie commented 3 years ago

cool, i'll try the config change today.

johannbarbie commented 3 years ago

@pinkiebell how do i do that?

using the sudo docker create --name habitat --restart=unless-stopped -p 8080:8080 ... -e ROOT_RPC_URL=https://rpc-proxy.fly.dev/https://mainnet.infura.io/v3/<YOUR INFURA TOKEN> ... command?

i'm worried that it recreates the container, and i loose the node state

pinkiebell commented 3 years ago

@johannbarbie I advise that you use and edit the docker/simple-node.yml you can start that via docker-compose -f simple-node.yml up -d (-d = dispatch to background)

johannbarbie commented 3 years ago

@pinkiebell that file doesn't exist:

ubuntu@ip-172-31-18-230:~$ sudo curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   651  100   651    0     0  10672      0 --:--:-- --:--:-- --:--:-- 10850
100 11.6M  100 11.6M    0     0  4238k      0  0:00:02  0:00:02 --:--:-- 5058k
ubuntu@ip-172-31-18-230:~$ sudo chmod +x /usr/local/bin/docker-compose
ubuntu@ip-172-31-18-230:~$ docker-compose -f simple-node.yml up -d
ERROR: .FileNotFoundError: [Errno 2] No such file or directory: './simple-node.yml'
pinkiebell commented 3 years ago

@pinkiebell that file doesn't exist:

ubuntu@ip-172-31-18-230:~$ sudo curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   651  100   651    0     0  10672      0 --:--:-- --:--:-- --:--:-- 10850
100 11.6M  100 11.6M    0     0  4238k      0  0:00:02  0:00:02 --:--:-- 5058k
ubuntu@ip-172-31-18-230:~$ sudo chmod +x /usr/local/bin/docker-compose
ubuntu@ip-172-31-18-230:~$ docker-compose -f simple-node.yml up -d
ERROR: .FileNotFoundError: [Errno 2] No such file or directory: './simple-node.yml'

That file is inside the docker/ dir of this repo. You can just copy the stuff :)

johannbarbie commented 3 years ago

ok, now i get this one:

ubuntu@ip-172-31-18-230:~$ sudo docker-compose -f simple-node.yml up -d
Creating network "ubuntu_default" with the default driver
Creating volume "ubuntu_node_data" with default driver
Creating ubuntu_habitat_1 ... 
Creating ubuntu_habitat_1 ... error

ERROR: for ubuntu_habitat_1  Cannot start service habitat: driver failed programming external connectivity on endpoint ubuntu_habitat_1 (fcaa19623189196f06be8d739c9ac4365a74cdc6d487d0e1a73483c3bc0713ef): Bind for 0.0.0.0:8080 failed: port is already allocated

ERROR: for habitat  Cannot start service habitat: driver failed programming external connectivity on endpoint ubuntu_habitat_1 (fcaa19623189196f06be8d739c9ac4365a74cdc6d487d0e1a73483c3bc0713ef): Bind for 0.0.0.0:8080 failed: port is already allocated
ERROR: Encountered errors while bringing up the project.
pinkiebell commented 3 years ago

The old habitat container is still running or port binded. docker rm -f habitat

pinkiebell commented 3 years ago

Also make sure that you edit the file for the relevant parts like BRIDGE_ADDRESS or ROOT_RPC_URL etc

johannbarbie commented 3 years ago

cool, i think that worked.