Commit Graph

531 Commits

Author SHA1 Message Date
Rob Mulholand
d93006321b Rename transactions to full_sync_transactions
- Table has foreign key to blocks
- Add transaction RLP and transaction index to table
- Enables other tables with standalone transactions or transactions
  associated with other data structures (e.g. headers)
2019-03-28 14:31:17 -05:00
Ian Norden
1aa849bcb4 PR fixes; remove all infura token references and setup travis to use encrypted env
variable; rest of the ethjson_rpc dependent tests extracted to integration_test
2019-03-21 18:36:51 -05:00
Ian Norden
d3e172d9ab remove references to infura token except for in infura.toml so that tests will continue to pass on CI 2019-03-21 18:36:49 -05:00
Ian Norden
37fc038605 fixes for review comments 2019-03-21 18:36:49 -05:00
Ian Norden
37e581c7ec PR#72 from public repo- https://github.com/vulcanize/vulcanizedb/pull/72- also needed to finish pluggin in ENS record transformer 2019-03-21 18:33:56 -05:00
Ian Norden
24879a85aa mv pkg/omni pkg/contract_watcher 2019-03-21 18:33:56 -05:00
Ian Norden
073378de6d update © to 2019 2019-03-21 18:33:56 -05:00
Ian Norden
e4e092f542 changes to plugin and commands to accomodate changes 2019-03-21 18:33:56 -05:00
Ian Norden
8174ce4aee refactor omni code; rename omniWatcher => contractWatcher; use config instead of excessive number of CLI flags 2019-03-21 18:30:48 -05:00
Ian Norden
ff55e3ba7a TransformerInitializer => EventTransformerInitializer reorganization 2019-03-14 11:59:39 -05:00
Ian Norden
9f8c50e3ab tests for migration path ordering and errors 2019-03-13 11:42:30 -05:00
Ian Norden
f37c458992 the part that actually runs the migrations in order 2019-03-13 11:42:29 -05:00
Ian Norden
84aa0a7eba plugin migration order specified in config 2019-03-13 11:42:29 -05:00
Rob Mulholand
1414779d52 Use *sqlx.Tx instead of *sql.Tx
- requires using db.Beginx() instead of db.Begin()
- enables calling tx.Get()
2019-03-06 12:43:39 -06:00
Rob Mulholand
7ed4dcd1fa Remove Tic logic 2019-03-06 12:43:39 -06:00
Rob Mulholand
b6bef49318 Add tests for plugin helpers
- Prevents code analysis from showing functions as unused
- Also address other code analysis issues
2019-03-06 12:43:39 -06:00
Rob Mulholand
a806cb2818 Extract slow tests from omni full transformer 2019-03-06 12:43:06 -06:00
Rob Mulholand
34c96654ce Extract slow tests from omni light transformer 2019-03-06 12:43:06 -06:00
Ian Norden
8bd397e2eb Merge pull request #29 from vulcanize/fix
Fix for Travis issue at https://github.com/vulcanize/mcd_transformers/pull/6
2019-03-06 11:27:43 -06:00
Ian Norden
e1a317c3f6 different errors; readme edit 2019-03-06 00:14:37 -06:00
Ian Norden
5fd9a59027 fix for issue with Travis building plugin from plugin repo 2019-03-05 08:57:54 -06:00
Edvard Hübinette
55b6ad9381 Optimise missing block numbers query (#23) 2019-03-05 11:52:38 +01:00
Ian Norden
83f7daf37d compose and execute as separate commands; update README and add git checkout vendor/github.com/ethereum/go-ethereum/accounts/abi to make build 2019-02-28 18:15:16 -06:00
Ian Norden
708425c4d6 rebase; extract factories and the mocks they are dependent on to
libraries/shared; adjust omni test_helpers to drop and recreate
checked_headers table to avoid reaching 1600 column limit after repeated
tests (dropping columns doesn't actually remove them from contributing
to that limit)
2019-02-25 01:34:38 -06:00
Ian Norden
17f4d3dfa5 move maker plugin generator test to mcd_transformers 2019-02-24 21:53:04 -06:00
Ian Norden
3d34a9e7c9 remove maker migrations and convert back to timestamps and fix bug in
composeAndExecute command
2019-02-24 21:52:23 -06:00
Ian Norden
b449193b16 addressing review comments; still need to reorg migrations and add helper tests 2019-02-24 21:38:48 -06:00
Ian Norden
2868cf2f73 goose changes; update plugin readme; use rel paths for transformers in config; more commenting in pkg/plugin; fix PluginWriter to work with different transformer types; reopen generator tests 2019-02-24 21:38:48 -06:00
Ian Norden
03a7379617 work on porting storage watcher; watcher type is defined for
transformers in the config, storage transformers are exported from
plugin like event transformers
2019-02-24 21:38:47 -06:00
Ian Norden
b51dcb55de comment out plugin test til mcd_transformers is updated correctly 2019-02-24 21:38:47 -06:00
Ian Norden
a322372713 refactoring plugin generating code 2019-02-24 21:38:47 -06:00
Ian Norden
decc2a3caf remove pkg/transformers; extract shared files needed to
libraries/shared; work on automated db migration management
2019-02-24 21:38:47 -06:00
Ian Norden
55fa9b8364 auto management of dependencies temporarily needed to build plugin and transformer
migrations; new test showing it is working with external transformers runs
properly when migrations were manually performed but still need
to test automated migration management
2019-02-24 15:23:35 -06:00
Ian Norden
6c2d895023 composeAndExecute command that loads and executes over arbitrary transformer set exported from a go plugin generated according to config file; test for plugin generation, loading, and execution; work on plugins README 2019-02-24 15:23:35 -06:00
Edvard Hübinette
fa4abe4e5c Remove spammy and unnecessary error log (#21) 2019-02-22 12:56:06 +01:00
Rob Mulholand
745d0e8eda Use storage value metadata getter in pit repository tests 2019-02-21 15:25:16 -06:00
Rob Mulholand
a5121913f4 Error on missing keys in pit repository
- If ilk missing for ilk-related value, fail fast
2019-02-21 15:03:22 -06:00
Rob Mulholand
3d9341ea1d Reference ilks foreign key from Cat storage repository 2019-02-21 14:33:59 -06:00
Rob Mulholand
dbdd16d3a2 (VDB-380) Create separate table for ilks
- reference ilk by foreign key every place it's used
2019-02-21 11:23:00 -06:00
Rob Mulholand
11dd641a84 (VDB-354) Queue unrecognized storage diffs
- If we recognize a storage diff as coming from a watched contract but
  don't recognize the key, queue it for retrying later (after we've seen
  an event that might help us recognize the key)
- Remove unused errs and args
- Panic on unrecognized types (should not happen)
2019-02-20 15:22:39 -06:00
Edvard
fb47a747f6 Fix confusion between nflip and flip 2019-02-20 14:37:55 +01:00
Edvard
56ca45509f DRY up storage diff repo tests 2019-02-20 14:37:55 +01:00
Edvard
5746de7c97 Add tests for Cat storage diff transformer
Update schema after rebase migrations

Fix small issues from review
2019-02-20 14:37:46 +01:00
Edvard
cd6611d2ec Add Cat storage transformer 2019-02-20 14:37:46 +01:00
Edvard Hübinette
53789c82ab Merge pull request #12 from vulcanize/VDB-392-fix-io-error-propagation
VDB-392 Fix IO error propagation
2019-02-20 13:58:00 +01:00
Edvard
1a2f46b308 Fix small issues from review 2019-02-20 13:10:55 +01:00
Ian Norden
2ecc524224 Merge pull request #9 from vulcanize/VDB322-Vow-storage-diff
Vdb322 vow storage diff
2019-02-15 11:04:22 -06:00
Taka Goto
64c7ae1bb1 uppercase Woe and Ash 2019-02-15 06:15:47 -06:00
Rob Mulholand
df521eea7f Merge pull request #11 from vulcanize/storage-transformers-readme
Add storage transformers readme
2019-02-14 14:24:01 -06:00
Edvard
13eacf2081 Update tests for error propagation 2019-02-14 16:04:12 +01:00
Edvard
6cd4e5ea95 Improve I/O error propagation 2019-02-14 16:03:57 +01:00
Rob Mulholand
0378068467 add example contract and instructions for watching its storage 2019-02-13 20:34:30 -06:00
Taka Goto
a8322c7d26 add woe to storage diff vow contract 2019-02-12 21:50:52 -06:00
Rob Mulholand
ee113668a5 Add first draft of storage transformers readme
- Explain process of creating a new storage transformer
2019-02-12 15:58:28 -06:00
Rob Mulholand
ac9375ae47 Discard logs created during tests
- Make sure output is being set to discard for logrus to reduce clutter in the console
2019-02-12 11:18:39 -06:00
Taka Goto
4fe2ff4104 repository methods: 2019-02-11 16:34:02 -06:00
Taka Goto
c2c21325b5 vow contract storage diffing excluding sin 2019-02-11 15:28:54 -06:00
Edvard Hübinette
f73623789e Merge pull request #6 from 8thlight/VDB-337-Dockerize-vDB
VDB-337 Dockerize vDB
2019-02-11 12:37:56 +01:00
Edvard
9b986c4c14 Nuke OpenRC from docker image, update readme's 2019-02-11 11:27:33 +01:00
Edvard
553fdbfa09 Default config starting block to 0 2019-02-11 11:27:33 +01:00
Edvard
e6e66d58dd Add container service files and docker README 2019-02-11 11:26:12 +01:00
Rob Mulholand
c05d3b7836 (VDB-280) Consume vat contract storage diffs 2019-02-08 13:36:30 -06:00
Rob Mulholand
dba4e48a3e Use map for key in storage value metadata
- Enables inserting multiple keys for one storage row (e.g. ilk and urn)
2019-02-08 11:41:17 -06:00
Rob Mulholand
09abcb841a Persist Urns in raw bytes32 format
- Enables simple usage in contract storage lookups
2019-02-08 11:41:17 -06:00
Takayuki Goto
0a024d429d * update transformer to able to recheck headers (#4)
* update transformer to able to recheck headers
* put cap on rechecking header
* integration test for recheck headers
* use enum for recheck headers param; make recheck cap configurable
* update integration tests with new test config
* update omni pkg with new recheck header column type
* update migration with new migration tool and final tweaks needed to accommodate changes in omni pkg
2019-02-08 10:35:46 -06:00
Rob Mulholand
867f92c431 (VDB-298) Consume Pit contract storage diffs
- Continuously parse storage diffs CSV data to read Pit contract state
- Convert ilks in database to raw bytes32 value for use in generating
  storage keys dynamically
- Persist storage diffs with block number and hash for validation
2019-02-06 10:31:46 -06:00
Edvard Hübinette
29f2537130 Merge pull request #7 from vulcanize/VDB-347-Squelch-lightSync
VDB-347 Squelch lightSync in stdout
2019-02-01 11:02:48 +01:00
Edvard
a1fa21cbec Remove test based on window buffer stuff 2019-01-31 16:39:29 +01:00
Edvard
8eea1b00ed Redirect validation window status to logrus instead of stdout 2019-01-31 15:55:28 +01:00
Ian Norden
8749c94994 update license to AGPL-3.0 2019-01-24 14:41:30 -06:00
Ian Norden
ab371a2024 Merge remote-tracking branch 'maker/staging' into staging 2019-01-24 10:22:22 -06:00
Ian Norden
1f95eb6443 Merge branch 'staging' into pub_merge 2019-01-24 09:47:12 -06:00
Taka Goto
c5d513e96d fix index out of range on lightSync; hopefully the new integration tests will catch them next time :) 2019-01-23 15:25:44 -06:00
Ian Norden
00c2052da3 for some reason an error is thrown when the ipc string is declared in integration_tests_suite_test.go but not when moved to a different file in the integration_tests package; I think this is due to switching to go1.11 2019-01-23 15:23:23 -06:00
Ian Norden
dc87f39889 change omniwatcher database test helpers so that it doesn't interfere with downstream maker tests 2019-01-23 14:55:20 -06:00
Konstantin Zolotarev
65cb6e9092 VDB-205 Fix external configuration values (#121)
* Updated loading config from /Users/konstantinzolotarev/.vulcanizedb for addreses

* Updated contract addresses loading from env variables.

* Implement getter chain for addresses, configs and transformers

Solves the issue with declaring stuff as vars when the environment file hasn't been loaded yet. Instead, this data is fetched dynamically when the root commands are called.

* Update test data to use constant Kovan addresses

* Decouple integration tests from config file IO

* Add ABI to environment file, convert getter chains for related values

* Decouple tests suites from ABI config file IO

* Add startingBlock to environment and implement getter chain

* Exit when called without config file

* Add missing deployment blocks to staging.toml

* Remove comment
2019-01-23 19:44:09 +01:00
Ian Norden
46b898f690 merge public vulcanizedb/master 2019-01-23 00:37:26 -06:00
Taka Goto
3595771825 use batchElem from rpc client 2019-01-21 14:52:37 -06:00
Takayuki Goto
54d771cb06 Merge branch 'staging' into batch-historical-headers 2019-01-16 15:56:36 -06:00
Taka Goto
24cf0661b0 lowercase address on map to get transformers 2019-01-16 14:24:00 -06:00
Taka Goto
07da9d720b fix get headers when less than 100 fetched 2019-01-16 10:16:06 -06:00
Taka Goto
074140b9ac iterate for loop by headers instead of blocknumbers 2019-01-15 16:34:20 -06:00
Ian Norden
aa4e698240 move interface_getter.go from ens_watcher to vDB pkging- used to construct a custom ABI based on results from calls to supportsInterface; also moved fetcher.go from examples to pkg 2019-01-15 15:49:18 -06:00
Takayuki Goto
f1ba21b505 Merge branch 'staging' into batch-historical-headers 2019-01-13 21:29:58 -06:00
yaoandrew
e2b864baa8 Add rollback if GetTicInTx fails and move GetTicInTx to shared/repository.go 2019-01-11 10:07:00 -08:00
Andrew J Yao
c8aa3dc275 Replace standard log with logrus import 2019-01-11 10:07:00 -08:00
yaoandrew
bc8b7a101c refactor error handling in vat, cat, vow 2019-01-11 10:07:00 -08:00
yaoandrew
525fada3d7 refactor error handling in frob, pit, price, tend 2019-01-11 10:07:00 -08:00
yaoandrew
657aaccff3 refactor error handling in drip, flap, flop 2019-01-11 10:07:00 -08:00
yaoandrew
05351a8ef4 refactor error handling in dent 2019-01-11 10:07:00 -08:00
yaoandrew
08ac7f18a5 refactor error handling in flip_deal 2019-01-11 10:07:00 -08:00
yaoandrew
f655997fde refactor error handling in pit_vow 2019-01-11 10:07:00 -08:00
yaoandrew
843d30c88e refactor error handling in flip 2019-01-11 10:07:00 -08:00
yaoandrew
513513e93b refactor error handling in chop_lump 2019-01-11 10:07:00 -08:00
yaoandrew
78b302eab6 refactor error handling in bite transformer 2019-01-11 10:07:00 -08:00
Edvard Hübinette
ebca338b1e VDB-302 Sleep when no missing blocks in lightSync (#129)
* Sleep when no missing blocks in lightSync

* Fix tests and error propagation

* Correct geth.log to logrus
2019-01-11 10:58:41 +01:00
Takayuki Goto
ac430ddf54 Merge branch 'staging' into batch-historical-headers 2019-01-08 19:06:53 -06:00
Taka Goto
aa99c861a8 batch headers by 100s 2019-01-08 16:53:26 -06:00
Ian Norden
59cdaa05e6 moving some memory allocation to init function rather than within
execution cycles and fixing test db tear down so that it drops
checked_headers table instead of individual columns (droping columns
only hides them, they remain in memory and continue to contribute to the
1600 column limit which causes us to eventually exceed it)
2019-01-07 13:07:31 -06:00
Edvard
2292c94e99 Merge branch 'staging' into VDB-125-aggregate-log-fetching 2019-01-07 15:25:37 +01:00