Commit Graph

65 Commits

Author SHA1 Message Date
Usman Saleem
9eb32836b7 Fix javadocs to allow build to pass in JDK 17 (#4834)
- Added missing javadocs so that javadoc doclint passes against JDK 17 (invoke by Besu gradle build).
- Exclude following packages from javadoc lint:
org.hyperledger.besu.privacy.contracts.generated
org.hyperledger.besu.tests.acceptance.*
- Temporarily exclude ethereum and evm submodule for doc lint checks.
- Run the javadoc task using GitHub actions (use Java 17) to report any javadoc errors during the PR builds
- Updating plugin-api build.gradle with new hash as javadoc comments caused it to change

Signed-off-by: Usman Saleem <usman@usmans.info>
2023-01-18 22:51:00 +10:00
garyschulte
2b17e040e1 Bugfix snapshot transaction segfaults after storage truncation (#4786)
* subscribe snapshot worldstates to parent worldstate storage events like clear and clearFlatDatabase and close as appropriate to avoid segfaults
* fix for direct snapshot creation when using snapshot archive
* ensure we only prune bonsai worldstates if we have more than the configured number of retained states

Signed-off-by: garyschulte <garyschulte@gmail.com>
2022-12-22 14:20:54 -08:00
Zhenyang Shi
13213e2c7d Ignore extra RocksDB column families for experimental features (#4842)
Signed-off-by: Zhenyang Shi <wcgcyx@gmail.com>
2022-12-21 16:28:04 +10:00
Daniel Lehrner
49f32ca22d Prints configuration overview (#4451)
* print configuration overview at startup

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
2022-11-22 14:41:06 +01:00
ahamlat
376ce82181 Enable RocksDB bloomFilters (#4682)
* Enable full (non block) bloomFilters with 10 bits per key

Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>

* Delete unused constant

Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>

* Add ChangeLog

Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>

* Set RocksDB format version to 5

Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>

Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
Signed-off-by: ahamlat <ameziane.hamlat@consensys.net>
2022-11-22 14:00:34 +01:00
garyschulte
c2531fb021 Fix for block unavailability during SnapshotTrieLog caching (#4666)
* supplier workaround for Cached snapshots to defer snapshots until the block is added to the chain
* handle cache update when worldstate is fast-syncing
* add additional coverage for SnapshotTrieLogManager caching

Signed-off-by: garyschulte <garyschulte@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
2022-11-15 12:51:25 +10:00
Jiri Peinlich
2528aacde7 Adding option to debug the potential problems with closing Transaction (#4654)
* Adding option to debug the potential problems with closing Transaction

Signed-off-by: Jiri Peinlich <jiri.peinlich@gmail.com>
Co-authored-by: garyschulte <garyschulte@gmail.com>
2022-11-12 12:36:04 -08:00
garyschulte
b181f99940 stopgap to mitigate off-heap memory leak until refactor in #4641 (#4645)
Signed-off-by: garyschulte <garyschulte@gmail.com>
2022-11-09 23:24:39 -08:00
ahamlat
b50f8660cc Create a specific calculateRootHash method for BonsaiInMemoryWorldState to improve performance (#4568)
* Parallelize some steps in BonsaiPersistedWorldState.calculateRootHash  method
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>

* Add synchronized on storage flat database remove and update method

Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>

* Add synchronized on storage flat database remove and update method

Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>

* Fix this error org.rocksdb.RocksDBException: unknown WriteBatch tag

Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>

* create a specific calculateRootHash for BonsaiInMemoryWorldState class

Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>

* create a specific calculateRootHash for BonsaiInMemoryWorldState class

Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>

* Fix nullPointerException on Collections.synchronizedSet

Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>

* Use parallelStreams instead of CompletableFuture API

Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>

* Modify CHANGELOG.md

Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>

* spotless and synchronizedSet initializaton

Signed-off-by: garyschulte <garyschulte@gmail.com>

Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
Signed-off-by: garyschulte <garyschulte@gmail.com>
Co-authored-by: garyschulte <garyschulte@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
2022-11-02 18:05:15 +01:00
garyschulte
76d6429cc0 Snapshot based non-persisting MutableWorldState usage (#4531)
* implementation of Bonsai snapshots based BonsaiWorldStateArchive 
  includes: try-with-resources and AutoCloseable WorldState in order to release snapshots when we are done with them

Signed-off-by: garyschulte <garyschulte@gmail.com>
2022-11-01 15:53:25 -07:00
matkt
da9b10767a Snapsync persist state (#4381)
This PR avoids restarting the download of the world state from scratch when restarting Besu

Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
2022-11-01 14:18:15 +01:00
garyschulte
d73ce2116c Bonsai snapshot worldstate (#4409)
* use optimistictransactiondb for mutable isolated snapshots
* plumbing necessary to have a snapshot specific updater.
* snapshot rolling working
* implement AutoCloseable on BonsaiSnapshotWorldState to ensure we can correctly dispose of snapshots
* add snapshot transaction cloning, change snapshot based worldstate to extend persisted worldstate rather than in-memory worldstate

Signed-off-by: garyschulte <garyschulte@gmail.com>
2022-10-13 09:42:27 -07:00
ahamlat
d6e1400937 Add config file support for high spec flag (#4438)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
2022-09-26 14:05:27 +02:00
ahamlat
8718fa61e0 Create a new flag on RocksDB for high spec hardware to boost performance (#4423)
* Create a new flag on RocksDB (--Xplugin-rocksdb-high-spec-enabled) for high spec hardware to boost performance.
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
2022-09-23 14:09:45 +10:00
Danno Ferrin
d2968509ba Simplify Trie Dependencies (#4259)
Make the ethereum/trie and services/kvstore modules  as slim as possible
by dropping dependencies.

* The ':util' api dependency is removed from kvstore  and added to
   eth module
* Move tries's kvstore dependency to test
* Other dependencies are removed as unused from trie and kvstore

Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
2022-08-15 21:24:09 -06:00
ahamlat
49244791f0 Apply RocksDB LZ4 compression and compare the performance/resource metrics after sync. (#4166)
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>

Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
2022-08-03 15:37:18 -04:00
ahamlat
915854cfe1 Update RocksDB default block cache size (#4132)
* Update RocksDB default block cache size.

Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
2022-07-19 08:37:53 -07:00
Sally MacFarlane
2751b3cb1c Log message when path unavailable (#4059)
* issue #3986 -  Changed [file path init fail error message] clearer

Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>

Co-authored-by: Junsu An <anjjunsu@gmail.com>
2022-07-06 09:29:04 +10:00
ahamlat
5702ca090d Apply some RocksDB documentation suggestions to reduce memory usage. (#3985)
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
2022-06-17 10:27:34 -07:00
matkt
1c7c9ed146 fix missing column families (#3940)
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>

Co-authored-by: Sally MacFarlane <sally.macfarlane@consensys.net>
2022-06-06 19:29:33 -06:00
sharad-develop
0efc169005 Added exception message details to error message, when read db fails (#3935)
* Added exception message details to error message, when read db fails
See ##3526

Signed-off-by: Sharad Gulati <sharad.develop@gmail.com>

Co-authored-by: Sally MacFarlane <sally.macfarlane@consensys.net>
2022-06-07 10:13:02 +10:00
Fabio Di Fabio
0fdd55d78e Introduce RocksDbSegmentIdentifier to avoid changing the storege plug… (#3755)
* Introduce RocksDbSegmentIdentifier to avoid changing the storege plugin interface

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
2022-05-03 20:54:14 -07:00
garyschulte
23f5e2e933 wrap rocksdb segmenthandles in atomicreference to ensure we do not reference closed handles (#3734)
Signed-off-by: garyschulte <garyschulte@gmail.com>
2022-04-22 17:42:59 +02:00
garyschulte
9619f94489 revert to TransactionDB to resolve 'busy' exception from OptimisticTransactionDB (#3720)
Signed-off-by: garyschulte <garyschulte@gmail.com>
2022-04-14 07:26:52 -07:00
Pedro Novais
fe673431fa update rocksdbjni to v6.29.4 for compatibility with arm64 CPU architecture (#3634)
* update rocksdbjni to v6.29.5 for compatibility with arm64 CPU

Signed-off-by: Pedro Novais <jpvnovais@gmail.com>
Co-authored-by: garyschulte <garyschulte@gmail.com>
2022-04-07 18:13:20 -07:00
Danno Ferrin
b4027d6e39 Use JUnit 5 for unit test execution (#3620)
Change the unit test execution to use the Junit5 JUnitPlatform. This
allows for a mix of junit 4 and junit 5 tests and for a gradual
migration to junit 5 instead of a big bang. One class depended on
junit 4 exceptions and was updated. Two tests depending on 
native libraries fail gracefully on mac (and only mac).

Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
2022-04-02 00:34:48 +10:00
fab-10
73a97606ae Disable RocksDB TTL compactions (#3356)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
2022-02-02 12:13:11 +01:00
Diego López León
ed1329cf84 Introduce SLF4J for logging (#3285)
* Bump SLF4J version

Signed-off-by: Diego López León <dieguitoll@gmail.com>

* Replace log4j2 API with SLF4j API

Signed-off-by: Diego López León <dieguitoll@gmail.com>

* Replace usage of LogManager#getFormatterLogger

This is for keeping compatibility with SLF4J. If neccesary, a specific formatter can be created for the RlpBlockImporter class

Signed-off-by: Diego López León <dieguitoll@gmail.com>

* Unset the default logging value for the retesteth

This is because it's not possible to resolve the root logger level into a Log4J2 field

Signed-off-by: Diego López León <dieguitoll@gmail.com>

* Prevent creation of Logger context outside SLF4J

org.hyperledger.besu.cli.BesuCommand#setAllLevels was taken from
https://github.com/apache/logging-log4j2/blob/rel%2F2.17.1/log4j-core/src/main/java/org/apache/logging/log4j/core/config/Configurator.java#L309

Signed-off-by: Diego López León <dieguitoll@gmail.com>

* Add FATAL level deprecation message

Signed-off-by: Diego López León <dieguitoll@gmail.com>

* [Sonar] Fix java:S2139

Exceptions should be either logged or rethrown but not both

Signed-off-by: Diego López León <dieguitoll@gmail.com>

* [Sonar] Fix java:S3457

Printf-style format strings should be used correctly

Signed-off-by: Diego López León <dieguitoll@gmail.com>

* Add changelog

Signed-off-by: Diego López León <dieguitoll@gmail.com>
2022-01-25 20:14:54 -03:00
matkt
ffc8da3971 Fix bonsai getMutable method regression (#2934)
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-authored-by: Justin Florentine <justin+github@florentine.us>
2021-10-28 09:37:15 -07:00
Antoine Toulme
11f5cfb022 Upgrade to Apache Tuweni 2.0 (#2376)
* Upgrade to Apache Tuweni 2.0

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

* Remove intermediate repository

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

* Remove all occurrences of toBytes

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

* Migrate to tuweni-bytes

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

* add changelog

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

* correct reference tests

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

* Initial API changes

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

* more changes

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

* Change APIs for VM ops

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

* Use constant UInt256.ONE

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

* Optimize a bit address <> word transformation

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

* spotless

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
2021-07-17 00:15:27 +02:00
Antoine Toulme
cd66968b6d Add tracing support for internals and JSON-RPC (#1557)
* Add tracing support for internals and JSON-RPC

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

* Remove rocksdb tracing as it slows down execution too much

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

* Add B3 headers extraction on JSON-RPC requests

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

* Remove traces around trie tree as they slow down syncing significantly

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

* Add tracing to fast sync pipeline

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

* Add tracing for all pipelines

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

* Address code review

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

* Add acceptance tests and break out the shaded dependency

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

* Fix tracer id

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

* Revert changes to trie

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

* Upgrade otel to latest, remove old tracing

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

* Code review comments

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
2021-01-04 11:11:13 -08:00
Danno Ferrin
5241747ba4 Bonsai Tries early prototype (#1664)
This is a not-fully-functional prototype of Bonsai Tries.

Bonsai tries is a flat leaf storage, branch-by-location, and diff based reorgs
refactoring of the existing forest based trie storage mechanism aimed at
creating sustainable performance at mainnet loads.

* Since it is experimental a feature flag of --Xdata-storage-format=BONSAI
controls activation.

Some required changes have a long reach:

* To accommodate location based storage many Trie operations accept both a
location and hash value. Each data storage format is keyed off of only
one of the fields, so many tests will pass in null to the other field.
* MutableWorldStateUpdater.persist now takes an argument of a block hash.
If this is a natural progression of blocks the hash of the new block is
passed in. Otherwise null should be passed in.

Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
2020-12-07 08:59:44 -07:00
David Mechler
03a14841b5 Add System.exit when No space left on device RocksDBException occurs (#1552)
* #1066 Switched to use unprefixed hex strings for memory and stack values

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Disable flaky tests per Ben Burns(Yeti) request

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Revert last commit and enable ignored tests.

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1157 - updated to create 2 agents so that proper bonding can occur

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1162 - Updated test to mock the local peer PING packet creation so that the hash can be managed.

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Added admin_logsRepairCache end point

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Added admin_logsRepairCache end point

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Remove p2p network code per PR comments

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Updates from PR comments

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Spotless Apply fixes

Signed-off-by: David Mechler <david.mechler@consensys.net>

* PR updates

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Admin force cache refresh when called through end point per PR comments

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Pr updates

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Update changelog for 1.5.1

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Remove check for 0x prefix on addresses to match expectations

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Update graphql pending to allow for sorting of transactions

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1408 Add Miner data endpoints

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1408 Add Miner data endpoints

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1408 Add Miner data endpoints

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1408 Added tests for new miner endpoints

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1408 - PR updates

Signed-off-by: David Mechler <david.mechler@consensys.net>

* SpotlessApply updtes

Signed-off-by: David Mechler <david.mechler@consensys.net>

* SpotlessApply updtes

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1411 - Added System.exit when No space left on device

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1411 - PR updates

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1411 - PR updates

Signed-off-by: David Mechler <david.mechler@consensys.net>

Co-authored-by: David Mechler <davemec@users.noreply.github.com>
2020-11-12 07:54:27 -05:00
Antoine Toulme
b9364ed243 Upgrade to Apache Tuweni 1.2.0 (#1493)
* Upgrade to Apache Tuweni 1.2.0

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

* no jsr305

Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>

Co-authored-by: Danno Ferrin <danno.ferrin@gmail.com>
2020-11-05 15:40:42 -08:00
Ratan (Rai) Sur
739b3382f4 Unsupport Misplaced Database Metadata (#1060)
Way back in the pantheon days, I put the DATABASE_METADATA.json file in 
the database directory. This was a bad idea because rocksdb owns that 
directory. We changed to putting it in the directory we own, data, but 
we needed to support the old way of doing things. The time to support 
that old location has well and truly past so now we're safe to stop 
looking in that directory.

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
2020-06-16 10:36:52 -04:00
Yehia Tarek
93996e349e remove removeAllKeysUnless from interfaces and its implemntation (#936)
Signed-off-by: yehia67 <yehiatarek67@gmail.com>
2020-05-19 19:13:45 -04:00
Karim T
5f92f5407e [BESU-888] fix RocksDBException during sweeping (#929)
Co-authored-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
2020-05-15 12:40:23 -04:00
Ratan Rai Sur
b87a6358a2 update to new pruning known issue and ignore related test (#898)
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
2020-05-11 14:58:31 -04:00
Ratan Rai Sur
43eccbbb67 [Pruning Bugfix] Prevent race condition in key deletion. (#760)
* add doomed key check (busy-waiting for now)

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* optional and logging

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* remove logging

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* sleeping and hardening

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* rename segments

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* move away from atomic references to regular vars

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* remove hardened segment parameter

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* increase sleep

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* spotless

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* remove unnecessary interface

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* rename

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* move commit waiting outside of timer

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* set default lock timeout to 1ms

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* add default lock timeout to tests

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* Revert "rename segments"

This reverts commit 184eefaaa0ccc857b0caff2b382f8338ff225d5d.

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* fix jmh compilation error

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* add documentation

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* bump up sleep to 1ms

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* (POC) Add lock to ensure that we don't prune while comitting

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* remove unnecessary persist (#569)

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* flesh out @mbaxter's idea and remove my code

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* iterator changes

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* hybridize with doomed key

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* comment

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* move doomed key unset to after node added listener

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* update instead of getting and setting doomedKeyRef in commit

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* comment

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* invert condition

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* remove locks

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* remove `removeAllKeysUnless`

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* more remove removeAllKeysUnless

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* reuse streamKeys

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* remove test

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* set default lock timeout to 1ms

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* add default lock timeout to tests

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* fix jmh compilation error

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* revert back to locks instead of doomedkey

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* change delete to not guarantee deletion

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* plugin hash

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* javadoc

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* Revert "change delete to not guarantee deletion"

This reverts commit 2289bb34cfe73bb34990db3b5ef3d614222b8c5b.

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* skip key deletion on timeout

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* clear in rollback

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* Revert "fix jmh compilation error"

This reverts commit b64ecf86568789583966e534685258d484987deb.

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* Revert "add default lock timeout to tests"

This reverts commit aff6aa6065a02bbc7eaa313d58034de48dd1d9ce.

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* Revert "set default lock timeout to 1ms"

This reverts commit 267fe0a642bf9cca89d53e09830454b7137324e6.

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* use noSlowDown write option instead of global timeout

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* add back tests

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* close tryDeleteOptions

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* remove unnecessary lock

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* move increment inside try

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* use StorageException subclass instead of field

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* revert accidental deletion in javadoc

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* tryDelete javadoc

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* add trace for skipping key deletion

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* merge catch and finally try blocks

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* switch from exception to boolean return value

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* tweak

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* changelog changes

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* add api back

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

* add back throws javadoc

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

Co-authored-by: Meredith Baxter <meredith.baxter@consensys.net>
Co-authored-by: MadelineMurray <43356962+MadelineMurray@users.noreply.github.com>
2020-05-07 08:14:20 +10:00
Ratan Rai Sur
fa9db4b099 Key Value Tweaks (#726)
Some of these are just cosmetic but I think I found some bugs in there.

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
2020-04-16 10:17:49 -04:00
Danno Ferrin
838f7aa5e0 Fix Gradle 7.0 compatibility issues and build warnings (#288)
Removes as many Gradle 7.0 compatibility issues as possible
* `baseName` -> `archiveBaseName`
* `extension` -> `archiveExtension`
* `destinationDir` -> `destinationDirectory`
* `runtime` -> `runtimeOnly`
* Change some log4j-api and log4j-core dependencies
* Remove an unneeded and outdated plugin (`net.ltgt.apt`)
* tweak the plugin-api change detector's property annotations.

Warnings still exist with one external plugin used for license file
checking that we do not control the source code for.

Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
2020-01-13 08:28:50 -07:00
Ratan Rai Sur
db1294fecf remove inline comment (#285)
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>

Co-authored-by: CJ Hare <CjHare@users.noreply.github.com>
2020-01-10 09:29:26 +10:00
Danno Ferrin
e493b91742 Restore "FieldCanBeFinal" errorprone check (#287)
This was turned off a number of months ago because of long build times.
However it appears either because of code structure changes or fixed
errorprone that this finishes in a reasonable time now.

Code that violated this check is also fixed.

Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
2020-01-02 10:27:54 -07:00
Danno Ferrin
dfad8bff78 Update Dependencies (#281)
Update dependencies to most current version
 - except picocli which is a major version update
Alphabetize dependencies

Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
2020-01-01 20:42:13 +13:00
Antoine Toulme
ccefada736 Move to Apache Tuweni Bytes library (#215)
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
2019-12-20 12:05:15 +10:00
Ivaylo Kirilov
d23a69c0c1 Add versioning to privacy storage (#149)
Signed-off-by: Ivaylo Kirilov <iikirilov@gmail.com>
2019-11-20 15:35:17 +13:00
Trent Mohay
3d867532de Repaired Metrics name collision between Privacy and RocksDB (#187)
It was identified that when both KV_ROCKSDB metrics and Privacy were enabled,
that Besu failed to start due to a naming collision in Metrics Collators - this was ultimately due to Besu having 2 keyvalue stores - one for public state, and another for private state - and _both_ using the same metrics.

To overcome this issue, the metrics used in the private kv store are prefixed with the word "private".

Signed-off-by: Trent Mohay <trent.mohay@consensys.net>
2019-11-15 08:47:22 +11:00
Danno Ferrin
48df8290de [PAN-3242] Programatically enforce plugin CLI variable names (#117)
Enforce that plugin variable names are either `--plugin-<namespace>-`
or `--Xplugin-<namespace>-` when registered with the
PicoCLIOptionsService.  If the names don't match a RuntimeException is
thrown, and unless that exception is caught the plugin will not have
start or stop lifecycle messages called.

Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
2019-10-17 16:21:52 -06:00
Lucas Saldanha
11cb619a50 Fixing rocksdb artifact name conflicts (#73)
Signed-off-by: Lucas Saldanha <lucas.saldanha@consensys.net>
2019-10-02 09:18:20 +13:00
Ivaylo Kirilov
c09145e490 refactor-privacy-storage (#7)
* refactor-privacy-storage

Signed-off-by: Ivaylo Kirilov <iikirilov@gmail.com>
2019-09-30 06:45:03 +10:00