-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Put/Post operations in Oracle contract #1980
Comments
Supporting |
According to https://restfulapi.net/idempotent-rest-apis/
Hence everything except POST and PATCH should be OK for most systems having idempotent semantics. For NeoFS, for example, PUT for already existing object will return success. Maybe it will be better to support at least safe and idempotent verbs and let SC developer to decide if it's ok for his case to use particular method? |
Yes. And in many cases it's just not a problem. I don't think anything has changed since #1243 (comment). |
Agree. |
The main part of the message was to let SC author to decide if it's ok to use POST in his particular case =) |
Smart contacts cannot write data to NeoFS without some level of support for POST, as I understand it. This is an important part of having fully decentralized, fully serverless dynamic Web 2.0 content. If you wanted to build e.g. a distributed Twitter, you would normally need to essentially build an attestation contract, have users upload content to NeoFS/IPFS, and have the hash pointing to said content stored on chain. But on-chain storage is expensive, and the growing size of storing the list of hashes would become expensive. There is no way for that SC/"server" to store that information off-chain. POST requests would allow this, and allow more broadly smart contracts to work as backends for (intelligently designed) frontends. Otherwise, we should perhaps be more clear that Neo <-> NeoFS SC integration is intended to be read-only, as this is somewhat more limiting. |
We need advances on this, as least some discussions and a roadmap for improving our native oracle to modern standards. |
What about a scenario when the user can be granted access to a certain object on the fs via the oracle? I.e., after a purchase, a token is generated for her for say 1 month, after which it's removed. Could this be possible. Otherwise there's no point in "distributed" ledger if I have to run a server to do this. |
Summary or problem description
At the moment Oracle contract only supports
request
method with URL and associated data that essentially allows to get something from the outside, but contracts also should be able to put/post/send something there. It's relevant both for NeoFS (Put operation) and HTTP (POST). Probably also for any other potential protocols that are to be supported.Do you have any solution you want to propose?
At the very minimum we need some
send
method that could take arbitrary data and transmit it to the outside world returning the status of this operation to the callback.But there could be more functionality provided by various protocols (like Delete or Balance.Request for NeoFS, see #1270), so we need to also think about other potential extensions of the Oracle contract. It can be done by adding more methods to it, but maybe there is some better way to extend it,
Neo Version
Where in the software does this update applies to?
The text was updated successfully, but these errors were encountered: