Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow customisation of node config #1248

Merged
merged 1 commit into from
Jul 11, 2023
Merged

Allow customisation of node config #1248

merged 1 commit into from
Jul 11, 2023

Conversation

maparr
Copy link
Contributor

@maparr maparr commented May 9, 2023

It closes #1019

Additionally: resolving an issue with stale genesisID for managers, because of spawn managers, currently in develop, we're passing the genesisID only once and after it, reuse the genesisID and only change it on the wallet change or app restart.

UPD How to test

  1. Test custom config
  • run ./Spacemesh --discovery=http://127.0.0.1:8000/networks.json --checkInterval=30
  • pass the node setup process
  • take node-config.testnet-5.json and see smeshing options, take bootnodes with p2p option from the node-config.json , place in node-config.testnet-5.json and update it.
  • wait 30s , check node-config.json and see update
  1. Test update from discovery
  • similar process, but update testnet-5.json config in the local network , update it, and see updates in node-config.json
    2 case
  • update the testnet-5.json network config, but also apply the same but different changes for the node-config.testnet-5.json file
  • it should take updates from custom config ( node-config.testnet-5.json ) and ignore testnet-5.json
  1. Test smeshing updates
  • we run smapp 1 time and did not the init the PoS process.
  • check the node-config.testnet-5.json file, should see smeshing options, with init post dir, only 1
  • go to smeshing screen and init PoS , and right now in the node-config.testnet-5.json file , u will have PoS information, which will be applied to node-config.json file.
  • stop the smeshing process should clean up the smeshing options in node-config.testnet-5.json and for node-config.json accordingly
  1. Test compatibility with latest develop without custom config
  • go to release ( develop right now ) , set up PoS and node
  • back to my branch and run it
  • settings from PoS ( from develop ) , should be migrated to my , and file cutoms config should be updated with this settings
  1. Test change network
    1 . set up smeshing
  2. go to the settings
  3. choose different network
  4. check the PoS screen and see the result, smeshing should not be inited
  5. init the smeshing on the PoS screen
    6 . switch back to the first network and compare.
Screen.Recording.2023-06-22.at.09.49.10.mov

@maparr maparr self-assigned this May 9, 2023
@github-actions
Copy link

github-actions bot commented May 9, 2023

Compiled Binaries

@github-actions
Copy link

Compiled Binaries

@maparr maparr force-pushed the feat/1019 branch 2 times, most recently from 9d5a26a to 07ea86e Compare May 24, 2023 21:30
@github-actions
Copy link

Compiled Binaries

@maparr maparr marked this pull request as ready for review May 28, 2023 22:11
@maparr maparr marked this pull request as draft May 28, 2023 22:12
@github-actions
Copy link

Compiled Binaries

@github-actions
Copy link

Compiled Binaries

@monikasmolarek
Copy link
Collaborator

I can't really do anything because:
2023-06-01T19:11:22.263+0200 FATAL 00000.defaultLogger failed to initialize config {"errmsg": "can't load config at /home/monikasmolarek/.config/Spacemesh/node-config.json: open /home/monikasmolarek/.config/Spacemesh/node-config.json: no such file or directory", "name": ""}
That's a single log in the go-sm logfile

@maparr
Copy link
Contributor Author

maparr commented Jun 1, 2023

@monikasmolarek , got it ,on it

@maparr maparr force-pushed the feat/1019 branch 2 times, most recently from 37a4a36 to da5355a Compare June 5, 2023 19:54
@github-actions
Copy link

github-actions bot commented Jun 5, 2023

Compiled Binaries

@maparr maparr marked this pull request as ready for review June 6, 2023 09:21
@maparr maparr requested a review from brusherru June 6, 2023 10:52
@monikasmolarek
Copy link
Collaborator

monikasmolarek commented Jun 6, 2023

Tested only on Windows this time:
1st scenario ok.
2nd scenario - the node seems to be up but Smapp shows it's not connected :

image



2023-06-06T19:34:34.595+0200	INFO	00000.defaultLogger	Looking for identity file at `key.bin`
2023-06-06T19:34:34.595+0200	INFO	00000.defaultLogger	Loaded existing identity; public key: d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed
2023-06-06T19:34:34.596+0200	INFO	00000.defaultLogger	App version: v0.3.5-beta.0. Git: f4aa559 - f4aa559667f43d953a2deabb0bcd6075013238c8 . Go Version: go1.19.9. OS: windows-amd64 
2023-06-06T19:34:34.596+0200	INFO	00000.defaultLogger	Welcome to Spacemesh. Spacemesh full node is starting...
2023-06-06T19:34:34.596+0200	INFO	starting spacemesh	{"data-dir": "C:\\Users\\bienm\\AppData\\Roaming\\Spacemesh\\node-data\\7f8f332c", "post-dir": "./", "hostname": "DESKTOP-LEHTPB4", "name": ""}
2023-06-06T19:34:34.597+0200	INFO	d08df.clock	converting genesis time to local time	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "clock", "genesis": "2023-05-31T20:00:00.498Z", "local": "2023-05-31T22:00:00.498+0200", "name": "clock"}
2023-06-06T19:34:34.597+0200	INFO	d08df	initializing p2p services	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed"}
2023-06-06T19:34:34.597+0200	INFO	d08df.p2p	starting libp2p host with config {DataDir:C:\Users\bienm\AppData\Roaming\Spacemesh\node-data\7f8f332c\p2p LogLevel:info GracePeersShutdown:30s MaxMessageSize:2097152 DisableNatPort:false Flood:false Listen:/ip4/0.0.0.0/tcp/7513 Bootnodes:[/dns4/testnet-05-bootnode-0.spacemesh.network/tcp/5000/p2p/12D3KooWQMAAL9nkgXJgTM2psJLMbWRgZLjAxJozx7dNkKYczs2V /dns4/testnet-05-bootnode-1.spacemesh.network/tcp/5000/p2p/12D3KooWF2bhnqsnu2UjxJGZs8KCbzvd91vnud29KaG9rzTNFH78 /dns4/testnet-05-bootnode-2.spacemesh.network/tcp/5000/p2p/12D3KooWQKosE9LZraMfFPg9QRYyKwxT4ipsar37oT6wRy8WqWos /dns4/testnet-05-bootnode-3.spacemesh.network/tcp/5000/p2p/12D3KooWKMQ5j15x2gzfXfX7uisss7uwkPnqJyoHcfyiYfHgSo3F /dns4/testnet-05-bootnode-4.spacemesh.network/tcp/5000/p2p/12D3KooWE1YEa3roqamhPt3CNiVRBzS7Lbv8HRbByE7fpSyLAZis /dns4/testnet-05-bootnode-5.spacemesh.network/tcp/5000/p2p/12D3KooWFCqyEner8hSnBmyQCkcxkuHjwY5BhHTaRYmGuNC1SQET /dns4/testnet-05-bootnode-6.spacemesh.network/tcp/5000/p2p/12D3KooWA96fvi2pQaQHpS2cpahDJCyQSsBW6A4KwHCPXsDVuiEJ /dns4/testnet-05-bootnode-7.spacemesh.network/tcp/5000/p2p/12D3KooWRvAVZrK3EURQBh1wdMPRDgjtowU84div3YxWYKuGDaFU /dns4/testnet-05-bootnode-8.spacemesh.network/tcp/5000/p2p/12D3KooWL3VGmZ4xgT1J5KnVJz7b6wxAUUFAVqNNRURKFfWNXLE4 /dns4/testnet-05-bootnode-9.spacemesh.network/tcp/5000/p2p/12D3KooWCfadA8PUva7eRn1GzdLhnfELRLu81s1na6JbdYivwBgs] MinPeers:10 LowPeers:40 HighPeers:100 AdvertiseAddress:}	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "p2p"}
2023-06-06T19:34:34.610+0200	INFO	d08df.clock	starting global clock	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "clock", "now": "2023-06-06T19:34:34.610+0200", "genesis": "2023-05-31T22:00:00.498+0200", "layer_duration": "5m0s", "tick_interval": "1s", "name": "clock"}
2023-06-06T19:34:34.625+0200	INFO	d08df.p2p	local node identity	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "p2p", "identity": "12D3KooWQvVZ1gsmnErhacwkUfQs4At9q5YfM4dyEQournKRAqhh", "name": "p2p"}
2023-06-06T19:34:34.625+0200	INFO	d08df.p2p	selected new best address	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "p2p", "address": "/ip4/192.168.1.111/tcp/7513", "name": "p2p"}
2023-06-06T19:34:34.693+0200	INFO	d08df.nipostValidator	created post verifier	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "nipostValidator", "num_workers": 3, "name": "nipostValidator"}
2023-06-06T19:34:34.724+0200	INFO	d08df.p2p	selected new best address	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "p2p", "address": "/ip4/192.168.1.111/tcp/7513", "name": "p2p"}
2023-06-06T19:34:34.724+0200	INFO	d08df.p2p	selected new best address	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "p2p", "address": "/ip4/192.168.1.111/tcp/7513", "name": "p2p"}
2023-06-06T19:34:35.611+0200	WARN	d08df.clock	clock skipped layers	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "clock", "layer": "1698", "last_ticked_layer": "0", "name": "clock"}
2023-06-06T19:34:36.429+0200	INFO	d08df.trtl	candidate layer is verified	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "trtl", "last layer": "1697", "verifier": "verifying", "candidate layer": "1696", "margin": "+1289'2a1f7e6309b4de/56", "uncounted": "-249'94ca290db45f89/56", "total good weight": "+546879'a091f5f2c2c3d5/56", "good uncounted": "+545590'7672778fb90ef7/56", "global threshold": "+346'871c71c71c71c7/56", "blocks": [{"decision": "support", "id": "5aa74a5262", "weight": "+0'00000000000000/56", "height": 0, "data": true}], "name": "trtl"}
2023-06-06T19:34:36.439+0200	INFO	d08df.vm	vm reverted to layer	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "vm", "layer_id": 1696, "name": "vm"}
2023-06-06T19:34:36.439+0200	INFO	d08df.conState	added pending tx for 0 accounts	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "conState"}
2023-06-06T19:34:36.439+0200	INFO	d08df.executor	reverted state	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "executor", "revert_to": "1696", "event": true, "state_hash": "0xfe3fec45aa64a443816d7167ff26e1d1621fbf6deb92d7af041c28b4f865d715", "name": "executor"}
2023-06-06T19:34:36.439+0200	INFO	d08df.mesh	recovered mesh from disk	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "mesh", "latest": "1698", "processed": "1696", "name": "mesh"}
2023-06-06T19:34:36.439+0200	INFO	d08df.sync	starting syncer loop	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "sync"}
2023-06-06T19:34:36.439+0200	INFO	d08df.sync	starting syncer layer processing loop	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "sync"}
2023-06-06T19:34:36.439+0200	INFO	d08df.beacon	starting beacon protocol	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "beacon", "config": "{Kappa:40 Q:1/3 RoundsNumber:200 GracePeriodDuration:10m0s ProposalDuration:4m0s FirstVotingRoundDuration:30m0s VotingRoundDuration:4m0s WeakCoinRoundDuration:4m0s Theta:1/4 VotesLimit:100 BeaconSyncWeightUnits:30}", "name": "beacon"}
2023-06-06T19:34:36.439+0200	INFO	d08df.hare	starting protocol	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "hare", "protocol": "hr1", "name": "hare"}
2023-06-06T19:34:36.439+0200	INFO	00000.defaultLogger	smeshing not started, waiting to be triggered via smesher api
2023-06-06T19:34:36.439+0200	INFO	grpc	[[core] [Server #1] Server created]	{"module": "grpc", "system": "grpc", "grpc_log": true}
2023-06-06T19:34:36.439+0200	INFO	grpc	[[core] [Server #2] Server created]	{"module": "grpc", "system": "grpc", "grpc_log": true}
2023-06-06T19:34:36.439+0200	INFO	00000.defaultLogger	registering GRPC Activation Service
2023-06-06T19:34:36.439+0200	INFO	00000.defaultLogger	starting grpc server	{"address": "0.0.0.0:9099", "services": ["spacemesh.v1.NodeService", "spacemesh.v1.TransactionService", "spacemesh.v1.ActivationService", "spacemesh.v1.DebugService", "spacemesh.v1.GlobalStateService", "spacemesh.v1.MeshService"], "name": ""}
2023-06-06T19:34:36.439+0200	INFO	00000.defaultLogger	starting grpc server	{"address": "127.0.0.1:9093", "services": ["spacemesh.v1.SmesherService", "spacemesh.v1.AdminService"], "name": ""}
2023-06-06T19:34:36.439+0200	INFO	app started
2023-06-06T19:34:36.439+0200	INFO	d08df.fetcher	starting fetch main loop	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "fetcher"}
2023-06-06T19:34:36.439+0200	INFO	d08df.nipostValidator	starting post verifier	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "nipostValidator"}
2023-06-06T19:34:36.439+0200	INFO	d08df.nipostValidator.worker-2	starting post proof verifier worker	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "nipostValidator"}
2023-06-06T19:34:36.439+0200	INFO	d08df.beacon	starting listening layers	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "beacon", "name": "beacon"}
2023-06-06T19:34:36.439+0200	WARN	d08df.hare	missed hare window, skipping layer	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "hare", "protocol": "hr1_tickloop", "sessionId": "b3bb64db-3afe-4b74-9a13-645a15d77203", "layer_id": 1698, "name": "hare"}
2023-06-06T19:34:36.439+0200	INFO	d08df.hare	starting collection loop	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "hare", "protocol": "hr1_outputloop", "sessionId": "fd530427-b648-4145-951f-5110ea8a6b69", "name": "hare"}
2023-06-06T19:34:36.439+0200	INFO	d08df.hare	starting malfeasance loop	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "hare", "protocol": "hr1_malfloop", "sessionId": "bc3a68ef-34f4-4e2e-abde-2516396344ea", "name": "hare"}
2023-06-06T19:34:36.439+0200	INFO	d08df.bootstrap	loaded boostrap file	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "bootstrap", "persisted": "", "epoch": "2", "beacon": "0x6cf65229", "activeset_size": 8, "activeset": ["12896c49a6", "14d6a2f554", "1bd3efcf21", "34d7e61d32", "5e859bad76", "cb265f2cc1", "f44cf694c7", "ff31a08e2f"], "name": "bootstrap"}
2023-06-06T19:34:36.439+0200	INFO	d08df.bootstrap	start listening to update	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "bootstrap", "source": "https://bootstrap.spacemesh.network/testnet-05/spacemesh-update", "interval": "1m0s", "name": "bootstrap"}
2023-06-06T19:34:36.449+0200	INFO	d08df.nipostValidator.worker-0	starting post proof verifier worker	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "nipostValidator"}
2023-06-06T19:34:36.449+0200	INFO	d08df.nipostValidator.worker-1	starting post proof verifier worker	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "nipostValidator"}
2023-06-06T19:34:36.449+0200	INFO	00000.defaultLogger	starting grpc gateway server	{"address": "0.0.0.0:9094", "name": ""}
2023-06-06T19:34:36.449+0200	INFO	00000.defaultLogger	starting new grpc server on 127.0.0.1:9093
2023-06-06T19:34:36.449+0200	INFO	grpc	[[core] [Server #2 ListenSocket #3] ListenSocket created]	{"module": "grpc", "system": "grpc", "grpc_log": true}
2023-06-06T19:34:36.449+0200	INFO	d08df.beacon	using fallback beacon	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "beacon", "epoch_id": 2, "beacon": "6cf65229", "name": "beacon"}
2023-06-06T19:34:36.449+0200	INFO	d08df.hareOracle	received activeset update	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "hareOracle", "epoch_id": 2, "size": 8, "activeset": ["12896c49a6", "14d6a2f554", "1bd3efcf21", "34d7e61d32", "5e859bad76", "cb265f2cc1", "f44cf694c7", "ff31a08e2f"], "name": "hareOracle"}
2023-06-06T19:34:36.449+0200	INFO	00000.defaultLogger	starting new grpc server on 0.0.0.0:9099
2023-06-06T19:34:36.449+0200	INFO	grpc	[[core] [Server #1 ListenSocket #4] ListenSocket created]	{"module": "grpc", "system": "grpc", "grpc_log": true}
2023-06-06T19:34:37.539+0200	INFO	grpc	[[core] CPU time info is unavailable on non-linux environments.]	{"module": "grpc", "system": "grpc", "grpc_log": true}
2023-06-06T19:34:37.548+0200	INFO	00000.defaultLogger	GRPC SmesherService.IsSmeshing
2023-06-06T19:34:37.548+0200	INFO	grpc	finished unary call with code OK	{"module": "grpc", "grpc.start_time": "2023-06-06T19:34:37+02:00", "system": "grpc", "span.kind": "server", "grpc.service": "spacemesh.v1.SmesherService", "grpc.method": "IsSmeshing", "peer.address": "127.0.0.1:51845", "grpc.code": "OK", "grpc.time_ms": 0}
2023-06-06T19:34:37.554+0200	INFO	00000.defaultLogger	GRPC SmesherService.PostSetupStatus
2023-06-06T19:34:37.554+0200	INFO	grpc	finished unary call with code OK	{"module": "grpc", "grpc.start_time": "2023-06-06T19:34:37+02:00", "system": "grpc", "span.kind": "server", "grpc.service": "spacemesh.v1.SmesherService", "grpc.method": "PostSetupStatus", "peer.address": "127.0.0.1:51845", "grpc.code": "OK", "grpc.time_ms": 1.136}
2023-06-06T19:34:39.643+0200	INFO	d08df.p2p	selected new best address	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "p2p", "address": "/ip4/193.239.57.238/tcp/1024", "name": "p2p"}
2023-06-06T19:34:39.643+0200	INFO	d08df.p2p	selected new best address	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "p2p", "address": "/ip4/193.239.57.238/tcp/1024", "name": "p2p"}
2023-06-06T19:34:44.662+0200	INFO	d08df.p2p	selected new best address	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "p2p", "address": "/ip4/193.239.57.238/tcp/29730", "name": "p2p"}
2023-06-06T19:34:44.662+0200	INFO	d08df.p2p	selected new best address	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "p2p", "address": "/ip4/193.239.57.238/tcp/29730", "name": "p2p"}
2023-06-06T19:34:46.445+0200	INFO	d08df.sync	syncing atx from genesis	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "sync", "sessionId": "f99561b4-4e89-49d8-8d56-cbc97e741c95", "layer_id": 1698, "name": "sync"}
2023-06-06T19:34:46.667+0200	INFO	d08df.sync	atxs synced to epoch	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "sync", "sessionId": "f99561b4-4e89-49d8-8d56-cbc97e741c95", "epoch_id": 2, "name": "sync"}
2023-06-06T19:34:46.667+0200	INFO	d08df.sync	syncing malicious proofs	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "sync", "sessionId": "f99561b4-4e89-49d8-8d56-cbc97e741c95", "name": "sync"}
2023-06-06T19:34:46.834+0200	INFO	d08df.sync	malicious IDs synced	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "sync", "sessionId": "f99561b4-4e89-49d8-8d56-cbc97e741c95", "name": "sync"}
2023-06-06T19:34:47.001+0200	INFO	d08df.sync	sync state change	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "sync", "sessionId": "f99561b4-4e89-49d8-8d56-cbc97e741c95", "from_state": "notSynced", "to_state": "gossipSync", "current": "1698", "latest": "1698", "processed": "1696", "name": "sync"}
2023-06-06T19:34:56.651+0200	INFO	d08df.sync	begin fork finding with peer	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "sync", "sessionId": "952bb1c6-8191-4d34-a8f8-5e5f03c8ec6e", "diff_layer": "1695", "diff_hash": "0x8a8ed3a5df0f4631cba6c36996ece705caccdf5b18f775ecfcf95031f49f1aaf", "peer": "12D3KooWE1YEa3roqamhPt3CNiVRBzS7Lbv8HRbByE7fpSyLAZis", "name": "sync"}
2023-06-06T19:34:56.737+0200	INFO	d08df.sync	found hash fork with peer	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "sync", "sessionId": "952bb1c6-8191-4d34-a8f8-5e5f03c8ec6e", "diff_layer": "1695", "diff_hash": "0x8a8ed3a5df0f4631cba6c36996ece705caccdf5b18f775ecfcf95031f49f1aaf", "peer": "12D3KooWE1YEa3roqamhPt3CNiVRBzS7Lbv8HRbByE7fpSyLAZis", "boundary": {"from": 1343, "from_hash": "0x1129903208b020d81f9307f21c38f532d3e695a24833d889b1351871c23367fd", "to": 1349, "to_hash": "0x394ffeeb03c7a2e9bedd56a2bb30cf6bad5337b93be3640ee5a322f6b4508493"}, "num_reqs": 2, "fork": "1345", "fork_hash": "0x14c463ef4b383171209170a76c26006493ff4ba2254cb72685468081979ef61e", "after_fork": "1346", "after_fork_hash": "0x29dece79986e543c47d84338fcfadc2751bfd86e8ebe196164ab0dd606eb8c6f", "name": "sync"}
2023-06-06T19:35:00.614+0200	WARN	d08df.proposalBuilder	failed to build proposal	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "proposalBuilder", "sessionId": "55dc5cc5-4d56-449d-ba7a-165ba2bfb8c0", "layer_id": 1699, "errmsg": "not building proposals: node not synced", "name": "proposalBuilder"}
2023-06-06T19:35:01.116+0200	INFO	d08df.proposalListener	new proposal	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "proposalListener", "requestId": "d7799638-380d-45e9-9f90-ad8d5eeb5c2d", "proposal_id": "1d46ffffe8", "ballot_id": "8b98b6c651", "layer_id": 1699, "num_txs": 0, "name": "proposalListener"}
2023-06-06T19:35:01.116+0200	INFO	d08df.proposalListener	new proposal	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "proposalListener", "requestId": "daa4ad45-d3ce-4ebd-8cba-c12020e484a3", "proposal_id": "cb151095d1", "ballot_id": "e1b352eb93", "layer_id": 1699, "num_txs": 0, "name": "proposalListener"}
2023-06-06T19:35:01.116+0200	INFO	d08df.proposalListener	new ballot	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "proposalListener", "requestId": "d7799638-380d-45e9-9f90-ad8d5eeb5c2d", "proposal_id": "1d46ffffe8", "ballot_id": "8b98b6c651", "layer_id": 1699, "ballot_id": "8b98b6c651", "layer_id": 1699, "epoch_id": 2, "smesher": "650fba31e3006c94a7842dd820330edf1bc82b34e341311de9c78e727c3bc183", "opinion hash": "e66a49829c", "base_ballot": "15a670da9e", "support": 1, "against": 0, "abstain": 0, "atx_id": "12896c49a6", "ref_ballot": "a65c6f21de", "active_set_size": 0, "beacon": "00000000", "votes": {"base": "15a670da9e", "support": [{"id": "1d6d6cec70", "layer": 1698, "height": 0}], "against": [], "abstain": []}, "name": "proposalListener"}
2023-06-06T19:35:01.117+0200	INFO	d08df.proposalListener	new ballot	{"node_id": "d08df19b56428c751760a7459e4f166346ac41a679a9340bdac11e170706cfed", "module": "proposalListener", "requestId": "daa4ad45-d3ce-4ebd-8cba-c12020e484a3", "proposal_id": "cb151095d1", "ballot_id": "e1b352eb93", "layer_id": 1699, "ballot_id": "e1b352eb93", "layer_id": 1699, "epoch_id": 2, "smesher": "d35bf7bc5109ef9fccc57e7f21c2b1c8fd9d24a96cc586c0e3fb5200f88444da", "opinion hash": "e66a49829c", "base_ballot": "c3c0caffa5", "support": 1, "against": 0, "abstain": 0, "atx_id": "cb265f2cc1", "ref_ballot": "4617d04a02", "active_set_size": 0, "beacon": "00000000", "votes": {"base": "c3c0caffa5", "support": [{"id": "1d6d6cec70", "layer": 1698, "height": 0}], "against": [], "abstain": []}, "name": "proposalListener"}

@monikasmolarek
Copy link
Collaborator

image

@maparr maparr marked this pull request as draft June 7, 2023 09:15
@github-actions
Copy link

github-actions bot commented Jun 9, 2023

Compiled Binaries

@github-actions
Copy link

Compiled Binaries

monikasmolarek
monikasmolarek previously approved these changes Jun 13, 2023
@maparr maparr marked this pull request as ready for review June 13, 2023 20:34
@maparr maparr requested a review from brusherru July 3, 2023 11:20
@@ -3,6 +3,6 @@ module.exports = {
preset: 'ts-jest',
runner: '@jest-runner/electron/main',
testEnvironment: 'node',
testRegex: '(/tests/.*|(\\.|/)(test|spec))\\.ts$',
testMatch: ['**/?(*.)+(spec|test).ts'],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update, to be able to run tests locally for a file or just 1 test

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yarn test ./tests/some.spec.ts was working well previously, but this seems working too :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jest nodeConfig - will run 1 file
jest -t 'name of the test' will run only 1 specific test

to simplify the test creation process.

@maparr maparr force-pushed the feat/1019 branch 2 times, most recently from 59f00ff to e1eb10d Compare July 3, 2023 17:47
@github-actions
Copy link

github-actions bot commented Jul 3, 2023

Compiled Binaries

@github-actions
Copy link

github-actions bot commented Jul 3, 2023

Compiled Binaries

@github-actions
Copy link

github-actions bot commented Jul 3, 2023

Compiled Binaries

brusherru
brusherru previously approved these changes Jul 4, 2023
Copy link
Member

@brusherru brusherru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@monikasmolarek
Copy link
Collaborator

Scenario 5 - Switching the Network with POS setup previously :
after I switched to another network and the node tried to restart, I wanted to check the Smeshing screen but got this:
DJ7H2L6JQb

After manual app restart it seems to be ok.
The rest of the scenario ok - switching to the first network corectly showed smeshing opts.

The most important thing - the config behaved correctly even though Smapp wasnt reflecting before the app restart.

One big issue is restrting the node after changng the network - it doesn't want to restart itself, the "Restart" button on the network screen doesnt help- it tries but falls again and shows again the "restart" button. Only manual restart helps. I will try to verify it again and create an issue for that.

In general, all te scenarios are ok👌 (tested on Windows 10). If the above error modal isn't related/big blocker, then I would approve as well.

@monikasmolarek
Copy link
Collaborator

Ok, I checked with the latest release exactly the same steps- after switching the network, the node got up with just 1 click on the "restart node" button on the Network screen.

@github-actions
Copy link

github-actions bot commented Jul 6, 2023

Compiled Binaries

@github-actions
Copy link

github-actions bot commented Jul 6, 2023

Compiled Binaries

@monikasmolarek
Copy link
Collaborator

All the previously mentioned aspects are resolved, however now after the second switch - back to the first network&POS, my smesher screen froze for some time like this - half of the info not updated - directory from testnet-05, 40MiB of pos size from devnet-401.
After some time it refreshed, but I started to worry, it took a bit too long.
nWPDHXLxvj

@monikasmolarek
Copy link
Collaborator

Also, after the network switch, the "Started creating POS data" timestamp on the right remained. It's a topic for a separate issue, itsn't it?
4jWjkUURhy

Copy link
Collaborator

@monikasmolarek monikasmolarek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@brusherru
Copy link
Member

...after switching the network, the node got up with just 1 click on the "restart node" button on the Network screen.

❗ Sounds pretty critical. After switching the network User should not click any "Restart" buttons.
If he needs to — it means something is broken in the standard workflow...

After some time it refreshed, but I started to worry, it took a bit too long.

Yeah... go-spacemesh and his API a bit hanging because of the big batch size on a slow GPU :(
So, let's say it is expected. Probably we will tweak it in the future.

Also, after the network switch, the "Started creating POS data" timestamp on the right remained. It's a topic for a separate issue, itsn't it?

@monikasmolarek please open an issue for it 🙏

p.s.
I didn't test it again and re-read the code yet. Will update later.

@maparr please in case of any further changes — push separate commits to make it easier to review.
You can squash&merge when it is done.

@maparr
Copy link
Contributor Author

maparr commented Jul 7, 2023

all resolved.

 it doesn't want to restart itself, the "Restart" button on the network screen doesnt help- it tries but falls again and shows again the "restart" button. Only manual restart helps. I will try to verify it again and create an issue for that.

only this restart network cannot reproduce

will be testing on Windows Cloud PC

@maparr
Copy link
Contributor Author

maparr commented Jul 10, 2023

Hi @monikasmolarek , did the check on Windows, ( virtual ) , with not the best configuration. As result, yes, I'm getting this issue, but the main point on restart, need to wait for a long time 1 minute at least, for the not-best PC, till the node will start again. My configuration has only a CPU.

But for both tries, the node is starting after switching networks. For Mac m1 max, it is taking 10 secs ( or even 1 ), for CPU Intel or what we have for the cloud, it takes longer. I think we need to create and issue for this case ( for Windows or PC with not perfect configuration) and create maybe some fix after the discussion, like, please wait for, and not show your node is down if it is running. But it definitely not an issue with this PR

also, I think, because of tons of logs, #1283 is related not only macOS , but to Windows first.

issue with timestamps resolved and will be available for review when this PR will be merged - #1326

cc: @brusherru

@@ -459,7 +459,7 @@ const Node = ({ history, location }: Props) => {
<Address
key="smesherCoinbase"
type={AddressType.ACCOUNT}
address={coinbase}
address={coinbase || ''}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because of a fast new flow , we're supporting smeshing from different folders from different configs ( right now each network may have its own smeshing options) , during node restart we're updating and smeshing process and till we're waiting for updates from the node, for 1 ms , we can get new update from the node where the coinbase not updated yet. It is just an issue with the update and react renderer. The user won't see an empty address

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link

Compiled Binaries

@maparr maparr merged commit d000515 into develop Jul 11, 2023
8 checks passed
@maparr maparr deleted the feat/1019 branch July 11, 2023 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow customisation of node config
3 participants