forked from mempool/mempool
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't workingdependenciesPull requests that update a dependency filePull requests that update a dependency filedocumentationImprovements or additions to documentationImprovements or additions to documentationduplicateThis issue or pull request already existsThis issue or pull request already existsenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomersinvalidThis doesn't seem rightThis doesn't seem rightjavascriptPull requests that update javascript codePull requests that update javascript codequestionFurther information is requestedFurther information is requested
Description
Reviewer's Guide
This PR refactors the frontend sync-assets script into a promise‐based, modular workflow driven by a unified config object, introduces a new txid‐specific accelerator endpoint in the backend and updates the frontend to consume it with improved retry/filter logic, optimizes block indexing and caching via height cutoffs and skipMemoryCache support, raises express body size limits, enhances CI/CD workflows, and applies minor UI and integration fixes.
Sequence diagram for new txid-specific acceleration data retrieval
sequenceDiagram
participant TrackerComponent
participant ServicesApiService
participant BackendAPI
participant AccelerationRepository
TrackerComponent->>ServicesApiService: getAccelerationDataForTxid$(txid)
ServicesApiService->>BackendAPI: GET /accelerator/accelerations/:txid
BackendAPI->>AccelerationRepository: $getAccelerationInfoForTxid(txid)
AccelerationRepository-->>BackendAPI: Acceleration data or null
BackendAPI-->>ServicesApiService: Acceleration data or 404
ServicesApiService-->>TrackerComponent: Acceleration data or null
Note over TrackerComponent: Retry logic if no data and tx was accelerated
TrackerComponent->>TrackerComponent: Update accelerationInfo, setIsAccelerated()
Class diagram for AccelerationRepository and new method
classDiagram
class AccelerationRepository {
+$getAccelerationInfoForTxid(txid: string): Promise<PublicAcceleration | null>
+$getAccelerationInfo(poolSlug: string | null, height: number | null, interval: string | null): Promise<PublicAcceleration[]>
...
}
Class diagram for ServicesApiService frontend changes
classDiagram
class ServicesApiService {
+getAccelerationDataForTxid$(txid: string): Observable<Acceleration>
+getAllAccelerationHistory$(params, limit?, findTxid?): Observable<Acceleration[]>
...
}
Class diagram for TrackerComponent acceleration logic changes
classDiagram
class TrackerComponent {
-fetchAcceleration$: Subject<number>
+accelerationInfo: Acceleration | null
+setIsAccelerated()
...
}
Class diagram for TransactionComponent acceleration logic changes
classDiagram
class TransactionComponent {
+accelerationInfo: Acceleration | null
+setIsAccelerated()
...
}
File-Level Changes
| Change | Details | Files |
|---|---|---|
| Rewrite and refactor asset synchronization script into modular async workflow |
|
frontend/sync-assets.js |
| Overhaul acceleration data endpoint and frontend logic |
|
backend/src/repositories/AccelerationRepository.tsbackend/src/api/acceleration/acceleration.routes.tsfrontend/src/app/services/services-api.service.tsfrontend/src/app/components/transaction/transaction.component.tsfrontend/src/app/components/tracker/tracker.component.ts |
| Optimize block indexing and chain tip handling |
|
backend/src/api/chain-tips.tsbackend/src/repositories/BlocksRepository.tsbackend/src/api/blocks.ts |
| Increase backend request body size limits |
|
backend/src/index.ts |
| Improve CI/CD workflows |
|
.github/workflows/on-tag.yml.github/workflows/ci.yml |
| Apply minor UI fixes |
|
frontend/src/app/components/about/about.component.htmlfrontend/src/app/components/block/block-preview.component.tsfrontend/src/app/components/block/block.component.ts |
Possibly linked issues
- fix: set content limit to 10mb bignum op_return #69: The PR implements the new transaction acceleration data flow, refactors asset sync, adjusts CI/CD workflows, and updates the UI partner link, exactly as described in the issue.
Tips and commands
Interacting with Sourcery
- Trigger a new review: Comment
@sourcery-ai reviewon the pull request. - Continue discussions: Reply directly to Sourcery's review comments.
- Generate a GitHub issue from a review comment: Ask Sourcery to create an
issue from a review comment by replying to it. You can also reply to a
review comment with@sourcery-ai issueto create an issue from it. - Generate a pull request title: Write
@sourcery-aianywhere in the pull
request title to generate a title at any time. You can also comment
@sourcery-ai titleon the pull request to (re-)generate the title at any time. - Generate a pull request summary: Write
@sourcery-ai summaryanywhere in
the pull request body to generate a PR summary at any time exactly where you
want it. You can also comment@sourcery-ai summaryon the pull request to
(re-)generate the summary at any time. - Generate reviewer's guide: Comment
@sourcery-ai guideon the pull
request to (re-)generate the reviewer's guide at any time. - Resolve all Sourcery comments: Comment
@sourcery-ai resolveon the
pull request to resolve all Sourcery comments. Useful if you've already
addressed all the comments and don't want to see them anymore. - Dismiss all Sourcery reviews: Comment
@sourcery-ai dismisson the pull
request to dismiss all existing Sourcery reviews. Especially useful if you
want to start fresh with a new review - don't forget to comment
@sourcery-ai reviewto trigger a new review!
Customizing Your Experience
Access your dashboard to:
- Enable or disable review features such as the Sourcery-generated pull request
summary, the reviewer's guide, and others. - Change the review language.
- Add, remove or edit custom review instructions.
- Adjust other review settings.
Getting Help
- Contact our support team for questions or feedback.
- Visit our documentation for detailed guides and information.
- Keep in touch with the Sourcery team by following us on X/Twitter, LinkedIn or GitHub.
Originally posted by @sourcery-ai[bot] in #75 (comment)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingdependenciesPull requests that update a dependency filePull requests that update a dependency filedocumentationImprovements or additions to documentationImprovements or additions to documentationduplicateThis issue or pull request already existsThis issue or pull request already existsenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomersinvalidThis doesn't seem rightThis doesn't seem rightjavascriptPull requests that update javascript codePull requests that update javascript codequestionFurther information is requestedFurther information is requested
Projects
Status
Backlog
Status
Todo