Commit Graph

16 Commits

Author SHA1 Message Date
Fang
5c6c75c7ea
eth: move existing chain requests into ethio
To avoid reimplementing these (on top of ethio) every time. This seems
like a good place to centralize chain request logic going forward.
2019-11-04 18:59:30 +01:00
Fang
dc35958918
eth-watcher: refactor refresh rate to top of file 2019-11-04 18:57:17 +01:00
Fang
848805e007
eth: move eth-watcher's request-rpc into ethio lib
Once this is more fully featured, /app/claz could be refactored with it.
2019-10-31 15:54:56 +01:00
Fang
555eae6e25
eth-watcher: ensure logs always sent oldest-first
For easier "this happened, then that happened" on the client side.
2019-10-30 18:44:52 +01:00
Fang
e0b564f72f
eth-watcher: allow peers to unconfigured watchdogs
We simply respond with an empty history. This allows applications to
safely subscribe prior to a watchdog's creation.
2019-10-30 16:48:51 +01:00
Fang
603a3ae32b
eth-watcher: saner %watch behavior
When configuring a watchdog on a path that already exists, we now
"overwrite" it, meaning we throw away all history and trawl the node
for logs again.
If the only config change is the url, however, we silently modify it,
and simply use it "from this point onward".

This matches the behavior of the original azimuth-tracker.
2019-10-30 16:46:37 +01:00
Fang
e8d52e9b58
eth-watcher: implement %clear poke
We don't need to bother un-setting any timers or other subscriptions,
because those all happen on the app-wide level, instead of per watchdog.
2019-10-30 16:35:12 +01:00
Fang
c3ac547b3b
eth-watcher: store logs in state to implement peer
In order to give an initial response to incoming subscriptions (without
resorting to retrieving that data from chain again) we now store event
log history in state.

Instead of discarding pending-logs entirely after sending out updates,
we add them to the watchdog's history.
Just like pending-logs, we remove from the head during a rewind (though
not before exhausting the pending-logs).
2019-10-30 00:37:12 +01:00
Fang
277f2955c3
eth-watcher: move types into /sur file 2019-10-29 21:13:28 +01:00
Fang
4e9ece6cea
eth-watcher: properly tag out-peer-data 2019-10-29 19:14:21 +01:00
Fang
6437d860fe
eth-watcher: single update timer loop
Kicks the update timer on application start, then sets a new timer
whenever it's awoken. This aims to ensure eth-watcher never stops
looking for updates periodically.
2019-10-29 19:13:16 +01:00
Fang
67b4c9975e
eth-watcher: implement /block peek
/block/some-path allows you to get the next block that will be checked
for updates for the watcher at /some-path. Useful for uptime checking.
2019-10-29 19:11:36 +01:00
Fang
cda68b90b9
eth: turn azimuth-tracker into eth-watcher
Uses the logic existing in azimuth-tracker to implement a new
eth-watcher, which can look at Ethereum nodes for _any_ events, as
opposed to exclusively a subset of the Azimuth contract's events.

Azimuth-tracker will be reimplemented as a dependent of this in
forthcoming commits.
2019-10-25 19:25:31 +02:00
Fang
7bc17357ba
eth: remove old eth-watcher files
These were deprecated in favor of azimuth-tracker in #1320.

(Azimuth-tracker, however, isn't a general-purpose Ethereum log watcher
tool. Commits to transform it into a more broadly useful tool are
forthcoming.)
2019-10-25 13:08:27 +02:00
Fang
eb6c8a45ce
Replace (fall (~(get by calls with (~(gut by 2019-06-30 18:13:34 +02:00
Jared Tobin
b3901ab42f Add 'pkg/arvo/' from commit 'c20e2a185f131ff3f5d3961829bd7a3fe0f227f8'
git-subtree-dir: pkg/arvo
git-subtree-mainline: 9c8f40bf6c
git-subtree-split: c20e2a185f
2019-06-28 12:48:05 +08:00