Commit Graph

110 Commits

Author SHA1 Message Date
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
matkt
d5658c2a65 add snapsync as experimental feature (#3710)
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
2022-04-14 15:55:15 +02: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
Sally MacFarlane
00851d042c Not null annotations (#3708)
* NotNull -> Nonnull

Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
2022-04-07 21:03:50 +10:00
matkt
e9b9de6844 Add snapsync pipeline (#3656)
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
2022-04-04 15:22:48 +02: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
matkt
7e0d06ac61 preparing the snapsync pipeline (#3625)
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
2022-03-29 04:03:57 -05: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
Jiri Peinlich
97a3494085 When downloading the world state, persist children before parents (#3202)
* Fast sync should traverse the world state depth first

1. The pending requests queue in the world state downloader is now a different data structure. We now use a list of priority queues.
2. The node requests now know about the parent request that was responsible for spawning them.
3. When a node has data available and is asked to persist before its children are persisted, the node will not do anything. Instead, it will wait for all its children to persist first and will persist together with the last child.

Storing children before parents gives us the following benefits:
* We don't need to store pending requests on disk any more.
* When restarting download from a new pivot, we do not need to walk and check the whole tree any more.

And the following drawbacks:
* We now have pending nodes in memory for which we already downloaded data, but we do not store them in the database yet.

Overall expectations on performance:
We still need to download every single state node at least once, so there is no improvement there. We will save a significant amount of time in case we change pivots. And we save lots of read/writes on filesystem because tasks are not needed to be written to disk any more.

We want to avoid having too many pending unsaved nodes in memory, not to run out of it. If we were always handling only one request to our peers at the same time, we would not need to be worried, and we would just use a simple depth first search. Because we batch our requests, we might produce too many pending unprocessed nodes in memory if we are not careful about the order of processing requests. That is where the priority on node request comes from. We want to always process nodes lower in the tree before nodes higher in the tree, and preferably we want to first process children from the same parent so that we can save the current unsaved parent as soon as possible.

At the moment, I still left in the code several artefacts that I use for debugging the behaviour. I am planning to get rid of most of these counters, feel free to point them out in the review. There is for instance a weird counter in the NodeDataRequest class that I am using to monitor the total amount of unsaved nodes. In case pending unsaved node count rises too high, there is a warning printed into the logs. At the moment of writing, I would expect the counter to stay below 10 000 generally and not rise above 20 000 nodes. If you saw the number rise to for instance 100 000 that would signify a bug.

Similarly, because of the order of processing of the nodes, we do not need to store huge number of requests on the disk any more and the whole list fits comfortably into the memory. Without batching, we would not have more than a thousand requests around waiting. Because of the batching, we can see the number of requests occasionally rises all the way up to 300 000, but usually should be under 200 000.

Note that at any time there should not be more pending unsaved blocks than pending requests. Such a situation would be a bug to be reported.

Signed-off-by: Jiri Peinlich <jiri.peinlich@gmail.com>

* Addressing review comments

Signed-off-by: Jiri Peinlich <jiri.peinlich@gmail.com>

* Fixed failing test

Signed-off-by: Jiri Peinlich <jiri.peinlich@gmail.com>

* Improving test coverage

Signed-off-by: Jiri Peinlich <jiri.peinlich@gmail.com>

* Addressing review comments

Signed-off-by: Jiri Peinlich <jiri.peinlich@gmail.com>
2022-01-10 16:09:40 +00:00
Danno Ferrin
ed9d64d9cb Version upgrades for 22Q1 (#3217)
* lots of errorprone fixes
* some license updates
* some mockito updates
* upgrade the rocksdb version
* Prometheus left at 0.9.0 as 0.10.0+ introduces OpenMetrics 
  related changes that break unit tests.

Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
2021-12-24 16:02:07 -07:00
Jiri Peinlich
a44bd7dffb Adding filechannel name to the exception (#3064)
Signed-off-by: Jiri Peinlich <jiri.peinlich@gmail.com>

Co-authored-by: Sally MacFarlane <sally.macfarlane@consensys.net>
2021-11-18 09:37:51 +10: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
5670264f12 Upgrade OpenTelemetry to 1.2.0 (#2313)
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

Co-authored-by: Sally MacFarlane <sally.macfarlane@consensys.net>
2021-05-26 08:23:44 +10:00
Danno Ferrin
008daad6b4 Remove unneeded log4j2.xml files (#1735)
Remove all but 4 log4j2.xml config files
* The main config for the besu CLI app
* The config for the evmTool CLI app
* The config for acceptance tests
* A config in testUtil

If any tests depend on a log4j file they should import testutil.

Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
2021-01-04 23:25:33 +01: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
99dcf50ee5 Reduce Spurious Log Messages (#1678)
Adding the Log4j "jul" (java.util.logging) adapter resulted in many
messages like this at startup:
`main INFO Registered Log4j as the java.util.logging.LogManager.`
These come from the Log4j status logger.  We can get rid of those by
setting the status attribute on all configurations to a higher logging
level.  WARN is the next higher level.

Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
2020-12-09 23:39:53 -07: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
Danno Ferrin
9c22fbc61c Add memory as a key value storage option (#1617)
Add `memory` as an option for `--key-value-storage`.  This is useful in
small network synchronization tests as memory is faster and is easier to
inspect via a debugger.

Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
2020-12-03 14:44:13 -07: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
Danno Ferrin
256e5c914d Errorprone version upgrade (#1096)
Upgrade to ErrorProne 2.4.0

* public constructors on abstract classes are removed
* Javadoc must have meaningfull documentation
* lambdas should not be variables
* Added to the list of confusing inner class names (Entry and Type)
* no assert keyword in tests
* Obsolete JDK classes produce errors now

Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
2020-06-17 10:34:56 -06: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
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
Pierre Grimaud
3cc4dc3cff Fix typos (#813)
Signed-off-by: Pierre Grimaud <grimaud.pierre@gmail.com>

Co-authored-by: Sally MacFarlane <sally.macfarlane@consensys.net>
2020-05-01 07:50:43 +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
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
c09145e490 refactor-privacy-storage (#7)
* refactor-privacy-storage

Signed-off-by: Ivaylo Kirilov <iikirilov@gmail.com>
2019-09-30 06:45:03 +10:00
Ratan Rai Sur
78ecf33237 Fix some mark sweep pruner bugs where nodes that should be kept were being swept (Re-merge of #38) (#50)
Adds integration tests to catch bug where the mark storage was being cleared before a mark began. Instead, the mark storage is now cleared upon preparing the mark sweep pruner

Fixes bug where the pending marks where not being checked while pruning was occurring. By removing the flush in sweepBefore, the existing tests catch the bug.

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
2019-09-25 20:57:37 +03:00
Joshua Fernandes
bac5c673d3 Adding a spdx license check gradle task (#30)
* adding in spdx-license-identifier & updated check for the same; removing license check from spotless

Signed-off-by: Joshua Fernandes <joshua.fernandes@consensys.net>

* Change CheckSpdxHeader to a task.

Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-09-20 14:59:57 +10:00
Joshua Fernandes
d6a2394e2d Migrating Pantheon to Besu (#1945)
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-09-16 11:14:10 +10:00
Ratan Rai Sur
995ef1adba Ban junit assertions (#1939)
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-09-13 17:37:51 +03:00
CJ Hare
dec01db6f9 Refactoring Rocksdb as a module (#1889)
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-09-12 12:34:57 +10:00
Edward
9856cd32b0 Ensure plugin-api module gets published at the correct maven path (#1905)
* Ensure `plugin-api` module gets published at the correct maven path
* Move `plugins` to `plugin-api`

Signed-off-by: Edward Evans <edward.evans@consensys.net>

Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-09-05 10:29:30 +10:00
Edward
9601f44ac8 Return the plugin-apis to this repo (#1900)
* Return plugin-api to the main repo
* Spotless
* Migrate all external plugin-api references to the project in this repo
* Add licence header
* Update repo reference for publish, even if commented
* Use real configuration for publishing plugin-api

This was tested with the
`:plugins:publishMavenJavaPublicationToMavenLocal` task and checking the
local Maven repo to make sure it was using the correct paths

Signed-off-by: Edward Evans <edward.evans@consensys.net>

Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-09-04 12:12:27 +10:00
mark-terry
402937a459 [PIE-1859] Extracted Metrics interfaces to plugins-api. (#1898)
* [PIE-1859] Extracted Metrics interfaces to plugins-api.

* [PIE-1859] Bump.

* [PIE-1859] Renamed PantheonMetricsSystem -> ObservableMetricsSystem.

Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-09-03 15:59:18 +10:00
Jason Frame
a047286a23 Fix rocksDB storage so that clear removes all values (#1894)
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-08-30 10:41:59 +10:00
Ratan Rai Sur
dda93fd433 [Minor] Fix gradle formatting (#1876)
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-08-23 13:10:13 -04:00
Danno Ferrin
43cc4ce5c9 Support plugin Richdata APIs via implementation (#1581)
* Rich Data for Events Plugin

* plugin-api -> api

* use BinaryData as a root and add getValue to UInt256Value

* bring rick data changes in line with proposed APIs.

Undo orthagonal naming changes.

* add size

* use log and transaction interfaces from rich data api

* update to released plugin api version and add new event listener.

* add tests

* fix acceptance tests

Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-08-23 09:39:56 +02:00
Ratan Rai Sur
1716091723 [PAN-3064] sweep state roots before child nodes (#1854)
* sweep state roots before child nodes

* Adds long removeAccountStateTrieNode(key) method to WorldStateStorage.Updater

* remove assertj assertions from `AbstractKeyValueStorageTest`
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-08-20 20:07:12 -04:00
mbaxter
50c3a2cba0 [PIE-1791] Fix logic to disconnect from peers on fork (#1863)
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-08-19 10:24:08 -04:00
Danno Ferrin
ce8faf41c1 Explicitly configure some maven artifactIds (#1853)
Some auto-generated maven names cause collissions when used with the gradle
publish plugin, namely `core` and `util`.  Rename two jars that have such
a colission so the colission doesn't occur.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-08-14 14:23:53 -06:00
Ratan Rai Sur
8787a4c006 [PAN-2818] Database versioning and enable multi-column database (#1830)
* Database Versioning: The behavior is to load the database at the existing version if it
already exists or create the newest version if it doesn't

* multi-column by default: This makes the separated world state storage column required by mark sweep on by default
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-08-14 11:09:00 -04:00
Danno Ferrin
e32a3b7727 [PAN-2900] Fix FlatFileTaskCollection tests (#1833)
Windows has some slightly different Java NIO semantics, regarding size
after writing and whether files are deleted on close (they aren not).

The first issue is we shouldn't be using Integer.SIZE when we mean
Integer.BYTES.

The second issue is we cannot count on these work files showing up or
being deleted from the file system consistently across platforms.  The
ordering is consistent within platforms but not across.  The test was
re-written to check the read and write file numbers instead.


Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-08-08 09:42:46 -06:00
Ratan Rai Sur
b20147c062 [PAN-2819] [PAN-2820] Mark Sweep Pruner
* Mark Sweep Pruner 
* add `unload` method on Node interface, which is a noop everywhere but on `StoredNode`
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-08-07 12:24:02 -04:00
mbaxter
d48ca9e5a9 [PAN-2952] Add storage key preimage tracking (#1772)
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-07-29 13:26:13 -04:00
Karim T
516c267d16 [PAN-2444] Add CLI flag for setting WorldStateDownloader task cache size (#1749)
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-07-26 15:11:02 -04:00
CJ Hare
e43cee30a9 Removing unused methods on KeyValueStorage (#1661)
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-07-11 11:04:42 +10:00
Abdelhamid Bakhta
e1790ad3f0 Factorise metrics code for KeyValueStorage database (#1663)
* Factorise metrics code for KeyValueStorage database

- introduce `MonitorableKeyValueStorage`
- factorise code
- remove metrics instanciation in `RocksDbKeyValueStorage` and `ColumnarRocksDbKeyValueStorage`

* Rename class

Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-07-09 18:56:26 +02:00