-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add kyve support #235
Merged
Merged
Add kyve support #235
Changes from all commits
Commits
Show all changes
82 commits
Select commit
Hold shift + click to select a range
8e4f4ba
add kyve support, add matching tests
bz888 9ab621d
update comments
bz888 5938615
add typing and add cached blocks
bz888 bedd2c4
fix up binary search, add tests
bz888 460b7c6
revert jest config changes
bz888 c5511b7
revert jest config chnages on bad rebase
bz888 64ddf08
wip on rebuild logs
bz888 7aa1a5e
add parser for wrapEvents without using logs, add tests
bz888 3778763
add cli support for kyve
bz888 841287d
add cli support for kyve
bz888 e4b7def
use nodeConfig for kyve cli integration, update kyve api, add storage…
bz888 e17a4e9
add kyveConnection class, refactor cosmos wrappers to use registry ov…
bz888 0e850fc
update and refactor based on review
bz888 db397be
remove todo
bz888 f928774
update logic for lazyBlock and refactored based on comments, added te…
bz888 27d6ad1
update logic and test
bz888 b7f6757
update logic on getBlockByHeight
bz888 ea4fce9
update test cache
bz888 79fd593
update changelog
bz888 aa0090c
fixed kyve test
bz888 b345316
update yargs
bz888 0440ed9
tidy ups
bz888 18acfa9
refactor with worker and file cache logic, addeds tests
bz888 5bf216c
added more test, refactored polling logic and added write stream
bz888 1f6f3fa
update tmpDir root
bz888 c94b218
fixed tests, refactor based on comments
bz888 8c5c57a
fix kyve connections
bz888 8ebb313
refactor fetch block funciton on api service to support kyve
bz888 c5e3657
update tests
bz888 dc371fe
fix mock stream tests
bz888 f62e1b0
update workers fetch module and changelog
bz888 1ac6fad
rebase main
bz888 c8d1070
fix up on bad rebase
bz888 fdcd23c
add clean up on failed bundle handling, rework error handle to ensure…
bz888 1d4a41c
update with fixes on kyveApi cache, add test for more batchSize and w…
bz888 44a5280
add fileCache support for local reader
bz888 dd70d21
add listener on fetch block
bz888 34c8597
add listener for clear cache
bz888 510f70b
fix removal bundle on failed fetch test
bz888 6d0f85a
update clear cache, added test
bz888 0178985
ensure working tests on cache file removal
bz888 39d4318
add fetch cache on bundles
bz888 e802860
update tests with correct values and fixes
bz888 f0d3051
update tests
bz888 d5da980
refactor based on review, removed fetchingBundle cache, fixed polling…
bz888 f37102a
tidy up
bz888 3ba4fa1
fix api service kyve test
bz888 491989d
refactor based on review, update tmpDir, update error handling on str…
bz888 72d0947
update tests
bz888 d57f260
fix up poller;
bz888 14b2b5a
fix test cases, update logic in removal
bz888 6fbf6b0
update bundle regex, tidy up based on review
bz888 606501c
fix regex, update changelog
bz888 1a3e9c4
update tests
bz888 af78550
tidy up test
bz888 0abf7f7
add logging
bz888 da5cb94
add await for poller and fix bundleCache id
bz888 2d1d76b
refactor cacheBundle to be object
bz888 4e91cb3
Fixes and improvements (#252)
bz888 5367715
Fix cache gaps, added timeout on stream
bz888 a3e2e1e
Fixes and Improvements
bz888 96b2fbc
Update bundleId increment
bz888 5070979
Fix for stale polling
bz888 ee55964
fix chmod permission
bz888 56b245f
Fixes and improvements based on review
bz888 cde6d33
Remove finally on download, fix reconstructed logs
bz888 fc3a159
add stale file remover
bz888 bd12975
tidy up
bz888 ee3f727
add log
bz888 c1e1b6d
tidy up based on review, add test
bz888 8d0a87b
update unlink file;
bz888 f4ba219
tidy up and add test for stale cleaner, disable kyve with false
bz888 3602f0a
Merge branch 'main' into add/kyve-api
bz888 81ff31b
update yarn.lock
bz888 e5c0e67
update tests with non prune block
bz888 a000f6d
fix up tests
bz888 4c8f230
Fix timeout, move buffer arg to constructor
stwiname 8e1e1e6
Fix up types, improve kyve error handling, fix kyve temp dir
stwiname 6cdccf2
Clean up deps
stwiname 125a2ac
Fix not applying timestamp block filers
stwiname 997c94d
Update deps and use code from node-core
stwiname e138dc5
Add script for updating versions:
stwiname File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// Copyright 2020-2024 SubQuery Pte Ltd authors & contributors | ||
// SPDX-License-Identifier: GPL-3.0 | ||
|
||
import { SupportedChains } from '@kyvejs/sdk/src/constants'; | ||
import { IConfig, NodeConfig } from '@subql/node-core'; | ||
|
||
export interface ICosmosConfig extends IConfig { | ||
kyveChainId: SupportedChains; | ||
kyveEndpoint: string; | ||
kyveStorageUrl: string; | ||
} | ||
|
||
export class CosmosNodeConfig extends NodeConfig<ICosmosConfig> { | ||
bz888 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
/** | ||
* This is a wrapper around the core NodeConfig to get additional properties that are provided through args or node runner options | ||
* NOTE: This isn't injected anywhere, so you need to wrap the injected node config | ||
* | ||
* @example | ||
* constructor( | ||
* nodeConfig: NodeConfig, | ||
* ) { | ||
* this.nodeConfig = new CosmosNodeConfig(nodeConfig); | ||
* } | ||
* */ | ||
constructor(config: NodeConfig) { | ||
// Rebuild with internal config | ||
super((config as any)._config, (config as any)._isTest); | ||
} | ||
|
||
get kyveEndpoint(): string { | ||
return this._config.kyveEndpoint; | ||
} | ||
|
||
get kyveChainId(): SupportedChains { | ||
return this._config.kyveChainId; | ||
} | ||
|
||
get kyveStorageUrl(): string { | ||
return this._config.kyveStorageUrl; | ||
} | ||
} |
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where are the defaults to enable kyve by default?