You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SeedSigner roughly follows a Model-View-Controller approach. Like in a typical web app (e.g. Flask) the `View`s can be called as needed like individual web urls. After completing display and interaction with the user, the `View` then decides where to route the user next, analogous to a web app returning a `response.redirect(url)`.
4
-
5
-
The `Controller` then ends up being quite stripped down. For example, there's no need for a web app's `urls.py` since there are no mappings from url to `View` to maintain since we're not actually using a url/http routing approach.
6
-
7
-
`View`s have to handle user interaction so there are `while True` loops that cycle between waiting for user input, gathering data, and then updating the UI components accordingly. You wouldn't find this kind of cycle in a web app because this sort of interactive user input is handled in the browser at the html/css/js level.
3
+
SeedSigner roughly follows a Model-View-Controller approach. Like in a typical web app (e.g. Flask), the `View`s can be called as needed like individual web URLs. After completing display and interaction with the user, the `View` then decides where to route the user next, analogous to a web app returning a `response.redirect(URL)`.
8
4
5
+
The `Controller` then ends up being quite stripped down. For example, there's no need for a web app's `urls.py` since there are no mappings from URL to `View` to maintain since we're not actually using a URL/HTTP routing approach.
9
6
7
+
`View`s have to handle user interaction, so there are `while True` loops that cycle between waiting for user input, gathering data, and then updating the UI components accordingly. You wouldn't find this kind of cycle in a web app because this sort of interactive user input is handled in the browser at the HTML/CSS/JS level.
10
8
11
9
*`Model`s: Store the persistent settings, the in-memory seeds, current wallet information, etc.
12
10
*`Controller`: Manages the state of the world and controls access to global resources.
13
11
*`View`s: Implementation of each screen. Prepares relevant data for display. Must also instantiate the display objects that will actually render the UI.
14
-
*`gui.screens`: Re-usable formatted UI renderers.
12
+
*`gui.screens`: Reusable formatted UI renderers.
15
13
*`gui.components`: Basic individual UI elements that are used by the `templates` such as the top nav, buttons, button lists, text displays.
16
14
17
-
In an typical webserver context the `View` would send data to an html template (e.g. Jinja) which would then dynamically populate the page with html elements like `<input>`, `<button>`, `<img>`, etc. This is analgous to our `gui.screens` constructing a UI renderer by piecing together various `gui.components` as needed.
18
-
19
-
15
+
In a typical web server context, the `View` would send data to an HTML template (e.g. Jinja) which would then dynamically populate the page with HTML elements like `<input>`, `<button>`, `<img>`, etc. This is analogous to our `gui.screens` constructing a UI renderer by piecing together various `gui.components` as needed.
20
16
21
17
`Controller` is a global singleton that any `View` can access and update as needed.
## Debugging a Crash for advanced (technical) users
1
+
## Debugging a Crash for Advanced (Technical) Users
2
2
3
3
These instructions are intended to help users of SeedSigner provide crash exception and traceback logs to developers to aid in troubleshooting and resolving bugs.
4
4
5
5
### Testnet vs Mainnet
6
6
7
-
Whenever possible recreate a crash in testnet. This will help avoid accidently revealing private information about yourself, your bitcoin transactions, or lose any funds.
7
+
Whenever possible, recreate a crash in testnet. This will help avoid accidentally revealing private information about yourself, your Bitcoin transactions, or losing any funds.
8
8
9
-
### Network connected SeedSigner
9
+
### Network-Connected SeedSigner
10
10
11
-
If you are using SeedSigner for development and testing, then I recommend network access via ssh to view crash logs. Follow [these](https://github.com/SeedSigner/seedsigner/blob/main/docs/usb_relay.md) instructions to setup a USB relay for internet access. You can also connect your SeedSigner to Wifi if you have a rasp pi zero w/ wifi.
11
+
If you are using SeedSigner for development and testing, then we recommend network access via SSH to view crash logs. Follow [these](https://github.com/SeedSigner/seedsigner/blob/main/docs/usb_relay.md) instructions to set up a USB relay for internet access. You can also connect your SeedSigner to WiFi if you have a Raspberry Pi Zero W with WiFi.
12
12
13
-
### Airgapped debugging setup
13
+
### Airgapped Debugging Setup
14
14
15
-
If you are using SeedSigner for mainnet transactions, then do not connect your device to a network or the internet. Instead connect your SeedSigner to a HDMI display (without internet) and a USB keyboard. This will require an HDMI adapter and micro USB to USB A adapter. Plug in the HDMI display and keyboard before powering on SeedSigner. The password for the SeedSigner pi user is `raspberry`.
15
+
If you are using SeedSigner for mainnet transactions, then do not connect your device to a network or the internet. Instead, connect your SeedSigner to an HDMI display (without internet) and a USB keyboard. This will require an HDMI adapter and a micro USB to USB A adapter. Plug in the HDMI display and keyboard before powering on SeedSigner. The password for the SeedSigner pi user is `raspberry`.
16
16
17
-
### Debugging steps
17
+
### Debugging Steps
18
18
19
-
At this point you should be signed into the pi user either on a HDMI display (via command line) or a ssh connection.
19
+
At this point, you should be signed into the pi user either on an HDMI display (via command line) or an SSH connection.
20
20
21
-
Follow these steps to setup a debug session.
21
+
Follow these steps to set up a debug session:
22
22
23
-
`cd seedsigner/src`
23
+
1. Navigate to the source directory:
24
+
```bash
25
+
cd seedsigner/src
26
+
```
24
27
25
-
`nano settings.ini`
28
+
2. Edit the settings file:
29
+
```bash
30
+
nano settings.ini
31
+
```
26
32
27
-
in nano editor change `debug = False` to `debug = True` (case sensitive). Save and exit settings.ini.
33
+
3. In the nano editor, change `debug = False` to `debug = True` (case sensitive). Save and exit settings.ini.
28
34
29
-
stop the seedsigner systemd process by running
35
+
4. Stop the SeedSigner systemd process:
36
+
```bash
37
+
sudo systemctl stop seedsigner.service
38
+
```
30
39
31
-
`sudo systemctl stop seedsigner.service`
32
-
33
-
now start the python app manually by running
34
-
35
-
`python3 main.py`
40
+
5. Start the Python app manually:
41
+
```bash
42
+
python3 main.py
43
+
```
36
44
37
45
SeedSigner should now be up and running. Keep it connected to the display and keyboard. Recreate the steps to cause the crash. The traceback log and exception will be displayed on the HDMI display.
@@ -28,35 +32,36 @@ Take the output and paste it into a [QR code generator](https://www.the-qrcode-g
28
32
29
33
Start up SeedSigner's UI to import a seed from a QR code. Scan the new QR code and you're good to go!
30
34
31
-
32
35
# Advanced developer notes
33
36
34
37
## Backup an SD card
35
38
36
-
You can back up and restore any size SD card but the process is a little inefficient so the bigger the source SD card, the bigger the backup will be and the longer it'll take to create (and even longer to image back to a new SD card), even if most of the card is blank.
39
+
You can back up and restore any size SD card, but the process is a little inefficient. The bigger the source SD card, the bigger the backup will be and the longer it'll take to create (and even longer to image back to a new SD card), even if most of the card is blank.
37
40
38
-
You can restore a backup image to an SD card of the same or larger size. So it's strongly recommended to do repetitive development work on a smaller card that's easier to backup and restore. Once the image is stabilized, then write it to a bigger card, if necessary (that being said, there's really no reason to use a large SD card for SeedSigner. An 8GB SD card is more than big enough).
41
+
You can restore a backup image to an SD card of the same or larger size. It's strongly recommended to do repetitive development work on a smaller card that's easier to backup and restore. Once the image is stabilized, then write it to a bigger card, if necessary (that being said, there's really no reason to use a large SD card for SeedSigner. An 8GB SD card is more than big enough).
39
42
40
-
Insert the SD card into a Mac/Linux machine and create a compressed img file.
43
+
### Steps to create a backup:
41
44
42
-
First verify the name of your SD card:
45
+
1. Insert the SD card into a Mac/Linux machine
46
+
2. Verify the name of your SD card:
43
47
44
-
```
48
+
```bash
45
49
# Mac:
46
50
diskutil list
47
51
48
52
# Linux:
49
53
sudo fdisk -l
50
54
```
51
55
52
-
It will most likely be `/dev/disk1` on most systems.
56
+
The device will most likely be `/dev/disk1` on most systems.
53
57
54
-
Now we use `dd`to clone and `gzip` to compress it. Note that we reference the SD card by adding an `r` in front of the disk name. This speeds up the cloning considerably.
58
+
3. Create a compressed backup using `dd` and `gzip`. Note that we reference the SD card by adding an `r` in front of the disk name to speed up the cloning process:
The process should take about 15 minutes and will typically generate a roughly 1.1GB image.
61
65
62
-
To restore from your backup image, just use the Raspberry Pi Imager. Remember that you can only write it to an SD card of equal or greater size than the original SD card.
66
+
### Restoring from backup
67
+
To restore from your backup image, use the Raspberry Pi Imager. Remember that you can only write it to an SD card of equal or greater size than the original SD card.
Copy file name to clipboardExpand all lines: docs/dice_verification.md
+9-10Lines changed: 9 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,20 +7,19 @@ As usual: Don't Trust, Verify!<br>
7
7
<br><br>
8
8
**Note:**<br>
9
9
**Do NOT use this with any seed you want to use later with real funds. This exercise is only for checking that the independent codebases get to the same end result!**<br>
10
-
**However, if you do want to check your real seedphrases you should download the Iancoleman and/or Bitcoiner.Guide tools onto an airgapped, ephemeral computer (e.g. using tails-OS) and perform these tests on there. Destroy/abandon the TailsOS afterwards.**<br>
10
+
**However, if you do want to check your real seed phrases you should download the Ian Coleman and/or Bitcoiner.Guide tools onto an airgapped, ephemeral computer (e.g. using Tails-OS) and perform these tests on there. Destroy/abandon the Tails-OS afterwards.**<br>
11
11
**Never input seed phrases that you intend to use to store real funds onto an internet-connected computer!!!**
12
12
<br><br><br>
13
13
14
14
## 99 Dice Rolls / 24 Seed Words Example
15
15
16
-
The following 99 dice roll results are used in the verification steps as an example for a 24 words seed:<br>
16
+
The following 99 dice roll results are used in the verification steps as an example for a 24-word seed:<br>
Zpub is the same as shown in SeedSigner, Sparrow and Ian Colemand tool.
146
+
Zpub is the same as shown in SeedSigner, Sparrow and Ian Coleman tool.
148
147
<br><br>
149
148
**Addresses:**<br>
150
149
Scroll down a little bit where the receive addresses are shown and compare to the ones generated in Sparrow ('Addresses' tab of the wallet):<br>
@@ -163,10 +162,10 @@ Check that the change addresses all match.
163
162
164
163
## 50 Dice Rolls / 12 Seed Words Example
165
164
166
-
SeedSigner supports the creation of mnenomic seeds both with 12 or 24 seed words corresponding to 50 or 99 dice rolls. Below are some example result values for using 50 dice rolls only.<br><br>
167
-
All the steps shown can be executed the same way, just select the '12 words (50 rolls)' option in SeedSigner and change the 'Mnenomic Length' dropdown boxes in both web tools to '12 Words'.<br><br>
165
+
SeedSigner supports the creation of mnemonic seeds both with 12 or 24 seed words corresponding to 50 or 99 dice rolls. Below are some example result values for using 50 dice rolls only.<br><br>
166
+
All the steps shown can be executed the same way, just select the '12 words (50 rolls)' option in SeedSigner and change the 'Mnemonic Length' dropdown boxes in both web tools to '12 Words'.<br><br>
168
167
169
-
50 dice roll results as an example for a 12 words seed:<br>
168
+
50 dice roll results as an example for a 12-word seed:<br>
SeedSigner supports loading of [Electrum's Segwit seed phrases](https://electrum.readthedocs.io/en/latest/seedphrase.html#electrum-seed-version-system). This is considered an Advanced feature that is disabled by default.
3
+
SeedSigner supports loading of [Electrum's SegWit seed phrases](https://electrum.readthedocs.io/en/latest/seedphrase.html#electrum-seed-version-system). This is considered an Advanced feature that is disabled by default.
4
4
5
-
To load an Electrum Segwit seed phrase, first enable Electrum seed support in Settings -> Advanced -> Electrum seed support. After this option is enabled, the user will now be able to enter an Electrum seed phrase by selecting "Enter Electrum seed" in the Load Seed screen.
5
+
To load an Electrum SegWit seed phrase, first enable Electrum seed support in Settings -> Advanced -> Electrum seed support. After this option is enabled, the user will now be able to enter an Electrum seed phrase by selecting "Enter Electrum seed" in the Load Seed screen.
6
6
7
7
Some SeedSigner functionality is deliberately disabled when using an Electrum mnemonic:
8
8
@@ -11,5 +11,5 @@ Some SeedSigner functionality is deliberately disabled when using an Electrum mn
11
11
- SeedQR backups
12
12
- Since Electrum seeds are not supported by other SeedQR implementations, it would be dangerous to use SeedQR as a backup tool for Electrum seeds and is thus disabled
13
13
- Custom derivations
14
-
- Hardcoded derivation path and script types in SeedSigner to match Electrum wallet software. These are m/0h for single sig and m/1h for multisig
14
+
- Hard-coded derivation path and script types in SeedSigner to match Electrum wallet software. These are m/0h for single sig and m/1h for multisig
15
15
- User-chosen custom derivations are thus not supported for Electrum seeds
0 commit comments