486 Commits

Author SHA1 Message Date
Giovanni Petrantoni
62349c39c6
avoid spamming logs when rpcs happen (#83) 2020-09-05 20:41:26 +02:00
Ștefan Talpalaru
6406c96b27
Merge pull request #82 from status-im/chronos
can't use `result` when returning Future[void]
2020-08-08 16:08:50 +02:00
Ștefan Talpalaru
d90bdb679b
can't use result when returning Future[void] 2020-08-07 17:24:15 +02:00
Zahary Karadjov
244254632b
Improved handling of invalid responses; Handle seq[byte] results such as eth_getCode 2020-06-19 20:42:49 +03:00
Viktor Kirilov
8c1a8ef8d9 serialization for tuples - just like for objects 2020-06-11 14:56:57 +03:00
Viktor Kirilov
271512c161 proper name for topics so that we can filter dynamically using chronicles 2020-06-09 17:00:21 +03:00
Viktor Kirilov
ecf49a0632 updated news 2020-05-08 16:13:00 +03:00
Zahary Karadjov
5c0d096111
Support Nim 1.2 2020-03-24 16:50:34 +02:00
Zahary Karadjov
6fbaeb61ca
Switch to json_serialition.JsonString to facilitate Chronicles logging 2020-03-18 18:14:29 +02:00
Zahary Karadjov
f53e0b960b
Fix all tests 2020-03-17 22:05:42 +02:00
Zahary Karadjov
d19de19128
Refactor the router to allow bypassing the use of std/json
The users will be now able to write RPC handlers returning the
distinct type `StringOfJson`. This will bypass any use of the
standard library's JsonNode type and its serialization routines.

The change was motivated by the integration of JSON-RPC in
status-im/nim-beacon-chain where most of the data types cannot
be handled by Nim's std lib or json-rpc's jsonmarshal module.
2020-03-17 20:38:52 +02:00
Zahary Karadjov
4d1d2577e9
Trivial changes required for the beacon node integration 2020-03-17 00:17:10 +02:00
Ștefan Talpalaru
09f6fd6355
fix logging in JSON format 2020-02-13 17:05:55 +01:00
Zahary Karadjov
9b401994a1
Follow the convention of naming types as UpperCase 2020-01-21 18:50:50 +02:00
Zahary Karadjov
6f9da4ba8a
Make the RPC procs async again 2020-01-21 18:49:52 +02:00
Ștefan Talpalaru
fc0665f88a
Merge branch 'exceptions' 2019-12-02 14:16:14 +01:00
Ștefan Talpalaru
72a99cc977
replace getCurrentExceptionMsg() and delete some unused imports 2019-12-02 12:26:09 +01:00
Yuriy Glukhov
b6336cb725
Merge pull request #69 from status-im/error-handling
Better error handling
2019-11-25 11:20:46 +02:00
Yuriy Glukhov
d4fbed75c7
Better error handling 2019-11-22 15:14:16 +02:00
Yuriy Glukhov
ef2e3cea19 Log errors in websocket readloop 2019-10-11 19:01:11 +09:00
Ștefan Talpalaru
9214b095fb
CI: update script path 2019-08-24 04:42:35 +02:00
Yuriy Glukhov
07e82fa194 Allow creating http client from url 2019-07-31 12:38:17 +03:00
Ștefan Talpalaru
de05184c74 replace {.gcsafe.} block with more proc pragmas 2019-07-19 13:48:26 +03:00
Ștefan Talpalaru
8168fcea25 fix some problems raised by Nim 0.20.2 2019-07-19 13:48:26 +03:00
Yuriy Glukhov
3b02cbd946
Merge pull request #61 from status-im/custom-headers
Allow custom headers in ws backend. Set Origin to http://localhost by default
2019-07-17 13:07:04 +03:00
Yuriy Glukhov
881c62ed54 Allow custom headers in ws backend. Set Origin to http://localhost by default 2019-07-02 16:15:41 +03:00
Yuriy Glukhov
af33cb9fbc
Merge pull request #60 from status-im/fixes
Fixes
2019-06-26 17:11:21 +03:00
Yuriy Glukhov
d031ab3eb4 Fixed error reporting for unexpected response id 2019-06-26 13:40:44 +03:00
Yuriy Glukhov
4bb08c671b Fixed race condition when rpc server responds too fast 2019-06-26 13:39:58 +03:00
Zahary Karadjov
48699c50ca Make the new methods gcsafe to solve build issues in Nimbus 2019-06-24 19:49:31 +03:00
Zahary Karadjov
9d0326aad4 Allow building with chronicles_sinks=json 2019-06-20 18:57:13 +03:00
Ștefan Talpalaru
5aefe497b7
Merge branch 'buildnim' 2019-06-18 21:51:05 +02:00
Ștefan Talpalaru
5028b8250e
build_nim.sh 2019-06-18 19:30:17 +02:00
Yuriy Glukhov
94e271f0f3
Merge pull request #57 from status-im/websockets
Websocket client support and some fixes
2019-06-18 13:09:51 +03:00
Yuriy Glukhov
b583dfb029 Use closeWait 2019-06-17 19:56:19 +03:00
Yuriy Glukhov
ac2f6b9360 Comments addressed 2019-06-17 18:47:11 +03:00
Yuriy Glukhov
f19d66b35c Websocket client support and some fixes 2019-06-12 20:53:15 +03:00
kdeme
707567c7ab Check if method field is a string 2019-05-17 11:58:51 +03:00
Ștefan Talpalaru
27dea58c4d
Merge branch 'fixfreeze' 2019-05-15 00:13:37 +02:00
cheatfate
a56ad7dfcb
Fix freezes on *nix systems. 2019-05-14 18:42:51 +03:00
Ștefan Talpalaru
493583b7f4
cosmetic change 2019-05-10 22:08:30 +02:00
kdeme
40411aef5a Add JObject check to resolve possible unhandled exception 2019-04-29 22:04:56 +03:00
Ștefan Talpalaru
92a7b78f4a
Nim HEAD support 2019-04-26 00:17:04 +02:00
cheatfate
2d3db88137 Fix deprecated warnings. 2019-03-25 19:28:31 +02:00
Ștefan Talpalaru
159f9b816e
assert() -> doAssert() 2019-03-13 22:42:07 +01:00
Mamy Ratsimbazafy
53ed44dfa5
Rebrand asyncdispatch2 to chronos (#50) 2019-02-06 18:27:58 +01:00
Ștefan Talpalaru
1083b2972a support Content-Type headers with specified charset
and add RPC message content to the debugging output (at the TRACE level,
disabled by default)
2019-01-28 12:39:27 +02:00
Ștefan Talpalaru
756ad70598 add the root cause issue in a comment, so we know
when the workaround is no longer needed
2019-01-17 18:35:15 +02:00
Ștefan Talpalaru
b2c5fa8e58 disable Chronicles colours on Windows 2019-01-17 18:35:15 +02:00
Ștefan Talpalaru
64a9999ac9 another {.gcsafe.} pragma, just for Windows 2019-01-17 18:35:15 +02:00