jangko
20b4c9a0fb
Let the OS choose the port for tests
2024-01-07 15:33:43 +07:00
jangko
31b741720b
Add test for createRpcSigsFromNim and createSingleRpcSig
2024-01-04 20:36:43 +07:00
jangko
2f6a605aa2
Reenable test hhtps
2024-01-04 11:53:15 +07:00
jangko
834de413d9
Rename jrpc_sys module back to jsonmarshal
2024-01-04 11:40:22 +07:00
kdeme
f59e387da2
Add example test case that currently fails the Option parsing
2024-01-04 11:01:49 +07:00
jangko
76dd352ace
Remove StringOfJson
2024-01-04 07:49:19 +07:00
andri lim
e0b077fea4
Upgrade rpc router internals ( #178 )
...
* Upgrade rpc router internals
* use new chronos asyncraises
* Fix style mismatch
* Fix nim v2 compilation error
* Addresing review
* Remove unnecessary custom serializer and let the library do the work
* fix error message
* Update readme.md
2024-01-03 20:06:53 +07:00
coffeepots
819b6fed37
Use nim-json-serialization for RPCs ( #172 )
...
* Use nim-json-serialization for RPCs
* Add distinct serializers for RPC types
* Avoid ConvFromXtoItselfNotNeeded in testing
* Remove redundent `==` template
* Rename Eth1JsonRpc to JsonRpc
* Fix generic instantiation clash
---------
Co-authored-by: jangko <jangko128@gmail.com>
2023-12-14 08:29:11 +07:00
jangko
38950a786d
reduce compiler warnings
2023-02-22 12:00:35 +07:00
Jacek Sieka
c0ecb42613
normalise nimble, update ci, unittest2 ( #158 )
2022-12-02 13:17:27 +01:00
Jacek Sieka
b4aff8fec5
remove news support ( #155 )
...
`news` has several resource leaks and other security issues - replaced
by `nim-websock` which is actively maintained.
2022-11-08 14:39:29 +01:00
Jacek Sieka
7c80b75856
fix enum parsing, work around potential nil dereference ( #150 )
...
* fix enum parsing, work around potential `nil` dereference
When the bizarre error handling in the http client fails, it may happen
that a nil is returned (maybe due to Nim bugs) - do it manually for now
2022-09-15 22:32:16 +03:00
jangko
0fee4be2cc
implement hook to handle CORS and JWT auth
...
- fixes #138
- fixes #126
- fixes #38
2022-07-17 23:06:08 +07:00
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