Skip to content

Conversation

@frnandu
Copy link
Collaborator

@frnandu frnandu commented Dec 22, 2025

No description provided.

@frnandu frnandu requested review from 1-leo and nogringo December 22, 2025 01:13
@codecov
Copy link

codecov bot commented Dec 22, 2025

Codecov Report

❌ Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 70.78%. Comparing base (937541a) to head (8ab39e9).

Files with missing lines Patch % Lines
.../repositories/verifiers/bip340_event_verifier.dart 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #345      +/-   ##
==========================================
+ Coverage   70.72%   70.78%   +0.05%     
==========================================
  Files         136      136              
  Lines        5069     5072       +3     
==========================================
+ Hits         3585     3590       +5     
+ Misses       1484     1482       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@1-leo
Copy link
Contributor

1-leo commented Dec 22, 2025

can we merge #327 (and #332)
before?
Then we can reuse the isolate, reducing the overhead:

Used like this:

    final data = await IsolateManager.instance
        .runInComputeIsolate<PARAMTYPE, RETURNTYPE>(
      <function>,
      <params>
    );

    final data = await IsolateManager.instance
        .runInComputeIsolate<_MiningParams, Nip01Event>(
      _mineEventInIsolate,
      _MiningParams(
        event: event,
        targetDifficulty: targetDifficulty,
        maxIterations: maxIterations ?? 1000000,
      ),
    );
    

Copy link
Contributor

@1-leo 1-leo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@frnandu
Copy link
Collaborator Author

frnandu commented Dec 22, 2025

can we merge #327 (and #332) before? Then we can reuse the isolate, reducing the overhead:

Used like this:

    final data = await IsolateManager.instance
        .runInComputeIsolate<PARAMTYPE, RETURNTYPE>(
      <function>,
      <params>
    );

    final data = await IsolateManager.instance
        .runInComputeIsolate<_MiningParams, Nip01Event>(
      _mineEventInIsolate,
      _MiningParams(
        event: event,
        targetDifficulty: targetDifficulty,
        maxIterations: maxIterations ?? 1000000,
      ),
    );
    

depends if performance-wise verifying a lot of events proves to be noticeable better with Isolate.run than using only 1 isolate for all events sequentially ....(assuming no pool mechanism exists or be added in near-term to IsolateManager)

@frnandu frnandu added this to the 0.7 milestone Dec 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants