128 Commits

Author SHA1 Message Date
Miran
f65218dd35
move -d:nimRawSetjmp to config.nims (#137)
* move `-d:nimRawSetjmp` to config.nims

Refs https://github.com/status-im/nimbus-build-system/issues/44

* not vcc

* use .cfg not .nims
2022-06-28 19:50:51 +07:00
Jacek Sieka
2e3d22b9e2
enable styleCheck:usages (#135) 2022-04-08 10:25:41 +02:00
jangko
ad0c3fb6e0
fix missing req id in router exception handler
when an rpc method in server throw `InvalidRequest` using custom error code,
the router need to mention the request id too.

otherwise the client will throw error with confusing message.
2022-02-28 09:39:49 +07:00
jangko
51fadf850c
Fix #124 2022-02-14 12:16:31 +07:00
Zahary Karadjov
5a28176080 Fix #117 2022-01-08 21:39:29 +02:00
Zahary Karadjov
35e6d7e6ff
Restore the support for using the news package 2021-11-29 15:36:17 +02:00
Zahary Karadjov
7ff4559cc0 Allow dynamic RPC method names in the 'rpc' macro 2021-11-24 15:57:46 +02:00
Zahary Karadjov
e4dba96f5c
Improve cancellation support and code style 2021-11-22 17:24:07 +02:00
Zahary Karadjov
7ab1b31614
Fix code breakage after the rebase 2021-11-22 17:05:26 +02:00
Bernardo A. Rodrigues
3599a73b58
Chronos HTTP(S) Server (#111) 2021-11-22 15:14:30 +02:00
KonradStaniec
eda5e8554f
add support for websocket in proxy (#112) 2021-07-30 11:24:09 +02:00
KonradStaniec
147ef3f562
[FEATURE] Add http json rpc proxy (#105) 2021-06-29 18:13:31 +03:00
jangko
69e8be66fb
add compression support for websocket rpc server-client
fixes #62
2021-06-24 06:52:31 +07:00
jangko
ccb19734e6
add test cases for rpc websocket client-server 2021-06-24 06:52:31 +07:00
jangko
a79f10f10f
adapt testserverclient for upcoming websocket test 2021-06-23 16:09:44 +07:00
Jacek Sieka
4eb39203eb
fixes (#95)
* fixes

* fix https://github.com/status-im/nimbus-eth2/issues/1650
* only one of `result` and `error` allowed in response
* fix invalid `string` instances being created from byte sequences
* fix large int64 parsing on 32-bit
* fix exception inheritance
* fix some dangling results
* some cleanups

* annotate exception issues, fix cancellation

* more error handling cleanup

* add rudimentary error tests

* cleanups

* simplify init
* use nextId -> lastId to avoid =1 init
* remove obsolete tests
2021-02-15 13:45:51 +01:00
Joe Clapis
831471f6d4
Added the ability to handle omitted params fields in incoming requests, and a unit test for it (#94) 2021-02-07 20:27:34 +01:00
jangko
18dceaa29f
change tormund/news to status-im/news 2020-09-21 12:08:17 +07:00
Zahary Karadjov
f53e0b960b
Fix all tests 2020-03-17 22:05:42 +02:00
Ștefan Talpalaru
72a99cc977
replace getCurrentExceptionMsg() and delete some unused imports 2019-12-02 12:26:09 +01:00
Yuriy Glukhov
d4fbed75c7
Better error handling 2019-11-22 15:14:16 +02:00
Yuriy Glukhov
b583dfb029 Use closeWait 2019-06-17 19:56:19 +03:00
Yuriy Glukhov
f19d66b35c Websocket client support and some fixes 2019-06-12 20:53:15 +03:00
Ștefan Talpalaru
493583b7f4
cosmetic change 2019-05-10 22:08:30 +02:00
Ștefan Talpalaru
159f9b816e
assert() -> doAssert() 2019-03-13 22:42:07 +01:00
andri lim
b4a3273152 fix test 2019-01-12 16:17:19 +02:00
coffeepots
e1fad2e3ba Fix test using wrong rpc path 2018-11-26 18:33:47 +00:00
coffeepots
77b485c6ce More tests for optional fields inside objects 2018-11-26 18:12:26 +00:00
coffeepots
798e86112c Cover optional cases within objects 2018-11-26 18:03:56 +00:00
coffeepots
0160295743 Improve non-builtin optional test 2018-11-23 16:56:00 +00:00
coffeepots
066b06862d Add test for Option[T] where T is not a builtin 2018-11-23 16:11:12 +00:00
coffeepots
5e7f2d6a61
Merge pull request #42 from jangko/rpc_macro
add optional arg support to rpc macro
2018-11-19 10:58:38 +00:00
andri lim
a1fe7d57b4 allow optional parameters in the middle of parameters list 2018-11-16 20:07:39 +07:00
Zahary Karadjov
8bb6fdd3bf fix a wrong rebase 2018-11-12 23:54:29 +02:00
Zahary Karadjov
26953344c3 Turn some potentially dangerous templates into functions
Be careful when creating templates. If the input parameters are
referenced within the body multiple times, this may lead to multiple
evaluations of functions with side-effects.
2018-11-12 23:51:24 +02:00
andri lim
ee3ba6d5ad add optional arg support to rpc macro 2018-11-12 17:47:03 +07:00
coffeepots
5da9ce7881 Make all tests use port 8545 to check connection closing between tests 2018-09-13 19:27:51 +01:00
coffeepots
7a27a78122 Update testEthCalls and testRpcMacro with closeWait 2018-09-13 19:20:16 +01:00
coffeepots
f0eb9693af Use different port for socket test 2018-09-13 18:46:15 +01:00
coffeepots
b8b38c53c9 Update http test to use closeWait 2018-09-13 18:06:54 +01:00
coffeepots
0ba96afb13 Update socket test to use closeWait 2018-09-13 18:06:46 +01:00
coffeepots
0acb6997c7 Tests for option types 2018-08-29 14:16:03 +03:00
Zahary Karadjov
642fdd591f fix the package structure to make Nimble happy 2018-07-20 19:34:10 +03:00
andri lim
4aedb214b6 fixes #18, rpc macro now can accept multiple variables of one type 2018-07-17 10:06:29 +07:00
cheatfate
989c999dc7 Fix suite name in testhttp. 2018-07-14 11:01:05 +03:00
cheatfate
0942b0387d Add RpcHttpServer.
Add RpcHttpClient.
2018-07-14 10:51:54 +03:00
coffeepots
1ca1847600 Make client usable with different transports 2018-07-12 18:36:40 +01:00
coffeepots
6466b7e778 Update tests with newRpcSocketClient 2018-07-12 14:08:43 +01:00
coffeepots
e3a7ffd121 Merge rpcsocket into rpcserver 2018-07-12 09:43:44 +01:00
coffeepots
3b8e736f35 Wrap RPC exceptions in JSON 2018-07-11 18:27:50 +01:00