Skip to content

fix: use ArcSwap for ChainStore::heaviest_tipset - #7191

Merged
LesnyRumcajs merged 1 commit into
mainfrom
hm/arc-swap-for-heaviest-tipset
Jun 19, 2026
Merged

fix: use ArcSwap for ChainStore::heaviest_tipset#7191
LesnyRumcajs merged 1 commit into
mainfrom
hm/arc-swap-for-heaviest-tipset

Conversation

@hanabi1224

@hanabi1224 hanabi1224 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary of changes

# Command
oha -n 100000 -c 10 -m POST http://127.0.0.1:3456/rpc/v1 -H 'Content-Type: application/json' -D eth_getBlockByNumber.json

# payload
{
        "method": "eth_getBlockByNumber",
        "params": [
                "pending", false
        ],
        "id": 1,
        "jsonrpc": "2.0"
}

# PR
  Success rate: 100.00%   30s     40s     50s     60s      ││0.0004  0.0067  0.0130  0.0192  0.0255  0.0318  0.0380    │
  Total:────────14974.2865 ms──────────────────────────────┘└──────────────────────────────────────────────────────────┘
  Slowest:      38.0240 ms
  Fastest:      0.4130 ms
  Average:      1.4918 ms
  Requests/sec: 6678.1145

  Total data:   262.45 MiB
  Size/request: 2.69 KiB
  Size/sec:     17.53 MiB

Response time histogram:
   0.413 ms [1]     |
   4.174 ms [97631] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
   7.935 ms [1547]  |
  11.696 ms [290]   |
  15.457 ms [277]   |
  19.219 ms [97]    |
  22.980 ms [74]    |
  26.741 ms [48]    |
  30.502 ms [15]    |
  34.263 ms [8]     |
  38.024 ms [12]    |

Response time distribution:
  10.00% in 0.7832 ms
  25.00% in 0.9323 ms
  50.00% in 1.1811 ms
  75.00% in 1.6020 ms
  90.00% in 2.1580 ms
  95.00% in 2.8198 ms
  99.00% in 6.9136 ms
  99.90% in 21.3574 ms
  99.99% in 34.4245 ms
  
# main  
  Success rate: 100.00%   30s     40s     50s     60s      ││0.0006  0.0119  0.0231  0.0343  0.0455  0.0568  0.0680    │
  Total:────────23066.8244 ms──────────────────────────────┘└──────────────────────────────────────────────────────────┘
  Slowest:      67.9836 ms
  Fastest:      0.6298 ms
  Average:      2.2964 ms
  Requests/sec: 4335.2305

  Total data:   262.45 MiB
  Size/request: 2.69 KiB
  Size/sec:     11.38 MiB

Response time histogram:
   0.630 ms [1]     |
   7.365 ms [97930] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  14.101 ms [921]   |
  20.836 ms [592]   |
  27.571 ms [182]   |
  34.307 ms [63]    |
  41.042 ms [13]    |
  47.777 ms [229]   |
  54.513 ms [22]    |
  61.248 ms [26]    |
  67.984 ms [21]    |

Response time distribution:
  10.00% in 1.2046 ms
  25.00% in 1.4188 ms
  50.00% in 1.7352 ms
  75.00% in 2.2705 ms
  90.00% in 3.0420 ms
  95.00% in 3.9198 ms
  99.00% in 15.4561 ms
  99.90% in 44.8020 ms
  99.99% in 66.3232 ms

Changes introduced in this pull request:

Reference issue to close (if applicable)

Closes

Other information and links

Change checklist

  • I have performed a self-review of my own code,
  • I have made corresponding changes to the documentation. All new code adheres to the team's documentation standards,
  • I have added tests that prove my fix is effective or that my feature works (if possible),
  • I have made sure the CHANGELOG is up-to-date. All user-facing changes should be reflected in this document.

Outside contributions

  • I have read and agree to the CONTRIBUTING document.
  • I have read and agree to the AI Policy document. I understand that failure to comply with the guidelines will lead to rejection of the pull request.

@hanabi1224 hanabi1224 added the RPC requires calibnet RPC checks to run on CI label Jun 18, 2026
@hanabi1224
hanabi1224 marked this pull request as ready for review June 18, 2026 10:43
@hanabi1224
hanabi1224 requested a review from a team as a code owner June 18, 2026 10:43
@hanabi1224
hanabi1224 requested review from LesnyRumcajs and sudo-shashank and removed request for a team June 18, 2026 10:43
@codecov

codecov Bot commented Jun 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.36%. Comparing base (ae501fb) to head (05bb523).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/chain/store/chain_store.rs 80.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
src/chain/store/chain_store.rs 70.12% <80.00%> (-0.03%) ⬇️

... and 9 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ae501fb...05bb523. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@LesnyRumcajs
LesnyRumcajs added this pull request to the merge queue Jun 19, 2026
Merged via the queue into main with commit d2d47a7 Jun 19, 2026
61 of 84 checks passed
@LesnyRumcajs
LesnyRumcajs deleted the hm/arc-swap-for-heaviest-tipset branch June 19, 2026 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

RPC requires calibnet RPC checks to run on CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants