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

Pact Configuration #11

Closed
wants to merge 4 commits into from
Closed

Pact Configuration #11

wants to merge 4 commits into from

Conversation

fosskers
Copy link
Contributor

This PR moves configuration of the Pact-integration code (i.e. the PactDbConfig type) to the top level. This harmonizes the config approach with other components, and exposes 5 new options that can be passed to a chainweb-node binary or likewise set in a config file:

  --pact-db-dir PATH       Directory for Pact database files
  --pact-log-dir PATH      Directory for Pact HTTP logs
  --pact-db-pragma PRAGMA  SQLite pragma to use with persistence DBs (can be
                           used multiple times)
  --pact-gas-limit INT     Gas limit for each transaction, defaults to 0
  --pact-gas-rate INT      Gas price per action, defaults to 0

These values are given sensible defaults.

Without this PR, a chainweb-node binary cannot be ran from anywhere but the project directory, as it used to expect a file at test/config/pact.yaml. It no longer expects this, and so can be ran anywhere / loaded into docker images.

@fosskers
Copy link
Contributor Author

fosskers commented Mar 18, 2019

colin@yumi ~> chainweb-node
2019-03-18T23:27:42.017Z [Info] [host=localhost:36551#kn6CkR|chain=8|component=pact|logger=PactPersist] createTable: TableId "SYS_usertables"
2019-03-18T23:27:42.017Z [Info] [host=localhost:36551#kn6CkR|chain=8|component=pact|logger=PactPersist] createTable: TableId "SYS_keysets"
2019-03-18T23:27:42.017Z [Info] [host=localhost:36551#kn6CkR|chain=8|component=pact|logger=PactPersist] createTable: TableId "SYS_modules"
2019-03-18T23:27:42.017Z [Info] [host=localhost:36551#kn6CkR|chain=8|component=pact|logger=PactPersist] createTable: TableId "SYS_namespaces"
2019-03-18T23:27:42.017Z [Info] [host=localhost:36551#kn6CkR|chain=9|component=pact|logger=PactPersist] createTable: TableId "SYS_usertables"
2019-03-18T23:27:42.017Z [Info] [host=localhost:36551#kn6CkR|chain=9|component=pact|logger=PactPersist] createTable: TableId "SYS_keysets"
2019-03-18T23:27:42.017Z [Info] [host=localhost:36551#kn6CkR|chain=9|component=pact|logger=PactPersist] createTable: TableId "SYS_modules"
2019-03-18T23:27:42.017Z [Info] [host=localhost:36551#kn6CkR|chain=9|component=pact|logger=PactPersist] createTable: TableId "SYS_namespaces"
chainweb-node: ExceptionInLinkedThread ThreadId 33 pact/coin-contract/coin.pact: openFile: does not exist (No such file or directory)

:(

@fosskers
Copy link
Contributor Author

Yes I took the lazy path for getting the tests to compile again. Pact devs please advise.

@sirlensalot
Copy link
Contributor

Closing, as (a) we aren't running the disk checkpointer in testnet and (b) most of the config expressed here is invalid (ie we won't be configuring gasLimit, and will most likely hardcode the deploy settings)

@fosskers fosskers deleted the colin/pact-config-path branch March 25, 2019 20:15
mightybyte pushed a commit that referenced this pull request Feb 14, 2021
chessai pushed a commit that referenced this pull request Jun 27, 2024
Exported 2 functions for usage in batch writes
chessai added a commit that referenced this pull request Jun 27, 2024
chessai added a commit that referenced this pull request Aug 6, 2024
chessai added a commit that referenced this pull request Aug 6, 2024
chessai pushed a commit that referenced this pull request Nov 13, 2024
Exported 2 functions for usage in batch writes
chessai added a commit that referenced this pull request Nov 13, 2024
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.

2 participants