I have run network map service of corda on my VM. When I changed whitelist file, network map service rebuild network map and also network parameter.
If the network-parameters file is changed and no longer matches what the network map service is advertising then the node will automatically shutdown.
In my case all nodes gets shut down which was expected. On start up got message "Node is using parameters with hash: X but network map is advertising: Y". After deleting network-parameter it starts properly.
As per docs mentioned here, to manually accept updated network parameters and to send back parameters approval to the zone operator, the RPC method fun acceptNewNetworkParameters(parametersHash: SecureHash) has to be called with parametersHash from the update.
I have called above mentioned function from corda shell as below:
run acceptNewNetworkParameters parametersHash: "ba19fc1b9e9c1c7cbea712efda5f78b53ae4e5d123c89d02c9da44ec50e9c17d"
I have got error "RPC failed: java.lang.IllegalArgumentException: argument type mismatch".
I need to figure out how corda nodes accept updated network parameters from Network Map service and how can I prevent corda nodes to be shut down after getting new parameter.
Note: Using Network Map service with below config changes:
cache-timeout : 2 Sec param-update-delay : 10 Sec network-map-delay : 1 Sec
08:35:13.664 [vert.x-eventloop-thread-3] ERROR i.c.n.s.NetworkMapServiceProcessor - failed during processParamUpdate
io.vertx.core.file.FileSystemException: java.nio.file.NoSuchFileException: /data/corda-workspace/network-map-service-v0.3.0/network-map/parameters-update/next-params-update
at io.vertx.core.file.impl.FileSystemImpl$10.perform(FileSystemImpl.java:638)
at io.vertx.core.file.impl.FileSystemImpl$10.perform(FileSystemImpl.java:615)
at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$1(ContextImpl.java:275)
at io.vertx.core.impl.TaskQueue.run(TaskQueue.java:76)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.nio.file.NoSuchFileException: /data/corda-workspace/network-map-service-v0.3.0/network-map/parameters-update/next-params-update
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
at sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
at sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:144)
at sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99)
at java.nio.file.Files.readAttributes(Files.java:1737)
at java.nio.file.FileTreeWalker.getAttributes(FileTreeWalker.java:219)
at java.nio.file.FileTreeWalker.visit(FileTreeWalker.java:276)
at java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:322)
at java.nio.file.Files.walkFileTree(Files.java:2662)
at java.nio.file.Files.walkFileTree(Files.java:2742)
at io.vertx.core.file.impl.FileSystemImpl$10.perform(FileSystemImpl.java:620)
... 7 common frames omitted
I have tried multiple time network parameter change along with NMS, few times gets network-parameter-updated files in nodes and few times got below issues:
Couldn't find parameters update for the hash: <Hash>
Refused to accept parameters with hash <Hash> because network map advertises update with hash <Hash>. Please check newest version