Not all clients implement EIP-706, even though they may advertise a
version 5 in the hello packet. To cope with this if we are expecting
compression but haven't had a compressed message yet and a new message
fails to decompress we turn off compression and try again.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
* set gas used to zero for goQuorum private tx
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
Co-authored-by: mark-terry <36909937+mark-terry@users.noreply.github.com>
* Add revert reason to trace calls
* Add test for revert reason
* Updated to add revertReason field
Signed-off-by: David Mechler <david.mechler@consensys.net>
Besu and GoQuorum provide different information in the response from the admin_peers Json RPC.
This change adds just the "enode" field to the Besu response, to make the results more similar (but still different).
(ID field is the node's public key, whereas Geth sets this field to the keccak256 hash of the public key).
Signed-off-by: Trent Mohay <trent.mohay@consensys.net>
* Update Signature hash preimage
* Update json rpc to list fields for access list
* Update what is considered "raw" hash
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
QBFT no longer validates all fields of the block header (eg nonce mixhash), as these have no bearing on the
safety model of the protocol.
Signed-off-by: Trent Mohay <trent.mohay@consensys.net>
* added GoQuorumStoreRawPrivateTransaction that can send a payload to Tessera for storing
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
* fix nonce problem, remove not needed method on GoQuorumPrivateStorage, make receipts work as they work in GoQuorum
Signed-off-by: Stefan Pingel <stefan.pingel@consensys.net>
Add QBFT rpc methods and namespace. At the moment, they are copied verbatim from IBFT namespace and may change in future once specifications are finalized.
Signed-off-by: Usman Saleem <usman@usmans.info>
* fix consensus issue.
ensure that gas price is greater than base fee for frontier transactions
Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
* Enable Besu to import blocks containing quorum style private transactions
* Add RPC to accept quorum style raw private transactions
Signed-off-by: Stefan Pingel <stefan.pingel@consensys.net>
Signed-off-by: Lucas Saldanha <lucascrsaldanha@gmail.com>
Co-authored-by: Lucas Saldanha <lucascrsaldanha@gmail.com>
* Update peer validation
Change the location where peer validation is checked for height
estimates. Too early and all of peer discovery is stopped.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Add fields for `chainId`, `publicKey`, and `raw` to RPCs where detailed
transaction data is returned (`eth_getTransactionByBlockHash`,
`eth_getTransactionByBlockNumber`, `eth_getTransactionByHash`, and
`eth_getBlock` with certain parameters).
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
When calling `eth_call` by default account balances will be ignored when
executing the call. If the user wants the gas balance to be a
consideration in the call a new `strict` param in the call params can be
set to true, which will enforce the balance rules. This is the same
behavior as is observed in `eth_estimateGas`.
Addresses #502
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
When an eth_call results in a revert report the call as an error with
the revert reason in the response, like we do with eth_estimateGas.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Update Bonsai Tries persistence so they can calculate intermediate world
state for pre-byzantium transactions.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Don't send requests to peers that have not been fully validated (such as
validating the absence/presence of the DAO block). This has the intended
side effect that unvalidated peers don't report chain height to
prometheus monitoring. On occasion classic/mainnet peers would be
mid-validation when the sync status is requested and the wrong chain
will be reported as the height, typically classic heights erroneously reported
in a mainnet node.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
* #1733 - add support for eip-1898
Signed-off-by: David Mechler <david.mechler@consensys.net>
* #1733 - update changelog
Signed-off-by: David Mechler <david.mechler@consensys.net>
* #1733 - Fix merge issues
Signed-off-by: David Mechler <david.mechler@consensys.net>
* Updated code to handle block parameter as an object; added new tests
Signed-off-by: David Mechler <david.mechler@consensys.net>
* #1733 - Update to handle new block parameter; update tests accordingly
Signed-off-by: David Mechler <david.mechler@consensys.net>
* #1733 - Updates for PR comments
Signed-off-by: David Mechler <david.mechler@consensys.net>
* #1733 - fix broken test
Signed-off-by: David Mechler <david.mechler@consensys.net>
* Finish internal ConstantinopleFix->Petersburg transition, including
class names. Only backwards compatibility and retesteth use of the
name will remain.
* Remove four unused config fields from json configs. These are fields
with no code uses of any sort. All are implied by other fields.
eip150Hash, eip155Block, eip160Block, and daoForkSupport.
* Remove redundant fork block fields where their value is implied
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
intermediate values of the base fee can be higher than maximum value encoded by a long. Now using BigInteger to compute intermediate fee delta.
Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
Two updates to Bonsai Tries
* Log Rolling is implemented on top of the existing Persisted head. When
Besu is at chain head and the new best head makes the current head an
orphan branch, the Bonsai TrieLogs are used to roll back to a common
block and roll forward to the needed base block. Goerli is known to
maintain sync. There are still some issues with frontier era block
receipts.
* Non-mutable reads can be done off of the persisted block. These are
accurate for all reads that were performed in the block. If a read is
not known it proceeds through a fallback series of calls to prior
layers until it hits the persisted block. These layered reads are
driven off of the TrieLogs.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Two refactorings to make the next Bonsai PR less noisy.
Prefer WorldState when we used to ask for MutableWorldState.
Persist takes an optional block header instead of a block hash.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Bonsai tries will require storing state by block hash rather than by
state root. To accommodate both forest mode and bonsai mode all state
queries will pass in both the block hash and state root. This also
permits parallel forest/bonsai modes for private state with bonsai
public state.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Aspects of the consensus mechanism associated with block creation, and validation have been moved
from the IBFT package, into into consensus/common, such that they can be reused for the QBFT
implementation.
Signed-off-by: Trent Mohay <trent.mohay@consensys.net>