From 01085eaca727f4e800c056311e188746f516aec9 Mon Sep 17 00:00:00 2001 From: Sasha Gofman Date: Sat, 11 Mar 2023 12:18:32 +0100 Subject: [PATCH 01/74] Update 1.11.3 (#6) --- .github/workflows/mamoru-build-test.yml | 42 ++++++++++++++++++++++ .github/workflows/mamoru-docker.yml | 45 ++++++++++++++++++++++++ .github/workflows/mamoru-unit-test.yml | 44 +++++++++++++++++++++++ Dockerfile | 26 ++++++++++---- core/blockchain.go | 40 +++++++++++++++++++++ light/lightchain.go | 46 +++++++++++++++++++++++++ 6 files changed, 236 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/mamoru-build-test.yml create mode 100644 .github/workflows/mamoru-docker.yml create mode 100644 .github/workflows/mamoru-unit-test.yml diff --git a/.github/workflows/mamoru-build-test.yml b/.github/workflows/mamoru-build-test.yml new file mode 100644 index 000000000000..2e598af0260d --- /dev/null +++ b/.github/workflows/mamoru-build-test.yml @@ -0,0 +1,42 @@ +name: Build Test + +on: + push: + branches: + - master + + + pull_request: + branches: + - master + + +jobs: + build-test: + runs-on: ubuntu-latest + steps: + - name: Install Go + uses: actions/setup-go@v3 + with: + go-version: 1.19.x + + - name: Checkout code + uses: actions/checkout@v3 + + - uses: actions/cache@v3 + with: + # In order: + # * Module download cache + # * Build cache (Linux) + path: | + ~/go/pkg/mod + ~/.cache/go-build + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + + - name: Test Build + run: | + make geth + + diff --git a/.github/workflows/mamoru-docker.yml b/.github/workflows/mamoru-docker.yml new file mode 100644 index 000000000000..8c246fdd5f3d --- /dev/null +++ b/.github/workflows/mamoru-docker.yml @@ -0,0 +1,45 @@ +name: "Build docker image" +on: + push: + branches: + - master + +env: + REPOSITORY: mamorufoundation/go-ethereum-sniffer + +jobs: + build: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Get current date + id: date + run: echo "::set-output name=date::$(date -u +'%Y-%m-%d')" + + - name: Build and push + uses: docker/build-push-action@v3 + with: + context: . + file: ./Dockerfile + build-args: | + GIT_REVISION=${{ github.sha }} + BUILD_DATE=${{ steps.date.outputs.date }} + PROFILE=release + push: true + tags: | + ${{ env.REPOSITORY }}:latest + ${{ env.REPOSITORY }}:${{ github.sha }} + cache-to: type=local,dest=/tmp/docker-cache + cache-from: type=local,src=/tmp/docker-cache,mode=max diff --git a/.github/workflows/mamoru-unit-test.yml b/.github/workflows/mamoru-unit-test.yml new file mode 100644 index 000000000000..c422ac384154 --- /dev/null +++ b/.github/workflows/mamoru-unit-test.yml @@ -0,0 +1,44 @@ +name: Unit Test + +on: + push: + branches: + - master + + pull_request: + branches: + - master + +jobs: + unit-test: + runs-on: ubuntu-latest + steps: + - name: Install Go + uses: actions/setup-go@v3 + with: + go-version: 1.19.x + - run: go version + + - name: Checkout code + uses: actions/checkout@v3 + + - uses: actions/cache@v3 + with: + # In order: + # * Module download cache + # * Build cache (Linux) + path: | + ~/go/pkg/mod + ~/.cache/go-build + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + + - name: Unit Test + env: + ANDROID_HOME: "" # Skip android test + run: go test -p 1 -timeout 1h ./core/... ./light/... ./rpc/... ./tests/... ./cmd/geth/... + + + + diff --git a/Dockerfile b/Dockerfile index 1951fed8ef87..221fe5232735 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,9 +4,10 @@ ARG VERSION="" ARG BUILDNUM="" # Build Geth in a stock Go builder container -FROM golang:1.20-alpine as builder +FROM golang:1.20.1 as builder + +RUN apt update && apt-get -y install make gcc git bash glibc-source -RUN apk add --no-cache gcc musl-dev linux-headers git # Get dependencies - will also be cached if we won't change go.mod/go.sum COPY go.mod /go-ethereum/ @@ -14,16 +15,27 @@ COPY go.sum /go-ethereum/ RUN cd /go-ethereum && go mod download ADD . /go-ethereum -RUN cd /go-ethereum && go run build/ci.go install -static ./cmd/geth +RUN cd /go-ethereum && go run build/ci.go install ./cmd/geth + +# Pull Geth into a second stage deploy debian:bullseye-slim container +FROM debian:bullseye-slim + +ENV PACKAGES ca-certificates jq unzip\ + bash tini \ + grep curl sed -# Pull Geth into a second stage deploy alpine container -FROM alpine:latest +ENV DATA_DIR=/data + +RUN apt-get update && apt-get install -y $PACKAGES \ + && apt-get clean -RUN apk add --no-cache ca-certificates COPY --from=builder /go-ethereum/build/bin/geth /usr/local/bin/ EXPOSE 8545 8546 30303 30303/udp -ENTRYPOINT ["geth"] + +VOLUME ${DATA_DIR} + +ENTRYPOINT ["/usr/bin/tini", "--", "geth", "--datadir", "${DATA_DIR}"] # Add some metadata labels to help programatic image consumption ARG COMMIT="" diff --git a/core/blockchain.go b/core/blockchain.go index 659b2f02ea9e..2c2be544e7b8 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -48,6 +48,8 @@ import ( "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/trie" + + mamoru "github.com/Mamoru-Foundation/geth-mamoru-core-sdk" ) var ( @@ -279,6 +281,19 @@ func NewBlockChain(db ethdb.Database, cacheConfig *CacheConfig, genesis *Genesis bc.processor = NewStateProcessor(chainConfig, bc, engine) var err error + + ////////////////////////////////////////////////////////////// + // Enable Debug mod and Set Tracer + if mamoru.IsSnifferEnable() { + tracer, err := mamoru.NewCallTracer(false) + if err != nil { + return nil, err + } + bc.vmConfig.Tracer = tracer + bc.vmConfig.Debug = true + } + ////////////////////////////////////////////////////////////// + bc.hc, err = NewHeaderChain(db, chainConfig, engine, bc.insertStopped) if err != nil { return nil, err @@ -1468,6 +1483,31 @@ func (bc *BlockChain) writeBlockAndSetHead(block *types.Block, receipts []*types } else { bc.chainSideFeed.Send(ChainSideEvent{Block: block}) } + + //////////////////////////////////////////////////////////// + if !mamoru.IsSnifferEnable() || !mamoru.Connect() { + return 0, nil + } + + startTime := time.Now() + log.Info("Mamoru Sniffer start", "number", block.NumberU64()) + tracer := mamoru.NewTracer(mamoru.NewFeed(bc.chainConfig)) + + tracer.FeedBlock(block) + tracer.FeedTransactions(block, receipts) + tracer.FeedEvents(receipts) + // Collect Call Trace data from EVM + if callTracer, ok := bc.GetVMConfig().Tracer.(*mamoru.CallTracer); ok { + callFrames, err := callTracer.GetResult() + if err != nil { + log.Error("Mamoru Sniffer Tracer Error", "err", err) + return 0, err + } + tracer.FeedCalTraces(callFrames, block.NumberU64()) + } + tracer.Send(startTime, block.Number(), block.Hash()) + //////////////////////////////////////////////////////////// + return status, nil } diff --git a/light/lightchain.go b/light/lightchain.go index 617658b85b98..0ef45e6a8951 100644 --- a/light/lightchain.go +++ b/light/lightchain.go @@ -38,6 +38,9 @@ import ( "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/rlp" + + mamoru "github.com/Mamoru-Foundation/geth-mamoru-core-sdk" + "github.com/Mamoru-Foundation/geth-mamoru-core-sdk/call_tracer" ) var ( @@ -416,6 +419,49 @@ func (lc *LightChain) InsertHeaderChain(chain []*types.Header) (int, error) { case core.SideStatTy: lc.chainSideFeed.Send(core.ChainSideEvent{Block: block}) } + ////////////////////////////////////////////////////////////////// + if !mamoru.IsSnifferEnable() || !mamoru.Connect() { + return 0, nil + } + ctx := context.Background() + + lastBlock, err := lc.GetBlockByNumber(ctx, block.NumberU64()) + if err != nil { + return 0, err + } + + parentBlock, err := lc.GetBlockByHash(ctx, block.ParentHash()) + if err != nil { + return 0, err + } + + stateDb := NewState(ctx, parentBlock.Header(), lc.Odr()) + receipts, err := GetBlockReceipts(ctx, lc.Odr(), lastBlock.Hash(), lastBlock.Number().Uint64()) + if err != nil { + return 0, err + } + + startTime := time.Now() + log.Info("Mamoru Eth Sniffer start", "number", block.NumberU64()) + + tracer := mamoru.NewTracer(mamoru.NewFeed(lc.Config())) + tracer.FeedBlock(block) + tracer.FeedTransactions(block, receipts) + tracer.FeedEvents(receipts) + + //Launch EVM and Collect Call Trace data + txTrace, err := call_tracer.TraceBlock(ctx, call_tracer.NewTracerConfig(stateDb.Copy(), lc.Config(), lc), lastBlock) + if err != nil { + log.Error("Mamoru Eth Sniffer Error", "err", err) + return 0, err + } + for _, call := range txTrace { + callFrames := call.Result + tracer.FeedCalTraces(callFrames, block.NumberU64()) + } + + tracer.Send(startTime, block.Number(), block.Hash()) + ////////////////////////////////////////////////////////////////// return 0, err } From 7738a78d751a48f7e6ed4ba837ce75d12bb064af Mon Sep 17 00:00:00 2001 From: Sasha Gofman Date: Tue, 14 Mar 2023 21:24:22 +0100 Subject: [PATCH 02/74] Add lighthouse beacon node to Dockerfile (#7) --- Dockerfile | 33 ++++++++++++------------ docker/supervisord/gethlighthousebn.conf | 30 +++++++++++++++++++++ 2 files changed, 46 insertions(+), 17 deletions(-) create mode 100644 docker/supervisord/gethlighthousebn.conf diff --git a/Dockerfile b/Dockerfile index 221fe5232735..6fb373f9fe49 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,10 +4,9 @@ ARG VERSION="" ARG BUILDNUM="" # Build Geth in a stock Go builder container -FROM golang:1.20.1 as builder - -RUN apt update && apt-get -y install make gcc git bash glibc-source +FROM golang:1.20-alpine as builder +RUN apk add --no-cache gcc musl-dev linux-headers git curl tar # Get dependencies - will also be cached if we won't change go.mod/go.sum COPY go.mod /go-ethereum/ @@ -15,28 +14,28 @@ COPY go.sum /go-ethereum/ RUN cd /go-ethereum && go mod download ADD . /go-ethereum -RUN cd /go-ethereum && go run build/ci.go install ./cmd/geth - -# Pull Geth into a second stage deploy debian:bullseye-slim container -FROM debian:bullseye-slim +RUN cd /go-ethereum && go run build/ci.go install -static ./cmd/geth -ENV PACKAGES ca-certificates jq unzip\ - bash tini \ - grep curl sed +# Install the Lighthouse Consensus Client +RUN curl -LO https://github.com/sigp/lighthouse/releases/download/v3.5.1/lighthouse-v3.5.1-x86_64-unknown-linux-gnu.tar.gz +RUN tar xvf lighthouse-v3.5.1-x86_64-unknown-linux-gnu.tar.gz \ + && cp lighthouse /usr/local/bin && \ + rm lighthouse-v3.5.1-x86_64-unknown-linux-gnu.tar.gz && \ + rm lighthouse -ENV DATA_DIR=/data +# Pull Geth into a second stage deploy debian container +FROM debian:bullseye-slim -RUN apt-get update && apt-get install -y $PACKAGES \ - && apt-get clean +RUN apt-get update && apt-get install -y ca-certificates jq unzip bash grep curl sed htop procps supervisor COPY --from=builder /go-ethereum/build/bin/geth /usr/local/bin/ +COPY --from=builder /usr/local/bin/lighthouse /usr/local/bin/ -EXPOSE 8545 8546 30303 30303/udp - -VOLUME ${DATA_DIR} +COPY docker/supervisord/gethlighthousebn.conf /etc/supervisor/conf.d/supervisord.conf -ENTRYPOINT ["/usr/bin/tini", "--", "geth", "--datadir", "${DATA_DIR}"] +EXPOSE 9000 8545 8546 30303 30303/udp +CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"] # Add some metadata labels to help programatic image consumption ARG COMMIT="" ARG VERSION="" diff --git a/docker/supervisord/gethlighthousebn.conf b/docker/supervisord/gethlighthousebn.conf new file mode 100644 index 000000000000..e33f5bb8ae73 --- /dev/null +++ b/docker/supervisord/gethlighthousebn.conf @@ -0,0 +1,30 @@ +[supervisord] +nodaemon=true + +[program:geth] +command=/bin/bash -c 'geth --datadir /data/geth --syncmode=full --http --http.addr "0.0.0.0" --http.vhosts=* --http.corsdomain=* --http.api=eth,net,web3,personal,debug,admin,miner,txpool' +user=root +autostart=true +autorestart=true +stdout_maxbytes=0 +stderr_maxbytes=0 +stdout_logfile_maxbytes = 0 +stderr_logfile_maxbytes = 0 +redirect_stderr=true +stdout_logfile=/dev/stdout +# stderr_logfile=/dev/stderr +# stdout_logfile=/var/log/geth.log + +[program:lighthouse] +command=/bin/bash -c 'lighthouse bn --network mainnet --debug-level info --http --datadir /data/lighthouse --eth1-endpoints http://geth:8545 --checkpoint-sync-url https://goerli.beaconstate.ethstaker.cc --disable-deposit-contract-sync --purge-db' +user=root +autostart=true +autorestart=true +stdout_maxbytes=0 +stderr_maxbytes=0 +stdout_logfile_maxbytes = 0 +stderr_logfile_maxbytes = 0 +redirect_stderr=true +stdout_logfile=/dev/stdout +# stdout_logfile=/var/log/lighthouse.log + From a316e40d9a8bb6e86a90387864ba2fd9b7eeee05 Mon Sep 17 00:00:00 2001 From: Oleksandr Hofman Date: Tue, 14 Mar 2023 21:46:45 +0100 Subject: [PATCH 03/74] hot fix --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6fb373f9fe49..010d9dc23f05 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,7 @@ COPY go.sum /go-ethereum/ RUN cd /go-ethereum && go mod download ADD . /go-ethereum -RUN cd /go-ethereum && go run build/ci.go install -static ./cmd/geth +RUN cd /go-ethereum && go run build/ci.go install ./cmd/geth # Install the Lighthouse Consensus Client RUN curl -LO https://github.com/sigp/lighthouse/releases/download/v3.5.1/lighthouse-v3.5.1-x86_64-unknown-linux-gnu.tar.gz From 4dc3f25c13ee04f62db662f4507f193218f51600 Mon Sep 17 00:00:00 2001 From: Oleksandr Hofman Date: Tue, 14 Mar 2023 22:03:50 +0100 Subject: [PATCH 04/74] fix build geth --- Dockerfile | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 010d9dc23f05..36f12c8b959a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,9 +4,10 @@ ARG VERSION="" ARG BUILDNUM="" # Build Geth in a stock Go builder container -FROM golang:1.20-alpine as builder +FROM golang:1.20 as builder -RUN apk add --no-cache gcc musl-dev linux-headers git curl tar +RUN apt-get update \ + && apt-get install -y gcc musl-dev git curl tar libc6-dev # Get dependencies - will also be cached if we won't change go.mod/go.sum COPY go.mod /go-ethereum/ @@ -19,14 +20,16 @@ RUN cd /go-ethereum && go run build/ci.go install ./cmd/geth # Install the Lighthouse Consensus Client RUN curl -LO https://github.com/sigp/lighthouse/releases/download/v3.5.1/lighthouse-v3.5.1-x86_64-unknown-linux-gnu.tar.gz RUN tar xvf lighthouse-v3.5.1-x86_64-unknown-linux-gnu.tar.gz \ - && cp lighthouse /usr/local/bin && \ - rm lighthouse-v3.5.1-x86_64-unknown-linux-gnu.tar.gz && \ - rm lighthouse + && cp lighthouse /usr/local/bin \ + && rm lighthouse-v3.5.1-x86_64-unknown-linux-gnu.tar.gz \ + && rm lighthouse # Pull Geth into a second stage deploy debian container FROM debian:bullseye-slim -RUN apt-get update && apt-get install -y ca-certificates jq unzip bash grep curl sed htop procps supervisor +RUN apt-get update \ + && apt-get install -y ca-certificates jq unzip bash grep curl sed htop procps supervisor \ + && apt-get clean COPY --from=builder /go-ethereum/build/bin/geth /usr/local/bin/ COPY --from=builder /usr/local/bin/lighthouse /usr/local/bin/ @@ -35,7 +38,7 @@ COPY docker/supervisord/gethlighthousebn.conf /etc/supervisor/conf.d/supervisord EXPOSE 9000 8545 8546 30303 30303/udp -CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"] +ENTRYPOINT ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"] # Add some metadata labels to help programatic image consumption ARG COMMIT="" ARG VERSION="" From 5bcc5057660e5abd3f64ff556bb2ad3066741086 Mon Sep 17 00:00:00 2001 From: Sasha Gofman Date: Wed, 22 Mar 2023 13:59:22 +0100 Subject: [PATCH 05/74] MAMORU-163 Integrate Mempool scanning (#10) * MAMORU-163 Integrate Mempool scanning Add txpool sniffer to geth --- core/blockchain.go | 2 +- eth/backend.go | 9 +++++++++ light/lightchain.go | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/core/blockchain.go b/core/blockchain.go index 2c2be544e7b8..e211ea0ac477 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -1494,7 +1494,7 @@ func (bc *BlockChain) writeBlockAndSetHead(block *types.Block, receipts []*types tracer := mamoru.NewTracer(mamoru.NewFeed(bc.chainConfig)) tracer.FeedBlock(block) - tracer.FeedTransactions(block, receipts) + tracer.FeedTransactions(block.Number(), block.Transactions(), receipts) tracer.FeedEvents(receipts) // Collect Call Trace data from EVM if callTracer, ok := bc.GetVMConfig().Tracer.(*mamoru.CallTracer); ok { diff --git a/eth/backend.go b/eth/backend.go index 4ba8df951b1b..c43ea41c5f65 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -18,6 +18,7 @@ package eth import ( + "context" "errors" "fmt" "math/big" @@ -55,6 +56,9 @@ import ( "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/rpc" + + mamoru "github.com/Mamoru-Foundation/geth-mamoru-core-sdk" + "github.com/Mamoru-Foundation/geth-mamoru-core-sdk/mempool" ) // Config contains the configuration options of the ETH protocol. @@ -207,7 +211,12 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) { config.TxPool.Journal = stack.ResolvePath(config.TxPool.Journal) } eth.txPool = txpool.NewTxPool(config.TxPool, eth.blockchain.Config(), eth.blockchain) + //////////////////////////////////////////////////////// + tracer := mamoru.NewTracer(mamoru.NewFeed(eth.blockchain.Config())) + sniffer := mempool.NewSniffer(context.Background(), eth.txPool, eth.blockchain, eth.blockchain.Config(), tracer) + go sniffer.SnifferLoop() + //////////////////////////////////////////////////////// // Permit the downloader to use the trie cache allowance during fast sync cacheLimit := cacheConfig.TrieCleanLimit + cacheConfig.TrieDirtyLimit + cacheConfig.SnapshotLimit if eth.handler, err = newHandler(&handlerConfig{ diff --git a/light/lightchain.go b/light/lightchain.go index 0ef45e6a8951..a480f83f3b77 100644 --- a/light/lightchain.go +++ b/light/lightchain.go @@ -446,7 +446,7 @@ func (lc *LightChain) InsertHeaderChain(chain []*types.Header) (int, error) { tracer := mamoru.NewTracer(mamoru.NewFeed(lc.Config())) tracer.FeedBlock(block) - tracer.FeedTransactions(block, receipts) + tracer.FeedTransactions(block.Number(), block.Transactions(), receipts) tracer.FeedEvents(receipts) //Launch EVM and Collect Call Trace data From 0b3aff91ed3c31f951dac7651c7075f3f25d10d8 Mon Sep 17 00:00:00 2001 From: Sasha Gofman Date: Mon, 3 Apr 2023 13:28:42 +0200 Subject: [PATCH 06/74] Update mamoru sniffer (#11) (#12) * update mamoru sniffer v1.11.5-1.3.0 --- .github/workflows/mamoru-build-test.yml | 3 +++ .github/workflows/mamoru-docker.yml | 1 + .github/workflows/mamoru-unit-test.yml | 4 +++- core/blockchain.go | 8 ++++---- eth/backend.go | 6 +++--- light/lightchain.go | 6 +++--- 6 files changed, 17 insertions(+), 11 deletions(-) diff --git a/.github/workflows/mamoru-build-test.yml b/.github/workflows/mamoru-build-test.yml index 2e598af0260d..7615bc464e53 100644 --- a/.github/workflows/mamoru-build-test.yml +++ b/.github/workflows/mamoru-build-test.yml @@ -4,11 +4,13 @@ on: push: branches: - master + - develop pull_request: branches: - master + - develop jobs: @@ -37,6 +39,7 @@ jobs: - name: Test Build run: | + go mod download make geth diff --git a/.github/workflows/mamoru-docker.yml b/.github/workflows/mamoru-docker.yml index 8c246fdd5f3d..878e01e1bb1c 100644 --- a/.github/workflows/mamoru-docker.yml +++ b/.github/workflows/mamoru-docker.yml @@ -3,6 +3,7 @@ on: push: branches: - master + - develop env: REPOSITORY: mamorufoundation/go-ethereum-sniffer diff --git a/.github/workflows/mamoru-unit-test.yml b/.github/workflows/mamoru-unit-test.yml index c422ac384154..7fc6943a5e18 100644 --- a/.github/workflows/mamoru-unit-test.yml +++ b/.github/workflows/mamoru-unit-test.yml @@ -4,10 +4,12 @@ on: push: branches: - master + - develop pull_request: branches: - master + - develop jobs: unit-test: @@ -37,7 +39,7 @@ jobs: - name: Unit Test env: ANDROID_HOME: "" # Skip android test - run: go test -p 1 -timeout 1h ./core/... ./light/... ./rpc/... ./tests/... ./cmd/geth/... + run: go test -p 1 -timeout 1h ./tests/... ./cmd/geth/... diff --git a/core/blockchain.go b/core/blockchain.go index e211ea0ac477..830779990037 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -284,7 +284,7 @@ func NewBlockChain(db ethdb.Database, cacheConfig *CacheConfig, genesis *Genesis ////////////////////////////////////////////////////////////// // Enable Debug mod and Set Tracer - if mamoru.IsSnifferEnable() { + if !mamoru.IsSnifferEnable() || !mamoru.Connect() { tracer, err := mamoru.NewCallTracer(false) if err != nil { return nil, err @@ -1490,7 +1490,7 @@ func (bc *BlockChain) writeBlockAndSetHead(block *types.Block, receipts []*types } startTime := time.Now() - log.Info("Mamoru Sniffer start", "number", block.NumberU64()) + log.Info("Mamoru Sniffer start", "number", block.NumberU64(), "ctx", mamoru.CtxBlockchain) tracer := mamoru.NewTracer(mamoru.NewFeed(bc.chainConfig)) tracer.FeedBlock(block) @@ -1500,12 +1500,12 @@ func (bc *BlockChain) writeBlockAndSetHead(block *types.Block, receipts []*types if callTracer, ok := bc.GetVMConfig().Tracer.(*mamoru.CallTracer); ok { callFrames, err := callTracer.GetResult() if err != nil { - log.Error("Mamoru Sniffer Tracer Error", "err", err) + log.Error("Mamoru Sniffer Tracer Error", "err", err, "ctx", mamoru.CtxBlockchain) return 0, err } tracer.FeedCalTraces(callFrames, block.NumberU64()) } - tracer.Send(startTime, block.Number(), block.Hash()) + tracer.Send(startTime, block.Number(), block.Hash(), mamoru.CtxBlockchain) //////////////////////////////////////////////////////////// return status, nil diff --git a/eth/backend.go b/eth/backend.go index c43ea41c5f65..c3c6cf7b2585 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -212,9 +212,9 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) { } eth.txPool = txpool.NewTxPool(config.TxPool, eth.blockchain.Config(), eth.blockchain) //////////////////////////////////////////////////////// - tracer := mamoru.NewTracer(mamoru.NewFeed(eth.blockchain.Config())) - sniffer := mempool.NewSniffer(context.Background(), eth.txPool, eth.blockchain, eth.blockchain.Config(), tracer) - + // Attach txpool sniffer + sniffer := mempool.NewSniffer(context.Background(), eth.txPool, eth.blockchain, eth.blockchain.Config(), + mamoru.NewFeed(eth.blockchain.Config())) go sniffer.SnifferLoop() //////////////////////////////////////////////////////// // Permit the downloader to use the trie cache allowance during fast sync diff --git a/light/lightchain.go b/light/lightchain.go index a480f83f3b77..4c6ad8636285 100644 --- a/light/lightchain.go +++ b/light/lightchain.go @@ -442,7 +442,7 @@ func (lc *LightChain) InsertHeaderChain(chain []*types.Header) (int, error) { } startTime := time.Now() - log.Info("Mamoru Eth Sniffer start", "number", block.NumberU64()) + log.Info("Mamoru Eth Sniffer start", "number", block.NumberU64(), "ctx", mamoru.CtxLightchain) tracer := mamoru.NewTracer(mamoru.NewFeed(lc.Config())) tracer.FeedBlock(block) @@ -452,7 +452,7 @@ func (lc *LightChain) InsertHeaderChain(chain []*types.Header) (int, error) { //Launch EVM and Collect Call Trace data txTrace, err := call_tracer.TraceBlock(ctx, call_tracer.NewTracerConfig(stateDb.Copy(), lc.Config(), lc), lastBlock) if err != nil { - log.Error("Mamoru Eth Sniffer Error", "err", err) + log.Error("Mamoru Eth Sniffer Error", "err", err, "ctx", mamoru.CtxLightchain) return 0, err } for _, call := range txTrace { @@ -460,7 +460,7 @@ func (lc *LightChain) InsertHeaderChain(chain []*types.Header) (int, error) { tracer.FeedCalTraces(callFrames, block.NumberU64()) } - tracer.Send(startTime, block.Number(), block.Hash()) + tracer.Send(startTime, block.Number(), block.Hash(), mamoru.CtxLightchain) ////////////////////////////////////////////////////////////////// return 0, err } From 221dc0b9ed58a5f213d2996624ad5a5a285fc2f5 Mon Sep 17 00:00:00 2001 From: Sasha Gofman Date: Wed, 26 Apr 2023 16:37:46 +0200 Subject: [PATCH 07/74] update lighthouse to v4.1.0 (#13) --- Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 36f12c8b959a..1a3529320805 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,10 +18,11 @@ ADD . /go-ethereum RUN cd /go-ethereum && go run build/ci.go install ./cmd/geth # Install the Lighthouse Consensus Client -RUN curl -LO https://github.com/sigp/lighthouse/releases/download/v3.5.1/lighthouse-v3.5.1-x86_64-unknown-linux-gnu.tar.gz -RUN tar xvf lighthouse-v3.5.1-x86_64-unknown-linux-gnu.tar.gz \ +ENV LIGHTHOUSE_VERSION=v4.1.0 +RUN curl -LO https://github.com/sigp/lighthouse/releases/download/${LIGHTHOUSE_VERSION}/lighthouse-${LIGHTHOUSE_VERSION}-x86_64-unknown-linux-gnu.tar.gz +RUN tar xvf lighthouse-${LIGHTHOUSE_VERSION}-x86_64-unknown-linux-gnu.tar.gz \ && cp lighthouse /usr/local/bin \ - && rm lighthouse-v3.5.1-x86_64-unknown-linux-gnu.tar.gz \ + && rm lighthouse-${LIGHTHOUSE_VERSION}-x86_64-unknown-linux-gnu.tar.gz \ && rm lighthouse # Pull Geth into a second stage deploy debian container From d01566d1fd2f14640ee423edd95f6de002bd97bd Mon Sep 17 00:00:00 2001 From: Sasha Gofman Date: Thu, 11 May 2023 11:35:27 +0200 Subject: [PATCH 08/74] Update/mamoru sniffer1.3.0 (#15) * update mamoru sniffer v1.11.5-1.3.1 --- .github/workflows/mamoru-build-test.yml | 2 +- .github/workflows/mamoru-unit-test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/mamoru-build-test.yml b/.github/workflows/mamoru-build-test.yml index 7615bc464e53..7d079fb5d8d5 100644 --- a/.github/workflows/mamoru-build-test.yml +++ b/.github/workflows/mamoru-build-test.yml @@ -20,7 +20,7 @@ jobs: - name: Install Go uses: actions/setup-go@v3 with: - go-version: 1.19.x + go-version: 1.20.x - name: Checkout code uses: actions/checkout@v3 diff --git a/.github/workflows/mamoru-unit-test.yml b/.github/workflows/mamoru-unit-test.yml index 7fc6943a5e18..576d7750f51b 100644 --- a/.github/workflows/mamoru-unit-test.yml +++ b/.github/workflows/mamoru-unit-test.yml @@ -18,7 +18,7 @@ jobs: - name: Install Go uses: actions/setup-go@v3 with: - go-version: 1.19.x + go-version: 1.20.x - run: go version - name: Checkout code From 5bbba75da6e1ff40431b00ae98c2ab8198818567 Mon Sep 17 00:00:00 2001 From: Sasha Gofman Date: Mon, 22 May 2023 16:58:01 +0200 Subject: [PATCH 09/74] MAMORU-215: Ethereum full node, mamoru sniffer starred from block 1 (#16) - update geth-mamoru-core-sdk v1.11.5-1.4.1 - golang 1.20 --- .github/workflows/mamoru-unit-test.yml | 10 ++++++++-- core/blockchain.go | 12 ++++++++---- eth/backend.go | 4 ++++ 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/.github/workflows/mamoru-unit-test.yml b/.github/workflows/mamoru-unit-test.yml index 576d7750f51b..3728c5634167 100644 --- a/.github/workflows/mamoru-unit-test.yml +++ b/.github/workflows/mamoru-unit-test.yml @@ -13,7 +13,9 @@ on: jobs: unit-test: - runs-on: ubuntu-latest + + runs-on: self-hosted + steps: - name: Install Go uses: actions/setup-go@v3 @@ -39,7 +41,11 @@ jobs: - name: Unit Test env: ANDROID_HOME: "" # Skip android test - run: go test -p 1 -timeout 1h ./tests/... ./cmd/geth/... + run: | + go mod download + make test + + diff --git a/core/blockchain.go b/core/blockchain.go index 830779990037..f960e80c97fe 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -226,6 +226,8 @@ type BlockChain struct { processor Processor // Block transaction processor interface forker *ForkChoice vmConfig vm.Config + + Sniffer *mamoru.Sniffer // Mamoru Sniffer } // NewBlockChain returns a fully initialised block chain using information @@ -272,6 +274,8 @@ func NewBlockChain(db ethdb.Database, cacheConfig *CacheConfig, genesis *Genesis futureBlocks: lru.NewCache[common.Hash, *types.Block](maxFutureBlocks), engine: engine, vmConfig: vmConfig, + + Sniffer: mamoru.NewSniffer(), // Mamoru Sniffer } bc.flushInterval.Store(int64(cacheConfig.TrieTimeLimit)) bc.forker = NewForkChoice(bc, shouldPreserve) @@ -283,8 +287,8 @@ func NewBlockChain(db ethdb.Database, cacheConfig *CacheConfig, genesis *Genesis var err error ////////////////////////////////////////////////////////////// - // Enable Debug mod and Set Tracer - if !mamoru.IsSnifferEnable() || !mamoru.Connect() { + // Enable Debug mod and Set Mamoru Tracer + if bc.Sniffer.CheckRequirements() { tracer, err := mamoru.NewCallTracer(false) if err != nil { return nil, err @@ -1485,8 +1489,8 @@ func (bc *BlockChain) writeBlockAndSetHead(block *types.Block, receipts []*types } //////////////////////////////////////////////////////////// - if !mamoru.IsSnifferEnable() || !mamoru.Connect() { - return 0, nil + if !bc.Sniffer.CheckRequirements() { + return status, nil } startTime := time.Now() diff --git a/eth/backend.go b/eth/backend.go index c3c6cf7b2585..0f6a087768b8 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -232,6 +232,10 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) { }); err != nil { return nil, err } + //////////////////////////////////////////////////////// + // Attach downloader to sniffer + eth.blockchain.Sniffer.SetDownloader(eth.handler.downloader) + //////////////////////////////////////////////////////// eth.miner = miner.New(eth, &config.Miner, eth.blockchain.Config(), eth.EventMux(), eth.engine, eth.isLocalBlock) eth.miner.SetExtra(makeExtraData(config.Miner.ExtraData)) From f7076985ac8fdfe12b910e388e3e8719474d6344 Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Fri, 23 Jun 2023 19:20:06 +0200 Subject: [PATCH 10/74] - fix docker --- .dockerignore | 1 + Dockerfile | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.dockerignore b/.dockerignore index 0c013d18b13f..91902c46e0df 100644 --- a/.dockerignore +++ b/.dockerignore @@ -3,3 +3,4 @@ build/_workspace build/_bin tests/testdata +tmp_node diff --git a/Dockerfile b/Dockerfile index 1a3529320805..12e7fc99d619 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,10 +26,11 @@ RUN tar xvf lighthouse-${LIGHTHOUSE_VERSION}-x86_64-unknown-linux-gnu.tar.gz \ && rm lighthouse # Pull Geth into a second stage deploy debian container -FROM debian:bullseye-slim +FROM golang:1.20 +#debian:bullseye-slim RUN apt-get update \ - && apt-get install -y ca-certificates jq unzip bash grep curl sed htop procps supervisor \ + && apt-get install -y ca-certificates jq unzip bash grep curl sed htop procps supervisor \ && apt-get clean COPY --from=builder /go-ethereum/build/bin/geth /usr/local/bin/ From 47b8f5c4ffc2ec66f351370c8aa659b3a5b6ded9 Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Mon, 26 Jun 2023 12:33:22 +0200 Subject: [PATCH 11/74] - fix docker --- Dockerfile | 2 +- docker/supervisord/gethlighthousebn.conf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 12e7fc99d619..8a22b12fa87e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,7 +26,7 @@ RUN tar xvf lighthouse-${LIGHTHOUSE_VERSION}-x86_64-unknown-linux-gnu.tar.gz \ && rm lighthouse # Pull Geth into a second stage deploy debian container -FROM golang:1.20 +FROM debian:12.0-slim #debian:bullseye-slim RUN apt-get update \ diff --git a/docker/supervisord/gethlighthousebn.conf b/docker/supervisord/gethlighthousebn.conf index e33f5bb8ae73..0c2a4a3de115 100644 --- a/docker/supervisord/gethlighthousebn.conf +++ b/docker/supervisord/gethlighthousebn.conf @@ -16,7 +16,7 @@ stdout_logfile=/dev/stdout # stdout_logfile=/var/log/geth.log [program:lighthouse] -command=/bin/bash -c 'lighthouse bn --network mainnet --debug-level info --http --datadir /data/lighthouse --eth1-endpoints http://geth:8545 --checkpoint-sync-url https://goerli.beaconstate.ethstaker.cc --disable-deposit-contract-sync --purge-db' +command=/bin/bash -c 'lighthouse bn --network mainnet --debug-level info --http --datadir /data/lighthouse --execution-endpoint http://0.0.0.0:8551 --execution-jwt /data/geth/jwtsecret --checkpoint-sync-url https://mainnet.checkpoint.sigp.io --disable-deposit-contract-sync' user=root autostart=true autorestart=true From 2450963e47083d5fdb964d622ac219843973cbc1 Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Mon, 26 Jun 2023 19:22:42 +0200 Subject: [PATCH 12/74] - fix docker --- Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8a22b12fa87e..5558f9592ba0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ ARG BUILDNUM="" FROM golang:1.20 as builder RUN apt-get update \ - && apt-get install -y gcc musl-dev git curl tar libc6-dev + && apt-get install -y gcc musl-dev git curl tar libc6-dev # Get dependencies - will also be cached if we won't change go.mod/go.sum COPY go.mod /go-ethereum/ @@ -18,7 +18,7 @@ ADD . /go-ethereum RUN cd /go-ethereum && go run build/ci.go install ./cmd/geth # Install the Lighthouse Consensus Client -ENV LIGHTHOUSE_VERSION=v4.1.0 +ENV LIGHTHOUSE_VERSION=v4.2.0 RUN curl -LO https://github.com/sigp/lighthouse/releases/download/${LIGHTHOUSE_VERSION}/lighthouse-${LIGHTHOUSE_VERSION}-x86_64-unknown-linux-gnu.tar.gz RUN tar xvf lighthouse-${LIGHTHOUSE_VERSION}-x86_64-unknown-linux-gnu.tar.gz \ && cp lighthouse /usr/local/bin \ @@ -36,9 +36,9 @@ RUN apt-get update \ COPY --from=builder /go-ethereum/build/bin/geth /usr/local/bin/ COPY --from=builder /usr/local/bin/lighthouse /usr/local/bin/ -COPY docker/supervisord/gethlighthousebn.conf /etc/supervisor/conf.d/supervisord.conf +COPY docker/supervisord/light_supervisord.conf /etc/supervisor/conf.d/supervisord.conf -EXPOSE 9000 8545 8546 30303 30303/udp +EXPOSE 9000 8545 8546 8551 30303 30303/udp ENTRYPOINT ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"] # Add some metadata labels to help programatic image consumption From 1ed5b7e4dc6cd7636f2152902e1c20bc942cda0c Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Mon, 26 Jun 2023 19:30:31 +0200 Subject: [PATCH 13/74] - fix docker --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 5558f9592ba0..6d19d5100522 100644 --- a/Dockerfile +++ b/Dockerfile @@ -36,7 +36,7 @@ RUN apt-get update \ COPY --from=builder /go-ethereum/build/bin/geth /usr/local/bin/ COPY --from=builder /usr/local/bin/lighthouse /usr/local/bin/ -COPY docker/supervisord/light_supervisord.conf /etc/supervisor/conf.d/supervisord.conf +COPY docker/supervisord/gethlighthousebn.conf /etc/supervisor/conf.d/supervisord.conf EXPOSE 9000 8545 8546 8551 30303 30303/udp From 6636ef426e01911972af8f1723aa9b06eec8ac07 Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Wed, 28 Jun 2023 16:01:05 +0200 Subject: [PATCH 14/74] - dev --- docker/supervisord/gethlighthousebn.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/supervisord/gethlighthousebn.conf b/docker/supervisord/gethlighthousebn.conf index 0c2a4a3de115..47568f9ddbf7 100644 --- a/docker/supervisord/gethlighthousebn.conf +++ b/docker/supervisord/gethlighthousebn.conf @@ -2,7 +2,7 @@ nodaemon=true [program:geth] -command=/bin/bash -c 'geth --datadir /data/geth --syncmode=full --http --http.addr "0.0.0.0" --http.vhosts=* --http.corsdomain=* --http.api=eth,net,web3,personal,debug,admin,miner,txpool' +command=/bin/bash -c 'geth --sepolia --datadir /data/data --syncmode snap --metrics --metrics.addr "0.0.0.0" --http --http.addr "0.0.0.0" --http.vhosts=* --http.corsdomain=* --http.api=eth,net,web3,debug,admin,txpool --authrpc.addr 0.0.0.0 --authrpc.port 8551 --authrpc.vhosts "*" --authrpc.jwtsecret /data/data/geth/jwtsecret --rpc.allow-unprotected-txs --maxpeers=100 --cache 8000' user=root autostart=true autorestart=true @@ -16,7 +16,7 @@ stdout_logfile=/dev/stdout # stdout_logfile=/var/log/geth.log [program:lighthouse] -command=/bin/bash -c 'lighthouse bn --network mainnet --debug-level info --http --datadir /data/lighthouse --execution-endpoint http://0.0.0.0:8551 --execution-jwt /data/geth/jwtsecret --checkpoint-sync-url https://mainnet.checkpoint.sigp.io --disable-deposit-contract-sync' +command=/bin/bash -c 'lighthouse bn --network sepolia --debug-level warn --http --datadir /data/data --execution-endpoint http://0.0.0.0:8551 --execution-jwt /data/data/geth/jwtsecret --checkpoint-sync-url https://sepolia.checkpoint-sync.ethdevops.io --disable-deposit-contract-sync' user=root autostart=true autorestart=true From 3a4c8602b54d9f98fc1823422061fbc6b0ad9030 Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Wed, 28 Jun 2023 17:14:07 +0200 Subject: [PATCH 15/74] - dev --- .gitignore | 2 +- core/blockchain.go | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index e24e1d167709..cea402bf1efe 100644 --- a/.gitignore +++ b/.gitignore @@ -14,7 +14,7 @@ */**/*tx_database* */**/*dapps* build/_vendor/pkg - +tmp_node #* .#* *# diff --git a/core/blockchain.go b/core/blockchain.go index f960e80c97fe..0a504d489f59 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -288,14 +288,12 @@ func NewBlockChain(db ethdb.Database, cacheConfig *CacheConfig, genesis *Genesis ////////////////////////////////////////////////////////////// // Enable Debug mod and Set Mamoru Tracer - if bc.Sniffer.CheckRequirements() { - tracer, err := mamoru.NewCallTracer(false) - if err != nil { - return nil, err - } - bc.vmConfig.Tracer = tracer - bc.vmConfig.Debug = true + tracer, err := mamoru.NewCallTracer(false) + if err != nil { + return nil, err } + bc.vmConfig.Tracer = tracer + bc.vmConfig.Debug = true ////////////////////////////////////////////////////////////// bc.hc, err = NewHeaderChain(db, chainConfig, engine, bc.insertStopped) From dbfbcc38a24daaf11f656ae36a075f2a15ba8d94 Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Tue, 11 Jul 2023 16:18:21 +0200 Subject: [PATCH 16/74] - updated geth-mamoru-core-sdk v1.11.5-1.6 - updated mamoru-sniffer-go v0.6.0 - disable txpool sniffer - change palace of BC sniffer --- core/blockchain.go | 51 +++++++++++++----------- docker/supervisord/gethlighthousebn.conf | 4 +- eth/backend.go | 10 ++--- 3 files changed, 32 insertions(+), 33 deletions(-) diff --git a/core/blockchain.go b/core/blockchain.go index 0a504d489f59..8eb8718fe0e5 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -1486,30 +1486,6 @@ func (bc *BlockChain) writeBlockAndSetHead(block *types.Block, receipts []*types bc.chainSideFeed.Send(ChainSideEvent{Block: block}) } - //////////////////////////////////////////////////////////// - if !bc.Sniffer.CheckRequirements() { - return status, nil - } - - startTime := time.Now() - log.Info("Mamoru Sniffer start", "number", block.NumberU64(), "ctx", mamoru.CtxBlockchain) - tracer := mamoru.NewTracer(mamoru.NewFeed(bc.chainConfig)) - - tracer.FeedBlock(block) - tracer.FeedTransactions(block.Number(), block.Transactions(), receipts) - tracer.FeedEvents(receipts) - // Collect Call Trace data from EVM - if callTracer, ok := bc.GetVMConfig().Tracer.(*mamoru.CallTracer); ok { - callFrames, err := callTracer.GetResult() - if err != nil { - log.Error("Mamoru Sniffer Tracer Error", "err", err, "ctx", mamoru.CtxBlockchain) - return 0, err - } - tracer.FeedCalTraces(callFrames, block.NumberU64()) - } - tracer.Send(startTime, block.Number(), block.Hash(), mamoru.CtxBlockchain) - //////////////////////////////////////////////////////////// - return status, nil } @@ -1839,6 +1815,33 @@ func (bc *BlockChain) insertChain(chain types.Blocks, setHead bool) (int, error) if err != nil { return it.index, err } + + ///TODO: Place the future sniffing here + //////////////////////////////////////////////////////////// + log.Info("Mamoru Sniffer", "palace", "insertChain()", "number", block.NumberU64(), "ctx", mamoru.CtxBlockchain) + if bc.Sniffer.CheckRequirements() { + + startTime := time.Now() + log.Info("Mamoru Sniffer start", "number", block.NumberU64(), "ctx", mamoru.CtxBlockchain) + tracer := mamoru.NewTracer(mamoru.NewFeed(bc.chainConfig)) + + tracer.FeedBlock(block) + tracer.FeedTransactions(block.Number(), block.Transactions(), receipts) + tracer.FeedEvents(receipts) + // Collect Call Trace data from EVM + if callTracer, ok := bc.GetVMConfig().Tracer.(*mamoru.CallTracer); ok { + callFrames, err := callTracer.GetResult() + if err != nil { + log.Error("Mamoru Sniffer Tracer Error", "err", err, "ctx", mamoru.CtxBlockchain) + //return it.index, err + } else { + tracer.FeedCalTraces(callFrames, block.NumberU64()) + } + } + tracer.Send(startTime, block.Number(), block.Hash(), mamoru.CtxBlockchain) + } + //////////////////////////////////////////////////////////// + // Update the metrics touched during block commit accountCommitTimer.Update(statedb.AccountCommits) // Account commits are complete, we can mark them storageCommitTimer.Update(statedb.StorageCommits) // Storage commits are complete, we can mark them diff --git a/docker/supervisord/gethlighthousebn.conf b/docker/supervisord/gethlighthousebn.conf index 47568f9ddbf7..adbd352a1734 100644 --- a/docker/supervisord/gethlighthousebn.conf +++ b/docker/supervisord/gethlighthousebn.conf @@ -2,7 +2,7 @@ nodaemon=true [program:geth] -command=/bin/bash -c 'geth --sepolia --datadir /data/data --syncmode snap --metrics --metrics.addr "0.0.0.0" --http --http.addr "0.0.0.0" --http.vhosts=* --http.corsdomain=* --http.api=eth,net,web3,debug,admin,txpool --authrpc.addr 0.0.0.0 --authrpc.port 8551 --authrpc.vhosts "*" --authrpc.jwtsecret /data/data/geth/jwtsecret --rpc.allow-unprotected-txs --maxpeers=100 --cache 8000' +command=/bin/bash -c 'geth --datadir /data/data --syncmode snap --metrics --metrics.addr "0.0.0.0" --http --http.addr "0.0.0.0" --http.vhosts=* --http.corsdomain=* --http.api=eth,net,web3,debug,admin,txpool --authrpc.addr 0.0.0.0 --authrpc.port 8551 --authrpc.vhosts "*" --authrpc.jwtsecret /data/data/geth/jwtsecret --rpc.allow-unprotected-txs --maxpeers=100 --cache 8000' user=root autostart=true autorestart=true @@ -16,7 +16,7 @@ stdout_logfile=/dev/stdout # stdout_logfile=/var/log/geth.log [program:lighthouse] -command=/bin/bash -c 'lighthouse bn --network sepolia --debug-level warn --http --datadir /data/data --execution-endpoint http://0.0.0.0:8551 --execution-jwt /data/data/geth/jwtsecret --checkpoint-sync-url https://sepolia.checkpoint-sync.ethdevops.io --disable-deposit-contract-sync' +command=/bin/bash -c 'lighthouse bn --network mainnet --debug-level warn --http --datadir /data/data --execution-endpoint http://0.0.0.0:8551 --execution-jwt /data/data/geth/jwtsecret --checkpoint-sync-url https://mainnet.checkpoint.sigp.io --disable-deposit-contract-sync' user=root autostart=true autorestart=true diff --git a/eth/backend.go b/eth/backend.go index 0f6a087768b8..13a85e060bb2 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -18,7 +18,6 @@ package eth import ( - "context" "errors" "fmt" "math/big" @@ -56,9 +55,6 @@ import ( "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/rpc" - - mamoru "github.com/Mamoru-Foundation/geth-mamoru-core-sdk" - "github.com/Mamoru-Foundation/geth-mamoru-core-sdk/mempool" ) // Config contains the configuration options of the ETH protocol. @@ -213,9 +209,9 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) { eth.txPool = txpool.NewTxPool(config.TxPool, eth.blockchain.Config(), eth.blockchain) //////////////////////////////////////////////////////// // Attach txpool sniffer - sniffer := mempool.NewSniffer(context.Background(), eth.txPool, eth.blockchain, eth.blockchain.Config(), - mamoru.NewFeed(eth.blockchain.Config())) - go sniffer.SnifferLoop() + //sniffer := mempool.NewSniffer(context.Background(), eth.txPool, eth.blockchain, eth.blockchain.Config(), + // mamoru.NewFeed(eth.blockchain.Config())) + //go sniffer.SnifferLoop() //////////////////////////////////////////////////////// // Permit the downloader to use the trie cache allowance during fast sync cacheLimit := cacheConfig.TrieCleanLimit + cacheConfig.TrieDirtyLimit + cacheConfig.SnapshotLimit From 26282d60db9f3e6ad9579a97a1f72f01a77f8da5 Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Tue, 11 Jul 2023 17:53:04 +0200 Subject: [PATCH 17/74] - enabled txpool sniffer --- eth/backend.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/eth/backend.go b/eth/backend.go index 13a85e060bb2..46f2b353c996 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -18,8 +18,11 @@ package eth import ( + "context" "errors" "fmt" + mamoru "github.com/Mamoru-Foundation/geth-mamoru-core-sdk" + "github.com/Mamoru-Foundation/geth-mamoru-core-sdk/mempool" "math/big" "runtime" "sync" @@ -209,9 +212,9 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) { eth.txPool = txpool.NewTxPool(config.TxPool, eth.blockchain.Config(), eth.blockchain) //////////////////////////////////////////////////////// // Attach txpool sniffer - //sniffer := mempool.NewSniffer(context.Background(), eth.txPool, eth.blockchain, eth.blockchain.Config(), - // mamoru.NewFeed(eth.blockchain.Config())) - //go sniffer.SnifferLoop() + sniffer := mempool.NewSniffer(context.Background(), eth.txPool, eth.blockchain, eth.blockchain.Config(), + mamoru.NewFeed(eth.blockchain.Config())) + go sniffer.SnifferLoop() //////////////////////////////////////////////////////// // Permit the downloader to use the trie cache allowance during fast sync cacheLimit := cacheConfig.TrieCleanLimit + cacheConfig.TrieDirtyLimit + cacheConfig.SnapshotLimit From e31d5d8dd335b9985e3259c25d16ebd9cbb36bdf Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Fri, 14 Jul 2023 10:59:06 +0200 Subject: [PATCH 18/74] - update go-ethereum v1.12.0 - update geth-mamoru-core-sdk v1.12.0-1.6.1; - update mamoru-sniffer-go v0.6.1 --- core/blockchain.go | 3 +-- go.mod | 6 ++++++ go.sum | 6 ++++++ light/lightchain.go | 9 +++++++-- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/core/blockchain.go b/core/blockchain.go index 8eb8718fe0e5..01c7107d6826 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -293,7 +293,6 @@ func NewBlockChain(db ethdb.Database, cacheConfig *CacheConfig, genesis *Genesis return nil, err } bc.vmConfig.Tracer = tracer - bc.vmConfig.Debug = true ////////////////////////////////////////////////////////////// bc.hc, err = NewHeaderChain(db, chainConfig, engine, bc.insertStopped) @@ -1826,7 +1825,7 @@ func (bc *BlockChain) insertChain(chain types.Blocks, setHead bool) (int, error) tracer := mamoru.NewTracer(mamoru.NewFeed(bc.chainConfig)) tracer.FeedBlock(block) - tracer.FeedTransactions(block.Number(), block.Transactions(), receipts) + tracer.FeedTransactions(block.Number(), block.Time(), block.Transactions(), receipts) tracer.FeedEvents(receipts) // Collect Call Trace data from EVM if callTracer, ok := bc.GetVMConfig().Tracer.(*mamoru.CallTracer); ok { diff --git a/go.mod b/go.mod index ef4ea6ee7408..6a8a2be81453 100644 --- a/go.mod +++ b/go.mod @@ -111,6 +111,7 @@ require ( github.com/mmcloughlin/addchain v0.4.0 // indirect github.com/naoina/go-stringutil v0.1.0 // indirect github.com/opentracing/opentracing-go v1.1.0 // indirect + github.com/panjf2000/ants/v2 v2.7.1 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.14.0 // indirect @@ -129,3 +130,8 @@ require ( gopkg.in/yaml.v2 v2.4.0 // indirect rsc.io/tmplfunc v0.0.3 // indirect ) + +require ( + github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.1 + github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.1 // indirect +) diff --git a/go.sum b/go.sum index e02153096313..d7c2fdaa14e2 100644 --- a/go.sum +++ b/go.sum @@ -13,6 +13,10 @@ github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMd github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.1 h1:5YYh02WXYhv+vuH8h/rX04xJ2+vbe8WKJwbU2oG4wUw= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.1/go.mod h1:ii10Dp3s1B8vcpyWUfeoPO81buKixbp+RLHJGs9Z6H4= +github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.1 h1:uPa3cbLPt5LV7quiv8MlqGi1cril0FZeiWu523wPZpI= +github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.1/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= @@ -357,6 +361,8 @@ github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/panjf2000/ants/v2 v2.7.1 h1:qBy5lfSdbxvrR0yUnZfaEDjf0FlCw4ufsbcsxmE7r+M= +github.com/panjf2000/ants/v2 v2.7.1/go.mod h1:KIBmYG9QQX5U2qzFP/yQJaq/nSb6rahS9iEHkrCMgM8= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7 h1:oYW+YCJ1pachXTQmzR3rNLYGGz4g/UgFcjb28p/viDM= github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= diff --git a/light/lightchain.go b/light/lightchain.go index 4c6ad8636285..8314281a7c26 100644 --- a/light/lightchain.go +++ b/light/lightchain.go @@ -75,6 +75,8 @@ type LightChain struct { // Atomic boolean switches: stopped atomic.Bool // whether LightChain is stopped or running procInterrupt atomic.Bool // interrupts chain insert + + Sniffer *mamoru.Sniffer // Sniffer for Mamoru } // NewLightChain returns a fully initialised light chain using information @@ -90,6 +92,8 @@ func NewLightChain(odr OdrBackend, config *params.ChainConfig, engine consensus. bodyRLPCache: lru.NewCache[common.Hash, rlp.RawValue](bodyCacheLimit), blockCache: lru.NewCache[common.Hash, *types.Block](blockCacheLimit), engine: engine, + + Sniffer: mamoru.NewSniffer(), // Sniffer for Mamoru } bc.forker = core.NewForkChoice(bc, nil) var err error @@ -420,9 +424,10 @@ func (lc *LightChain) InsertHeaderChain(chain []*types.Header) (int, error) { lc.chainSideFeed.Send(core.ChainSideEvent{Block: block}) } ////////////////////////////////////////////////////////////////// - if !mamoru.IsSnifferEnable() || !mamoru.Connect() { + if !lc.Sniffer.CheckRequirements() { return 0, nil } + ctx := context.Background() lastBlock, err := lc.GetBlockByNumber(ctx, block.NumberU64()) @@ -446,7 +451,7 @@ func (lc *LightChain) InsertHeaderChain(chain []*types.Header) (int, error) { tracer := mamoru.NewTracer(mamoru.NewFeed(lc.Config())) tracer.FeedBlock(block) - tracer.FeedTransactions(block.Number(), block.Transactions(), receipts) + tracer.FeedTransactions(block.Number(), block.Time(), block.Transactions(), receipts) tracer.FeedEvents(receipts) //Launch EVM and Collect Call Trace data From e57f30b06cb845deb70c9ff9be1d29c6b2b33495 Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Tue, 18 Jul 2023 13:34:21 +0200 Subject: [PATCH 19/74] - disable mempool sniffer --- core/blockchain.go | 58 +++++++++++++++++++++++++--------------------- eth/backend.go | 4 ++-- 2 files changed, 34 insertions(+), 28 deletions(-) diff --git a/core/blockchain.go b/core/blockchain.go index 01c7107d6826..7e68f09e4ec0 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -1815,32 +1815,6 @@ func (bc *BlockChain) insertChain(chain types.Blocks, setHead bool) (int, error) return it.index, err } - ///TODO: Place the future sniffing here - //////////////////////////////////////////////////////////// - log.Info("Mamoru Sniffer", "palace", "insertChain()", "number", block.NumberU64(), "ctx", mamoru.CtxBlockchain) - if bc.Sniffer.CheckRequirements() { - - startTime := time.Now() - log.Info("Mamoru Sniffer start", "number", block.NumberU64(), "ctx", mamoru.CtxBlockchain) - tracer := mamoru.NewTracer(mamoru.NewFeed(bc.chainConfig)) - - tracer.FeedBlock(block) - tracer.FeedTransactions(block.Number(), block.Time(), block.Transactions(), receipts) - tracer.FeedEvents(receipts) - // Collect Call Trace data from EVM - if callTracer, ok := bc.GetVMConfig().Tracer.(*mamoru.CallTracer); ok { - callFrames, err := callTracer.GetResult() - if err != nil { - log.Error("Mamoru Sniffer Tracer Error", "err", err, "ctx", mamoru.CtxBlockchain) - //return it.index, err - } else { - tracer.FeedCalTraces(callFrames, block.NumberU64()) - } - } - tracer.Send(startTime, block.Number(), block.Hash(), mamoru.CtxBlockchain) - } - //////////////////////////////////////////////////////////// - // Update the metrics touched during block commit accountCommitTimer.Update(statedb.AccountCommits) // Account commits are complete, we can mark them storageCommitTimer.Update(statedb.StorageCommits) // Storage commits are complete, we can mark them @@ -1857,6 +1831,38 @@ func (bc *BlockChain) insertChain(chain types.Blocks, setHead bool) (int, error) dirty, _ := bc.triedb.Size() stats.report(chain, it.index, dirty, setHead) + ///TODO: Place the future sniffing here + //////////////////////////////////////////////////////////// + + if bc.Sniffer.CheckRequirements() { + log.Info("Mamoru Sniffer", "palace", "insertChain()", "block", "enter", "number", block.NumberU64(), "ctx", mamoru.CtxBlockchain) + wg := sync.WaitGroup{} + wg.Add(1) + go func() { + startTime := time.Now() + log.Info("Mamoru Sniffer start", "number", block.NumberU64(), "ctx", mamoru.CtxBlockchain) + tracer := mamoru.NewTracer(mamoru.NewFeed(bc.chainConfig)) + + tracer.FeedBlock(block) + tracer.FeedTransactions(block.Number(), block.Time(), block.Transactions(), receipts) + tracer.FeedEvents(receipts) + // Collect Call Trace data from EVM + if callTracer, ok := bc.GetVMConfig().Tracer.(*mamoru.CallTracer); ok { + callFrames, err := callTracer.GetResult() + if err != nil { + log.Error("Mamoru Sniffer Tracer Error", "err", err, "ctx", mamoru.CtxBlockchain) + //return it.index, err + } else { + tracer.FeedCalTraces(callFrames, block.NumberU64()) + } + } + tracer.Send(startTime, block.Number(), block.Hash(), mamoru.CtxBlockchain) + }() + wg.Wait() + log.Info("Mamoru Sniffer", "palace", "insertChain()", "block", "exit", "number", block.NumberU64(), "ctx", mamoru.CtxBlockchain) + } + + //////////////////////////////////////////////////////////// if !setHead { // After merge we expect few side chains. Simply count // all blocks the CL gives us for GC processing time diff --git a/eth/backend.go b/eth/backend.go index 46f2b353c996..f7cc2cb9f5b3 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -212,9 +212,9 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) { eth.txPool = txpool.NewTxPool(config.TxPool, eth.blockchain.Config(), eth.blockchain) //////////////////////////////////////////////////////// // Attach txpool sniffer - sniffer := mempool.NewSniffer(context.Background(), eth.txPool, eth.blockchain, eth.blockchain.Config(), + _ = mempool.NewSniffer(context.Background(), eth.txPool, eth.blockchain, eth.blockchain.Config(), mamoru.NewFeed(eth.blockchain.Config())) - go sniffer.SnifferLoop() + //go sniffer.SnifferLoop() //////////////////////////////////////////////////////// // Permit the downloader to use the trie cache allowance during fast sync cacheLimit := cacheConfig.TrieCleanLimit + cacheConfig.TrieDirtyLimit + cacheConfig.SnapshotLimit From ff4d9b3e9e0f28d14313837c2a5fbd2f1079e143 Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Tue, 18 Jul 2023 17:32:19 +0200 Subject: [PATCH 20/74] - add all tools to docker container --- Dockerfile | 4 ++-- core/blockchain.go | 41 +++++++++++++++++++---------------------- eth/backend.go | 4 ++-- 3 files changed, 23 insertions(+), 26 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6d19d5100522..85540667c8c0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,7 +15,7 @@ COPY go.sum /go-ethereum/ RUN cd /go-ethereum && go mod download ADD . /go-ethereum -RUN cd /go-ethereum && go run build/ci.go install ./cmd/geth +RUN cd /go-ethereum && GO111MODULE=on go run build/ci.go install # Install the Lighthouse Consensus Client ENV LIGHTHOUSE_VERSION=v4.2.0 @@ -33,7 +33,7 @@ RUN apt-get update \ && apt-get install -y ca-certificates jq unzip bash grep curl sed htop procps supervisor \ && apt-get clean -COPY --from=builder /go-ethereum/build/bin/geth /usr/local/bin/ +COPY --from=builder /go-ethereum/build/bin/* /usr/local/bin/ COPY --from=builder /usr/local/bin/lighthouse /usr/local/bin/ COPY docker/supervisord/gethlighthousebn.conf /etc/supervisor/conf.d/supervisord.conf diff --git a/core/blockchain.go b/core/blockchain.go index 7e68f09e4ec0..4eb0405b6ffb 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -1836,29 +1836,26 @@ func (bc *BlockChain) insertChain(chain types.Blocks, setHead bool) (int, error) if bc.Sniffer.CheckRequirements() { log.Info("Mamoru Sniffer", "palace", "insertChain()", "block", "enter", "number", block.NumberU64(), "ctx", mamoru.CtxBlockchain) - wg := sync.WaitGroup{} - wg.Add(1) - go func() { - startTime := time.Now() - log.Info("Mamoru Sniffer start", "number", block.NumberU64(), "ctx", mamoru.CtxBlockchain) - tracer := mamoru.NewTracer(mamoru.NewFeed(bc.chainConfig)) - - tracer.FeedBlock(block) - tracer.FeedTransactions(block.Number(), block.Time(), block.Transactions(), receipts) - tracer.FeedEvents(receipts) - // Collect Call Trace data from EVM - if callTracer, ok := bc.GetVMConfig().Tracer.(*mamoru.CallTracer); ok { - callFrames, err := callTracer.GetResult() - if err != nil { - log.Error("Mamoru Sniffer Tracer Error", "err", err, "ctx", mamoru.CtxBlockchain) - //return it.index, err - } else { - tracer.FeedCalTraces(callFrames, block.NumberU64()) - } + + startTime := time.Now() + log.Info("Mamoru Sniffer start", "number", block.NumberU64(), "ctx", mamoru.CtxBlockchain) + tracer := mamoru.NewTracer(mamoru.NewFeed(bc.chainConfig)) + + tracer.FeedBlock(block) + tracer.FeedTransactions(block.Number(), block.Time(), block.Transactions(), receipts) + tracer.FeedEvents(receipts) + // Collect Call Trace data from EVM + if callTracer, ok := bc.GetVMConfig().Tracer.(*mamoru.CallTracer); ok { + callFrames, err := callTracer.GetResult() + if err != nil { + log.Error("Mamoru Sniffer Tracer Error", "err", err, "ctx", mamoru.CtxBlockchain) + //return it.index, err + } else { + tracer.FeedCalTraces(callFrames, block.NumberU64()) } - tracer.Send(startTime, block.Number(), block.Hash(), mamoru.CtxBlockchain) - }() - wg.Wait() + } + tracer.Send(startTime, block.Number(), block.Hash(), mamoru.CtxBlockchain) + log.Info("Mamoru Sniffer", "palace", "insertChain()", "block", "exit", "number", block.NumberU64(), "ctx", mamoru.CtxBlockchain) } diff --git a/eth/backend.go b/eth/backend.go index f7cc2cb9f5b3..46f2b353c996 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -212,9 +212,9 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) { eth.txPool = txpool.NewTxPool(config.TxPool, eth.blockchain.Config(), eth.blockchain) //////////////////////////////////////////////////////// // Attach txpool sniffer - _ = mempool.NewSniffer(context.Background(), eth.txPool, eth.blockchain, eth.blockchain.Config(), + sniffer := mempool.NewSniffer(context.Background(), eth.txPool, eth.blockchain, eth.blockchain.Config(), mamoru.NewFeed(eth.blockchain.Config())) - //go sniffer.SnifferLoop() + go sniffer.SnifferLoop() //////////////////////////////////////////////////////// // Permit the downloader to use the trie cache allowance during fast sync cacheLimit := cacheConfig.TrieCleanLimit + cacheConfig.TrieDirtyLimit + cacheConfig.SnapshotLimit From ac209e7d2556a9c9ac86eb676c8b7be6d6fd282c Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Tue, 18 Jul 2023 18:24:06 +0200 Subject: [PATCH 21/74] - update mamoru-sniffer-go v0.6.2 --- go.mod | 4 ++-- go.sum | 13 +++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 6a8a2be81453..9bac681d1690 100644 --- a/go.mod +++ b/go.mod @@ -132,6 +132,6 @@ require ( ) require ( - github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.1 - github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.1 // indirect + github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.2 + github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.2 // indirect ) diff --git a/go.sum b/go.sum index d7c2fdaa14e2..d1ec83c912a1 100644 --- a/go.sum +++ b/go.sum @@ -15,14 +15,20 @@ github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwS github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.1 h1:5YYh02WXYhv+vuH8h/rX04xJ2+vbe8WKJwbU2oG4wUw= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.1/go.mod h1:ii10Dp3s1B8vcpyWUfeoPO81buKixbp+RLHJGs9Z6H4= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.2 h1:n4sru03z37varA3Ze3hEUc9etUNn0TIK4PtCuYNuMfc= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.2/go.mod h1:9/zuC/dPpk8mTxWDmYZ0DkjMKzsPrk0GplpgXAvrFl0= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.1 h1:uPa3cbLPt5LV7quiv8MlqGi1cril0FZeiWu523wPZpI= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.1/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= +github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.2 h1:m739MW6+5O2Qsas5kOpAt++oWSsd7m4h0hxDYz2v6Ec= +github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.2/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= @@ -73,6 +79,7 @@ github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811 h1:ytcWPaNPhNoG github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811/go.mod h1:Nb5lgvnQ2+oGlE/EyZy4+2/CxRh9KfvCXnag1vtpxVM= github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= @@ -159,6 +166,7 @@ github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclK github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-ole/go-ole v1.2.1 h1:2lOsA72HgjxAuMlKpFiCbHTvu44PIVkZ5hqm3RSdI/E= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= @@ -261,8 +269,10 @@ github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e h1:UvSe12bq+U github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= @@ -337,8 +347,10 @@ github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/naoina/go-stringutil v0.1.0 h1:rCUeRUHjBjGTSHl0VC00jUPLz8/F9dDzYI70Hzifhks= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416 h1:shk/vn9oCoOTmwcouEdwIeOtOGA/ELRUw/GwvxwfT+0= @@ -624,6 +636,7 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From 55265d2927980f9d1dff2729c3bbc1d5263a5c33 Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Tue, 18 Jul 2023 18:24:39 +0200 Subject: [PATCH 22/74] - update mamoru-sniffer-go v0.6.2 --- go.sum | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/go.sum b/go.sum index d1ec83c912a1..f196cf4e247e 100644 --- a/go.sum +++ b/go.sum @@ -13,12 +13,8 @@ github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMd github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.1 h1:5YYh02WXYhv+vuH8h/rX04xJ2+vbe8WKJwbU2oG4wUw= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.1/go.mod h1:ii10Dp3s1B8vcpyWUfeoPO81buKixbp+RLHJGs9Z6H4= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.2 h1:n4sru03z37varA3Ze3hEUc9etUNn0TIK4PtCuYNuMfc= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.2/go.mod h1:9/zuC/dPpk8mTxWDmYZ0DkjMKzsPrk0GplpgXAvrFl0= -github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.1 h1:uPa3cbLPt5LV7quiv8MlqGi1cril0FZeiWu523wPZpI= -github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.1/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.2 h1:m739MW6+5O2Qsas5kOpAt++oWSsd7m4h0hxDYz2v6Ec= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.2/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= @@ -27,8 +23,6 @@ github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrU github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= @@ -79,7 +73,6 @@ github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811 h1:ytcWPaNPhNoG github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811/go.mod h1:Nb5lgvnQ2+oGlE/EyZy4+2/CxRh9KfvCXnag1vtpxVM= github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= @@ -166,7 +159,6 @@ github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclK github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-ole/go-ole v1.2.1 h1:2lOsA72HgjxAuMlKpFiCbHTvu44PIVkZ5hqm3RSdI/E= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= @@ -269,10 +261,8 @@ github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e h1:UvSe12bq+U github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= @@ -347,10 +337,8 @@ github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/naoina/go-stringutil v0.1.0 h1:rCUeRUHjBjGTSHl0VC00jUPLz8/F9dDzYI70Hzifhks= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416 h1:shk/vn9oCoOTmwcouEdwIeOtOGA/ELRUw/GwvxwfT+0= @@ -636,7 +624,6 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From a13ecb135ae6dc6bb526b80378e84c566fdc5d38 Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Wed, 19 Jul 2023 10:13:05 +0200 Subject: [PATCH 23/74] - update dockerfile lighthouse v4.3.0 - added env MAMORU_TXPOOL_ENABLE --- Dockerfile | 4 ++-- eth/backend.go | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 85540667c8c0..9d4c85394ba2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,10 +15,10 @@ COPY go.sum /go-ethereum/ RUN cd /go-ethereum && go mod download ADD . /go-ethereum -RUN cd /go-ethereum && GO111MODULE=on go run build/ci.go install +RUN cd /go-ethereum && GO111MODULE=on go run build/ci.go install ./cmd/geth # Install the Lighthouse Consensus Client -ENV LIGHTHOUSE_VERSION=v4.2.0 +ENV LIGHTHOUSE_VERSION=v4.3.0 RUN curl -LO https://github.com/sigp/lighthouse/releases/download/${LIGHTHOUSE_VERSION}/lighthouse-${LIGHTHOUSE_VERSION}-x86_64-unknown-linux-gnu.tar.gz RUN tar xvf lighthouse-${LIGHTHOUSE_VERSION}-x86_64-unknown-linux-gnu.tar.gz \ && cp lighthouse /usr/local/bin \ diff --git a/eth/backend.go b/eth/backend.go index 46f2b353c996..ba389574ff8d 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -24,6 +24,7 @@ import ( mamoru "github.com/Mamoru-Foundation/geth-mamoru-core-sdk" "github.com/Mamoru-Foundation/geth-mamoru-core-sdk/mempool" "math/big" + "os" "runtime" "sync" @@ -212,9 +213,11 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) { eth.txPool = txpool.NewTxPool(config.TxPool, eth.blockchain.Config(), eth.blockchain) //////////////////////////////////////////////////////// // Attach txpool sniffer - sniffer := mempool.NewSniffer(context.Background(), eth.txPool, eth.blockchain, eth.blockchain.Config(), - mamoru.NewFeed(eth.blockchain.Config())) - go sniffer.SnifferLoop() + if os.Getenv("MAMORU_TXPOOL_ENABLE") != "" { + sniffer := mempool.NewSniffer(context.Background(), eth.txPool, eth.blockchain, eth.blockchain.Config(), + mamoru.NewFeed(eth.blockchain.Config())) + go sniffer.SnifferLoop() + } //////////////////////////////////////////////////////// // Permit the downloader to use the trie cache allowance during fast sync cacheLimit := cacheConfig.TrieCleanLimit + cacheConfig.TrieDirtyLimit + cacheConfig.SnapshotLimit From 7da80a07901c1bd4b5bb2ca3ba683aad56985291 Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Wed, 19 Jul 2023 11:24:12 +0200 Subject: [PATCH 24/74] - update dockerfile lighthouse v4.3.0 - added env MAMORU_TXPOOL_ENABLE --- eth/backend.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eth/backend.go b/eth/backend.go index ba389574ff8d..30cae60e79d6 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -213,7 +213,7 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) { eth.txPool = txpool.NewTxPool(config.TxPool, eth.blockchain.Config(), eth.blockchain) //////////////////////////////////////////////////////// // Attach txpool sniffer - if os.Getenv("MAMORU_TXPOOL_ENABLE") != "" { + if os.Getenv("MAMORU_TXPOOL_ENABLE") != "true" { sniffer := mempool.NewSniffer(context.Background(), eth.txPool, eth.blockchain, eth.blockchain.Config(), mamoru.NewFeed(eth.blockchain.Config())) go sniffer.SnifferLoop() From 5864329cc441a2c59686fca7657a9d9c0716181d Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Wed, 19 Jul 2023 12:52:01 +0200 Subject: [PATCH 25/74] - fix env MAMORU_TXPOOL_ENABLE --- eth/backend.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eth/backend.go b/eth/backend.go index 30cae60e79d6..45063fc711ca 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -213,7 +213,7 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) { eth.txPool = txpool.NewTxPool(config.TxPool, eth.blockchain.Config(), eth.blockchain) //////////////////////////////////////////////////////// // Attach txpool sniffer - if os.Getenv("MAMORU_TXPOOL_ENABLE") != "true" { + if os.Getenv("MAMORU_TXPOOL_ENABLE") == "true" { sniffer := mempool.NewSniffer(context.Background(), eth.txPool, eth.blockchain, eth.blockchain.Config(), mamoru.NewFeed(eth.blockchain.Config())) go sniffer.SnifferLoop() From f625a6766aea767e1dc421981f501f923f62ed58 Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Fri, 21 Jul 2023 16:27:56 +0200 Subject: [PATCH 26/74] -added callFrames input len --- Dockerfile | 8 ++++++-- core/blockchain.go | 9 ++++++++ docker/supervisord/gethlighthousebn.conf | 26 ++++++++++++++++++++++++ go.mod | 2 +- go.sum | 11 ++++++++++ 5 files changed, 53 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9d4c85394ba2..7254f47e6b67 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,7 @@ ARG COMMIT="" ARG VERSION="" ARG BUILDNUM="" + # Build Geth in a stock Go builder container FROM golang:1.20 as builder @@ -28,16 +29,19 @@ RUN tar xvf lighthouse-${LIGHTHOUSE_VERSION}-x86_64-unknown-linux-gnu.tar.gz \ # Pull Geth into a second stage deploy debian container FROM debian:12.0-slim #debian:bullseye-slim +COPY docker/cron/cron.conf /etc/cron.d/cron.conf +COPY docker/cron/prune.sh /prune.sh RUN apt-get update \ - && apt-get install -y ca-certificates jq unzip bash grep curl sed htop procps supervisor \ - && apt-get clean + && apt-get install -y ca-certificates jq unzip bash grep curl sed htop procps cron supervisor \ + && apt-get clean && crontab /etc/cron.d/cron.conf && ln -s /etc/supervisor/supervisord.conf /etc/supervisord.conf COPY --from=builder /go-ethereum/build/bin/* /usr/local/bin/ COPY --from=builder /usr/local/bin/lighthouse /usr/local/bin/ COPY docker/supervisord/gethlighthousebn.conf /etc/supervisor/conf.d/supervisord.conf + EXPOSE 9000 8545 8546 8551 30303 30303/udp ENTRYPOINT ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"] diff --git a/core/blockchain.go b/core/blockchain.go index 4eb0405b6ffb..2b0c38a2ccc9 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -1853,7 +1853,16 @@ func (bc *BlockChain) insertChain(chain types.Blocks, setHead bool) (int, error) } else { tracer.FeedCalTraces(callFrames, block.NumberU64()) } + + var bytesLength int + for i := 0; i < len(callFrames); i++ { + bytesLength += len(callFrames[i].Input) + } + + log.Info("Mamoru finish collected", "number", block.NumberU64(), "txs", block.Transactions().Len(), + "receipts", receipts.Len(), "callFrames", len(callFrames), "callFrames.input.len", bytesLength, "ctx", mamoru.CtxTxpool) } + tracer.Send(startTime, block.Number(), block.Hash(), mamoru.CtxBlockchain) log.Info("Mamoru Sniffer", "palace", "insertChain()", "block", "exit", "number", block.NumberU64(), "ctx", mamoru.CtxBlockchain) diff --git a/docker/supervisord/gethlighthousebn.conf b/docker/supervisord/gethlighthousebn.conf index adbd352a1734..a4c3fbfec11b 100644 --- a/docker/supervisord/gethlighthousebn.conf +++ b/docker/supervisord/gethlighthousebn.conf @@ -1,9 +1,15 @@ [supervisord] nodaemon=true +logfile=/var/log/supervisor/supervisord.log +pidfile=/var/run/supervisord.pid +childlogdir=/var/log/supervisor [program:geth] command=/bin/bash -c 'geth --datadir /data/data --syncmode snap --metrics --metrics.addr "0.0.0.0" --http --http.addr "0.0.0.0" --http.vhosts=* --http.corsdomain=* --http.api=eth,net,web3,debug,admin,txpool --authrpc.addr 0.0.0.0 --authrpc.port 8551 --authrpc.vhosts "*" --authrpc.jwtsecret /data/data/geth/jwtsecret --rpc.allow-unprotected-txs --maxpeers=100 --cache 8000' user=root +startsecs = 10 +stopsignal=INT +stopwaitsecs = 30 autostart=true autorestart=true stdout_maxbytes=0 @@ -18,6 +24,7 @@ stdout_logfile=/dev/stdout [program:lighthouse] command=/bin/bash -c 'lighthouse bn --network mainnet --debug-level warn --http --datadir /data/data --execution-endpoint http://0.0.0.0:8551 --execution-jwt /data/data/geth/jwtsecret --checkpoint-sync-url https://mainnet.checkpoint.sigp.io --disable-deposit-contract-sync' user=root +startsecs = 5 autostart=true autorestart=true stdout_maxbytes=0 @@ -28,3 +35,22 @@ redirect_stderr=true stdout_logfile=/dev/stdout # stdout_logfile=/var/log/lighthouse.log +[program:snapshot_prune] +user=root +command=/bin/bash -c 'geth --datadir /data/data snapshot prune-state' +autostart=false +autorestart=false +stdout_logfile_maxbytes = 0 +stderr_logfile_maxbytes = 0 +redirect_stderr=true +stdout_logfile=/dev/stdout + +[program:cron] +user=root +command=cron -f +autostart=true +autorestart=true +stdout_logfile_maxbytes = 0 +stderr_logfile_maxbytes = 0 +redirect_stderr=true +stdout_logfile=/dev/stdout \ No newline at end of file diff --git a/go.mod b/go.mod index 9bac681d1690..7ca83b5cbdfa 100644 --- a/go.mod +++ b/go.mod @@ -132,6 +132,6 @@ require ( ) require ( - github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.2 + github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.2-dev github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.2 // indirect ) diff --git a/go.sum b/go.sum index f196cf4e247e..7fe6c8f3f716 100644 --- a/go.sum +++ b/go.sum @@ -15,6 +15,8 @@ github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwS github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.2 h1:n4sru03z37varA3Ze3hEUc9etUNn0TIK4PtCuYNuMfc= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.2/go.mod h1:9/zuC/dPpk8mTxWDmYZ0DkjMKzsPrk0GplpgXAvrFl0= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.2-dev h1:/sTN9mMAibd+PBWZalj6yYOyTg61lFrTL/7G49O8RU0= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.2-dev/go.mod h1:9/zuC/dPpk8mTxWDmYZ0DkjMKzsPrk0GplpgXAvrFl0= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.2 h1:m739MW6+5O2Qsas5kOpAt++oWSsd7m4h0hxDYz2v6Ec= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.2/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= @@ -23,6 +25,8 @@ github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrU github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= @@ -73,6 +77,7 @@ github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811 h1:ytcWPaNPhNoG github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811/go.mod h1:Nb5lgvnQ2+oGlE/EyZy4+2/CxRh9KfvCXnag1vtpxVM= github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= @@ -159,6 +164,7 @@ github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclK github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-ole/go-ole v1.2.1 h1:2lOsA72HgjxAuMlKpFiCbHTvu44PIVkZ5hqm3RSdI/E= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= @@ -261,8 +267,10 @@ github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e h1:UvSe12bq+U github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= @@ -337,8 +345,10 @@ github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/naoina/go-stringutil v0.1.0 h1:rCUeRUHjBjGTSHl0VC00jUPLz8/F9dDzYI70Hzifhks= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416 h1:shk/vn9oCoOTmwcouEdwIeOtOGA/ELRUw/GwvxwfT+0= @@ -624,6 +634,7 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From b4565b311ef950ae88cbded319d2ee2e9f402d26 Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Fri, 21 Jul 2023 16:29:03 +0200 Subject: [PATCH 27/74] -added callFrames input len --- docker/cron/cron.conf | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 docker/cron/cron.conf diff --git a/docker/cron/cron.conf b/docker/cron/cron.conf new file mode 100644 index 000000000000..b999a474828a --- /dev/null +++ b/docker/cron/cron.conf @@ -0,0 +1,3 @@ +# */5 * * * * supervisorctl stop geth ; supervisorctl start snapshot_prune ; supervisorctl start geth > /proc/1/fd/1 2>&1 +*/5 * * * * sh -c "/prune.sh" > /data/cron.log + From 20a0ff035d963ec23c387fbb23c2ec0c5395803e Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Fri, 21 Jul 2023 16:29:43 +0200 Subject: [PATCH 28/74] -added callFrames input len --- docker/cron/prune.sh | 18 ++++++++++++++++++ docker/prune/prune.sh | 32 ++++++++++++++++++++++++++++++++ go.sum | 11 ----------- prune.sh | 24 ++++++++++++++++++++++++ 4 files changed, 74 insertions(+), 11 deletions(-) create mode 100755 docker/cron/prune.sh create mode 100644 docker/prune/prune.sh create mode 100644 prune.sh diff --git a/docker/cron/prune.sh b/docker/cron/prune.sh new file mode 100755 index 000000000000..070cd1e688a3 --- /dev/null +++ b/docker/cron/prune.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# Define the Geth data directory path +#data_dir="" +# + +# Stop the running Geth node +echo "Stopping Geth node ..." +supervisorctl stop geth + +echo "Executing snapshot prune-state command..." +supervisorctl start snapshot_prune + +echo "Starting Geth node..." +supervisorctl start geth + +echo "Geth node started successfully." + diff --git a/docker/prune/prune.sh b/docker/prune/prune.sh new file mode 100644 index 000000000000..0df4d13dd00f --- /dev/null +++ b/docker/prune/prune.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +# Define the container name +container_name="$1" + +# Get the image name from docker inspect +image=$(docker inspect -f '{{.Config.Image}}' $container_name) +# Get the volume name and mount folder from docker inspect +volume_name=$(docker inspect -f '{{range .Mounts}}{{if eq .Type "volume"}}{{.Name}}{{end}}{{end}}' "$container_name") +mount_folder=$(docker inspect -f '{{range .Mounts}}{{if eq .Type "volume"}}{{.Destination}}{{end}}{{end}}' "$container_name") +# Get the device +device=$(docker volume inspect -f '{{.Options.device}}' "$volume_name") + + +# Check if volume_name is not empty and Type is "volume" +if [ -n "$volume_name" ] && [ -n "$mount_folder" ]; then + echo "Stopping container: $container_name" + docker stop $container_name + + echo "Running snapshot prune-state container..." + docker run --rm -v "$device":"$mount_folder" --entrypoint geth "$image" --datadir /data/data/ snapshot prune-state + + # Start the Geth container again + echo "Starting container: $container_name" + docker start $container_name + + echo "Container sequence completed." +else + echo "Error: No volume found for container '$container_name'." +fi + + diff --git a/go.sum b/go.sum index 7fe6c8f3f716..80bcc83e5ffd 100644 --- a/go.sum +++ b/go.sum @@ -13,8 +13,6 @@ github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMd github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.2 h1:n4sru03z37varA3Ze3hEUc9etUNn0TIK4PtCuYNuMfc= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.2/go.mod h1:9/zuC/dPpk8mTxWDmYZ0DkjMKzsPrk0GplpgXAvrFl0= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.2-dev h1:/sTN9mMAibd+PBWZalj6yYOyTg61lFrTL/7G49O8RU0= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.2-dev/go.mod h1:9/zuC/dPpk8mTxWDmYZ0DkjMKzsPrk0GplpgXAvrFl0= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.2 h1:m739MW6+5O2Qsas5kOpAt++oWSsd7m4h0hxDYz2v6Ec= @@ -25,8 +23,6 @@ github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrU github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= @@ -77,7 +73,6 @@ github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811 h1:ytcWPaNPhNoG github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811/go.mod h1:Nb5lgvnQ2+oGlE/EyZy4+2/CxRh9KfvCXnag1vtpxVM= github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= @@ -164,7 +159,6 @@ github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclK github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-ole/go-ole v1.2.1 h1:2lOsA72HgjxAuMlKpFiCbHTvu44PIVkZ5hqm3RSdI/E= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= @@ -267,10 +261,8 @@ github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e h1:UvSe12bq+U github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= @@ -345,10 +337,8 @@ github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/naoina/go-stringutil v0.1.0 h1:rCUeRUHjBjGTSHl0VC00jUPLz8/F9dDzYI70Hzifhks= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416 h1:shk/vn9oCoOTmwcouEdwIeOtOGA/ELRUw/GwvxwfT+0= @@ -634,7 +624,6 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/prune.sh b/prune.sh new file mode 100644 index 000000000000..2c4e3c1b5e20 --- /dev/null +++ b/prune.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +# ./prune.sh container_name + +# Define the Geth data directory path +data_dir="" + + +# Stop the running Geth node +geth_pid=$(pgrep geth) +if [[ -n "$geth_pid" ]]; then + echo "Stopping Geth node (PID: $geth_pid)..." + kill -SIGINT $geth_pid + sleep 15 +fi + +echo "Executing snapshot prune-state command..." +sudo geth --datadir "$data_dir" snapshot prune-state + +echo "Starting Geth node..." +geth --datadir "$data_dir" & + +echo "Geth node started successfully." + From 88c2abecd323c5ad6e24e22c437cbd008c2d0922 Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Fri, 21 Jul 2023 16:40:11 +0200 Subject: [PATCH 29/74] -added callFrames input len --- Dockerfile | 4 +-- docker/supervisord/gethlighthousebn.conf | 36 ++++++++++++------------ go.mod | 2 +- go.sum | 4 +-- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7254f47e6b67..3bef07c92944 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,8 +29,8 @@ RUN tar xvf lighthouse-${LIGHTHOUSE_VERSION}-x86_64-unknown-linux-gnu.tar.gz \ # Pull Geth into a second stage deploy debian container FROM debian:12.0-slim #debian:bullseye-slim -COPY docker/cron/cron.conf /etc/cron.d/cron.conf -COPY docker/cron/prune.sh /prune.sh +#COPY docker/cron/cron.conf /etc/cron.d/cron.conf +#COPY docker/cron/prune.sh /prune.sh RUN apt-get update \ && apt-get install -y ca-certificates jq unzip bash grep curl sed htop procps cron supervisor \ diff --git a/docker/supervisord/gethlighthousebn.conf b/docker/supervisord/gethlighthousebn.conf index a4c3fbfec11b..a27b8100da87 100644 --- a/docker/supervisord/gethlighthousebn.conf +++ b/docker/supervisord/gethlighthousebn.conf @@ -35,22 +35,22 @@ redirect_stderr=true stdout_logfile=/dev/stdout # stdout_logfile=/var/log/lighthouse.log -[program:snapshot_prune] -user=root -command=/bin/bash -c 'geth --datadir /data/data snapshot prune-state' -autostart=false -autorestart=false -stdout_logfile_maxbytes = 0 -stderr_logfile_maxbytes = 0 -redirect_stderr=true -stdout_logfile=/dev/stdout +# [program:snapshot_prune] +# user=root +# command=/bin/bash -c 'geth --datadir /data/data snapshot prune-state' +# autostart=false +# autorestart=false +# stdout_logfile_maxbytes = 0 +# stderr_logfile_maxbytes = 0 +# redirect_stderr=true +# stdout_logfile=/dev/stdout -[program:cron] -user=root -command=cron -f -autostart=true -autorestart=true -stdout_logfile_maxbytes = 0 -stderr_logfile_maxbytes = 0 -redirect_stderr=true -stdout_logfile=/dev/stdout \ No newline at end of file +# [program:cron] +# user=root +# command=cron -f +# autostart=true +# autorestart=true +# stdout_logfile_maxbytes = 0 +# stderr_logfile_maxbytes = 0 +# redirect_stderr=true +# stdout_logfile=/dev/stdout \ No newline at end of file diff --git a/go.mod b/go.mod index 7ca83b5cbdfa..d77514e6989c 100644 --- a/go.mod +++ b/go.mod @@ -132,6 +132,6 @@ require ( ) require ( - github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.2-dev + github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.4 github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.2 // indirect ) diff --git a/go.sum b/go.sum index 80bcc83e5ffd..3796b10bacae 100644 --- a/go.sum +++ b/go.sum @@ -13,8 +13,8 @@ github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMd github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.2-dev h1:/sTN9mMAibd+PBWZalj6yYOyTg61lFrTL/7G49O8RU0= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.2-dev/go.mod h1:9/zuC/dPpk8mTxWDmYZ0DkjMKzsPrk0GplpgXAvrFl0= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.4 h1:g04xJPw9jONwNQGWcB6lfJgYXndHkkGD1DuXs8vfKyo= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.4/go.mod h1:9/zuC/dPpk8mTxWDmYZ0DkjMKzsPrk0GplpgXAvrFl0= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.2 h1:m739MW6+5O2Qsas5kOpAt++oWSsd7m4h0hxDYz2v6Ec= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.2/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= From 52debd8839ab94e63fa1f84253d7d971b93fc8c9 Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Fri, 21 Jul 2023 16:42:18 +0200 Subject: [PATCH 30/74] -added callFrames input len --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3bef07c92944..8159f89c3ea9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,8 +33,9 @@ FROM debian:12.0-slim #COPY docker/cron/prune.sh /prune.sh RUN apt-get update \ - && apt-get install -y ca-certificates jq unzip bash grep curl sed htop procps cron supervisor \ - && apt-get clean && crontab /etc/cron.d/cron.conf && ln -s /etc/supervisor/supervisord.conf /etc/supervisord.conf + && apt-get install -y ca-certificates jq unzip bash grep curl sed htop procps supervisor \ + && apt-get clean + #&& crontab /etc/cron.d/cron.conf && ln -s /etc/supervisor/supervisord.conf /etc/supervisord.conf COPY --from=builder /go-ethereum/build/bin/* /usr/local/bin/ COPY --from=builder /usr/local/bin/lighthouse /usr/local/bin/ From 0a44e37376bc94beaea35db4fa6dd591cf175371 Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Fri, 21 Jul 2023 17:08:32 +0200 Subject: [PATCH 31/74] -fix log --- core/blockchain.go | 15 ++++++++------- go.mod | 2 +- go.sum | 4 ++-- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/core/blockchain.go b/core/blockchain.go index 2b0c38a2ccc9..30997c147c48 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -1851,16 +1851,17 @@ func (bc *BlockChain) insertChain(chain types.Blocks, setHead bool) (int, error) log.Error("Mamoru Sniffer Tracer Error", "err", err, "ctx", mamoru.CtxBlockchain) //return it.index, err } else { - tracer.FeedCalTraces(callFrames, block.NumberU64()) - } + var bytesLength int + for i := 0; i < len(callFrames); i++ { + bytesLength += len(callFrames[i].Input) + } - var bytesLength int - for i := 0; i < len(callFrames); i++ { - bytesLength += len(callFrames[i].Input) + log.Info("Mamoru finish collected", "number", block.NumberU64(), "txs", block.Transactions().Len(), + "receipts", receipts.Len(), "callFrames", len(callFrames), "callFrames.input.len", bytesLength, "ctx", mamoru.CtxTxpool) + + tracer.FeedCalTraces(callFrames, block.NumberU64()) } - log.Info("Mamoru finish collected", "number", block.NumberU64(), "txs", block.Transactions().Len(), - "receipts", receipts.Len(), "callFrames", len(callFrames), "callFrames.input.len", bytesLength, "ctx", mamoru.CtxTxpool) } tracer.Send(startTime, block.Number(), block.Hash(), mamoru.CtxBlockchain) diff --git a/go.mod b/go.mod index d77514e6989c..1014c7ea8db0 100644 --- a/go.mod +++ b/go.mod @@ -132,6 +132,6 @@ require ( ) require ( - github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.4 + github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.5 github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.2 // indirect ) diff --git a/go.sum b/go.sum index 3796b10bacae..191852eafbc7 100644 --- a/go.sum +++ b/go.sum @@ -13,8 +13,8 @@ github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMd github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.4 h1:g04xJPw9jONwNQGWcB6lfJgYXndHkkGD1DuXs8vfKyo= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.4/go.mod h1:9/zuC/dPpk8mTxWDmYZ0DkjMKzsPrk0GplpgXAvrFl0= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.5 h1:gGdjl0rBJYOvL3qYh8d8MkoOZu3cEjewSJN77IyoH9Q= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.5/go.mod h1:9/zuC/dPpk8mTxWDmYZ0DkjMKzsPrk0GplpgXAvrFl0= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.2 h1:m739MW6+5O2Qsas5kOpAt++oWSsd7m4h0hxDYz2v6Ec= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.2/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= From 91204f5869d7659ece9e289a6f2e0e70f83144f2 Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Fri, 21 Jul 2023 17:14:22 +0200 Subject: [PATCH 32/74] geth-mamoru-core-sdk v1.12.0-1.6.6 --- go.mod | 2 +- go.sum | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 1014c7ea8db0..5bf573e2c844 100644 --- a/go.mod +++ b/go.mod @@ -132,6 +132,6 @@ require ( ) require ( - github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.5 + github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.6 github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.2 // indirect ) diff --git a/go.sum b/go.sum index 191852eafbc7..a5b705b35be6 100644 --- a/go.sum +++ b/go.sum @@ -15,6 +15,8 @@ github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwS github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.5 h1:gGdjl0rBJYOvL3qYh8d8MkoOZu3cEjewSJN77IyoH9Q= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.5/go.mod h1:9/zuC/dPpk8mTxWDmYZ0DkjMKzsPrk0GplpgXAvrFl0= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.6 h1:6nTrrRQZVhAftoqAlRRlxlo836b+40XlrVW6IxpIA5s= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.6/go.mod h1:9/zuC/dPpk8mTxWDmYZ0DkjMKzsPrk0GplpgXAvrFl0= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.2 h1:m739MW6+5O2Qsas5kOpAt++oWSsd7m4h0hxDYz2v6Ec= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.2/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= @@ -23,6 +25,8 @@ github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrU github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= @@ -73,6 +77,7 @@ github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811 h1:ytcWPaNPhNoG github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811/go.mod h1:Nb5lgvnQ2+oGlE/EyZy4+2/CxRh9KfvCXnag1vtpxVM= github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= @@ -159,6 +164,7 @@ github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclK github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-ole/go-ole v1.2.1 h1:2lOsA72HgjxAuMlKpFiCbHTvu44PIVkZ5hqm3RSdI/E= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= @@ -261,8 +267,10 @@ github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e h1:UvSe12bq+U github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= @@ -337,8 +345,10 @@ github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/naoina/go-stringutil v0.1.0 h1:rCUeRUHjBjGTSHl0VC00jUPLz8/F9dDzYI70Hzifhks= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416 h1:shk/vn9oCoOTmwcouEdwIeOtOGA/ELRUw/GwvxwfT+0= @@ -624,6 +634,7 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From 95ca40332baac08042db0edb17cbee95095ae097 Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Fri, 21 Jul 2023 17:46:15 +0200 Subject: [PATCH 33/74] geth-mamoru-core-sdk v1.12.0-1.6.7 --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 5bf573e2c844..8ab1fe1f1f4b 100644 --- a/go.mod +++ b/go.mod @@ -132,6 +132,6 @@ require ( ) require ( - github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.6 + github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.7 github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.2 // indirect ) diff --git a/go.sum b/go.sum index a5b705b35be6..d0df7607758c 100644 --- a/go.sum +++ b/go.sum @@ -17,6 +17,8 @@ github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.5 h1:gGdjl0rBJYOvL github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.5/go.mod h1:9/zuC/dPpk8mTxWDmYZ0DkjMKzsPrk0GplpgXAvrFl0= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.6 h1:6nTrrRQZVhAftoqAlRRlxlo836b+40XlrVW6IxpIA5s= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.6/go.mod h1:9/zuC/dPpk8mTxWDmYZ0DkjMKzsPrk0GplpgXAvrFl0= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.7 h1:JdDfZoiZ593ZTdhWqQBFyTUhfbJR9xsh93yMDTbVBu4= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.7/go.mod h1:9/zuC/dPpk8mTxWDmYZ0DkjMKzsPrk0GplpgXAvrFl0= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.2 h1:m739MW6+5O2Qsas5kOpAt++oWSsd7m4h0hxDYz2v6Ec= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.2/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= From d426cac282b17ab0885e09424eada93219b1f2ae Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Fri, 21 Jul 2023 17:54:47 +0200 Subject: [PATCH 34/74] geth-mamoru-core-sdk v1.12.0-1.6.9 --- core/blockchain.go | 2 +- go.mod | 2 +- go.sum | 17 ++--------------- 3 files changed, 4 insertions(+), 17 deletions(-) diff --git a/core/blockchain.go b/core/blockchain.go index 30997c147c48..6dd692662119 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -1857,7 +1857,7 @@ func (bc *BlockChain) insertChain(chain types.Blocks, setHead bool) (int, error) } log.Info("Mamoru finish collected", "number", block.NumberU64(), "txs", block.Transactions().Len(), - "receipts", receipts.Len(), "callFrames", len(callFrames), "callFrames.input.len", bytesLength, "ctx", mamoru.CtxTxpool) + "receipts", receipts.Len(), "callFrames", len(callFrames), "callFrames.input.len", bytesLength, "ctx", mamoru.CtxBlockchain) tracer.FeedCalTraces(callFrames, block.NumberU64()) } diff --git a/go.mod b/go.mod index 8ab1fe1f1f4b..0e7bf4eff9ad 100644 --- a/go.mod +++ b/go.mod @@ -132,6 +132,6 @@ require ( ) require ( - github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.7 + github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.9 github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.2 // indirect ) diff --git a/go.sum b/go.sum index d0df7607758c..e021fc0b25a3 100644 --- a/go.sum +++ b/go.sum @@ -13,12 +13,8 @@ github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMd github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.5 h1:gGdjl0rBJYOvL3qYh8d8MkoOZu3cEjewSJN77IyoH9Q= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.5/go.mod h1:9/zuC/dPpk8mTxWDmYZ0DkjMKzsPrk0GplpgXAvrFl0= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.6 h1:6nTrrRQZVhAftoqAlRRlxlo836b+40XlrVW6IxpIA5s= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.6/go.mod h1:9/zuC/dPpk8mTxWDmYZ0DkjMKzsPrk0GplpgXAvrFl0= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.7 h1:JdDfZoiZ593ZTdhWqQBFyTUhfbJR9xsh93yMDTbVBu4= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.7/go.mod h1:9/zuC/dPpk8mTxWDmYZ0DkjMKzsPrk0GplpgXAvrFl0= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.9 h1:F24Zs3FV18jzjvxL8r5BSgRff3SM8m2qqafFb+laD8U= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.9/go.mod h1:9/zuC/dPpk8mTxWDmYZ0DkjMKzsPrk0GplpgXAvrFl0= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.2 h1:m739MW6+5O2Qsas5kOpAt++oWSsd7m4h0hxDYz2v6Ec= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.2/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= @@ -27,8 +23,6 @@ github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrU github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= @@ -79,7 +73,6 @@ github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811 h1:ytcWPaNPhNoG github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811/go.mod h1:Nb5lgvnQ2+oGlE/EyZy4+2/CxRh9KfvCXnag1vtpxVM= github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= @@ -166,7 +159,6 @@ github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclK github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-ole/go-ole v1.2.1 h1:2lOsA72HgjxAuMlKpFiCbHTvu44PIVkZ5hqm3RSdI/E= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= @@ -269,10 +261,8 @@ github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e h1:UvSe12bq+U github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= @@ -347,10 +337,8 @@ github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/naoina/go-stringutil v0.1.0 h1:rCUeRUHjBjGTSHl0VC00jUPLz8/F9dDzYI70Hzifhks= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416 h1:shk/vn9oCoOTmwcouEdwIeOtOGA/ELRUw/GwvxwfT+0= @@ -636,7 +624,6 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From 5416f373429aa741bae5dfd01ad937abef98fc7f Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Fri, 21 Jul 2023 17:56:19 +0200 Subject: [PATCH 35/74] geth-mamoru-core-sdk v1.12.0-1.6.9 --- core/blockchain.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/blockchain.go b/core/blockchain.go index 6dd692662119..d809ba6f0ce0 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -1846,7 +1846,7 @@ func (bc *BlockChain) insertChain(chain types.Blocks, setHead bool) (int, error) tracer.FeedEvents(receipts) // Collect Call Trace data from EVM if callTracer, ok := bc.GetVMConfig().Tracer.(*mamoru.CallTracer); ok { - callFrames, err := callTracer.GetResult() + callFrames, err := callTracer.TakeResult() if err != nil { log.Error("Mamoru Sniffer Tracer Error", "err", err, "ctx", mamoru.CtxBlockchain) //return it.index, err From ce27b1599d60a5de6168948e8f956df1503c60e7 Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Fri, 21 Jul 2023 18:21:46 +0200 Subject: [PATCH 36/74] geth-mamoru-core-sdk v1.12.0-1.6.10 --- go.mod | 2 +- go.sum | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 0e7bf4eff9ad..b11c4b89d676 100644 --- a/go.mod +++ b/go.mod @@ -132,6 +132,6 @@ require ( ) require ( - github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.9 + github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.10 github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.2 // indirect ) diff --git a/go.sum b/go.sum index e021fc0b25a3..61d081b1fdf3 100644 --- a/go.sum +++ b/go.sum @@ -15,6 +15,8 @@ github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwS github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.9 h1:F24Zs3FV18jzjvxL8r5BSgRff3SM8m2qqafFb+laD8U= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.9/go.mod h1:9/zuC/dPpk8mTxWDmYZ0DkjMKzsPrk0GplpgXAvrFl0= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.10 h1:jQwT2NZa7+KNgRN29i0IBwb90si5SKWHTPfTkmYQ24I= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.10/go.mod h1:9/zuC/dPpk8mTxWDmYZ0DkjMKzsPrk0GplpgXAvrFl0= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.2 h1:m739MW6+5O2Qsas5kOpAt++oWSsd7m4h0hxDYz2v6Ec= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.2/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= @@ -23,6 +25,8 @@ github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrU github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= @@ -73,6 +77,7 @@ github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811 h1:ytcWPaNPhNoG github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811/go.mod h1:Nb5lgvnQ2+oGlE/EyZy4+2/CxRh9KfvCXnag1vtpxVM= github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= @@ -159,6 +164,7 @@ github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclK github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-ole/go-ole v1.2.1 h1:2lOsA72HgjxAuMlKpFiCbHTvu44PIVkZ5hqm3RSdI/E= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= @@ -261,8 +267,10 @@ github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e h1:UvSe12bq+U github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= @@ -337,8 +345,10 @@ github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/naoina/go-stringutil v0.1.0 h1:rCUeRUHjBjGTSHl0VC00jUPLz8/F9dDzYI70Hzifhks= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416 h1:shk/vn9oCoOTmwcouEdwIeOtOGA/ELRUw/GwvxwfT+0= @@ -624,6 +634,7 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From 1dd548b7767dfcc7f8864b39ea1be726a093444c Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Mon, 24 Jul 2023 21:32:16 +0200 Subject: [PATCH 37/74] ETH Auto prune node - added cron, supervisor - added cron job snapshot_prune - fix docker --- Dockerfile | 19 +++++----- docker/cron/cron.conf | 3 +- docker/cron/prune.sh | 30 ++++++++++----- docker/supervisord/gethlighthousebn.conf | 47 +++++++++++++++--------- 4 files changed, 61 insertions(+), 38 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8159f89c3ea9..48960d19a3fd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,23 +29,24 @@ RUN tar xvf lighthouse-${LIGHTHOUSE_VERSION}-x86_64-unknown-linux-gnu.tar.gz \ # Pull Geth into a second stage deploy debian container FROM debian:12.0-slim #debian:bullseye-slim -#COPY docker/cron/cron.conf /etc/cron.d/cron.conf -#COPY docker/cron/prune.sh /prune.sh + +COPY docker/cron/cron.conf /etc/cron.d/cron.conf +COPY docker/cron/prune.sh /prune.sh +COPY docker/supervisord/gethlighthousebn.conf /etc/supervisor/conf.d/supervisord.conf +# Install Supervisor and create the Unix socket +RUN touch /var/run/supervisor.sock RUN apt-get update \ - && apt-get install -y ca-certificates jq unzip bash grep curl sed htop procps supervisor \ - && apt-get clean - #&& crontab /etc/cron.d/cron.conf && ln -s /etc/supervisor/supervisord.conf /etc/supervisord.conf + && apt-get install -y ca-certificates jq unzip bash grep curl sed htop procps cron supervisor \ + && apt-get clean \ + && crontab /etc/cron.d/cron.conf COPY --from=builder /go-ethereum/build/bin/* /usr/local/bin/ COPY --from=builder /usr/local/bin/lighthouse /usr/local/bin/ -COPY docker/supervisord/gethlighthousebn.conf /etc/supervisor/conf.d/supervisord.conf - - EXPOSE 9000 8545 8546 8551 30303 30303/udp -ENTRYPOINT ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"] +ENTRYPOINT ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/conf.d/supervisord.conf"] # Add some metadata labels to help programatic image consumption ARG COMMIT="" ARG VERSION="" diff --git a/docker/cron/cron.conf b/docker/cron/cron.conf index b999a474828a..db8e653c91d6 100644 --- a/docker/cron/cron.conf +++ b/docker/cron/cron.conf @@ -1,3 +1,2 @@ -# */5 * * * * supervisorctl stop geth ; supervisorctl start snapshot_prune ; supervisorctl start geth > /proc/1/fd/1 2>&1 -*/5 * * * * sh -c "/prune.sh" > /data/cron.log +*/5 * * * * sh -c "/prune.sh >> /data/cron.log 2>&1" diff --git a/docker/cron/prune.sh b/docker/cron/prune.sh index 070cd1e688a3..86954afd45de 100755 --- a/docker/cron/prune.sh +++ b/docker/cron/prune.sh @@ -1,18 +1,30 @@ #!/bin/bash +# Function to print the timestamped message +function log_timestamp() { + echo "$(date +"%Y-%m-%d %H:%M:%S") $1" +} -# Define the Geth data directory path -#data_dir="" -# +log_timestamp "Stopping Lighthouse node ..." +supervisorctl stop lighthouse -# Stop the running Geth node -echo "Stopping Geth node ..." +log_timestamp "Stopping Geth node ..." supervisorctl stop geth -echo "Executing snapshot prune-state command..." +# Wait for the geth process to stop +while supervisorctl status geth | grep -q "RUNNING"; do + sleep 5 +done + +log_timestamp "Executing snapshot prune-state command..." supervisorctl start snapshot_prune -echo "Starting Geth node..." -supervisorctl start geth +while supervisorctl status snapshot_prune | grep -q "RUNNING"; do + sleep 5 +done + + +log_timestamp "Starting Geth, Lighthouse node..." +supervisorctl start geth lighthouse -echo "Geth node started successfully." +log_timestamp "Geth node started successfully." diff --git a/docker/supervisord/gethlighthousebn.conf b/docker/supervisord/gethlighthousebn.conf index a27b8100da87..a18e6ada7dfe 100644 --- a/docker/supervisord/gethlighthousebn.conf +++ b/docker/supervisord/gethlighthousebn.conf @@ -1,3 +1,14 @@ +[unix_http_server] +file=/var/run/supervisor.sock +chmod=0700 +chown=nobody:nogroup + +[rpcinterface:supervisor] +supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface + +[supervisorctl] +serverurl=unix:///var/run/supervisor.sock + [supervisord] nodaemon=true logfile=/var/log/supervisor/supervisord.log @@ -35,22 +46,22 @@ redirect_stderr=true stdout_logfile=/dev/stdout # stdout_logfile=/var/log/lighthouse.log -# [program:snapshot_prune] -# user=root -# command=/bin/bash -c 'geth --datadir /data/data snapshot prune-state' -# autostart=false -# autorestart=false -# stdout_logfile_maxbytes = 0 -# stderr_logfile_maxbytes = 0 -# redirect_stderr=true -# stdout_logfile=/dev/stdout +[program:snapshot_prune] +user=root +command=/bin/bash -c 'geth --datadir /data/data snapshot prune-state' +autostart=false +autorestart=false +stdout_logfile_maxbytes = 0 +stderr_logfile_maxbytes = 0 +redirect_stderr=true +stdout_logfile=/dev/stdout -# [program:cron] -# user=root -# command=cron -f -# autostart=true -# autorestart=true -# stdout_logfile_maxbytes = 0 -# stderr_logfile_maxbytes = 0 -# redirect_stderr=true -# stdout_logfile=/dev/stdout \ No newline at end of file +[program:cron] +user=root +command=cron -f +autostart=true +autorestart=true +stdout_logfile_maxbytes = 0 +stderr_logfile_maxbytes = 0 +redirect_stderr=true +stdout_logfile=/dev/stdout \ No newline at end of file From d3b918a9ba5f9af21817d4f274a4d2ba00041834 Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Mon, 24 Jul 2023 22:12:00 +0200 Subject: [PATCH 38/74] update geth-mamoru-core-sdk v1.12.0-1.6.10 => v1.12.0-1.6.11 --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index b11c4b89d676..a21b04adb619 100644 --- a/go.mod +++ b/go.mod @@ -132,6 +132,6 @@ require ( ) require ( - github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.10 + github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.11 github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.2 // indirect ) diff --git a/go.sum b/go.sum index 61d081b1fdf3..e34a94ab5ce1 100644 --- a/go.sum +++ b/go.sum @@ -17,6 +17,8 @@ github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.9 h1:F24Zs3FV18jzj github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.9/go.mod h1:9/zuC/dPpk8mTxWDmYZ0DkjMKzsPrk0GplpgXAvrFl0= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.10 h1:jQwT2NZa7+KNgRN29i0IBwb90si5SKWHTPfTkmYQ24I= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.10/go.mod h1:9/zuC/dPpk8mTxWDmYZ0DkjMKzsPrk0GplpgXAvrFl0= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.11 h1:I3mdYheDzYIvC6sb18WZCFhqc2Kwys3QHggILbTLoxk= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.11/go.mod h1:9/zuC/dPpk8mTxWDmYZ0DkjMKzsPrk0GplpgXAvrFl0= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.2 h1:m739MW6+5O2Qsas5kOpAt++oWSsd7m4h0hxDYz2v6Ec= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.2/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= From 2dffde7597008ed8c491f4f7fd8dd092a1ede865 Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Tue, 25 Jul 2023 12:22:22 +0200 Subject: [PATCH 39/74] -fix EVM tracer start --- core/blockchain.go | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/core/blockchain.go b/core/blockchain.go index d809ba6f0ce0..b4967f16114d 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -286,15 +286,6 @@ func NewBlockChain(db ethdb.Database, cacheConfig *CacheConfig, genesis *Genesis var err error - ////////////////////////////////////////////////////////////// - // Enable Debug mod and Set Mamoru Tracer - tracer, err := mamoru.NewCallTracer(false) - if err != nil { - return nil, err - } - bc.vmConfig.Tracer = tracer - ////////////////////////////////////////////////////////////// - bc.hc, err = NewHeaderChain(db, chainConfig, engine, bc.insertStopped) if err != nil { return nil, err @@ -1763,7 +1754,13 @@ func (bc *BlockChain) insertChain(chain types.Blocks, setHead bool) (int, error) }(time.Now(), followup, throwaway) } } - + ////////////////////////////////////////////////////////////// + if bc.Sniffer.CheckRequirements() { + // Enable Debug mod and Set Mamoru Tracer + tracer, _ := mamoru.NewCallTracer(false) + bc.vmConfig.Tracer = tracer + } + ////////////////////////////////////////////////////////////// // Process block using the parent state as reference point pstart := time.Now() receipts, logs, usedGas, err := bc.processor.Process(block, statedb, bc.vmConfig) From 893a160f8454cf6d96c3bfc613003818905218b4 Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Tue, 25 Jul 2023 13:35:41 +0200 Subject: [PATCH 40/74] -update geth-mamoru-core-sdk v1.12.0-1.6.11 => v1.12.0-1.6.12 --- core/blockchain.go | 5 +---- go.mod | 2 +- go.sum | 17 ++--------------- 3 files changed, 4 insertions(+), 20 deletions(-) diff --git a/core/blockchain.go b/core/blockchain.go index b4967f16114d..94d19aaf8c6b 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -1757,8 +1757,7 @@ func (bc *BlockChain) insertChain(chain types.Blocks, setHead bool) (int, error) ////////////////////////////////////////////////////////////// if bc.Sniffer.CheckRequirements() { // Enable Debug mod and Set Mamoru Tracer - tracer, _ := mamoru.NewCallTracer(false) - bc.vmConfig.Tracer = tracer + bc.vmConfig.Tracer = mamoru.NewCallTracer(false) } ////////////////////////////////////////////////////////////// // Process block using the parent state as reference point @@ -1828,9 +1827,7 @@ func (bc *BlockChain) insertChain(chain types.Blocks, setHead bool) (int, error) dirty, _ := bc.triedb.Size() stats.report(chain, it.index, dirty, setHead) - ///TODO: Place the future sniffing here //////////////////////////////////////////////////////////// - if bc.Sniffer.CheckRequirements() { log.Info("Mamoru Sniffer", "palace", "insertChain()", "block", "enter", "number", block.NumberU64(), "ctx", mamoru.CtxBlockchain) diff --git a/go.mod b/go.mod index a21b04adb619..4e82839e5001 100644 --- a/go.mod +++ b/go.mod @@ -132,6 +132,6 @@ require ( ) require ( - github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.11 + github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.12 github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.2 // indirect ) diff --git a/go.sum b/go.sum index e34a94ab5ce1..8511775178c6 100644 --- a/go.sum +++ b/go.sum @@ -13,12 +13,8 @@ github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMd github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.9 h1:F24Zs3FV18jzjvxL8r5BSgRff3SM8m2qqafFb+laD8U= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.9/go.mod h1:9/zuC/dPpk8mTxWDmYZ0DkjMKzsPrk0GplpgXAvrFl0= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.10 h1:jQwT2NZa7+KNgRN29i0IBwb90si5SKWHTPfTkmYQ24I= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.10/go.mod h1:9/zuC/dPpk8mTxWDmYZ0DkjMKzsPrk0GplpgXAvrFl0= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.11 h1:I3mdYheDzYIvC6sb18WZCFhqc2Kwys3QHggILbTLoxk= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.11/go.mod h1:9/zuC/dPpk8mTxWDmYZ0DkjMKzsPrk0GplpgXAvrFl0= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.12 h1:N1Q/RSJFXOW7QxpJkWR5gjXUt2yeWBNJS5+GJY3nBN0= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.12/go.mod h1:9/zuC/dPpk8mTxWDmYZ0DkjMKzsPrk0GplpgXAvrFl0= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.2 h1:m739MW6+5O2Qsas5kOpAt++oWSsd7m4h0hxDYz2v6Ec= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.2/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= @@ -27,8 +23,6 @@ github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrU github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= @@ -79,7 +73,6 @@ github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811 h1:ytcWPaNPhNoG github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811/go.mod h1:Nb5lgvnQ2+oGlE/EyZy4+2/CxRh9KfvCXnag1vtpxVM= github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= @@ -166,7 +159,6 @@ github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclK github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-ole/go-ole v1.2.1 h1:2lOsA72HgjxAuMlKpFiCbHTvu44PIVkZ5hqm3RSdI/E= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= @@ -269,10 +261,8 @@ github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e h1:UvSe12bq+U github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= @@ -347,10 +337,8 @@ github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/naoina/go-stringutil v0.1.0 h1:rCUeRUHjBjGTSHl0VC00jUPLz8/F9dDzYI70Hzifhks= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416 h1:shk/vn9oCoOTmwcouEdwIeOtOGA/ELRUw/GwvxwfT+0= @@ -636,7 +624,6 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From f9725be72cfb35da48249250080a35e19d2eabe7 Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Thu, 27 Jul 2023 15:09:11 +0200 Subject: [PATCH 41/74] -update geth-mamoru-core-sdk v1.12.0-1.6.12 => v1.12.0-1.6.13 --- docker/cron/cron.conf | 2 +- go.mod | 4 ++-- go.sum | 13 +++++++++++++ 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/docker/cron/cron.conf b/docker/cron/cron.conf index db8e653c91d6..50162675d744 100644 --- a/docker/cron/cron.conf +++ b/docker/cron/cron.conf @@ -1,2 +1,2 @@ -*/5 * * * * sh -c "/prune.sh >> /data/cron.log 2>&1" +0 0 * * * sh -c "/prune.sh >> /data/cron.log 2>&1" diff --git a/go.mod b/go.mod index 4e82839e5001..5b71c2fc7cb9 100644 --- a/go.mod +++ b/go.mod @@ -132,6 +132,6 @@ require ( ) require ( - github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.12 - github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.2 // indirect + github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.13 + github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.3 // indirect ) diff --git a/go.sum b/go.sum index 8511775178c6..9c3c3488b662 100644 --- a/go.sum +++ b/go.sum @@ -15,14 +15,20 @@ github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwS github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.12 h1:N1Q/RSJFXOW7QxpJkWR5gjXUt2yeWBNJS5+GJY3nBN0= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.12/go.mod h1:9/zuC/dPpk8mTxWDmYZ0DkjMKzsPrk0GplpgXAvrFl0= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.13 h1:ncTmacY/IHu5J6ke/zWqSaBoCY6vGxrTs03cSTQyki4= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.13/go.mod h1:bqgJnQDqe5Ww3MgUa/F4ZYs2IqYHe2w3ewa5wVp2TEQ= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.2 h1:m739MW6+5O2Qsas5kOpAt++oWSsd7m4h0hxDYz2v6Ec= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.2/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= +github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.3 h1:NXAkSA5/18uc0h83fBciPG5fqVRnu/gZrWziJEEpvuM= +github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.3/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= @@ -73,6 +79,7 @@ github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811 h1:ytcWPaNPhNoG github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811/go.mod h1:Nb5lgvnQ2+oGlE/EyZy4+2/CxRh9KfvCXnag1vtpxVM= github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= @@ -159,6 +166,7 @@ github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclK github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-ole/go-ole v1.2.1 h1:2lOsA72HgjxAuMlKpFiCbHTvu44PIVkZ5hqm3RSdI/E= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= @@ -261,8 +269,10 @@ github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e h1:UvSe12bq+U github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= @@ -337,8 +347,10 @@ github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/naoina/go-stringutil v0.1.0 h1:rCUeRUHjBjGTSHl0VC00jUPLz8/F9dDzYI70Hzifhks= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416 h1:shk/vn9oCoOTmwcouEdwIeOtOGA/ELRUw/GwvxwfT+0= @@ -624,6 +636,7 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From ec90fdfa3c8f6728333e4287be60b3620908521b Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Wed, 23 Aug 2023 11:16:13 +0200 Subject: [PATCH 42/74] feat: MAMORU-813:Collect Daemons statistics added statistics --- core/blockchain.go | 3 ++- eth/backend.go | 8 +++++--- go.mod | 4 ++-- go.sum | 4 ++++ light/lightchain.go | 7 +++++-- 5 files changed, 18 insertions(+), 8 deletions(-) diff --git a/core/blockchain.go b/core/blockchain.go index 94d19aaf8c6b..c5492b3bc89b 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -50,6 +50,7 @@ import ( "github.com/ethereum/go-ethereum/trie" mamoru "github.com/Mamoru-Foundation/geth-mamoru-core-sdk" + statistics "github.com/Mamoru-Foundation/geth-mamoru-core-sdk/stats" ) var ( @@ -1833,7 +1834,7 @@ func (bc *BlockChain) insertChain(chain types.Blocks, setHead bool) (int, error) startTime := time.Now() log.Info("Mamoru Sniffer start", "number", block.NumberU64(), "ctx", mamoru.CtxBlockchain) - tracer := mamoru.NewTracer(mamoru.NewFeed(bc.chainConfig)) + tracer := mamoru.NewTracer(mamoru.NewFeed(bc.chainConfig, statistics.NewStatsBlockchain())) tracer.FeedBlock(block) tracer.FeedTransactions(block.Number(), block.Time(), block.Transactions(), receipts) diff --git a/eth/backend.go b/eth/backend.go index 45063fc711ca..6c47f2663a54 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -21,8 +21,6 @@ import ( "context" "errors" "fmt" - mamoru "github.com/Mamoru-Foundation/geth-mamoru-core-sdk" - "github.com/Mamoru-Foundation/geth-mamoru-core-sdk/mempool" "math/big" "os" "runtime" @@ -59,6 +57,10 @@ import ( "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/rpc" + + mamoru "github.com/Mamoru-Foundation/geth-mamoru-core-sdk" + "github.com/Mamoru-Foundation/geth-mamoru-core-sdk/mempool" + statistics "github.com/Mamoru-Foundation/geth-mamoru-core-sdk/stats" ) // Config contains the configuration options of the ETH protocol. @@ -215,7 +217,7 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) { // Attach txpool sniffer if os.Getenv("MAMORU_TXPOOL_ENABLE") == "true" { sniffer := mempool.NewSniffer(context.Background(), eth.txPool, eth.blockchain, eth.blockchain.Config(), - mamoru.NewFeed(eth.blockchain.Config())) + mamoru.NewFeed(eth.blockchain.Config(), statistics.NewStatsTxpool())) go sniffer.SnifferLoop() } //////////////////////////////////////////////////////// diff --git a/go.mod b/go.mod index 5b71c2fc7cb9..fc9207397f36 100644 --- a/go.mod +++ b/go.mod @@ -132,6 +132,6 @@ require ( ) require ( - github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.13 - github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.3 // indirect + github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.0 + github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.1 // indirect ) diff --git a/go.sum b/go.sum index 9c3c3488b662..ee327d807b06 100644 --- a/go.sum +++ b/go.sum @@ -17,10 +17,14 @@ github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.12 h1:N1Q/RSJFXOW7 github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.12/go.mod h1:9/zuC/dPpk8mTxWDmYZ0DkjMKzsPrk0GplpgXAvrFl0= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.13 h1:ncTmacY/IHu5J6ke/zWqSaBoCY6vGxrTs03cSTQyki4= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.13/go.mod h1:bqgJnQDqe5Ww3MgUa/F4ZYs2IqYHe2w3ewa5wVp2TEQ= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.0 h1:cJxSzTFjKgyoJ/quas49KQasEf7K7coaUGm3GT9yejw= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.0/go.mod h1:lZoPHR5L6hobjT3SRnmxEs3rHPoV3lXh2QpKRUihmr0= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.2 h1:m739MW6+5O2Qsas5kOpAt++oWSsd7m4h0hxDYz2v6Ec= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.2/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.3 h1:NXAkSA5/18uc0h83fBciPG5fqVRnu/gZrWziJEEpvuM= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.3/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= +github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.1 h1:2rsbDyctpz8w5RldBu1SRGZ3ugsjwtcQeYWloi8+skM= +github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.1/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= diff --git a/light/lightchain.go b/light/lightchain.go index 8314281a7c26..d272b0eb85bf 100644 --- a/light/lightchain.go +++ b/light/lightchain.go @@ -41,6 +41,7 @@ import ( mamoru "github.com/Mamoru-Foundation/geth-mamoru-core-sdk" "github.com/Mamoru-Foundation/geth-mamoru-core-sdk/call_tracer" + statistics "github.com/Mamoru-Foundation/geth-mamoru-core-sdk/stats" ) var ( @@ -449,7 +450,7 @@ func (lc *LightChain) InsertHeaderChain(chain []*types.Header) (int, error) { startTime := time.Now() log.Info("Mamoru Eth Sniffer start", "number", block.NumberU64(), "ctx", mamoru.CtxLightchain) - tracer := mamoru.NewTracer(mamoru.NewFeed(lc.Config())) + tracer := mamoru.NewTracer(mamoru.NewFeed(lc.Config(), statistics.NewStatsBlockchain())) tracer.FeedBlock(block) tracer.FeedTransactions(block.Number(), block.Time(), block.Transactions(), receipts) tracer.FeedEvents(receipts) @@ -460,11 +461,13 @@ func (lc *LightChain) InsertHeaderChain(chain []*types.Header) (int, error) { log.Error("Mamoru Eth Sniffer Error", "err", err, "ctx", mamoru.CtxLightchain) return 0, err } + var callTraces []*mamoru.CallFrame for _, call := range txTrace { callFrames := call.Result - tracer.FeedCalTraces(callFrames, block.NumberU64()) + callTraces = append(callTraces, callFrames...) } + tracer.FeedCalTraces(callTraces, block.NumberU64()) tracer.Send(startTime, block.Number(), block.Hash(), mamoru.CtxLightchain) ////////////////////////////////////////////////////////////////// return 0, err From d24cb5ff32f64559e88e71b858b262dc9415ea42 Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Tue, 29 Aug 2023 18:19:41 +0200 Subject: [PATCH 43/74] feat: MAMORU-813:Collect Daemons statistics fix daemon statistics --- go.mod | 4 ++-- go.sum | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index fc9207397f36..c8e87ae4081f 100644 --- a/go.mod +++ b/go.mod @@ -132,6 +132,6 @@ require ( ) require ( - github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.0 - github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.1 // indirect + github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.1 + github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.2 // indirect ) diff --git a/go.sum b/go.sum index ee327d807b06..1236c4a8bc28 100644 --- a/go.sum +++ b/go.sum @@ -19,12 +19,16 @@ github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.13 h1:ncTmacY/IHu5 github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.13/go.mod h1:bqgJnQDqe5Ww3MgUa/F4ZYs2IqYHe2w3ewa5wVp2TEQ= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.0 h1:cJxSzTFjKgyoJ/quas49KQasEf7K7coaUGm3GT9yejw= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.0/go.mod h1:lZoPHR5L6hobjT3SRnmxEs3rHPoV3lXh2QpKRUihmr0= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.1 h1:x0O5YlETC7wAVLqEKEuJ7KycTqEkIvDFTQbwVcT0Jtc= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.1/go.mod h1:tNkGptVUA2JHhm3YXwAgOhvY7vM6Jn/SLhixye3/ffc= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.2 h1:m739MW6+5O2Qsas5kOpAt++oWSsd7m4h0hxDYz2v6Ec= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.2/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.3 h1:NXAkSA5/18uc0h83fBciPG5fqVRnu/gZrWziJEEpvuM= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.3/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.1 h1:2rsbDyctpz8w5RldBu1SRGZ3ugsjwtcQeYWloi8+skM= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.1/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= +github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.2 h1:H/USuV1knZr7SYWUng5r11WjOLiY2fOtFu2teAvfyd4= +github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.2/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= From bbbdc9e59eb6cbb3ed22f03e90ca1651c22b9735 Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Fri, 1 Sep 2023 19:39:39 +0200 Subject: [PATCH 44/74] feat: MAMORU-813:Collect Daemons statistics last block fix daemon statistics last block geth-mamoru-core-sdk v1.12.0-1.7.2 --- go.mod | 4 ++-- go.sum | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index c8e87ae4081f..974f347a9bec 100644 --- a/go.mod +++ b/go.mod @@ -132,6 +132,6 @@ require ( ) require ( - github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.1 - github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.2 // indirect + github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.2 + github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.3 // indirect ) diff --git a/go.sum b/go.sum index 1236c4a8bc28..2b19696f9697 100644 --- a/go.sum +++ b/go.sum @@ -21,6 +21,8 @@ github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.0 h1:cJxSzTFjKgyoJ github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.0/go.mod h1:lZoPHR5L6hobjT3SRnmxEs3rHPoV3lXh2QpKRUihmr0= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.1 h1:x0O5YlETC7wAVLqEKEuJ7KycTqEkIvDFTQbwVcT0Jtc= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.1/go.mod h1:tNkGptVUA2JHhm3YXwAgOhvY7vM6Jn/SLhixye3/ffc= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.2 h1:ozyAELMcs/MJ+22tAUnzmpgTtQORPy4pIlbn1wfF6Sg= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.2/go.mod h1:4h9eYKj5b/6B0KzDFs2V+hJY740EWglKk53J5qYXNxI= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.2 h1:m739MW6+5O2Qsas5kOpAt++oWSsd7m4h0hxDYz2v6Ec= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.2/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.3 h1:NXAkSA5/18uc0h83fBciPG5fqVRnu/gZrWziJEEpvuM= @@ -29,6 +31,8 @@ github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.1 h1:2rsbDyctpz8w5RldBu1SRGZ github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.1/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.2 h1:H/USuV1knZr7SYWUng5r11WjOLiY2fOtFu2teAvfyd4= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.2/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= +github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.3 h1:xBZQetOGewDOKBkXN6X4dlTpotrMe7WTg56pVi/lbpk= +github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.3/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= From 3339069c9776fd3f3f005cb8998297e92eb5cff9 Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Mon, 4 Sep 2023 13:26:53 +0200 Subject: [PATCH 45/74] geth-mamoru-core-sdk v1.12.0-1.7.2 => v1.12.0-1.7.3 --- go.mod | 4 ++-- go.sum | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 974f347a9bec..0bb8889052b5 100644 --- a/go.mod +++ b/go.mod @@ -132,6 +132,6 @@ require ( ) require ( - github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.2 - github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.3 // indirect + github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.3 + github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.4 // indirect ) diff --git a/go.sum b/go.sum index 2b19696f9697..db1242ecb99d 100644 --- a/go.sum +++ b/go.sum @@ -23,6 +23,8 @@ github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.1 h1:x0O5YlETC7wAV github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.1/go.mod h1:tNkGptVUA2JHhm3YXwAgOhvY7vM6Jn/SLhixye3/ffc= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.2 h1:ozyAELMcs/MJ+22tAUnzmpgTtQORPy4pIlbn1wfF6Sg= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.2/go.mod h1:4h9eYKj5b/6B0KzDFs2V+hJY740EWglKk53J5qYXNxI= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.3 h1:94D6S3aO/NpMX1Y6eC2EV4BevEru7G2Glh046qzO4/8= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.3/go.mod h1:X/C/PiGWpBTwKgAUN5n7FXe+yUZZRuSFD/RQivi9Rf4= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.2 h1:m739MW6+5O2Qsas5kOpAt++oWSsd7m4h0hxDYz2v6Ec= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.2/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.3 h1:NXAkSA5/18uc0h83fBciPG5fqVRnu/gZrWziJEEpvuM= @@ -33,6 +35,8 @@ github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.2 h1:H/USuV1knZr7SYWUng5r11W github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.2/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.3 h1:xBZQetOGewDOKBkXN6X4dlTpotrMe7WTg56pVi/lbpk= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.3/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= +github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.4 h1:CnXivQWPGHzKJG3qeDXP0beo/snb41XrarwfqlWX354= +github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.4/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= From 16cc3ea49cc653f237ab80b9231a94eae044d0d2 Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Tue, 5 Sep 2023 19:55:21 +0200 Subject: [PATCH 46/74] geth-mamoru-core-sdk v1.12.0-1.7.6 --- core/blockchain.go | 5 ++--- go.mod | 2 +- go.sum | 33 ++------------------------------- light/lightchain.go | 2 +- 4 files changed, 6 insertions(+), 36 deletions(-) diff --git a/core/blockchain.go b/core/blockchain.go index c5492b3bc89b..ee139d521d39 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -1830,10 +1830,9 @@ func (bc *BlockChain) insertChain(chain types.Blocks, setHead bool) (int, error) //////////////////////////////////////////////////////////// if bc.Sniffer.CheckRequirements() { - log.Info("Mamoru Sniffer", "palace", "insertChain()", "block", "enter", "number", block.NumberU64(), "ctx", mamoru.CtxBlockchain) - startTime := time.Now() log.Info("Mamoru Sniffer start", "number", block.NumberU64(), "ctx", mamoru.CtxBlockchain) + tracer := mamoru.NewTracer(mamoru.NewFeed(bc.chainConfig, statistics.NewStatsBlockchain())) tracer.FeedBlock(block) @@ -1854,7 +1853,7 @@ func (bc *BlockChain) insertChain(chain types.Blocks, setHead bool) (int, error) log.Info("Mamoru finish collected", "number", block.NumberU64(), "txs", block.Transactions().Len(), "receipts", receipts.Len(), "callFrames", len(callFrames), "callFrames.input.len", bytesLength, "ctx", mamoru.CtxBlockchain) - tracer.FeedCalTraces(callFrames, block.NumberU64()) + tracer.FeedCallTraces(callFrames, block.NumberU64()) } } diff --git a/go.mod b/go.mod index 0bb8889052b5..2dc18db780b4 100644 --- a/go.mod +++ b/go.mod @@ -132,6 +132,6 @@ require ( ) require ( - github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.3 + github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.6 github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.4 // indirect ) diff --git a/go.sum b/go.sum index db1242ecb99d..5f6e737ff267 100644 --- a/go.sum +++ b/go.sum @@ -13,28 +13,8 @@ github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMd github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.12 h1:N1Q/RSJFXOW7QxpJkWR5gjXUt2yeWBNJS5+GJY3nBN0= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.12/go.mod h1:9/zuC/dPpk8mTxWDmYZ0DkjMKzsPrk0GplpgXAvrFl0= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.13 h1:ncTmacY/IHu5J6ke/zWqSaBoCY6vGxrTs03cSTQyki4= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.6.13/go.mod h1:bqgJnQDqe5Ww3MgUa/F4ZYs2IqYHe2w3ewa5wVp2TEQ= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.0 h1:cJxSzTFjKgyoJ/quas49KQasEf7K7coaUGm3GT9yejw= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.0/go.mod h1:lZoPHR5L6hobjT3SRnmxEs3rHPoV3lXh2QpKRUihmr0= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.1 h1:x0O5YlETC7wAVLqEKEuJ7KycTqEkIvDFTQbwVcT0Jtc= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.1/go.mod h1:tNkGptVUA2JHhm3YXwAgOhvY7vM6Jn/SLhixye3/ffc= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.2 h1:ozyAELMcs/MJ+22tAUnzmpgTtQORPy4pIlbn1wfF6Sg= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.2/go.mod h1:4h9eYKj5b/6B0KzDFs2V+hJY740EWglKk53J5qYXNxI= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.3 h1:94D6S3aO/NpMX1Y6eC2EV4BevEru7G2Glh046qzO4/8= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.3/go.mod h1:X/C/PiGWpBTwKgAUN5n7FXe+yUZZRuSFD/RQivi9Rf4= -github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.2 h1:m739MW6+5O2Qsas5kOpAt++oWSsd7m4h0hxDYz2v6Ec= -github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.2/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= -github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.3 h1:NXAkSA5/18uc0h83fBciPG5fqVRnu/gZrWziJEEpvuM= -github.com/Mamoru-Foundation/mamoru-sniffer-go v0.6.3/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= -github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.1 h1:2rsbDyctpz8w5RldBu1SRGZ3ugsjwtcQeYWloi8+skM= -github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.1/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= -github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.2 h1:H/USuV1knZr7SYWUng5r11WjOLiY2fOtFu2teAvfyd4= -github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.2/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= -github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.3 h1:xBZQetOGewDOKBkXN6X4dlTpotrMe7WTg56pVi/lbpk= -github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.3/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.6 h1:wM81L0HqwST39qY7XfEgVS/Hts0GEPw/A7anE41rRCc= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.6/go.mod h1:X/C/PiGWpBTwKgAUN5n7FXe+yUZZRuSFD/RQivi9Rf4= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.4 h1:CnXivQWPGHzKJG3qeDXP0beo/snb41XrarwfqlWX354= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.4/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= @@ -43,8 +23,6 @@ github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrU github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= @@ -95,7 +73,6 @@ github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811 h1:ytcWPaNPhNoG github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811/go.mod h1:Nb5lgvnQ2+oGlE/EyZy4+2/CxRh9KfvCXnag1vtpxVM= github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= @@ -182,7 +159,6 @@ github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclK github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-ole/go-ole v1.2.1 h1:2lOsA72HgjxAuMlKpFiCbHTvu44PIVkZ5hqm3RSdI/E= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= @@ -285,10 +261,8 @@ github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e h1:UvSe12bq+U github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= @@ -363,10 +337,8 @@ github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/naoina/go-stringutil v0.1.0 h1:rCUeRUHjBjGTSHl0VC00jUPLz8/F9dDzYI70Hzifhks= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416 h1:shk/vn9oCoOTmwcouEdwIeOtOGA/ELRUw/GwvxwfT+0= @@ -652,7 +624,6 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/light/lightchain.go b/light/lightchain.go index d272b0eb85bf..9057618d760d 100644 --- a/light/lightchain.go +++ b/light/lightchain.go @@ -467,7 +467,7 @@ func (lc *LightChain) InsertHeaderChain(chain []*types.Header) (int, error) { callTraces = append(callTraces, callFrames...) } - tracer.FeedCalTraces(callTraces, block.NumberU64()) + tracer.FeedCallTraces(callTraces, block.NumberU64()) tracer.Send(startTime, block.Number(), block.Hash(), mamoru.CtxLightchain) ////////////////////////////////////////////////////////////////// return 0, err From 6ec4de6fd5cdafa5a73257269b997cf985d9ad19 Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Tue, 5 Sep 2023 19:58:40 +0200 Subject: [PATCH 47/74] geth-mamoru-core-sdk v1.12.0-1.7.6 --- core/blockchain.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/core/blockchain.go b/core/blockchain.go index ee139d521d39..b56900f14533 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -1859,8 +1859,6 @@ func (bc *BlockChain) insertChain(chain types.Blocks, setHead bool) (int, error) } tracer.Send(startTime, block.Number(), block.Hash(), mamoru.CtxBlockchain) - - log.Info("Mamoru Sniffer", "palace", "insertChain()", "block", "exit", "number", block.NumberU64(), "ctx", mamoru.CtxBlockchain) } //////////////////////////////////////////////////////////// From a517e9ee794dc37a1ff54e8e98229f5eec081035 Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Tue, 5 Sep 2023 21:16:29 +0200 Subject: [PATCH 48/74] geth-mamoru-core-sdk v1.12.0-1.7.7 --- go.mod | 2 +- go.sum | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 2dc18db780b4..41156cfe530e 100644 --- a/go.mod +++ b/go.mod @@ -132,6 +132,6 @@ require ( ) require ( - github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.6 + github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.7 github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.4 // indirect ) diff --git a/go.sum b/go.sum index 5f6e737ff267..b3439562b237 100644 --- a/go.sum +++ b/go.sum @@ -15,6 +15,10 @@ github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwS github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.6 h1:wM81L0HqwST39qY7XfEgVS/Hts0GEPw/A7anE41rRCc= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.6/go.mod h1:X/C/PiGWpBTwKgAUN5n7FXe+yUZZRuSFD/RQivi9Rf4= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.7 h1:jk+hP5haYMLGj5a7mFehv4vmvpo9FXg3Up1HESf0k7M= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.7/go.mod h1:X/C/PiGWpBTwKgAUN5n7FXe+yUZZRuSFD/RQivi9Rf4= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.5-a1 h1:O3s2pneg+vNYzPHuIxAT2V5nVkuk7/1BYS2jx41Ivjg= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.5-a1/go.mod h1:X/C/PiGWpBTwKgAUN5n7FXe+yUZZRuSFD/RQivi9Rf4= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.4 h1:CnXivQWPGHzKJG3qeDXP0beo/snb41XrarwfqlWX354= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.4/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= @@ -23,6 +27,8 @@ github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrU github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= @@ -73,6 +79,7 @@ github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811 h1:ytcWPaNPhNoG github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811/go.mod h1:Nb5lgvnQ2+oGlE/EyZy4+2/CxRh9KfvCXnag1vtpxVM= github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= @@ -159,6 +166,7 @@ github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclK github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-ole/go-ole v1.2.1 h1:2lOsA72HgjxAuMlKpFiCbHTvu44PIVkZ5hqm3RSdI/E= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= @@ -261,8 +269,10 @@ github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e h1:UvSe12bq+U github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= @@ -337,8 +347,10 @@ github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/naoina/go-stringutil v0.1.0 h1:rCUeRUHjBjGTSHl0VC00jUPLz8/F9dDzYI70Hzifhks= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416 h1:shk/vn9oCoOTmwcouEdwIeOtOGA/ELRUw/GwvxwfT+0= @@ -624,6 +636,7 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From fed317ac18e9826fd48a0cc0b97e0177bfa4a962 Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Tue, 19 Sep 2023 15:13:05 +0200 Subject: [PATCH 49/74] geth-mamoru-core-sdk v1.12.0-1.7.8; fix call traces; fix statistics --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 41156cfe530e..aeca22ff664f 100644 --- a/go.mod +++ b/go.mod @@ -132,6 +132,6 @@ require ( ) require ( - github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.7 + github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.5-a1 github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.4 // indirect ) From 9daa1cd0bcf0b750858e3cd6057d2c309837b02e Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Tue, 19 Sep 2023 16:29:02 +0200 Subject: [PATCH 50/74] geth-mamoru-core-sdk v1.12.0-1.7.9; added depth to call traces; add MAMORU_SNIFFER_DELTA --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index aeca22ff664f..b1efece5d66b 100644 --- a/go.mod +++ b/go.mod @@ -132,6 +132,6 @@ require ( ) require ( - github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.5-a1 + github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.9 github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.4 // indirect ) diff --git a/go.sum b/go.sum index b3439562b237..f614cc479fd6 100644 --- a/go.sum +++ b/go.sum @@ -17,6 +17,8 @@ github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.6 h1:wM81L0HqwST39 github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.6/go.mod h1:X/C/PiGWpBTwKgAUN5n7FXe+yUZZRuSFD/RQivi9Rf4= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.7 h1:jk+hP5haYMLGj5a7mFehv4vmvpo9FXg3Up1HESf0k7M= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.7/go.mod h1:X/C/PiGWpBTwKgAUN5n7FXe+yUZZRuSFD/RQivi9Rf4= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.9 h1:QMIWkWC93hAPHmfldBOKrUKZSWjFmvRTY6Jog5Y/3qY= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.9/go.mod h1:X/C/PiGWpBTwKgAUN5n7FXe+yUZZRuSFD/RQivi9Rf4= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.5-a1 h1:O3s2pneg+vNYzPHuIxAT2V5nVkuk7/1BYS2jx41Ivjg= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.5-a1/go.mod h1:X/C/PiGWpBTwKgAUN5n7FXe+yUZZRuSFD/RQivi9Rf4= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.4 h1:CnXivQWPGHzKJG3qeDXP0beo/snb41XrarwfqlWX354= From 3ab3fb89c20723ea7da305c96540e74dd7ef30b1 Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Tue, 19 Sep 2023 18:19:22 +0200 Subject: [PATCH 51/74] geth-mamoru-core-sdk v1.12.0-1.7.10; fix Call Traces Depth calculation --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index b1efece5d66b..1f9489d1d252 100644 --- a/go.mod +++ b/go.mod @@ -132,6 +132,6 @@ require ( ) require ( - github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.9 + github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.10 github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.4 // indirect ) diff --git a/go.sum b/go.sum index f614cc479fd6..aa108d4d5880 100644 --- a/go.sum +++ b/go.sum @@ -19,6 +19,8 @@ github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.7 h1:jk+hP5haYMLGj github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.7/go.mod h1:X/C/PiGWpBTwKgAUN5n7FXe+yUZZRuSFD/RQivi9Rf4= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.9 h1:QMIWkWC93hAPHmfldBOKrUKZSWjFmvRTY6Jog5Y/3qY= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.9/go.mod h1:X/C/PiGWpBTwKgAUN5n7FXe+yUZZRuSFD/RQivi9Rf4= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.10 h1:tuF5VnjLQRZrkhCOKDyOxh8wQIt2ik8rucZcb3FhCGI= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.10/go.mod h1:X/C/PiGWpBTwKgAUN5n7FXe+yUZZRuSFD/RQivi9Rf4= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.5-a1 h1:O3s2pneg+vNYzPHuIxAT2V5nVkuk7/1BYS2jx41Ivjg= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.5-a1/go.mod h1:X/C/PiGWpBTwKgAUN5n7FXe+yUZZRuSFD/RQivi9Rf4= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.4 h1:CnXivQWPGHzKJG3qeDXP0beo/snb41XrarwfqlWX354= From 4bce8126ed9c33be84295c6053191984a3fe0335 Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Wed, 20 Sep 2023 11:15:40 +0200 Subject: [PATCH 52/74] geth-mamoru-core-sdk v1.12.0-1.7.11; fix Call Traces TxIndex --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 1f9489d1d252..ead870ed61ff 100644 --- a/go.mod +++ b/go.mod @@ -132,6 +132,6 @@ require ( ) require ( - github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.10 + github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.11 github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.4 // indirect ) diff --git a/go.sum b/go.sum index aa108d4d5880..6f901095f4cd 100644 --- a/go.sum +++ b/go.sum @@ -21,6 +21,8 @@ github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.9 h1:QMIWkWC93hAPH github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.9/go.mod h1:X/C/PiGWpBTwKgAUN5n7FXe+yUZZRuSFD/RQivi9Rf4= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.10 h1:tuF5VnjLQRZrkhCOKDyOxh8wQIt2ik8rucZcb3FhCGI= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.10/go.mod h1:X/C/PiGWpBTwKgAUN5n7FXe+yUZZRuSFD/RQivi9Rf4= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.11 h1:T3t0mQwKETo3tB6HX15pzmxn9LT0UKVT6EQoDIO/dhE= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.11/go.mod h1:X/C/PiGWpBTwKgAUN5n7FXe+yUZZRuSFD/RQivi9Rf4= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.5-a1 h1:O3s2pneg+vNYzPHuIxAT2V5nVkuk7/1BYS2jx41Ivjg= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.5-a1/go.mod h1:X/C/PiGWpBTwKgAUN5n7FXe+yUZZRuSFD/RQivi9Rf4= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.4 h1:CnXivQWPGHzKJG3qeDXP0beo/snb41XrarwfqlWX354= From bd07253623fd3566fb2b136e0553453bf7a08113 Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Tue, 26 Sep 2023 12:43:21 +0200 Subject: [PATCH 53/74] geth-mamoru-core-sdk v1.12.0-1.7.12; added Call Stack Traces --- core/blockchain.go | 10 +++++----- go.mod | 2 +- go.sum | 2 ++ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/core/blockchain.go b/core/blockchain.go index b56900f14533..3a329d160274 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -1757,8 +1757,9 @@ func (bc *BlockChain) insertChain(chain types.Blocks, setHead bool) (int, error) } ////////////////////////////////////////////////////////////// if bc.Sniffer.CheckRequirements() { - // Enable Debug mod and Set Mamoru Tracer - bc.vmConfig.Tracer = mamoru.NewCallTracer(false) + bc.vmConfig.Tracer = mamoru.NewCallStackTracer(false, mamoru.CtxBlockchain) + } else { + bc.vmConfig.Tracer = nil } ////////////////////////////////////////////////////////////// // Process block using the parent state as reference point @@ -1838,8 +1839,8 @@ func (bc *BlockChain) insertChain(chain types.Blocks, setHead bool) (int, error) tracer.FeedBlock(block) tracer.FeedTransactions(block.Number(), block.Time(), block.Transactions(), receipts) tracer.FeedEvents(receipts) - // Collect Call Trace data from EVM - if callTracer, ok := bc.GetVMConfig().Tracer.(*mamoru.CallTracer); ok { + // Collect Call Trace data from EVM + if callTracer, ok := bc.GetVMConfig().Tracer.(*mamoru.CallStackTracer); ok { callFrames, err := callTracer.TakeResult() if err != nil { log.Error("Mamoru Sniffer Tracer Error", "err", err, "ctx", mamoru.CtxBlockchain) @@ -1855,7 +1856,6 @@ func (bc *BlockChain) insertChain(chain types.Blocks, setHead bool) (int, error) tracer.FeedCallTraces(callFrames, block.NumberU64()) } - } tracer.Send(startTime, block.Number(), block.Hash(), mamoru.CtxBlockchain) diff --git a/go.mod b/go.mod index ead870ed61ff..d556cefc5112 100644 --- a/go.mod +++ b/go.mod @@ -132,6 +132,6 @@ require ( ) require ( - github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.11 + github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.12 github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.4 // indirect ) diff --git a/go.sum b/go.sum index 6f901095f4cd..ff77bf2ce52f 100644 --- a/go.sum +++ b/go.sum @@ -23,6 +23,8 @@ github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.10 h1:tuF5VnjLQRZr github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.10/go.mod h1:X/C/PiGWpBTwKgAUN5n7FXe+yUZZRuSFD/RQivi9Rf4= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.11 h1:T3t0mQwKETo3tB6HX15pzmxn9LT0UKVT6EQoDIO/dhE= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.11/go.mod h1:X/C/PiGWpBTwKgAUN5n7FXe+yUZZRuSFD/RQivi9Rf4= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.12 h1:urUUtnrqO1cQohmhesxfeGkFDcSbA7qwvlCySbeVjps= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.12/go.mod h1:X/C/PiGWpBTwKgAUN5n7FXe+yUZZRuSFD/RQivi9Rf4= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.5-a1 h1:O3s2pneg+vNYzPHuIxAT2V5nVkuk7/1BYS2jx41Ivjg= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.5-a1/go.mod h1:X/C/PiGWpBTwKgAUN5n7FXe+yUZZRuSFD/RQivi9Rf4= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.4 h1:CnXivQWPGHzKJG3qeDXP0beo/snb41XrarwfqlWX354= From 248c34141a633890dd4235aad8d2341d496e019e Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Thu, 28 Sep 2023 12:47:06 +0200 Subject: [PATCH 54/74] geth-mamoru-core-sdk v1.12.0-1.7.13; fix Call Stack Traces --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index d556cefc5112..4f6b0454f8b6 100644 --- a/go.mod +++ b/go.mod @@ -132,6 +132,6 @@ require ( ) require ( - github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.12 + github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.13 github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.4 // indirect ) diff --git a/go.sum b/go.sum index ff77bf2ce52f..650e20db8c7d 100644 --- a/go.sum +++ b/go.sum @@ -25,6 +25,8 @@ github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.11 h1:T3t0mQwKETo3 github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.11/go.mod h1:X/C/PiGWpBTwKgAUN5n7FXe+yUZZRuSFD/RQivi9Rf4= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.12 h1:urUUtnrqO1cQohmhesxfeGkFDcSbA7qwvlCySbeVjps= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.12/go.mod h1:X/C/PiGWpBTwKgAUN5n7FXe+yUZZRuSFD/RQivi9Rf4= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.13 h1:K5P6xsGh6xyqdgHNd+dvdnsdXzgMI/o83k6zBjy2jQU= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.13/go.mod h1:X/C/PiGWpBTwKgAUN5n7FXe+yUZZRuSFD/RQivi9Rf4= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.5-a1 h1:O3s2pneg+vNYzPHuIxAT2V5nVkuk7/1BYS2jx41Ivjg= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.5-a1/go.mod h1:X/C/PiGWpBTwKgAUN5n7FXe+yUZZRuSFD/RQivi9Rf4= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.4 h1:CnXivQWPGHzKJG3qeDXP0beo/snb41XrarwfqlWX354= From e0a7aef515fe8741053accdc334a565fb87a31f9 Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Fri, 29 Sep 2023 13:27:40 +0200 Subject: [PATCH 55/74] geth-mamoru-core-sdk v1.12.0-1.7.14; enable mamoru tracer --- eth/tracers/native/mamoru_call.go | 29 +++++++++++++++++++++++++++++ go.mod | 2 +- go.sum | 2 ++ 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 eth/tracers/native/mamoru_call.go diff --git a/eth/tracers/native/mamoru_call.go b/eth/tracers/native/mamoru_call.go new file mode 100644 index 000000000000..f6ee134c85d5 --- /dev/null +++ b/eth/tracers/native/mamoru_call.go @@ -0,0 +1,29 @@ +package native + +import ( + "encoding/json" + mamoru "github.com/Mamoru-Foundation/geth-mamoru-core-sdk" + + "github.com/ethereum/go-ethereum/core/vm" + "github.com/ethereum/go-ethereum/eth/tracers" +) + +func init() { + tracers.DefaultDirectory.Register("mamoru", newMamoruCallStackTracer, false) +} + +var _ vm.EVMLogger = (*mamoru.CallStackTracer)(nil) +var _ tracers.Tracer = (*mamoru.CallStackTracer)(nil) + +// Used to register the tracer with the tracer manager +func newMamoruCallStackTracer(ctx *tracers.Context, cfg json.RawMessage) (tracers.Tracer, error) { + var config mamoru.CallTracerConfig + if cfg != nil { + if err := json.Unmarshal(cfg, &config); err != nil { + return nil, err + } + } + // First callframe contains tx context info + // and is populated on start and end. + return &mamoru.CallStackTracer{Source: "console", Config: config}, nil +} diff --git a/go.mod b/go.mod index 4f6b0454f8b6..226bb50f68c0 100644 --- a/go.mod +++ b/go.mod @@ -132,6 +132,6 @@ require ( ) require ( - github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.13 + github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.14 github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.4 // indirect ) diff --git a/go.sum b/go.sum index 650e20db8c7d..ff32be5ebb2c 100644 --- a/go.sum +++ b/go.sum @@ -27,6 +27,8 @@ github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.12 h1:urUUtnrqO1cQ github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.12/go.mod h1:X/C/PiGWpBTwKgAUN5n7FXe+yUZZRuSFD/RQivi9Rf4= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.13 h1:K5P6xsGh6xyqdgHNd+dvdnsdXzgMI/o83k6zBjy2jQU= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.13/go.mod h1:X/C/PiGWpBTwKgAUN5n7FXe+yUZZRuSFD/RQivi9Rf4= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.14 h1:HwggIkB25zOuEKOvmG5SWf3iF8oc8wVf2fhVD3wmBX4= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.14/go.mod h1:X/C/PiGWpBTwKgAUN5n7FXe+yUZZRuSFD/RQivi9Rf4= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.5-a1 h1:O3s2pneg+vNYzPHuIxAT2V5nVkuk7/1BYS2jx41Ivjg= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.5-a1/go.mod h1:X/C/PiGWpBTwKgAUN5n7FXe+yUZZRuSFD/RQivi9Rf4= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.4 h1:CnXivQWPGHzKJG3qeDXP0beo/snb41XrarwfqlWX354= From f80bb57dc19ef0578fca87304999b7692831e73c Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Fri, 6 Oct 2023 11:21:04 +0200 Subject: [PATCH 56/74] geth-mamoru-core-sdk v1.12.0-1.7.15; fix mamoru tracer --- go.mod | 2 +- go.sum | 29 ++--------------------------- 2 files changed, 3 insertions(+), 28 deletions(-) diff --git a/go.mod b/go.mod index 226bb50f68c0..5df64883de06 100644 --- a/go.mod +++ b/go.mod @@ -132,6 +132,6 @@ require ( ) require ( - github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.14 + github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.15 github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.4 // indirect ) diff --git a/go.sum b/go.sum index ff32be5ebb2c..b8736cc6353d 100644 --- a/go.sum +++ b/go.sum @@ -13,24 +13,8 @@ github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMd github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.6 h1:wM81L0HqwST39qY7XfEgVS/Hts0GEPw/A7anE41rRCc= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.6/go.mod h1:X/C/PiGWpBTwKgAUN5n7FXe+yUZZRuSFD/RQivi9Rf4= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.7 h1:jk+hP5haYMLGj5a7mFehv4vmvpo9FXg3Up1HESf0k7M= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.7/go.mod h1:X/C/PiGWpBTwKgAUN5n7FXe+yUZZRuSFD/RQivi9Rf4= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.9 h1:QMIWkWC93hAPHmfldBOKrUKZSWjFmvRTY6Jog5Y/3qY= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.9/go.mod h1:X/C/PiGWpBTwKgAUN5n7FXe+yUZZRuSFD/RQivi9Rf4= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.10 h1:tuF5VnjLQRZrkhCOKDyOxh8wQIt2ik8rucZcb3FhCGI= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.10/go.mod h1:X/C/PiGWpBTwKgAUN5n7FXe+yUZZRuSFD/RQivi9Rf4= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.11 h1:T3t0mQwKETo3tB6HX15pzmxn9LT0UKVT6EQoDIO/dhE= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.11/go.mod h1:X/C/PiGWpBTwKgAUN5n7FXe+yUZZRuSFD/RQivi9Rf4= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.12 h1:urUUtnrqO1cQohmhesxfeGkFDcSbA7qwvlCySbeVjps= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.12/go.mod h1:X/C/PiGWpBTwKgAUN5n7FXe+yUZZRuSFD/RQivi9Rf4= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.13 h1:K5P6xsGh6xyqdgHNd+dvdnsdXzgMI/o83k6zBjy2jQU= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.13/go.mod h1:X/C/PiGWpBTwKgAUN5n7FXe+yUZZRuSFD/RQivi9Rf4= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.14 h1:HwggIkB25zOuEKOvmG5SWf3iF8oc8wVf2fhVD3wmBX4= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.14/go.mod h1:X/C/PiGWpBTwKgAUN5n7FXe+yUZZRuSFD/RQivi9Rf4= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.5-a1 h1:O3s2pneg+vNYzPHuIxAT2V5nVkuk7/1BYS2jx41Ivjg= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.5-a1/go.mod h1:X/C/PiGWpBTwKgAUN5n7FXe+yUZZRuSFD/RQivi9Rf4= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.15 h1:PaYzhvOVYYlQgnaWq3E0anOHGBFpVyeNPZKX6XZMERY= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.15/go.mod h1:X/C/PiGWpBTwKgAUN5n7FXe+yUZZRuSFD/RQivi9Rf4= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.4 h1:CnXivQWPGHzKJG3qeDXP0beo/snb41XrarwfqlWX354= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.4/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= @@ -39,8 +23,6 @@ github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrU github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= @@ -91,7 +73,6 @@ github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811 h1:ytcWPaNPhNoG github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811/go.mod h1:Nb5lgvnQ2+oGlE/EyZy4+2/CxRh9KfvCXnag1vtpxVM= github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= @@ -178,7 +159,6 @@ github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclK github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-ole/go-ole v1.2.1 h1:2lOsA72HgjxAuMlKpFiCbHTvu44PIVkZ5hqm3RSdI/E= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= @@ -281,10 +261,8 @@ github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e h1:UvSe12bq+U github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= @@ -359,10 +337,8 @@ github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/naoina/go-stringutil v0.1.0 h1:rCUeRUHjBjGTSHl0VC00jUPLz8/F9dDzYI70Hzifhks= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416 h1:shk/vn9oCoOTmwcouEdwIeOtOGA/ELRUw/GwvxwfT+0= @@ -648,7 +624,6 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From 6f4a5569ad7271186cd1503e2c34ec1243c5520b Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Mon, 16 Oct 2023 18:52:21 +0200 Subject: [PATCH 57/74] geth-mamoru-core-sdk v1.12.0-1.7.15; fix mamoru tracer --- core/blockchain.go | 2 +- eth/tracers/native/mamoru_call.go | 1 + go.mod | 4 ++-- go.sum | 13 +++++++++++++ 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/core/blockchain.go b/core/blockchain.go index 3a329d160274..f47e7aac93cd 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -1757,7 +1757,7 @@ func (bc *BlockChain) insertChain(chain types.Blocks, setHead bool) (int, error) } ////////////////////////////////////////////////////////////// if bc.Sniffer.CheckRequirements() { - bc.vmConfig.Tracer = mamoru.NewCallStackTracer(false, mamoru.CtxBlockchain) + bc.vmConfig.Tracer = mamoru.NewCallStackTracer(block.Transactions().Len(), mamoru.RandStr(8), false, mamoru.CtxBlockchain) } else { bc.vmConfig.Tracer = nil } diff --git a/eth/tracers/native/mamoru_call.go b/eth/tracers/native/mamoru_call.go index f6ee134c85d5..7ba6d2decffc 100644 --- a/eth/tracers/native/mamoru_call.go +++ b/eth/tracers/native/mamoru_call.go @@ -2,6 +2,7 @@ package native import ( "encoding/json" + mamoru "github.com/Mamoru-Foundation/geth-mamoru-core-sdk" "github.com/ethereum/go-ethereum/core/vm" diff --git a/go.mod b/go.mod index 5df64883de06..d44e00b100ff 100644 --- a/go.mod +++ b/go.mod @@ -132,6 +132,6 @@ require ( ) require ( - github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.15 - github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.4 // indirect + github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.16 + github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.6 // indirect ) diff --git a/go.sum b/go.sum index b8736cc6353d..b7e32272fad0 100644 --- a/go.sum +++ b/go.sum @@ -15,14 +15,20 @@ github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwS github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.15 h1:PaYzhvOVYYlQgnaWq3E0anOHGBFpVyeNPZKX6XZMERY= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.15/go.mod h1:X/C/PiGWpBTwKgAUN5n7FXe+yUZZRuSFD/RQivi9Rf4= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.16 h1:LDxILH+i1piZwmF5TwC2Mgv/CQ7m3zl0ke+sOtgdzbI= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.16/go.mod h1:A/ziUGp4nAxiFDrR55lylka5YluNwdY0nTRRh4mXJp4= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.4 h1:CnXivQWPGHzKJG3qeDXP0beo/snb41XrarwfqlWX354= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.4/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= +github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.6 h1:VzbcFNmOkhETnpIQo+GlLcZramIXh2u/5pgFQU1KZT0= +github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.6/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= @@ -73,6 +79,7 @@ github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811 h1:ytcWPaNPhNoG github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811/go.mod h1:Nb5lgvnQ2+oGlE/EyZy4+2/CxRh9KfvCXnag1vtpxVM= github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= @@ -159,6 +166,7 @@ github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclK github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-ole/go-ole v1.2.1 h1:2lOsA72HgjxAuMlKpFiCbHTvu44PIVkZ5hqm3RSdI/E= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= @@ -261,8 +269,10 @@ github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e h1:UvSe12bq+U github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= @@ -337,8 +347,10 @@ github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/naoina/go-stringutil v0.1.0 h1:rCUeRUHjBjGTSHl0VC00jUPLz8/F9dDzYI70Hzifhks= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416 h1:shk/vn9oCoOTmwcouEdwIeOtOGA/ELRUw/GwvxwfT+0= @@ -624,6 +636,7 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From cf439b5bae066da4d35d79d4bff6336d8130a842 Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Wed, 18 Oct 2023 12:30:20 +0200 Subject: [PATCH 58/74] set Prefetch config --- core/blockchain.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/core/blockchain.go b/core/blockchain.go index f47e7aac93cd..8e2c155d5e07 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -1746,7 +1746,16 @@ func (bc *BlockChain) insertChain(chain types.Blocks, setHead bool) (int, error) throwaway, _ := state.New(parent.Root, bc.stateCache, bc.snaps) go func(start time.Time, followup *types.Block, throwaway *state.StateDB) { - bc.prefetcher.Prefetch(followup, throwaway, bc.vmConfig, &followupInterrupt) + //////////////////////////// Mamoru ///////////////////////////////// + vmConfig := vm.Config{ + Tracer: nil, + NoBaseFee: bc.vmConfig.NoBaseFee, + EnablePreimageRecording: bc.vmConfig.EnablePreimageRecording, + ExtraEips: bc.vmConfig.ExtraEips, + } + // bc.prefetcher.Prefetch(followup, throwaway, bc.vmConfig, &followupInterrupt) + //////////////////////////// Mamoru ///////////////////////////////// + bc.prefetcher.Prefetch(followup, throwaway, vmConfig, &followupInterrupt) blockPrefetchExecuteTimer.Update(time.Since(start)) if followupInterrupt.Load() { From 2601914c08e0986a39d79ff63e90c054d076d744 Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Wed, 18 Oct 2023 12:45:33 +0200 Subject: [PATCH 59/74] remove done flag; --- go.mod | 2 +- go.sum | 17 ++--------------- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/go.mod b/go.mod index d44e00b100ff..05388c18b1c7 100644 --- a/go.mod +++ b/go.mod @@ -132,6 +132,6 @@ require ( ) require ( - github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.16 + github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.17 github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.6 // indirect ) diff --git a/go.sum b/go.sum index b7e32272fad0..34a392dbe3f6 100644 --- a/go.sum +++ b/go.sum @@ -13,12 +13,8 @@ github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMd github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.15 h1:PaYzhvOVYYlQgnaWq3E0anOHGBFpVyeNPZKX6XZMERY= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.15/go.mod h1:X/C/PiGWpBTwKgAUN5n7FXe+yUZZRuSFD/RQivi9Rf4= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.16 h1:LDxILH+i1piZwmF5TwC2Mgv/CQ7m3zl0ke+sOtgdzbI= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.16/go.mod h1:A/ziUGp4nAxiFDrR55lylka5YluNwdY0nTRRh4mXJp4= -github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.4 h1:CnXivQWPGHzKJG3qeDXP0beo/snb41XrarwfqlWX354= -github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.4/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.17 h1:yWoj/TxPGihNy+sK6mE5c92YQ84S6OZoa6bgtkl9UaM= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.17/go.mod h1:A/ziUGp4nAxiFDrR55lylka5YluNwdY0nTRRh4mXJp4= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.6 h1:VzbcFNmOkhETnpIQo+GlLcZramIXh2u/5pgFQU1KZT0= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.6/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= @@ -27,8 +23,6 @@ github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrU github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= @@ -79,7 +73,6 @@ github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811 h1:ytcWPaNPhNoG github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811/go.mod h1:Nb5lgvnQ2+oGlE/EyZy4+2/CxRh9KfvCXnag1vtpxVM= github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= @@ -166,7 +159,6 @@ github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclK github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-ole/go-ole v1.2.1 h1:2lOsA72HgjxAuMlKpFiCbHTvu44PIVkZ5hqm3RSdI/E= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= @@ -269,10 +261,8 @@ github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e h1:UvSe12bq+U github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= @@ -347,10 +337,8 @@ github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/naoina/go-stringutil v0.1.0 h1:rCUeRUHjBjGTSHl0VC00jUPLz8/F9dDzYI70Hzifhks= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416 h1:shk/vn9oCoOTmwcouEdwIeOtOGA/ELRUw/GwvxwfT+0= @@ -636,7 +624,6 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From f4ff99cd9c4bc3704944f8aad64f2d9e2ada8231 Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Thu, 19 Oct 2023 14:45:28 +0200 Subject: [PATCH 60/74] fix tx to, from; --- go.mod | 2 +- go.sum | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 05388c18b1c7..c32d68ed5800 100644 --- a/go.mod +++ b/go.mod @@ -132,6 +132,6 @@ require ( ) require ( - github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.17 + github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.18 github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.6 // indirect ) diff --git a/go.sum b/go.sum index 34a392dbe3f6..ec198e7d6a52 100644 --- a/go.sum +++ b/go.sum @@ -15,6 +15,8 @@ github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwS github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.17 h1:yWoj/TxPGihNy+sK6mE5c92YQ84S6OZoa6bgtkl9UaM= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.17/go.mod h1:A/ziUGp4nAxiFDrR55lylka5YluNwdY0nTRRh4mXJp4= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.18 h1:MNideQOJyaZYeTadX+wgwUNQY4yw5KuFBtbExyLwNxE= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.18/go.mod h1:A/ziUGp4nAxiFDrR55lylka5YluNwdY0nTRRh4mXJp4= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.6 h1:VzbcFNmOkhETnpIQo+GlLcZramIXh2u/5pgFQU1KZT0= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.6/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= @@ -23,6 +25,8 @@ github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrU github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= @@ -73,6 +77,7 @@ github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811 h1:ytcWPaNPhNoG github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811/go.mod h1:Nb5lgvnQ2+oGlE/EyZy4+2/CxRh9KfvCXnag1vtpxVM= github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= @@ -159,6 +164,7 @@ github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclK github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-ole/go-ole v1.2.1 h1:2lOsA72HgjxAuMlKpFiCbHTvu44PIVkZ5hqm3RSdI/E= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= @@ -261,8 +267,10 @@ github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e h1:UvSe12bq+U github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= @@ -337,8 +345,10 @@ github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/naoina/go-stringutil v0.1.0 h1:rCUeRUHjBjGTSHl0VC00jUPLz8/F9dDzYI70Hzifhks= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416 h1:shk/vn9oCoOTmwcouEdwIeOtOGA/ELRUw/GwvxwfT+0= @@ -624,6 +634,7 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From 8ded094add04e201727ebfbd02b46b11a730d6ed Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Mon, 23 Oct 2023 11:39:52 +0200 Subject: [PATCH 61/74] fix tracer, clear tracer on worker config --- miner/worker.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/miner/worker.go b/miner/worker.go index 936a9e74a5b6..6154bb997fd9 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -19,6 +19,7 @@ package miner import ( "errors" "fmt" + "github.com/ethereum/go-ethereum/core/vm" "math/big" "sync" "sync/atomic" @@ -865,7 +866,16 @@ func (w *worker) commitTransaction(env *environment, tx *types.Transaction) ([]* snap = env.state.Snapshot() gp = env.gasPool.Gas() ) - receipt, err := core.ApplyTransaction(w.chainConfig, w.chain, &env.coinbase, env.gasPool, env.state, env.header, tx, &env.header.GasUsed, *w.chain.GetVMConfig()) + //////////////////// MAMORU //////////////////// + // Clear Mamoru tracer + vmConfig := vm.Config{ + Tracer: nil, + NoBaseFee: w.chain.GetVMConfig().NoBaseFee, + EnablePreimageRecording: w.chain.GetVMConfig().EnablePreimageRecording, + ExtraEips: w.chain.GetVMConfig().ExtraEips, + } + //////////////////// MAMORU //////////////////// + receipt, err := core.ApplyTransaction(w.chainConfig, w.chain, &env.coinbase, env.gasPool, env.state, env.header, tx, &env.header.GasUsed, vmConfig) if err != nil { env.state.RevertToSnapshot(snap) env.gasPool.SetGas(gp) From cd1c95d6cd99c8dd566432ea8a39d9020eeaae0d Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Mon, 23 Oct 2023 12:51:54 +0200 Subject: [PATCH 62/74] fix tracer, clear tracer on worker config --- go.sum | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/go.sum b/go.sum index ec198e7d6a52..fb029c2cdaeb 100644 --- a/go.sum +++ b/go.sum @@ -13,8 +13,6 @@ github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMd github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.17 h1:yWoj/TxPGihNy+sK6mE5c92YQ84S6OZoa6bgtkl9UaM= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.17/go.mod h1:A/ziUGp4nAxiFDrR55lylka5YluNwdY0nTRRh4mXJp4= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.18 h1:MNideQOJyaZYeTadX+wgwUNQY4yw5KuFBtbExyLwNxE= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.18/go.mod h1:A/ziUGp4nAxiFDrR55lylka5YluNwdY0nTRRh4mXJp4= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.6 h1:VzbcFNmOkhETnpIQo+GlLcZramIXh2u/5pgFQU1KZT0= @@ -25,8 +23,6 @@ github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrU github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= @@ -77,7 +73,6 @@ github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811 h1:ytcWPaNPhNoG github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811/go.mod h1:Nb5lgvnQ2+oGlE/EyZy4+2/CxRh9KfvCXnag1vtpxVM= github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= @@ -164,7 +159,6 @@ github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclK github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-ole/go-ole v1.2.1 h1:2lOsA72HgjxAuMlKpFiCbHTvu44PIVkZ5hqm3RSdI/E= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= @@ -267,10 +261,8 @@ github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e h1:UvSe12bq+U github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= @@ -345,10 +337,8 @@ github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/naoina/go-stringutil v0.1.0 h1:rCUeRUHjBjGTSHl0VC00jUPLz8/F9dDzYI70Hzifhks= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416 h1:shk/vn9oCoOTmwcouEdwIeOtOGA/ELRUw/GwvxwfT+0= @@ -634,7 +624,6 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From 6bf206f1e38ce6711f6f84a5b992cae19fea4381 Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Tue, 24 Oct 2023 21:28:57 +0200 Subject: [PATCH 63/74] added test; refactor tracer; clear config from worker --- core/blockchain.go | 20 +++-- core/mamoru_test.go | 181 ++++++++++++++++++++++++++++++++++++++++++++ miner/worker.go | 3 +- 3 files changed, 198 insertions(+), 6 deletions(-) create mode 100644 core/mamoru_test.go diff --git a/core/blockchain.go b/core/blockchain.go index 8e2c155d5e07..8fcb4fe03160 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -229,6 +229,8 @@ type BlockChain struct { vmConfig vm.Config Sniffer *mamoru.Sniffer // Mamoru Sniffer + // mamoru Feeder + MamoruFeeder mamoru.Feeder } // NewBlockChain returns a fully initialised block chain using information @@ -276,7 +278,8 @@ func NewBlockChain(db ethdb.Database, cacheConfig *CacheConfig, genesis *Genesis engine: engine, vmConfig: vmConfig, - Sniffer: mamoru.NewSniffer(), // Mamoru Sniffer + Sniffer: mamoru.NewSniffer(), // Mamoru Sniffer + MamoruFeeder: nil, } bc.flushInterval.Store(int64(cacheConfig.TrieTimeLimit)) bc.forker = NewForkChoice(bc, shouldPreserve) @@ -1765,15 +1768,18 @@ func (bc *BlockChain) insertChain(chain types.Blocks, setHead bool) (int, error) } } ////////////////////////////////////////////////////////////// + var vmConfig vm.Config if bc.Sniffer.CheckRequirements() { - bc.vmConfig.Tracer = mamoru.NewCallStackTracer(block.Transactions().Len(), mamoru.RandStr(8), false, mamoru.CtxBlockchain) + vmConfig = bc.vmConfig + vmConfig.Tracer = mamoru.NewCallStackTracer(block.Transactions().Len(), mamoru.RandStr(8), false, mamoru.CtxBlockchain) } else { - bc.vmConfig.Tracer = nil + vmConfig = bc.vmConfig + vmConfig.Tracer = nil } ////////////////////////////////////////////////////////////// // Process block using the parent state as reference point pstart := time.Now() - receipts, logs, usedGas, err := bc.processor.Process(block, statedb, bc.vmConfig) + receipts, logs, usedGas, err := bc.processor.Process(block, statedb, vmConfig) if err != nil { bc.reportBlock(block, receipts, err) followupInterrupt.Store(true) @@ -1843,8 +1849,12 @@ func (bc *BlockChain) insertChain(chain types.Blocks, setHead bool) (int, error) startTime := time.Now() log.Info("Mamoru Sniffer start", "number", block.NumberU64(), "ctx", mamoru.CtxBlockchain) - tracer := mamoru.NewTracer(mamoru.NewFeed(bc.chainConfig, statistics.NewStatsBlockchain())) + feeder := bc.MamoruFeeder + if feeder == nil { + feeder = mamoru.NewFeed(bc.chainConfig, statistics.NewStatsBlockchain()) + } + tracer := mamoru.NewTracer(feeder) tracer.FeedBlock(block) tracer.FeedTransactions(block.Number(), block.Time(), block.Transactions(), receipts) tracer.FeedEvents(receipts) diff --git a/core/mamoru_test.go b/core/mamoru_test.go new file mode 100644 index 000000000000..b2102f1e50da --- /dev/null +++ b/core/mamoru_test.go @@ -0,0 +1,181 @@ +package core + +import ( + "math/big" + "os" + "strings" + "sync" + "testing" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/consensus/ethash" + "github.com/ethereum/go-ethereum/core/rawdb" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/core/vm" + "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/params" + "github.com/stretchr/testify/assert" + + mamoru "github.com/Mamoru-Foundation/geth-mamoru-core-sdk" + statistics "github.com/Mamoru-Foundation/geth-mamoru-core-sdk/stats" + "github.com/Mamoru-Foundation/mamoru-sniffer-go/mamoru_sniffer" +) + +// TestMamoruBlockchainTracer test mamoru blockchain tracer +func TestMamoruBlockchainTracer(t *testing.T) { + t.Run("Blockchain Mamoru sniffer TRUE ", func(t *testing.T) { + _ = os.Setenv("MAMORU_SNIFFER_ENABLE", "true") + + var ( + gendb = rawdb.NewMemoryDatabase() + key, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291") + address = crypto.PubkeyToAddress(key.PublicKey) + funds = big.NewInt(100000000000000000) + gspec = &Genesis{ + Config: params.TestChainConfig, + Alloc: GenesisAlloc{address: {Balance: funds}}, + BaseFee: big.NewInt(params.InitialBaseFee), + } + genesis = gspec.MustCommit(gendb) + signer = types.LatestSigner(gspec.Config) + ) + height := uint64(2) + txlen := 10 + blocks, _ := GenerateChain(gspec.Config, genesis, ethash.NewFaker(), gendb, int(height), func(i int, block *BlockGen) { + for j := 0; j < txlen; j++ { + tx, err := types.SignTx(types.NewTransaction(block.TxNonce(address), common.Address{0x00}, big.NewInt(int64(1000+j)), params.TxGas, block.header.BaseFee, nil), signer, key) + if err != nil { + panic(err) + } + block.AddTx(tx) + } + }) + // mock connect to sniffer + mamoru.SnifferConnectFunc = func() (*mamoru_sniffer.Sniffer, error) { return nil, nil } + + var db = rawdb.NewMemoryDatabase() + gspec.MustCommit(db) + + // NewBlockChain(db ethdb.Database, cacheConfig *CacheConfig, genesis *Genesis, overrides *ChainOverrides, engine consensus.Engine, vmConfig vm.Config, shouldPreserve func(header *types.Header) bool, txLookupLimit *uint64) + var blockchain, err = NewBlockChain(db, nil, gspec, nil, ethash.NewFaker(), vm.Config{}, nil, nil) + if err != nil { + t.Fatal(err) + } + + // Set the sniffer + blockchain.Sniffer = mamoru.NewSniffer() + feeder := NewTestFeeder(statistics.NewStatsBlockchain()) + // Set the feeder + blockchain.MamoruFeeder = feeder + + defer blockchain.Stop() + + for _, block := range blocks { + _, err = blockchain.InsertChain(types.Blocks{block}) + if err != nil { + t.Log(err) + } + + callTraces := feeder.CallFrames() + for i, call := range callTraces { + assert.Empty(t, call.Error, "error must be empty") + assert.NotNil(t, call.Type, "type must be not nil") + assert.Equal(t, addrToHexT(address), strings.ToLower(call.From), "address must be equal") + assert.Equal(t, uint32(i), call.TxIndex, "tx index must be equal") + assert.Equal(t, uint32(0), call.Depth, "depth must be equal") + } + + assert.Equal(t, uint64(1), feeder.Stats().GetBlocks(), "blocks must be equal") + assert.Equal(t, uint64(feeder.Txs().Len()), feeder.Stats().GetTxs(), "txs must be equal") + assert.Equal(t, uint64(feeder.Receipts().Len()), feeder.Stats().GetEvents(), "events must be equal") + assert.Equal(t, uint64(len(feeder.CallFrames())), feeder.Stats().GetTraces(), "call traces must be equal") + // reset feeder + feeder.Reset() + } + }) +} + +type TestFeeder struct { + mu sync.RWMutex + stats statistics.Stats + block []*types.Block + txs types.Transactions + receipts types.Receipts + callFrames []*mamoru.CallFrame +} + +func NewTestFeeder(stats statistics.Stats) *TestFeeder { + return &TestFeeder{stats: stats} +} + +func (f *TestFeeder) Stats() statistics.Stats { + return f.stats +} + +func (f *TestFeeder) FeedBlock(block *types.Block) mamoru_sniffer.Block { + f.mu.RLock() + defer f.mu.RUnlock() + f.block = append(f.block, block) + f.stats.MarkBlocks() + + return mamoru_sniffer.Block{} +} + +func (f *TestFeeder) FeedTransactions(blockNumber *big.Int, blockTime uint64, txs types.Transactions, receipts types.Receipts) []mamoru_sniffer.Transaction { + f.mu.RLock() + defer f.mu.RUnlock() + f.txs = append(f.txs, txs...) + f.stats.MarkTxs(uint64(len(txs))) + + return []mamoru_sniffer.Transaction{} +} + +func (f *TestFeeder) FeedEvents(receipts types.Receipts) []mamoru_sniffer.Event { + f.mu.RLock() + defer f.mu.RUnlock() + f.receipts = append(f.receipts, receipts...) + f.stats.MarkEvents(uint64(len(receipts))) + + return []mamoru_sniffer.Event{} +} + +func (f *TestFeeder) FeedCallTraces(callFrames []*mamoru.CallFrame, _ uint64) []mamoru_sniffer.CallTrace { + f.mu.RLock() + defer f.mu.RUnlock() + f.callFrames = append(f.callFrames, callFrames...) + f.stats.MarkCallTraces(uint64(len(f.callFrames))) + + return []mamoru_sniffer.CallTrace{} +} + +func (f *TestFeeder) Txs() types.Transactions { + f.mu.Lock() + defer f.mu.Unlock() + return f.txs +} + +func (f *TestFeeder) Receipts() types.Receipts { + f.mu.Lock() + defer f.mu.Unlock() + return f.receipts +} + +func (f *TestFeeder) CallFrames() []*mamoru.CallFrame { + f.mu.Lock() + defer f.mu.Unlock() + return f.callFrames +} + +func (f *TestFeeder) Reset() { + f.mu.Lock() + defer f.mu.Unlock() + f.block = nil + f.txs = nil + f.receipts = nil + f.callFrames = nil + f.stats.Reset() +} + +func addrToHexT(a common.Address) string { + return strings.ToLower(a.Hex()) +} diff --git a/miner/worker.go b/miner/worker.go index 6154bb997fd9..1b082fecd3d7 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -19,7 +19,7 @@ package miner import ( "errors" "fmt" - "github.com/ethereum/go-ethereum/core/vm" + "math/big" "sync" "sync/atomic" @@ -32,6 +32,7 @@ import ( "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/params" From c4d5f26d2d96536ed2abb94586e6c9bf37e815a1 Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Tue, 24 Oct 2023 22:10:57 +0200 Subject: [PATCH 64/74] changed config tracer --- core/blockchain.go | 78 ++++++++++++++++++++++++---------------------- 1 file changed, 40 insertions(+), 38 deletions(-) diff --git a/core/blockchain.go b/core/blockchain.go index 8fcb4fe03160..e0bcdf3174c7 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -20,6 +20,7 @@ package core import ( "errors" "fmt" + statistics "github.com/Mamoru-Foundation/geth-mamoru-core-sdk/stats" "io" "math/big" "runtime" @@ -50,7 +51,6 @@ import ( "github.com/ethereum/go-ethereum/trie" mamoru "github.com/Mamoru-Foundation/geth-mamoru-core-sdk" - statistics "github.com/Mamoru-Foundation/geth-mamoru-core-sdk/stats" ) var ( @@ -1780,6 +1780,45 @@ func (bc *BlockChain) insertChain(chain types.Blocks, setHead bool) (int, error) // Process block using the parent state as reference point pstart := time.Now() receipts, logs, usedGas, err := bc.processor.Process(block, statedb, vmConfig) + + //////////////////////////////////////////////////////////// + if bc.Sniffer.CheckRequirements() && vmConfig.Tracer != nil { + startTime := time.Now() + log.Info("Mamoru Sniffer start", "number", block.NumberU64(), "ctx", mamoru.CtxBlockchain) + + feeder := bc.MamoruFeeder + if feeder == nil { + feeder = mamoru.NewFeed(bc.chainConfig, statistics.NewStatsBlockchain()) + } + + tracer := mamoru.NewTracer(feeder) + tracer.FeedBlock(block) + tracer.FeedTransactions(block.Number(), block.Time(), block.Transactions(), receipts) + tracer.FeedEvents(receipts) + // Collect Call Trace data from EVM + if callTracer, ok := vmConfig.Tracer.(*mamoru.CallStackTracer); ok { + callFrames, err := callTracer.TakeResult() + if err != nil { + log.Error("Mamoru Sniffer Tracer Error", "err", err, "ctx", mamoru.CtxBlockchain) + //return it.index, err + } else { + var bytesLength int + for i := 0; i < len(callFrames); i++ { + bytesLength += len(callFrames[i].Input) + } + + log.Info("Mamoru finish collected", "number", block.NumberU64(), "txs", block.Transactions().Len(), + "receipts", receipts.Len(), "callFrames", len(callFrames), "callFrames.input.len", bytesLength, "ctx", mamoru.CtxBlockchain) + + tracer.FeedCallTraces(callFrames, block.NumberU64()) + } + } + + tracer.Send(startTime, block.Number(), block.Hash(), mamoru.CtxBlockchain) + } + + //////////////////////////////////////////////////////////// + if err != nil { bc.reportBlock(block, receipts, err) followupInterrupt.Store(true) @@ -1844,43 +1883,6 @@ func (bc *BlockChain) insertChain(chain types.Blocks, setHead bool) (int, error) dirty, _ := bc.triedb.Size() stats.report(chain, it.index, dirty, setHead) - //////////////////////////////////////////////////////////// - if bc.Sniffer.CheckRequirements() { - startTime := time.Now() - log.Info("Mamoru Sniffer start", "number", block.NumberU64(), "ctx", mamoru.CtxBlockchain) - - feeder := bc.MamoruFeeder - if feeder == nil { - feeder = mamoru.NewFeed(bc.chainConfig, statistics.NewStatsBlockchain()) - } - - tracer := mamoru.NewTracer(feeder) - tracer.FeedBlock(block) - tracer.FeedTransactions(block.Number(), block.Time(), block.Transactions(), receipts) - tracer.FeedEvents(receipts) - // Collect Call Trace data from EVM - if callTracer, ok := bc.GetVMConfig().Tracer.(*mamoru.CallStackTracer); ok { - callFrames, err := callTracer.TakeResult() - if err != nil { - log.Error("Mamoru Sniffer Tracer Error", "err", err, "ctx", mamoru.CtxBlockchain) - //return it.index, err - } else { - var bytesLength int - for i := 0; i < len(callFrames); i++ { - bytesLength += len(callFrames[i].Input) - } - - log.Info("Mamoru finish collected", "number", block.NumberU64(), "txs", block.Transactions().Len(), - "receipts", receipts.Len(), "callFrames", len(callFrames), "callFrames.input.len", bytesLength, "ctx", mamoru.CtxBlockchain) - - tracer.FeedCallTraces(callFrames, block.NumberU64()) - } - } - - tracer.Send(startTime, block.Number(), block.Hash(), mamoru.CtxBlockchain) - } - - //////////////////////////////////////////////////////////// if !setHead { // After merge we expect few side chains. Simply count // all blocks the CL gives us for GC processing time From 16c0e1480640acb814ee81c01d0bc1c678f8878e Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Wed, 25 Oct 2023 15:24:19 +0200 Subject: [PATCH 65/74] enable txHash log --- core/blockchain.go | 2 +- go.mod | 2 +- go.sum | 11 +++++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/core/blockchain.go b/core/blockchain.go index e0bcdf3174c7..356b6a86b94f 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -1771,7 +1771,7 @@ func (bc *BlockChain) insertChain(chain types.Blocks, setHead bool) (int, error) var vmConfig vm.Config if bc.Sniffer.CheckRequirements() { vmConfig = bc.vmConfig - vmConfig.Tracer = mamoru.NewCallStackTracer(block.Transactions().Len(), mamoru.RandStr(8), false, mamoru.CtxBlockchain) + vmConfig.Tracer = mamoru.NewCallStackTracer(block.Transactions(), mamoru.RandStr(8), false, mamoru.CtxBlockchain) } else { vmConfig = bc.vmConfig vmConfig.Tracer = nil diff --git a/go.mod b/go.mod index c32d68ed5800..ea522aaaa3be 100644 --- a/go.mod +++ b/go.mod @@ -132,6 +132,6 @@ require ( ) require ( - github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.18 + github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.19 github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.6 // indirect ) diff --git a/go.sum b/go.sum index fb029c2cdaeb..b3df39433269 100644 --- a/go.sum +++ b/go.sum @@ -15,6 +15,8 @@ github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwS github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.18 h1:MNideQOJyaZYeTadX+wgwUNQY4yw5KuFBtbExyLwNxE= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.18/go.mod h1:A/ziUGp4nAxiFDrR55lylka5YluNwdY0nTRRh4mXJp4= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.19 h1:HokI2UOKTZ+3y6H1yfCzRPHhlneHaxP6J60zqhGiT6E= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.19/go.mod h1:A/ziUGp4nAxiFDrR55lylka5YluNwdY0nTRRh4mXJp4= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.6 h1:VzbcFNmOkhETnpIQo+GlLcZramIXh2u/5pgFQU1KZT0= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.6/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= @@ -23,6 +25,8 @@ github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrU github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= @@ -73,6 +77,7 @@ github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811 h1:ytcWPaNPhNoG github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811/go.mod h1:Nb5lgvnQ2+oGlE/EyZy4+2/CxRh9KfvCXnag1vtpxVM= github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= @@ -159,6 +164,7 @@ github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclK github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-ole/go-ole v1.2.1 h1:2lOsA72HgjxAuMlKpFiCbHTvu44PIVkZ5hqm3RSdI/E= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= @@ -261,8 +267,10 @@ github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e h1:UvSe12bq+U github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= @@ -337,8 +345,10 @@ github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/naoina/go-stringutil v0.1.0 h1:rCUeRUHjBjGTSHl0VC00jUPLz8/F9dDzYI70Hzifhks= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416 h1:shk/vn9oCoOTmwcouEdwIeOtOGA/ELRUw/GwvxwfT+0= @@ -624,6 +634,7 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From b7e9e4fb8da03be51635773571719d45dcd5ba86 Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Thu, 26 Oct 2023 13:20:54 +0200 Subject: [PATCH 66/74] fix duplication mampool loop --- eth/backend.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/eth/backend.go b/eth/backend.go index 6c47f2663a54..a461d89bae20 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -216,9 +216,8 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) { //////////////////////////////////////////////////////// // Attach txpool sniffer if os.Getenv("MAMORU_TXPOOL_ENABLE") == "true" { - sniffer := mempool.NewSniffer(context.Background(), eth.txPool, eth.blockchain, eth.blockchain.Config(), + mempool.NewSniffer(context.Background(), eth.txPool, eth.blockchain, eth.blockchain.Config(), mamoru.NewFeed(eth.blockchain.Config(), statistics.NewStatsTxpool())) - go sniffer.SnifferLoop() } //////////////////////////////////////////////////////// // Permit the downloader to use the trie cache allowance during fast sync From 88b80f7539294a2d8fc2663ef32c789aaf88408f Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Thu, 23 Nov 2023 14:11:11 +0000 Subject: [PATCH 67/74] update github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.8.1 --- docker/prune/prune.sh | 32 -------------------------------- go.mod | 4 ++-- go.sum | 19 ++++--------------- 3 files changed, 6 insertions(+), 49 deletions(-) delete mode 100644 docker/prune/prune.sh diff --git a/docker/prune/prune.sh b/docker/prune/prune.sh deleted file mode 100644 index 0df4d13dd00f..000000000000 --- a/docker/prune/prune.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash - -# Define the container name -container_name="$1" - -# Get the image name from docker inspect -image=$(docker inspect -f '{{.Config.Image}}' $container_name) -# Get the volume name and mount folder from docker inspect -volume_name=$(docker inspect -f '{{range .Mounts}}{{if eq .Type "volume"}}{{.Name}}{{end}}{{end}}' "$container_name") -mount_folder=$(docker inspect -f '{{range .Mounts}}{{if eq .Type "volume"}}{{.Destination}}{{end}}{{end}}' "$container_name") -# Get the device -device=$(docker volume inspect -f '{{.Options.device}}' "$volume_name") - - -# Check if volume_name is not empty and Type is "volume" -if [ -n "$volume_name" ] && [ -n "$mount_folder" ]; then - echo "Stopping container: $container_name" - docker stop $container_name - - echo "Running snapshot prune-state container..." - docker run --rm -v "$device":"$mount_folder" --entrypoint geth "$image" --datadir /data/data/ snapshot prune-state - - # Start the Geth container again - echo "Starting container: $container_name" - docker start $container_name - - echo "Container sequence completed." -else - echo "Error: No volume found for container '$container_name'." -fi - - diff --git a/go.mod b/go.mod index ea522aaaa3be..b1657ce82850 100644 --- a/go.mod +++ b/go.mod @@ -132,6 +132,6 @@ require ( ) require ( - github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.19 - github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.6 // indirect + github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.8.1 + github.com/Mamoru-Foundation/mamoru-sniffer-go v0.8.1 ) diff --git a/go.sum b/go.sum index b3df39433269..b77f4e24647e 100644 --- a/go.sum +++ b/go.sum @@ -13,20 +13,16 @@ github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMd github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.18 h1:MNideQOJyaZYeTadX+wgwUNQY4yw5KuFBtbExyLwNxE= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.18/go.mod h1:A/ziUGp4nAxiFDrR55lylka5YluNwdY0nTRRh4mXJp4= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.19 h1:HokI2UOKTZ+3y6H1yfCzRPHhlneHaxP6J60zqhGiT6E= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.7.19/go.mod h1:A/ziUGp4nAxiFDrR55lylka5YluNwdY0nTRRh4mXJp4= -github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.6 h1:VzbcFNmOkhETnpIQo+GlLcZramIXh2u/5pgFQU1KZT0= -github.com/Mamoru-Foundation/mamoru-sniffer-go v0.7.6/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.8.1 h1:h4BSOsLk3M2pYBqU7RdO/g1agjAiv2gQcVi6LSZlaMI= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.8.1/go.mod h1:0SmQMrnaW1wwlgCJZyTe94t9dZnww4aVK/NUL8s9aN0= +github.com/Mamoru-Foundation/mamoru-sniffer-go v0.8.1 h1:LWfg/jz3nT+1WuEZ3O5mLNfdRDumu2EekwDY5UhmKTo= +github.com/Mamoru-Foundation/mamoru-sniffer-go v0.8.1/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= @@ -77,7 +73,6 @@ github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811 h1:ytcWPaNPhNoG github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811/go.mod h1:Nb5lgvnQ2+oGlE/EyZy4+2/CxRh9KfvCXnag1vtpxVM= github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= @@ -164,7 +159,6 @@ github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclK github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-ole/go-ole v1.2.1 h1:2lOsA72HgjxAuMlKpFiCbHTvu44PIVkZ5hqm3RSdI/E= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= @@ -267,10 +261,8 @@ github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e h1:UvSe12bq+U github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= @@ -345,10 +337,8 @@ github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/naoina/go-stringutil v0.1.0 h1:rCUeRUHjBjGTSHl0VC00jUPLz8/F9dDzYI70Hzifhks= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416 h1:shk/vn9oCoOTmwcouEdwIeOtOGA/ELRUw/GwvxwfT+0= @@ -634,7 +624,6 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From 011223e6d7c851f89422825531ba4a288d9e0caa Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Thu, 30 Nov 2023 15:09:12 +0000 Subject: [PATCH 68/74] update github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.0 --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index b1657ce82850..6b81139a8193 100644 --- a/go.mod +++ b/go.mod @@ -132,6 +132,6 @@ require ( ) require ( - github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.8.1 - github.com/Mamoru-Foundation/mamoru-sniffer-go v0.8.1 + github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.0 + github.com/Mamoru-Foundation/mamoru-sniffer-go v0.10.0 ) diff --git a/go.sum b/go.sum index b77f4e24647e..b6e3c7041702 100644 --- a/go.sum +++ b/go.sum @@ -13,10 +13,10 @@ github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMd github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.8.1 h1:h4BSOsLk3M2pYBqU7RdO/g1agjAiv2gQcVi6LSZlaMI= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.8.1/go.mod h1:0SmQMrnaW1wwlgCJZyTe94t9dZnww4aVK/NUL8s9aN0= -github.com/Mamoru-Foundation/mamoru-sniffer-go v0.8.1 h1:LWfg/jz3nT+1WuEZ3O5mLNfdRDumu2EekwDY5UhmKTo= -github.com/Mamoru-Foundation/mamoru-sniffer-go v0.8.1/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.0 h1:tzSAWY5sOONXrxVYqXU6yEjRPdzYZY2Y0te2vg1lnLU= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.0/go.mod h1:wcgpStyGTIbYEB/DOWXwPWx1LqY5d0u9Q1p/O/ll4SQ= +github.com/Mamoru-Foundation/mamoru-sniffer-go v0.10.0 h1:eWHTksZUkwWjKu9B1DrXJV3+s7wrEfgslI2r+fr9/mU= +github.com/Mamoru-Foundation/mamoru-sniffer-go v0.10.0/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= From 59346d65fa8d6a3b4f71d55926ebee49323927be Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Fri, 1 Dec 2023 09:33:09 +0000 Subject: [PATCH 69/74] update github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.1 --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 6b81139a8193..42a861eebdff 100644 --- a/go.mod +++ b/go.mod @@ -132,6 +132,6 @@ require ( ) require ( - github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.0 - github.com/Mamoru-Foundation/mamoru-sniffer-go v0.10.0 + github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.1 + github.com/Mamoru-Foundation/mamoru-sniffer-go v0.10.1 ) diff --git a/go.sum b/go.sum index b6e3c7041702..ed2dc9691a95 100644 --- a/go.sum +++ b/go.sum @@ -13,10 +13,10 @@ github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMd github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.0 h1:tzSAWY5sOONXrxVYqXU6yEjRPdzYZY2Y0te2vg1lnLU= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.0/go.mod h1:wcgpStyGTIbYEB/DOWXwPWx1LqY5d0u9Q1p/O/ll4SQ= -github.com/Mamoru-Foundation/mamoru-sniffer-go v0.10.0 h1:eWHTksZUkwWjKu9B1DrXJV3+s7wrEfgslI2r+fr9/mU= -github.com/Mamoru-Foundation/mamoru-sniffer-go v0.10.0/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.1 h1:5AmhGTsvbPxP7t9HZloqoI0n/c5CrxbQPHinAK1d1DA= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.1/go.mod h1:w4MAE4XUoS8qTHJALNwmNwUOLGz10J0IlelFnzhBpYI= +github.com/Mamoru-Foundation/mamoru-sniffer-go v0.10.1 h1:AzYrk9G7iw4JAwDyqX3tUfOz2TjCLxpFFMLz8pIyGuk= +github.com/Mamoru-Foundation/mamoru-sniffer-go v0.10.1/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= From d6d323a802859393e9c808455ec6d795a832c062 Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Tue, 5 Dec 2023 12:28:10 +0000 Subject: [PATCH 70/74] update github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.2 --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 42a861eebdff..9fdfc6ca3e95 100644 --- a/go.mod +++ b/go.mod @@ -132,6 +132,6 @@ require ( ) require ( - github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.1 + github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.2 github.com/Mamoru-Foundation/mamoru-sniffer-go v0.10.1 ) diff --git a/go.sum b/go.sum index ed2dc9691a95..9718894e4b28 100644 --- a/go.sum +++ b/go.sum @@ -13,8 +13,8 @@ github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMd github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.1 h1:5AmhGTsvbPxP7t9HZloqoI0n/c5CrxbQPHinAK1d1DA= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.1/go.mod h1:w4MAE4XUoS8qTHJALNwmNwUOLGz10J0IlelFnzhBpYI= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.2 h1:IMLXwYYlMNuIEiSMw/hKym+u5FgqJmr4yNbgAWFb6BQ= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.2/go.mod h1:w4MAE4XUoS8qTHJALNwmNwUOLGz10J0IlelFnzhBpYI= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.10.1 h1:AzYrk9G7iw4JAwDyqX3tUfOz2TjCLxpFFMLz8pIyGuk= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.10.1/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= From 7c24b63258f7a36f1e306eb7b14663665528ae90 Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Tue, 5 Dec 2023 13:46:34 +0000 Subject: [PATCH 71/74] update github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.3 --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 9fdfc6ca3e95..872b91a00850 100644 --- a/go.mod +++ b/go.mod @@ -132,6 +132,6 @@ require ( ) require ( - github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.2 + github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.3 github.com/Mamoru-Foundation/mamoru-sniffer-go v0.10.1 ) diff --git a/go.sum b/go.sum index 9718894e4b28..be4a9cc7deed 100644 --- a/go.sum +++ b/go.sum @@ -13,8 +13,8 @@ github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMd github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.2 h1:IMLXwYYlMNuIEiSMw/hKym+u5FgqJmr4yNbgAWFb6BQ= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.2/go.mod h1:w4MAE4XUoS8qTHJALNwmNwUOLGz10J0IlelFnzhBpYI= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.3 h1:AABuXuI+vSec/5gmiglnO3sc6mr/z3hyNNUBR6YJgJs= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.3/go.mod h1:w4MAE4XUoS8qTHJALNwmNwUOLGz10J0IlelFnzhBpYI= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.10.1 h1:AzYrk9G7iw4JAwDyqX3tUfOz2TjCLxpFFMLz8pIyGuk= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.10.1/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= From fcfc03d3be4eac75b8f63a379a4d7cd1303951f3 Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Tue, 5 Dec 2023 14:01:18 +0000 Subject: [PATCH 72/74] update github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.4 --- go.mod | 2 +- go.sum | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 872b91a00850..36b76c81a2e6 100644 --- a/go.mod +++ b/go.mod @@ -132,6 +132,6 @@ require ( ) require ( - github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.3 + github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.4 github.com/Mamoru-Foundation/mamoru-sniffer-go v0.10.1 ) diff --git a/go.sum b/go.sum index be4a9cc7deed..6513db02e653 100644 --- a/go.sum +++ b/go.sum @@ -15,6 +15,8 @@ github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwS github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.3 h1:AABuXuI+vSec/5gmiglnO3sc6mr/z3hyNNUBR6YJgJs= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.3/go.mod h1:w4MAE4XUoS8qTHJALNwmNwUOLGz10J0IlelFnzhBpYI= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.4 h1:U0c8GfAXjW4OjNphtbppB/VD2HrK8B+X/aoshNBuGto= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.4/go.mod h1:w4MAE4XUoS8qTHJALNwmNwUOLGz10J0IlelFnzhBpYI= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.10.1 h1:AzYrk9G7iw4JAwDyqX3tUfOz2TjCLxpFFMLz8pIyGuk= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.10.1/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= @@ -23,6 +25,8 @@ github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrU github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= @@ -73,6 +77,7 @@ github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811 h1:ytcWPaNPhNoG github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811/go.mod h1:Nb5lgvnQ2+oGlE/EyZy4+2/CxRh9KfvCXnag1vtpxVM= github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= @@ -159,6 +164,7 @@ github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclK github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-ole/go-ole v1.2.1 h1:2lOsA72HgjxAuMlKpFiCbHTvu44PIVkZ5hqm3RSdI/E= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= @@ -261,8 +267,10 @@ github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e h1:UvSe12bq+U github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= @@ -337,8 +345,10 @@ github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/naoina/go-stringutil v0.1.0 h1:rCUeRUHjBjGTSHl0VC00jUPLz8/F9dDzYI70Hzifhks= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416 h1:shk/vn9oCoOTmwcouEdwIeOtOGA/ELRUw/GwvxwfT+0= @@ -624,6 +634,7 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From 414b060e9b42397938dd7f4a50d82a0d51808ede Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Tue, 5 Dec 2023 16:51:31 +0000 Subject: [PATCH 73/74] update mamoru-sniffer-go v0.10.2; fix statistics --- go.mod | 4 ++-- go.sum | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 36b76c81a2e6..e40ba91358e5 100644 --- a/go.mod +++ b/go.mod @@ -132,6 +132,6 @@ require ( ) require ( - github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.4 - github.com/Mamoru-Foundation/mamoru-sniffer-go v0.10.1 + github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.5 + github.com/Mamoru-Foundation/mamoru-sniffer-go v0.10.2 ) diff --git a/go.sum b/go.sum index 6513db02e653..9755a5052166 100644 --- a/go.sum +++ b/go.sum @@ -17,8 +17,12 @@ github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.3 h1:AABuXuI+vSec github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.3/go.mod h1:w4MAE4XUoS8qTHJALNwmNwUOLGz10J0IlelFnzhBpYI= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.4 h1:U0c8GfAXjW4OjNphtbppB/VD2HrK8B+X/aoshNBuGto= github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.4/go.mod h1:w4MAE4XUoS8qTHJALNwmNwUOLGz10J0IlelFnzhBpYI= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.5 h1:BWpmRIQTDo0GXmFJuWqwrslMZPhNu/o/N+ebT/2L7F0= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.5/go.mod h1:RX52QmTO0eS9OACaiIJPzy3tSQosI7RFFyEJdV2jLNY= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.10.1 h1:AzYrk9G7iw4JAwDyqX3tUfOz2TjCLxpFFMLz8pIyGuk= github.com/Mamoru-Foundation/mamoru-sniffer-go v0.10.1/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= +github.com/Mamoru-Foundation/mamoru-sniffer-go v0.10.2 h1:9/DuT41CPKbQV8BT/8O5tNesRsfUD+SJEzSIFBTZmc0= +github.com/Mamoru-Foundation/mamoru-sniffer-go v0.10.2/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= From c0820692cfce611cc7f11a03ea5a60a209f06c69 Mon Sep 17 00:00:00 2001 From: Olexander Hofman Date: Wed, 6 Dec 2023 17:40:06 +0000 Subject: [PATCH 74/74] update mamoru-sniffer-go v0.10.3; fix txpool daemon check block --- go.mod | 4 ++-- go.sum | 23 ++++------------------- 2 files changed, 6 insertions(+), 21 deletions(-) diff --git a/go.mod b/go.mod index e40ba91358e5..8245dd20b335 100644 --- a/go.mod +++ b/go.mod @@ -132,6 +132,6 @@ require ( ) require ( - github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.5 - github.com/Mamoru-Foundation/mamoru-sniffer-go v0.10.2 + github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.6 + github.com/Mamoru-Foundation/mamoru-sniffer-go v0.10.3 ) diff --git a/go.sum b/go.sum index 9755a5052166..cf177415a091 100644 --- a/go.sum +++ b/go.sum @@ -13,24 +13,16 @@ github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMd github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.3 h1:AABuXuI+vSec/5gmiglnO3sc6mr/z3hyNNUBR6YJgJs= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.3/go.mod h1:w4MAE4XUoS8qTHJALNwmNwUOLGz10J0IlelFnzhBpYI= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.4 h1:U0c8GfAXjW4OjNphtbppB/VD2HrK8B+X/aoshNBuGto= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.4/go.mod h1:w4MAE4XUoS8qTHJALNwmNwUOLGz10J0IlelFnzhBpYI= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.5 h1:BWpmRIQTDo0GXmFJuWqwrslMZPhNu/o/N+ebT/2L7F0= -github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.5/go.mod h1:RX52QmTO0eS9OACaiIJPzy3tSQosI7RFFyEJdV2jLNY= -github.com/Mamoru-Foundation/mamoru-sniffer-go v0.10.1 h1:AzYrk9G7iw4JAwDyqX3tUfOz2TjCLxpFFMLz8pIyGuk= -github.com/Mamoru-Foundation/mamoru-sniffer-go v0.10.1/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= -github.com/Mamoru-Foundation/mamoru-sniffer-go v0.10.2 h1:9/DuT41CPKbQV8BT/8O5tNesRsfUD+SJEzSIFBTZmc0= -github.com/Mamoru-Foundation/mamoru-sniffer-go v0.10.2/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.6 h1:F84dZj9QAV9sgh4/guvxLdSN7SBJ4ek6uBcxjt1e53o= +github.com/Mamoru-Foundation/geth-mamoru-core-sdk v1.12.0-1.10.6/go.mod h1:CcgzW3pSfa7aroXA7fvUNEg6Yek7OVZ7UUgawTXDzZc= +github.com/Mamoru-Foundation/mamoru-sniffer-go v0.10.3 h1:ZSg6dR7Rrwgv1aT2FlCzLRhoB/xb194P2ed27YsXB8I= +github.com/Mamoru-Foundation/mamoru-sniffer-go v0.10.3/go.mod h1:hnmSj2y/1Ddi4I5tyXVyMPIHslvfNZARuLpbVKwr32s= github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= @@ -81,7 +73,6 @@ github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811 h1:ytcWPaNPhNoG github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811/go.mod h1:Nb5lgvnQ2+oGlE/EyZy4+2/CxRh9KfvCXnag1vtpxVM= github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= @@ -168,7 +159,6 @@ github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclK github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-ole/go-ole v1.2.1 h1:2lOsA72HgjxAuMlKpFiCbHTvu44PIVkZ5hqm3RSdI/E= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= @@ -271,10 +261,8 @@ github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e h1:UvSe12bq+U github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= @@ -349,10 +337,8 @@ github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/naoina/go-stringutil v0.1.0 h1:rCUeRUHjBjGTSHl0VC00jUPLz8/F9dDzYI70Hzifhks= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416 h1:shk/vn9oCoOTmwcouEdwIeOtOGA/ELRUw/GwvxwfT+0= @@ -638,7 +624,6 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=