Skip to content

fix: add type assertion checks to satisfy forcetypeassert linter#2164

Merged
nimrod-teich merged 1 commit into
mainfrom
fix/forcetypeassert-lint-errors
Dec 31, 2025
Merged

fix: add type assertion checks to satisfy forcetypeassert linter#2164
nimrod-teich merged 1 commit into
mainfrom
fix/forcetypeassert-lint-errors

Conversation

@nimrod-teich

Copy link
Copy Markdown
Contributor

Description

Closes: #XXXX


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • read the contribution guide
  • included the correct type prefix in the PR title, you can find examples of the prefixes below:
  • confirmed ! in the type prefix if API or client breaking change
  • targeted the main branch
  • provided a link to the relevant issue or specification
  • reviewed "Files changed" and left comments if necessary
  • included the necessary unit and integration tests
  • updated the relevant documentation or specification, including comments for documenting Go code
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic, API design and naming, documentation is accurate, tests and test coverage

@nimrod-teich nimrod-teich merged commit ae6d527 into main Dec 31, 2025
16 of 17 checks passed
@nimrod-teich nimrod-teich deleted the fix/forcetypeassert-lint-errors branch December 31, 2025 10:34
Tomelia1999 added a commit that referenced this pull request Dec 31, 2025
commit ac492c9
Author: Tomelia1999 <76162525+Tomelia1999@users.noreply.github.com>
Date:   Wed Dec 31 13:57:00 2025 +0200

    fix: Strict timeout statemachine (#2160)

    * update the state machine to check if global context timer is done

    * unit test

    * adding timeout verification in the begining of the stetMachine

    ---------

    Co-authored-by: Nim Rod <nimrod.teich@gmail.com>

commit 3c21210
Author: Nim Rod <nimrod.teich@gmail.com>
Date:   Wed Dec 31 13:56:47 2025 +0200

    fix: Hiesen tests failing randomly  (#2166)

    * fix: only add WebSocket URLs for API interfaces that support them

    REST API only supports HTTP/HTTPS, not WebSocket. Previously,
    CreateChainLibMocks was unconditionally adding ws:// URLs for all
    non-gRPC interfaces, causing test failures with:
      ERR URL scheme should be (http/https), got: ws apiInterface=rest

    Now WebSocket URLs are only added for JsonRPC and TendermintRPC
    interfaces which actually support WebSocket connections.

    * fix: set Enabled: true for test Endpoints to prevent provider blocking

    When creating Endpoint structs in tests without setting Enabled: true,
    the Go zero-value (false) causes all endpoints to be considered
    disabled, immediately blocking providers with:
      'purging provider after all endpoints are disabled'

    This fix adds Enabled: true to all Endpoint configurations in:
    - rpcconsumer_server_test.go
    - rpcsmartrouter_server_test.go
    - rpcsmartrouter_test.go

commit ae6d527
Author: Nim Rod <nimrod.teich@gmail.com>
Date:   Wed Dec 31 12:33:58 2025 +0200

    fix: add type assertion checks to satisfy forcetypeassert linter (#2164)

commit cf3ac0d
Author: Nim Rod <nimrod.teich@gmail.com>
Date:   Wed Dec 31 11:59:59 2025 +0200

    fix: use dynamic ports in tests to avoid address conflicts (#2162)

    Replace hardcoded port 54321 with dynamically allocated ports using
    net.Listen on :0 to prevent 'address already in use' errors when
    tests run in parallel or when ports are occupied.

    Changes:
    - Add getFreePort() helper function to both test files
    - Update createRpcConsumer() and createRpcSmartRouter() to use dynamic ports

commit f87a634
Author: NadavLevi <30565624+NadavLevi@users.noreply.github.com>
Date:   Wed Dec 31 11:59:49 2025 +0200

    feat(processingCtx): default processing ctx timeout can be set through flag (#2161)

commit 77c514f
Author: NadavLevi <30565624+NadavLevi@users.noreply.github.com>
Date:   Tue Dec 30 16:48:11 2025 +0200

    perf: add early return optimization to LavaFormatLog (#2155)

commit f3e59ef
Author: NadavLevi <30565624+NadavLevi@users.noreply.github.com>
Date:   Tue Dec 30 16:47:55 2025 +0200

    perf: implement double-check locking in cacheAddonAddresses (#2156)

    * perf: implement double-check locking in cacheAddonAddresses

    Replace simple write lock with double-check locking pattern to reduce
    lock contention in cacheAddonAddresses. This allows multiple concurrent
    readers on cache hits (fast path) while maintaining thread safety for
    cache misses (write path).

    Performance improvement:
    - Cache hits: RLock only (allows concurrent access)
    - Cache misses: RLock check → upgrade to Lock → double-check → populate

    This significantly reduces lock wait times when the cache is already
    populated, which is the common case during steady-state operation.

    * refactor: enhance cacheAddonAddresses with improved double-check locking

    Updated the cacheAddonAddresses method to utilize a more efficient double-check locking pattern. This change reduces lock contention by allowing concurrent reads on cache hits while ensuring thread safety during cache misses. The implementation includes cloning the extensions to prevent aliasing and optimizes the cache population process. This refactor aims to improve performance during steady-state operations.

    ---------

    Co-authored-by: avitenzer <tenzer@clara.co.uk>

commit f466762
Author: NadavLevi <30565624+NadavLevi@users.noreply.github.com>
Date:   Tue Dec 30 16:16:42 2025 +0200

    fix(smart-router): skip block gap warning when expectedBH is MaxInt64 (#2157)
nimrod-teich pushed a commit that referenced this pull request Dec 31, 2025
* Adding a fix for redundent retries when pairingListEmpty

* Squashed commit of the following:

commit ac492c9
Author: Tomelia1999 <76162525+Tomelia1999@users.noreply.github.com>
Date:   Wed Dec 31 13:57:00 2025 +0200

    fix: Strict timeout statemachine (#2160)

    * update the state machine to check if global context timer is done

    * unit test

    * adding timeout verification in the begining of the stetMachine

    ---------

    Co-authored-by: Nim Rod <nimrod.teich@gmail.com>

commit 3c21210
Author: Nim Rod <nimrod.teich@gmail.com>
Date:   Wed Dec 31 13:56:47 2025 +0200

    fix: Hiesen tests failing randomly  (#2166)

    * fix: only add WebSocket URLs for API interfaces that support them

    REST API only supports HTTP/HTTPS, not WebSocket. Previously,
    CreateChainLibMocks was unconditionally adding ws:// URLs for all
    non-gRPC interfaces, causing test failures with:
      ERR URL scheme should be (http/https), got: ws apiInterface=rest

    Now WebSocket URLs are only added for JsonRPC and TendermintRPC
    interfaces which actually support WebSocket connections.

    * fix: set Enabled: true for test Endpoints to prevent provider blocking

    When creating Endpoint structs in tests without setting Enabled: true,
    the Go zero-value (false) causes all endpoints to be considered
    disabled, immediately blocking providers with:
      'purging provider after all endpoints are disabled'

    This fix adds Enabled: true to all Endpoint configurations in:
    - rpcconsumer_server_test.go
    - rpcsmartrouter_server_test.go
    - rpcsmartrouter_test.go

commit ae6d527
Author: Nim Rod <nimrod.teich@gmail.com>
Date:   Wed Dec 31 12:33:58 2025 +0200

    fix: add type assertion checks to satisfy forcetypeassert linter (#2164)

commit cf3ac0d
Author: Nim Rod <nimrod.teich@gmail.com>
Date:   Wed Dec 31 11:59:59 2025 +0200

    fix: use dynamic ports in tests to avoid address conflicts (#2162)

    Replace hardcoded port 54321 with dynamically allocated ports using
    net.Listen on :0 to prevent 'address already in use' errors when
    tests run in parallel or when ports are occupied.

    Changes:
    - Add getFreePort() helper function to both test files
    - Update createRpcConsumer() and createRpcSmartRouter() to use dynamic ports

commit f87a634
Author: NadavLevi <30565624+NadavLevi@users.noreply.github.com>
Date:   Wed Dec 31 11:59:49 2025 +0200

    feat(processingCtx): default processing ctx timeout can be set through flag (#2161)

commit 77c514f
Author: NadavLevi <30565624+NadavLevi@users.noreply.github.com>
Date:   Tue Dec 30 16:48:11 2025 +0200

    perf: add early return optimization to LavaFormatLog (#2155)

commit f3e59ef
Author: NadavLevi <30565624+NadavLevi@users.noreply.github.com>
Date:   Tue Dec 30 16:47:55 2025 +0200

    perf: implement double-check locking in cacheAddonAddresses (#2156)

    * perf: implement double-check locking in cacheAddonAddresses

    Replace simple write lock with double-check locking pattern to reduce
    lock contention in cacheAddonAddresses. This allows multiple concurrent
    readers on cache hits (fast path) while maintaining thread safety for
    cache misses (write path).

    Performance improvement:
    - Cache hits: RLock only (allows concurrent access)
    - Cache misses: RLock check → upgrade to Lock → double-check → populate

    This significantly reduces lock wait times when the cache is already
    populated, which is the common case during steady-state operation.

    * refactor: enhance cacheAddonAddresses with improved double-check locking

    Updated the cacheAddonAddresses method to utilize a more efficient double-check locking pattern. This change reduces lock contention by allowing concurrent reads on cache hits while ensuring thread safety during cache misses. The implementation includes cloning the extensions to prevent aliasing and optimizes the cache population process. This refactor aims to improve performance during steady-state operations.

    ---------

    Co-authored-by: avitenzer <tenzer@clara.co.uk>

commit f466762
Author: NadavLevi <30565624+NadavLevi@users.noreply.github.com>
Date:   Tue Dec 30 16:16:42 2025 +0200

    fix(smart-router): skip block gap warning when expectedBH is MaxInt64 (#2157)

---------

Co-authored-by: avitenzer <tenzer@clara.co.uk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants