-
Notifications
You must be signed in to change notification settings - Fork 688
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
Fix/eth tx manager refactoring #1462
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Nikolay Nedkov <[email protected]>
…from sequencer. Signed-off-by: Nikolay Nedkov <[email protected]>
Bumps [github.com/urfave/cli/v2](https://github.com/urfave/cli) from 2.23.5 to 2.23.6. - [Release notes](https://github.com/urfave/cli/releases) - [Changelog](https://github.com/urfave/cli/blob/main/docs/CHANGELOG.md) - [Commits](urfave/cli@v2.23.5...v2.23.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]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Add metrics in sequencer package
* Add Grafana docker for visualization * Update test/Makefile Co-authored-by: Paolo Grisoli <[email protected]>
Background For development purposes, it would be nice to have a script to send an arbitrary number of transactions. Basically the behavior should be the same of the TestEthTransfer e2e test, but without dealing with creating/destroying the node local stack, which is assumed to be already running. What does this PR do? This PR proposes to add a txsender script in test/scripts that accepts as argument the number of transactions to be sent (it defaults to 1 transaction). Can send either on layer 1, layer 2 or both, specifying the --network flag. Can wait for transactions to be validated using the --wait flag. Please refer to the README.md file in the script folder to see some examples. This PR also removes the send_transfer script as the one proposed here is a more flexible solution of that script. In the future we may think about a full fledged CLI development application to include this and other useful script. In order avoid duplication, the code shared between TestEthTransfer and the new script has been moved to operations.ApplyL1Txs and operations.ApplyL2Txs.
* Add initial goreleaser config * Add OS config
* Fix erroneous return in VerifyBatches function * Update ethtxmanager/ethtxmanager.go Co-authored-by: cool-developer <[email protected]> * Update ethtxmanager/ethtxmanager.go Co-authored-by: cool-developer <[email protected]> * fix: add ErrMaxRetriesExceeded error Co-authored-by: cool-developer <[email protected]> Co-authored-by: Paolo Grisoli <[email protected]>
### What does this PR do? This PR proposes to revamp our `log` package. The idea is to have more information in the logs without having to add them manually on each log line. This is accomplished by providing a way to get **child loggers** derived from the **root** one: - **Every function** that needs to inject new fields in the logs can do so by calling `WithFields` on the current logger. - **This returns** a new child logger that will print the provided fields on every log line (within the function scope) in addition to the parent logger fields. ### Example ```go // use root logger log.Debug("This is a debug log line from the root logger") // derive a child logger from the root one, with additional fields childLog := log.WithFields("txHash", "0xbanana", "chainId", 42) // these two log lines will be decorated with the `txHash` and `chainId` fields childLog.Debug("This is a debug log line") childLog.Debug("This is another debug log line") // derive a child logger from the previous child, adding another field grandChildLog := childLog.WithFields("proverId", "prover123") // this log line will be decorated with the `txHash`, `chainId` and `proverId` fields grandChildLog.Debug("This is a debug log line from the granchild logger") // derive another child logger from the root one, with another field childLog2 := log.WithFields("batchNum": 8) // this line will only have the `batchNum` field childLog2.Debug("This is a debug log line from the second child logger") ``` **NOTE:** here 2 default fields have been added to **every** log line: `version` and `pid`. They are purely demonstrative and can be removed/replaced with better ones. Other logs have been decorated with fields inside `jsonrpc` and `metrics` package. The idea is to gradually start using the feature while developing. **ENCODING** Now the encoding of the logs can be specified in the config file choosing between `console` and `json`. The default value is `console`, but `json` can be used in a deployed environment for better logs ingestion. ### Bonus The log message on startup has been polished a bit: ```sh Version: v0.0.1-RC1-5-g8538ace Git revision: 8538ace Git branch: feature/revamp-logs Go version: go1.17.13 Built: Fri, 02 Dec 2022 16:47:58 +0000 OS/Arch: linux/amd64 ``` The env var to pass the commit hash is not needed any more, instead it is sourced from the `Makefile` through a linker flag.
Bumps [github.com/urfave/cli/v2](https://github.com/urfave/cli) from 2.23.6 to 2.23.7. - [Release notes](https://github.com/urfave/cli/releases) - [Changelog](https://github.com/urfave/cli/blob/main/docs/CHANGELOG.md) - [Commits](urfave/cli@v2.23.6...v2.23.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]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
tclemos
force-pushed
the
fix/eth-tx-manager-refactoring
branch
from
December 20, 2022 19:05
c94f057
to
3bf2117
Compare
messed up with closing this PR and continuing it here: #1484 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
*************** WIP ***************
Closes #.
What does this PR do?
improves eth tx manage to be more fault tolerant when sending txs to L1
Reviewers
Main reviewers: