Skip to content
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

Hidden option to enforce maximum or minimum eth capability #4752

Conversation

Gabriel-Trintinalia
Copy link
Contributor

@Gabriel-Trintinalia Gabriel-Trintinalia commented Nov 30, 2022

PR description

Create hidden flags to enforce a range of Eth capabilities. With future versions of the protocol being implemented, we may need an easy way to compare capabilities without having to change the code every time. Another use case would be to downgrade your node if an issue was found with a later protocol version.

This PR implements:

  • Flag --Xeth-capability-max that enforces a maximum capability for the Eth protocol. Use: --Xeth-capability-max=67
  • Flag --Xeth-capability-min that enforces a minimum capability for the Eth protocol. Use: --Xeth-capability-min=65

Documentation

  • I thought about documentation and added the doc-change-required label to this PR if
    updates are required.

Changelog

@Gabriel-Trintinalia Gabriel-Trintinalia marked this pull request as ready for review November 30, 2022 05:11
Copy link
Contributor

@macfarla macfarla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it makes sense - another use case would be to downgrade your node if an issue was found with a later protocol version, right?

@Gabriel-Trintinalia
Copy link
Contributor Author

I think it makes sense - another use case would be to downgrade your node if an issue was found with a later protocol version, right?

That is another good example

@macfarla macfarla requested a review from matkt December 1, 2022 02:39
@Gabriel-Trintinalia Gabriel-Trintinalia marked this pull request as draft December 1, 2022 03:21
gfukushima and others added 24 commits December 8, 2022 14:32
* Replace deprecated method
* Ignore field

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Gabriel Trintinalia <gabriel.trintinalia@gmail.com>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Gabriel Trintinalia <gabriel.trintinalia@gmail.com>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Gabriel Trintinalia <gabriel.trintinalia@gmail.com>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Move mul from UInt256 wrapping to direct BigInteger math.

Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Gabriel Trintinalia <gabriel.trintinalia@gmail.com>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Gabriel Trintinalia <gabriel.trintinalia@gmail.com>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Gabriel Trintinalia <gabriel.trintinalia@gmail.com>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Gabriel Trintinalia <gabriel.trintinalia@gmail.com>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Gabriel Trintinalia <gabriel.trintinalia@gmail.com>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
…#4598)

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
The idea behind this commit is to preload asynchronously account nodes and storage nodes from the database during the transaction processing to use these nodes during the calculate root hash step.
We've created two caches, one for account nodes and one for storage nodes. The size of these caches is 100k for accounts and 200k for storage. We've tested other values but this configuration is the one that works better.
We also use exporter cache metrics as Prometheus metrics to check cache efficiency.

Signed-off-by: Karim TAAM <karim.t2am@gmail.com>

Co-authored-by: Ameziane H <ameziane.hamlat@consensys.net>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
* Add Shandong gas calculator to support EIP-3860

Signed-off-by: Diego López León <dieguitoll@gmail.com>
Signed-off-by: Diego López León <dieguitoll@gmail.com>

* add unit tests for Shandong gas calculator

Signed-off-by: lukelee-sl <luke.lee@swirldslabs.com>

Signed-off-by: Diego López León <dieguitoll@gmail.com>
Signed-off-by: Diego López León <dieguitoll@gmail.com>
Signed-off-by: lukelee-sl <luke.lee@swirldslabs.com>
Co-authored-by: lukelee-sl <luke.lee@swirldslabs.com>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
* Update version to 22.10.2-SNAPSHOT
* add download links

Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
…ledger#4751)

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>

Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
…te requests when debugging (hyperledger#4753)

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>

Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
…hyperledger#4757)

Signed-off-by: Justin Traglia <jtraglia@pm.me>

Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Diego López León <dieguitoll@gmail.com>
Signed-off-by: Diego López León <dieguitoll@gmail.com>

Signed-off-by: Diego López León <dieguitoll@gmail.com>
Signed-off-by: Diego López León <dieguitoll@gmail.com>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
…erledger#4767)

* Fix segfault on async operations on closed snapshot worldstate

Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
Co-authored-by: matkt <t2am.karim@gmail.com>
Co-authored-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
…edger#4771)

Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
garyschulte and others added 13 commits December 8, 2022 14:32
Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
* Update version to 22.10.3-SNAPSHOT

Signed-off-by: garyschulte <garyschulte@gmail.com>

* update changelog for 22.10.3

Signed-off-by: garyschulte <garyschulte@gmail.com>

Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
* Added max range CLI option for eth_getLogs. Default value: 1000.

Signed-off-by: mark-terry <mark.terry@consensys.net>
Signed-off-by: mark-terry <36909937+mark-terry@users.noreply.github.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
…ger#4775)

Signed-off-by: mark-terry <mark.terry@consensys.net>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
* emeritus

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Nicolas MASSART <NicolasMassart@users.noreply.github.com>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Gabriel Trintinalia <gabriel.trintinalia@gmail.com>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Increate the speed of ModExp gas calculations by using primitive types.
Use a native lib for modexp precompile.

Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>

* Native modexp

Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Jason Frame <jason.frame@consensys.net>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Gabriel Trintinalia <gabriel.trintinalia@gmail.com>

Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
@Gabriel-Trintinalia Gabriel-Trintinalia marked this pull request as ready for review December 8, 2022 04:21
@Gabriel-Trintinalia Gabriel-Trintinalia changed the title Hidden option to enforce an eth capability maximum Hidden option to enforce maximum or minimum eth capability Dec 8, 2022
@Gabriel-Trintinalia Gabriel-Trintinalia added the TeamRevenant GH issues worked on by Revenant Team label Dec 8, 2022
@Gabriel-Trintinalia Gabriel-Trintinalia enabled auto-merge (squash) December 8, 2022 04:25
@@ -78,6 +78,12 @@ public void start() {
LOG.info("Starting Network.");
setupHandlers();
network.start();

LOG.info(
"Max supported protocol: {}",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is logging all supported, not just max?

Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Copy link
Contributor

@macfarla macfarla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Gabriel-Trintinalia Gabriel-Trintinalia merged commit 72387a5 into hyperledger:main Dec 9, 2022
@Gabriel-Trintinalia Gabriel-Trintinalia deleted the hidden-flag-max-eth-capability branch December 11, 2022 10:57
ahamlat pushed a commit to ahamlat/besu that referenced this pull request Dec 18, 2022
…er#4752)

Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
macfarla pushed a commit to macfarla/besu that referenced this pull request Jan 10, 2023
…er#4752)

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
eum602 pushed a commit to lacchain/besu that referenced this pull request Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mainnet TeamRevenant GH issues worked on by Revenant Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.