Commit Graph

1058 Commits

Author SHA1 Message Date
drbeefsupreme
6f89b2ddd6
naive: use lib/naive tx form 2021-05-19 15:48:27 -04:00
yosoyubik
9e7cb91398 Merge branch 'yu/azimuth-rpc' into naive/aggregator 2021-05-17 17:50:45 +02:00
yosoyubik
152cf894ff naive: hook rpc-api with aggregator 2021-05-17 17:49:41 +02:00
yosoyubik
154baceb8b Merge branch 'yu/azimuth-rpc' into naive/aggregator 2021-05-14 09:46:36 +02:00
yosoyubik
c5d61b7076 json-rpc: fix result key in rpc response 2021-05-14 07:25:13 +02:00
yosoyubik
8ebb5e2d6c naive: add pending and tx status RPCs 2021-05-14 07:25:09 +02:00
yosoyubik
7ede24c3cc naive: first pass at tx history RPC 2021-05-14 07:25:04 +02:00
yosoyubik
ae8d98c467 naive: add jsonrpc parsing for sending pending rolls 2021-05-14 07:24:59 +02:00
yosoyubik
66d0c7d47b naive: handle malformed data in transfer-point 2021-05-14 07:24:56 +02:00
yosoyubik
c150da0372 naive: validate proxy in from is one of proxy:naive 2021-05-14 07:24:53 +02:00
yosoyubik
00334d582e naive: use +pairs:enjs for point-to-json reponse 2021-05-14 07:24:48 +02:00
yosoyubik
0380d18735 naive: add rpc response error codes 2021-05-14 07:24:43 +02:00
yosoyubik
36cdb9493d naive: add jsonrpc parsing for naive txs 2021-05-14 07:24:35 +02:00
yosoyubik
fe6f189e33 json-rpc: add support for params as map object 2021-05-14 07:24:35 +02:00
yosoyubik
843fe4ce38 json-rpc: add validation for json-rpc request 2021-05-14 07:24:27 +02:00
yosoyubik
d8a24d7d6b naive: add json library for rpc responses 2021-05-14 07:24:16 +02:00
yosoyubik
0c704bb145 json-rpc: add response-to-json 2021-05-14 07:24:16 +02:00
fang
9b62454bca
naive: wip aggregator
Includes logic for the core flow, but isn't fully hooked up to outside
sources/events yet. Probably doesn't compile. Plenty of TODOs remaining.
2021-05-13 17:21:35 +02:00
drbeefsupreme
49fdf0a496
naive: fix key changing tests 2021-05-11 17:33:57 -04:00
drbeefsupreme
de5a907300
naive: factor out l2 transaction firing into lib
Moved everything related to generating layer 2 transactions, including
verification, into their own library. This ought to be shared between
the aggregator and tests
2021-05-11 16:47:33 -04:00
fang
1678d45876
naive: emit effects for processed txs
As a transaction receipt of sort, to inform of transaction success or
failure.
2021-05-06 00:16:49 +02:00
Philip Monk
27949c5d8a
naive: fix +tx 2021-04-28 22:04:11 -07:00
Philip Monk
75eeef544e
naive: store crypto suite number in state
We now store the raw crypto suite number, authentication key, and
encryption key.  App/azimuth converts this to a `pass` for jael's
benefit.
2021-04-28 20:51:43 -07:00
Philip Monk
b1091d0e98
Merge remote-tracking branch 'origin/master' into philip/naive 2021-04-28 20:30:07 -07:00
Philip Monk
3869e01556
naive: infer ships from 'from'
For all except spawn, we can infer one of the ship arguments to be the
"from" ship.  This reduces repetition in the batches, which shortens txs
by 4 bytes each (except spawn), and eliminates the need to assert the
same ship is used in both places.
2021-04-28 19:55:57 -07:00
Philip Monk
36a10eb083
naive: convert can -> cad
Avoid bugs where we miscount the length of assembled atoms.
2021-04-28 19:19:50 -07:00
Philip Monk
5d52171a47
naive: add domain separator
To prevent replay across chains, eg from ropsten to mainnet.
Additionally, this introduces a version number, so we won't have to
worry about future signature formats being accidentally compatible with
this one.
2021-04-28 18:13:00 -07:00
Philip Monk
6dda168f3c
naive: factor out keccak into verifier
The verifier now takes an octs so that we can properly hash it to the 32
bytes required by ecdsa.

This allows lib/naive to use its own stdlib again.
2021-04-28 15:38:28 -07:00
Philip Monk
f2c43edc99
naive: make bitlengths explicit
Also switches everything to ropsten by default, including ivory pill.
Batches work on ropsten now.

Also adds +tx as a hacky development tool to create text for metamask to
sign and then turn that into a batch.  A useful reference for bridge and
aggregator work.
2021-04-27 22:58:19 -07:00
Philip Monk
781cdf3960
naive: alter signatures to match personal_sign 2021-04-27 17:26:34 -07:00
Philip Monk
1ed14c9908
naive: remove "wrap" functionality
Wraps are hard to get right, so we remove support for now.
2021-04-20 23:51:32 -07:00
Philip Monk
05dbd8cddd
naive: move signature verification inside loop
Before this change, signatures were verified according to the owners at
the beginning of batch, which is wrong.  Now we do it per wrap, but this
is *also* wrong because they should actually be verified per tx, in case
the owner changes within a wrap.

Also introduces the roll/wrap terminology.
2021-04-20 23:08:32 -07:00
Philip Monk
1b5bc0f476
naive: snapshot improvements 2021-04-20 21:57:04 -07:00
Philip Monk
c915839e9d
naive: fetch l2 batches from chain 2021-04-15 01:02:58 -07:00
Philip Monk
3e56e17a22
naive: remove l2 set-voting-proxy
Since galaxies can't be on L2
2021-04-14 18:03:52 -07:00
Philip Monk
176df1fc2a
naive: add verbosity level 2021-04-14 17:49:30 -07:00
Philip Monk
46275fa251
naive: a few bugfixes 2021-04-14 16:58:27 -07:00
Philip Monk
0fbbd3aa28
naive: add app/naive to download from ethereum 2021-04-08 00:36:34 -07:00
Liam Fitzgerald
fbd85abf4e
Merge remote-tracking branch 'origin/master' into lf/push-hook-unver 2021-04-03 12:54:35 +11:00
Liam Fitzgerald
b6a758b1f9
pull-hook: noop on unsupported, unversioned facts
Pull-hook side of the previous change to push-hook
(479fbfd798). Noop on unsupported
unversioned marks, waiting for the publisher to upgrade and kick. Same
tradeoffs as previous change apply.
2021-04-03 10:45:22 +10:00
Philip Monk
c162758e92
naive: add all effects 2021-04-02 16:06:24 -07:00
Logan Allen
21b1119c74 metadata lib: parse right 2021-04-02 20:35:25 +00:00
Logan Allen
6fbbe2ceb7 metadata-store lib: make config encode/decode invertible 2021-04-02 19:18:59 +00:00
Liam Fitzgerald
f27fa5b0f3
metadata: fix updating graph metadata 2021-04-02 23:23:31 +10:00
Liam Fitzgerald
01960286d0
push-hook: do not pass facts to unsupported, unversioned subs 2021-04-02 22:14:15 +10:00
Liam Fitzgerald
479fbfd798
push-hook: noop on unversioned, unsupported watches
Mainnet is currently experiencing undue load due to a watch-kick loop.
If the watch is unsupported, it will be kicked due to a mark mismatch,
which will be interpreted by the unversioned hooks as a network pressure
kick, prompting a resub and continuing the loop. Instead, we now no-op
on unversioned, unsupported watches, waiting for the subscriber to
rewatch after it processes the versioning OTA. This will silently break
groups for the subscriber until the reach the latest OTA, but is
preferable to nacking, and kicking them permanently
2021-04-02 20:38:22 +10:00
Liam Fitzgerald
eb131e64a8
metadata: prevent crash 2021-04-02 15:24:26 +10:00
Liam Fitzgerald
4d659be7cf
metadata: fix JSON conversions 2021-04-02 14:35:41 +10:00
Philip Monk
cc92433622
naive: detach from arvo 2021-04-01 19:31:50 -07:00
Liam Fitzgerald
615be57b7b
Post: refactor permission variations 2021-04-02 11:48:09 +10:00