Skip to content

Commit

Permalink
Merge v0.0.2 (#319)
Browse files Browse the repository at this point in the history
* 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 <kevin@polygon.technology>

---------

Co-authored-by: Cool Developer <kevin@polygon.technology>
  • Loading branch information
ARR552 and Cool Developer authored Feb 27, 2023
1 parent 0a6430a commit d48038b
Show file tree
Hide file tree
Showing 5 changed files with 98 additions and 6 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: goreleaser

on:
push:
tags:
- 'v*.*.*'

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

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18

- name: Get packr
run: go get -u github.com/gobuffalo/packr/v2/packr2

- name: Prepare
run: git reset --hard

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.TOKEN_RELEASE }}
4 changes: 2 additions & 2 deletions db/pgstorage/pgstorage.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ func (p *PostgresStorage) GetNumberDeposits(ctx context.Context, networkID uint,

// GetNextForcedBatches gets the next forced batches from the queue.
func (p *PostgresStorage) GetNextForcedBatches(ctx context.Context, nextForcedBatches int, dbTx pgx.Tx) ([]etherman.ForcedBatch, error) {
const getNextForcedBatchesSQL = "SELECT forced_batch_num, global_exit_root, raw_tx_data, sequencer, batch_num, block_id FROM sync.forced_batch WHERE batch_num IS NULL ORDER BY forced_batch_num LIMIT $1"
const getNextForcedBatchesSQL = "SELECT forced_batch_num, global_exit_root, raw_tx_data, sequencer, batch_num, block_id, received_at FROM sync.forced_batch INNER JOIN sync.block ON sync.block.id = sync.forced_batch.block_id WHERE batch_num IS NULL ORDER BY forced_batch_num LIMIT $1"
e := p.getExecQuerier(dbTx)
// Get the next forced batches
rows, err := e.Query(ctx, getNextForcedBatchesSQL, nextForcedBatches)
Expand All @@ -253,7 +253,7 @@ func (p *PostgresStorage) GetNextForcedBatches(ctx context.Context, nextForcedBa
batches := make([]etherman.ForcedBatch, 0, len(rows.RawValues()))
var forcedBatch etherman.ForcedBatch
for rows.Next() {
err := rows.Scan(&forcedBatch.ForcedBatchNumber, &forcedBatch.GlobalExitRoot, &forcedBatch.RawTxsData, &forcedBatch.Sequencer, &forcedBatch.BatchNumber, &forcedBatch.BlockID)
err := rows.Scan(&forcedBatch.ForcedBatchNumber, &forcedBatch.GlobalExitRoot, &forcedBatch.RawTxsData, &forcedBatch.Sequencer, &forcedBatch.BatchNumber, &forcedBatch.BlockID, &forcedBatch.ForcedAt)
if err != nil {
return nil, err
}
Expand Down
1 change: 1 addition & 0 deletions db/storage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ func TestForcedAndVerifiedBatch(t *testing.T) {
require.Equal(t, fbs[0].GlobalExitRoot, fb.GlobalExitRoot)
require.Equal(t, fbs[0].BatchNumber, fb.BatchNumber)
require.Equal(t, fbs[0].ForcedBatchNumber, fb.ForcedBatchNumber)
require.Equal(t, fbs[0].ForcedAt.Unix(), fb.ForcedAt.Unix())

err = pg.AddBatchNumberInForcedBatch(ctx, 1, 2, tx)
require.NoError(t, err)
Expand Down
Loading

0 comments on commit d48038b

Please sign in to comment.