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

State interface #2

Merged
merged 2 commits into from
Nov 13, 2021
Merged

State interface #2

merged 2 commits into from
Nov 13, 2021

Conversation

ToniRamirezM
Copy link
Contributor

First iteration of the State interface.

Everything is WIP so just review /state/state.go and /state/batchprocessor.go

state/types.go Outdated
type Proof struct{}

// Transaction
type Transaction struct {
Copy link
Contributor

@Mikelle Mikelle Nov 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why can't we just import it from polygon-sdk, if this is the same?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Theoretically, we should use go-ethereum transaction until we identify we really need something else.

https://github.com/ethereum/go-ethereum/blob/master/core/types/transaction.go#L51

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to user geth type

Copy link
Contributor

@tclemos tclemos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the JSONRpc perspective, we can start with these methods in the interface, and then we can figure out together the missing ones as I advance in the JSONRpc server development. For now LGTM 🎉

)

// State is the internal representation of the account
type State struct {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to have a State interface instead of the implementation in order to allow other components to reference it and make it a testable code.

Theoretically, any service importing this library could write an interface to match the implementation, but this would require each service to implement its own interface, maybe having it centralized makes it easier for everyone. Also, this suggestion is not only for the State package but for all the packages that will be shared by the services.

Another relevant point IMO is that it makes it easier to identify all the exposed methods by the package without having to deal with the real code in the middle of the inspection.

With this approach, only the Interface needs to be public and the implementation can be private, making the interface with the package cleaner from the outside point of view.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When we are a bit more advanced in terms of code, I'd love to dedicate a session to talk about how can we handle testing. Maybe we can bring this topic then

Copy link
Member

@arnaubennassar arnaubennassar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the State struct content

)

// State is the internal representation of the account
type State struct {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When we are a bit more advanced in terms of code, I'd love to dedicate a session to talk about how can we handle testing. Maybe we can bring this topic then

state/state.go Outdated
}

// GetStateRoot returns the root of the state tree
func (s *State) GetStateRoot() (*big.Int, error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm missing a parameter to select the viratual state or the consolidated one

Copy link
Contributor Author

@ToniRamirezM ToniRamirezM Nov 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the isVirtual bool

// EstimateGas for a transaction
func (s *State) EstimageGas(address common.Address) uint64 {
return 0
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm missing other functions:
func (s *State) GetLastBlock() (Block, error) //Block needs: BlockNum, Timestamp, Hash, ParentHash
func (s *State) GetLastBatch(isVirtual) (batch, error)
func (s *State) ResetState(batchNum) error

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Method added

state/batchprocessor.go Show resolved Hide resolved
func (b *BatchProcessor) CheckTransaction(tx types.Transaction) error {
return nil
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm missing a function:
func (s *State) ConsolidateBatch(batch) error to update the info when a consolidated batch is detected

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Method added

@ToniRamirezM ToniRamirezM merged commit 35f2927 into main Nov 13, 2021
@ToniRamirezM ToniRamirezM deleted the feature/state branch November 13, 2021 10:40
Psykepro added a commit that referenced this pull request Oct 25, 2022
Signed-off-by: Nikolay Nedkov <[email protected]>
Psykepro added a commit that referenced this pull request Feb 8, 2023
Signed-off-by: Nikolay Nedkov <[email protected]>
ToniRamirezM added a commit that referenced this pull request Feb 15, 2023
* WIP

* wip: adding some implementation of the finalizer, defining needed interfaces by the finalizer from the dbmanager, and implementing the remaining resourses Sub.

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

* wip:2

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

* fix: fixing comment

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

* wip: #4

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

* fix: fixing bootstrap method in sequencer

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

* fix: fixing log in finalizer.reopenBatch

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

* DBManager WIP (#1512)

* WIP

* WIP

* WIP

* wip: adding implementation for .isCurrBatchAboveLimitWindow', and doing small refactor.

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

* fix: fixing handling of deadlines and events

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

* WIP: fixing logic.

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

* WIP: fixing logic.

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

* Synchronizer stores the accumulated input hash (#1535)

* Initial worker implementation (still WIP)

* merge

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

* Wip: merge

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

* merge

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

* Feature/dbmanager (#1524)

* wip: adding implementation for .isCurrBatchAboveLimitWindow', and doing small refactor.

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

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* ForceBatch unit test

* SequenceForceBatch unit test

* Fix forcedBatch check

* linter

* Fix reset forcedBatch

* batch and forcedbatch table modified

* fix

* WIP

* Finish dbmanager

* Branches Integration

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

* implement last methods (#1542)

* added getLastStateRoot (#1543)

* fix,tests: fixing some methods and adding unit tests.

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

* Closing Signals Manager first implementation (#1550)

* Closing Signals Manager first implementation

* Closing Signals Manager first implementation

* Closing Signals Manager first implementation

* refactor

* Added worker unit testing. Missing TODOs implementation done

* Cahnge getLastGer implementation (#1556)

* wip fixes

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

* wip fixes

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

* wip fixes

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

* fixed addrqueue.addTx returning wrong (newReadyTx, prevReadyTx) when the added tx was a notReadyTxs

* Fix encoding bug in AddForcedBatch (#1544)

The forced_batch table expects the raw_txs_data column to be a
string (specifically a hex encoding of the raw transaction bytes).
The corresponding GetForcedBatch function uses hex.DecodeString to
turn the value of this column back into raw bytes. However,
AddForcedBatch is missing a hex.EncodeToString, so it is actually
interpreting the raw transaction bytes as an ASCII representation
of a hex-encoded string.

* Feature/executor error (#1566)

* Handle executor and rom erros from executor

* convert touched addresses

* add debug logs

* add debug logs

* store request in case of executor error

* store request in case of executor error

* minor fixes

* WIP

* convert readwriteaddresses to map

* add test

* add method to mark wip txs as pending

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

* fix: wip fix of prepareProcessRequestFromState to fetch txs when reprocess is done.

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

* test (#1569)

* fix: fixing benchmark test and several bugs.

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

* Fix linter and tests (#1576)

* fix linter

* fix linter

* fix linter

* fix linter

* fix linter

* fix linter

* fix linter

* fix linter

* fix linter

* fix linter

* fix linter

* fix linter

* fix linter

* fix linter

* fix linter

* fix linter

* fix linter

* fix linter

* fix linter

* fix linter

* fix linter

* fix linter

* remove testMain (#1585)

* Fix errors found while running bridge/GER tests

* update mock files

* Add forced batch closing signal unit test (#1593)

* add forced batch closing signal unit test

* add forced batch closing signal unit test

* add forced batch closing signal unit test

* add forced batch closing signal unit test

* test: adding sequencer benchmark test with ERC20 transfers.

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

* adding erc-20 benchmark test, adding metrics for wokerker processing time and fixing unit tests of finalizer

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

* adding missing mutex lock in woker.MoveTxToNotReady

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

* fix: fixing benchmark result print messages.

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

* [New Sequencer] Merge develop into new sequencer branch (#1602)

* Backport v0.0.1-RC4 & RC5 to develop (#1483)

* update poe sc to security mechanisms version (#1467)

* update poe sc to security mechanisms version

* updated names, fix tests and remove ger timestamp and other fixes

* fix rlp tool

* fix linter

* new genesis + fix

* new smc

* Update executor errors

* Update executor errors

* Update executor errors

* Update executor errors

* new l2 contract names

* sequencewr unit test commented

* fix test

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

* Fix/1472 verify batches timeout (#1473)

Closes #1472

### What does this PR do?

During testing we faced an issue of two consecutive verified batches on L1 without respecting the time spacing.
The problem was that we were relying on the timer to check if we can start generating a new final proof. That timer is only reset after the final proof is sent to L1. This means that there's a time window between the generation of a final proof and its verification in which a new proof eligible to be final can be generated and immediately trigger another final proof generation.

The fix introduced here is to have a `verifyingProof` flag that gets checked when the final proof generation process begins and released only when the verification phase ends (or in case of errors).

Co-authored-by: Thiago Coimbra Lemos <[email protected]>
Co-authored-by: Alonso <[email protected]>
Co-authored-by: ToniRamirezM <[email protected]>

* fix unpack the revert reason (#1475)

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

* fix: update the genesis file (#1489)

* update the genesis

* revert bytecode

* upgrade git hub actions to the latest versions (#1471)

* build(deps): bump github.com/go-git/go-billy/v5 from 5.3.1 to 5.4.0 (#1492)

Bumps [github.com/go-git/go-billy/v5](https://github.com/go-git/go-billy) from 5.3.1 to 5.4.0.
- [Release notes](https://github.com/go-git/go-billy/releases)
- [Commits](go-git/go-billy@v5.3.1...v5.4.0)

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

Signed-off-by: dependabot[bot] <[email protected]>

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

* fatals changed to return error (#1494)

* fatals changed to return error

* comments

* [Aggregator] Add metrics package and ConnectedProvers metric (#1502)

* feat: add metrics pkg and connected provers metric

This commit adds the `metrics` subpackage in the `aggregator` package.
It also adds the connected provers gauge metric to keep track of
the number of currently connected provers.

Signed-off-by: Paolo Grisoli <[email protected]>

* chore: expose aggregator metrics port

This commit exposes the aggregator metrics port in
`test/docker-compose.yml`.

Signed-off-by: Paolo Grisoli <[email protected]>

* feat: add WorkingProvers gauge metric (#1504)

Closes #1503 

### What does this PR do?

This PR adds the `aggregator_current_working_provers` gauge metric to keep track of the number of Provers that are busy generating a proof at any point in time.

* build(deps): bump google.golang.org/grpc from 1.51.0 to 1.52.0 (#1525)

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

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

* build(deps): bump github.com/gorilla/websocket from 1.4.2 to 1.5.0 (#1510)

Bumps [github.com/gorilla/websocket](https://github.com/gorilla/websocket) from 1.4.2 to 1.5.0.
- [Release notes](https://github.com/gorilla/websocket/releases)
- [Commits](gorilla/websocket@v1.4.2...v1.5.0)

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

Signed-off-by: dependabot[bot] <[email protected]>

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.37.0 to 0.39.0 (#1511)

Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.37.0 to 0.39.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](prometheus/common@v0.37.0...v0.39.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]>

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

* Feature/#1506 forced batch (#1523)

* ForceBatch unit test

* SequenceForceBatch unit test

* Fix forcedBatch check

* linter

* Fix reset forcedBatch

* batch and forcedbatch table modified

* fix

* Handle and log ROM OOC errors in executor (#1528)

* Handle and log ROM OOC errors in executor

* Fix IP

* linter

* improve test

* solve conflicts

* Feature/#1515 migration (#1531)

* rpc and broadcast without migrations

* mock

* linter

* fix unit test

* migration flag for synchronizer and checkMigrations

* run/stop aggregator command

* discard invalid txs in the pool when checking for an underpriced tx (#1563)

* allow array config params to be set via env vars (#1553)

* new eth tx manager (#1484)

* Fix: typos (#1567)

* Fix: typo

Fix: typo

* Fix: typo

Fix: typo

* Fix: typo

Fix: typo

* Fix: typo

Fix: typo

* Fix: typo

Fix: typo

* Fix: typo

Fix: typo

* Fix: typo

Fix: typo

* Merge release/v0.0.1 into develop (#1561)

Merge release/v0.0.1 changes into develop. The original release/v0.0.1 branch has been left intact to be able to perform hotfixes in case.

* build(deps): bump github.com/spf13/viper from 1.14.0 to 1.15.0 (#1568)

Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.14.0 to 1.15.0.
- [Release notes](https://github.com/spf13/viper/releases)
- [Commits](spf13/viper@v1.14.0...v1.15.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]>

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

* build(deps): bump github.com/urfave/cli/v2 from 2.23.7 to 2.24.1 (#1573)

Bumps [github.com/urfave/cli/v2](https://github.com/urfave/cli) from 2.23.7 to 2.24.1.
- [Release notes](https://github.com/urfave/cli/releases)
- [Changelog](https://github.com/urfave/cli/blob/main/docs/CHANGELOG.md)
- [Commits](urfave/cli@v2.23.7...v2.24.1)

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

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

* Gas limit 150K + tests (#1551)

* Gas limit 150K + tests

* FreeClaimGasLimit as a config param

* linter

* fix config test

* Gas limit 150K + tests (#1551)

* Gas limit 150K + tests

* FreeClaimGasLimit as a config param

* linter

* fix config test

* Db flag to identify trusted verified batches (#1575)

* Db flag to identify trusted verified batches

* log

* Feature/#1549 genesis txs (#1574)

* genesis txs

* linter

* command removed

* fixes

* Feature/#1486 l2gasprice (#1548)

* gasPricer as a component with the follower

follower sets the l2gasprice depending on the l1 gas price

* make command

* Unit test + mocks

* linter

* fix

* suggestions

* suggestions

* log message

* suggesto to suggester + fix merge

* file name fixed

* jRPC - Batch methods and custom endpoint docs (#1554)

* build(deps): bump google.golang.org/grpc from 1.52.0 to 1.52.3 (#1588)

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.52.0 to 1.52.3.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](grpc/grpc-go@v1.52.0...v1.52.3)

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

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

* New smc version (#1581)

* New smc version

* linter

* fix

* linter

* genesis + network update

* l2 claim gas limit

* new aggregator wallet

* config

* add support to pre-EIP155 txs (#1582)

* add support to pre-EIP155 txs

* =)

* naming things

* add pre-EIP-155 tx e2e test

* fix merge with develop

* add check for the vitualized batch when testing pre-EIP155 tx

* remove dependency of iden3 package from jrpc (#1596)

* Merge

* Feature/#1577 force (#1599)

* forcedBatch Script

* Sequence forcedBatch

* linter

* linter

* linter

* migrations

* config

* state.exit_root

* state.exit_root

* state.exit_root

* state.exit_root

* state.exit_root

* state.exit_root

* merge state migrations

* merge state migrations

* remerge with develop

* Comment TestPreEIP155Tx

* remove not used test

---------

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Paolo Grisoli <[email protected]>
Co-authored-by: Paolo Grisoli <[email protected]>
Co-authored-by: Thiago Coimbra Lemos <[email protected]>
Co-authored-by: Alonso <[email protected]>
Co-authored-by: cool-developer <[email protected]>
Co-authored-by: tclemos <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alonso Rodriguez <[email protected]>
Co-authored-by: omahs <[email protected]>

* adding missing mutex lock in woker.MoveTxToNotReady

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

* fix: fixing benchmark result print messages.

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

* adding missing part for processing forced batches, new http port exposing profiling endpoints when enabled, fixing lastGER hash used on opening new batch, and adding context to 'finalizer.processTransation' logs.

* fixing lint error

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

* adding missing port exposing for profilintin test/docker-compose.yml

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

* adding prints for fetching methods in benchmark/.../metrics.go

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

* Fix closing signals (#1623)

* adding wip fixes and the closing signal emit from the sequencesender (#1625)

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

* fix forced batch query (#1630)

* L1Timeout (#1635)

* L1Timeout

* L1Timeout

* L1Timeout

* fix config files

* wip

* fix config files

* fix config files

* fix test

* fix test

* wip: fixing forced batches.

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

* decode txs

* wip

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

* wip #2

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

* wip #3

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

* wip fixes and improvements

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

* wip making print of reprocess state root difference to not be Fatal.

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

* wip: removing redundant fatal in reprocessBatch and fixing unit tests.

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

* wip: removing redundant fatal

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

* wip: fixing to update StateRoot when passing no txs for processing to close empty batch.

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

* wip fixes

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

* wip updating config files.

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

* changing when checking nextSendingToL1Deadline if there are no txs in the batch not to close the batch but to update the deadline

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

* removing debug prints

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

* wip

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

* update executor image to e7ac5c4

* smc update

* GetForks + test

* integrate getForks

* l1 network docker image

* linter

* Fee recipient

* genesis

* linter

* fix unit test

* coinbase

* claim signature

* smc update l2coinbase

* remove genesis txs

* genesis

* genesis docker + new addresses and names

* addresses

* genesis fix

* fix script

* fix GenBlockNum

* fix docker-compose

* fix prover config

* update makefile

* fix config toml files

* fix db schema

* timestamp

* fix state tests

* minor fixes

* fix migrations test

* update prover

* prover image

* prover image

* fix makefile

* fix fork_id in ProcessBatch

* fix fork_id in ProcessBatch

* update prover image

* update test

* update test

* do not update MT in reprocess

* change config

* update MT in reprocess

* fix RlpFieldsToLegacyTx

* fix RlpFieldsToLegacyTx

* fix RlpFieldsToLegacyTx

* change config

* change config

* increase test timeout

* increase test timeout

* wip fixes

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

* check fix

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

* fixing 'debug.node.config.toml'

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

* removing unused config props for sequencer

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

---------

Signed-off-by: Nikolay Nedkov <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Paolo Grisoli <[email protected]>
Co-authored-by: Nikolay Nedkov <[email protected]>
Co-authored-by: Alonso Rodriguez <[email protected]>
Co-authored-by: agnusmor <[email protected]>
Co-authored-by: agnusmor <[email protected]>
Co-authored-by: Alonso <[email protected]>
Co-authored-by: Jeb Bearer <[email protected]>
Co-authored-by: Paolo Grisoli <[email protected]>
Co-authored-by: Thiago Coimbra Lemos <[email protected]>
Co-authored-by: cool-developer <[email protected]>
Co-authored-by: tclemos <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: omahs <[email protected]>
IdrisHanafi referenced this pull request in IdrisHanafiTests/supernets2-node Jul 31, 2023
Psykepro added a commit that referenced this pull request Aug 4, 2023
Signed-off-by: Nikolay Nedkov <[email protected]>
ToniRamirezM pushed a commit that referenced this pull request Aug 4, 2023
* improve: adding logs

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

* adding more logs

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

* adding more logs #2

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

---------

Signed-off-by: Nikolay Nedkov <[email protected]>
ToniRamirezM added a commit that referenced this pull request Aug 7, 2023
* fix null effective_percentage

* fix forkID calculation

* fix script

* generate json-schema + docs for node config file and network_custom

* fix unittest

* Hotfixv0.1.4 to v0.2.0 (#2255)

* Hotfix v0.1.4 to main (#2250)

* fix concurrent web socket writes

* fix eth_syncing

* fix custom trace internal tx call error handling and update prover

* add test to custom tracer depth issue; fix internal call error and gas used

* fix custom tracer for internal tx with error and no more steps after it

* remove debug code

* Make max grpc message size configurable  (#2179)

* make max grpc message size configurable

* fix state tests

* fix tests

* fix tests

* get SequencerNodeURI from SC if empty and not IsTrustedSequencer

* Optimize trace (#2183)

* optimize trace

* fix memory reading

* update docker image

* update prover image

* fix converter

* fix memory

* fix step memory

* fix structlogs

* fix structlogs

* fix structlogs

* fix structlogs

* fix structlogs

* fix structlogs

* fix structlogs

* fix structlogs

* update prover image

* fix struclogs

* fix memory size

* fix memory size

* fix memory size

* refactor memory resize

* refactor memory resize

* move log for the best fitting tx (#2192)

* fix load zkCounters from pool

* remove unnecessary log.info

* add custom tracer support to CREATES opcode without depth increase (#2213)

* logs

* fix getting stateroot from previous batch (GetWIPBatch)

* logs

* Fix GetWipBatch when previous last batch is a forced batch

* fix forcedBatch trusted state

* Revert "fix getting stateroot from previous batch (GetWIPBatch)"

This reverts commit 860f0e7.

* force GHA

* add pool limits (#2189)

* Hotfix/batch l2 data (#2223)

* Fix BatchL2Data

* Force GHA

* remove failed txs from the pool limit check (#2233)

* debug trace by batch number via external rpc requests (#2235)

* fix trace batch remote requests in parallel limitation (#2244)

* Added RPC.TraceBatchUseHTTPS config parameter

* fix executor version

---------

Co-authored-by: tclemos <[email protected]>
Co-authored-by: tclemos <[email protected]>
Co-authored-by: Toni Ramírez <[email protected]>
Co-authored-by: agnusmor <[email protected]>
Co-authored-by: agnusmor <[email protected]>
Co-authored-by: Thiago Coimbra Lemos <[email protected]>

* fix test

* fix test

---------

Co-authored-by: tclemos <[email protected]>
Co-authored-by: tclemos <[email protected]>
Co-authored-by: Toni Ramírez <[email protected]>
Co-authored-by: agnusmor <[email protected]>
Co-authored-by: agnusmor <[email protected]>
Co-authored-by: Thiago Coimbra Lemos <[email protected]>

* Effective GasPrice refactor+fixes (#2247)

* effective GasPrice refactor

* bugs fixes and finalizer tests fixes

* fix typo

* fix calculate effective gasprice percentage

* fix test gas price

* Fix/#2257 effective gas price receipt (#2258)

* effective gas price returned by the rpc in the receipt

* linter

* bugfix: fixing l2blocks timestamp for the fist batch (#2260)

* bugfix: fixing l2blocks timestamp for the fist batch

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

* fix finalizer unit test

---------

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

* add more comments, and removed fields PrivateKeyPath and PrivateKeyPassword from etherman.Config that are not in use

* add info to git action

* add info to git action

* fix github action

* updated comments

* updated comments

* Fix/#2263 gas used (#2264)

* fix fea2scalar and gas used

* suggestion

* fix fea2scalar

* suggestion

* Fix pending tx when duplicate nonce (#2270)

* fix pending tx when duplicate nonce

* set pool.transaction.failed_reason to NULL when updating an existing tx

* add more log details when adding tx to AddrQueue

* fix query to add tx to the pool. Fix lint errors

* change failed_reason for tx discarded due duplicate nonce

* Only return a tx from the pool if tx is in pending status (#2273)

* Return a tx from the pool only if it is

* fix TestGetTransactionByHash

---------

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

* fix documentation with  config file

* improve: adding check to skip appending effectivePercentage if current forkId is under 5.

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

* Fiex effectiveGasprice unsigned txs with forkId lower than 5 (#2278)

* feat: adding functionality to stop sequencer on specific batch num from config param.

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

* patch: adding print for X-Real-IP in JSON-RPC

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

* Fix checkIfSynced (#2289)

* [Rehashing] Check logs order and fix blockhash and blockNumber in the log conversion (#2280)

* fix and check order

* linter

* flushID synchronizer (#2287)

* FlushID in synchronizer

* linter

* fix logs

* commnets

* executor error refactor (#2299)

* handle invalid rlp ROM error (#2297)

* add maxL2GasPrice (#2294)

* add maxL2GasPrice

* fix

* fix

* add test

* document parameter

* update description

* Error refactor (#2302)

* error refactor

* refactor

* Fix replaced tx as failed when duplicated nonce (#2308)

* Fix UpdateTxStatus for replacedTx

* Fix adding tx with same nonce on AddrQueue

* log reprocess need (#2309)

* log reprocess need

* Update finalizer.go

* Feature/2300 synchronizer detect if executor restart (#2306)

* detect if executor restarts and stop synchonizer

* Update prover images (#2311)

* update prover image

* update prover images

* change executor param

* Update testnet.prover.config.json

* Update test.permissionless.prover.config.json

* Update test.prover.config.json

* Update public.prover.config.json

* prover params

* prover params

* prover params

* update prover images

* add doc, and fix dockers to be able to use snap/restore feature (#2315)

* add doc, and fix dockers to be able to use snap/restore feature

* add doc for snap/restore feature

---------

Co-authored-by: Toni Ramírez <[email protected]>

* Update docker-compose.yml

* Update docker-compose.yml

* do not add tx to the pool in case err != nil

* do not add tx into the pool if a fatal error in the executor happens during pre execution

* fix dbMultiWriteSinglePosition config value

* workarround for the error error closing batch

* workarround for the error error closing batch

* workarround for the error error closing batch

* workaround for the error of closing batch, another case

* `Worker`'s `AddTxTracker` Bug Fix (#2343)

* bugfix: Resolve  Function Bug in Worker Module

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

* improve: improving the wait for pending txs to be for only the txs for the current address.

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

---------

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

* rename config files (#2349)

* fix closing batch + logs (#2348)

* fix closing batch + logs

* fix

* log description

* typo errors

* fix error: failed to store transactions for batch due to duplicate key

* test

* typo

* Update README.md

* Update release.yml

* bugfix: fixing place where we need to increment the wg per address for pending txs

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

* Store batchL2Data when the batch is opened (#2358)

* add GasPriceMarginFactor and MaxGasPrice to eth-tx-manager (#2360)

* add GasPriceMarginFactor and MaxGasPrice to eth-tx-manager

* add logs, fix config

* update config file documentation

---------

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

* bugfix: attaching missing TxTracker.From to pending txs to store for forced batches. (#2365)

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

* Update README.md

* improve: adding logs (#2373)

* improve: adding logs

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

* adding more logs

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

* adding more logs #2

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

---------

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

* bugfix: fixing finalizer's  handling. (#2375)

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

* Update README.md

---------

Signed-off-by: Nikolay Nedkov <[email protected]>
Co-authored-by: joanestebanr <[email protected]>
Co-authored-by: Alonso Rodriguez <[email protected]>
Co-authored-by: tclemos <[email protected]>
Co-authored-by: tclemos <[email protected]>
Co-authored-by: agnusmor <[email protected]>
Co-authored-by: agnusmor <[email protected]>
Co-authored-by: Thiago Coimbra Lemos <[email protected]>
Co-authored-by: joanestebanr <[email protected]>
Co-authored-by: Nikolay Nedkov <[email protected]>
ToniRamirezM added a commit that referenced this pull request Aug 16, 2023
* fix null effective_percentage

* fix forkID calculation

* fix script

* generate json-schema + docs for node config file and network_custom

* fix unittest

* Hotfixv0.1.4 to v0.2.0 (#2255)

* Hotfix v0.1.4 to main (#2250)

* fix concurrent web socket writes

* fix eth_syncing

* fix custom trace internal tx call error handling and update prover

* add test to custom tracer depth issue; fix internal call error and gas used

* fix custom tracer for internal tx with error and no more steps after it

* remove debug code

* Make max grpc message size configurable  (#2179)

* make max grpc message size configurable

* fix state tests

* fix tests

* fix tests

* get SequencerNodeURI from SC if empty and not IsTrustedSequencer

* Optimize trace (#2183)

* optimize trace

* fix memory reading

* update docker image

* update prover image

* fix converter

* fix memory

* fix step memory

* fix structlogs

* fix structlogs

* fix structlogs

* fix structlogs

* fix structlogs

* fix structlogs

* fix structlogs

* fix structlogs

* update prover image

* fix struclogs

* fix memory size

* fix memory size

* fix memory size

* refactor memory resize

* refactor memory resize

* move log for the best fitting tx (#2192)

* fix load zkCounters from pool

* remove unnecessary log.info

* add custom tracer support to CREATES opcode without depth increase (#2213)

* logs

* fix getting stateroot from previous batch (GetWIPBatch)

* logs

* Fix GetWipBatch when previous last batch is a forced batch

* fix forcedBatch trusted state

* Revert "fix getting stateroot from previous batch (GetWIPBatch)"

This reverts commit 860f0e7.

* force GHA

* add pool limits (#2189)

* Hotfix/batch l2 data (#2223)

* Fix BatchL2Data

* Force GHA

* remove failed txs from the pool limit check (#2233)

* debug trace by batch number via external rpc requests (#2235)

* fix trace batch remote requests in parallel limitation (#2244)

* Added RPC.TraceBatchUseHTTPS config parameter

* fix executor version

---------

Co-authored-by: tclemos <[email protected]>
Co-authored-by: tclemos <[email protected]>
Co-authored-by: Toni Ramírez <[email protected]>
Co-authored-by: agnusmor <[email protected]>
Co-authored-by: agnusmor <[email protected]>
Co-authored-by: Thiago Coimbra Lemos <[email protected]>

* fix test

* fix test

---------

Co-authored-by: tclemos <[email protected]>
Co-authored-by: tclemos <[email protected]>
Co-authored-by: Toni Ramírez <[email protected]>
Co-authored-by: agnusmor <[email protected]>
Co-authored-by: agnusmor <[email protected]>
Co-authored-by: Thiago Coimbra Lemos <[email protected]>

* Effective GasPrice refactor+fixes (#2247)

* effective GasPrice refactor

* bugs fixes and finalizer tests fixes

* fix typo

* fix calculate effective gasprice percentage

* fix test gas price

* Fix/#2257 effective gas price receipt (#2258)

* effective gas price returned by the rpc in the receipt

* linter

* bugfix: fixing l2blocks timestamp for the fist batch (#2260)

* bugfix: fixing l2blocks timestamp for the fist batch

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

* fix finalizer unit test

---------

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

* add more comments, and removed fields PrivateKeyPath and PrivateKeyPassword from etherman.Config that are not in use

* add info to git action

* add info to git action

* fix github action

* updated comments

* updated comments

* Fix/#2263 gas used (#2264)

* fix fea2scalar and gas used

* suggestion

* fix fea2scalar

* suggestion

* Fix pending tx when duplicate nonce (#2270)

* fix pending tx when duplicate nonce

* set pool.transaction.failed_reason to NULL when updating an existing tx

* add more log details when adding tx to AddrQueue

* fix query to add tx to the pool. Fix lint errors

* change failed_reason for tx discarded due duplicate nonce

* Only return a tx from the pool if tx is in pending status (#2273)

* Return a tx from the pool only if it is

* fix TestGetTransactionByHash

---------

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

* fix documentation with  config file

* improve: adding check to skip appending effectivePercentage if current forkId is under 5.

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

* Fiex effectiveGasprice unsigned txs with forkId lower than 5 (#2278)

* feat: adding functionality to stop sequencer on specific batch num from config param.

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

* patch: adding print for X-Real-IP in JSON-RPC

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

* Fix checkIfSynced (#2289)

* [Rehashing] Check logs order and fix blockhash and blockNumber in the log conversion (#2280)

* fix and check order

* linter

* flushID synchronizer (#2287)

* FlushID in synchronizer

* linter

* fix logs

* commnets

* executor error refactor (#2299)

* handle invalid rlp ROM error (#2297)

* add maxL2GasPrice (#2294)

* add maxL2GasPrice

* fix

* fix

* add test

* document parameter

* update description

* Error refactor (#2302)

* error refactor

* refactor

* Fix replaced tx as failed when duplicated nonce (#2308)

* Fix UpdateTxStatus for replacedTx

* Fix adding tx with same nonce on AddrQueue

* log reprocess need (#2309)

* log reprocess need

* Update finalizer.go

* Feature/2300 synchronizer detect if executor restart (#2306)

* detect if executor restarts and stop synchonizer

* Update prover images (#2311)

* update prover image

* update prover images

* change executor param

* Update testnet.prover.config.json

* Update test.permissionless.prover.config.json

* Update test.prover.config.json

* Update public.prover.config.json

* prover params

* prover params

* prover params

* update prover images

* add doc, and fix dockers to be able to use snap/restore feature (#2315)

* add doc, and fix dockers to be able to use snap/restore feature

* add doc for snap/restore feature

---------

Co-authored-by: Toni Ramírez <[email protected]>

* Update docker-compose.yml

* Update docker-compose.yml

* do not add tx to the pool in case err != nil

* do not add tx into the pool if a fatal error in the executor happens during pre execution

* fix dbMultiWriteSinglePosition config value

* workarround for the error error closing batch

* workarround for the error error closing batch

* workarround for the error error closing batch

* workaround for the error of closing batch, another case

* `Worker`'s `AddTxTracker` Bug Fix (#2343)

* bugfix: Resolve  Function Bug in Worker Module

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

* improve: improving the wait for pending txs to be for only the txs for the current address.

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

---------

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

* rename config files (#2349)

* fix closing batch + logs (#2348)

* fix closing batch + logs

* fix

* log description

* typo errors

* fix error: failed to store transactions for batch due to duplicate key

* test

* typo

* Update README.md

* Update release.yml

* bugfix: fixing place where we need to increment the wg per address for pending txs

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

* Store batchL2Data when the batch is opened (#2358)

* add GasPriceMarginFactor and MaxGasPrice to eth-tx-manager (#2360)

* add GasPriceMarginFactor and MaxGasPrice to eth-tx-manager

* add logs, fix config

* update config file documentation

---------

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

* bugfix: attaching missing TxTracker.From to pending txs to store for forced batches. (#2365)

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

* Update README.md

* improve: adding logs (#2373)

* improve: adding logs

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

* adding more logs

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

* adding more logs #2

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

---------

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

* bugfix: fixing finalizer's  handling. (#2375)

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

* Update README.md

* change hashdb go package

* new hashdb interface

* aggregator pb refactor

* new prover image

* change prover config

* update prover image

* update to latest proto and prover image

* Refactor nonce calculation for addQueue (#2382)

* refactor nonce

* fix

* fix

* fix script

* check to avoid data inconsistencies (#2387)

* check to avoid data inconsistencies

* check batchL2Data

* names in the logs

* Refactor: avoid delete addrQueue if it has pending txs to store (#2391)

* refactor delete addrQueue only if not pending txs to store

* fix finalizer test

* fix olsStateRoot in handleForcedTxsProcessResp

* Update sequencer/addrqueue.go

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

---------

Co-authored-by: Toni Ramírez <[email protected]>
Co-authored-by: Alonso Rodriguez <[email protected]>

* Sort txs in worker by gasPrice (remove efficiency sort) (#2392)

* Sort txs in worker by GasPrice (remove efficiency sort)

* update config docs

---------

Co-authored-by: Toni Ramírez <[email protected]>

* use useMainExecGenerated (#2393)

* Fix store forced batch tx (#2394)

* l2coinbase (#2400)

* l2coinbase

* add default config

* add support  config fields that are common.Address

* docs

* prover image

---------

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

* merge v0.2.5 into develop

---------

Signed-off-by: Nikolay Nedkov <[email protected]>
Co-authored-by: joanestebanr <[email protected]>
Co-authored-by: Alonso Rodriguez <[email protected]>
Co-authored-by: tclemos <[email protected]>
Co-authored-by: tclemos <[email protected]>
Co-authored-by: agnusmor <[email protected]>
Co-authored-by: agnusmor <[email protected]>
Co-authored-by: Thiago Coimbra Lemos <[email protected]>
Co-authored-by: joanestebanr <[email protected]>
Co-authored-by: Nikolay Nedkov <[email protected]>
ToniRamirezM added a commit that referenced this pull request Aug 29, 2023
* fix null effective_percentage

* fix forkID calculation

* fix script

* generate json-schema + docs for node config file and network_custom

* fix unittest

* Hotfixv0.1.4 to v0.2.0 (#2255)

* Hotfix v0.1.4 to main (#2250)

* fix concurrent web socket writes

* fix eth_syncing

* fix custom trace internal tx call error handling and update prover

* add test to custom tracer depth issue; fix internal call error and gas used

* fix custom tracer for internal tx with error and no more steps after it

* remove debug code

* Make max grpc message size configurable  (#2179)

* make max grpc message size configurable

* fix state tests

* fix tests

* fix tests

* get SequencerNodeURI from SC if empty and not IsTrustedSequencer

* Optimize trace (#2183)

* optimize trace

* fix memory reading

* update docker image

* update prover image

* fix converter

* fix memory

* fix step memory

* fix structlogs

* fix structlogs

* fix structlogs

* fix structlogs

* fix structlogs

* fix structlogs

* fix structlogs

* fix structlogs

* update prover image

* fix struclogs

* fix memory size

* fix memory size

* fix memory size

* refactor memory resize

* refactor memory resize

* move log for the best fitting tx (#2192)

* fix load zkCounters from pool

* remove unnecessary log.info

* add custom tracer support to CREATES opcode without depth increase (#2213)

* logs

* fix getting stateroot from previous batch (GetWIPBatch)

* logs

* Fix GetWipBatch when previous last batch is a forced batch

* fix forcedBatch trusted state

* Revert "fix getting stateroot from previous batch (GetWIPBatch)"

This reverts commit 860f0e7.

* force GHA

* add pool limits (#2189)

* Hotfix/batch l2 data (#2223)

* Fix BatchL2Data

* Force GHA

* remove failed txs from the pool limit check (#2233)

* debug trace by batch number via external rpc requests (#2235)

* fix trace batch remote requests in parallel limitation (#2244)

* Added RPC.TraceBatchUseHTTPS config parameter

* fix executor version

---------

Co-authored-by: tclemos <[email protected]>
Co-authored-by: tclemos <[email protected]>
Co-authored-by: Toni Ramírez <[email protected]>
Co-authored-by: agnusmor <[email protected]>
Co-authored-by: agnusmor <[email protected]>
Co-authored-by: Thiago Coimbra Lemos <[email protected]>

* fix test

* fix test

---------

Co-authored-by: tclemos <[email protected]>
Co-authored-by: tclemos <[email protected]>
Co-authored-by: Toni Ramírez <[email protected]>
Co-authored-by: agnusmor <[email protected]>
Co-authored-by: agnusmor <[email protected]>
Co-authored-by: Thiago Coimbra Lemos <[email protected]>

* Effective GasPrice refactor+fixes (#2247)

* effective GasPrice refactor

* bugs fixes and finalizer tests fixes

* fix typo

* fix calculate effective gasprice percentage

* fix test gas price

* Fix/#2257 effective gas price receipt (#2258)

* effective gas price returned by the rpc in the receipt

* linter

* bugfix: fixing l2blocks timestamp for the fist batch (#2260)

* bugfix: fixing l2blocks timestamp for the fist batch

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

* fix finalizer unit test

---------

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

* add more comments, and removed fields PrivateKeyPath and PrivateKeyPassword from etherman.Config that are not in use

* add info to git action

* add info to git action

* fix github action

* updated comments

* updated comments

* Fix/#2263 gas used (#2264)

* fix fea2scalar and gas used

* suggestion

* fix fea2scalar

* suggestion

* Fix pending tx when duplicate nonce (#2270)

* fix pending tx when duplicate nonce

* set pool.transaction.failed_reason to NULL when updating an existing tx

* add more log details when adding tx to AddrQueue

* fix query to add tx to the pool. Fix lint errors

* change failed_reason for tx discarded due duplicate nonce

* Only return a tx from the pool if tx is in pending status (#2273)

* Return a tx from the pool only if it is

* fix TestGetTransactionByHash

---------

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

* fix documentation with  config file

* improve: adding check to skip appending effectivePercentage if current forkId is under 5.

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

* Fiex effectiveGasprice unsigned txs with forkId lower than 5 (#2278)

* feat: adding functionality to stop sequencer on specific batch num from config param.

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

* patch: adding print for X-Real-IP in JSON-RPC

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

* Fix checkIfSynced (#2289)

* [Rehashing] Check logs order and fix blockhash and blockNumber in the log conversion (#2280)

* fix and check order

* linter

* flushID synchronizer (#2287)

* FlushID in synchronizer

* linter

* fix logs

* commnets

* executor error refactor (#2299)

* handle invalid rlp ROM error (#2297)

* add maxL2GasPrice (#2294)

* add maxL2GasPrice

* fix

* fix

* add test

* document parameter

* update description

* Error refactor (#2302)

* error refactor

* refactor

* Fix replaced tx as failed when duplicated nonce (#2308)

* Fix UpdateTxStatus for replacedTx

* Fix adding tx with same nonce on AddrQueue

* log reprocess need (#2309)

* log reprocess need

* Update finalizer.go

* Feature/2300 synchronizer detect if executor restart (#2306)

* detect if executor restarts and stop synchonizer

* Update prover images (#2311)

* update prover image

* update prover images

* change executor param

* Update testnet.prover.config.json

* Update test.permissionless.prover.config.json

* Update test.prover.config.json

* Update public.prover.config.json

* prover params

* prover params

* prover params

* update prover images

* add doc, and fix dockers to be able to use snap/restore feature (#2315)

* add doc, and fix dockers to be able to use snap/restore feature

* add doc for snap/restore feature

---------

Co-authored-by: Toni Ramírez <[email protected]>

* Update docker-compose.yml

* Update docker-compose.yml

* do not add tx to the pool in case err != nil

* do not add tx into the pool if a fatal error in the executor happens during pre execution

* fix dbMultiWriteSinglePosition config value

* workarround for the error error closing batch

* workarround for the error error closing batch

* workarround for the error error closing batch

* workaround for the error of closing batch, another case

* `Worker`'s `AddTxTracker` Bug Fix (#2343)

* bugfix: Resolve  Function Bug in Worker Module

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

* improve: improving the wait for pending txs to be for only the txs for the current address.

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

---------

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

* rename config files (#2349)

* fix closing batch + logs (#2348)

* fix closing batch + logs

* fix

* log description

* typo errors

* fix error: failed to store transactions for batch due to duplicate key

* test

* typo

* Update README.md

* Update release.yml

* bugfix: fixing place where we need to increment the wg per address for pending txs

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

* Store batchL2Data when the batch is opened (#2358)

* add GasPriceMarginFactor and MaxGasPrice to eth-tx-manager (#2360)

* add GasPriceMarginFactor and MaxGasPrice to eth-tx-manager

* add logs, fix config

* update config file documentation

---------

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

* bugfix: attaching missing TxTracker.From to pending txs to store for forced batches. (#2365)

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

* Update README.md

* improve: adding logs (#2373)

* improve: adding logs

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

* adding more logs

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

* adding more logs #2

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

---------

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

* bugfix: fixing finalizer's  handling. (#2375)

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

* Update README.md

* change hashdb go package

* new hashdb interface

* aggregator pb refactor

* new prover image

* change prover config

* update prover image

* update to latest proto and prover image

* Refactor nonce calculation for addQueue (#2382)

* refactor nonce

* fix

* fix

* fix script

* check to avoid data inconsistencies (#2387)

* check to avoid data inconsistencies

* check batchL2Data

* names in the logs

* Refactor: avoid delete addrQueue if it has pending txs to store (#2391)

* refactor delete addrQueue only if not pending txs to store

* fix finalizer test

* fix olsStateRoot in handleForcedTxsProcessResp

* Update sequencer/addrqueue.go

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

---------

Co-authored-by: Toni Ramírez <[email protected]>
Co-authored-by: Alonso Rodriguez <[email protected]>

* Sort txs in worker by gasPrice (remove efficiency sort) (#2392)

* Sort txs in worker by GasPrice (remove efficiency sort)

* update config docs

---------

Co-authored-by: Toni Ramírez <[email protected]>

* use useMainExecGenerated (#2393)

* Fix store forced batch tx (#2394)

* l2coinbase (#2400)

* l2coinbase

* add default config

* add support  config fields that are common.Address

* docs

* prover image

---------

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

* Check flushID != 0 (#2406)

* Show tx.GasPrice in the worker logs (instead of tx.Cost) (#2416)

* Check flushID != 0 in Sequencer (#2415)

* check flushid != 0 in sequencer

* Use f.halt instead of log.Fatal to report that flushid is 0

Co-authored-by: Toni Ramírez <[email protected]>

* fix lint

---------

Co-authored-by: Toni Ramírez <[email protected]>

* update config params for Prover v2.1.0 (#2418)

* cherry-pick #2385 and #2396 from develop into v0.2.6 (#2412)

* fix http request instance null for websocket requests (#2385)

* fix ws subscribe to get filtered log notifications (#2396)

* new block endpoints and improvements to batch endpoint (#2411)

* Add forced batches tx to addrQueue (#2398)

* add forced batches tx to addrQueue

* fix test

* fix test

* fix test

* fix test

* fix test

* fix test

* fix test

* fix test

* fix test

* refactor

* fix test

* fix test

* fix test

* fix test

* fix test

* fixes

* fixes

* fixes

* fixes

* fixes

* fixes

* fixes

* fixes

* fixes

* fixes

* fixes

* fixe hash and from

* fixe hash and from

* fixe hash and from

* fixe hash and from

* fix test

* fix test

* fix test

* fix test

* fix test

* fix test

* fix test

* improve tests

* improve tests

* improve tests

* improve tests

* improve tests

* refactor

* refactor

* improve logs

* bugifx: adding missing tx.BreakEvenGasPrice nil check

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

* Sync halt (#2428)

* cherry-pick #2245 and #2424 from develop into v0.2.6 (#2447)

* fix safe and finalized l2 block to consider l1 safe and finalized blocks respectively (#2245)

* fix and add tests for safe and finalized l2 blocks (#2424)

* New executor errors refactor (#2438)

* wip

* new errors

* retry on executor db error

* new prover images

* fix comment

* update hasdh proto and prover images

* handle excutor db error

* update test

* update test

* update test

* update test

* refactor error check in unsigned tx

* Reprocess full batch in parallel (sanity check) (#2425)

* reprocess full batch in parallel (sanity check)

* update doc

* update reprocessFullBatch logs

* Speed up deleting batches from stateDB creating an index for state.receipt.block_num (#2457)

* receipt deletion index

* receipt deletion index

* Feature/#2429 fork id improvement (#2450)

* db table + tests

* GetForks func modified to get them by range

* Sync forkID

* forkIDIntervals and forkID genesis

* linter

* docs

* Avoid resetForkID in trustedNode

* fix test group 9

* suggestions

* doc and mocks

* fix check storedFlushID (#2458)

* remove stored flush id 0 (#2459)

* Feature/#2403 snap (#2404)

* Path snapshot command

* restore

* readme

* options used by dbeaver

* #2429_forkID_improvement: #2429_forkID_improvement:

* fix

* fix postgres version to v15

* fix permissionless init script

* bugfix: removing measuring of metrics from async batch reprocessing f… (#2461)

* bugfix: removing measuring of metrics from async batch reprocessing for executor.

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

* fixing unit tests

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

---------

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

* update prover images (#2473)

* Update production-setup.md

* update doc

* fix jsonrpc tests

* fixes state.db

* update doc again

* remove obsolete config

* docs one more time...

---------

Signed-off-by: Nikolay Nedkov <[email protected]>
Co-authored-by: joanestebanr <[email protected]>
Co-authored-by: Alonso Rodriguez <[email protected]>
Co-authored-by: tclemos <[email protected]>
Co-authored-by: tclemos <[email protected]>
Co-authored-by: agnusmor <[email protected]>
Co-authored-by: agnusmor <[email protected]>
Co-authored-by: Thiago Coimbra Lemos <[email protected]>
Co-authored-by: joanestebanr <[email protected]>
Co-authored-by: Nikolay Nedkov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants