mirror of
https://github.com/vacp2p/linea-monorepo.git
synced 2026-01-07 22:54:08 -05:00
chore(operations): fix typos and format in the Readme file (#1121)
This commit is contained in:
@@ -1,46 +1,64 @@
|
||||
synctx
|
||||
synctx
|
||||
=================
|
||||
|
||||
Generated by [oclif](https://oclif.io)
|
||||
|
||||
Sync pending transactions from source to target node. Supports both Besu and Geth clients.
|
||||
|
||||
#### How Does It Work
|
||||
The tool grabs pending transactions in the txpool for both the source and target node. Then, it compares the pending transactions in both pools to determine which transactions we need to sync, as some transactions are already persisted in the target node. The comparison is performmed on the transaction hash. To perform the actual sync, the tool will batch send transactions in groups of 10 (controlled by the --concurrency flag) to help with performance. The batch transactions are sent asynchronously, but the controlling concurrent loop is synchronous.
|
||||
|
||||
# Install
|
||||
1. Download and extract the zip on the release page. Each release contains multiple distributions. Find the distribution that works for your machine type.
|
||||
2. When unzipping the release contents, a `synctx` folder is extracted which contains the command line entrypoint inside the `bin` directory.
|
||||
The tool grabs pending transactions in the txpool for both the source and target node. Then, it compares the pending
|
||||
transactions in both pools to determine which transactions we need to sync, as some transactions are already persisted
|
||||
in the target node. The comparison is performed on the transaction hash. To perform the actual sync, the tool will batch
|
||||
send transactions in groups of 10 (controlled by the --concurrency flag) to help with performance. The batch
|
||||
transactions are sent asynchronously, but the controlling concurrent loop is synchronous.
|
||||
|
||||
# Install
|
||||
|
||||
1. Download and extract the zip on the release page. Each release contains multiple distributions. Find the distribution
|
||||
that works for your machine type.
|
||||
2. When unzipping the release contents, a `synctx` folder is extracted, which contains the command line entrypoint
|
||||
inside
|
||||
the `bin` directory.
|
||||
3. Move the extracted content to a path of your choosing, such as `/usr/local/synctx`
|
||||
4. Edit your `PATH` variable to include synctx, `PATH="$PATH:/usr/local/synctx/bin` make sure to persist this change in your `.profile` | `.bash_profile` | `.zsh_profile`
|
||||
5. Run `synctx --help` to confirm that the install has completed successfully.
|
||||
4. Edit your `PATH` variable to include synctx, `PATH="$PATH:/usr/local/synctx/bin` make sure to persist this change in
|
||||
your `.profile` | `.bash_profile` | `.zsh_profile`
|
||||
5. Run `synctx --help` to confirm that the installation has completed successfully.
|
||||
|
||||
#### Docker
|
||||
As an alternative to downloading the distribution, you can also run the tool via Docker. This builds the distribution inside the image and exposes `synctx` as an entrypoint. From there, you may simply run `docker run synctx:latest --help`
|
||||
#### Docker
|
||||
|
||||
Building the image can be done with `docker build . -t synctx:latest`
|
||||
As an alternative to downloading the distribution, you can also run the tool via Docker. This builds the distribution
|
||||
inside the image and exposes `synctx` as an entrypoint. From there, you may run `docker run synctx:latest --help`
|
||||
|
||||
Building the image can be done with `docker build . -t synctx:latest`
|
||||
|
||||
# How To Sync
|
||||
To sync transactions between nodes, first make sure you have port-forwarded to the necessary Kubernetes services or pods.
|
||||
`kubectl port-forward {service|pod}/{service_name|pod_name}`
|
||||
|
||||
[How to port-forward in K8s](https://kubernetes.io/docs/tasks/access-application-cluster/port-forward-access-application-cluster/)
|
||||
To sync transactions between nodes, first make sure you have port-forwarded to the necessary Kubernetes services or
|
||||
pods.
|
||||
`kubectl port-forward {service|pod}/{service_name|pod_name}`
|
||||
|
||||
Then provide the source and target nodes, where the source node is the node pending transactions will be synced from.
|
||||
`synctx -s http://localhost:8500 -t http://localhost:8501`
|
||||
[How to port-forward in K8s](https://kubernetes.io/docs/tasks/access-application-cluster/port-forward-access-application-cluster/)
|
||||
|
||||
To perform a dry run and verify if the corrent nodes are targetted, include the `--dry-run` flag.
|
||||
`synctx -s http://localhost:8500 -t http://localhost:8501 --dry-run`
|
||||
Then provide the source and target nodes, where the source node is the node pending transactions will be synced from.
|
||||
`synctx -s http://localhost:8500 -t http://localhost:8501`
|
||||
|
||||
To perform a dry run and verify if the current nodes are targeted, include the `--dry-run` flag.
|
||||
`synctx -s http://localhost:8500 -t http://localhost:8501 --dry-run`
|
||||
|
||||
# Ethstats
|
||||
[Mainnet](https://ethstats.linea.build/)
|
||||
[Testnet](https://ethstats.sepolia.linea.build/)
|
||||
|
||||
# Local Development
|
||||
It is highly recommended to read the official docs of `oclif` as it is used to generate the CLI.
|
||||
[Mainnet](https://ethstats.linea.build/)
|
||||
[Testnet](https://ethstats.sepolia.linea.build/)
|
||||
|
||||
To run the tool against your local changes (without constantly building it), run `./bin/dev.js`
|
||||
# Local Development
|
||||
|
||||
It is highly recommended to read the official docs of `oclif` as it is used to generate the CLI.
|
||||
|
||||
To run the tool against your local changes (without constantly building it), run `./bin/dev.js`
|
||||
|
||||
# Commands
|
||||
|
||||
## `synctx`
|
||||
|
||||
```
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
"license": "(MIT OR Apache-2.0)",
|
||||
"scripts": {
|
||||
"build": "shx rm -rf dist && tsc -p tsconfig.build.json",
|
||||
"prettier": "prettier -c '**/*.{js,ts}'",
|
||||
"prettier:fix": "prettier -w '**/*.{js,ts}'",
|
||||
"prettier": "prettier -c '**/*.{js,ts,md}'",
|
||||
"prettier:fix": "prettier -w '**/*.{js,ts,md}'",
|
||||
"lint": "eslint . --ext .ts",
|
||||
"lint:fix": "pnpm run lint:ts:fix",
|
||||
"lint:ts:fix": "eslint . --ext .ts --fix",
|
||||
|
||||
Reference in New Issue
Block a user