Skip to content
This repository has been archived by the owner on Jun 9, 2024. It is now read-only.

Commit

Permalink
fix(mempool): Prevent runTx failures (#1425)
Browse files Browse the repository at this point in the history
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced new configuration settings for miners, including
`ExtraData` and `GasFloor`.
  - Added transaction removal capabilities in the transaction pool.

- **Enhancements**
- Updated the EVMKeeper interface to support enhanced transaction pool
management.
- Improved transaction insertion logic to accommodate new caching
mechanisms.

- **Bug Fixes**
  - Fixed an issue with the RPC transaction fee cap configuration.

- **Build System**
- Included `pebbledb` support in build tags for enhanced database
functionality.

- **Refactor**
- Simplified configuration by removing the default configuration
function.
- Enhanced the transaction pool with direct embedding of Ethereum's
`TxPool` and new fields for better management.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Cal Bera <calbera@berachain.com>
  • Loading branch information
itsdevbear and calbera committed Jan 17, 2024
1 parent 5231214 commit 859c8d7
Show file tree
Hide file tree
Showing 81 changed files with 1,470 additions and 1,874 deletions.
2 changes: 1 addition & 1 deletion build/scripts/cosmos.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ TESTAPP_DIR = ./e2e/testapp
PROJECT_NAME = $(shell git remote get-url origin | xargs basename -s .git)

# process build tags
build_tags = netgo
build_tags = netgo pebbledb
ifeq ($(LEDGER_ENABLED),true)
ifeq ($(OS),Windows_NT)
GCCEXE = $(shell where gcc.exe 2> NUL)
Expand Down
6 changes: 4 additions & 2 deletions build/scripts/main.mk
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ format:
@$(MAKE) license-fix buf-lint-fix forge-lint-fix golangci-fix

lint:
@$(MAKE) license buf-lint forge-lint golangci gosec
@$(MAKE) license forge-lint golangci gosec


#################
Expand Down Expand Up @@ -370,7 +370,9 @@ protoDir := "proto"

buf-install:
@echo "--> Installing buf"
@go install github.com/bufbuild/buf/cmd/buf
@if [ "$(shell uname)" = "Darwin" ]; then \
brew install bufbuild/buf/buf; \
fi

buf-lint-fix:
@$(MAKE) buf-install
Expand Down
50 changes: 25 additions & 25 deletions build/tools/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,22 @@ module github.com/berachain/polaris/build/tools
go 1.21

require (
github.com/bufbuild/buf v1.26.1
github.com/bufbuild/buf v1.27.2
github.com/cosmos/gosec/v2 v2.0.0-20230124142343-bf28a33fadf2
github.com/ethereum/go-ethereum v1.13.10
github.com/golangci/golangci-lint v1.55.2
github.com/google/addlicense v1.1.1
github.com/matryer/moq v0.3.2
github.com/onsi/ginkgo/v2 v2.13.2
github.com/onsi/ginkgo/v2 v2.14.0
github.com/securego/gosec/v2 v2.18.2
github.com/vektra/mockery/v2 v2.34.1
)

require (
4d63.com/gocheckcompilerdirectives v1.2.1 // indirect
4d63.com/gochecknoglobals v0.2.1 // indirect
connectrpc.com/connect v1.12.0 // indirect
connectrpc.com/otelconnect v0.6.0 // indirect
github.com/4meepo/tagalign v1.3.3 // indirect
github.com/Abirdcfly/dupword v0.0.13 // indirect
github.com/Antonboom/errname v0.1.12 // indirect
Expand Down Expand Up @@ -48,9 +50,7 @@ require (
github.com/breml/bidichk v0.2.7 // indirect
github.com/breml/errchkjson v0.3.6 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect
github.com/bufbuild/connect-go v1.9.0 // indirect
github.com/bufbuild/connect-opentelemetry-go v0.4.0 // indirect
github.com/bufbuild/protocompile v0.6.0 // indirect
github.com/bufbuild/protocompile v0.6.1-0.20231108163138-146b831231f7 // indirect
github.com/butuzov/ireturn v0.2.2 // indirect
github.com/butuzov/mirror v1.1.0 // indirect
github.com/bytedance/sonic v1.10.0 // indirect
Expand All @@ -70,8 +70,8 @@ require (
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
github.com/consensys/bavard v0.1.13 // indirect
github.com/consensys/gnark-crypto v0.12.1 // indirect
github.com/containerd/stargz-snapshotter/estargz v0.14.3 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/containerd/stargz-snapshotter/estargz v0.15.1 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect
github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 // indirect
github.com/crate-crypto/go-kzg-4844 v0.7.0 // indirect
github.com/curioswitch/go-reassign v0.2.0 // indirect
Expand All @@ -81,8 +81,9 @@ require (
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
github.com/deepmap/oapi-codegen v1.13.4 // indirect
github.com/denis-tingaikin/go-header v0.4.3 // indirect
github.com/docker/cli v24.0.4+incompatible // indirect
github.com/docker/distribution v2.8.2+incompatible // indirect
github.com/distribution/reference v0.5.0 // indirect
github.com/docker/cli v24.0.7+incompatible // indirect
github.com/docker/distribution v2.8.3+incompatible // indirect
github.com/docker/docker v24.0.7+incompatible // indirect
github.com/docker/docker-credential-helpers v0.8.0 // indirect
github.com/docker/go-connections v0.4.0 // indirect
Expand Down Expand Up @@ -138,8 +139,8 @@ require (
github.com/golangci/revgrep v0.5.2 // indirect
github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/go-containerregistry v0.15.2 // indirect
github.com/google/pprof v0.0.0-20230901174712-0191c66da455 // indirect
github.com/google/go-containerregistry v0.16.1 // indirect
github.com/google/pprof v0.0.0-20231101202521-4ca4178f5c7a // indirect
github.com/google/uuid v1.4.0 // indirect
github.com/gookit/color v1.5.4 // indirect
github.com/gordonklaus/ineffassign v0.0.0-20230610083614-0e73809eb601 // indirect
Expand All @@ -165,9 +166,8 @@ require (
github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c // indirect
github.com/influxdata/line-protocol v0.0.0-20210311194329-9aa0e372d097 // indirect
github.com/jackpal/go-nat-pmp v1.0.2 // indirect
github.com/jdxcode/netrc v0.0.0-20221124155335-4616370d1a84 // indirect
github.com/jdx/go-netrc v1.0.0 // indirect
github.com/jgautheron/goconst v1.6.0 // indirect
github.com/jhump/protoreflect v1.15.3 // indirect
github.com/jingyugao/rowserrcheck v1.1.1 // indirect
github.com/jinzhu/copier v0.3.5 // indirect
github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af // indirect
Expand Down Expand Up @@ -218,7 +218,7 @@ require (
github.com/nunnatsa/ginkgolinter v0.14.1 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.0-rc4 // indirect
github.com/opencontainers/image-spec v1.1.0-rc5 // indirect
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/peterh/liner v1.2.2 // indirect
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect
Expand All @@ -236,7 +236,7 @@ require (
github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect
github.com/rivo/uniseg v0.4.4 // indirect
github.com/rogpeppe/go-internal v1.11.0 // indirect
github.com/rs/cors v1.9.0 // indirect
github.com/rs/cors v1.10.1 // indirect
github.com/rs/zerolog v1.31.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/ryancurrah/gomodguard v1.3.0 // indirect
Expand All @@ -254,7 +254,7 @@ require (
github.com/sourcegraph/go-diff v0.7.0 // indirect
github.com/spf13/afero v1.9.5 // indirect
github.com/spf13/cast v1.5.1 // indirect
github.com/spf13/cobra v1.7.0 // indirect
github.com/spf13/cobra v1.8.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.16.0 // indirect
Expand All @@ -269,7 +269,7 @@ require (
github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c // indirect
github.com/tdakkota/asciicheck v0.2.0 // indirect
github.com/tetafro/godot v1.4.15 // indirect
github.com/tetratelabs/wazero v1.3.1 // indirect
github.com/tetratelabs/wazero v1.5.0 // indirect
github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 // indirect
github.com/timonwong/loggercheck v0.9.4 // indirect
github.com/tklauser/go-sysconf v0.3.12 // indirect
Expand All @@ -285,7 +285,7 @@ require (
github.com/uudashr/gocognit v1.1.2 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.2 // indirect
github.com/vbatts/tar-split v0.11.3 // indirect
github.com/vbatts/tar-split v0.11.5 // indirect
github.com/xen0n/gosmopolitan v1.2.2 // indirect
github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 // indirect
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
Expand All @@ -295,14 +295,14 @@ require (
github.com/yusufpapurcu/wmi v1.2.3 // indirect
gitlab.com/bosi/decorder v0.4.1 // indirect
go-simpler.org/sloglint v0.1.2 // indirect
go.opentelemetry.io/otel v1.16.0 // indirect
go.opentelemetry.io/otel/metric v1.16.0 // indirect
go.opentelemetry.io/otel/sdk v1.16.0 // indirect
go.opentelemetry.io/otel/trace v1.16.0 // indirect
go.opentelemetry.io/otel v1.20.0 // indirect
go.opentelemetry.io/otel/metric v1.20.0 // indirect
go.opentelemetry.io/otel/sdk v1.20.0 // indirect
go.opentelemetry.io/otel/trace v1.20.0 // indirect
go.tmz.dev/musttag v0.7.2 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.24.0 // indirect
go.uber.org/zap v1.26.0 // indirect
golang.org/x/arch v0.4.0 // indirect
golang.org/x/crypto v0.17.0 // indirect
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect
Expand All @@ -314,8 +314,8 @@ require (
golang.org/x/term v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.15.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
golang.org/x/tools v0.16.1 // indirect
google.golang.org/protobuf v1.32.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
Expand Down

0 comments on commit 859c8d7

Please sign in to comment.