Skip to content

Commit

Permalink
V0.2.0 to main (#484)
Browse files Browse the repository at this point in the history
* feat: add benchmark tests (#280)

* wip

* config scirpt

* add ga

* improve mt db operations

* lint fixing

* refactor the mt

* dbTx from synchronizer

* reflect suggestions

* feat: separate the service from the bridge controller (#289)

* separate bridge service interface from ctrl

* wip

* fix test

* comments

* small fix

* Feature/#291 smc (#292)

* new smc without genesis

* fix node conf

* genesis + network update

* fix config

* fix accounts

* fix node version

* linter

* Refactor the merkle tree to refactor the last siblings in memory (#294)

* update the sibling

* small updates

* more comments

* remove unnecessary comments

* indexes + migration test utils (#295)

* indexes + migration test utils

* uncomment migration helper

* add migration tests

* sepcify schema

---------

Co-authored-by: Cool Developer <[email protected]>
Co-authored-by: cool-developer <[email protected]>

* fix local l1 bridge address (#300)

* refactor the merkle tree

* Refactor the merkle tree to store the updates in the bulk set (#301)

* bulk insert in merkle  tree

* small fix

* add cache to the service

* update github workflows

* Feature/fork (#310)

* new smc

* update docker images

* linter

* fix e2e

* fix genesis + prover conf

* new genesis and addresses

* genesis fix

* fix node GenBlockNum

* fix proxy event executor

* node version

* mtHeight as constant

* tidy

* support new smc and node fflonk (#315)

* support new smc and node fflonk

* etherman test

* node config

* addresses + node v0.0.3-RC4

* new config values

* revert time increase

---------

Co-authored-by: Cool Developer <[email protected]>

* Merge v0.0.2 (#319)

* Feature/smc fork (#304)

* new smc

* update docker images

* linter

* fix e2e

* fix genesis + prover conf

* new genesis and addresses

* genesis fix

* fix node GenBlockNum

* fix proxy event executor

* node version

* mtHeight as constant

* fix forced batches check (#314)

* fix forced batches check

* fix test

* release workflow (#305)

* Feature/fflonk smc (#316)

* support new smc and node fflonk

* etherman test

* go 1.18

* fix node config

* addresses + node v0.0.3-RC4

* new config values

* increase timeouts

* revert time increase

---------

Co-authored-by: Cool Developer <[email protected]>

---------

Co-authored-by: Cool Developer <[email protected]>

* Bump github.com/grpc-ecosystem/grpc-gateway/v2 from 2.14.0 to 2.15.1 (#320)

Bumps [github.com/grpc-ecosystem/grpc-gateway/v2](https://github.com/grpc-ecosystem/grpc-gateway) from 2.14.0 to 2.15.1.
- [Release notes](https://github.com/grpc-ecosystem/grpc-gateway/releases)
- [Changelog](https://github.com/grpc-ecosystem/grpc-gateway/blob/main/.goreleaser.yml)
- [Commits](grpc-ecosystem/grpc-gateway@v2.14.0...v2.15.1)

---
updated-dependencies:
- dependency-name: github.com/grpc-ecosystem/grpc-gateway/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>

* Pr against develop (#326)

* wip

* add claimtxman

* Fix synchronization when bridge is ahead of the trusted state (#345)

Fix synchronization when bridge is ahead of the trusted state due to a forkID

* fix e2e tests

* add migration tests

* fix duplicate key issue

* Update claimtxman.go

* create claimtx keystore

* update migration sql

* update deposit goroutine

* fix migration

* Feature/#357 rpc (#358)

* sync rpc trusted state + url

* versions

* New event + fix test

* remove broadcast config

* suggestion to avoid duplication in config file

* go mod tidy

* fix tests failures

* Feature/#363 sync (#365)

* remove fatals to handle errors

* log level and refactor

* fix error handling

* Fix/migracion (#368)

* migrations

* fix test

* fix

* fix migrations

* update migrations

* fix invalid nonce

* fix the wrong network ID in the claimtxman

* fix the nonce issue

* Release/v0.0.4 (#385)

* fix retry synchronization after an error (#371)

* fix retry synchronization after an error

* synchronizer test

* create index before delete duplicates (#379)

* create index before delete duplicates

* fix tests

* fix gasprice (#384)

* fix gasprice

* fix e2e tests

* log

* release --clean

---------

Co-authored-by: Cool Developer <[email protected]>

* update versions and go 1.19 (#392)

* update versions and go 1.19

* new conf

* log fix

* reset once in a cycle

* Bump github.com/iden3/go-iden3-crypto from 0.0.14 to 0.0.15 (#402)

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>

* Bump github.com/lib/pq from 1.10.7 to 1.10.9 (#401)

Bumps [github.com/lib/pq](https://github.com/lib/pq) from 1.10.7 to 1.10.9.
- [Release notes](https://github.com/lib/pq/releases)
- [Commits](lib/pq@v1.10.7...v1.10.9)

---
updated-dependencies:
- dependency-name: github.com/lib/pq
  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>

* Bump github.com/urfave/cli/v2 from 2.25.1 to 2.25.3 (#397)

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>

* Bump github.com/hashicorp/golang-lru/v2 from 2.0.1 to 2.0.2 (#395)

Bumps [github.com/hashicorp/golang-lru/v2](https://github.com/hashicorp/golang-lru) from 2.0.1 to 2.0.2.
- [Release notes](https://github.com/hashicorp/golang-lru/releases)
- [Commits](hashicorp/golang-lru@v2.0.1...v2.0.2)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/golang-lru/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>

* initClaim script (#405)

* initClaim script

* readme

* typo

* Removed the e2e table test as it wasn't being used

* logs (#409)

* logs

* fix log

* fix nonce update (#410)

* Bump golang.org/x/crypto from 0.8.0 to 0.9.0 (#411)

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>

* Bump google.golang.org/grpc from 1.54.0 to 1.55.0 (#407)

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>

* Bump github.com/0xPolygonHermez/zkevm-node from 0.0.7 to 0.0.8 (#406)

Bumps [github.com/0xPolygonHermez/zkevm-node](https://github.com/0xPolygonHermez/zkevm-node) from 0.0.7 to 0.0.8.
- [Release notes](https://github.com/0xPolygonHermez/zkevm-node/releases)
- [Changelog](https://github.com/0xPolygonHermez/zkevm-node/blob/develop/.goreleaser.yaml)
- [Commits](0xPolygonHermez/zkevm-node@v0.0.7...v0.0.8)

---
updated-dependencies:
- dependency-name: github.com/0xPolygonHermez/zkevm-node
  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>
Co-authored-by: Alonso Rodriguez <[email protected]>

* Renames references to smart contracts to a more descriptive name

* Update network config defaults

* Require either network section in config or flag

* Make ClaimTxManager optional

* Bump github.com/stretchr/testify from 1.8.2 to 1.8.3

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]>

* Enable/Disable the claimtxmanager explicitly

* Enabled autoclaim in the debug config

* Copied versioning system from zkevm-node

* Use the network ID when updating L2 deposits

* Update db/pgstorage/pgstorage.go

Co-authored-by: Alonso Rodriguez <[email protected]>

* Tested upgrade L2 deposit with different rollups

* fix ignore deposit if fails during gasestimation (#424)

* fix ignore deposit if fails during gasestimation

* log

* suggestion

* fix (#428)

* fix node config (#429)

* Bump github.com/0xPolygonHermez/zkevm-node from 0.0.8 to 0.1.0 (#427)

Bumps [github.com/0xPolygonHermez/zkevm-node](https://github.com/0xPolygonHermez/zkevm-node) from 0.0.8 to 0.1.0.
- [Release notes](https://github.com/0xPolygonHermez/zkevm-node/releases)
- [Changelog](https://github.com/0xPolygonHermez/zkevm-node/blob/develop/.goreleaser.yaml)
- [Commits](https://github.com/0xPolygonHermez/zkevm-node/commits)

---
updated-dependencies:
- dependency-name: github.com/0xPolygonHermez/zkevm-node
  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>

* Bump github.com/ethereum/go-ethereum from 1.11.6 to 1.12.0 (#426)

Bumps [github.com/ethereum/go-ethereum](https://github.com/ethereum/go-ethereum) from 1.11.6 to 1.12.0.
- [Release notes](https://github.com/ethereum/go-ethereum/releases)
- [Commits](ethereum/go-ethereum@v1.11.6...v1.12.0)

---
updated-dependencies:
- dependency-name: github.com/ethereum/go-ethereum
  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 initClaim (#431)

* fix initClaim

* linter

* metadata fix (#433)

* Bump github.com/urfave/cli/v2 from 2.25.3 to 2.25.5 (#434)

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

---
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>

* Fix/gha (#383)

* Fix gha

* remove ok-to-test

---------

Co-authored-by: Cool Developer <[email protected]>

* Bump github.com/spf13/viper from 1.15.0 to 1.16.0 (#435)

Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.15.0 to 1.16.0.
- [Release notes](https://github.com/spf13/viper/releases)
- [Commits](spf13/viper@v1.15.0...v1.16.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/viper
  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>

* Bump github.com/stretchr/testify from 1.8.3 to 1.8.4 (#436)

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

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

* Refactor required by zklidium(#437)

* retry if error is different of execution reverted (#446)

* retry if error is different of execution reverted

* linter

* for suggestion

* Bump github.com/grpc-ecosystem/grpc-gateway/v2 from 2.15.1 to 2.16.0 (#439)

Bumps [github.com/grpc-ecosystem/grpc-gateway/v2](https://github.com/grpc-ecosystem/grpc-gateway) from 2.15.1 to 2.16.0.
- [Release notes](https://github.com/grpc-ecosystem/grpc-gateway/releases)
- [Changelog](https://github.com/grpc-ecosystem/grpc-gateway/blob/main/.goreleaser.yml)
- [Commits](grpc-ecosystem/grpc-gateway@v2.15.1...v2.16.0)

---
updated-dependencies:
- dependency-name: github.com/grpc-ecosystem/grpc-gateway/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>
Co-authored-by: Alonso Rodriguez <[email protected]>

* Bump github.com/hashicorp/golang-lru/v2 from 2.0.2 to 2.0.3 (#442)

Bumps [github.com/hashicorp/golang-lru/v2](https://github.com/hashicorp/golang-lru) from 2.0.2 to 2.0.3.
- [Release notes](https://github.com/hashicorp/golang-lru/releases)
- [Commits](hashicorp/golang-lru@v2.0.2...v2.0.3)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/golang-lru/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>
Co-authored-by: Alonso Rodriguez <[email protected]>

* Bump github.com/0xPolygonHermez/zkevm-node from 0.1.0 to 0.1.2 (#443)

Bumps [github.com/0xPolygonHermez/zkevm-node](https://github.com/0xPolygonHermez/zkevm-node) from 0.1.0 to 0.1.2.
- [Release notes](https://github.com/0xPolygonHermez/zkevm-node/releases)
- [Changelog](https://github.com/0xPolygonHermez/zkevm-node/blob/develop/.goreleaser.yaml)
- [Commits](0xPolygonHermez/zkevm-node@v0.1.0...v0.1.2)

---
updated-dependencies:
- dependency-name: github.com/0xPolygonHermez/zkevm-node
  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>

* Bump github.com/urfave/cli/v2 from 2.25.5 to 2.25.6 (#444)

Bumps [github.com/urfave/cli/v2](https://github.com/urfave/cli) from 2.25.5 to 2.25.6.
- [Release notes](https://github.com/urfave/cli/releases)
- [Changelog](https://github.com/urfave/cli/blob/main/docs/CHANGELOG.md)
- [Commits](urfave/cli@v2.25.5...v2.25.6)

---
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>

* Bump golang.org/x/crypto from 0.9.0 to 0.10.0 (#447)

Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.9.0 to 0.10.0.
- [Commits](golang/crypto@v0.9.0...v0.10.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: Alonso Rodriguez <[email protected]>

* Bump google.golang.org/grpc from 1.55.0 to 1.56.0 (#448)

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.55.0 to 1.56.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](grpc/grpc-go@v1.55.0...v1.56.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>

* logs (#449)

* Bump github.com/urfave/cli/v2 from 2.25.6 to 2.25.7 (#451)

Bumps [github.com/urfave/cli/v2](https://github.com/urfave/cli) from 2.25.6 to 2.25.7.
- [Release notes](https://github.com/urfave/cli/releases)
- [Changelog](https://github.com/urfave/cli/blob/main/docs/CHANGELOG.md)
- [Commits](urfave/cli@v2.25.6...v2.25.7)

---
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>

* Bump github.com/hashicorp/golang-lru/v2 from 2.0.3 to 2.0.4 (#452)

Bumps [github.com/hashicorp/golang-lru/v2](https://github.com/hashicorp/golang-lru) from 2.0.3 to 2.0.4.
- [Release notes](https://github.com/hashicorp/golang-lru/releases)
- [Commits](hashicorp/golang-lru@v2.0.3...v2.0.4)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/golang-lru/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>

* Bump google.golang.org/grpc from 1.56.0 to 1.56.1 (#453)

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.56.0 to 1.56.1.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](grpc/grpc-go@v1.56.0...v1.56.1)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  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>

* Bump github.com/rubenv/sql-migrate from 1.4.0 to 1.5.1 (#456)

Bumps [github.com/rubenv/sql-migrate](https://github.com/rubenv/sql-migrate) from 1.4.0 to 1.5.1.
- [Commits](rubenv/sql-migrate@v1.4.0...v1.5.1)

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

* Bump google.golang.org/protobuf from 1.30.0 to 1.31.0 (#457)

Bumps google.golang.org/protobuf from 1.30.0 to 1.31.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 docs on how to fund local L2 account (#455)

* Bump github.com/0xPolygonHermez/zkevm-node from 0.1.2 to 0.1.3 (#458)

Bumps [github.com/0xPolygonHermez/zkevm-node](https://github.com/0xPolygonHermez/zkevm-node) from 0.1.2 to 0.1.3.
- [Release notes](https://github.com/0xPolygonHermez/zkevm-node/releases)
- [Changelog](https://github.com/0xPolygonHermez/zkevm-node/blob/develop/.goreleaser.yaml)
- [Commits](0xPolygonHermez/zkevm-node@v0.1.2...v0.1.3)

---
updated-dependencies:
- dependency-name: github.com/0xPolygonHermez/zkevm-node
  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>

* Remove MaticAddr (#464)

* Increase gasPrice (#466)

* Fix channel listener when claimTxManager is disabled (#468)

* remove unused config param (#470)

* Fix revert check and max rety mechanism (#472)

* Fix revert check and max rety mechanism

* Add maxRetries and retry interval as config params

* force gha

* fix config (#473)

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: cool-developer <[email protected]>
Co-authored-by: Cool Developer <[email protected]>
Co-authored-by: Cool Developer <[email protected]>
Co-authored-by: Cool Developer <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Cool Developer <[email protected]>
Co-authored-by: Albert Callarisa <[email protected]>
Co-authored-by: Albert Callarisa <[email protected]>
Co-authored-by: Arnau Bennassar <[email protected]>
Co-authored-by: Daniel Dimitrov <[email protected]>
  • Loading branch information
11 people authored Aug 3, 2023
1 parent 74b2905 commit d771f80
Show file tree
Hide file tree
Showing 42 changed files with 363 additions and 2,263 deletions.
69 changes: 2 additions & 67 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@ on:
- master
- develop
pull_request:
repository_dispatch:
types: [ok-to-test-command]

jobs:
trusted-lint:
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
lint:
runs-on: ubuntu-latest
steps:
- name: Install Go
Expand All @@ -19,70 +17,7 @@ jobs:
go-version: 1.19.x
- name: Checkout code
uses: actions/checkout@v2
- name: Inject github insteadOf configuration
env:
PRIVATE_GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
run: |
git config --global url."https://${PRIVATE_GITHUB_TOKEN}:[email protected]/".insteadOf "https://github.com/"
- name: download dependencies
run: go mod vendor
- name: Lint
run: |
make install-linter
make lint
from-fork-lint:
if:
github.event_name == 'repository_dispatch' &&
github.event.client_payload.slash_command.sha != '' &&
contains(github.event.client_payload.pull_request.head.sha, github.event.client_payload.slash_command.sha)
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: 1.19.x
- name: Fork based /ok-to-test checkout
uses: actions/checkout@v2
with:
ref: 'refs/pull/${{ github.event.client_payload.pull_request.number }}/merge'
- name: Inject github insteadOf configuration
env:
PRIVATE_GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
run: |
git config --global url."https://${PRIVATE_GITHUB_TOKEN}:[email protected]/".insteadOf "https://github.com/"
- name: download dependencies
run: go mod vendor
- name: Lint
run: |
make install-linter
make lint
# Update check run
- uses: actions/github-script@v5
id: update-check-run
if: ${{ always() }}
env:
number: ${{ github.event.client_payload.pull_request.number }}
job: ${{ github.job }}
# Conveniently, job.status maps to https://developer.github.com/v3/checks/runs/#update-a-check-run
conclusion: ${{ job.status }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { data: pull } = await github.rest.pulls.get({
...context.repo,
pull_number: process.env.number
});
const ref = pull.head.sha;
const { data: checks } = await github.rest.checks.listForRef({
...context.repo,
ref
});
const check = checks.check_runs.filter(c => c.name === process.env.job);
const { data: result } = await github.rest.checks.update({
...context.repo,
check_run_id: check[0].id,
status: 'completed',
conclusion: process.env.conclusion
});
return result;
23 changes: 0 additions & 23 deletions .github/workflows/ok-to-test.yml

This file was deleted.

72 changes: 1 addition & 71 deletions .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,8 @@ on:
- develop
- update-external-dependencies
pull_request:
repository_dispatch:
types: [ok-to-test-command]
jobs:
trusted-test-e2e:
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
test-e2e:
strategy:
matrix:
go-version: [ 1.19.x ]
Expand All @@ -26,72 +23,5 @@ jobs:
go-version: ${{ matrix.go-version }}
env:
GOARCH: ${{ matrix.goarch }}
- name: download dependencies
run: go mod vendor
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Test
run: make test-full
from-fork-test-e2e:
if:
github.event_name == 'repository_dispatch' &&
github.event.client_payload.slash_command.sha != '' &&
contains(github.event.client_payload.pull_request.head.sha, github.event.client_payload.slash_command.sha)
strategy:
matrix:
go-version: [ 1.19.x ]
goarch: [ "amd64" ]
runs-on: ubuntu-latest
steps:
- name: Fork based /ok-to-test checkout
uses: actions/checkout@v2
with:
ref: 'refs/pull/${{ github.event.client_payload.pull_request.number }}/merge'
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go-version }}
env:
GOARCH: ${{ matrix.goarch }}
- name: download dependencies
run: go mod vendor
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Test
run: make test-full

# Update check run
- uses: actions/github-script@v5
id: update-check-run
if: ${{ always() }}
env:
number: ${{ github.event.client_payload.pull_request.number }}
job: ${{ github.job }}
# Conveniently, job.status maps to https://developer.github.com/v3/checks/runs/#update-a-check-run
conclusion: ${{ job.status }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { data: pull } = await github.rest.pulls.get({
...context.repo,
pull_number: process.env.number
});
const ref = pull.head.sha;
const { data: checks } = await github.rest.checks.listForRef({
...context.repo,
ref
});
const check = checks.check_runs.filter(c => c.name === process.env.job);
const { data: result } = await github.rest.checks.update({
...context.repo,
check_run_id: check[0].id,
status: 'completed',
conclusion: process.env.conclusion
});
return result;
72 changes: 1 addition & 71 deletions .github/workflows/test-edge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,8 @@ on:
- develop
- update-external-dependencies
pull_request:
repository_dispatch:
types: [ok-to-test-command]
jobs:
trusted-test-edge:
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
test-edge:
strategy:
matrix:
go-version: [ 1.19.x ]
Expand All @@ -26,72 +23,5 @@ jobs:
go-version: ${{ matrix.go-version }}
env:
GOARCH: ${{ matrix.goarch }}
- name: download dependencies
run: go mod vendor
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Test
run: make test-edge
from-fork-test-edge:
if:
github.event_name == 'repository_dispatch' &&
github.event.client_payload.slash_command.sha != '' &&
contains(github.event.client_payload.pull_request.head.sha, github.event.client_payload.slash_command.sha)
strategy:
matrix:
go-version: [ 1.19.x ]
goarch: [ "amd64" ]
runs-on: ubuntu-latest
steps:
- name: Fork based /ok-to-test checkout
uses: actions/checkout@v2
with:
ref: 'refs/pull/${{ github.event.client_payload.pull_request.number }}/merge'
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go-version }}
env:
GOARCH: ${{ matrix.goarch }}
- name: download dependencies
run: go mod vendor
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Test
run: make test-edge

# Update check run
- uses: actions/github-script@v5
id: update-check-run
if: ${{ always() }}
env:
number: ${{ github.event.client_payload.pull_request.number }}
job: ${{ github.job }}
# Conveniently, job.status maps to https://developer.github.com/v3/checks/runs/#update-a-check-run
conclusion: ${{ job.status }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { data: pull } = await github.rest.pulls.get({
...context.repo,
pull_number: process.env.number
});
const ref = pull.head.sha;
const { data: checks } = await github.rest.checks.listForRef({
...context.repo,
ref
});
const check = checks.check_runs.filter(c => c.name === process.env.job);
const { data: result } = await github.rest.checks.update({
...context.repo,
check_run_id: check[0].id,
status: 'completed',
conclusion: process.env.conclusion
});
return result;
74 changes: 1 addition & 73 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,8 @@ on:
- develop
- update-external-dependencies
pull_request:
repository_dispatch:
types: [ok-to-test-command]
jobs:
trusted-test:
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
test:
strategy:
matrix:
go-version: [ 1.19.x ]
Expand All @@ -26,76 +23,7 @@ jobs:
go-version: ${{ matrix.go-version }}
env:
GOARCH: ${{ matrix.goarch }}
- name: download dependencies
run: go mod vendor
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Test
run: make test
- name: Benchmark Test
run: make bench
from-fork-test:
if:
github.event_name == 'repository_dispatch' &&
github.event.client_payload.slash_command.sha != '' &&
contains(github.event.client_payload.pull_request.head.sha, github.event.client_payload.slash_command.sha)
strategy:
matrix:
go-version: [ 1.19.x ]
goarch: [ "amd64" ]
runs-on: ubuntu-latest
steps:
- name: Fork based /ok-to-test checkout
uses: actions/checkout@v2
with:
ref: 'refs/pull/${{ github.event.client_payload.pull_request.number }}/merge'
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go-version }}
env:
GOARCH: ${{ matrix.goarch }}
- name: download dependencies
run: go mod vendor
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Test
run: make test
- name: Benchmark Test
run: make bench

# Update check run
- uses: actions/github-script@v5
id: update-check-run
if: ${{ always() }}
env:
number: ${{ github.event.client_payload.pull_request.number }}
job: ${{ github.job }}
# Conveniently, job.status maps to https://developer.github.com/v3/checks/runs/#update-a-check-run
conclusion: ${{ job.status }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { data: pull } = await github.rest.pulls.get({
...context.repo,
pull_number: process.env.number
});
const ref = pull.head.sha;
const { data: checks } = await github.rest.checks.listForRef({
...context.repo,
ref
});
const check = checks.check_runs.filter(c => c.name === process.env.job);
const { data: result } = await github.rest.checks.update({
...context.repo,
check_run_id: check[0].id,
status: 'completed',
conclusion: process.env.conclusion
});
return result;
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ to interact with the [bridge smart contract](https://github.com/0xPolygonHermez/

## Running the bridge service

- [Running localy](docs/running_local.md)
- [Running locally](docs/running_local.md)

Loading

0 comments on commit d771f80

Please sign in to comment.