peeling

package
v0.0.0-...-bcfd2cf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package peeling chain heuristic Since in this case we are looking for a set of transactions that have different length, can be really difficult to be sure that a series of transactions that have one input and two outputs is a peeling chains transaction, also because a chain can be connected in the middle point of another chain. In this case, we count all the transactions that belong to a series that have almost length 3 as peeling chains transactions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PeelingLikeCondition

func PeelingLikeCondition(transaction *tx.Tx) bool

PeelingLikeCondition check the basic condition of peeling chain (2 txout and 1 txin)

Types

type PeelingChain

type PeelingChain struct {
	Kv    kv.DB
	Cache *cache.Cache
}

PeelingChain heuristic

func (*PeelingChain) ChangeOutput

func (h *PeelingChain) ChangeOutput(transaction *tx.Tx) (c []uint32, err error)

ChangeOutput returns the vout of the change address output based on peeling chain heuristic

func (*PeelingChain) IsPeelingChain

func (h *PeelingChain) IsPeelingChain(transaction *tx.Tx) (is bool, err error)

IsPeelingChain returns true id the transaction is part of a peeling chain

func (*PeelingChain) Vulnerable

func (h *PeelingChain) Vulnerable(transaction *tx.Tx) bool

Vulnerable returns true if the transaction has a privacy vulnerability due to optimal change heuristic

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL