Comments (7)
I have to admit that the concept of preflight allures me - what is the purpose or why do we need it...
Google says: GET , POST , and HEAD are considered simple requests (and are case-sensitive). They do not require preflight. 🤔
It's CORS stuff of course :)
from aeternity.
I have to admit that the concept of preflight allures me - what is the purpose or why do we need it...
Google says: GET , POST , and HEAD are considered simple requests (and are case-sensitive). They do not require preflight. 🤔
from aeternity.
I definitely disagree here.
First of all while the dry-run doesn't mutate the node state itself, because ... well .. it's a dry run - it is actually a mutable operation on the node state, just the new state is thrown away.
Abusing GET requests with blob data also never ended well.
I've always been proponent of the idea of separate and specific API operation for "static calls" and disabling the dry-run "in production".
from aeternity.
it is actually a mutable operation on the node state, just the new state is thrown away
The same for get requests in general, server allocates some RAM to compute the result (changes its state 🙃), and disposes it after that.
Abusing GET requests with blob data also never ended well.
Regarding limitations, I find out that our Cloudfront setup limits URLs to 1-2k chars. I won't propose to change that. It is still anough to call a contract providing like 3 addresses.
separate and specific API operation for "static calls"
Sounds also good to me, it may accept contract address, encoded calldata and return the call result.
from aeternity.
I'm curious, what is a 'static call' and how is it different from a dry-run? (Isn't a gas limit the best/only way to limit resource usage in a relevant way?) Also, why would it fit better in a HTTP GET? The component of a contract call that can be largest is the calldata?
from aeternity.
I'm curious, what is a 'static call' and how is it different from a dry-run?
Dry-run executes a transaction. We name 'static call' when a contract method gets executed using dry-run. Do you think better to name it dry-run as well? For example in js sdk:
-myContract.sum(1, 2, { callStatic: true })
+myContract.sum(1, 2, { dryRun: true })
Isn't a gas limit the best/only way to limit resource usage in a relevant way?
'static call' endpoint can be the same way limited by gas 👍
Also, why would it fit better in a HTTP GET?
It also can be GET and POST. GET for lighter requests (without CORS, better for polling), POST when calldata is big.
The component of a contract call that can be largest is the calldata?
I think so.
from aeternity.
But?! If dry-run and static call is the same thing, then this makes no sense:
I've always been proponent of the idea of separate and specific API operation for "static calls" and disabling the dry-run "in production".
from aeternity.
Related Issues (20)
- Update deprecated CircleCI images
- Can't build node by reference to git repo in docker-compose.yml
- Missed docs for `*-bundle` images HOT 1
- Histogram metrics are not exported as histogram StatsD type
- Allow a fraction `dev_mode.microblock_interval` HOT 2
- Reject spend tx immediately if the recipient contract is not payable HOT 5
- Change debug tx in mempool endpoint to use dry run
- Don't encode binary pointer key as string in name details HOT 6
- Breaking change in protocol files configuration HOT 1
- Devmode not producing microblocks unless `emit_mb` explicitly triggered HOT 3
- Allow of range of ports to be specified for use by SC FSMs HOT 2
- Inconsistent naming in api: `transactions/pending` vs `mempool` HOT 1
- Reject claiming of revoked name immediately HOT 3
- Typo in `fiat_converstion_url` parameter HOT 1
- BRI can be overridden by config for mainnet and testnet
- Broken metrics HOT 1
- Unclear error message when peer-key directory is not writeable
- Can't override network id using env variable HOT 2
- Restart command cause a crash (sometimes)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aeternity.