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 issue aims to describe at a somewhat high level the things need to be done before we can release.
note, since there are links to specific lines in the code I created mexico_branch because in develop the code might change a little bit when linking to some specific line but that branch is only for this documentation.
NOTE: for quickly testing and debuging your code use the CLI.
have multiple shells simulate nodes and add/remove commands to the cli to test as you wish.
on NewEpoch => do PTT (integration with @elichai on passing the torch (PTT))
on TaskSubmission => this means that some worker commited a new delta and should be synced into the local db of the worker.
on TaskRecordCreated => only relevant if the task is for the current worker because before this event the worker already has the input params and did the key exchange and all, now this is a confirmation to the worker that the requester did everything as expected.
SecretContractDeployment => same as TaskSubmission
Design
The integration of the EthereumServices class should be part of the worker i.e same as ConnectionManager.
The class should be initialized in the NodeController and every time that event occurs should trigger an Action.
for example: on NewEpoch => do PTT
so inside EthereumServices there will be emit of NewEpoch event and this will trigger PTTAction in the NodeController_actions map.
getWorkerEncryptionKey is already implemented as an example on how to do this. To run the example:
start a node with --proxy <port number> and let the user connect to it. node cli_app.js -i B1 -b B1 -p B1 --core 8978 --proxy 3346
start the worker node and let it connect to the proxy node. node cli_app.js -b B1 -n peer1 --core 7872
make the worker node subscribe to its own signKey topic $selfSubscribe
You should see the following debug message: subscribed to [the_worker_sign_key] self signKey
Now test the proxy by openning another terminal and typing use the the_worker_sign_key from step 3:
@lacabra and @apalepu23 the msgId field is super important because @elichai generates a different encryption key for differenct inputs in enigma-core and this is how he can link between different keys.
For example look at SendTaskInput rpc command how to uses msgId.
FYI,basic test command for the rpc getInfo that a user should type:
This issue aims to describe at a somewhat high level the things need to be done before we can release.
note, since there are links to specific lines in the code I created
mexico_branch
because indevelop
the code might change a little bit when linking to some specific line but that branch is only for this documentation.NOTE: for quickly testing and debuging your code use the CLI.
1. Ethereum related stuff
@lenak25 I added TODO with your name in
NodeController.js
to show you where the EthereumApi should be created and stored.Sync tests
Once flow done lookup #14 the test's requirements.
To run sync test manually in the cli:
--core <port_x>
and type$announce
in the CLI - this is theProvider
node.--core <port_y>
and type$sync
in the CLI - this is theReceiver
node.see related sync test:
AnnounceAction test
Ethereum Services
technichal spec : #19.
@lenak25
use case
NewEpoch
=> do PTT (integration with @elichai on passing the torch (PTT))TaskSubmission
=> this means that some worker commited a newdelta
and should be synced into the local db of the worker.TaskRecordCreated
=> only relevant if the task is for the current worker because before this event the worker already has the input params and did the key exchange and all, now this is a confirmation to the worker that the requester did everything as expected.SecretContractDeployment
=> same asTaskSubmission
Design
The integration of the
EthereumServices
class should be part of the worker i.e same as ConnectionManager.The class should be initialized in the NodeController and every time that event occurs should trigger an Action.
for example:
on NewEpoch => do PTT
so inside
EthereumServices
there will beemit
ofNewEpoch
event and this will triggerPTTAction
in theNodeController
_actions map.Ethereum MissingState
@lenak25
Integrate this in the code during the sync flow here.
Ethereum States Verification
@lenak25
specification here.
2. JsonRpcApi a.k.a client_api
Implement the different methods in the doc
getWorkerEncryptionKey
is already implemented as an example on how to do this.To run the example:
--proxy <port number>
and let the user connect to it.node cli_app.js -i B1 -b B1 -p B1 --core 8978 --proxy 3346
worker
node and let it connect to the proxy node.node cli_app.js -b B1 -n peer1 --core 7872
signKey
topic$selfSubscribe
You should see the following debug message:
subscribed to [the_worker_sign_key] self signKey
the_worker_sign_key
from step 3:The response should be:
@lacabra and @apalepu23 the
msgId
field is super important because @elichai generates a different encryption key for differenct inputs inenigma-core
and this is how he can link between different keys.For example look at SendTaskInput rpc command how to uses
msgId
.FYI,basic test command for the rpc
getInfo
that a user should type:Couple of points:
3. Task Manager
I added a Dummy Task Manager, in this commit.
It should manage everything related to passing tasks to
enigma-core
, commiting tasks back to ethereum to collect fee's and store unfonfirmed tasks.NodeController
.4. Wrapping things up
Read high-level definition.
This should be finallized only when everything is set up.
To test this right now type
$init
in the cli.-The implementation of
$init
cli commad is called InitWorkerAction.The text was updated successfully, but these errors were encountered: