Comments (7)
I would propose a 2-phase plan:
Phase 1. Isolated FIO API
remove /v1/chain
from user interaction, and define an API that completely covers everything an end-user application needs to use. Ideally, start a fio_api_plugin
which would open its own HTTP socket and implement the API independently from EOSIO API.
Methods that require sending a transaction could be implemented as follows:
-
User calls an unauthenticated API method, like
/fio/transfer_fio
. -
The server prepares an EOSIO transaction and sends a binary blob back to the user for signing.
-
The user calls
/fio/push_transaction
with the signed blob.
So, all user-facing smart contract actions can be encapsulated in such an API. Also this plugin would provide all informational requests, such as searching for a domain, displaying fees, looking up the user balance.
Phase 2. Migrate to vanilla EOSIO
This requires significant efforts, and potentially a relaunch of the FIO blockchain. The goal is to have the original nodeos
code as delivered by Block.one and have all FIO specifics isolated in a plugin.
Also as many customizations as possible, such as permissions management, should be moved from nodeos code into the system smart contract.
In this case, fio_api_plugin
would also perform public key format conversion to keep the backward compatibility with "FIOxxx" keys.
The native EOSIO API doesn't even need to be exposed to the public. It would only be used for internal infrastructure at BP and application service providers.
If Phase 1 is started ASAP, it will guarantee long-term compatibility for user-facing software, and will allow for a thorough and careful implementation of Phase 2.
from fio.
Regarding Phase 1: removing access to the native /v1/chain/
API endpoints would break any cross compatibility we already have with existing generic EOSIO tooling (such as eosjs). This change would be a bit extreme.
Instead I'd just recommend leaving the /v1/chain
plugin and APIs alone completely while still allowing access to them when needed. Any modified or additional API calls that need to be established for FIO can be put in the fio_api_plugin
as described, which can coexist with the native API calls.
from fio.
Phase 1 can be introduced smoothly, in sub-phases:
1.1 introduce the new API and keep the old one
1.2 phase out the old API
1.3 cut the old API from public access
from fio.
while still allowing access to them when needed
I'm still fuzzy on how v1 calls can remain unchanged without deeper integration into the consensus logic of the chain (fees, error responses, etc), but that's probably due to my lack of understanding. The fees are what protect the chain and no call on chain can be free.
from fio.
Adding some links here regarding wrapping eosjs and this example of how it might be done.
from fio.
while still allowing access to them when needed
I'm still fuzzy on how v1 calls can remain unchanged without deeper integration into the consensus logic of the chain (fees, error responses, etc), but that's probably due to my lack of understanding. The fees are what protect the chain and no call on chain can be free.
see here, for example. max_fee
is the action argument that is passed along other arguments. So it's not a change in the base transaction protocol:
from fio.
Tracked in: https://fioprotocol.atlassian.net/browse/BD-1905
from fio.
Related Issues (20)
- Determination of date and time of forking deadline for Test net rollout of gemini HOT 4
- FIO Fee Update HOT 5
- FIO v2.x required chain update HOT 1
- Determine date and time of forking deadline for Mainnet rollout of gemini release v2.x HOT 8
- setabi corrupted the ABI HOT 3
- Need FIO Transaction History Solution for Wallets and Exchanges HOT 1
- fio.fee Set fee vote -- when the number of fees voted is 70 fees, RAM usage exceeded error for BP accounts not in the schedule HOT 3
- FIO Upgrade/Migration to EOSIO 2.0.x codebase HOT 2
- centos How to install nodes HOT 3
- Build fail HOT 12
- FIO - AWS Cloud/Devops Engineer HOT 1
- QA and Test Automation Engineer HOT 1
- QA Javascript Developer HOT 1
- Bug - variant error using create_key over API
- QA and Test Automation Engineer HOT 1
- FIO Integration Engineer HOT 1
- Member access within null pointer detected via Libfuzzer & UndefinedBehaviorSanitizer HOT 1
- How do I get the real fee of the transaction HOT 7
- fixed HOT 2
- Converted time in send_response body is a year ahead HOT 1
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 fio.