Open
Conversation
- Add NamespaceFilter type and CreateODSWithFilter/CreateODSQ4WithFilter - Original functions unchanged for backward compatibility - Add TrackedNamespace and NamespaceDatastore to Parameters
- Add namespace store for caching namespace-specific data - Store uses filter when writing ODS files if configured - Getter uses namespace cache for fast lookups on tracked namespace - All features opt-in, standard nodes unaffected
- Revert unnecessary corelib/corepruner renames - Use clean dependency injection for namespace config - Add node.Pin to core and pruner module switch cases
Restore original badger settings: - BlockCacheSize = 0 (disable block cache) - Compression = None This avoids breaking changes for existing production nodes.
- Add WriteOptions and WithFilter functional option - CreateODS and CreateODSQ4 now accept variadic options - Remove separate WithFilter functions and if/else branches - Store uses s.writeOpts... for clean, maintainable code
…bility - Replace binary encoding with strconv.FormatUint for namespace store keys - Add package-level nsStorePrefix following codebase conventions - Rename method receiver from 'ns' to 's' to avoid variable shadowing - Update test structs to use wrapper functions for variadic WriteOption params
- Use cmd.Flag().Changed instead of comparing against magic string '0s' - Use type-safe GetDuration() instead of manual string parsing - Remove unused time import
Pin nodes should be able to run in archival mode to store all blocks for their tracked namespace from a specific starting height without pruning.
Prevent users from setting a pruning window shorter than the sampling window (7 days). A shorter window would cause the node to delete blocks that the network expects it to serve for DAS. Users must either: - Use default or custom window >= 7 days (pruning mode) - Use --archival flag (no pruning)
98774d5 to
f8f3216
Compare
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.
Add Pin Node Type
Introduces a new Pin node type that enables namespace-filtered data storage and synchronization.
Motivation
Hosted providers need fine-grained control over data retention to price reads according to actual namespace usage from the users they serve. Different clients have different requirements:
The Pin node type enables this by allowing operators to selectively store and retain data only for configured namespaces, rather than requiring full network archival per each customer they serve.
Summary
Changes