lukso-network / lukso-orchestrator

Orchestrating the dance of vanguard and pandora.
Apache License 2.0
6 stars 7 forks source link

Subscription implementation for pandora NewPendingHeaders event #25

Closed atif-konasl closed 3 years ago

atif-konasl commented 3 years ago

What type of PR is this?

feature

What does this PR do? Why is it needed?

Subscribe to eth_subscribe: params; [newPendingBlockHeaders, {fromBlockHash: blockHash}]) event in pandora client and gets new pending header. Headers are stored into cache and header hash with status are stored into cache and db.

Which issues(s) does this PR fix?

Issue No - https://github.com/lukso-network/lukso-orchestrator/issues/21 https://github.com/lukso-network/lukso-orchestrator/issues/23

Other notes for review

Simply run using the below command - ./orchestrator --force-clear-db --ws --ws.addr=127.0.0.1 --ws.port=7878 --vanguard-rpc-endpoint=ws://34.91.105.59:8566 --pandora-rpc-endpoint=ws://34.91.105.59:8546 --verbosity=debug

blazejkrzak commented 3 years ago

We should test it @patred20 @atif-konasl get in touch

blazejkrzak commented 3 years ago

Code looks good

blazejkrzak commented 3 years ago

I suggest to introduce this changes before merge. This restores working go releaser https://github.com/lukso-network/lukso-orchestrator/pull/29/commits/64e37150c41fbd103208b5d2ac6d93caffe8bbfa