Commit Graph

118 Commits

Author SHA1 Message Date
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
Edvard Hübinette
4f295b9aec VDB-207 refactor init move split toll tune flog (#110)
* Use shared repo tests for vat_init

* Use shared methods in vat_init repository

* Use shared repo tests for vat_move

* Use shared methods in vat_move repository

* Use shared repo tests for vat_slip

* Use shared methods in vat_slip repository

* Use shared repo tests for vat_toll

* Use shared methods in vat_toll repository

* Use shared methods in vat_tune repository

* Use shared repo tests for vow_flog (+small namespace fix)

* Use shared methods in vow_flog repository

* Go vet + tiny oopsie
2018-11-12 14:17:58 +01:00
Elizabeth
c1e10f09fb Vdb 67 convert numbers to ray and wad (#105)
* Add method to convert values to ray or wad units

* Convert data to ray or wad for cat_file_chop_lump

* Use shared convert functions in price feed conversion

* Pull common ray/wad values into vars

* Fix after rebase with staging
2018-11-09 14:53:20 -06:00
Rob Mulholand
8c168ed332 Extract constants package
- Reduce clutter in the shared package
2018-11-08 13:08:59 -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
Elizabeth
0ab5ea1b25 Refactor more repo tests (#101)
* Use shared repository tests for deal

* Small updates to repo tests

* Use shared repository test examples for dent

* Use shared repository test examples for drip_drip

* Use shared repository test examples for drip_file_ilk

* Use shared repository test examples for drip_file_repo

* Use shared repository test examples for drip_file_vow

* Update formatting
2018-11-06 10:51:26 -06:00
Elizabeth
a4abf3781e Refactor repository tests (#99)
* Add shared test examples for repositories

- Create
- MissingHeaders
- MarkHeaderChecked

* Use shared repository tests for cat_file_chop_lump

* Use shared repository test for cat_file_flip

* Use shared repository test for cat_file_pit_vow

* Updates to shared repository tests

* Use shared repository tests for deal

* Small updates to repo tests
2018-11-06 10:30:31 -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
Takayuki Goto
0d325afbfb flop kick transformer factory (#98)
* flop kick transformer factory

* add tests for wrong model/entity
2018-11-02 09:13:10 -05:00
Elizabeth
981393d0a7 Use transformer factory for FlipKick (#96) 2018-11-02 09:12:51 -05:00
Elizabeth
ab4e904713 Frob transformer factory (#95)
* Updates to previous transformers

* Use transformer factory for Frob

* Move bite integration test to integrationt est pkg
2018-10-29 15:08:00 -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
Edvard Hübinette
f3a82e6ba1 VDB-184 Refactor Dent (#91)
* Factorise dent transformer

* Update dent transformer tests

* Add additional tests to dent repository test

* Update dent to use LogNoteTransformer factory
2018-10-26 13:56:49 -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
Edvard
0e1675354f Update tests for deal transformer 2018-10-26 12:02:56 -05:00
Elizabeth
d522d33531 Update vat heal to use transformer factory (#88)
* Update vat heal to use transformer factory
2018-10-26 11:40:24 -05:00
Edvard
28ab5f92ab Factorise cat_file transformers 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
Elizabeth
bd428e752a Update vat grab to use transformer factory (#85)
* Update vat grab to use transformer factory
2018-10-26 11:02:39 -05:00
Rob Mulholand
e37447ae9a Use transformer factory for Vat fold 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
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
a0cae99437 Use transformer factory for Vat flux 2018-10-25 10:02:06 -05:00
Edvard Hübinette
be249437c2 VDB-117: Add Vow.flog transformer (#80)
* Add DB migrations for flog

* Add Vow addresses and constants

* Add err logging to ABI signature getter, test for flog sig

* Add flog transformer

* Add tests+data for flog transformer

* Prepend DB tables and columns with vow_

* Panic on failure to get method sig
2018-10-25 12:19:46 +02:00
Rob Mulholand
78d746bb5b Use transformer factory for Vat tune 2018-10-24 15:49:19 -05:00
Elizabeth
5682ee988b Add log index to various events (#78)
* Add log_index field to flip kick

* Add log index to flop kick

* Add repo tests for Cat.file

* Add log_index to vat_flux

* Add log_index to vat_slip

* Add log_index to vat_toll

* Add log_index to vat_tune

* Add test to repos for updating checked headers
2018-10-23 16:33:04 -05:00
Takayuki Goto
28f8861f81 Merge pull request #71 from 8thlight/VDB-150-vat-flux-integration-test
integration test for vat flux
2018-10-23 16:01:42 -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
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
2a9fafca08 Update drip_file tests 2018-10-23 10:45:48 +02:00
Edvard
d9b6603109 Update pit file debt ceiling tests 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
3412866182 Update tests for stability_fee 2018-10-23 10:43:03 +02:00
Edvard
57b3744085 Update tend tests 2018-10-23 10:43:03 +02:00
Edvard
719ffd5819 Update vat init tests for factory 2018-10-23 10:43:03 +02:00
Edvard
177d212cc4 Add SetDB test for vat move 2018-10-23 10:43:03 +02:00
Edvard
af1dfbc489 Implement vat_move transformer using factory 2018-10-23 10:43:03 +02:00
Edvard
15e33db33d Fix transformer factory 2018-10-23 10:43:03 +02:00