Initial Handshake Implementation#7
Conversation
| handshakeScanner: | ||
| warnDifference: 2 # warning difference between existing and scanned blocks height | ||
| criticalDifference: 10 # critical difference between existing and scanned blocks height |
There was a problem hiding this comment.
🚫 Required Change
Please remove these configs.
| 'observation.confirmation' | ||
| ); | ||
| const blockTime = { | ||
| const blockTimeByNetwork: Record<NetworkType, number> = { |
There was a problem hiding this comment.
🚫 Required Change
Revert this change (please avoid unnecessary changes). Adding the new record is sufficient here.
| handshakeScannerWarnDiff: number; | ||
| handshakeScannerCriticalDiff: number; |
There was a problem hiding this comment.
🚫 Required Change
Please remove these 2 variables.
| let scannerWarnDiff = currentConfig.healthCheck.scannerWarnDiff; | ||
| let scannerCriticalDiff = currentConfig.healthCheck.scannerCriticalDiff; |
There was a problem hiding this comment.
🚫 Required Change
Please remove these two.
| await CreateScanner.instance.createHandshakeScanner( | ||
| handshakeConfig, | ||
| rosenConfig | ||
| ); |
There was a problem hiding this comment.
🚫 Required Change
Please pass config.observationStoreRawData to it:
| await CreateScanner.instance.createHandshakeScanner( | |
| handshakeConfig, | |
| rosenConfig | |
| ); | |
| await CreateScanner.instance.createHandshakeScanner( | |
| handshakeConfig, | |
| rosenConfig, | |
| config.observationStoreRawData | |
| ); |
| rosenConfig: RosenConfig | ||
| ) => { | ||
| if (!this.observationScanner) { | ||
| if (handshakeConfig.rpc) { | ||
| this.observationScanner = new HandshakeRpcScanner({ | ||
| dataSource, | ||
| initialHeight: handshakeConfig.initialHeight, | ||
| network: createHandshakeRpcNetworkConnectorManager(), | ||
| logger: loggers.observationScannerLogger, | ||
| }); | ||
|
|
||
| const observationExtractor = new HandshakeRpcObservationExtractor( | ||
| rosenConfig.lockAddress, | ||
| dataSource, | ||
| TokensConfig.getInstance().getTokenMap(), | ||
| loggers.observationExtractorLogger | ||
| ); |
There was a problem hiding this comment.
🚫 Required Change
Following my previous comment, please add it here too.
| rosenConfig: RosenConfig | |
| ) => { | |
| if (!this.observationScanner) { | |
| if (handshakeConfig.rpc) { | |
| this.observationScanner = new HandshakeRpcScanner({ | |
| dataSource, | |
| initialHeight: handshakeConfig.initialHeight, | |
| network: createHandshakeRpcNetworkConnectorManager(), | |
| logger: loggers.observationScannerLogger, | |
| }); | |
| const observationExtractor = new HandshakeRpcObservationExtractor( | |
| rosenConfig.lockAddress, | |
| dataSource, | |
| TokensConfig.getInstance().getTokenMap(), | |
| loggers.observationExtractorLogger | |
| ); | |
| rosenConfig: RosenConfig, | |
| observationStoreRawData: boolean | |
| ) => { | |
| if (!this.observationScanner) { | |
| if (handshakeConfig.rpc) { | |
| this.observationScanner = new HandshakeRpcScanner({ | |
| dataSource, | |
| initialHeight: handshakeConfig.initialHeight, | |
| network: createHandshakeRpcNetworkConnectorManager(), | |
| logger: loggers.observationScannerLogger, | |
| }); | |
| const observationExtractor = new HandshakeRpcObservationExtractor( | |
| rosenConfig.lockAddress, | |
| dataSource, | |
| TokensConfig.getInstance().getTokenMap(), | |
| loggers.observationExtractorLogger, | |
| observationStoreRawData | |
| ); |
| @@ -1,3 +1,4 @@ | |||
| src/config/*.json | |||
There was a problem hiding this comment.
🚫 Required Change
Please revert this change.
| import { HandshakeRpcObservationExtractor } from '@rosen-bridge/handshake-observation-extractor'; | ||
| import { HandshakeRpcScanner } from '@rosen-bridge/handshake-scanner'; |
There was a problem hiding this comment.
🚫 Required Change
Seems you've forgot to install these two packages (they should be included in package.json file)
Implementation following RCS-003 - https://github.com/rosen-bridge/rcs/tree/master/rcs-003