Commit Graph

968 Commits

Author SHA1 Message Date
Dave Collins
3e2ccdc6c8
multi: Cleanup superfluous trailing newlines. 2023-08-25 12:39:15 -05:00
Dave Collins
70b399c9e4
build: Add dupword linter.
This adds the dupword linter to the list of linters and addresses a few
false positives it complains about.
2023-08-25 12:35:55 -05:00
Dave Collins
fc54d98b1e
multi: Remove a bunch of dup words in comments. 2023-08-23 14:13:51 -05:00
Dave Collins
0a35adc021
standalone: Add decreasing timestamps ASERT test.
This adds another scenario to the ASERT test vectors to ensure the
expected behavior with decreasing timestamps.
2023-08-20 23:54:06 -05:00
Dave Collins
858d398060
chaingen: More precise ASERT comments.
This updates the comments detailing the origin of the polynomial
coefficients in the ASERT calculation to the more precise values which
also matches up with the standalone code.
2023-07-24 12:00:21 -05:00
Dave Collins
51729efdd3
blockchain: Prepare v5.0.0.
This updates the blockchain module dependencies, the copyright year in
the files modified since the previous release, and serves as a base for
blockchain/v5.0.0.

The updated direct dependencies in this commit are as follows:

- github.com/decred/dcrd/chaincfg/v3@v3.2.0
- github.com/decred/dcrd/dcrec@v1.0.1
- github.com/decred/dcrd/dcrec/secp256k1/v4@v4.2.0
- github.com/decred/dcrd/dcrutil/v4@v4.0.1
- github.com/decred/dcrd/txscript/v4@v4.1.0

The updated indirect dependencies in this commit are as follows:

- github.com/dchest/siphash@v1.2.3
- github.com/decred/base58@v1.0.5
- github.com/decred/dcrd/crypto/ripemd160@v1.0.2
- github.com/decred/dcrd/dcrec/edwards/v2@v2.0.3

The full list of updated direct dependencies since the previous
blockchain/v4.1.0 release are as follows:

- github.com/decred/dcrd/chaincfg/chainhash@v1.0.4
- github.com/decred/dcrd/chaincfg/v3@v3.2.0
- github.com/decred/dcrd/dcrec@v1.0.1
- github.com/decred/dcrd/dcrec/secp256k1/v4@v4.2.0
- github.com/decred/dcrd/dcrutil/v4@v4.0.1
- github.com/decred/dcrd/txscript/v4@v4.1.0
- github.com/decred/dcrd/wire@v1.6.0

The full list of updated indirect dependencies since the previous
blockchain/v4.1.0 release are as follows:

- github.com/agl/ed25519@v0.0.0-20170116200512-5312a6153412
- github.com/dchest/siphash@v1.2.3
- github.com/decred/base58@v1.0.5
- github.com/decred/dcrd/crypto/blake256@v1.0.1
- github.com/decred/dcrd/crypto/ripemd160@v1.0.2
- github.com/decred/dcrd/dcrec/edwards/v2@v2.0.3
- github.com/decred/slog@v1.2.0
- github.com/klauspost/cpuid/v2@v2.0.9
- lukechampine.com/blake3@v1.2.1

Finally, all modules in the repository are tidied to ensure they are
updated to use the latest versions hoisted forward as a result.
2023-06-08 14:32:54 -05:00
Dave Collins
97936ab7e2
docs: Update for blockchain v5 module.
This updates the docs/README.md file, module hierarchy graphviz, and
module hierarchy diagram to reflect the new module version.
2023-06-08 14:28:23 -05:00
Dave Collins
f6554540d0
blockchain/stake: Prepare v5.0.0.
This updates the blockchain/stake module dependencies, the copyright
year in the files modified since the previous release, and serves as a
base for blockchain/stake/v5.0.0.

The updated direct dependencies in this commit are as follows:

- github.com/decred/dcrd/chaincfg/chainhash@v1.0.4
- github.com/decred/dcrd/chaincfg@v3.2.0
- github.com/decred/dcrd/database/v3@v3.0.1
- github.com/decred/dcrd/dcrec/secp256k1/v4@v4.2.0
- github.com/decred/dcrd/dcrutil/v4@v4.0.1
- github.com/decred/dcrd/txscript/v4@v4.1.0
- github.com/decred/dcrd/wire@v1.6.0

The updated indirect dependencies in this commit are as follows:

- github.com/dchest/siphash@v1.2.3
- github.com/decred/base58@v1.0.5
- github.com/decred/dcrd/crypto/blake256@v1.0.1
- github.com/decred/dcrd/crypto/ripemd160 v1.0.2
- github.com/decred/dcrd/dcrec@v1.0.1
- github.com/decred/dcrd/dcrec/edwards/v2@v2.0.3
- github.com/klauspost/cpuid/v2@v2.0.9
- lukechampine.com/blake3@v1.2.1

The full list of updated direct dependencies since the previous
blockchain/stake/v4.0.0 release are the same as above.

The full list of updated indirect dependencies since the previous
blockchain/stake/v4.0.0 release are as follows:

- github.com/agl/ed25519@v0.0.0-20170116200512-5312a6153412
- github.com/dchest/siphash@v1.2.3
- github.com/decred/base58@v1.0.5
- github.com/decred/dcrd/crypto/blake256@v1.0.1
- github.com/decred/dcrd/crypto/ripemd160 v1.0.2
- github.com/decred/dcrd/dcrec@v1.0.1
- github.com/decred/dcrd/dcrec/edwards/v2@v2.0.3
- github.com/golang/snappy@v0.0.4
- github.com/klauspost/cpuid/v2@v2.0.9
- github.com/syndtr/goleveldb@v1.0.1-0.20210819022825-2ae1ddf74ef7
- lukechampine.com/blake3@v1.2.1

Finally, all modules in the repository are tidied to ensure they are
updated to use the latest versions hoisted forward as a result.
2023-06-08 13:51:08 -05:00
Dave Collins
ee559cd03a
docs: Update for blockchain/stake v5 module.
This updates the docs/README.md file, module hierarchy graphviz, and
module hierarchy diagram to reflect the new module version.
2023-06-08 13:36:36 -05:00
Dave Collins
8ce9a70c0b
chaincfg: Prepare v3.2.0.
This updates the chaincfg module dependencies and serves as a base for
chaincfg/v3.2.0.

The updated direct dependencies in this commit are as follows:

- github.com/decred/dcrd/chaincfg/chainhash@v1.0.4
- github.com/decred/dcrd/wire@v1.6.0

The updated indirect dependencies in this commit are as follows:

- github.com/decred/dcrd/crypto/blake256@v1.0.1
- github.com/klauspost/cpuid/v2@v2.0.9
- lukechampine.com/blake3@v1.2.1

The full list of updated direct dependencies since the previous
chaincfg/v3.1.1 release are the same as above.

Finally, all modules in the repository are tidied to ensure they are
updated to use the latest versions hoisted forward as a result.
2023-06-08 10:15:36 -05:00
Dave Collins
7b6ec2364e
blockchain/standalone: Prepare v2.2.0.
This updates the module dependencies, the copyright year in the files
modified since the previous release, and serves as a base for
blockchain/standalone/v2.2.0.

The updated direct dependencies in this commit are as follows:

- github.com/decred/dcrd/chaincfg/chainhash@1.0.4
- github.com/decred/dcrd/wire@v1.6.0

The updated indirect dependencies in this commit are as follows:

- github.com/decred/crypto/blake256@v1.0.1
- github.com/klauspost/cpuid/v2@v2.0.9
- lukechampine.com/blake3@v1.2.1

The full list of updated direct and indirect dependencies since the
previous blockchain/standalone/v2.1.0 release are the same as above.

Finally, all modules in the repository are tidied to ensure they are
updated to use the latest versions hoisted forward as a result.
2023-06-07 14:27:45 -05:00
Dave Collins
0f38dbf204
wire: Prepare v1.6.0.
This updates the wire module dependencies, the copyright year in the
files modified since the previous release, and serves as a base for
wire/v1.6.0.

The updated direct dependencies in this commit are as follows:

- github.com/decred/dcrd/chaincfg/chainhash@v1.0.4

The updated indirect dependencies in this commit are as follows:

- github.com/decred/dcrd/crypto/blake256@v1.0.1

The full list of updated direct dependencies since the previous
wire/v1.5.0 release are as follows:

- github.com/decred/dcrd/chaincfg/chainhash@v1.0.4
- lukechampine.com/blake3@v1.2.1

The full list of updated indirect dependencies since the previous
wire/v1.5.0 release are as follows:

- github.com/decred/dcrd/crypto/blake256 v1.0.1
- github.com/klauspost/cpuid/v2@v2.0.9

Finally, all modules in the repository are tidied to ensure they are
updated to use the latest versions hoisted forward as a result.
2023-06-07 13:53:05 -05:00
Dave Collins
2db55eb6e7
chaingen: Add ASERT difficulty algorithm support.
This adds support for generating blocks that require the new difficulty
algorithm defined in DCP0011 to the test chain generator.

It accomplishes this by introducing a new type and method, named
PowDifficultyAlgorithm and UsePowDiffAlgo, respectively, to the chain
generator along with logic to calculate the appropriate difficulty
accordingly.  The method takes a parameter of the new type in order to
allow the caller selectively choose which difficulty algorithm to use.

This will allow future code to test all edge conditions around switching
the difficulty algorithm over to the new one defined in DCP0011.
2023-06-07 10:18:34 -05:00
Dave Collins
a13ca3ace6
chaincfg: Add params for DCP0011 blake3 diff calc.
This adds per-network parameters to chaincfg for the new difficulty
algorithm including the initial starting difficulty for BLAKE3 and the
half life.
2023-06-07 10:18:21 -05:00
Dave Collins
d9b1921177
standalone: Add ASERT difficulty calculation.
This adds a new exported function to the blockchain/standalone module
named CalcASERTDiff which can be used to calculate a required target
difficulty using the Absolutely Scheduled Exponentially weighted Rising
Targets (ASERT) algorithm defined in DCP0011.

It also updates the documentation and includes comprehensive tests.

Note that this commit only makes the new function available and
does not implement any logic based on it.
2023-06-07 10:18:17 -05:00
Dave Collins
42d34e06f4
standalone: Add separate proof of work hash check.
This adds a new function to the blockchain/standalone module named
CheckProofOfWorkHash which can be used to independently verify that a
provided hash is less than a provided compact target difficulty without
also additionally checking that the compact difficulty is within a valid
range.

Since there is already CheckProofOfWorkRange to perform the latter, this
provides callers additional flexibility of performing the required
checks independently without being forced to re-check the range.

It also updates includes comprehensive tests.
2023-06-07 02:01:26 -05:00
Dave Collins
66a59e0d92
chaingen: Add blake3 support.
This adds support for generating blocks solved by blake3 to the test
chain generator.

It accomplishes this by introducing a new type and method, named
PowHashAlgorithm and UsePowHashAlgo, respectively, to the chain
generator along with logic to change the hash function accordingly.  The
method takes a parameter of the new type in order to allow the caller
selectively choose which hash function to use.

This will allow future code to test all edge conditions around switching
the hash function over to blake3 as defined in DCP0011.
2023-06-06 10:05:09 -05:00
Dave Collins
b2878aa5c1
wire: Add PowHashV2 using blake3.
This adds methods for computing the version 2 proof of work hash using
blake3 as defined by DCP0011 to the block and block header types.

Note that this commit only makes the new methods available and does not
implement any logic based on them.
2023-06-06 10:05:04 -05:00
Dave Collins
dbb6b782e0
multi: Separate block hash and proof of work hash.
This separates the notion of the block hash from the proof of work hash
so the proof of work hashing function can independently be changed
without affecting anything else that relies on the block hash as
generated by blake256r14.
2023-06-06 10:03:53 -05:00
Dave Collins
3e621baadc
chaingen: Move mining solve to generate state.
This makes the functions the chain generator test code provides for
determining if blocks are solved and solving blocks methods on the
generate type itself so they are able to make decisions based on the
generator state in the future.
2023-06-02 13:30:04 -05:00
Dave Collins
e90bf2e0f2
standalone: Add modified subsidy split calcs.
This adds two new exported functions to the subsidy cache in
blockchain/standalone to calculate the work and stake vote subsidies
according to a provided subsidy split variant flag along with tests to
ensure expected behavior.

The available variants are:

- The original subsidy split used at launch
- The modified subsidy split defined by DCP0010
- The modified subsidy split defined by DCP0012

It should be noted that the values for the modified split are hard coded
as opposed to using the subsidy cache params in order to avoid the need
for a major module bump that would be required if the subsidy params
interface were changed.  The values are the same for all networks, so no
additional logic is necessary on a per-network basis.
2023-04-30 16:35:29 -05:00
Dave Collins
9aa79ec168
chaincfg: Introduce subsidy split change r2 agenda.
This adds a new definition for the upcoming agenda vote to change the
subsidy split to 1% PoW, 89% PoS, and 10% Treasury defined in DCP0012.

It does not include any code to make decisions based on the status of
the agenda or bump block versions.  It only adds the definition for the
agenda.
2023-04-12 09:57:39 -05:00
Dave Collins
7db7325c42
chaincfg: Introduce BLAKE3 PoW agenda.
This adds a new definition for the upcoming agenda vote to change the
proof-of-work hashing function to BLAKE3 as defined in DCP0011.

It does not include any code to make decisions based on the status of
the agenda or bump block versions.  It only adds the definition for the
agenda.
2023-04-12 09:53:29 -05:00
Dave Collins
ad02d8f300
multi: Go 1.19 doc comment formatting.
This modifies the entire repository to use the new formatting of doc
comments in the upcoming Go 1.19 release.

The primary motivating factors for this are:

- Builds check that files are formatted per gofmt and that will no
  longer be true as of Go 1.19 without these changes
- Separating all the updates into a single commit ensures these
  documentation only formatting changes do not clutter up diffs that
  actually change code

For the most part, the changes are just the automated changes suggested
by the Go 1.19 version of gofmt, but there are also a few cases where
the comments were reworded a bit to play nicely with the new formatting
requirements.

For example, the new version of gofmt reformats and collapses nested
lists where as the existing version does not.  Thus, instances of nested
lists have been changed to either eliminate them or use mixed markers
which produce expect results.
2022-07-30 04:08:58 -05:00
Dave Collins
9f8114e53d
blockchain: Move package to internal.
The moves the blockchain package from the blockchain module to an
internal package of the root module meaning that it is no longer a part
of the exported blockchain module.  Nearly all of the logic it provides
is really for the internal implementation of dcrd itself and thus having
it exported module significantly increases the maintenance burden.

Note that as of this change the blockchain module still exists and
provides the chaingen and fullblocktests packages both or which are
useful and used by external consumers.

This is part of a continuing overall effort to reduce the total number
of exported packages and modules and eventually get to the point it will
be possible to follow semver for the root module.

Overview of the major changes:

- Move all go files from blockchain -> internal/blockchain
- Move testdata from blockchain -> internal/blockchain
- Remove doc.go in favor of the README.md since godoc now displays it
- Move README.md from blockchain -> internal/blockchain and update to
  match the new reality
- Add a new README.md in the exported blockchain module that documents
  it contains the remaining exported packages
- Update all import paths in the repository accordingly
- Run go mod tidy on all modules
2022-05-30 15:32:41 -05:00
Dave Collins
59a10331de
docs: Update chaingen readme module path. 2022-05-30 15:32:39 -05:00
Dave Collins
bba1ed89b9
blockchain: Implement header proof storage.
This modifies the chain logic to create and store the individual
commitment hashes covered by the commitment root field of the header of
each block and also adds code to migrate the database to retroactively
create and store entries for all applicable historical blocks.

The upgrade can be interrupted at any point and future invocations will
resume from the point it was interrupted.

The following is a high level overview of the changes:
- Introduce a new database bucket to house the header commitments
- Add serialization code for use when storing and loading the individual
  header commitment hashes
  - Add full test coverage for new serialization code
- Store the commitment hashes in the db when connecting blocks
- Implement database migration code to retroactively store the
  commitment hashes for all applicable historical blocks
  - Bump the chain database version to 13
  - Support resuming from interrupted upgrades
- Add a new func on the internal header commitment data struct that
  returns the v1 header commitment hashes to consolidate the logic
- Update FilterByBlockHash to load the header commitments from the db
  and generate the inclusion proof accordingly
2022-05-30 11:41:49 -05:00
Dave Collins
1d73a7f41f
blockchain: Avoid db for filters of unknown blocks.
This adds logic to avoid hitting the database when a compact filter that
can't possibly be available by first checking the block index to ensure
the requested block is both available and its data is known.
2022-05-30 11:41:48 -05:00
Dave Collins
b7e079e0a4
blockchain: Add filter hash to hdr cmt data struct.
This adds a field to the header commitment data struct to store the hash
of the filter along with the filter so that it can be reused without
needing to recalculate the hash.

starting
2022-05-30 11:41:48 -05:00
Dave Collins
3c42bae43f
blockchain: Correct some db cfilterv2 comments. 2022-05-30 11:41:44 -05:00
Dave Collins
b7676074e3
fullblocktests: Decouple from blockchain.
The blockchain/fullblocktests package currently has a cyclic dependency
on blockchain since the tests directly return the error codes in
blockchain that are expected to be violated while blockchain itself
needs to import the package in order to run the tests.

This resolves that cyclic dependency by defining all of the errors the
fullblocktests produce in the package itself and then converting them to
the associated error in blockchain when running the tests and checking
for the expected error.

It also moves the code that runs the fullblocktests into the blockchain
itself instead of a separate blockchain_test to match all other tests
now that there is no longer a cyclic dependency that forced it to be
be separated.

While duplication of the errors in question is a little less convenient,
this approach ensures the blockchain package can be made internal in the
future while still providing the publicly-available fullblocktests
package for use both in testing the internal blockchain implementation
as well as integration tests with other implementations.
2022-05-30 11:26:40 -05:00
Dave Collins
c49e7dc631
fullblocktests: Update readme module path. 2022-05-30 11:26:40 -05:00
Dave Collins
dd53b01842
blockchain: Rename error for no treasury payout.
This renames the error returned when there is no treasury payout present
in a coinbase and/or treasurybase to match its actual meaning.
2022-05-30 11:26:40 -05:00
Dave Collins
881312c916
blockchain: Remove unused difficulty error. 2022-05-30 11:26:39 -05:00
Dave Collins
d7d3372199
blockchain: Correct a few error comment typos. 2022-05-30 11:26:39 -05:00
Dave Collins
38fcd43a17
blockchain: Use standalone check tx sanity.
This modifies blockchain to make use of the recently-added
standalone.CheckTransactionSanity and remove its own version of it.
2022-05-27 12:56:04 -05:00
Dave Collins
0f26059d0a
standalone: Add transaction sanity check.
This adds a new exported function to the blockchain/standalone module
named CheckTransactionSanity which can be used to perform basic
transaction sanity checks.

It also updates the documentation and includes comprehensive tests.

The primary motivation for this change is that there are several
consumers that currently make use of this functionality and it lives in
the blockchain package which is slated to made internal and therefore
would otherwise become inaccessible to external consumers.

Another nice benefit of making this logic available via the
blockchain/standalone module is that it intentionally requires way less
dependencies which is ideal for consumers.
2022-05-27 12:39:06 -05:00
Dave Collins
3c351a372b
docs: Update indexers readme for removed indexes. 2022-05-19 17:08:06 -05:00
Dave Collins
9618f1c118
docs: Update indexers readme module path. 2022-05-19 17:08:06 -05:00
Dave Collins
d8051da345
server/indexers: Remove address index support.
This removes support for the address index which also entails removal of
the --addrindex and --dropaddrindex flags as well as all related
indexing infrastructure.

The legacy index is now automatically dropped if it exists to ensure
clients that are upgrading are not left with unneeded data in their
databases.

This is part of the overall removal of the deprecated address index.
2022-05-19 17:08:05 -05:00
Dave Collins
55ac703b41
chaincfg: Deprecate Checkpoints and remove entries.
This deprecates the Checkpoints field of the chain parameters and
removes all manually-specified entries for all networks since manual
checkpoints no longer exist.
2022-05-19 13:03:30 -05:00
Dave Collins
cdadd9874a
multi: Rework old fork rejection logic.
Historically, checkpoints have been manually specified and used both for
various optimizations and to protect against cheap DoS attacks by
rejecting forks deep in history.  The primary motivation for manually
specifying the checkpoints was said optimizations, however, those
optimization portions have now been decoupled from checkpoints in favor
of other methods, so the only remaining use of checkpoints is the
aforementioned rejection of forks deep in history.

Thus, this reworks the old fork rejection logic to make it automatic
based on an ancestor that is two weeks worth of blocks behind the
hard-coded assumevalid block (clamped to the genesis block if necessary)
that is manually specified at each release as opposed to needing to
additionally manually specify checkpoints.

Note the distinction here between the hard-coded assumevalid block
specified at each release and the potentially overridden value specified
by a user via CLI configuration options.  This is an important
distinction because old fork rejection affects consensus and thus must
not move around based on user configuration.

This approach means the user can still specify a more recent assume
valid hash or disable assume valid optimizations independently without
affecting the consensus logic while still removing the need to manually
specify additional checkpoints.

The following is a high level overview of the changes:
- Modifies the blockchain.Config struct as follows:
  - Removes the LastestCheckpoint option
  - Adds a AllowOldForks option
- Removes all code related to manually specified checkpoints and finding
  candidates
- Removes the following errors since they are no longer used:
  - ErrBadCheckpoint
  - ErrCheckpointTimeTooOld
- Renames checkpointNode to rejectForksCheckpoint to make it clear that
  is the only thing it applies to
- Adds logic to potentially reject forks deep in history as follows:
  - Do not reject old forks if they are manually allowed or the
    hard-coded assumevalid block is not specified for the network
  - Automatically choose an ancestor that is two weeks worth of blocks
    prior to the hard-coded assumevalid block (clamped to the genesis
    block if necessary)
- Replaces --nocheckpoints CLI option with --allowoldforks
  - Updates doc.go to match the changes to the CLI options
2022-05-19 13:03:29 -05:00
Dave Collins
13d44674ad
blockchain: Avoid repeated blks in 2 weeks calc.
This adds a new field to the blockchain instance to store a cached
version of the number of expected blocks in two weeks to avoid repeated
calculation.
2022-05-19 13:03:28 -05:00
Ryan Staudt
46305c7bf5 blockchain: Fix revocation fee limit bug.
This retroactively fixes a bug that resulted in the fee limit not being
properly enforced for revocation transactions.  The exploitation risk of
this was that in a split transaction, one party could intentionally
increase the fee paid to miners for another party.

It is no longer possible to exploit this on mainnet since the automatic
revocations agenda has activated, which enforces that the fee must be
zero for revocation transactions.

The fee limit for revocation transactions was never violated on mainnet
so this logic can be safely corrected without impacting consensus.  This
has been validated by running a full sync with checkpoints and assume
valid disabled.
2022-05-17 01:08:29 -05:00
Dave Collins
974f80d1e5
multi: Consolidate header proof logic.
Currently, the p2p and rpcserver handlers that deal with compact filters
essentially duplicate the logic for dealing with the associated header
proof and are also required to understand the structure of the proof in
the form of knowing the associated index.  This is not ideal since there
is no guarantee that a given index will always be the same through
consensus changes.

With those points in mind, this reworks the header proof logic slightly
to consolidate it by introducing a new HeaderProof struct to the
blockchain that houses a header commitment inclusion proof and
associated proof index and updating the FilterByBlockHash method to
return the header proof along with the filter and updates the p2p and
rpcserver handlers and associated interfaces and tests accordingly.

The result is that the aforementioned p2p and rpcserver handlers for
obtaining compact filters no longer need to understand anything about
the proofs.  It is also useful for any future header commitments too
since the same logic will hold true for those instances as well.
2022-05-14 17:28:50 -05:00
Dave Collins
39db46a4a5
blockchain: Remove unused errors.
This removes the following errors that are no longer used now that there
has been a new major module version bump:

- ErrCheckpointTimeTooOld
- ErrTooManyTransactions
- ErrInvalidTxOutputs
- ErrSSRtxPayees
2022-05-14 03:18:42 -05:00
Dave Collins
bbccddf959
blockchain: Optimize stake node pruning.
This optimizes the logic that prunes stake nodes when connecting blocks
to make use of the best known header instead of the latest known
checkpoint.
2022-05-13 02:13:26 -05:00
Dave Collins
68fc0c5d4e
blockchain: Consolidate best header access.
This adds an exported method to the block index to retrieve the best
header node under the block index mutex and updates the various call
sites that do it manually to use the newly exported function instead.
2022-05-13 02:13:25 -05:00
Dave Collins
69b653d305
blockchain: Export block index flush.
This exports the block index flush function to make it more consistent
with the other funcs that are safe for concurrent access.
2022-05-13 02:13:21 -05:00
Dave Collins
21be8a629e
blockchain: Comment concurrency semantics.
This calls out the concurrency semantics for some exported query
functions to ensure callers are aware they are safe for concurrent
access to be more consistent with other exported methods in the package.
2022-05-11 18:08:32 -05:00