-
Notifications
You must be signed in to change notification settings - Fork 45
DMSGHTTP logserver
The dmsghttp log server is included with the skywire-visor.
As a replacement for the previous whitelisting system, a method was created for setting the reward address per visor in a file (reward.txt
) which is served via dmsghttp from the "local" folder.
A system survey file (node-info.json
) is generated at runtime if the reward address is set. This survey contains system hardware information, for the purpose of verifying hardware requirements.
Transport bandwidth log files in csv format are generated as bandwidth is consumed from any transports, for purposes of verifying bandwidth for eventual bandwidth-based rewards.
The files and folders served by the dmsghttp logserver are contained within the local_path
of the skywire installation.
For package-based linux installations, this path is at /opt/skywire/local
On other operating systems or installation types, refer to the config your visor is using for the location of the local_path
local
├── custom
├── node-info.json
├── reward.txt
└── transport_logs
├── 2023-07-03.csv
├── 2023-07-04.csv
├── 2023-07-05.csv
├── 2023-07-06.csv
├── 2023-07-07.csv
├── 2023-07-08.csv
└── 2023-07-09.csv
The custom
dir is included for filesharing use by the user and is served by default over dmsghttp as well.
This path may be specified (changed) in the visor's config. The default is local/custom
.
Files contained within the custom
path will be served from the root of the dmsghttp logserver without needing to specify /custom/
in the url
Other endpoints include:
/health
/health
returns basic health info, for example
{"build_info":{"version":"v1.3.10","commit":"f747553","date":"2023-06-02T05:49:31Z"},"started_at":"2023-07-04T04:18:04.77263338Z"}
/node-info
/node-info
returns the system survey as a response rather than serving it as a file from disk
Considering that the system survey contains very specific information about the machine which generated it, a field in the visor's config called survey_whitelist
is used to set whitelist-based access to the system survey file and the /node-info
endpoint of the dmsghttp logserver. Previously, the survey was PGP encrypted, but this was removed in v1.3.8 in favor of the whitelist-based authentication for accessing the survey.
The current whitelisted keys for survey access are included at conf.skywire.skycoin.com
Users may add their own keys if desired, but removing any whitelisted key will result in reward disqualification.
It is necessary to collect transport logs unconditionally from both client and server, or both ends of the transport.
Transport logs are generated in csv format
below is an example
tp_id,recv,sent,time_stamp
32c6b43a-1ea8-0650-835f-4ffb24916bd8,710,3250,2022-10-10T18:52:09.950031713Z
Setting the reward address for a visor can be accomplished with:
sudo skywire-cli reward <skycoin-address>
the file is written to the local_path
specified in the visor's config, which is /opt/skywire/local/reward.txt
for package-based linux installations
the file should only contain a single valid skycoin address and no extra lines or characters
the setting can be verified with
skywire-cli reward -r
or
skywire-cli reward --help
In the instance that a reward address is set as specified above
the system survey is created automatically on visor startup
the file is written to /opt/skywire/local/system.json
an example of this file
{
"public_key": "035d99d82196585df66dd416acde8fabe028903053945395c277c082932f630d6e",
"skycoin_address": "2WRY5PazXYNviUJnhKsciNS8YWgKa1th8hF",
"go_os": "linux",
"go_arch": "amd64",
"zcalusic_sysinfo": {
"sysinfo": {
"version": "0.9.5",
"timestamp": "2022-10-31T12:26:54.043881977-05:00"
},
"node": {
"hostname": "mainframe",
"machineid": "42830379b8ff476696287310f5a62b25",
"timezone": "America/Chicago"
},
"os": {
"name": "EndeavourOS",
"vendor": "endeavouros",
"architecture": "amd64"
},
"kernel": {
"release": "6.0.2-arch1-1",
"version": "#1 SMP PREEMPT_DYNAMIC Sat, 15 Oct 2022 14:00:49 +0000",
"architecture": "x86_64"
},
"product": {
"name": "System Product Name",
"vendor": "System manufacturer",
"version": "System Version",
"serial": "System Serial Number"
},
"board": {
"name": "P8Z77-V LK",
"vendor": "ASUSTeK COMPUTER INC.",
"version": "Rev X.0x",
"serial": "130106735703073",
"assettag": "To be filled by O.E.M."
},
"chassis": {
"type": 3,
"vendor": "Chassis Manufacture",
"version": "Chassis Version",
"serial": "Chassis Serial Number",
"assettag": "Asset-1234567890"
},
"bios": {
"vendor": "American Megatrends Inc.",
"version": "1402",
"date": "03/21/2014"
},
"cpu": {
"vendor": "GenuineIntel",
"model": "Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz",
"speed": 3511,
"cache": 8192,
"cpus": 1,
"cores": 4,
"threads": 8
},
"memory": {
"type": "DDR3",
"speed": 1333,
"size": 32768
},
"storage": [
{
"name": "nvme0n1",
"model": "SPCC M.2 PCIe SSD",
"serial": "2A1407950FDE00144440",
"size": 512
},
{
"name": "sda",
"driver": "sd",
"vendor": "ATA",
"model": "JAJS600M128C",
"serial": "30040655310",
"size": 128
},
{
"name": "sdb",
"driver": "sd",
"vendor": "ATA",
"model": "WDC WD10EURX-61U",
"serial": "WD-WCC4J1FTPZKE",
"size": 1000
},
{
"name": "sdc",
"driver": "sd",
"vendor": "ATA",
"model": "SanDisk SDSSDA12",
"serial": "174470463509",
"size": 120
},
{
"name": "sdd",
"driver": "sd",
"vendor": "ATA",
"model": "WDC WD20EVDS-63T",
"serial": "WD-WCAVY3707401",
"size": 2000
},
{
"name": "sde",
"driver": "sd",
"vendor": "Generic",
"model": "STORAGE DEVICE",
"serial": "000000001532"
}
],
"network": [
{
"name": "enp3s0",
"driver": "r8169",
"macaddress": "60:a4:4c:5e:97:68",
"port": "tp/mii",
"speed": 1000
}
]
},
"ip.skycoin.com": {
"ip_address": "70.121.6.231",
"latitude": 33.1371,
"longitude": -96.7488,
"postal_code": "75035",
"continent_code": "NA",
"country_code": "US",
"country_name": "United States",
"region_code": "TX",
"region_name": "Texas",
"province_code": "",
"province_name": "",
"city_name": "Frisco",
"timezone": "America/Chicago"
},
"ip_addr": [
{
"ifindex": 1,
"ifname": "lo",
"flags": [
"LOOPBACK",
"UP",
"LOWER_UP"
],
"mtu": 65536,
"qdisc": "noqueue",
"operstate": "UNKNOWN",
"group": "default",
"txqlen": 1000,
"link_type": "loopback",
"address": "00:00:00:00:00:00",
"broadcast": "00:00:00:00:00:00",
"addr_info": [
{
"family": "inet",
"local": "127.0.0.1",
"prefixlen": 8,
"scope": "host",
"label": "lo",
"valid_life_time": 4294967295,
"preferred_life_time": 4294967295
},
{
"family": "inet6",
"local": "::1",
"prefixlen": 128,
"scope": "host",
"valid_life_time": 4294967295,
"preferred_life_time": 4294967295
}
]
},
{
"ifindex": 2,
"ifname": "enp3s0",
"flags": [
"BROADCAST",
"MULTICAST",
"UP",
"LOWER_UP"
],
"mtu": 1500,
"qdisc": "fq_codel",
"operstate": "UP",
"group": "default",
"txqlen": 1000,
"link_type": "ether",
"address": "60:a4:4c:5e:97:68",
"broadcast": "ff:ff:ff:ff:ff:ff",
"addr_info": [
{
"family": "inet",
"local": "192.168.2.130",
"prefixlen": 24,
"scope": "global",
"label": "enp3s0",
"valid_life_time": 64745,
"preferred_life_time": 64745
},
{
"family": "inet6",
"local": "fe80::a1b:9c1b:5864:f12b",
"prefixlen": 64,
"scope": "link",
"valid_life_time": 4294967295,
"preferred_life_time": 4294967295
}
]
}
],
"ghw_blockinfo": {
"total_size_bytes": 3760783810560,
"disks": [
{
"name": "nvme0n1",
"size_bytes": 512110190592,
"physical_block_size_bytes": 512,
"drive_type": "ssd",
"removable": false,
"storage_controller": "nvme",
"bus_path": "pci-0000:01:00.0-nvme-1",
"vendor": "unknown",
"model": "SPCC M.2 PCIe SSD",
"serial_number": "2A1407950FDE00144440",
"wwn": "nvme.1987-3241313430373935304644453030313434343430-53504343204d2e32205043496520535344-00000001",
"partitions": [
{
"name": "nvme0n1p1",
"label": "unknown",
"mount_point": "/mnt/nvme0n1p1",
"size_bytes": 512104884224,
"type": "ext4",
"read_only": false,
"uuid": "06f46744-01"
}
]
},
{
"name": "sda",
"size_bytes": 128035676160,
"physical_block_size_bytes": 512,
"drive_type": "ssd",
"removable": false,
"storage_controller": "scsi",
"bus_path": "pci-0000:00:1f.2-ata-1.0",
"vendor": "ATA",
"model": "JAJS600M128C",
"serial_number": "30040655310",
"wwn": "0x5000000000002e39",
"partitions": [
{
"name": "sda1",
"label": "unknown",
"mount_point": "/",
"size_bytes": 128033659904,
"type": "ext4",
"read_only": false,
"uuid": "72295fef-01"
}
]
},
{
"name": "sdb",
"size_bytes": 1000204886016,
"physical_block_size_bytes": 4096,
"drive_type": "hdd",
"removable": false,
"storage_controller": "scsi",
"bus_path": "pci-0000:00:1f.2-ata-2.0",
"vendor": "ATA",
"model": "WDC_WD10EURX-61UY4Y0",
"serial_number": "WD-WCC4J1FTPZKE",
"wwn": "0x50014ee262644326",
"partitions": []
},
{
"name": "sdc",
"size_bytes": 120034123776,
"physical_block_size_bytes": 512,
"drive_type": "ssd",
"removable": false,
"storage_controller": "scsi",
"bus_path": "pci-0000:00:1f.2-ata-3.0",
"vendor": "ATA",
"model": "SanDisk_SDSSDA120G",
"serial_number": "174470463509",
"wwn": "0x5001b444a9bb77cd",
"partitions": [
{
"name": "sdc1",
"label": "unknown",
"mount_point": "/boot1",
"size_bytes": 536870912,
"type": "ext4",
"read_only": false,
"uuid": "570655b4-01"
},
{
"name": "sdc2",
"label": "files",
"mount_point": "/home1",
"size_bytes": 119495720960,
"type": "ext4",
"read_only": false,
"uuid": "570655b4-02"
}
]
},
{
"name": "sdd",
"size_bytes": 2000398934016,
"physical_block_size_bytes": 512,
"drive_type": "hdd",
"removable": false,
"storage_controller": "scsi",
"bus_path": "pci-0000:00:1f.2-ata-5.0",
"vendor": "ATA",
"model": "WDC_WD20EVDS-63T3B0",
"serial_number": "WD-WCAVY3707401",
"wwn": "0x50014ee20473d45a",
"partitions": []
},
{
"name": "sde",
"size_bytes": 0,
"physical_block_size_bytes": 512,
"drive_type": "hdd",
"removable": true,
"storage_controller": "scsi",
"bus_path": "pci-0000:00:14.0-usb-0:4:1.0-scsi-0:0:0:0",
"vendor": "Generic",
"model": "STORAGE_DEVICE",
"serial_number": "000000001532",
"wwn": "unknown",
"partitions": []
}
]
},
"ghw_productinfo": {
"family": "To be filled by O.E.M.",
"name": "System Product Name",
"vendor": "System manufacturer",
"serial_number": "System Serial Number",
"uuid": "306d1ca0-d7da-11dd-b04f-60a44c5e9768",
"sku": "SKU",
"version": "System Version"
},
"ghw_memoryinfo": {
"total_physical_bytes": 34091302912,
"total_usable_bytes": 33333567488,
"supported_page_sizes": [
2097152
],
"modules": null
},
"uuid": "688b353e-8ed2-42dd-8a54-524a348b4fe3"
}
please contact support via telegram @skywire
for rewards and technical support