Commit Graph
100 Commits
Author SHA1 Message Date
Rob Mulholand 68464d375a Add missing signatures to getSignatures command 2018-11-08 13:08:59 -06:00
Rob Mulholand 0b58efb56a Extract common repository methods
- Inject column names to reduce duplication across common behavior
- Extract checked headers column names to constants
2018-11-08 13:08:59 -06:00
Rob Mulholand 8c168ed332 Extract constants package
- Reduce clutter in the shared package
2018-11-08 13:08:59 -06:00
Rob Mulholand 8c5192f82f (VDB-210) Refactor tend repository tests 2018-11-08 13:08:59 -06:00
Rob Mulholand 1c1a9c699a (VDB-209) Refactor price feed repository tests 2018-11-08 13:08:59 -06:00
Rob Mulholand af8bbe5ce9 (VDB-208) Refactor pit file repository tests 2018-11-08 13:08:59 -06:00
Rob Mulholand a1c4d70a77 (VDB-99) Transform Flap deal events
- Add flapper address to deal transformer config
2018-11-07 10:52:55 -06:00
Rob Mulholand 9cc9d4d3b6 (VDB-95) Transform Flop dent events
- Add flopper address to dent config
2018-11-07 10:52:55 -06:00
Rob Mulholand 52bbedd837 (VDB-98) Transform Flap tend events
- Add Flapper contract address to tend transformer config
2018-11-07 10:52:55 -06:00
Rob Mulholand b2a78f1da4 Remove unused transformer config struct 2018-11-07 10:52:55 -06:00
Rob Mulholand cb141f7cb7 (VDB-204) Add transformer for Flap kick 2018-11-07 10:52:55 -06:00
Rob Mulholand 78b8173b37 Improve test coverage for event method signature lookups 2018-10-26 15:35:18 -05:00
Rob Mulholand 602802e5f4 Don't test order of DB results
- reduce flakiness by enabling tests to pass regardless of result order
2018-10-26 15:35:18 -05:00
Rob Mulholand ed624330f6 Rename Flog pack to Vow flog
- enables differentiation if another contract implements flog
- also deletes flog-specific mocks
2018-10-26 15:35:18 -05:00
Rob Mulholand 1b680d2a4b Use transformer factory for Drip drip 2018-10-26 15:35:18 -05:00
Rob Mulholand d1ee501f12 Use transformer factory for Bite (#89)
* Use transformer factory for Bite

- introduces separate transformer factory for non-LogNote events
- converter includes `ToEntities` for events defined via ABI

* Updates after rebasing with staging
2018-10-26 13:26:10 -05:00
Rob Mulholand 0e5b23993a Discard log output from Vat heal during tests 2018-10-26 12:02:56 -05:00
Rob Mulholand 45a52a59f9 Add repository tests for Deal 2018-10-26 12:02:56 -05:00
Rob Mulholand 5de949f4c5 Add cat file repository tests 2018-10-26 11:36:02 -05:00
Rob Mulholand 47a3c35938 Use transformer factory for Price Feed events 2018-10-26 11:25:16 -05:00
Rob Mulholand 745b3a460e Add test for updating existing checked header row 2018-10-26 10:45:49 -05:00
Rob Mulholand e37447ae9a Use transformer factory for Vat fold 2018-10-26 10:45:49 -05:00
Rob Mulholand 3ec5b4afab Remove unused param in integration test helper 2018-10-25 10:02:06 -05:00
Rob Mulholand 8831586fba Extract shared mock converter and repository 2018-10-25 10:02:06 -05:00
Rob Mulholand f5b9a21a8c Use transformer factory for Vat slip 2018-10-25 10:02:06 -05:00
Rob Mulholand 1e7ee08af5 Use transformer factory for Vat toll 2018-10-25 10:02:06 -05:00
Rob Mulholand 6d662a6ce7 Add test for can't create Vat tune of wrong type 2018-10-25 10:02:06 -05:00
Rob Mulholand a0cae99437 Use transformer factory for Vat flux 2018-10-25 10:02:06 -05:00
Rob Mulholand 78d746bb5b Use transformer factory for Vat tune 2018-10-24 15:49:19 -05:00
Rob Mulholand 42d60c3cbd Add log index to Vat move 2018-10-23 15:25:21 -05:00
Rob Mulholand 4ac896c246 Add log index to Vat init 2018-10-23 15:25:21 -05:00
Rob Mulholand 702f90367a Add log index to Vat heal 2018-10-23 15:25:21 -05:00
Rob Mulholand 650bbf5874 Add log index to Vat grab 2018-10-23 15:25:21 -05:00
Rob Mulholand 1e74c73591 Add log index to Vat fold 2018-10-23 15:25:21 -05:00
Rob Mulholand db52955669 Add log index to Tend 2018-10-23 15:25:21 -05:00
Rob Mulholand e0253cce55 Add log index to Price Feed events 2018-10-23 15:25:21 -05:00
Rob Mulholand a0a86871b5 Add log index to Frob 2018-10-23 15:25:21 -05:00
Rob Mulholand b3d00fe3c5 Add log index to Pit file events 2018-10-23 15:25:21 -05:00
Rob Mulholand 7870451b5c Increase number of flake attempts for integration tests
- Temporary solution until we can get more reliable results on network
  calls to Kovan data
2018-10-22 12:14:43 -05:00
Rob Mulholand d87fb14c6b Add log index to Drip file events 2018-10-22 12:14:43 -05:00
Rob Mulholand de294ad8ea Add log index to Drip drip 2018-10-22 12:14:43 -05:00
Rob Mulholand e5ba0496a6 Add log index to Dent 2018-10-22 12:14:43 -05:00
Rob Mulholand 1aafb7201e Add log index to Deal 2018-10-22 12:14:43 -05:00
Rob Mulholand 495f39abb8 Add log index to Bite 2018-10-22 12:14:43 -05:00
Rob Mulholand ea3de51792 Add Flop kick integration test 2018-10-19 14:21:57 -05:00
Rob Mulholand fa828cf041 Add Tend integration test 2018-10-19 14:21:57 -05:00
Rob Mulholand cbb5ffa3c7 Add Pit file stability fee integration test 2018-10-19 14:21:57 -05:00
Rob Mulholand 3449a1e246 Add Pit file debt ceiling integration test 2018-10-19 14:21:57 -05:00
Rob Mulholand a83bf5ed0d Add Pit file ilk integration test 2018-10-19 14:21:57 -05:00
Rob Mulholand 677e78891d Add Drip file vow integration test 2018-10-19 14:21:57 -05:00
Rob Mulholand 0ce3e3d829 Add Bite integration test 2018-10-19 14:21:57 -05:00
Rob Mulholand ddc7ee5143 Add Drip drip integration test 2018-10-19 10:56:28 -05:00
Rob Mulholand b067ba565e Add Vat fold integration test 2018-10-19 10:56:28 -05:00
Rob Mulholand fdbe0b0b44 Add Vat heal integration test 2018-10-19 10:56:28 -05:00
Rob Mulholand a7b9b825c8 Add Vat init integration test 2018-10-19 10:56:28 -05:00
Rob Mulholand 9b427ea1e9 Add Vat move integration test 2018-10-19 10:56:28 -05:00
Rob Mulholand 130d11d0aa Add Vat slip transformer 2018-10-17 13:30:35 -05:00
Rob Mulholand d0226dbce5 Convert Bite event field types to numeric
- Enables arithmetic operations when constructing views
- Also removes application-level references to DB ID
2018-10-16 15:27:13 -05:00
Rob Mulholand d3df685c46 Add timestamp to block header
- Enables quickly deriving timestamp from header for log events
2018-10-12 12:00:02 -05:00
Rob Mulholand 5f67161f41 Convert raw header to JSON
- Enables parsing values off of header via Postgres migration
2018-10-12 12:00:02 -05:00
Rob Mulholand e935f2f553 Add Vat grab transformer 2018-10-09 16:48:19 -05:00
Rob Mulholand dcdf5dc292 Add missing transformers to transformer initializer map 2018-10-09 14:37:26 -05:00
Rob Mulholand 61dca314c4 Add Vat tune transformer 2018-10-09 14:37:26 -05:00
Rob Mulholand 8ee106e14d Add Vat toll transformer 2018-10-09 11:40:35 -05:00
Rob Mulholand bf44ec614a Log checked headers for MCD events (#43)
* Log checked headers for Bite events

* Log checked headers for Drip drip events

* Log checked headers for Drip file events

- mark headers checked for 3 implementations of file on the Drip contract

* Log checked headers for Frob frob events

* Log checked headers for Pit file events

- mark headers checked for 3 implementations of file on the Pit contract

* Log checked headers for Vat init events
2018-10-02 17:25:38 -05:00
Rob Mulholand 02853014b2 Fix Pit file converters
- Use topics 2 & 3 instead of topic 1 (call data instead of msg.sender)
- Prefer extracting fields from topics rather than data
2018-09-27 10:32:08 -05:00
Rob Mulholand c17ad1f826 Add missing Describe statements 2018-09-27 10:32:08 -05:00
Rob Mulholand 58f17a24ae Add transformers for Cat file events
- transform logs from 3 implementations of file on the Cat contract
2018-09-27 10:32:08 -05:00
Rob Mulholand a0ba6ca6bd Return error if RPC returns empty header
- Enables graceful failure if RPC returns empty data with no error
2018-09-25 14:11:35 -05:00
Rob Mulholand 92525ca575 Make price feed log persistence atomic per block
- Prevents marking header as checked if only one of several price feed
  logs is successfully persisted
2018-09-25 14:11:35 -05:00
Rob Mulholand ac362650db Log checked headers for tend events 2018-09-25 14:11:35 -05:00
Rob Mulholand 009cbb8aa0 Log checked headers for flip kick events 2018-09-25 14:11:35 -05:00
Rob Mulholand d8b1a61ff5 Log checked headers for dent events 2018-09-25 14:11:35 -05:00
Rob Mulholand c3f1fcf796 Log checked headers for deal events
- mark header as checked if no matching logs
- mark header as checked if all matching logs persisted successfully
- batch convert and insert matching logs to enable transactional persist
- enable skipping previously checked block headers when restarting a sync
2018-09-25 14:11:35 -05:00
Rob Mulholand e138e58120 Set timeout before assertions in integration tests
- Prevent early evaluation from triggering failure
2018-09-21 11:28:17 -05:00
Rob Mulholand 296b7aab72 Update README
- kicking off a staging build
2018-09-19 12:08:22 -05:00
Rob Mulholand 56c45b6841 Add logging for every transformer
- Also add drip file transformer initializer
2018-09-19 11:00:20 -05:00
Rob Mulholand a735698f77 Update config for Kovan 2018-09-19 11:00:20 -05:00
Rob Mulholand 042f1142c0 Handle headers from POA chain
- Fetching headers from Kovan requires custom type without mixHash/Nonce
2018-09-19 11:00:20 -05:00
Rob Mulholand 778517f33f Add integration tests for price feed transformer
- Verify eth/usd, mkr/usd, and rep/usd price feed logs are successfully
  fetched from Kovan and persisted to Postgres
2018-09-19 11:00:20 -05:00
Rob Mulholand 06881db350 Sync unchecked headers for price feeds
- Indicate that a header has been checked for logs if no logs returned
- Indicate that a header has been checked for logs when persisting a log
- Fetch headers that need to be checked based on absence of the above
2018-09-17 14:14:52 -05:00
Rob Mulholand f5595bee78 Add Drip drip transformer 2018-09-13 16:35:10 -05:00
Rob Mulholand 560305f601 Update dependencies
- uses newer version of go-ethereum required for go1.11
2018-09-13 16:14:35 -05:00
Rob Mulholand d69063636e Add raw log to price feeds 2018-09-12 11:35:32 -05:00
Rob Mulholand b2ba7ee1e3 Add transaction index to flip kick 2018-09-12 11:35:32 -05:00
Rob Mulholand a843de5eb7 Add drip file transformers
- for all three file functions on the drip contract
2018-09-12 11:35:32 -05:00
Rob Mulholand 4b6ef1e58b Verify pit file logs
- assure required topics + data available before parsing
2018-09-11 16:30:29 -05:00
Rob Mulholand dc9bda7d68 Extract addresses to shared constants file 2018-09-11 16:30:29 -05:00
Rob Mulholand ceeaa0f8d3 Update licenses and imports
- Verify license added to each file
- Order imports by group and separate with line breaks
2018-09-11 16:30:29 -05:00
Rob Mulholand ff110592bd Add Vat init transformer 2018-09-11 16:30:29 -05:00
Rob Mulholand ae6d184e6c Merge pull request #14 from 8thlight/pit-file
Pit file
2018-09-06 12:58:29 -05:00
Rob Mulholand d48cf38070 Add Pit file debt ceiling event 2018-09-05 13:51:18 -05:00
Rob Mulholand e1f609528d Add Pit file stability fee event
- file event on the pit contract is overloaded and each implementation
  logs a note
- existing Pit file transformer now specified as dealing with ilks
2018-09-05 11:36:13 -05:00
Rob Mulholand a30e5036fd generate log event signatures from functions 2018-09-04 16:19:03 -05:00
Rob Mulholand 8f5bc0a956 Add raw log to Frob record in DB
- Enables parsing additional values off the log if necessary
- Also update Frob to reflect DSS changes (lad => urn)
- Move Frob constants to shared directory
2018-09-04 16:11:54 -05:00
Rob Mulholand db4b891398 Backfill Pit.file log events 2018-09-04 16:07:35 -05:00
Rob Mulholand 1916d585fa Incorporate DSS updates (#8)
* Incorporate DSS updates
- Lad renamed to Guy
- Dink and Dart added to Frob
* update test chain data
* Remove Mom field from FlipKick
* Update Flip ABI and sample flip kick data
* Incorporate updates to Frob event
- Guy renamed to Lad
- Era and Gem removed, iArt added
- Also turn off integration tests that read from test chain while
events are actively under development
2018-08-28 14:16:39 -05:00
Rob Mulholand 634604d0b5 Combine price feed transformers
- fetches logs from all three price feeds in one query
- assumes eth/usd price feed will be updated to include LogValue event
- updates transformers to run separate from header sync
2018-08-16 11:22:16 -05:00
Rob Mulholand 9231d40369 Extract price feed contract addresses to config 2018-08-16 11:22:16 -05:00
Rob Mulholand 72a849a272 Update price feeds if header changed by validator
- currently not validating price feeds if the underlying header already exists
  and is valid, since price feeds should have been added when initial header
  was added
2018-08-16 11:22:16 -05:00