You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 21, 2020. It is now read-only.
This is a small compilation of things that I see as features and improvements that should be done in this project.
Improvements:
Split the project into a few npm packages. This is a best practice for sure since the main idea of npm modules is 1 responsibility.
This will allow easier maintenance, make the project more testable and allow more parallel work.
For example,
cli module
jsonrpc module
nodeController module
taskManager module
state sync module
enigmaNode module
core communication module
logger module
ethereum module
Use retry npm module instead of StoppableTask for peer discovery, it works better and based on exponential backoff interval.
Make sure to use the random feature (article explaining why)
3)content synchronization:
Better state negotiation with the provider peer. Instead of connecting to a provider that announced some contract address (CID) and start syncing immediately, consider verifying first how synced is the provider with a req/res type of message.
req:
contractAddress : [...]
deltaFrom : // if 0 then byte code is also necessary
deltaTo:
res:
canProvide : true/false
Better fault tolerance for content synchronization (Handling errors, on failure, keep from existing state, don't start from scratch) generally, with time improve the sync process depending on the bottlenecks and bugs that will appear.
more parallelism during sync, currently sequential (contract + all deltas) one after another.
replace leveldb with something else for TaskManager (rocksdb for example) because it's moving towards EOL and queries like getAllStuff() are not built in.
Convert all the project to being promise based and use await/async. Even all the Actions, turn the execute(params) method into Promise.
Use cache to check GET_LOCAL_STATE and GET_LL_TIPS- cache already implemented as a stand-alone unit.
Blacklisting for bad behavior and a local reputation score for peers.
New Features:
Write new modules or easy-to-migrate code to Typescript for interface safety
To improve performance at scale: turn the project into a multi-process one using Node Cluster functionality for each runtime. (Core,NodeController,JsonRpc etc)
Use the libp2p modularity to build the project for peer discovery.
For example, replace inside libp2p-bundle all the modules with enigma's implementation.
instead of 'libp2p-bootstrap' replace with our own bootstrap etc.
This will be more efficient and easier to maintain.
Pretty/friendly/Decoupled CLI - Make a new project called enigma-cli and let it import the enigma-p2p package and create a proper cli.
The text was updated successfully, but these errors were encountered:
This is a small compilation of things that I see as features and improvements that should be done in this project.
Improvements:
Split the project into a few npm packages. This is a best practice for sure since the main idea of npm modules is 1 responsibility.
This will allow easier maintenance, make the project more testable and allow more parallel work.
For example,
Use retry npm module instead of
StoppableTask
for peer discovery, it works better and based on exponential backoff interval.Make sure to use the
random
feature (article explaining why)3)content synchronization:
req:
res:
Better fault tolerance for content synchronization (Handling errors, on failure, keep from existing state, don't start from scratch) generally, with time improve the sync process depending on the bottlenecks and bugs that will appear.
more parallelism during sync, currently sequential (contract + all deltas) one after another.
replace leveldb with something else for
TaskManager
(rocksdb for example) because it's moving towards EOL and queries likegetAllStuff()
are not built in.Convert all the project to being
promise
based and useawait/async
. Even all the Actions, turn theexecute(params)
method intoPromise
.Use cache to check
GET_LOCAL_STATE
andGET_LL_TIPS
- cache already implemented as a stand-alone unit.Blacklisting for bad behavior and a local reputation score for peers.
New Features:
Write new modules or easy-to-migrate code to Typescript for interface safety
To improve performance at scale: turn the project into a multi-process one using
Node Cluster
functionality for each runtime. (Core,NodeController,JsonRpc etc)Use the
libp2p
modularity to build the project forpeer discovery
.For example, replace inside
libp2p-bundle
all the modules with enigma's implementation.instead of
'libp2p-bootstrap'
replace with our own bootstrap etc.This will be more efficient and easier to maintain.
Pretty/friendly/Decoupled CLI - Make a new project called
enigma-cli
and let it import theenigma-p2p
package and create a proper cli.The text was updated successfully, but these errors were encountered: