-
Notifications
You must be signed in to change notification settings - Fork 232
evm: rewrite eth_estimateGas for panic safety and performance #2424
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
Changes from 7 commits
0e63a3a
a19d1db
c0ebe60
c24babf
8968faa
5ef5c85
dd6db35
f0bf277
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| ## Changelog Chunk | ||
| * fix: bug with ineffectual assignment | ||
| * fix: add suggestion from Cursor bot | ||
| * fix(evm-e2e): newer assertion is more lenient | ||
| * fix(evm): use geth efficiency improvements and improved BinSearch with lo bias | ||
| * fix(evm): add panic safety to eth_estimateGas. Fix usage of incorrect SDB context in successive estimation calls. | ||
| * docs(bank): README fixes | ||
| * docs(bank): improve documentation and add section on Nibiru changes in [#2421](https://github.com/NibiruChain/nibiru/pull/2421) - ([172c008](https://github.com/NibiruChain/nibiru/commit/172c008068f8436081ee571f2fb7c01f607297f3)) by @Unique-Divine | ||
| * feat: add recursive check for nested authz exec messages and enforce … in [#2420](https://github.com/NibiruChain/nibiru/pull/2420) - ([3cdc810](https://github.com/NibiruChain/nibiru/commit/3cdc8107069c149bbfc538a6e3b7b0dd17b9cf2e)) by @expertdicer | ||
| * ci: simplify Go caching in CI to prevent file collisions in [#2419](https://github.com/NibiruChain/nibiru/pull/2419) - ([b1d1c22](https://github.com/NibiruChain/nibiru/commit/b1d1c22319eed8af11152b460fca6d9f54ad067a)) by @Unique-Divine | ||
| * fix(evmstate/test): stabilize trace tx tests with deterministic ERC20 transfer recipient in [#2418](https://github.com/NibiruChain/nibiru/pull/2418) - ([b47e3bd](https://github.com/NibiruChain/nibiru/commit/b47e3bd8ef89e01134fe3e3e0d60bea3e34c9561)) by @Unique-Divine | ||
| * feat: custom ante NewDeductFeeDecorator allowing 0 fee for zero gas actors in [#2415](https://github.com/NibiruChain/nibiru/pull/2415) - ([09e58ab](https://github.com/NibiruChain/nibiru/commit/09e58abd5a636b18303434aa1d5d0a526a7e65cb)) by @onikonychev | ||
| * ci: add back coverage reporting using gocovmerge; bring README more up to date in [#2416](https://github.com/NibiruChain/nibiru/pull/2416) - ([63257f0](https://github.com/NibiruChain/nibiru/commit/63257f0c749543478e8ce7be4aebec899d906f2e)) by @Unique-Divine | ||
| * refactor(upgrades): simplify upgrade hanlder code to use less abstractions and combine micro-packages in [#2413](https://github.com/NibiruChain/nibiru/pull/2413) - ([74cb33e](https://github.com/NibiruChain/nibiru/commit/74cb33eee6854cf55be26b26f5a85e6542625071)) by @Unique-Divine | ||
| * fix(evm-rpc): remove unsafe debug API methods. in [#2412](https://github.com/NibiruChain/nibiru/pull/2412) - ([e2a1ee8](https://github.com/NibiruChain/nibiru/commit/e2a1ee84e651dff9202ba25b0b7b54b64036697a)) by @Unique-Divine | ||
| * chore: v2.8.0 upgrade handler in [#2411](https://github.com/NibiruChain/nibiru/pull/2411) - ([9000cf3](https://github.com/NibiruChain/nibiru/commit/9000cf3a16797670769643e4feae4f9d07f38518)) by @onikonychev | ||
| * fix(evm-trace-block): handle native tracer errors JSON-RPC errors for "debug_traceBlockByNumber". Fixes [Nibiru#2400 bug](https://github.com/NibiruChain/nibiru/issues/2400) in [#2409](https://github.com/NibiruChain/nibiru/pull/2409) - ([e44cbc5](https://github.com/NibiruChain/nibiru/commit/e44cbc5c4e2f8be3a6756baf6aa5866ef642e63a)) by @Unique-Divine | ||
| * docs: merge PR from @yinwenyu6 . Comments only | ||
| * feat(evm/grpc-query): Update the "/eth.evm.v1.Query/Balance" query to work with "0x" Ethereum hex and "nibi"-prefixed Bech32 address formats in [#2410](https://github.com/NibiruChain/nibiru/pull/2410) - ([1bfc24d](https://github.com/NibiruChain/nibiru/commit/1bfc24d35401fccf120d1e82e1d184b57ca989d4)) by @Unique-Divine | ||
| * feat(proto): REST API doc generation for bank, auth, and txs in [#2394](https://github.com/NibiruChain/nibiru/pull/2394) - ([5dbb398](https://github.com/NibiruChain/nibiru/commit/5dbb3984e86a87c4d91c984c4fcd96d36cde25f5)) by @expertdicer | ||
| * feat(sudo-ante): implement zero gas actors for invoking whitelisted contract in [#2407](https://github.com/NibiruChain/nibiru/pull/2407) - ([6316bcd](https://github.com/NibiruChain/nibiru/commit/6316bcd66593dcf2dd370e7a1f0daf5d4fef3676)) by @Unique-Divine | ||
| * chore: added monad logo svg in [#2406](https://github.com/NibiruChain/nibiru/pull/2406) - ([90b951c](https://github.com/NibiruChain/nibiru/commit/90b951c43f7ad0c793d6b84bd6d087fc767bb190)) by @onikonychev | ||
| * chore: additional coin logos which could be used externally in [#2405](https://github.com/NibiruChain/nibiru/pull/2405) - ([6bb649b](https://github.com/NibiruChain/nibiru/commit/6bb649b7c3d3f73a985914e55772f04bbbbc07c6)) by @onikonychev | ||
| * feat(epic-evm): rearchitecture for StateDB safety, fix for consensus failures, performance improvements, consistent simulations, and nonce resolution for pending txs in the mempool in [#2397](https://github.com/NibiruChain/nibiru/pull/2397) - ([a252c9b](https://github.com/NibiruChain/nibiru/commit/a252c9bcdf37faa99e60fc59088e2867bd6c461f)) by @Unique-Divine | ||
| * chore: erc20 token registry new token: ynETHx in [#2395](https://github.com/NibiruChain/nibiru/pull/2395) - ([9219a94](https://github.com/NibiruChain/nibiru/commit/9219a94448940c1835106cb3d82dc61f50948234)) by @onikonychev | ||
| * feat(proto): impl script for gRPC Gateway REST doc generation in [#2391](https://github.com/NibiruChain/nibiru/pull/2391) - ([eb4b67e](https://github.com/NibiruChain/nibiru/commit/eb4b67ea858f889fb996cf2248c225d03a090b17)) by @Unique-Divine | ||
| * chore: erc20 token registry new tokens: cbBTC, uBTC in [#2388](https://github.com/NibiruChain/nibiru/pull/2388) - ([c1229d0](https://github.com/NibiruChain/nibiru/commit/c1229d0547ef743c156295218896acdeaa89c008)) by @onikonychev | ||
| * feat(evm): 63/64 gas clamp for ERC20 calls. Improved VM error surfacing. Add composite Chainlink-like oracle in [#2385](https://github.com/NibiruChain/nibiru/pull/2385) - ([2f7dbb5](https://github.com/NibiruChain/nibiru/commit/2f7dbb5060e35dab4128a203b63cae3ed1821105)) by @Unique-Divine | ||
| * feat(.github/pr-title-lint): Enable "/", capital letters, and "evm" prefix in pull request titles in [#2387](https://github.com/NibiruChain/nibiru/pull/2387) - ([4d1e13d](https://github.com/NibiruChain/nibiru/commit/4d1e13d2fbae61b1a7f3a6dd18515872c125f8df)) by @Unique-Divine | ||
| * feat(ai): start .cursorignore and Gemini code reviews in [#2386](https://github.com/NibiruChain/nibiru/pull/2386) - ([412abe7](https://github.com/NibiruChain/nibiru/commit/412abe7ceb0acf6e68211bf494106d2d8b498aab)) by @Unique-Divine | ||
|
|
||
| <!-- custom git-cliff template --> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| # git-cliff ~ configuration file | ||
| # https://git-cliff.org/docs/configuration | ||
|
|
||
| [remote.github] | ||
| owner = "NibiruChain" | ||
| repo = "nibiru" | ||
| # token = "" | ||
|
|
||
| [changelog] | ||
| # A Tera template to be rendered for each release in the changelog. | ||
| # See https://keats.github.io/tera/docs/#introduction | ||
| body = """ | ||
| ## Changelog Chunk {%- if version %}- {{ version }} {%- endif -%} | ||
|
|
||
| {%- if version %} in {{ version | trim_start_matches(pat="v") }}{%- endif -%} | ||
| {% for commit in commits %} | ||
| {% if commit.remote.pr_title -%} | ||
| {%- set commit_message = commit.remote.pr_title -%} | ||
| {%- else -%} | ||
| {%- set commit_message = commit.message -%} | ||
| {%- endif -%} | ||
| * {{ commit_message | split(pat="\n") | first | trim }}\ | ||
|
|
||
| {% if commit.remote.pr_number %} in \ | ||
| [#{{ commit.remote.pr_number }}]({{ self::remote_url() }}/pull/{{ commit.remote.pr_number }}) \ | ||
| - ([{{ commit.id | truncate(length=7, end="") }}]({{ self::remote_url() }}/commit/{{ commit.id }})) \ | ||
| {% if commit.remote.username %} by @{{ commit.remote.username }}{%- endif -%} | ||
| {%- endif %} | ||
| {%- endfor -%} | ||
|
|
||
| {% if version %} | ||
| {% if previous.version %} | ||
| **Full Changelog**: {{ self::remote_url() }}/compare/{{ previous.version }}...{{ version }} | ||
| {% endif %} | ||
| {% else -%} | ||
| {% raw %}\n{% endraw %} | ||
| {% endif %} | ||
|
|
||
| {%- macro remote_url() -%} | ||
| https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }} | ||
| {%- endmacro -%} | ||
| """ | ||
| # Remove leading and trailing whitespaces from the changelog's body. | ||
| trim = true | ||
| # A Tera template to be rendered as the changelog's footer. | ||
| # See https://keats.github.io/tera/docs/#introduction | ||
| footer = """ | ||
| <!-- custom git-cliff template --> | ||
| """ | ||
| # An array of regex based postprocessors to modify the changelog. | ||
| # Replace the placeholder `<REPO>` with a URL. | ||
| postprocessors = [] | ||
|
|
||
| [git] | ||
| # Parse commits according to the conventional commits specification. | ||
| # See https://www.conventionalcommits.org | ||
| conventional_commits = false | ||
| # Exclude commits that do not match the conventional commits specification. | ||
| filter_unconventional = true | ||
| # Split commits on newlines, treating each line as an individual commit. | ||
| split_commits = false | ||
| # An array of regex based parsers to modify commit messages prior to further processing. | ||
| commit_preprocessors = [{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "" }] | ||
| # Exclude commits that are not matched by any commit parser. | ||
| filter_commits = false | ||
| # Order releases topologically instead of chronologically. | ||
| topo_order = false | ||
| # Order of commits in each group/release within the changelog. | ||
| # Allowed values: newest, oldest | ||
| sort_commits = "newest" | ||
| # tag_pattern: Chooses which tags create their own sections. | ||
| tag_pattern = '^v\\d+\\.\\d+\\.\\d+$' # only vX.Y.Z count as releases |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -46,6 +46,26 @@ gen-embeds: | |
| go run "gen-abi/main.go" | ||
| log_success "Saved ABI JSON files to $embeds_dir/abi for npm publishing" | ||
|
|
||
| # Generates CHANGELOG-UNRELEASED.md based on commits and pull requests. | ||
| gen-changelog: | ||
| #!/usr/bin/env bash | ||
| source contrib/bashlib.sh | ||
| which_ok cargo | ||
| if ! which_ok git-cliff; then | ||
| echo "Installing git-cliff with cargo" | ||
| cargo install git-cliff | ||
| fi | ||
|
|
||
| which_ok git-cliff | ||
|
|
||
| LAST_VER="v2.7.0" | ||
| start_branch="$(git branch --show-current)" | ||
| git checkout main | ||
| git-cliff "$LAST_VER.." -o CHANGELOG-UNRELEASED.md | ||
| git checkout "$start_branch" | ||
|
Comment on lines
+63
to
+65
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add error handling for git checkout commands. The git checkout commands lack error handling. If Apply this diff to add error handling: - git checkout main
- git-cliff "$LAST_VER.." -o CHANGELOG-UNRELEASED.md
- git checkout "$start_branch"
+ git checkout main || { log_error "Failed to checkout main branch"; exit 1; }
+ git-cliff "$LAST_VER.." -o CHANGELOG-UNRELEASED.md || { log_error "git-cliff failed"; git checkout "$start_branch"; exit 1; }
+ git checkout "$start_branch" || { log_error "Failed to return to branch $start_branch"; exit 1; }
🤖 Prompt for AI Agents |
||
| log_success "Created CHANGELOG-UNRELEASED.md with changes since $LAST_VER" | ||
| git add CHANGELOG-UNRELEASED.md | ||
|
|
||
| # Generate the Nibiru Token Registry files | ||
| gen-token-registry: | ||
| go run token-registry/main/main.go | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.