1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-19 12:58:13 +00:00
trezor-firmware/common
JoeGruff e3ea32a986 multi: Add decred staking.
Add two new input and four output script types.

Decred ticket purchases consist of a stake submission, op returns, and
change addresses. Although change addresses are allowed by consensus,
they are no longer used in practice and so have been given the
restrictions of a null pubkey and no value. Stake scripts are almost
identical to p2pkh or p2sh except for an extra opcode in front. Inputs
are currently only used in the form of one input three outputs with the
first output, or stake submission, paying to a public key hash, or with
two inputs and five outputs with the stake submission paying to a
multisig script hash. The op returns are directed to the user in the
case of one and the voting service provider and user in the case of two.

One of the sstx commitment for a ticket must pay back to the trezor
wallet. This is checked and an error is thrown if we don't find the
expected public key hash.

Because this adds the ability to create new types of outputs once the
ticket votes, two new input script types are also needed. A successful
vote will lead to a stake generation script that must be spent, and an
unsuccessful vote will lead to a revocation script that must be spent.
If we allowed stake change scripts to have a valid pubkey, that too
would require another op code, but we disallow those for output.
2021-03-17 12:16:08 +01:00
..
defs common/defs/fido: add namecheap 2021-03-15 17:22:12 +01:00
keys all: rename TREZOR to Trezor where possible 2019-06-17 20:28:29 +02:00
protob multi: Add decred staking. 2021-03-17 12:16:08 +01:00
tests/fixtures/cardano fix(core/Cardano): do not show change output in byron-shelley transfers 2021-02-25 16:41:12 +01:00
tools fix(common/tools): cast a wider net when looking for CMC match 2021-03-01 12:05:54 +01:00
udev fix whitespaces 2019-10-30 10:07:30 +01:00
.gitignore common: add BNB to support.json (#503) 2019-09-06 12:28:13 +02:00
.gitmodules feat(common): add upstream Ethereum chains repository 2020-11-20 18:55:35 +01:00
.gitrepo git subrepo push common 2021-02-02 14:50:35 +01:00
COPYING MONOREPO MERGE trezor-common 2019-04-15 19:14:45 +02:00
README.md ci: enable editorconfig checks, fix whitespace issues 2020-11-11 14:43:50 +01:00

Trezor Common

This project contains files shared among Trezor projects. All changes are happening inside the Trezor Firmware repository.

We also export this project to the trezor-common repository as a read-only copy so third parties may depend on that instead of the whole monorepo. It is meant to be used as a submodule using:

git submodule add https://github.com/trezor/trezor-common.git trezor-common