Commit Graph

54 Commits

Author SHA1 Message Date
Edvard
833dde62cf Remove injection of fetcher and repository to watcher 2019-01-07 15:19:31 +01:00
Edvard
ff47e2e06e Merge branch 'staging' into VDB-125-aggregate-log-fetching 2018-12-11 15:03:21 +01:00
Edvard
d93817f346 Interface-ify shared repository 2018-12-11 11:35:13 +01:00
Rob Mulholand
2a518ad518 (VDB-254) Convert numerical values for Pit.file ilk
- convert data to ray when what == "spot" and wad when what == "line"
2018-12-07 11:24:06 -06:00
Rob Mulholand
087af252c9 (VDB-253) Update numerical values for Pit.file debt ceiling
- convert Line to wad
2018-12-07 11:24:06 -06:00
Edvard
47c75d055b Update repository tests for absence of MissingHeaders 2018-12-04 17:53:46 +01:00
Edvard
38c745e8c3 Refactor fetching out from repositories to log_fetcher and watcher 2018-12-04 16:04:13 +01:00
Taka Goto
e8be96a4e7 use logrus for logging 2018-11-21 10:14:11 -06:00
Elizabeth
128d20c9bf Vdb 269- fetch logs by hash (#122)
* Upgrade geth from 1.8.15 to 1.8.18

* Update vat_tune to use shared repository methods

* Query blockchain by block hash instead of block number range

* Remove hash validation from repositories

* Fix vow flog integration test

* Update README Travis build sticker

* Update constants formatting per go fmt

* Update EthPublicKeyParser.ParsePublicKey to use discv5.PubkeyID method

* Address PR comments
2018-11-21 09:30:00 -06:00
Rob Mulholand
854236fd99 (VDB-267) Remove pit file stability fee
- Method is no longer present on the Pit contract
2018-11-15 12:14:59 -06:00
Edvard
8f4648a9e3 Add support for never-ending transformer 2018-11-14 10:11:16 -06:00
Rob Mulholand
82fd73ba3f (VDB-68) Verify log block hash matches header block hash
- Delete header on conflict to prompt data refresh (cascade deletes all
  data associated with that block)
- Derive header hash from rpc payload rather than computing it from data
  (prevents hash mismatch between blockchain and cache)
2018-11-13 14:51:39 -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
af8bbe5ce9 (VDB-208) Refactor pit file repository tests 2018-11-08 13:08:59 -06:00
Rob Mulholand
b2a78f1da4 Remove unused transformer config struct 2018-11-07 10:52:55 -06:00
Elizabeth
bfe4531d7e Common transformer tests (#97)
* Move chop lump transformer test to a generic log_note_transformer_test

* Add test cases to transformer test

- cat file flip
- cat file pit vow
- deal
- dent

* Move transformer tests over to transformer factor test file

- drip drip
- drip file ilk/repo/vow
- pit file deb ceiling/ilk/stability fee
- price feeds

* Move LogNoteTransformer test into factory package and remove log specific transformer tests

* Move Transformer test into factory package and remove log event specific transformer tests

* Respond to PR comments
2018-11-06 10:30:11 -06: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
745b3a460e Add test for updating existing checked header row 2018-10-26 10:45:49 -05:00
Rob Mulholand
8831586fba Extract shared mock converter and repository 2018-10-25 10:02:06 -05:00
Rob Mulholand
b3d00fe3c5 Add log index to Pit file events 2018-10-23 15:25:21 -05:00
Edvard
a0deb5eb62 Add and use transformer labels in shared constants 2018-10-23 11:23:31 +02:00
Edvard
f55449d0e5 Replace GinkgoRandomSeed with proper randomisation 2018-10-23 10:47:01 +02:00
Edvard
7ee3329baf Privatise DB repository field and add transformer test 2018-10-23 10:47:01 +02:00
Edvard
cb74cbe990 Add cast error checking to refactored transformers 2018-10-23 10:47:01 +02:00
Edvard
33f1f62c11 Implement SingleTransformerConfig 2018-10-23 10:45:48 +02:00
Edvard
7d3bf1f0f6 Fixes after rebase 2018-10-23 10:45:48 +02:00
Edvard
ccca6e0229 Update old pit file shared config references 2018-10-23 10:43:03 +02:00
Edvard
d9b6603109 Update pit file debt ceiling tests 2018-10-23 10:43:03 +02:00
Edvard
24199cb67e Refactor pit file debt ceiling transformer 2018-10-23 10:43:03 +02:00
Edvard
0239c4daf6 Fix sneaky missing asterisk 2018-10-23 10:43:03 +02:00
Edvard
399b3b78a0 Update tests for pit file ilk transformer 2018-10-23 10:43:03 +02:00
Edvard
98062a7970 Refactor pit file ilk transfomer 2018-10-23 10:43:03 +02:00
Edvard
837a777c8a Update transformer name for stability fee 2018-10-23 10:43:03 +02:00
Edvard
3412866182 Update tests for stability_fee 2018-10-23 10:43:03 +02:00
Edvard
2cc303a2f5 Refactor stability_fee transfomer 2018-10-23 10:43:03 +02: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
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
Elizabeth
b0cd852aa3 Flop deal (#39)
*Refactor deal transformer to take in several contract addresses
* Add flop address to deal transformer
2018-09-27 10:12:29 -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
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
d48cf38070 Add Pit file debt ceiling event 2018-09-05 13:51:18 -05:00