dcrd/gcs
Dave Collins 85f0c09df2
secp256k1: Start v3 module dev cycle.
Upcoming changes constitute breaking public API changes to the secp256k1
module, therefore, this follows the process for introducing major API
breaks which consists of:

- Bump the major version in the go.mod of the affected module if not
  already done since the last release tag
- Add a replacement to the go.mod in the main module if not already done
  since the last release tag
- Update all imports in the repo to use the new major version as
  necessary
- Make necessary modifications to allow all other modules to use the new
  version in the same commit
- Repeat the process for any other modules the require a new major as a
  result of consuming the new major(s)
2020-01-29 13:45:59 -06:00
..
blockcf stake: Start v3 module dev cycle. 2019-10-24 22:10:39 -05:00
blockcf2 stake: Start v3 module dev cycle. 2019-10-24 22:10:39 -05:00
bench_test.go gcs: Implement version 2 filters. 2019-09-03 10:30:31 -05:00
bits_test.go gcs: Add tests for bit reader/writer. 2019-08-22 11:37:53 -05:00
bits.go gcs: Overhaul tests and benchmarks. 2019-08-20 09:36:10 -05:00
doc.go gcs: Improve package documentation. 2019-10-07 18:40:08 -05:00
error_test.go gcs: Implement version 2 filters. 2019-09-03 10:30:31 -05:00
error.go multi: Address a bunch of lint issues. 2019-12-30 13:54:41 -06:00
fastreduce_old.go gcs: Implement version 2 filters. 2019-09-03 10:30:31 -05:00
fastreduce.go gcs: Implement version 2 filters. 2019-09-03 10:30:31 -05:00
gcs_test.go gcs: Prevent empty data elements in v2 filters. 2019-10-07 11:17:41 -05:00
gcs.go multi: Address a bunch of lint issues. 2019-12-30 13:54:41 -06:00
go.mod secp256k1: Start v3 module dev cycle. 2020-01-29 13:45:59 -06:00
go.sum chaincfg: Start v3 module dev cycle. 2020-01-29 13:24:14 -06:00
README.md gcs: Improve package documentation. 2019-10-07 18:40:08 -05:00

gcs

Build Status ISC License GoDoc

Package gcs provides an API for building and using Golomb-coded sets.

A Golomb-Coded Set (GCS) is a space-efficient probabilistic data structure that is used to test set membership with a tunable false positive rate while simultaneously preventing false negatives. In other words, items that are in the set will always match, but items that are not in the set will also sometimes match with the chosen false positive rate.

This package currently implements two different versions for backwards compatibility. Version 1 is deprecated and therefore should no longer be used.

Version 2 is the GCS variation that follows the specification details in DCP0005.

Version 2 sets do not permit empty items (data of zero length) to be added and are parameterized by the following:

  • A parameter B that defines the remainder code bit size
  • A parameter M that defines the false positive rate as 1/M
  • A key for the SipHash-2-4 function
  • The items to include in the set

A comprehensive suite of tests is provided to ensure proper functionality.

GCS use in Decred

GCS is used as a mechanism for storing, transmitting, and committing to per-block filters. Consensus-validating full nodes commit to a single filter for every block and serve the filter to SPV clients that match against the filter locally to determine if the block is potentially relevant. The required parameters for Decred are defined by the blockcf2 package.

For more details, see the Block Filters section of DCP0005.

Installation and Updating

$ go get -u github.com/decred/dcrd/gcs

License

Package blockchain is licensed under the copyfree ISC License.