Skip to content

Commit

Permalink
Merge develop into main (#2126)
Browse files Browse the repository at this point in the history
* 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] <[email protected]>
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] <[email protected]>
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] <[email protected]>
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] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* test: adding e2e forced batches test.

Signed-off-by: Nikolay Nedkov <[email protected]>

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

Signed-off-by: Nikolay Nedkov <[email protected]>

* fix: lint errors and unit tests

Signed-off-by: Nikolay Nedkov <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* fix: configs

Signed-off-by: Nikolay Nedkov <[email protected]>

---------

Signed-off-by: Nikolay Nedkov <[email protected]>
Co-authored-by: Nikolay Nedkov <[email protected]>

* 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] <[email protected]>
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] <[email protected]>
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] <[email protected]>

* remove deprecated code

---------

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

* 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] <[email protected]>
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] <[email protected]>
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 <[email protected]>
Co-authored-by: ToniRamirezM <[email protected]>

* 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] <[email protected]>
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] <[email protected]>
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] <[email protected]>
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] <[email protected]>
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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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] <[email protected]>
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] <[email protected]>
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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

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

Signed-off-by: Nikolay Nedkov <[email protected]>

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

Signed-off-by: Nikolay Nedkov <[email protected]>

* Update prover config (#1898)

* Update prover config

* Enable multiwrite

---------

Co-authored-by: Ubuntu <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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] <[email protected]>
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] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: tclemos <[email protected]>

* fix: fixing comments. (#1914)

* fix: fixing comments.

Signed-off-by: Nikolay Nedkov <[email protected]>

* improve: improving

Signed-off-by: Nikolay Nedkov <[email protected]>

* fix: adding last fixes.

Signed-off-by: Nikolay Nedkov <[email protected]>

---------

Signed-off-by: Nikolay Nedkov <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

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

Signed-off-by: Nikolay Nedkov <[email protected]>

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

Signed-off-by: Nikolay Nedkov <[email protected]>

* 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] <[email protected]>
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 <[email protected]>
Co-authored-by: tclemos <[email protected]>

* 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 <[email protected]>

* fix: fixing 'endpoints_eth'.'GetTransactionCount'

Signed-off-by: Nikolay Nedkov <[email protected]>

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

Signed-off-by: Nikolay Nedkov <[email protected]>

* 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 <[email protected]>

* fix: regenerating mocks.

Signed-off-by: Nikolay Nedkov <[email protected]>

* improve: adding logs of tx efficiency

Signed-off-by: Nikolay Nedkov <[email protected]>

* 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 <[email protected]>

* 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] <[email protected]>
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 <[email protected]>

* Refactor sequencer state interfaces (#2002)

* improve: fixing worker todos.

Signed-off-by: Nikolay Nedkov <[email protected]>

* improve: fixing dbmanager todos.

Signed-off-by: Nikolay Nedkov <[email protected]>

* 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] <[email protected]>
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 <[email protected]>

* fix: fixing comments.

Signed-off-by: Nikolay Nedkov <[email protected]>

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

Signed-off-by: Nikolay Nedkov <[email protected]>

* 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 <[email protected]>

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

Signed-off-by: Nikolay Nedkov <[email protected]>

* 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 <[email protected]>
Co-authored-by: Thiago Coimbra Lemos <[email protected]>
Co-authored-by: Alonso Rodriguez <[email protected]>
Co-authored-by: bros <[email protected]>
Co-authored-by: agnusmor <[email protected]>
Co-authored-by: agnusmor <[email protected]>
Co-authored-by: Thiago Lemos <[email protected]>

* 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] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* wip

Signed-off-by: Nikolay Nedkov <[email protected]>

* 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 <[email protected]>

* wip#2

Signed-off-by: Nikolay Nedkov <[email protected]>

* wip #3

Signed-off-by: Nikolay Nedkov <[email protected]>

* 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 <[email protected]>

* 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] <[email protected]>
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] <[email protected]>
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] <[email protected]>
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 <[email protected]>

* 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 <[email protected]>

* 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] <[email protected]>
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] <[email protected]>
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] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Toni Ramírez <[email protected]>

* 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 <[email protected]>

* 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] <[email protected]>
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] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Toni Ramírez <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* rename isBatchProcessed

* fix: forced batch rom OOC check.

Signed-off-by: Nikolay Nedkov <[email protected]>

* rename isBatchProcessed

* second fix

Signed-off-by: Nikolay Nedkov <[email protected]>

* 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] <[email protected]>
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] <[email protected]>
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] <[email protected]>
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] <[email protected]>
Signed-off-by: Nikolay Nedkov <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Toni Ramírez <[email protected]>
Co-authored-by: Nikolay Nedkov <[email protected]>
Co-authored-by: Thiago Coimbra Lemos <[email protected]>
Co-authored-by: ToniRamirezM <[email protected]>
Co-authored-by: Arnau Bennassar <[email protected]>
Co-authored-by: tclemos <[email protected]>
Co-authored-by: Paolo Grisoli <[email protected]>
Co-authored-by: Cool Developer <[email protected]>
Co-authored-by: Cool Developer <[email protected]>
Co-authored-by: CvH <[email protected]>
Co-authored-by: Jordi Baylina <[email protected]>
Co-authored-by: CG <[email protected]>
Co-authored-by: Ubuntu <[email protected]>
Co-authored-by: agnusmor <[email protected]>
Co-authored-by: zkronos73 <[email protected]>
Co-authored-by: zkronos73 <[email protected]>
Co-authored-by: pierce403 <[email protected]>
Co-authored-by: agnusmor <[email protected]>
Co-authored-by: Thiago Lemos <[email protected]>
Co-authored-by: nathan haim <[email protected]>
Co-authored-by: Toni Ramírez <[email protected]>
  • Loading branch information
23 people authored May 25, 2023
1 parent c26f089 commit ac3664d
Show file tree
Hide file tree
Showing 570 changed files with 76,747 additions and 29,082 deletions.
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Report a bug
about: Something with Polygon zkEVM is not working as expected
title: ''
labels: 'type:bug'
assignees: ''
---

#### System information

zkEVM Node version: `v0.0.X-RCXX`
OS & Version: `Windows/Linux/OSX`
Commit hash : (if `develop`)
Network: `Mainnet/Testnet`

#### Expected behaviour


#### Actual behaviour


#### Steps to reproduce the behaviour


#### Backtrace

````
[backtrace]
````

When submitting logs: please submit them as text and not screenshots.
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Request a feature
about: Report a missing feature - e.g. as a step before submitting a PR
title: ''
labels: 'type:feature'
assignees: ''
---

# Rationale

Why should this feature exist?
What are the use-cases?

# Implementation

Do you have ideas regarding the implementation of this feature?
Are you willing to implement this feature?
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: Ask a question
about: Something is unclear
title: ''
labels: 'type:question'
assignees: ''
---

This should only be used in very rare cases e.g. if you are not 100% sure if something is a bug or asking a question that leads to improving the documentation.
76 changes: 76 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ "develop", main ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "develop" ]
schedule:
- cron: '41 17 * * 0'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'go' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Use only 'java' to analyze code written in Java, Kotlin or both
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
7 changes: 4 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@ on:
- master
- develop
- update-external-dependencies
- 'release/**'
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v1
uses: actions/setup-go@v3
with:
go-version: 1.17.x
go-version: 1.19.x
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Lint
run: |
make install-linter
Expand Down
23 changes: 0 additions & 23 deletions .github/workflows/ok-to-test.yml

This file was deleted.

24 changes: 2 additions & 22 deletions .github/workflows/push-docker-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
Expand All @@ -17,7 +17,7 @@ jobs:
uses: docker/setup-buildx-action@v1

- name: Login to DockerHub
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
Expand All @@ -30,23 +30,3 @@ jobs:
push: true
tags: |
hermeznetwork/zkevm-node:develop
- name: Check changes in zkevmprovermock
id: zkevmprovermock_changes
uses: dorny/paths-filter@v2
with:
filters: |
zkevmprovermock:
- 'tools/zkevmprovermock/**'
- name: Build and push zkevmprovermock
if: steps.zkevmprovermock_changes.outputs.zkevmprovermock == 'true'
id: docker_build_zkevmprovermock
uses: docker/build-push-action@v2
with:
context: .
file: tools/zkevmprovermock/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
hermeznetwork/zkprover-mock:develop
33 changes: 33 additions & 0 deletions .github/workflows/push-docker-tagged.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*' # this action will only run on tags that follow semver

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: |
hermeznetwork/zkevm-node:${{ github.ref_name }}
52 changes: 0 additions & 52 deletions .github/workflows/push-docker.yml

This file was deleted.

58 changes: 46 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,64 @@
name: goreleaser
name: release

on:
push:
tags:
- 'v*.*.*'
- 'v[0-9]+.[0-9]+.[0-9]' # this action will only run on tags that follow semver

jobs:
goreleaser:
releaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.19

- name: Get packr
run: go get -u github.com/gobuffalo/packr/v2/packr2
- name: Prepare
run: git reset --hard
run: go install github.com/gobuffalo/packr/v2/[email protected]

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
uses: goreleaser/goreleaser-action@v4
with:
version: latest
args: release --rm-dist
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.TOKEN_RELEASE }}
GITHUB_TOKEN: ${{ secrets.TOKEN_RELEASE }}

- name: Get tag
uses: olegtarasov/[email protected]
id: tagName

- name: Put testnet and mainnet artifacts into a single zip
run: |
# TESTNET
mkdir -p testnet/config/environments/public
mkdir -p testnet/db/scripts
cp config/environments/public/* testnet/config/environments/public
cp docker-compose.yml testnet
cp db/scripts/init_prover_db.sql testnet/db/scripts
mv testnet/config/environments/public/example.env testnet
sed -i -e "s/image: zkevm-node/image: hermeznetwork\/zkevm-node:$GIT_TAG_NAME/g" testnet/docker-compose.yml
zip -r testnet.zip testnet
# MAINNET
mkdir -p mainnet/config/environments/public
mkdir -p mainnet/db/scripts
cp config/environments/mainnet/* mainnet/config/environments/public
cp docker-compose.yml mainnet
cp db/scripts/init_prover_db.sql mainnet/db/scripts
mv mainnet/config/environments/public/example.env mainnet
sed -i -e "s/image: zkevm-node/image: hermeznetwork\/zkevm-node:$GIT_TAG_NAME/g" mainnet/docker-compose.yml
zip -r mainnet.zip mainnet
- name: Publish testnet and mainnet zip into release
uses: AButler/[email protected]
with:
files: 'testnet.zip;mainnet.zip'
repo-token: ${{ secrets.TOKEN_RELEASE }}
release-tag: ${{ steps.tagName.outputs.tag }}

Loading

0 comments on commit ac3664d

Please sign in to comment.