-
Notifications
You must be signed in to change notification settings - Fork 839
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BESU-200] Xpruning-blocks-retained should accept an integer in the config. #440
Merged
AbdelStark
merged 2 commits into
hyperledger:master
from
AbdelStark:besu-200/pruning-blocks-retained-cli-option
Mar 3, 2020
Merged
[BESU-200] Xpruning-blocks-retained should accept an integer in the config. #440
AbdelStark
merged 2 commits into
hyperledger:master
from
AbdelStark:besu-200/pruning-blocks-retained-cli-option
Mar 3, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
AbdelStark
added
bug
Something isn't working
enhancement
New feature or request
doc-change-required
Indicates an issue or PR that requires doc to be updated
labels
Mar 3, 2020
…blocks-retained-cli-option Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
RatanRSur
approved these changes
Mar 3, 2020
AbdelStark
added a commit
to AbdelStark/besu
that referenced
this pull request
Mar 12, 2020
- hyperledger#430 - hyperledger#440 Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
Merged
AbdelStark
added a commit
that referenced
this pull request
Mar 12, 2020
AbdelStark
added a commit
that referenced
this pull request
Apr 2, 2020
* Added changelog entries for PR: - #430 - #440 Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * Add ExperimentalEIPs class to hold static CLI guard flags preventing users from accidentally enabling unwanted EIPs. Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * Remove unrelevant test Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
AbdelStark
added a commit
that referenced
this pull request
Apr 3, 2020
* Added changelog entries for PR: - #430 - #440 Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * ### Description BlockHeader object needs to be modified in order to add the new field (baseFee) as specified in the EIP. We should take care about the RLP encoding/decoding of this structure since it has to include or not the new fields depending on whether we are pre fork or post fork. - Update `core.BlockHeader.java` - Add `baseFee` - Update `readFrom` method for RLP decoding - Update `writeTo` method for RLP encoding - Update `plugin.data.BlockHeader.java` - Add `getBaseFee` method Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * TODO Add CLI command line flag `--Xeip1559-enabled`. Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * TODO Add CLI command line flag `--Xeip1559-enabled`. Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * Added unstable annotation for getBaseFee. Moved from long to `Optional<Long>` Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * Spotless apply Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * Fixed error Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * fix plugin API hash Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * RLP encoding / decoding operations are guarded with the feature flag. Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * spotless apply Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
AbdelStark
added a commit
that referenced
this pull request
Apr 3, 2020
* Added changelog entries for PR: - #430 - #440 Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * ### Description BlockHeader object needs to be modified in order to add the new field (baseFee) as specified in the EIP. We should take care about the RLP encoding/decoding of this structure since it has to include or not the new fields depending on whether we are pre fork or post fork. - Update `core.BlockHeader.java` - Add `baseFee` - Update `readFrom` method for RLP decoding - Update `writeTo` method for RLP encoding - Update `plugin.data.BlockHeader.java` - Add `getBaseFee` method Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * ### Description Transaction object needs to be modified in order to add the 2 new fields (`gasPremium` and `feeCap`) as specified in the EIP. We should take care about the RLP encoding/decoding of this structure since it has to include or not the new fields depending on whether we are pre fork or post fork. - Update core `Transaction` object - Add gasPremium and feeCap fields - Update readFrom method for RLP decoding - Update writeTo method for RLP encoding - Update plugin `Transaction` interface - Add `getGasPremium` and `getFeeCap` methods This EIP introduces gasPremium and feeCap fields in the transaction. They need to be included in the signing mechanism. Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * TODO Add CLI command line flag `--Xeip1559-enabled`. Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * Remove TODO Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * spotless apply Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * Merge step 0 and make EIP-1559 specific fields optional Add feature flag guard for RLP encoding / decoding of transactions Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * fix error Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * Address PR comments Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * update plugin api known hash Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
AbdelStark
added a commit
that referenced
this pull request
Apr 3, 2020
* Added changelog entries for PR: - #430 - #440 Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * ### Description BlockHeader object needs to be modified in order to add the new field (baseFee) as specified in the EIP. We should take care about the RLP encoding/decoding of this structure since it has to include or not the new fields depending on whether we are pre fork or post fork. - Update `core.BlockHeader.java` - Add `baseFee` - Update `readFrom` method for RLP decoding - Update `writeTo` method for RLP encoding - Update `plugin.data.BlockHeader.java` - Add `getBaseFee` method Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * ### Description Transaction object needs to be modified in order to add the 2 new fields (`gasPremium` and `feeCap`) as specified in the EIP. We should take care about the RLP encoding/decoding of this structure since it has to include or not the new fields depending on whether we are pre fork or post fork. - Update core `Transaction` object - Add gasPremium and feeCap fields - Update readFrom method for RLP decoding - Update writeTo method for RLP encoding - Update plugin `Transaction` interface - Add `getGasPremium` and `getFeeCap` methods This EIP introduces gasPremium and feeCap fields in the transaction. They need to be included in the signing mechanism. Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * We need a manager class to hold EIP-1559 core logic. This helper class will be then used by glue code. This separation make testing simpler. Specifically the following methods: - `long computeBaseFee(final long parentBaseFee, final long parentGasUsed)` - `boolean isValidBaseFee(final long parentBaseFee, final long baseFee)` - `long eip1559GasPool(final long blockNumber)` - `long legacyGasPool(final long blockNumber)` Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * spotlessApply Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * TODO Add CLI command line flag `--Xeip1559-enabled`. Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * update known hash Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * clean up Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * clean up Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * Address PR comments Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * Address PR comments Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * remove useless constructor Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * add spdx header Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
blockchain-trainer
pushed a commit
to blockchain-trainer/besu
that referenced
this pull request
Apr 6, 2020
…rledger#622) * Added changelog entries for PR: - hyperledger#430 - hyperledger#440 Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * ### Description BlockHeader object needs to be modified in order to add the new field (baseFee) as specified in the EIP. We should take care about the RLP encoding/decoding of this structure since it has to include or not the new fields depending on whether we are pre fork or post fork. - Update `core.BlockHeader.java` - Add `baseFee` - Update `readFrom` method for RLP decoding - Update `writeTo` method for RLP encoding - Update `plugin.data.BlockHeader.java` - Add `getBaseFee` method Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * ### Description Transaction object needs to be modified in order to add the 2 new fields (`gasPremium` and `feeCap`) as specified in the EIP. We should take care about the RLP encoding/decoding of this structure since it has to include or not the new fields depending on whether we are pre fork or post fork. - Update core `Transaction` object - Add gasPremium and feeCap fields - Update readFrom method for RLP decoding - Update writeTo method for RLP encoding - Update plugin `Transaction` interface - Add `getGasPremium` and `getFeeCap` methods This EIP introduces gasPremium and feeCap fields in the transaction. They need to be included in the signing mechanism. Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * We need a manager class to hold EIP-1559 core logic. This helper class will be then used by glue code. This separation make testing simpler. Specifically the following methods: - `long computeBaseFee(final long parentBaseFee, final long parentGasUsed)` - `boolean isValidBaseFee(final long parentBaseFee, final long baseFee)` - `long eip1559GasPool(final long blockNumber)` - `long legacyGasPool(final long blockNumber)` Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * spotlessApply Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * TODO Add CLI command line flag `--Xeip1559-enabled`. Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * update known hash Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * clean up Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * clean up Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * Address PR comments Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * Address PR comments Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * remove useless constructor Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * add spdx header Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> Signed-off-by: viraj <blockchaintrainer.in@gmail.com>
AbdelStark
added a commit
that referenced
this pull request
Apr 6, 2020
* Added changelog entries for PR: - #430 - #440 Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * Prepare EIP-1559 genesis field. The fork name is not known so for the moment we let eip1559 as a placeholder to update when the actual fork name is known. Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
AbdelStark
added a commit
that referenced
this pull request
Apr 9, 2020
…ules (#660) * Added changelog entries for PR: - #430 - #440 Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * Implement gas limit and gas price block header validation rules as per specified in EIP-1559 Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * guard with feature flag Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * address pr comments Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * address pr comments Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
AbdelStark
added a commit
that referenced
this pull request
Apr 9, 2020
* Added changelog entries for PR: - #430 - #440 Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * Implement gas limit and gas price block header validation rules as per specified in EIP-1559 Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * We should enforce the per transaction gas limit, as specified by the EIP, to 8,000,000 gas. Add a `TransactionInvalidReason` Update the `validate` method in `MainnetTransactionValidator` to enforce this check. Update the validation process in `MainnetBlockBodyValidator` to enforce this check for all transactions within a block. Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * fix unit test Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * Removed blockNumber from TransactionValidator.validate Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
AbdelStark
added a commit
that referenced
this pull request
Apr 10, 2020
…#694) * Added changelog entries for PR: - #430 - #440 Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * Check transaction format for send raw transaction Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * Address PR comments Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * Address PR comments Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * remove EthSendRawTransactionTest.blokchainQueries field Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
AbdelStark
added a commit
that referenced
this pull request
Apr 14, 2020
AbdelStark
added a commit
that referenced
this pull request
Apr 16, 2020
…pdate ProofOfWorkValidationRule (#722) * Added changelog entries for PR: - #430 - #440 Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * For post EIP-1559 blocks we must disable GasLimitRangeAndDeltaValidationRule. We must also update ProofOfWorkValidationRule to include base fee field in the hash computation. Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * Rename logger Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * Rename logger Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * Fix base fee computation and add tests. Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net> * Address PR comments Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
AbdelStark
added a commit
to AbdelStark/besu
that referenced
this pull request
Apr 20, 2020
- hyperledger#430 - hyperledger#440 Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
AbdelStark
added a commit
to AbdelStark/besu
that referenced
this pull request
Apr 23, 2020
- hyperledger#430 - hyperledger#440 Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
AbdelStark
added a commit
to AbdelStark/besu
that referenced
this pull request
Apr 23, 2020
- hyperledger#430 - hyperledger#440 Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
AbdelStark
added a commit
to AbdelStark/besu
that referenced
this pull request
Apr 24, 2020
- hyperledger#430 - hyperledger#440 Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
AbdelStark
added a commit
to AbdelStark/besu
that referenced
this pull request
Apr 27, 2020
- hyperledger#430 - hyperledger#440 Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
AbdelStark
added a commit
to AbdelStark/besu
that referenced
this pull request
Apr 28, 2020
- hyperledger#430 - hyperledger#440 Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
AbdelStark
added a commit
to AbdelStark/besu
that referenced
this pull request
Apr 29, 2020
- hyperledger#430 - hyperledger#440 Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
AbdelStark
added a commit
to AbdelStark/besu
that referenced
this pull request
Apr 30, 2020
- hyperledger#430 - hyperledger#440 Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
alexandratran
removed
the
doc-change-required
Indicates an issue or PR that requires doc to be updated
label
Mar 21, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR description
From the original description of the Jira ticket BESU-200, reporter @ajsutton :
When specifying the
Xpruning-blocks-retained
option via a config file,results in the error
TomlInvalidTypeException: Value of 'Xpruning-blocks-retained' is a integer while processing argument at or before arg[-1] '?' in [--config-file=/etc/besu/config.toml]: org.apache.tuweni.toml.TomlInvalidTypeException: Value of 'Xpruning-blocks-retained' is a integer
And you have to instead use:
Since the value is an integer it would be good if providing an integer worked. This would also be a useful option to make "official" instead of under the -X category. Ethereum 2 nodes need more than the default 1000 blocks of history so changing this configuration will become more common as ETH2 progresses.
Probability: Probable
Severity: Moderate
Changes
-X
unstable prefix for pruning options.--pruning-blocks-retained
and--pruning-block-confirmations
inBesuCommand
.PrunerOptions
class, directly use the pruning options as fields inBesuCommand
instead.long
toInteger
, this change enables to use the integer value in the config file.Documentation changes required
--pruning-blocks-retained
and--pruning-block-confirmations
options.Fixed Issue(s)
Fixes https://jira.hyperledger.org/browse/BESU-200
Signed-off-by: Abdelhamid Bakhta abdelhamid.bakhta@consensys.net