Skip to content

Commit

Permalink
feat: PRT Block Hash Retry Archive After Redesign Part 4 - Archive re…
Browse files Browse the repository at this point in the history
…try unitests (#1743)

* feat: PRT Block Hash Retry Archive

* fix deref

* feat: PRT-Block-Hash-Cache-after-redesign-part-2

* fix lint

* WIP

* Part 2 complete?

* fix lint

* WIP

* apply archive only on 2nd relay.

* using parse msg to create a new protocol message with archive.

* lint

* removing sdk tests

* feature is done?

* ocd

* fix test

* Feature finished + tests

* setting finalized so we cache for longer hashes that are archive.

* fix test

* feat:PRT-Block-Hash-Cache-after-redesign-part-4-unitests

* adding unitests to state machine

* remove extensions from all flows and save RouterKey in singleConsumerSession

* version merge

* rename function for better description on functionality

* bigger consistency timeout to succeed on actions

* adding initialized flag

* append existing extensions to archive

* WIP

* finished state machine

* fix nil deref

* fix tests

* merged

* increase timeout

* lint

* fix possible race on protocol message during async code

* add comments and rename

* claude is great

* rename

* update function

* adding upgrade functionality and state change

* LINTUSH

* tech debt

* test added

* add used default value

* tech debt

* tech debt 3

* tech debt 4

* fix bug

* fix test

* fix edge cases

* more info

* attempt 1 test

* oops

* WIP tests

* fix test

---------

Co-authored-by: omerlavanet <omer@lavanet.xyz>
Co-authored-by: Omer <100387053+omerlavanet@users.noreply.github.com>
  • Loading branch information
3 people authored Nov 25, 2024
1 parent b36f548 commit 5380bc0
Show file tree
Hide file tree
Showing 14 changed files with 597 additions and 59 deletions.
2 changes: 1 addition & 1 deletion ecosystem/lavajs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lavanet/lavajs",
"version": "2.1.3",
"version": "3.2.0",
"description": "lavajs",
"author": "Lava Network",
"homepage": "https://github.com/lavanet/lava/tree/main/ecosystem/lavajs#readme",
Expand Down
4 changes: 4 additions & 0 deletions protocol/chainlib/common_test_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@ func CreateChainLibMocks(
mockWebSocketServer.Close()
}
endpoint.NodeUrls = append(endpoint.NodeUrls, common.NodeUrl{Url: mockHttpServer.URL, Addons: addons})
if len(extensions) > 0 {
endpoint.NodeUrls = append(endpoint.NodeUrls, common.NodeUrl{Url: mockHttpServer.URL, Addons: extensions})
endpoint.NodeUrls = append(endpoint.NodeUrls, common.NodeUrl{Url: wsUrl, Addons: extensions})
}
endpoint.NodeUrls = append(endpoint.NodeUrls, common.NodeUrl{Url: wsUrl, Addons: nil})
chainRouter, err = GetChainRouter(ctx, 1, endpoint, chainParser)
if err != nil {
Expand Down
Loading

0 comments on commit 5380bc0

Please sign in to comment.