subql
subql copied to clipboard
Blockchain service
Description
This is another phase of moving more code to node core, it is a shift away from using super classes and now defines a clear interface for blockchain specific code.
This reduces a lot of boiler plate in extending classes and having to redefine constructors as well as nestjs modules. This will greatly simplify adding support for new blockchains.
TODOs
- [ ] Test all sub commands and dependency injection
- [ ] Fix runtime service circular dependency with dictionary service
- [ ] Test various flags, workers, unfinalized, mostly runtime service and workers
- [ ] Test runtime service is syncing between services
- [ ] Test with another SDK to check flexibility(no runtime service, custom unfinalized blocks class)
- [ ] Document this interface so that there is a guide for adding new blockchains
- [x] Remove fetch service from node (remove
initBlockDispatcher
,preLoopHook
) - [x] Move tests to node core
Type of change
Please delete options that are not relevant.
- [x] New feature (non-breaking change which adds functionality)
Checklist
- [ ] I have tested locally
- [ ] I have performed a self review of my changes
- [ ] Updated any relevant documentation
- [ ] Linked to any relevant issues
- [ ] I have added tests relevant to my changes
- [ ] Any dependent changes have been merged and published in downstream modules
- [ ] My code is up to date with the base branch
- [ ] I have updated relevant changelogs. We suggest using chan