Documentation ¶
Index ¶
- Constants
- Variables
- type AirdropRequest
- type AirdropResponse
- type BTCBroadcastingManager
- type BTCRelayerV2
- type BTCWalletMonitor
- type BlockchainFeeResponse
- type BroadcastTx
- type BroadcastTxArrayObject
- type ErrorInfo
- type PortalAddressInstance
- type PortalBackendRes
- type RelayingAlerter
- type ShieldingMonitoringInfo
- type ShieldingRequestInfo
- type ShieldingTxArrayObject
- type UnshieldingAlerter
- type Worker
- type WorkerAbs
- func (a *WorkerAbs) Execute()
- func (a *WorkerAbs) ExportErrorLog(msg string)
- func (a *WorkerAbs) ExportInfoLog(msg string)
- func (a *WorkerAbs) GetFrequency() int
- func (a *WorkerAbs) GetID() int
- func (a *WorkerAbs) GetName() string
- func (a *WorkerAbs) GetNetwork() string
- func (a *WorkerAbs) GetQuitChan() chan bool
- func (a *WorkerAbs) Init(id int, name string, freq int, network string, ...) error
Constants ¶
View Source
const ( MaxUnshieldFee = 500000 InitIncBlockBatchSize = 100 FirstBroadcastTxBlockHeight = 1427305 TimeoutBTCFeeReplacement = 80 TimeIntervalBTCFeeReplacement = 10 BroadcastingManagerDBFileDir = "db/broadcastingmanager" BroadcastingManagerDBObjectName = "BTCBroadcast-LastUpdate" )
View Source
const ( BTCBlockBatchSize = 10 // BTCBlockBatchSize is BTC block batch size BlockStepBacks = 8 // BlockStepBacks is number of blocks that the job needs to step back to solve fork situation )
View Source
const ( FirstScannedBTCBlkHeight = 697200 TimeoutTrackingInstanceInSecond = int64(365 * 24 * 60 * 60) WalletMonitorDBFileDir = "db/walletmonitor" WalletMonitorDBObjectName = "BTCMonitor-LastUpdate" MinShieldAmount = 100000 // nano pBTC )
View Source
const ( BTCID = "b832e5d3b1f01a4f0623f7fe91d6673461e1f5d37d91fe78c5c2e6183ff39696" BTCConfirmationThreshold = 6 NumGetStatusTries = 3 IntervalTries = 1 * time.Minute )
View Source
const ( BTCBlockDiffThreshold = 3 CheckRelayingIntervalSeconds = 30 * 60 )
View Source
const ( FirstMonitoringBlkHeight = 1 UnshieldingBatchTimeoutBlk = 200 CheckUnshieldingIntervalSeconds = 30 * 60 )
Variables ¶
View Source
var DefaultNetworkFee = incclient.DefaultPRVFee
Functions ¶
This section is empty.
Types ¶
type AirdropRequest ¶
type AirdropRequest struct {
PaymentAddress string `json:"paymentaddress"`
}
type AirdropResponse ¶
type AirdropResponse struct {
Result int `json:"Result"`
}
type BTCBroadcastingManager ¶
type BTCBroadcastingManager struct { WorkerAbs // contains filtered or unexported fields }
func (*BTCBroadcastingManager) Execute ¶
func (b *BTCBroadcastingManager) Execute()
This function will execute a worker that has 3 main tasks: - Broadcast a unshielding transaction to Bitcoin network - Check for a Bitcoin transaction is stuck or not and request RBF transaction - Check a broadcasted Bitcoin transaction confirmation and notify the Incognito chain
func (*BTCBroadcastingManager) ExportErrorLog ¶
func (b *BTCBroadcastingManager) ExportErrorLog(msg string)
func (*BTCBroadcastingManager) ExportInfoLog ¶
func (b *BTCBroadcastingManager) ExportInfoLog(msg string)
func (*BTCBroadcastingManager) Init ¶
func (b *BTCBroadcastingManager) Init( id int, name string, freq int, network string, utxoManager *utxomanager.UTXOManager, ) error
type BTCRelayerV2 ¶
type BTCRelayerV2 struct { WorkerAbs // contains filtered or unexported fields }
func (*BTCRelayerV2) Execute ¶
func (b *BTCRelayerV2) Execute()
func (*BTCRelayerV2) Init ¶
func (b *BTCRelayerV2) Init(id int, name string, freq int, network string, utxoManager *utxomanager.UTXOManager) error
type BTCWalletMonitor ¶
type BTCWalletMonitor struct { WorkerAbs // contains filtered or unexported fields }
func (*BTCWalletMonitor) Execute ¶
func (b *BTCWalletMonitor) Execute()
This function will execute a worker that has 2 main tasks: - Monitor Bitcoin multisig wallets that corresponding with Incognito Wallet App users - Send shielding request on behalf of users to Incognito chain
func (*BTCWalletMonitor) ExportErrorLog ¶
func (b *BTCWalletMonitor) ExportErrorLog(msg string)
func (*BTCWalletMonitor) ExportInfoLog ¶
func (b *BTCWalletMonitor) ExportInfoLog(msg string)
func (*BTCWalletMonitor) Init ¶
func (b *BTCWalletMonitor) Init(id int, name string, freq int, network string, utxoManager *utxomanager.UTXOManager) error
type BlockchainFeeResponse ¶
type BroadcastTx ¶
type BroadcastTx struct { TxContent string // only has value when be broadcasted TxHash string // only has value when be broadcasted VSize int RBFReqTxID string FeePerRequest uint NumOfRequests uint IsBroadcasted bool BlkHeight uint64 // height of the current Incog chain height when broadcasting tx }
type BroadcastTxArrayObject ¶
type BroadcastTxArrayObject struct { TxArray map[string]map[string]*BroadcastTx // key: batchID | RBFRexTxID NextBlkHeight uint64 // height of the next block need to scan in Inc chain }
type PortalAddressInstance ¶
type PortalBackendRes ¶
type PortalBackendRes struct { Result []*PortalAddressInstance Error interface{} }
type RelayingAlerter ¶
type RelayingAlerter struct { WorkerAbs // contains filtered or unexported fields }
func (*RelayingAlerter) Execute ¶
func (b *RelayingAlerter) Execute()
func (*RelayingAlerter) Init ¶
func (b *RelayingAlerter) Init(id int, name string, freq int, network string, utxoManager *utxomanager.UTXOManager) error
type ShieldingMonitoringInfo ¶
type ShieldingRequestInfo ¶
type ShieldingTxArrayObject ¶
type ShieldingTxArrayObject struct { ShieldingMonitoringList []*ShieldingMonitoringInfo WaitingShieldingList map[string]*ShieldingRequestInfo // key: proofHash LastTimeStampUpdated int64 LastScannedBTCBlockHeight int64 }
type UnshieldingAlerter ¶
type UnshieldingAlerter struct {
WorkerAbs
}
func (*UnshieldingAlerter) Execute ¶
func (b *UnshieldingAlerter) Execute()
func (*UnshieldingAlerter) Init ¶
func (b *UnshieldingAlerter) Init(id int, name string, freq int, network string, utxoManager *utxomanager.UTXOManager) error
type WorkerAbs ¶
type WorkerAbs struct { ID int Name string Frequency int // in sec Quit chan bool RPCClient *utils.HttpClient RPCBTCRelayingReaders []*utils.HttpClient Network string // mainnet, testnet, ... UTXOManager *utxomanager.UTXOManager Logger *logrus.Entry }
func (*WorkerAbs) ExportErrorLog ¶
func (*WorkerAbs) ExportInfoLog ¶
func (*WorkerAbs) GetFrequency ¶
func (*WorkerAbs) GetNetwork ¶
func (*WorkerAbs) GetQuitChan ¶
func (*WorkerAbs) Init ¶
func (a *WorkerAbs) Init(id int, name string, freq int, network string, utxoManager *utxomanager.UTXOManager) error
Click to show internal directories.
Click to hide internal directories.