-
Notifications
You must be signed in to change notification settings - Fork 240
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
Problem: no integration test for EIP-1559 feature #249
Conversation
Codecov Report
@@ Coverage Diff @@
## main #249 +/- ##
===========================================
+ Coverage 21.51% 41.06% +19.54%
===========================================
Files 27 30 +3
Lines 1729 1505 -224
===========================================
+ Hits 372 618 +246
+ Misses 1324 841 -483
- Partials 33 46 +13
|
4dc76b3
to
d89eb97
Compare
Closes: crypto-org-chain#245 Solution: - enable eip-1559 in integration test devnets - test dynamic fee tx and the fee calculation logic - test base fee adjustment lower initial base fee fix statesync test fix gravity test fix base fee adjustment
899eb73
to
8a34e92
Compare
integration_tests/test_basic.py
Outdated
@@ -69,7 +69,7 @@ def test_events(cluster, suspend_capture): | |||
def test_minimal_gas_price(cronos): | |||
w3 = cronos.w3 | |||
gas_price = w3.eth.gas_price | |||
assert gas_price == 5000000000000 | |||
# assert gas_price == 5000000000000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gas price is not fixed now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
specifying unit would be useful
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
specifying unit would be useful
this assertion is removed because gas_price result is not constant anymore.
@@ -12,6 +12,13 @@ in | |||
import sources.nixpkgs { | |||
overlays = [ | |||
(_: pkgs: dapptools) # use released version to hit the binary cache | |||
(_: pkgs: { | |||
go-ethereum = pkgs.callPackage ./go-ethereum.nix { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to replace to a newer version to test eip-1559 logic.
elasticity_multiplier = 2 | ||
gas_target = gas_limit // elasticity_multiplier | ||
|
||
delta = parent_fee * (gas_target - gas_used) // gas_target // change_denominator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some explanation for parent_fee?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I linked the eip-1559 spec, it's basically the same code as the spec.
@@ -137,6 +137,30 @@ def wait_for_ipc(path, timeout=40.0): | |||
) | |||
|
|||
|
|||
def w3_wait_for_block(w3, height, timeout=240): | |||
for i in range(timeout * 2): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why multiply with 2?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because it sleep 0.5
seconds, multiply the loop count with 2 make total time closer to timeout as seconds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Closes: #245
Solution:
👮🏻👮🏻👮🏻 !!!! REFERENCE THE PROBLEM YOUR ARE SOLVING IN THE PR TITLE AND DESCRIBE YOUR SOLUTION HERE !!!! DO NOT FORGET !!!! 👮🏻👮🏻👮🏻
PR Checklist:
make
)make test
)go fmt
)golangci-lint run
)go list -json -m all | nancy sleuth
)Thank you for your code, it's appreciated! :)