Update discovery logic to consider a peer with an unknown discovery endpoint to be unknown regardless of whether we've encountered a peer with the same node id before. This makes the discovery logic more forgiving in the face of node restarts.
If nodeA bonds with nodeB, then nodeB leaves the network and later comes back with a different ip address or listening port, nodeA would previously continue trying to communicate with nodeB at its original address. With these changes, nodeA will now treat the restarted nodeB as a new peer and communicate with it on its updated endpoint. Additionally, nodeB's information will be updated in the peer table so that neighbors requests return updated information on this node.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Change the retesteth port to 47710 (0xba5e) so
(a) it does not conflict with other clients when started w/o args
(b) it is flavorful to the "Besu" name
Signed-off-by: Danno Ferrin <danno.ferrin@consensys.net>
This allows the acceptance testing DSL to be published as part of the
Besu internal jar files - which in turn means the DSL can be reused
in other projects.
Signed-off-by: Trent Mohay <trent.mohay@consensys.net>
* updating jenkinsfile to skip publishing snapshots to bintray
* updating docs link in readme
Signed-off-by: Joshua Fernandes <joshua.fernandes@consensys.net>
Move header validations that extract the signer key out of the "light"
validation mode. Reduces fast sync time on goerli 75%
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Remove metrics from plugin registration. Doing it this way here always results in a
NoOpsMetrics being inited because CLI options have not been parsed.
Add an acceptance test for metrics. This is what should have been in place and
would have detected metrics not working earlier.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Factorise metrics code for KeyValueStorage database
- introduce `MonitorableKeyValueStorage`
- factorise code
- remove metrics instanciation in `RocksDbKeyValueStorage` and `ColumnarRocksDbKeyValueStorage`
* Rename class
* [PAN-2995] Make account.getAddress() return an Optional<Address>
* fix Jenkins failure
* fix failing test
* fix failing test
* Revert "fix failing test"
This reverts commit e2bb261a185d20f75e33be0ec72f5b5851c40461.
* Revert "fix failing test"
This reverts commit e5dc3fa073ef968bc017e513d15657204f54e519.
* Revert "fix Jenkins failure"
This reverts commit 15f90ea5e214ac624b891225bd096466c2ce1111.
* Revert "[PAN-2995] Make account.getAddress() return an Optional<Address>"
This reverts commit 08cc7ca5b785c666acd8d2b34d5f672837cd78fe.
* init trace_replayBlockTransactions
* Revert "init trace_replayBlockTransactions"
This reverts commit 545426595c8ede0b30ab1025bbdd262ce51281b7.
* Revert "Revert "init trace_replayBlockTransactions""
This reverts commit 756f52bb019c0e0c61aac4a97269d40198341c86.
* Update TraceReplayBlockTransactions.java
* Check request parameters
Method returns an error if any option other than “trace” is supplied.
* Update TraceReplayBlockTransactions.java
* implement trace_replayBlockTransactions
- start business logic implementation
- iterate through `TraceFrame` and transform to parity style
- detect `CALL` opcode to retrieve contract address required in parity format
* remove comments
* add final modifier for method parameters
* fix unit tests
* remove useless log
* transform address from stack (Bytes32) to an Address
* trace_replayBlockTransactions new features
- compute gas used for each sub trace
- detect `RETURN` opcode
- to get `ouput` value from `memory`
- detect end of subtrace
* fix unit tests
* Update FlatTrace.java
add final modifier
* pretty format JSON file
* handle smart contract deployments
* handle smart contract deployment
- set `code` field when contract creation transaction
- set `address` field when contract creation transaction
* introduce FlatTraceGenerator
* refactoring
* spotless apply
* update tests to compare Json node tree independently of the order
- added generated test cases
- use jackson `ObjectMapper` to compare the actual result to the expected one
- `assertThat(mapper.readTree(actualResult)).isEqualTo(mapper.readTree(expectedResult));`
* fix unit tests
- return empty result if block is empty
- handle case where there is no `RETURN`, `STOP` is then considered as a return to close the trace and perform gas computation.
- increment gas remaining by gas used
* spotless apply
* introduce SELFDESTRUCT
* set result to null when suicide type
* remove result field, use builder only
* re-enable tracing tests
* implement gas used computation
- implement a strategy with 2 options
- if first frame gas remaining is higher than gas remaining after transaction was processed then the gas used will be the net difference
- otherwise a frame by frame cumulative gas cost will be used
* get self destruct refund balance from message frame
* give access to `ProtocolSchedule` to get `GasCalculator`
* fix gas used computation for subtrace (1 level deep)
* fix input, use all memory and not only first element
* fix trace addresses
* debug log
* remove some tests files
* Revert "remove some tests files"
This reverts commit 88ee6aa84c199e1f386e1ba314c507d17c89226d.
* debug jenkins
* out instead of err
* spotless apply
* add debug info
* remove static modifier for blockchainSetupUtil field
* remove unused field
* add javadoc for gasCalculator parameter
* fix PR review comments
* add javadoc for Trace interface
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Add a generalized genesis config override facility for command line use. Only useful for string or integer config values, not object values.
Sample use - enable Istanbul fork on block 99 million
--override-genesis-config=istanbulFork=99000000
Overriding a value with an empty string unsets the value
Sample use - disable Istanbul fork by un-setting istanbulFork:
--override-genesis-config=istanbulFork=
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* 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>
* 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>
* update web3j 4.5.0 + use pantheon module in favour of core
* remove custom eea/privacy rpc calls -> use web3j instead
* overhaul the conditions -> web3j does the polling for receipts for us
* re-define a PrivacyNode - it is an object that holds a PantheonNode and an OrionTestHarness
* do not start OrionTestHarness prematurely - calling PrivacyNode.start() will start an Orion node followed by it's accompanying Pantheon node
* stop and close resources properly -> clean-up removes the created temporary directories correctly
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>