Skip to content

Commit

Permalink
PRT-227 refactor chain sentry class (lavanet#218)
Browse files Browse the repository at this point in the history
* added chainTracker class

* api change to add specific block

* finished implementing chainTracker

* better performance, fixed some bugs, added protections for polling too early, added unitests, WIP

* fixed all issues, added unitests for fork callbacks

* added latest block as arg to callbacks

* fixed fork identification bug

* allows cancelling the ticker in chainTracker

* lint spaces

* lint space

* lint

* better fetch performance

* improved readability of the fetcher code

* added a unit test verifying stateTracker doesn't need to read previous blocks if nothing changed

* modified parameters to make the unit-test more interesting

* lint

* added documentation and error codes are sparser
  • Loading branch information
omerlavanet authored Jan 11, 2023
1 parent 4578b19 commit c7c474f
Show file tree
Hide file tree
Showing 12 changed files with 2,050 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,9 @@ jobs:
######################################################
- name: Run Lava E2E Tests IGNITE VERSION:0.22.1 -timeout 1200s
run: go test ./testutil/e2e/ -v -timeout 1200s # 20mins

######################################################
### Run relayer unitests
######################################################
- name: Run Relayer unit Tests
run: go test ./relayer/lavasession/ ./relayer/chainTracker/ -v
2 changes: 1 addition & 1 deletion config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ accounts:
- name: alice
coins: ["200000000000ulava"]
- name: bob
coins: ["100000000ulava"]
coins: ["10000ulava"]
- name: user1
coins: ["200000000ulava"]
- name: user2
Expand Down
343 changes: 343 additions & 0 deletions relayer/chainTracker/chainTracker.go

Large diffs are not rendered by default.

Loading

0 comments on commit c7c474f

Please sign in to comment.