QBFT to log warning when using validator contract if genesis extra data has validator
Also prevent existing warning from logging when using validator contract with no signers in genesis extra data.
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Extract private key file option to mixin (#536)
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* Method rename (#536)
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* Use keypair to resolve node key in public-key subcommands (#536)
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* Refactor common behavior for public key subcommands (#536)
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* Write test private key to default location (#536)
This is to rely on actual file system resolution for the test context
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* Add support for custom private key file on public-key subcommands (#536)
Signed-off-by: Diego López León <dieguitoll@gmail.com>
Co-authored-by: Sally MacFarlane <sally.macfarlane@consensys.net>
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>
* Extract gas cost calculation for Balance, ExtCodeCopy, ExtCodeHash, ExtCodeSize operations into cost function.
* Allow cost function to be called by an outside library
Signed-off-by: failfmi <oscurocalma@gmail.com>
Migrate ExceptionalHaltReason to an interface from an enum. The enum
made it difficult for downstream implementations to add custom reasons
as to why the EVM has halted. Switching to an interface is needed
because enums are final and not extensible.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Raise the visibility of AbstractCreateOperation's constructor to
protected from package so that create operations outside the library can
re-use the existing code.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
* Allow the use of BESU_CONFIG_FILE env var to specify config TOML
* Throw an exception when BESU_CONFIG_FILE and --config-file specified
* Switch ExecutionException for ParameterException
Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
Broad reaching optimizations to speed up EVM calculations
* Generally speaking, use int and long where it is more appropriate than UInt256 (memory indexes mostly)
* Move the internal stack to Bytes from UInt256
* Re-work the flow of many operations to account for the above
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
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>
Rollback TransactionGasCalculator
Rollback the transactionGasCalculator changes. This was done in
preparation for the EVM modularization. Instead, de-structure the data
needed to calculate the gas instead of passing in the whole transaction.
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>
Move entires that were mistakenly added to 21.7.3 lists to 21.7.4.
Add entry for ETC gas calculator bug.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
* Gradle 7.2 upgrade / Java 17 Build Support
* Upgrade to Gradle 7.2, which supports Java 17
* Regenerate gradlew script and wrapper (as recommended)
* Suppress the removal warning for `AccessController` for now
* Update the JMH version to get rid of Gradle deprecation warning
* Add spotless `targetExcludes` so it won't re-format submodules
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>
When the prometheus service restarts, connections can be left open and never closed. These connections should close after an idle timeout to avoid causing issues with running out of ports.
Signed-off-by: Paul Harris <paul.harris@consensys.net>
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>