Skip to content

Commit

Permalink
add OS command mode command documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
russeree committed Nov 19, 2023
1 parent 8901833 commit 2bbfce3
Showing 1 changed file with 21 additions and 8 deletions.
29 changes: 21 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<img src="public/images/logo/icon_square.png" width="120" height="120">
</div>

<br>

<div align="center">
<h1>NyanOS GUI 🐱 - A Web Serial API Interface</h1>
</div>
Expand All @@ -13,10 +15,10 @@ The NyanOS GUI provides a browser-based interface for interacting with the Nyan
# Index

- [Features](https://github.com/russeree/nyan-keys-gui#features-include)
- [Terminal]()
- [Terminal](https://github.com/russeree/nyan-keys-gui#bitcoin-solo-mining)
- [Actions](https://github.com/russeree/nyan-keys-gui#action-buttons)
- [Write FPGA Bitstream](https://github.com/russeree/nyan-keys-gui#write-fpga-bitstream)
- BitCoin Mining
- [BitCoin Mining](https://github.com/russeree/nyan-keys-gui#bitcoin-solo-mining)

# Features include
- Nyan Cat connection assistant
Expand All @@ -33,6 +35,14 @@ Become the 'Shadowy Super Coder" - _Elizabeth Warren_ with the Nyan Keys keyboar
- `write-bitstream <size>` - Uploads a bitstream file to the Nyan Keys EEPROM.

### ```getinfo```
Obtains current information about the Nyan Keys keyboard. Name, version, author, and build date are displayed

### ```set-owner [name1] [name2] ...```
Writes a name to the owner field in the Nyan Keys EEPROM, this transcends individual firmware flashes as the information is not stored on the STM32F723 MCU or the FPGA.

### ```write-bitstream [bytes]```
Writes an icecompr compressed FPGA bitstream to the second eeprom bank. The max size ```[bytes]``` that is supported is 65536 bytes. Once the command is executed all serial data passed though the CDC channel is written directly to memory. Once the number of bytes have been transmitted over the CDC channel NyanOS will return to ```command mode``` to accept new commands. A sha256 hash of the data written to memory is printed to the terminal.


# Action Buttons 🏃
## Write FPGA Bitstream
Expand All @@ -53,15 +63,18 @@ A SHA256 hash of the compressed bitstream is provided for verification against y
The source code and original release bitstreams, both compressed and uncompressed, are available at [https://github.com/russeree/nyan-keys-ice40hx4k-bitstream](https://github.com/russeree/nyan-keys-ice40hx4k-bitstream)

## Bitcoin Solo Mining
As a Bitcoin Maximalist, I've developed a unique, opt-in Bitcoin miner integrated into both the UI and OS. Out of the box this is inactive and would require additional configuration. Given that this Bitcoin miner operates in the Kh/s range, it's statistically improbable to find a Bitcoin block, especially compared to the current network hashrate, which is in the hundreds of Ex/s. None the less there were extra CPU cycles whilst the NyanOS isn't being interrupted to send over data to the host.
<details>
<summary></h2>Bitcoin Solo Mining - Click to Expand</h2></summary>
As a Bitcoin Maximalist, I've developed a unique, opt-in Bitcoin miner integrated into both the UI and OS. Out of the box this is inactive and would require additional configuration. Given that this Bitcoin miner operates in the Kh/s range, it's statistically improbable to find a Bitcoin block, especially compared to the current network hashrate, which is in the hundreds of Ex/s. None the less there were extra CPU cycles whilst the NyanOS isn't being interrupted to send over data to the host.

To mine Bitcoin using NyanOS, two components are required:
- A Bitcoin Node (Pruned is valid)
- A Legacy Address (Payout Address)
To mine Bitcoin using NyanOS, two components are required:
- A Bitcoin Node (Pruned is valid)
- A Legacy Address (Payout Address)

In it's simplest form the ```btc_miner.js``` requests a block template from your node. The block template contains _nearly_ all of the information necessary to create the block sans the payout transaction. For the payout, you need to supply a P2PKH (Legacy) Bitcoin address to the Nyan GUI. If by the blessing of God your keyboard manages to find a block inside of the nonce range Bitcoins will sent to that address. The payout automatically will adjust to the block subsidy based on the block height (currently 6.25BTC in 2023) and you the user will receive the full amount since there is no pool.
In it's simplest form the ```btc_miner.js``` requests a block template from your node. The block template contains _nearly_ all of the information necessary to create the block sans the payout transaction. For the payout, you need to supply a P2PKH (Legacy) Bitcoin address to the Nyan GUI. If by the blessing of God your keyboard manages to find a block inside of the nonce range Bitcoins will sent to that address. The payout automatically will adjust to the block subsidy based on the block height (currently 6.25BTC in 2023) and you the user will receive the full amount since there is no pool.

**Note**: For simplicity, the logic to include additional transactions in your block hasn't been incorporated. The block contents will be a single coinbase transaction to the address you provide.
**Note**: For simplicity, the logic to include additional transactions in your block hasn't been incorporated. The block contents will be a single coinbase transaction to the address you provide.
</details>

## Privacy

Expand Down

0 comments on commit 2bbfce3

Please sign in to comment.