mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-10 13:55:45 +00:00
728713a183
When running `embark blockchain` followed by `embark run` previously, logs generated in the standalone `embark blockchain` process were black boxed and not accessible to the main Embark process. This is fixed by creating a client IPC connection in the `embark blockchain` process that connects to the IPC server connection running in `embark run`. The connection is made by way of polling `ipc.connect` and continues polling even after a connection is made in case `embark run` is killed and restarted without restarting `embark blockchain`. `LogHandler` was introduced to extrapolate functionality used in `ProcessLauncher` that needed to also be used in the standalone blockchain process. It also caps the number of logs that are stored in memory per process by a constant value defined in `constants.json`. A `blockchain_listener` was module was created (and run inside of `embark run`) that listens for logs emitted by the `embark blockchain` client IPC and runs them through the `LogHandler`. Additionally, this module registers the API endpoints needed to handle requests for blockchain process logs in the cockpit (which were 404’ing before). # Conflicts: # lib/modules/blockchain_process/blockchain.js
61 lines
1.2 KiB
JSON
61 lines
1.2 KiB
JSON
{
|
|
"httpContractsDirectory": ".embark/contracts/",
|
|
"contexts": {
|
|
"simulator": "simulator",
|
|
"blockchain": "blockchain",
|
|
"templateGeneration": "templateGeneration",
|
|
"run": "run",
|
|
"upload": "upload",
|
|
"build": "build",
|
|
"console": "console",
|
|
"graph": "graph",
|
|
"scaffold": "scaffold",
|
|
"test": "test",
|
|
"reset": "reset",
|
|
"any": "any"
|
|
},
|
|
"process": {
|
|
"processLaunchRequest": "process:launch-request",
|
|
"processLaunchComplete": "process:launch-complete",
|
|
"log": "log",
|
|
"events": {
|
|
"on": "on",
|
|
"request": "request",
|
|
"response": "response"
|
|
}
|
|
},
|
|
"pipeline": {
|
|
"init": "init",
|
|
"build": "build",
|
|
"initiated": "initiated",
|
|
"built": "built"
|
|
},
|
|
"blockchain": {
|
|
"blockchainReady": "blockchainReady",
|
|
"blockchainExit": "blockchainExit",
|
|
"init": "init",
|
|
"initiated": "initiated",
|
|
"servicePortOnProxy": 10,
|
|
"networkIds": {
|
|
"livenet": 1,
|
|
"testnet": 3,
|
|
"ropsten": 3,
|
|
"rinkeby": 4
|
|
}
|
|
},
|
|
"storage": {
|
|
"init": "init",
|
|
"initiated": "initiated"
|
|
},
|
|
"tests": {
|
|
"gasLimit": 6000000
|
|
},
|
|
"codeGenerator": {
|
|
"gasLimit": 6000000
|
|
},
|
|
"logs": {
|
|
"logPath": ".embark/logs/",
|
|
"maxLogLength": 1500
|
|
}
|
|
}
|