@gabrielhicks/solv 5.6.14 → 5.6.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,27 @@
1
+ # Setup, install, configure chrony file
2
+ ```
3
+ sudo systemctl stop systemd-timesyncd
4
+ sudo systemctl disable systemd-timesyncd
5
+ sudo apt update
6
+ sudo apt install chrony -y
7
+ sudo systemctl enable chrony
8
+ sudo systemctl start chrony
9
+ sudo rm /etc/chrony/chrony.conf
10
+ sudo touch /etc/chrony/chrony.conf
11
+ sudo vim /etc/chrony/chrony.conf
12
+ ```
13
+
14
+ # Use configuration based on cluster and physical location
15
+ Located in mainnet and testnet directories
16
+
17
+ # After creating/editing chrony.conf, apply following commands
18
+ ```
19
+ sudo systemctl restart chrony
20
+ chronyc sources -v
21
+ chronyc tracking
22
+ chronyc sourcestats -v
23
+ sudo sed -i 's/^\(\s*search:\)/#\1/g' /etc/netplan/50-cloud-init.yaml
24
+ sudo sed -i 's/^\(\s*.*maas.*\)/#\1/g' /etc/netplan/50-cloud-init.yaml
25
+ sudo netplan apply
26
+ sudo cat /etc/netplan/50-cloud-init.yaml
27
+ ```
@@ -0,0 +1,40 @@
1
+ confdir /etc/chrony/conf.d
2
+
3
+ # Preferred NTP server (Jito Amsterdam)
4
+ server ntp.amsterdam.jito.wtf iburst prefer
5
+
6
+ # Local Netherlands pool servers
7
+ server 0.nl.pool.ntp.org iburst maxsources 4
8
+ server 1.nl.pool.ntp.org iburst maxsources 2
9
+ server 2.nl.pool.ntp.org iburst maxsources 2
10
+ server 3.nl.pool.ntp.org iburst maxsources 2
11
+
12
+ # Global backup servers
13
+ server time.google.com iburst
14
+ server time.cloudflare.com iburst
15
+ server ntp.ubuntu.com iburst
16
+ server pool.ntp.org iburst
17
+
18
+ # DHCP-provided sources (if any)
19
+ sourcedir /run/chrony-dhcp
20
+ # Additional static sources
21
+ sourcedir /etc/chrony/sources.d
22
+
23
+ # Security keys
24
+ keyfile /etc/chrony/chrony.keys
25
+
26
+ # Drift & dump files
27
+ driftfile /var/lib/chrony/chrony.drift
28
+ ntsdumpdir /var/lib/chrony
29
+
30
+ # Logging
31
+ log tracking measurements statistics
32
+ logdir /var/log/chrony
33
+
34
+ # Misc. tuning
35
+ maxupdateskew 100.0
36
+ rtcsync
37
+ makestep 1 3
38
+
39
+ # Use leap-second data from tzdata
40
+ leapsectz right/UTC
@@ -0,0 +1,38 @@
1
+ confdir /etc/chrony/conf.d
2
+
3
+ # Preferred NTP server
4
+ server ntp.dallas.jito.wtf iburst prefer
5
+
6
+ # Other Local NTP servers
7
+ server 0.br.pool.ntp.org iburst maxsources 4
8
+ server 1.br.pool.ntp.org iburst maxsources 2
9
+ server 2.br.pool.ntp.org iburst maxsources 2
10
+ server 3.br.pool.ntp.org iburst maxsources 2
11
+
12
+ # Backup servers
13
+ server time.google.com iburst
14
+ server time.cloudflare.com iburst
15
+ server ntp.ubuntu.com iburst
16
+ server pool.ntp.org iburst
17
+
18
+ sourcedir /run/chrony-dhcp
19
+
20
+ sourcedir /etc/chrony/sources.d
21
+
22
+ keyfile /etc/chrony/chrony.keys
23
+
24
+ driftfile /var/lib/chrony/chrony.drift
25
+
26
+ ntsdumpdir /var/lib/chrony
27
+
28
+ log tracking measurements statistics
29
+
30
+ logdir /var/log/chrony
31
+
32
+ maxupdateskew 100.0
33
+
34
+ rtcsync
35
+
36
+ makestep 1 3
37
+
38
+ leapsectz right/UTC
@@ -0,0 +1,35 @@
1
+ confdir /etc/chrony/conf.d
2
+
3
+ # Preferred NTP server (Dublin/Ireland-based)
4
+ server ntp.dublin.jito.wtf iburst prefer
5
+
6
+ # Local NTP servers (Ireland Pool)
7
+ server 0.ie.pool.ntp.org iburst maxsources 4
8
+ server 1.ie.pool.ntp.org iburst maxsources 2
9
+ server 2.ie.pool.ntp.org iburst maxsources 2
10
+ server 3.ie.pool.ntp.org iburst maxsources 2
11
+
12
+ # Regional fallback (Europe)
13
+ server 0.europe.pool.ntp.org iburst
14
+ server 1.europe.pool.ntp.org iburst
15
+
16
+ # Backup global servers
17
+ server time.google.com iburst
18
+ server time.cloudflare.com iburst
19
+ server ntp.ubuntu.com iburst
20
+ server pool.ntp.org iburst
21
+
22
+ sourcedir /run/chrony-dhcp
23
+ sourcedir /etc/chrony/sources.d
24
+
25
+ keyfile /etc/chrony/chrony.keys
26
+ driftfile /var/lib/chrony/chrony.drift
27
+ ntsdumpdir /var/lib/chrony
28
+
29
+ log tracking measurements statistics
30
+ logdir /var/log/chrony
31
+
32
+ maxupdateskew 100.0
33
+ rtcsync
34
+ makestep 1 3
35
+ leapsectz right/UTC
@@ -0,0 +1,38 @@
1
+ confdir /etc/chrony/conf.d
2
+
3
+ # Preferred NTP server
4
+ server ntp.frankfurt.jito.wtf iburst prefer
5
+
6
+ # Other Local NTP servers
7
+ server 0.de.pool.ntp.org iburst maxsources 4
8
+ server 1.de.pool.ntp.org iburst maxsources 2
9
+ server 2.de.pool.ntp.org iburst maxsources 2
10
+ server 3.de.pool.ntp.org iburst maxsources 2
11
+
12
+ # Backup servers
13
+ server time.google.com iburst
14
+ server time.cloudflare.com iburst
15
+ server ntp.ubuntu.com iburst
16
+ server pool.ntp.org iburst
17
+
18
+ sourcedir /run/chrony-dhcp
19
+
20
+ sourcedir /etc/chrony/sources.d
21
+
22
+ keyfile /etc/chrony/chrony.keys
23
+
24
+ driftfile /var/lib/chrony/chrony.drift
25
+
26
+ ntsdumpdir /var/lib/chrony
27
+
28
+ log tracking measurements statistics
29
+
30
+ logdir /var/log/chrony
31
+
32
+ maxupdateskew 100.0
33
+
34
+ rtcsync
35
+
36
+ makestep 1 3
37
+
38
+ leapsectz right/UTC
@@ -0,0 +1,38 @@
1
+ confdir /etc/chrony/conf.d
2
+
3
+ # Preferred NTP server
4
+ server ntp.london.jito.wtf iburst prefer
5
+
6
+ # Other Local NTP servers
7
+ server 0.uk.pool.ntp.org iburst maxsources 4
8
+ server 1.uk.pool.ntp.org iburst maxsources 2
9
+ server 2.uk.pool.ntp.org iburst maxsources 2
10
+ server 3.uk.pool.ntp.org iburst maxsources 2
11
+
12
+ # Backup servers
13
+ server time.google.com iburst
14
+ server time.cloudflare.com iburst
15
+ server ntp.ubuntu.com iburst
16
+ server pool.ntp.org iburst
17
+
18
+ sourcedir /run/chrony-dhcp
19
+
20
+ sourcedir /etc/chrony/sources.d
21
+
22
+ keyfile /etc/chrony/chrony.keys
23
+
24
+ driftfile /var/lib/chrony/chrony.drift
25
+
26
+ ntsdumpdir /var/lib/chrony
27
+
28
+ log tracking measurements statistics
29
+
30
+ logdir /var/log/chrony
31
+
32
+ maxupdateskew 100.0
33
+
34
+ rtcsync
35
+
36
+ makestep 1 3
37
+
38
+ leapsectz right/UTC
@@ -0,0 +1,42 @@
1
+ confdir /etc/chrony/conf.d
2
+
3
+ # Preferred NTP server
4
+ server ntp.slc.jito.wtf iburst prefer
5
+
6
+ # Other Local NTP servers
7
+ server 0.us.pool.ntp.org iburst maxsources 4
8
+ server 1.us.pool.ntp.org iburst maxsources 2
9
+ server 2.us.pool.ntp.org iburst maxsources 2
10
+ server 3.us.pool.ntp.org iburst maxsources 2
11
+
12
+ # Backup servers
13
+ server time.nist.gov iburst
14
+ server time-a-g.nist.gov iburst
15
+ server time-b-g.nist.gov iburst
16
+
17
+ server time.google.com iburst
18
+ server time.cloudflare.com iburst
19
+ server ntp.ubuntu.com iburst
20
+ server pool.ntp.org iburst
21
+
22
+ sourcedir /run/chrony-dhcp
23
+
24
+ sourcedir /etc/chrony/sources.d
25
+
26
+ keyfile /etc/chrony/chrony.keys
27
+
28
+ driftfile /var/lib/chrony/chrony.drift
29
+
30
+ ntsdumpdir /var/lib/chrony
31
+
32
+ log tracking measurements statistics
33
+
34
+ logdir /var/log/chrony
35
+
36
+ maxupdateskew 100.0
37
+
38
+ rtcsync
39
+
40
+ makestep 1 3
41
+
42
+ leapsectz right/UTC
@@ -0,0 +1,42 @@
1
+ confdir /etc/chrony/conf.d
2
+
3
+ # Preferred NTP server
4
+ server ntp.dallas.jito.wtf iburst prefer
5
+
6
+ # Other Local NTP servers
7
+ server 0.us.pool.ntp.org iburst maxsources 4
8
+ server 1.us.pool.ntp.org iburst maxsources 2
9
+ server 2.us.pool.ntp.org iburst maxsources 2
10
+ server 3.us.pool.ntp.org iburst maxsources 2
11
+
12
+ # Backup servers
13
+ server time.nist.gov iburst
14
+ server time-a-g.nist.gov iburst
15
+ server time-b-g.nist.gov iburst
16
+
17
+ server time.google.com iburst
18
+ server time.cloudflare.com iburst
19
+ server ntp.ubuntu.com iburst
20
+ server pool.ntp.org iburst
21
+
22
+ sourcedir /run/chrony-dhcp
23
+
24
+ sourcedir /etc/chrony/sources.d
25
+
26
+ keyfile /etc/chrony/chrony.keys
27
+
28
+ driftfile /var/lib/chrony/chrony.drift
29
+
30
+ ntsdumpdir /var/lib/chrony
31
+
32
+ log tracking measurements statistics
33
+
34
+ logdir /var/log/chrony
35
+
36
+ maxupdateskew 100.0
37
+
38
+ rtcsync
39
+
40
+ makestep 1 3
41
+
42
+ leapsectz right/UTC
@@ -0,0 +1,42 @@
1
+ confdir /etc/chrony/conf.d
2
+
3
+ # Preferred NTP server
4
+ server ntp.slc.jito.wtf iburst prefer
5
+
6
+ # Other Local NTP servers
7
+ server 0.us.pool.ntp.org iburst maxsources 4
8
+ server 1.us.pool.ntp.org iburst maxsources 2
9
+ server 2.us.pool.ntp.org iburst maxsources 2
10
+ server 3.us.pool.ntp.org iburst maxsources 2
11
+
12
+ # Backup servers
13
+ server time.nist.gov iburst
14
+ server time-a-g.nist.gov iburst
15
+ server time-b-g.nist.gov iburst
16
+
17
+ server time.google.com iburst
18
+ server time.cloudflare.com iburst
19
+ server ntp.ubuntu.com iburst
20
+ server pool.ntp.org iburst
21
+
22
+ sourcedir /run/chrony-dhcp
23
+
24
+ sourcedir /etc/chrony/sources.d
25
+
26
+ keyfile /etc/chrony/chrony.keys
27
+
28
+ driftfile /var/lib/chrony/chrony.drift
29
+
30
+ ntsdumpdir /var/lib/chrony
31
+
32
+ log tracking measurements statistics
33
+
34
+ logdir /var/log/chrony
35
+
36
+ maxupdateskew 100.0
37
+
38
+ rtcsync
39
+
40
+ makestep 1 3
41
+
42
+ leapsectz right/UTC
@@ -0,0 +1,42 @@
1
+ confdir /etc/chrony/conf.d
2
+
3
+ # Preferred NTP server (Singapore-based or close regional)
4
+ server ntp.singapore.jito.wtf iburst prefer
5
+
6
+ # Other Local NTP servers (Singapore/Asia Pool)
7
+ server 0.sg.pool.ntp.org iburst maxsources 4
8
+ server 1.sg.pool.ntp.org iburst maxsources 2
9
+ server 2.sg.pool.ntp.org iburst maxsources 2
10
+ server 3.sg.pool.ntp.org iburst maxsources 2
11
+
12
+ # Regional fallback (Asia)
13
+ server 0.asia.pool.ntp.org iburst
14
+ server 1.asia.pool.ntp.org iburst
15
+
16
+ # Backup global servers
17
+ server time.google.com iburst
18
+ server time.cloudflare.com iburst
19
+ server ntp.ubuntu.com iburst
20
+ server pool.ntp.org iburst
21
+
22
+ sourcedir /run/chrony-dhcp
23
+
24
+ sourcedir /etc/chrony/sources.d
25
+
26
+ keyfile /etc/chrony/chrony.keys
27
+
28
+ driftfile /var/lib/chrony/chrony.drift
29
+
30
+ ntsdumpdir /var/lib/chrony
31
+
32
+ log tracking measurements statistics
33
+
34
+ logdir /var/log/chrony
35
+
36
+ maxupdateskew 100.0
37
+
38
+ rtcsync
39
+
40
+ makestep 1 3
41
+
42
+ leapsectz right/UTC
@@ -0,0 +1,38 @@
1
+ confdir /etc/chrony/conf.d
2
+
3
+ # Preferred NTP server
4
+ server ntp.london.jito.wtf iburst prefer
5
+
6
+ # Other Local NTP servers
7
+ server 0.za.pool.ntp.org iburst maxsources 4
8
+ server 1.za.pool.ntp.org iburst maxsources 2
9
+ server 2.za.pool.ntp.org iburst maxsources 2
10
+ server 3.za.pool.ntp.org iburst maxsources 2
11
+
12
+ # Backup servers
13
+ server time.google.com iburst
14
+ server time.cloudflare.com iburst
15
+ server ntp.ubuntu.com iburst
16
+ server pool.ntp.org iburst
17
+
18
+ sourcedir /run/chrony-dhcp
19
+
20
+ sourcedir /etc/chrony/sources.d
21
+
22
+ keyfile /etc/chrony/chrony.keys
23
+
24
+ driftfile /var/lib/chrony/chrony.drift
25
+
26
+ ntsdumpdir /var/lib/chrony
27
+
28
+ log tracking measurements statistics
29
+
30
+ logdir /var/log/chrony
31
+
32
+ maxupdateskew 100.0
33
+
34
+ rtcsync
35
+
36
+ makestep 1 3
37
+
38
+ leapsectz right/UTC
@@ -0,0 +1,42 @@
1
+ confdir /etc/chrony/conf.d
2
+
3
+ # Preferred NTP server (Tokyo/Japan-based or close regional)
4
+ server ntp.tokyo.jito.wtf iburst prefer
5
+
6
+ # Local NTP servers (Japan Pool)
7
+ server 0.jp.pool.ntp.org iburst maxsources 4
8
+ server 1.jp.pool.ntp.org iburst maxsources 2
9
+ server 2.jp.pool.ntp.org iburst maxsources 2
10
+ server 3.jp.pool.ntp.org iburst maxsources 2
11
+
12
+ # Regional fallback (Asia)
13
+ server 0.asia.pool.ntp.org iburst
14
+ server 1.asia.pool.ntp.org iburst
15
+
16
+ # Backup global servers
17
+ server time.google.com iburst
18
+ server time.cloudflare.com iburst
19
+ server ntp.ubuntu.com iburst
20
+ server pool.ntp.org iburst
21
+
22
+ sourcedir /run/chrony-dhcp
23
+
24
+ sourcedir /etc/chrony/sources.d
25
+
26
+ keyfile /etc/chrony/chrony.keys
27
+
28
+ driftfile /var/lib/chrony/chrony.drift
29
+
30
+ ntsdumpdir /var/lib/chrony
31
+
32
+ log tracking measurements statistics
33
+
34
+ logdir /var/log/chrony
35
+
36
+ maxupdateskew 100.0
37
+
38
+ rtcsync
39
+
40
+ makestep 1 3
41
+
42
+ leapsectz right/UTC
@@ -0,0 +1,42 @@
1
+ confdir /etc/chrony/conf.d
2
+
3
+ # Preferred NTP server
4
+ server ntp.dallas.jito.wtf iburst prefer
5
+
6
+ # Other Local NTP servers
7
+ server 0.us.pool.ntp.org iburst maxsources 4
8
+ server 1.us.pool.ntp.org iburst maxsources 2
9
+ server 2.us.pool.ntp.org iburst maxsources 2
10
+ server 3.us.pool.ntp.org iburst maxsources 2
11
+
12
+ # Backup servers
13
+ server time.nist.gov iburst
14
+ server time-a-g.nist.gov iburst
15
+ server time-b-g.nist.gov iburst
16
+
17
+ server time.google.com iburst
18
+ server time.cloudflare.com iburst
19
+ server ntp.ubuntu.com iburst
20
+ server pool.ntp.org iburst
21
+
22
+ sourcedir /run/chrony-dhcp
23
+
24
+ sourcedir /etc/chrony/sources.d
25
+
26
+ keyfile /etc/chrony/chrony.keys
27
+
28
+ driftfile /var/lib/chrony/chrony.drift
29
+
30
+ ntsdumpdir /var/lib/chrony
31
+
32
+ log tracking measurements statistics
33
+
34
+ logdir /var/log/chrony
35
+
36
+ maxupdateskew 100.0
37
+
38
+ rtcsync
39
+
40
+ makestep 1 3
41
+
42
+ leapsectz right/UTC
@@ -4,13 +4,40 @@ from common import debug
4
4
  from request_utils import execute_cmd_str, smart_rpc_call, rpc_call
5
5
 
6
6
 
7
+ def _find_solana_keygen() -> str:
8
+ """Find the solana-keygen binary, trying common locations"""
9
+ import shutil
10
+ import os
11
+
12
+ # Try to find in PATH first
13
+ keygen_path = shutil.which('solana-keygen')
14
+ if keygen_path:
15
+ return keygen_path
16
+
17
+ # Try common installation paths
18
+ common_paths = [
19
+ '/home/solana/.local/share/solana/install/active_release/bin/solana-keygen',
20
+ '/home/solv/.local/share/solana/install/active_release/bin/solana-keygen',
21
+ '/usr/local/bin/solana-keygen',
22
+ '/opt/solana/bin/solana-keygen',
23
+ ]
24
+
25
+ for path in common_paths:
26
+ if os.path.exists(path):
27
+ return path
28
+
29
+ # Fallback to just 'solana-keygen' and hope it's in PATH
30
+ return 'solana-keygen'
31
+
32
+
7
33
  def load_identity_account_pubkey(config: ValidatorConfig) -> Optional[str]:
8
34
  """
9
35
  loads validator identity account pubkey
10
36
  :param config: Validator Configuration
11
37
  :return: returns validator identity pubkey or None
12
38
  """
13
- identity_cmd = f'solana-keygen pubkey ' + config.secrets_path + '/validator-keypair.json'
39
+ keygen_bin = _find_solana_keygen()
40
+ identity_cmd = f'{keygen_bin} pubkey ' + config.secrets_path + '/validator-keypair.json'
14
41
  debug(config, identity_cmd)
15
42
  result = execute_cmd_str(config, identity_cmd, convert_to_json=False)
16
43
  # Strip whitespace and return None if empty
@@ -25,7 +52,8 @@ def load_vote_account_pubkey(config: ValidatorConfig) -> Optional[str]:
25
52
  :param config: Validator Configuration
26
53
  :return: returns vote account pubkey or None
27
54
  """
28
- vote_pubkey_cmd = f'solana-keygen pubkey ' + config.secrets_path + '/vote-account-keypair.json'
55
+ keygen_bin = _find_solana_keygen()
56
+ vote_pubkey_cmd = f'{keygen_bin} pubkey ' + config.secrets_path + '/vote-account-keypair.json'
29
57
  debug(config, vote_pubkey_cmd)
30
58
  result = execute_cmd_str(config, vote_pubkey_cmd, convert_to_json=False)
31
59
  # Strip whitespace and return None if empty