You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 24, 2025. It is now read-only.
1. Fixes a bug in the command line flags.
The flag parsers did not match the constructor fields.
2. Makes only compacting sqlite the default.
3. Makes keeping TransactionIndex the default.
This way the default is "safe" and does not lose any data any user might
want. They can compact rocksdb and TransactionIndex in addition if they
want, but that should be a conscious choice, so that their API still
serves all relevant data.
<*>O.strOption (O.long "from"<>O.help "Directory containing SQLite Pact state and RocksDB block data to compact (expected to be in $DIR/0/{sqlite,rocksDb}")
186
-
<*>O.strOption (O.long "to"<>O.help "Directory where to place the compacted Pact state and block data. It will place them in $DIR/0/{sqlite,rocksDb}, respectively.")
187
-
<*>O.flag SingleChainManyChainsAtOnce (O.long "parallel"<>O.help "Turn on multi-threaded compaction. The threads are per-chain.")
188
-
<*>O.strOption (O.long "log-dir"<>O.help "Directory where compaction logs will be placed.")
fromDir <-O.strOption (O.long "from"<>O.help "Directory containing SQLite Pact state and RocksDB block data to compact (expected to be in $DIR/0/{sqlite,rocksDb}")
189
+
toDir <-O.strOption (O.long "to"<>O.help "Directory where to place the compacted Pact state and block data. It will place them in $DIR/0/{sqlite,rocksDb}, respectively.")
190
+
concurrent <-O.flag SingleChainManyChainsAtOnce (O.long "parallel"<>O.help "Turn on multi-threaded compaction. The threads are per-chain.")
191
+
logDir <-O.strOption (O.long "log-dir"<>O.help "Directory where compaction logs will be placed.")
<>O.help "Compact rocksDB block data. Some interfaces require this data for historical blocks, like the /poll Pact endpoint or the /header Chainweb endpoint, so it is not compacted by default."
196
+
)
197
+
compactPactState <-not<$>O.switch
198
+
(O.long "no-compact-pact"
199
+
<>O.help "Do not compact Pact state. Pact state is not used by any public interface, so it is compacted by default, and the space savings are usually large on mainnet."
200
+
)
201
+
compactTransactionIndex <-O.switch
202
+
(O.long "compact-transaction-index"
203
+
<>O.help "Compact the TransactionIndex table in the Pact state. For historical blocks, the /poll Pact endpoint relies on this table, so it is not compacted by default."
0 commit comments