diff --git a/README.md b/README.md index ed7eaeff..086165c9 100644 --- a/README.md +++ b/README.md @@ -94,30 +94,31 @@ Usage: rosetta-cli check [flags] Flags: - --block-concurrency uint concurrency to use while fetching blocks (default 8) - --bootstrap-balances string Absolute path to a file used to bootstrap balances before starting syncing. - Populating this value after beginning syncing will return an error. - --data-dir string folder used to store logs and any data used to perform validation - --end int block index to stop syncing (default -1) - --exempt-accounts string Absolute path to a file listing all accounts to exempt from balance - tracking and reconciliation. Look at the examples directory for an example of - how to structure this file. - --halt-on-reconciliation-error Determines if block processing should halt on a reconciliation - error. It can be beneficial to collect all reconciliation errors or silence - reconciliation errors during development. (default true) - -h, --help help for check - --interesting-accounts string Absolute path to a file listing all accounts to check on each block. Look - at the examples directory for an example of how to structure this file. - --log-balance-changes log balance changes - --log-blocks log processed blocks - --log-reconciliations log balance reconciliations - --log-transactions log processed transactions - --lookup-balance-by-block When set to true, balances are looked up at the block where a balance - change occurred instead of at the current block. Blockchains that do not support - historical balance lookup should set this to false. (default true) - --reconciler-concurrency uint concurrency to use while fetching accounts during reconciliation (default 8) - --start int block index to start syncing (default -1) - --transaction-concurrency uint concurrency to use while fetching transactions (if required) (default 16) + --active-reconciliation-concurrency uint concurrency to use while fetching accounts during active reconciliation (default 8) + --block-concurrency uint concurrency to use while fetching blocks (default 8) + --bootstrap-balances string Absolute path to a file used to bootstrap balances before starting syncing. + Populating this value after beginning syncing will return an error. + --data-dir string folder used to store logs and any data used to perform validation + --end int block index to stop syncing (default -1) + --exempt-accounts string Absolute path to a file listing all accounts to exempt from balance + tracking and reconciliation. Look at the examples directory for an example of + how to structure this file. + --halt-on-reconciliation-error Determines if block processing should halt on a reconciliation + error. It can be beneficial to collect all reconciliation errors or silence + reconciliation errors during development. (default true) + -h, --help help for check + --inactive-reconciliation-concurrency uint concurrency to use while fetching accounts during inactive reconciliation (default 4) + --interesting-accounts string Absolute path to a file listing all accounts to check on each block. Look + at the examples directory for an example of how to structure this file. + --log-balance-changes log balance changes + --log-blocks log processed blocks + --log-reconciliations log balance reconciliations + --log-transactions log processed transactions + --lookup-balance-by-block When set to true, balances are looked up at the block where a balance + change occurred instead of at the current block. Blockchains that do not support + historical balance lookup should set this to false. (default true) + --start int block index to start syncing (default -1) + --transaction-concurrency uint concurrency to use while fetching transactions (if required) (default 16) Global Flags: --server-url string base URL for a Rosetta server (default "http://localhost:8080") diff --git a/cmd/check.go b/cmd/check.go index e212c44a..f0e7c84c 100644 --- a/cmd/check.go +++ b/cmd/check.go @@ -114,9 +114,13 @@ of what one of these files looks like.`, // while fetching transactions (if required). TransactionConcurrency uint64 - // ReconcilerConcurrency is the concurrency to use - // while fetching accounts during reconciliation. - ReconcilerConcurrency uint64 + // ActiveReconciliationConcurrency is the concurrency to use + // while fetching accounts during active reconciliation. + ActiveReconciliationConcurrency uint64 + + // InactiveReconciliationConcurrency is the concurrency to use + // while fetching accounts during inactive reconciliation. + InactiveReconciliationConcurrency uint64 // LogBlocks determines if blocks are // logged. @@ -207,10 +211,16 @@ func init() { "concurrency to use while fetching transactions (if required)", ) checkCmd.Flags().Uint64Var( - &ReconcilerConcurrency, - "reconciler-concurrency", + &ActiveReconciliationConcurrency, + "active-reconciliation-concurrency", 8, - "concurrency to use while fetching accounts during reconciliation", + "concurrency to use while fetching accounts during active reconciliation", + ) + checkCmd.Flags().Uint64Var( + &InactiveReconciliationConcurrency, + "inactive-reconciliation-concurrency", + 4, + "concurrency to use while fetching accounts during inactive reconciliation", ) checkCmd.Flags().BoolVar( &LogBlocks, @@ -381,7 +391,8 @@ func runCheckCmd(cmd *cobra.Command, args []string) { reconcilerHelper, reconcilerHandler, fetcher, - reconciler.WithReconcilerConcurrency(int(ReconcilerConcurrency)), + reconciler.WithActiveConcurrency(int(ActiveReconciliationConcurrency)), + reconciler.WithInactiveConcurrency(int(InactiveReconciliationConcurrency)), reconciler.WithLookupBalanceByBlock(LookupBalanceByBlock), reconciler.WithInterestingAccounts(interestingAccounts), reconciler.WithSeenAccounts(seenAccounts), diff --git a/cmd/root.go b/cmd/root.go index 4bebb088..be1d5ddb 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -56,6 +56,6 @@ var versionCmd = &cobra.Command{ Use: "version", Short: "Print rosetta-cli version", Run: func(cmd *cobra.Command, args []string) { - fmt.Println("v0.2.2") + fmt.Println("v0.2.3") }, } diff --git a/go.mod b/go.mod index 64b87812..5257bbb6 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.13 require ( github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96 // indirect - github.com/coinbase/rosetta-sdk-go v0.2.1-0.20200513162126-2278020ff1c2 + github.com/coinbase/rosetta-sdk-go v0.2.1-0.20200518143022-cea5733d9710 github.com/dgraph-io/badger v1.6.1 github.com/golang/protobuf v1.4.2 // indirect github.com/mattn/goveralls v0.0.5 // indirect diff --git a/go.sum b/go.sum index 650143a1..903c065f 100644 --- a/go.sum +++ b/go.sum @@ -25,6 +25,8 @@ github.com/coinbase/rosetta-sdk-go v0.2.1-0.20200513022350-4a871d015a27 h1:HfYzT github.com/coinbase/rosetta-sdk-go v0.2.1-0.20200513022350-4a871d015a27/go.mod h1:XKM7urGHLqGQJi9kM97N+GpMLJuCAGYXy2wOm3KzxEE= github.com/coinbase/rosetta-sdk-go v0.2.1-0.20200513162126-2278020ff1c2 h1:ibaPMZAs6dlh+lmexnEnL3DcaZ+r9NUknPQ/9FgZ7MQ= github.com/coinbase/rosetta-sdk-go v0.2.1-0.20200513162126-2278020ff1c2/go.mod h1:XKM7urGHLqGQJi9kM97N+GpMLJuCAGYXy2wOm3KzxEE= +github.com/coinbase/rosetta-sdk-go v0.2.1-0.20200518143022-cea5733d9710 h1:XlYar0V5oPA764ZL0oOtNWB5+cgzdLw2cyQiAuVu+4Q= +github.com/coinbase/rosetta-sdk-go v0.2.1-0.20200518143022-cea5733d9710/go.mod h1:XKM7urGHLqGQJi9kM97N+GpMLJuCAGYXy2wOm3KzxEE= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=