fastnear / fast-near Goto Github PK
View Code? Open in Web Editor NEWFastest RPC for @near based on Redis/LMDB
Fastest RPC for @near based on Redis/LMDB
I'm trying to fetch the most recent state of priceoracle.testnet
contract but the response differs from the one that RPC request returns.
How to reproduce:
curl --location --request POST 'https://rpc.testnet.near.org' \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"id": "dontcare",
"method": "query",
"params": {
"request_type": "view_state",
"finality": "final",
"account_id": "priceoracle.testnet",
"prefix_base64": "U1RBVEU=" -> "STATE" in base64
}
}'
[
{
"key": "U1RBVEU=",
"value": "AgAAAABpBAAAAAAAAAACAAAAAGsEAAAAAAAAAAIAAAAAdgIAAAABaQoAAAAAAAAAAgAAAAFrCgAAAAAAAAACAAAAAXZaAAAAEwAAAHByaWNlb3JhY2xlLnRlc3RuZXQAAAAlpAAKi8oiBAAAAAAA"
}
]
curl --location --request GET 'https://rpc.web4.testnet.page/account/priceoracle.testnet/data/STATE?encoding=base64'
{
"data":
[
..996 elements
],
"iterator": "02643a70726963656f7261636c652e746573746e65743a535441544507e78d04"
}
AgAAAABpBAAAAAAAAAACAAAAAGsEAAAAAAAAAAIAAAAAdgIAAAABaQoAAAAAAAAAAgAAAAFrCgAAAAAAAAACAAAAAXZaAAAAEwAAAHByaWNlb3JhY2xlLnRlc3RuZXQAAAAlpAAKi8oiBAAAAAAA
returned from the RPC call is missing within Fast-Near's response.Also i've tried to supply the iterator
param in order to fetch the next page but the response is 1:1 the same as without iterator(it seems like the response is cached but not refetched).
https://rpc.web4.testnet.page/account/priceoracle.testnet/data/STATE?encoding=base64&iterator=02643a70726963656f7261636c652e746573746e65743a535441544507e78d04
In case all indexers go down, ideally we would want to have a restart from latest block height stored in Redis.
While this works fine with regular RPC, it does not when using fastrpc.
http post https://fastrpc.mainnet.near.org jsonrpc=2.0 id=dontcare method=query \
params:='{
"request_type": "call_function",
"block_id": 55759972,
"method_name": "web4_get",
"account_id": "psalomo.near",
"args_base64": "eyJyZXF1ZXN0IjogeyJwYXRoIjogIi9uZnRpbWFnZS8xLnN2ZyJ9fQ=="
}'
returns:
HTTP/1.1 400 Bad Request
Content-Length: 140
Date: Thu, 23 Dec 2021 14:02:49 GMT
Server: Google Frontend
X-Cloud-Trace-Context: f5e95c019083877c5ecafe93fa8847ca;o=1
content-type: text/plain; charset=utf-8
Error: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined
I play the hearwallethot on telegram: https://t.me/herewalletbot/app?startapp=4222126
When I claim, the UI update the amount but when I check with get_user method, it seem return the old data: https://rpc.web4.near.page/account/game.hot.tg/view/get_user?account_id=rokbotsxyz.tg
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.