feat: initial daemon implementation#1
Merged
Merged
Conversation
… receiving NEW_BLOCK event'
7 tasks
…ock_at_height response format
msbrogli
approved these changes
May 18, 2021
andreabadesso
added a commit
that referenced
this pull request
Apr 17, 2026
Tier 1 fix #1 from #395. Every handler in services/index.ts ended with mysql.destroy() in its finally block, which closes the underlying TCP socket and defeats the pool — every subsequent call paid a fresh TCP + MySQL auth handshake. Effectively the connection pool size was 0. Replaced all 11 occurrences with mysql.release() so connections return to the pool. Also corrected the getDbConnection() return type to PoolConnection (from its alias Connection) so .release() is available without casts. Measured against VOIDED_TOKEN_AUTHORITY (66 events, 5 baseline runs vs 8 candidate runs): | metric | baseline p50 | candidate p50 | Δ | 95% CI | |---|---:|---:|---:|---| | totalMs | 1253.6 | 967.0 | -22.9% | [-28.8%, -2.7%] 🟢 | | metadataDiff | 138.3 | 42.40 | -69.4% | [-73.4%, -55.8%] 🟢 | | handleTxFirstBlock | 26.79 | 15.47 | -42.3% | [-45.4%, -25.8%] 🟢 | handleVertexAccepted directionally improved (-24.6%) but CI crosses 0 at this run count. The small handlers that do only 1–2 queries show the largest relative gain — connection acquire was previously a dominant fraction of their cost. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
3 tasks
andreabadesso
added a commit
that referenced
this pull request
Apr 20, 2026
Tier 1 fix #1 from #395. Every handler in services/index.ts ended with mysql.destroy() in its finally block, which closes the underlying TCP socket and defeats the pool — every subsequent call paid a fresh TCP + MySQL auth handshake. Effectively the connection pool size was 0. Replaced all 11 occurrences with mysql.release() so connections return to the pool. Also corrected the getDbConnection() return type to PoolConnection (from its alias Connection) so .release() is available without casts. Measured against VOIDED_TOKEN_AUTHORITY (66 events, 5 baseline runs vs 8 candidate runs): | metric | baseline p50 | candidate p50 | Δ | 95% CI | |---|---:|---:|---:|---| | totalMs | 1253.6 | 967.0 | -22.9% | [-28.8%, -2.7%] 🟢 | | metadataDiff | 138.3 | 42.40 | -69.4% | [-73.4%, -55.8%] 🟢 | | handleTxFirstBlock | 26.79 | 15.47 | -42.3% | [-45.4%, -25.8%] 🟢 | handleVertexAccepted directionally improved (-24.6%) but CI crosses 0 at this run count. The small handlers that do only 1–2 queries show the largest relative gain — connection acquire was previously a dominant fraction of their cost. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.