* 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>
* compile issues sorted, some tests failing
Signed-off-by: Justin Florentine <justin+github@florentine.us>
* closing runnerBehind closes the vertx shared with runnerAhead, which now throws an exception
Signed-off-by: Justin Florentine <justin+github@florentine.us>
* checkpoint when 4/5 websocket login tests pass
Signed-off-by: Justin Florentine <justin+github@florentine.us>
* exp moved to attribute from principal
Signed-off-by: Justin Florentine <justin+github@florentine.us>
* fixed more tests
Signed-off-by: Justin Florentine <justin+github@florentine.us>
* fixed more tests
Signed-off-by: Justin Florentine <justin+github@florentine.us>
* exception handling test improvement
Signed-off-by: Justin Florentine <justin+github@florentine.us>
* exception handling test improvement
Signed-off-by: Justin Florentine <justin+github@florentine.us>
* static renamed
Signed-off-by: Justin Florentine <justin+github@florentine.us>
* We want old implementation of the host()
Newly vertex handles the forward headers and modifies host(). In the
process vert.x loses track of port from Host header in case the port was
not a string.
Signed-off-by: Jiri Peinlich <jiri.peinlich@gmail.com>
* adding dependency on jackson-databind for tests
Signed-off-by: Jiri Peinlich <jiri.peinlich@gmail.com>
* making sure changes are spotless
Signed-off-by: Jiri Peinlich <jiri.peinlich@gmail.com>
* Dealing with regression
Signed-off-by: Jiri Peinlich <jiri.peinlich@gmail.com>
* fixing last failing vert.x test hopefully
Signed-off-by: Jiri Peinlich <jiri.peinlich@gmail.com>
* removed commented out code
Signed-off-by: Justin Florentine <justin+github@florentine.us>
* reverts debugging adjustment
Signed-off-by: Justin Florentine <justin+github@florentine.us>
* removed commented out code
Signed-off-by: Justin Florentine <justin+github@florentine.us>
* minor whitespace cleanup
Signed-off-by: Justin Florentine <justin+github@florentine.us>
* (internal) Refactor 'onchain' to 'flexible' where applicable (#3075)
* CLI option name change
Signed-off-by: Frank Li <b439988l@gmail.com>
* refactor privacyparameters.java and add deprecation warning
Signed-off-by: Frank Li <b439988l@gmail.com>
* more refactoring
Signed-off-by: Frank Li <b439988l@gmail.com>
* add to everything.toml
Signed-off-by: Frank Li <b439988l@gmail.com>
* bugs
Signed-off-by: Frank Li <b439988l@gmail.com>
* more missing variable names
Signed-off-by: Frank Li <b439988l@gmail.com>
* more classes
Signed-off-by: Frank Li <b439988l@gmail.com>
* more classes
Signed-off-by: Frank Li <b439988l@gmail.com>
* fix compile error
Signed-off-by: Frank Li <b439988l@gmail.com>
* add new test to invalidate passing both commands
Signed-off-by: Frank Li <b439988l@gmail.com>
* more refactoring + more tests
Signed-off-by: Frank Li <b439988l@gmail.com>
* new batch
Signed-off-by: Frank Li <b439988l@gmail.com>
* final batch?
Signed-off-by: Frank Li <b439988l@gmail.com>
* failing unit test
Signed-off-by: Frank Li <b439988l@gmail.com>
* revert incorrect refactoring back to onchain
Signed-off-by: Frank Li <b439988l@gmail.com>
* fix unit test
Signed-off-by: Frank Li <b439988l@gmail.com>
* comment
Signed-off-by: Frank Li <b439988l@gmail.com>
* comment
Signed-off-by: Frank Li <b439988l@gmail.com>
* support both privx methods
Signed-off-by: Frank Li <b439988l@gmail.com>
* add to changelog
Signed-off-by: Frank Li <b439988l@gmail.com>
* address comment
Signed-off-by: Frank Li <b439988l@gmail.com>
* add plugin privacy
Signed-off-by: Frank Li <b439988l@gmail.com>
Signed-off-by: Justin Florentine <justin+github@florentine.us>
* checkpoint when 4/5 websocket login tests pass
Signed-off-by: Justin Florentine <justin+github@florentine.us>
* trying to figure out how to decouple this test
Signed-off-by: Justin Florentine <justin+github@florentine.us>
* spotless
Signed-off-by: Justin Florentine <justin+github@florentine.us>
* removes Orion from integration test
Signed-off-by: Justin Florentine <justin+github@florentine.us>
* spotless
Signed-off-by: Justin Florentine <justin+github@florentine.us>
* Add jackson dependency to merge module
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* Migrate JWTAuthOptions creations for public keys
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* Check http client response status
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* Replace Orian with Tessera in tests
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* Change Tessera expected error messages in tests
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* Change executor of integrationTests to allow spanning Docker processes
Signed-off-by: Diego López León <dieguitoll@gmail.com>
Co-authored-by: Justin Florentine <justin+github@florentine.us>
Co-authored-by: Jiri Peinlich <jiri.peinlich@gmail.com>
Co-authored-by: Frank Li <39414003+frankisawesome@users.noreply.github.com>
Co-authored-by: Sally MacFarlane <sally.macfarlane@consensys.net>
* Start external services before we start mining
Reasons:
- you may wish to query the blockchain using rpc before you start
processing
- you may wish to register a websocket e.g to listen for blocks
currently you will probably miss one because we start processing
before we start the ws service
Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
* Add beforeExternalServices hook for plugins
Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
* move the acceptance test plugins
move the test plugins that are used in the acceptance tests into the same
package namespace as the acceptance tests so that they are ignored by
sonar for code coverage
Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
* Fix typo in log
Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
Co-authored-by: Sally MacFarlane <sally.macfarlane@consensys.net>
* CLI option name change
Signed-off-by: Frank Li <b439988l@gmail.com>
* refactor privacyparameters.java and add deprecation warning
Signed-off-by: Frank Li <b439988l@gmail.com>
* more refactoring
Signed-off-by: Frank Li <b439988l@gmail.com>
* add to everything.toml
Signed-off-by: Frank Li <b439988l@gmail.com>
* bugs
Signed-off-by: Frank Li <b439988l@gmail.com>
* more missing variable names
Signed-off-by: Frank Li <b439988l@gmail.com>
* more classes
Signed-off-by: Frank Li <b439988l@gmail.com>
* more classes
Signed-off-by: Frank Li <b439988l@gmail.com>
* fix compile error
Signed-off-by: Frank Li <b439988l@gmail.com>
* add new test to invalidate passing both commands
Signed-off-by: Frank Li <b439988l@gmail.com>
* more refactoring + more tests
Signed-off-by: Frank Li <b439988l@gmail.com>
* new batch
Signed-off-by: Frank Li <b439988l@gmail.com>
* final batch?
Signed-off-by: Frank Li <b439988l@gmail.com>
* failing unit test
Signed-off-by: Frank Li <b439988l@gmail.com>
* revert incorrect refactoring back to onchain
Signed-off-by: Frank Li <b439988l@gmail.com>
* fix unit test
Signed-off-by: Frank Li <b439988l@gmail.com>
* comment
Signed-off-by: Frank Li <b439988l@gmail.com>
* comment
Signed-off-by: Frank Li <b439988l@gmail.com>
* support both privx methods
Signed-off-by: Frank Li <b439988l@gmail.com>
* add to changelog
Signed-off-by: Frank Li <b439988l@gmail.com>
* address comment
Signed-off-by: Frank Li <b439988l@gmail.com>
* add plugin privacy
Signed-off-by: Frank Li <b439988l@gmail.com>
Removes Ethsigner to Besu acceptance tests as these are covered in EthSigner and other cross client testing tools.
Signed-off-by: Jason Frame <jasonwframe@gmail.com>
* add unit test for JWTAuthOptionsFactory
Signed-off-by: Frank Li <b439988l@gmail.com>
* additional test for invalid algo
Signed-off-by: Frank Li <b439988l@gmail.com>
* WIP || Think about how to handle the invalid algorithm exception
Signed-off-by: Frank Li <b439988l@gmail.com>
* WIP || Handle exception at BesuCommand level, remove test
Signed-off-by: Frank Li <b439988l@gmail.com>
* WIP || Acceptance Tests
Signed-off-by: Frank Li <b439988l@gmail.com>
* WIP || Fix obvios test run errors
Signed-off-by: Frank Li <b439988l@gmail.com>
* WIP || Break long line of string
Signed-off-by: Frank Li <b439988l@gmail.com>
* Acceptance tests working
Signed-off-by: Frank Li <b439988l@gmail.com>
* remove accidentally committed file
Signed-off-by: Frank Li <b439988l@gmail.com>
* fix failing tests
Signed-off-by: Frank Li <b439988l@gmail.com>
* changelog entry
Signed-off-by: Frank Li <b439988l@gmail.com>
* fixes based on CR
Signed-off-by: Frank Li <b439988l@gmail.com>
* add missed acceptance test stuff
Signed-off-by: Frank Li <b439988l@gmail.com>
* use enum for CLI arg
Signed-off-by: Frank Li <b439988l@gmail.com>
* two seperate CLI args for ws and http
Signed-off-by: Frank Li <b439988l@gmail.com>
* add file header
Signed-off-by: Frank Li <b439988l@gmail.com>
* use JwtAlgorithm class + fix broken unit test
Signed-off-by: Frank Li <b439988l@gmail.com>
* add fromString
Signed-off-by: Frank Li <b439988l@gmail.com>
* experimental flag || changelog update || CLI option dependency
Signed-off-by: Frank Li <b439988l@gmail.com>
* hide exprimental options
Signed-off-by: Frank Li <b439988l@gmail.com>
* remove experimental flag
Signed-off-by: Frank Li <b439988l@gmail.com>
* change experimental options in toml
Signed-off-by: Frank Li <b439988l@gmail.com>
* Only add --bootnodes if there are some nodes set (#1632)
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* Allow to configure P2P port (#1632)
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* Add discovery options to genesis file (#1632)
Signed-off-by: Diego López León <dieguitoll@gmail.com>
This is a re-implementation of the initial POC done in https://github.com/PegaSysEng/pantheon/pull/1909/ by Danno Ferrin <danno.ferrin@gmail.com>
* Only enable plugin rpc api when enabled on --rpc-http-api or --rpc-ws-apis
* Only allow new rpc endpoints to be defined
Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
Private accounts are not able to change the state of public accounts. When transferValue is called in MessageCallProcessor it attempts to get a mutable account. This is only required when a transfer of value is happening. If a transfer of value from a private contract to a public contract is attempted an error will be thrown.
Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
Move EVM to a standalone module
Move the EVM classes to a standalone module. This is mostly moves but
some API re-resign to peel out some features not essential to the EVM,
such as privacy support and ties to the data storage subsystem.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
* Create new datatypes module
Create a new `datatypes` module to hold datatypes that are broadly used.
This will aid modularization by making sure the base types in the module
minimize the amount of unrelated support classes needed.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
* Add Address, Hash, and Wei to datatypes
Move the Address, Hash, and Wei to datatypes in as they are needed for
EVM modularization.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
* allow onchain privacy group proxy calls under group lock
Prior to this commit, the only allowed transactions in locked onchain
privacy groups were those making the addParticipants call to *any*
contract--not just the proxy. This commit ensures that:
- while locked, only the group management proxy can be called
- while locked, all functions of the management proxy can be called
Corollary, this commit allows unlocking a group using unlock instead
of implicitely unlocking it via addParticipants. This fixes#2693.
Signed-off-by: Taccat Isid <taccatisid@protonmail.com>
* add acceptance test asserting that privacy groups can be unlocked
Signed-off-by: Taccat Isid <taccatisid@protonmail.com>
Co-authored-by: Sally MacFarlane <sally.macfarlane@consensys.net>
EIP-1702 account versioning was a candidate for the Istanbul hard fork
but was removed prior to the first testnet. Other versioning techniques
have greater core dev mind share and one preparatory step landed in
London, EIP-3541, making EIP-1702 very unlikely to make it to Mainnet.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
* Refactor: PrivacyBlockProcessor to clarify intent
Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
* Wire up privacy genesis options into PrivacyParameters
Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
* Refactor private state genesis into it's own class
- pass through in privacyParameters
Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
* Refactor: inject PrivateStateGenesis into PrivacyPrecompiles
Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
* Private Genesis initialisation
- set code, balance and storage from private-genesis.json
Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
* Check on-chain with private genesis in acceptance tests
Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
* Remove unused EthGetCodeCall
Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
* Use a plugin based aproach for privacy genesis
- if the plugin is registered it will be used to apply private genesis
state
- if onchain flexible privacy groups is enable that will be applied
after
Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
* PrivateGenesisAcceptanceTest::createPrivacyGroup can be private
Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
* PrivateStateGenesis add debug logs
Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
* Warn if genesis account allocation is in reserved precompile range
Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
* Add sender into unsignedPrivateMarkerTransaction for plugin to make descision
Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
* Remove locking solution as may not be needed
- if this is required we should first evaluate actual use cases
and test scenarios
Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
* Rename PrivateStateGenesis -> PrivateStateGenesisAllocator
Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
* Tidy up naming for getPrivateStateGenesisAllocator
Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
* Privacy Plugin javadocs
Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
Update spotless to 5.14.2 and java-google-format to 1.10.0.
Both of these are needed to support Java 16 and Gradle 7.x.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
* Add unstable CLI option for max ommers depth
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Move to a builder pattern for mining parameters
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Refactor: clarify intent of arg when testing permissioning plugin
Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
* Refactor: remove duplicate createPrivateMarkerTransaction
Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
* PrivateMarkerTransactionFactory: add option to delegate to plugin
if defined the plugin will be responsible for creating the pmt
Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
* Implement locking strategy for eea_sendRawTransaction
- this will lock per address being sent to prevent nonce
too low errors
Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
* Refactor plugin integration to use a more explicit poco
- the plugin will need to sign the transaction with the data it's given
- it will not need to query anything e.g nonce etc
Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
* refactor: update naming and tidy up based on comments
Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
* Isolate code for calculating gas limit when using privacy plugin
Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
Co-authored-by: Vijay Michalik <vijay.michalik@consensys.net>
* 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>
* Hook up an empty plugin for future unrestricted privacy encryption
Skeleton implementation for PrivacyPayloadEncryptionProvider
Wire up unencrypted serialization for private transactions
Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
* wire up simple privacy plugin in acceptance tests
Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
* Pass the marker transaction through to plugin
Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
* Move getters/setters into consistent place
Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
* Rename plugin methods and config to be more generic
- remove protections around transaction.restriction
- the plugin is responsible for this
- make plugin more generic so could be used for restricted/unrestricted
Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
* Provide more meaningful error message
Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
* Fix up test naming to match impl naming
Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
* Rename UNRESTRICTED_PRIVACY to PLUGIN_PRIVACY
Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
* fix typo in PrivacyParmeters::toString
Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
* Fix exception messages to be PrivacyPlugin
Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
* Remove blockNumber from getPrivateTransactionFromPayload
Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
* Unrestricted Privacy: implement unrestricted privacy
- put data on chain
- wire up methods for sendRaw with restriction
- unrestricted pre-compile for processing transactions at Address.precompiled(PRIVACY - 4)
- store private state of unrestricted transactions
- route priv endpoints to unrestricted state resolution
- Implement unrestricted websocket endpoint
- Tidy up web3j transaction manager naming
- Parameterize tests for different privacy restrictions
- Implement our own PrivateTransactionManager
- remove chainId from sendRawTransaction calls
- Add check for member being a participant when creating privacy group
- refactor private marker transaction naming
- mark privacy-unrestricted-enabled as beta
- Remove create privacy group from unrestricted
- Unrestricted privacy acceptance tests will use a generated group id.
- rename enclavePublicKey to privacyUserId
- Ignore some tests for unrestricted privacy
- privacyGroupId has no significant meaning in unrestricted tests
- Change config label to be inline with previous conventions
- command tests to be added when made stable
Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
Signed-off-by: Stefan Pingel <stefan.pingel@consensys.net>
Co-authored-by: Stefan Pingel <stefan.pingel@consensys.net>