Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go-critic/ruleguard: load embedded ruleguard rules: rules/rules.go:13: can't load fmt #3107

Open
ldez opened this issue Aug 17, 2022 · 19 comments
Labels
bug Something isn't working dependencies Relates to an upstream dependency

Comments

@ldez
Copy link
Member

ldez commented Aug 17, 2022

The issue is a kind of documentation about this topic.

Description of the problem

  • Before v1.49.0, the load of the ruleguard (go-critic) rules happens in an init() function and through a panic if there is a problem (I will explain the problem after).
$ golangci-lint run
panic: load embedded ruleguard rules: rules/rules.go:13: can't load fmt

goroutine 1 [running]:
github.com/go-critic/go-critic/checkers.init.9()
    github.com/go-critic/go-critic@v0.6.1/checkers/checkers.go:58 +0x4b4
  • After v1.49.0, the load of the ruleguard (go-critic) rules happens only when go-critic is enabled, and it will produce a simple error. From my experience, the error should disappear with this release due to changes inside ruleguard and go-critic.
$ golangci-lint run
[ERROR] go-critic: load embedded ruleguard rules: rules/rules.go:13: can't load fmt: setting an explicit GOROOT can fix this problem.

The problem

The error happens only when ruleguard (go-critic) is not able to load rules.

ruleguard (go-critic) uses GOROOT to load rules.

If the value of GOROOT is empty, ruleguard will fallback to the GOROOT from the Go context but this Go context can be wrong.

go-critic issues

Previous issues

The solution?

To avoid this problem you can define explicitly the GOROOT environment variable.

$ go env GOROOT                                            
/usr/local/go

$ export GOROOT=/usr/local/go
# or
export "GOROOT=$(go env GOROOT)"
@biggianteye
Copy link

biggianteye commented Aug 22, 2022

  • Before v1.49.0
  • After v1.49.0

Is this a typo? The latest version at the time of writing this is v1.48.0.

@ldez
Copy link
Member Author

ldez commented Aug 22, 2022

no, I'm talking about the next version (v1.49.0). I didn't use the future tense just to be descriptive.

@biggianteye
Copy link

no, I'm talking about the next version (v1.49.0). I didn't use the future tense just to be descriptive.

Ah, I see. Now that I look more closely I can see that your changes are in master, ready for the next version. Makes sense now. Thanks.

@cristaloleg
Copy link
Contributor

I see v0.6.1 in your log but AFAIR v0.6.4 fixed everything (https://github.com/go-critic/go-critic/releases/tag/v0.6.4) isn't it?

@ldez
Copy link
Member Author

ldez commented Aug 24, 2022

The logs are related to golangci-lint before v1.49.0.

@andig

This comment was marked as off-topic.

@ldez

This comment was marked as off-topic.

@andig

This comment was marked as off-topic.

barrettj12 added a commit to barrettj12/juju that referenced this issue Aug 25, 2022
This solves the issue described in golangci/golangci-lint#3107
jujubot added a commit to juju/juju that referenced this issue Aug 26, 2022
#14498

## Changes
- update Go version to 1.19 in go.mod
- Set GOROOT before linting to fix golangci/golangci-lint#3107
- update go-macaroon-bakery to fix go-macaroon-bakery/macaroon-bakery#276
- Run Go 1.19's `go fmt` over everything (there have been some changes in 1.19)
- Rebuild facade schema to catch minor formatting change.

Most of the changes are minor formatting tweaks from gofmt. Go 1.18's `gofmt` still passes.

## QA steps

Wait for CI to pass.
barrettj12 added a commit to barrettj12/juju that referenced this issue Aug 29, 2022
This solves the issue described in golangci/golangci-lint#3107
@psydvl

This comment was marked as off-topic.

@vfaronov
Copy link

vfaronov commented Oct 3, 2022

This error isn’t fixed for me neither by 1.49.0 nor by explicitly setting GOROOT:

$ golangci-lint version
golangci-lint has version 1.49.0 built from cc2d97f3 on 2022-08-24T10:24:37Z

$ export GOROOT=$(go env GOROOT)

$ head -1 $GOROOT/src/fmt/doc.go
// Copyright 2009 The Go Authors. All rights reserved.

$ golangci-lint run --disable-all -E gocritic
ERRO [linter] gocritic: load embedded ruleguard rules: rules/rules.go:13: can't load fmt: setting an explicit GOROOT can fix this problem. 

@phillbaker
Copy link

I saw this when moving from x86_64 to arm64 (m1 machine). I found this helpful to uninstall the old golangci installed via homebrew: https://github.com/orgs/Homebrew/discussions/3437

mdwn pushed a commit to mdwn/saml that referenced this issue Apr 11, 2023
golangci-lint has been updated as the error currently being seen in CI
appears to be resolved in 1.5x per the discussion in
golangci/golangci-lint#3107. Linting fixes have
been applied and several of the disabled linters have been enabled.
tclemos added a commit to 0xPolygonHermez/zkevm-node that referenced this issue Apr 18, 2023
tclemos added a commit to 0xPolygonHermez/zkevm-node that referenced this issue Apr 19, 2023
* go 1.19

* add callTracer, 4byte, noop and prestate tracers

* workaround to fix linter problem related to the ruleguard, more details here: golangci/golangci-lint#3107
ToniRamirezM added a commit to 0xPolygonHermez/zkevm-node that referenced this issue Apr 24, 2023
* fix eventlog config check

* fix build version flags

* fix optional trace config; update prover docker image

* add callTracer (#2010)

* go 1.19

* add callTracer, 4byte, noop and prestate tracers

* workaround to fix linter problem related to the ruleguard, more details here: golangci/golangci-lint#3107

* fix eth_estimateGas response for reverted txs

* Improve claim checks (#2027)

* fix wrong state root when prevlastbatch & lastbatch are empty + restart (#2028)

* Update production config for prover

* Update prover version

* fix conflicts

* fix conflicts

* fix conflicts

* Add ALL PRIVILEGES to prover_user for prover_db.state schema

* update linter version

---------

Co-authored-by: tclemos <thiago@iden3.com>
Co-authored-by: Thiago Coimbra Lemos <tclemos@users.noreply.github.com>
Co-authored-by: Alonso Rodriguez <ARR552@users.noreply.github.com>
Co-authored-by: bros <arnaubennassar5@gmail.com>
Co-authored-by: agnusmor <agnusmor@gmail.com>
Co-authored-by: agnusmor <100322135+agnusmor@users.noreply.github.com>
Co-authored-by: Thiago Lemos <thiago@polygon.technology>
@pawel-slusarczyk
Copy link

pawel-slusarczyk commented May 8, 2023

Still getting this error with GOROOT pointing to my Go 1.20.4 SDK and with golangci-lint v1.52.2.

➜  project git:(master) ✗ ./bin/golangci-lint --version
panic: load embedded ruleguard rules: rules/rules.go:13: can't load fmt

goroutine 1 [running]:
github.com/go-critic/go-critic/checkers.init.22()
        github.com/go-critic/go-critic@v0.6.3/checkers/embedded_rules.go:47 +0x4b4

Okay, actually it helped when I rebuild the binary of the vendored golangci-lint package. This step must be obvious for more frequent Go users, but I forgot about it.

lblackstone added a commit to pulumi/pulumi-kubernetes that referenced this issue May 15, 2023
lblackstone added a commit to pulumi/pulumi-kubernetes that referenced this issue May 15, 2023
@Liooo
Copy link

Liooo commented May 24, 2023

I'm seeing this error even when $GOROOT is set, and seems like 8f8c68a with go version 1.20 is somehow causing this on my machine.

.pre-commit-config.yml

repos:
  - repo: https://github.com/golangci/golangci-lint
#   rev: commit                                       go 1.20.4     go 1.19.8
#  ---------------------------------------------------------------------------------
#   rev: 8bbb6555e3d9348e320674fc0952eb8d0e5f6daf #     #3107        passes      <= latest master
#   ...
#   rev: 8f8c68ab8896d1317813081f20ff47831503e167 #     #3107         #3711      <= the ruleguard error happens from here
#   rev: 252ae9f2c92c1fed287d8721e1efdd0b72ca80ed #     #3711         #3711
#   ...
#   rev: da04413a8a1eefb8c10161c9f2b558138d01815c #     #3711         #3711       <= v1.52.2
    hooks:
    - id: golangci-lint
      language_version: 1.19.8 # or 1.20.4

Originally I've been trying to solve #3711, which I could confirm being fixed in the latest master (by #3835). But from 8f8c68a with go 1.20, I get the ruleguard error described in this issue.


UPDATE

This was pre-commit thing.
Inside pre-commit somehow the GOROOT is overwritten, and the workaround is:

$ export PRECOMMIT_GOROOT=$(go env GOROOT)

then,

repos:
  - repo: https://github.com/golangci/golangci-lint
     hooks:
     - id: golangci-lint
       language_version: 1.20.4
       entry: bash -c 'GOROOT=$PRECOMMIT_GOROOT golangci-lint run'

ARR552 added a commit to 0xPolygonHermez/zkevm-node that referenced this issue May 25, 2023
* build(deps): bump github.com/urfave/cli/v2 from 2.24.3 to 2.24.4 (#1670)

Bumps [github.com/urfave/cli/v2](https://github.com/urfave/cli) from 2.24.3 to 2.24.4.
- [Release notes](https://github.com/urfave/cli/releases)
- [Changelog](https://github.com/urfave/cli/blob/main/docs/CHANGELOG.md)
- [Commits](urfave/cli@v2.24.3...v2.24.4)

---
updated-dependencies:
- dependency-name: github.com/urfave/cli/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump github.com/rubenv/sql-migrate (#1694)

Bumps [github.com/rubenv/sql-migrate](https://github.com/rubenv/sql-migrate) from 0.0.0-20211023115951-9f02b1e13857 to 1.3.1.
- [Release notes](https://github.com/rubenv/sql-migrate/releases)
- [Commits](https://github.com/rubenv/sql-migrate/commits/v1.3.1)

---
updated-dependencies:
- dependency-name: github.com/rubenv/sql-migrate
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* get nonce from state (#1710)

* get nonce from state

* foce block number

* foce block number and nonce

* build(deps): bump github.com/stretchr/testify from 1.8.1 to 1.8.2 (#1713)

Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.1 to 1.8.2.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](stretchr/testify@v1.8.1...v1.8.2)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump github.com/prometheus/common from 0.40.0 to 0.41.0 (#1716)

Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.40.0 to 0.41.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](prometheus/common@v0.40.0...v0.41.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* test: adding e2e forced batches test.

Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>

* test: adding check if the forced batch is also being consolidated/verified.

Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>

* fix: lint errors and unit tests

Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>

* new public data (#1719)

* fix pool add tx (#1721)

* fix pool add tx

* fix

* fix mining reverted txs (#1712)

* add e2e tests to validate reverted txs

* fix unsigned tx error handling and test

* fix test ip

* finish test

* finish test

* fix reverted errors when calling eth_call

* commenting test reverting on constructor

* fix jsonrpc tests error handling

* fix state unit tests prover url

* fix state revert tests

---------

Co-authored-by: ToniRamirezM <toni@iden3.com>

* sequencer fixes (#1724)

* sequencer fixes

* comment test

* fix test

* remove default fork id (#1728)

* fix (#1727)

* fix

* remove maxSequenceSize

* linter

* fix forkID (#1729)

* fix forkID

* linter

* fix test

* fix error handling in sequencer (#1730)

* fix error handling in sequencer

* fix error log

* fix error log

* fix error log

* fix test

* fix test

* fix (#1735)

* add check stateroot in reprocessfull (#1739)

* fix stateroot on first run (#1740)

* fix stateroot on first run

* add check stateroot in reprocessfull

* fix

* Feature/release run docs (#1725)

* Update running prod docs, and public testnet config

* update gopackr

* update gopackr, without go mod tidy

* fix tests (#1733)

* fix tests

* fix: fixing unit tests.

Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>

* fix: configs

Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>

---------

Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>
Co-authored-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>

* build(deps): bump golang.org/x/crypto from 0.6.0 to 0.7.0 (#1751)

Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.6.0 to 0.7.0.
- [Release notes](https://github.com/golang/crypto/releases)
- [Commits](golang/crypto@v0.6.0...v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* allow reverted tx to be added to the pool (#1744)

* build(deps): bump github.com/urfave/cli/v2 from 2.24.4 to 2.25.0 (#1750)

Bumps [github.com/urfave/cli/v2](https://github.com/urfave/cli) from 2.24.4 to 2.25.0.
- [Release notes](https://github.com/urfave/cli/releases)
- [Changelog](https://github.com/urfave/cli/blob/main/docs/CHANGELOG.md)
- [Commits](urfave/cli@v2.24.4...v2.25.0)

---
updated-dependencies:
- dependency-name: github.com/urfave/cli/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump github.com/go-git/go-git/v5 from 5.4.2 to 5.6.0 (#1714)

* build(deps): bump github.com/go-git/go-git/v5 from 5.4.2 to 5.6.0

Bumps [github.com/go-git/go-git/v5](https://github.com/go-git/go-git) from 5.4.2 to 5.6.0.
- [Release notes](https://github.com/go-git/go-git/releases)
- [Commits](go-git/go-git@v5.4.2...v5.6.0)

---
updated-dependencies:
- dependency-name: github.com/go-git/go-git/v5
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* remove deprecated code

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: tclemos <thiago@iden3.com>

* Fix/reorg pool (#1756)

* fix

* fix check if reorg

* fix finalizer test

* New executor error: Balance Mismatch (#1720)

* new executor error

* fix test

* build(deps): bump github.com/spf13/afero from 1.9.4 to 1.9.5 (#1757)

Bumps [github.com/spf13/afero](https://github.com/spf13/afero) from 1.9.4 to 1.9.5.
- [Release notes](https://github.com/spf13/afero/releases)
- [Commits](spf13/afero@v1.9.4...v1.9.5)

---
updated-dependencies:
- dependency-name: github.com/spf13/afero
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Broadcast URI (#1722)

* Broadcast URI

* fix synchronizer test

* fix

* check if reorg in sequencer

* JRPC - debug methods review (#1650)

* Fix revert message for sc deployment tx reverted on the constructor (#1737)

* Change %w to %v in logs (#1764)

* build(deps): bump github.com/rubenv/sql-migrate from 1.3.1 to 1.4.0 (#1769)

Bumps [github.com/rubenv/sql-migrate](https://github.com/rubenv/sql-migrate) from 1.3.1 to 1.4.0.
- [Release notes](https://github.com/rubenv/sql-migrate/releases)
- [Commits](rubenv/sql-migrate@v1.3.1...v1.4.0)

---
updated-dependencies:
- dependency-name: github.com/rubenv/sql-migrate
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* [Aggregator]  More fine-grained logs in case of prover errors (#1718)

Closes #1717.

This PR adds logs in case of errors happening in the methods responsible to interact with the prover for proof generation.
This additional logs are necessary in order to print more information, in particular, the `proofId` and `batches` (or `batch`) fields, which is not available in the outer scope (the `Channel` method) where the main error log is printed.

* Fix formatting in error logs (#1768)

Closes #1766 .

This PR adds an additional formatting to the error message template, to hold the additional argument that is appended for the stacktrace. This applies to `Errorf` and `Fatalf`.
Also the first argument of the 'w' functions (`Infow`, `Debugw`, ...) has been renamed `msg`, the previous `template` name was misleading because actually it is not treated as a template.

* Expire transactions (#1765)

* expire too old txs in the efficiency list

* refactor and new pool retrieval interval config parameter

* reimplement

* fix pool retrieval

* fix config test

* fix config test

* update prover image (#1772)

* Fix/reorg (#1771)

* sequencer logs

* logs

* fix pool tx

* fixes

* fix + log

* fix if

* fix

* Remove death code

* fix

* more logs

* logs

* log

* log

* log

* remove not null for field topic0

* fix topic0

* full response log

* remove some logs

* linter

* comment forced batches test

---------

Co-authored-by: Arnau <arnaubennassar5@gmail.com>
Co-authored-by: ToniRamirezM <toni@iden3.com>

* add json rpc endpoints doc (#1738)

* build(deps): bump google.golang.org/protobuf from 1.28.1 to 1.29.0 (#1775)

Bumps [google.golang.org/protobuf](https://github.com/protocolbuffers/protobuf-go) from 1.28.1 to 1.29.0.
- [Release notes](https://github.com/protocolbuffers/protobuf-go/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf-go/blob/master/release.bash)
- [Commits](protocolbuffers/protobuf-go@v1.28.1...v1.29.0)

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump github.com/prometheus/common from 0.41.0 to 0.42.0 (#1774)

Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.41.0 to 0.42.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](prometheus/common@v0.41.0...v0.42.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump github.com/iden3/go-iden3-crypto (#1773)

Bumps [github.com/iden3/go-iden3-crypto](https://github.com/iden3/go-iden3-crypto) from 0.0.14-0.20220413123345-edc36bfa5247 to 0.0.14.
- [Release notes](https://github.com/iden3/go-iden3-crypto/releases)
- [Commits](https://github.com/iden3/go-iden3-crypto/commits/v0.0.14)

---
updated-dependencies:
- dependency-name: github.com/iden3/go-iden3-crypto
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix  log (#1777)

* fix claim pre execution (#1786)

* fix claim pre execution

* fix

* re fix

* re fix

* offset (#1788)

* Fix/run doc (#1789)

Fix running production doc

* add support to jrpc to accept short hashes and addresses strings like 0x00 (#1792)

* Add restart policy to main docker-compose (#1797)

* refactor deprecated things

* log (#1804)

* close grpc connection (#1816)

* add support to jrpc to accept short hashes and addresses strings like 0x00 (#1802)

* add check for not found tx and block for trace endpoints (#1811)

* Create sonar-project.properties

* Create sonarqube.yml

* Log startup info as JSON in production (#1799)

This commit changes the format of the startup info to be JSON when the
log `Environment` configuration is set to `production`.

* build(deps): bump google.golang.org/protobuf from 1.29.0 to 1.29.1 (#1828)

Bumps [google.golang.org/protobuf](https://github.com/protocolbuffers/protobuf-go) from 1.29.0 to 1.29.1.
- [Release notes](https://github.com/protocolbuffers/protobuf-go/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf-go/blob/master/release.bash)
- [Commits](protocolbuffers/protobuf-go@v1.29.0...v1.29.1)

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix: moving print for storing tx in finalizer.

Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>

* Relay jRPC methods to TrustedSequencer if pool info is needed (#1767)

* Fix boot condition for GER signal being sent (#1837)

* Fix boot condition for GER signal being sent

* Fix boot condition for GER signal being sent

* Fix boot condition for GER signal being sent

* Flush state db (#1831)

* flush state db

* flush state db

* update prover image

* improve log message

* improve: adding additional info for txs moved to not ready (#1829)

Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>

* ForkID logic for an old batch and fix error handling in execute batch (#1803)

* etherman forkID event

* ForkID

* linter

* etherman tests

* update forkID

* Update forkIdIntervals

* fix #1830

* suggestion

* Prevent sequencer from getting blocked by sync is trusted state is more advanced than virtual state (#1836)

* Fix/unsigned tx state root (#1835)

* fix unsigned tx to use the correct l2block state root

* remove unused variables and logs

* update mocks

* fix unit tests

* solve conflicts

---------

Co-authored-by: ToniRamirezM <toni@iden3.com>

* Add IP to Pool txs (#1817)

* Avoid changes on go.mod (#1841)

* fix pool ip (#1842)

* safer reorg (#1844)

* build(deps): bump github.com/go-git/go-git/v5 from 5.6.0 to 5.6.1 (#1848)

Bumps [github.com/go-git/go-git/v5](https://github.com/go-git/go-git) from 5.6.0 to 5.6.1.
- [Release notes](https://github.com/go-git/go-git/releases)
- [Commits](go-git/go-git@v5.6.0...v5.6.1)

---
updated-dependencies:
- dependency-name: github.com/go-git/go-git/v5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump google.golang.org/protobuf from 1.29.1 to 1.30.0 (#1849)

Bumps [google.golang.org/protobuf](https://github.com/protocolbuffers/protobuf-go) from 1.29.1 to 1.30.0.
- [Release notes](https://github.com/protocolbuffers/protobuf-go/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf-go/blob/master/release.bash)
- [Commits](protocolbuffers/protobuf-go@v1.29.1...v1.30.0)

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* add fault tolerance when failed to get revert message (#1846)

* Sync Trusted State via jRPC instead of Broadcast (#1840)

* break down jrpc package to share objects
* sync trusted state via jRPC instead of broadcast

---------

Co-authored-by: ToniRamirezM <toni@iden3.com>

* New Logs and fix to GER Closing Signal (#1868)

* fix log

* add closing signals logs

* fix new ger signal

* fix log

* fix and enable test

* fix finalizer log

* Add logs to follow sequencer flow (#1866)

* fix pool migration (#1863)

* fix pool migration

* fix pool migration

* fix pool migration

* fix

* keep the caller locked if an error happens when processing pending monitored txs (#1865)

* Log OOC on reprocess full batch (#1876)

* enable uncle tests and fix uncle enpoint parameters (#1861)

* Update batchresources.go (#1880)

* Halt finalizer in case of full execution error (#1879)

* panic if trusted reorg in synchronizer

* fix (#1878)

* log

* logs

* fixes

* sync test commented

* fix finalizer

* fix encodeTransaction

* fix encodeTransaction

---------

Co-authored-by: Alonso <ARR551@protonmail.com>

* Test/broadcast (#1850)

Add test for trusted state consumed through permissionless node

* check response before checking internal responses (#1882)

* add debug endpoints to docs (#1881)

* fix get tx by block hash or number and index (#1877)

* Improve E2E test time (#1860)

* Update software requirements to Ubuntu 22.04 (#1845)

The prover needs Ubuntu 22.04. Since this is run in Docker, the requirement for everything should be 22.04.

* Fix/failed tx in pool (#1895)

* Ignore TxStatusFailed txs in pool during replacement

* Ignore TxStatusFailed txs in pool during replacement

* wip

Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>

* improve: adding config params for MaxTxSize in pool and MaxTxSizeForL1 for sequence sender.

Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>

* improve: moving more hardcoded values to be config props. And adding unit testing of the 'oversized data error'.

Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>

* Update prover config (#1898)

* Update prover config

* Enable multiwrite

---------

Co-authored-by: Ubuntu <ubuntu@ip-172-31-22-24.eu-west-1.compute.internal>

* create group 7 and split e2e json rpc tests (#1897)

* feat: adding check gas price of tx to be greater that min gas price and min suggested gas price before adding to pool.

Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>

* docker contracts update (#1903)

* genesis + image

* smc v1.0.0-fork.3

* etherman + tests

* update genblocknumber

* linter

* latest prover version

* fix test

* feat: adding check gas price of tx to be greater that min gas price and min suggested gas price before adding to pool.

Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>

* Truncate value in follower (#1890)

* trucate value in follower

* truncate gas price

* add check to validate eth_call params (#1885)

* improve: renaming 'ErrIntrinsicGasPrice' to 'ErrGasPrice'

Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>

* build(deps): bump github.com/holiman/uint256 from 1.2.1 to 1.2.2 (#1912)

Bumps [github.com/holiman/uint256](https://github.com/holiman/uint256) from 1.2.1 to 1.2.2.
- [Release notes](https://github.com/holiman/uint256/releases)
- [Commits](holiman/uint256@v1.2.1...v1.2.2)

---
updated-dependencies:
- dependency-name: github.com/holiman/uint256
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Feature/#1833 execute batch (#1834)

* avoid execute batch twice

* fix make run-rpc

* linter

* Revert "fix make run-rpc"

This reverts commit 1b8bddd.

* suggestion

* remove log

* fix eth_call and eth_estimateGas parameters (#1891)

* Log events (#1905)

* wip

* WIP

* log OOG on pool pre execution

* log high zkcounters use

* fix test

* fix test

* fix test

* fix if

* fix test

* fix test

* build(deps): bump google.golang.org/grpc from 1.53.0 to 1.54.0 (#1901)

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.53.0 to 1.54.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](grpc/grpc-go@v1.53.0...v1.54.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: tclemos <thiago@iden3.com>

* fix: fixing comments. (#1914)

* fix: fixing comments.

Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>

* improve: improving

Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>

* fix: adding last fixes.

Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>

---------

Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>

* Flush state db after setting genesis (#1908)

* Flush state db after setting genesis

* fix test

* fix test

* fix test

* fix test

* fix test

* fix test

* fix test

* fix test

* fix test

* fix test

* fix test

* fix test

* fix test

* fix test

* fix test

* fix test

* fix test

* fix test

* fix test

* fix tests

* fix log L1 tx too big (#1920)

* fix missing return on ProcessUnsignedTransaction (#1917)

* fix missing return on ProcessUnsignedTransaction

* refactor

* fix unsigned tx revert response

* fix unit tests

* fix ProcessBatch err check before reading gas used

---------

Co-authored-by: tclemos <thiago@iden3.com>

* Reprocess empty batch to update state root before sanity check (full batch) (#1921)

* fix: removing check for low gas price for claims.

Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>

* fix: removing check for low gas price for claims. (#1922)

Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>

* improve,test: adding test case for skipping gas price error if tx is claim.

Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>

* fix forkID (#1925)

* fix forkID

* fix test

* update docker prover forkid 4 +  pql cfg improvements (#1929)

* update docker prover forkid 4 +  pql cfg improvements

* increase dbNumberOfPoolConnections

* increase dbNumberOfPoolConnections again

* update license

* build(deps): bump github.com/urfave/cli/v2 from 2.25.0 to 2.25.1 (#1931)

Bumps [github.com/urfave/cli/v2](https://github.com/urfave/cli) from 2.25.0 to 2.25.1.
- [Release notes](https://github.com/urfave/cli/releases)
- [Changelog](https://github.com/urfave/cli/blob/main/docs/CHANGELOG.md)
- [Commits](urfave/cli@v2.25.0...v2.25.1)

---
updated-dependencies:
- dependency-name: github.com/urfave/cli/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Prepare docs and action for mainnet release (#1928)

* Adds mainnet config (#1941)

* Fix mainnet config

* Fix mainnet config

* Add mising postgres config for mainnet

* remove history limit, replace fatal to error (#1940)

* handle fea2scalar error (#1942)

* handle fea2scalar error

* handle fea2scalar error

* trusted reorg if it is not a trusted sequencer (#1945)

* trusted reorg if it is not a trusted sequencer

* halt

* trustedsequencer url as config param (#1956)

* add deposit_counter to pool (#1958)

* add EIP-1898 support to eth_call (#1961)

* tos32 error handling (#1959)

* fix log without topics response (#1970)

* add issue templates (#1893)

* fix BatchNumberByBlockNumber when batch is not found (#1964)

* fix claims (#1977)

* review jRPC endpoints doc (#1968)

* Update executor with forkID 4 support (#1916)

Update executor and smart contracts for testing


---------

Co-authored-by: Alonso <ARR551@protonmail.com>
Co-authored-by: tclemos <thiago@iden3.com>

* Stop release generation for RCs (#1982)

* create codeql scanning profile

* mainnet and rollup exit roots (#1975)

* mainnet and rollup exit roots

* linter

* fix test e2e

* doc

* fix: adding support for eip-1898 in JSON-RPC for pending methods.

Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>

* fix: fixing 'endpoints_eth'.'GetTransactionCount'

Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>

* fix: parameters and return values of 'getBlockNumByArg' and 'getBlockByArg'.

Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>

* refactoring

* remove javascript from codeql

* add combined log to jRPC requests (#1986)

* web3_clientVersion returns the node version (#1985)

* replace map by sync.Map for jRPC filters (#1984)

* add example to OPEN RPC doc for zkevm_getBatchByNumber endpoint (#1983)

* event log (#1989)

* event log

* event log

* event log

* event log

* event log

* fix config

* reuse code

* fix

* fix

* fix Makefile

* remove default config

* remove default config

* remove default config

* remove default config

* replace the state debug tx to execute just the tx that needs the trace (#1994)

* remove broadcast service (#1988)

* allow pool to be blocked (#1899)

* improve: storing failed rx reason in db.

Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>

* fix: regenerating mocks.

Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>

* improve: adding logs of tx efficiency

Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>

* fix: adding wait group for goroutines started in 'handleTransactionError' so we can await if needed in tests. And making other db deletions async as well.

Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>

* build(deps): bump golang.org/x/crypto from 0.7.0 to 0.8.0 (#2001)

Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.7.0 to 0.8.0.
- [Release notes](https://github.com/golang/crypto/releases)
- [Commits](golang/crypto@v0.7.0...v0.8.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Make stateTree and executor optional in the state. (#1995)

* make executor and statedb optional

* make executor and statedb optional

* make executor and statedb optional

* make executor and statedb optional

* make executor and statedb optional

* make executor and statedb optional

* make executor and statedb optional

* make executor and statedb optional

* make executor and statedb optional

* make executor and statedb optional

* make executor and statedb optional

* fix eventlog

* fix test

* fix method name

* move state SQL queries (#2003)

* improve: storing 'batch_resources' and 'closing_reason' in 'state.batch' on closing a batch.

Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>

* Refactor sequencer state interfaces (#2002)

* improve: fixing worker todos.

Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>

* improve: fixing dbmanager todos.

Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>

* improve: fixing benchmark test scripts todos

* build(deps): bump github.com/prometheus/client_golang (#2015)

Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.14.0 to 1.15.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](prometheus/client_golang@v1.14.0...v1.15.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add more details on the compatibility of eth_call (#2018)

* Add more details on the compatibility of eth_call

* Mention that effective gas price is not included for receipts

* Improve timestamp resolution (#2007)

* timestamp resolution

* fixes

* fixes

* fix

* fix test

* fix test

* fix test

* fix test

* fix test

* fix test

* fix test

* refactor code

* refactor

* refactor check

* fix: fixing comments.

Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>

* fix: fixing comments.

Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>

* fix: fixing worker AddTxTracker to return drop error reason.

Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>

* check trusted state before L1 data (#2022)

check trusted state before L1 data to avoid havan incomplete trusted state

* improve: adding missing usages of TxStatus metric.

Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>

* fix: fixing sequencer metrics imports and host and port of event-db in debug config.

Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>

* Improve GHA (#2031)

Remove prover mock and ok-to-test

* Merges v0.0.6 into Develop (#2039)

* fix eventlog config check

* fix build version flags

* fix optional trace config; update prover docker image

* add callTracer (#2010)

* go 1.19

* add callTracer, 4byte, noop and prestate tracers

* workaround to fix linter problem related to the ruleguard, more details here: golangci/golangci-lint#3107

* fix eth_estimateGas response for reverted txs

* Improve claim checks (#2027)

* fix wrong state root when prevlastbatch & lastbatch are empty + restart (#2028)

* Update production config for prover

* Update prover version

* fix conflicts

* fix conflicts

* fix conflicts

* Add ALL PRIVILEGES to prover_user for prover_db.state schema

* update linter version

---------

Co-authored-by: tclemos <thiago@iden3.com>
Co-authored-by: Thiago Coimbra Lemos <tclemos@users.noreply.github.com>
Co-authored-by: Alonso Rodriguez <ARR552@users.noreply.github.com>
Co-authored-by: bros <arnaubennassar5@gmail.com>
Co-authored-by: agnusmor <agnusmor@gmail.com>
Co-authored-by: agnusmor <100322135+agnusmor@users.noreply.github.com>
Co-authored-by: Thiago Lemos <thiago@polygon.technology>

* Feature/split network config (#1999)

* Move network related config from config.toml to genesis.json

* build(deps): bump github.com/iden3/go-iden3-crypto from 0.0.14 to 0.0.15 (#2050)

Bumps [github.com/iden3/go-iden3-crypto](https://github.com/iden3/go-iden3-crypto) from 0.0.14 to 0.0.15.
- [Release notes](https://github.com/iden3/go-iden3-crypto/releases)
- [Commits](iden3/go-iden3-crypto@v0.0.14...v0.0.15)

---
updated-dependencies:
- dependency-name: github.com/iden3/go-iden3-crypto
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* wip

Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>

* Remove claim txs (#2048)

* remove claim txs

* fix tests

* fix tests

* fix tests

* remove deposit_count

* fix query

* fix query

---------

Co-authored-by: Thiago Lemos <thiago@polygon.technology>

* wip#2

Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>

* wip #3

Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>

* Remove claim txs (#2048)

* remove claim txs

* fix tests

* fix tests

* fix tests

* remove deposit_count

* fix query

* fix query

---------

Co-authored-by: Thiago Lemos <thiago@polygon.technology>

* build(deps): bump github.com/urfave/cli/v2 from 2.25.1 to 2.25.3 (#2063)

Bumps [github.com/urfave/cli/v2](https://github.com/urfave/cli) from 2.25.1 to 2.25.3.
- [Release notes](https://github.com/urfave/cli/releases)
- [Changelog](https://github.com/urfave/cli/blob/main/docs/CHANGELOG.md)
- [Commits](urfave/cli@v2.25.1...v2.25.3)

---
updated-dependencies:
- dependency-name: github.com/urfave/cli/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Do not use zkcounters on eth_Call (#2021)

* not use zkcounters on eth_Call

* fix test

* prover image

* prover image

* prover image

* fix default trace values for custom tracers (#2066)

* add support to safe and finalized blocks for jRPC block parameters (#2049)

* cmd/approve: add new flag to set max-amount (#2030)

* build(deps): bump github.com/prometheus/client_golang (#2074)

Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.15.0 to 1.15.1.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](prometheus/client_golang@v1.15.0...v1.15.1)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump github.com/prometheus/client_model from 0.3.0 to 0.4.0 (#2073)

Bumps [github.com/prometheus/client_model](https://github.com/prometheus/client_model) from 0.3.0 to 0.4.0.
- [Release notes](https://github.com/prometheus/client_model/releases)
- [Commits](prometheus/client_model@v0.3.0...v0.4.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_model
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix sync_info table (#2055)

* fix

* linter

* merge set last batch info seen methods

---------

Co-authored-by: Thiago Lemos <thiago@polygon.technology>

* remove unit suffix from duration config params (#2068)

* New sequence sender component (#2051)

* new sequence sender

* fix config file

* fix docker-compose

* fix e2e tests

* fix e2e tests

* fix e2e tests

* fix e2e tests

* fixes

* remove keys fron sequencer

* fix sequence sender

* remove todo

* remove txPool dependency

* Merge v0.0.8 into develop (#2077)

* wip #4

Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>

* fix

* build(deps): bump github.com/prometheus/common from 0.42.0 to 0.43.0 (#2081)

Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.42.0 to 0.43.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](prometheus/common@v0.42.0...v0.43.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump google.golang.org/grpc from 1.54.0 to 1.55.0 (#2080)

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.54.0 to 1.55.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](grpc/grpc-go@v1.54.0...v1.55.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump golang.org/x/sync from 0.1.0 to 0.2.0 (#2079)

Bumps [golang.org/x/sync](https://github.com/golang/sync) from 0.1.0 to 0.2.0.
- [Commits](golang/sync@v0.1.0...v0.2.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sync
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Toni Ramírez <58293609+ToniRamirezM@users.noreply.github.com>

* Fix/deployment (#2076)

* fix prover permissions

* fix docker compose

* fix doc

* fix script

* reduce interval to search forkID events

* verify genesis block number check for full nodes

* linter

* improve: adding error handling for txs of forced batch

Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>

* Review jRPC default configuration (#2083)

* build(deps): bump golang.org/x/net from 0.9.0 to 0.10.0 (#2084)

Bumps [golang.org/x/net](https://github.com/golang/net) from 0.9.0 to 0.10.0.
- [Commits](golang/net@v0.9.0...v0.10.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump golang.org/x/crypto from 0.8.0 to 0.9.0 (#2087)

Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.8.0 to 0.9.0.
- [Commits](golang/crypto@v0.8.0...v0.9.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Toni Ramírez <58293609+ToniRamirezM@users.noreply.github.com>

* config default values (#2090)

* config

* unit test

* MaxTxBytesSize and MaxTxDataBytesSize

* fix decode txs (#2091)

* configuration fixes (#2094)

* improve: finishing implementation of the vector forced batch tests and updating e2e forced batch test to have 1 forced tx.

Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>

* Update link to protocol specification

* remove error logs when the error is related to the tx (#2096)

* fix: fixing forced batches error handling and normal batches transaction level error handling.

Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>

* rename isBatchProcessed

* fix: forced batch rom OOC check.

Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>

* rename isBatchProcessed

* second fix

Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>

* Refactor state errors (#2105)

* refactor state errors

* refactor state errors

* refactor state errors

* refactor state errors

* refactor state errors

* refactor

* fix

* function rename

* fix wg

* fix wg

* fix

* Fix sequencer error (#2108)

* fix error not returned

* avoid decoding batchl2data when there are no txs

* fix

* disable auto release on GHA (#2107)

* fix executor error handling (#2109)

* build(deps): bump github.com/stretchr/testify from 1.8.2 to 1.8.3 (#2111)

Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.2 to 1.8.3.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](stretchr/testify@v1.8.2...v1.8.3)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump github.com/prometheus/common from 0.43.0 to 0.44.0 (#2116)

Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.43.0 to 0.44.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](prometheus/common@v0.43.0...v0.44.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix error returned during tx decoding (#2117)

* fix timestamp resolution to 10s (#2112)

* build(deps): bump github.com/go-git/go-git/v5 from 5.6.1 to 5.7.0 (#2119)

Bumps [github.com/go-git/go-git/v5](https://github.com/go-git/go-git) from 5.6.1 to 5.7.0.
- [Release notes](https://github.com/go-git/go-git/releases)
- [Commits](go-git/go-git@v5.6.1...v5.7.0)

---
updated-dependencies:
- dependency-name: github.com/go-git/go-git/v5
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fix/delegate call trace (#2115)

* WIP: fix delegatecall when trace is requested via custom tracer

* changes to custom tracer for call, callcode, staticcall, delegatecall opcodes

* fix custom tracer staticcall opcode

* fix custom tracer subcalls with multi levels

* comment test debug code

* review error handling

* fix custom call tracer for SC calls with precompiled code

* fix get precompiled address and input for opcodes that have tx value

* increase debug tracer e2e tests timeout

* update prover image

* change log to info (#2121)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Toni Ramírez <58293609+ToniRamirezM@users.noreply.github.com>
Co-authored-by: Nikolay Nedkov <nikolai_nedkov@yahoo.com>
Co-authored-by: Thiago Coimbra Lemos <tclemos@users.noreply.github.com>
Co-authored-by: ToniRamirezM <toni@iden3.com>
Co-authored-by: Arnau Bennassar <arnaubennassar5@gmail.com>
Co-authored-by: tclemos <thiago@iden3.com>
Co-authored-by: Paolo Grisoli <paolo_g84@icloud.com>
Co-authored-by: Cool Developer <kevin@polygon.technology>
Co-authored-by: Cool Developer <125276287+C001-developer@users.noreply.github.com>
Co-authored-by: CvH <109217179+cvhpoly@users.noreply.github.com>
Co-authored-by: Jordi Baylina <jordi@baylina.cat>
Co-authored-by: CG <118215885+cg-polygon@users.noreply.github.com>
Co-authored-by: Ubuntu <ubuntu@ip-172-31-22-24.eu-west-1.compute.internal>
Co-authored-by: agnusmor <100322135+agnusmor@users.noreply.github.com>
Co-authored-by: zkronos73 <94566827+zkronos73@users.noreply.github.com>
Co-authored-by: zkronos73 <zkronos73@gmail.com>
Co-authored-by: pierce403 <pierce403@gmail.com>
Co-authored-by: agnusmor <agnusmor@gmail.com>
Co-authored-by: Thiago Lemos <thiago@polygon.technology>
Co-authored-by: nathan haim <nathan.haim@free.fr>
Co-authored-by: Toni Ramírez <toni@polygon.technology>
@haroongelato
Copy link

I fixed this issue by upgrading my golangci-lint version to 1.54.2.

@dviljoen
Copy link

dviljoen commented Dec 5, 2023

I just ran into this when upgrading from go1.18.1 to go1.20.11. I also upgraded my golangci-lint to 1.55.2. As described above, I tried setting my GOROOT. No luck.

panic: load embedded ruleguard rules: rules/rules.go:13: can't load fmt

goroutine 1 [running]:
github.com/go-critic/go-critic/checkers.init.22()
        github.com/go-critic/go-critic@v0.6.3/checkers/embedded_rules.go:47 +0x4b4
panic: load embedded ruleguard rules: rules/rules.go:13: can't load fmt

goroutine 1 [running]:
github.com/go-critic/go-critic/checkers.init.22()
        github.com/go-critic/go-critic@v0.6.3/checkers/embedded_rules.go:47 +0x4b4

@ns-saurabh
Copy link

I ran into this issue with go1.21 and golangci-lint 1.51. Moving golangci-lint to 1.55.2 fixed the issue.

@rmasclef
Copy link

rmasclef commented Feb 7, 2024

hey there I do have this issue even with the latest version

Adding export GOROOT=$(go env GOROOT) to my .zshrc file doesn't seem to fix the issue.


golangci-lint version
golangci-lint has version 1.55.2 built with go1.21.3 from e3c2265 on 2023-11-02T21:40:02Z
golangci-lint run ./...
ERRO [linters_context] gocritic: load embedded ruleguard rules: rules/rules.go:13: can't load fmt: setting an explicit GOROOT can fix this problem.
go version
go version go1.21.6 darwin/arm64
go env
GO111MODULE='auto'
GOARCH='arm64'
GOBIN=''
GOCACHE='/Users/rmasclef/Library/Caches/go-build'
GOENV='/Users/rmasclef/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/rmasclef/go/pkg/mod'
GONOPROXY='github.com/reezogit'
GONOSUMDB='github.com/reezogit'
GOOS='darwin'
GOPATH='/Users/rmasclef/go'
GOPRIVATE='github.com/reezogit'
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/opt/homebrew/Cellar/go/1.21.6/libexec'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/opt/homebrew/Cellar/go/1.21.6/libexec/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.21.6'
GCCGO='gccgo'
AR='ar'
CC='cc'
CXX='c++'
CGO_ENABLED='1'
GOMOD='/Users/rmasclef/Documents/work/reezocar/repositories/backend/reezoback/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/km/qbnnqyrs6g92mrrqstg2gk8r0000gn/T/go-build1707879524=/tmp/go-build -gno-record-gcc-switches -fno-common'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies Relates to an upstream dependency
Projects
None yet
Development

No branches or pull requests