Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/canopy-network/canopy
/ functions
Functions
5,387 in github.com/canopy-network/canopy
⨍
Functions
5,387
◇
Types & classes
860
↓ 5 callers
Function
HKDFSecretsAndChallenge
Big picture: DH is used to establish a shared secret, and then HKDF is used to derive multiple keys from that secret for encryption HKDFSecretsAndChal
lib/crypto/aead.go:45
↓ 5 callers
Method
Hash
Hash() creates a hash representative of the dex batch
lib/dex.go:17
↓ 5 callers
Method
IndexQC
(qc *QuorumCertificate)
lib/store.go:50
↓ 5 callers
Method
IsPacemakerMessage
IsPacemakerMessage() determines if the message should describe the View of a Validator for the Pacemaker logic
bft/msg.go:265
↓ 5 callers
Function
KeyForUnstaking
(height uint64, address crypto.AddressI)
fsm/key.go:81
↓ 5 callers
Method
LoadBlock
LoadBlock() loads an indexed block at a specific height
fsm/state.go:377
↓ 5 callers
Method
Name
()
fsm/message_helpers.go:67
↓ 5 callers
Function
New
New() creates a new instance of a StateMachine
fsm/state.go:48
↓ 5 callers
Function
NewETHSECP256K1PrivateKey
NewETHSECP256K1PrivateKey() generates a new ETHSECP256K1 private key
lib/crypto/secp256k1.go:37
↓ 5 callers
Method
NewFromFile
NewFromFile() creates a new polls object from a file
fsm/gov_params.go:552
↓ 5 callers
Function
NewSECP256K1PrivateKey
NewSECP256K1PrivateKey() generates a new SECP256K1 private key
lib/crypto/secp256k1.go:28
↓ 5 callers
Function
NewSMT
NewSMT() creates a new abstraction of the SMT object
store/smt.go:144
↓ 5 callers
Function
NewStoreWithDB
NewStoreWithDB() returns a Store object given a DB and a logger NOTE: to read the state commit store i.e. for merkle proofs, use NewReadOnly()
store/store.go:156
↓ 5 callers
Method
SelfIsProposer
SelfIsPropose() returns true if this node is the Leader
bft/bft.go:809
↓ 5 callers
Method
SelfSend
SelfSend() executes an internal pipe send to self
p2p/p2p.go:425
↓ 5 callers
Method
SendToReplicas
SendToReplicas() is a P2P call to directly send a Consensus message to all Replicas
bft/bft.go:951
↓ 5 callers
Method
SetBitmap
SetBitmap() loads the values of a bitmap into the MultiPublicKey
lib/crypto/key.go:67
↓ 5 callers
Method
SetCommitteeMember
SetCommitteeMember() sets the address as a 'member' of the committee in the state
fsm/committee.go:320
↓ 5 callers
Method
SetDeadline
(t time.Time)
p2p/encrypt.go:257
↓ 5 callers
Method
SetDexBatch
HELPERS BELOW SetDexBatch() sets a sell batch in the state store
fsm/dex.go:599
↓ 5 callers
Method
SetParamsCons
SetParamsCons() sets Consensus params into state
fsm/gov.go:244
↓ 5 callers
Method
SetValidatorPaused
SetValidatorPaused() updates a Validator as 'paused' with a MaxPausedHeight (height at which the Validator is force-unstaked for being paused too long
fsm/validator.go:385
↓ 5 callers
Function
SharedSecret
https://cr.yp.to/ecdh.html Big picture: DH is used to establish a shared secret, and then HKDF is used to derive multiple keys from that secret for en
lib/crypto/ecdh.go:19
↓ 5 callers
Method
StateRead
StateRead() executes a 'read request' to the state store
lib/plugin.go:23
↓ 5 callers
Method
StateWrite
StateWrite() executes a 'write request' to the state store
lib/plugin.go:25
↓ 5 callers
Method
Stop
Stop gracefully terminates the CLI process
cmd/auto-update/coordinator.go:84
↓ 5 callers
Function
StringToBLS12381PrivateKey
StringToBLS12381PrivateKey() creates a new PrivateKeyI interface from a BLS Private Key hex string
lib/crypto/bls.go:45
↓ 5 callers
Method
TimeToReset
TimeToReset() returns the channel that signals when the limiter may be reset This channel is called by the time.Ticker() set in NewLimiter
lib/peer.go:405
↓ 5 callers
Function
Unmarshal
(protoBytes: Uint8Array | Buffer, MessageType: any)
plugin/typescript/src/contract/plugin.ts:375
↓ 5 callers
Function
Unmarshal
Unmarshal() deserializes a byte slice into a proto.Message
plugin/go/contract/plugin.go:316
↓ 5 callers
Method
UpdateMustConnects
UpdateMustConnects() updates the list of peers that 'must be connected to' Ex. the peers needed to complete committee consensus
p2p/set.go:123
↓ 5 callers
Function
UpscaleTo18Decimals
UpscaleTo18Decimals converts a 6-decimal unit (Canopy native) to 18-decimal (Ethereum RPC)
fsm/ethereum.go:231
↓ 5 callers
Method
_check_message_send
CheckMessageSend statelessly validates a 'send' message.
plugin/python/contract/contract.py:251
↓ 5 callers
Function
argGetAddr
(arg string)
cmd/cli/admin.go:415
↓ 5 callers
Function
bytesFromArgs
bytesFromArgs() extracts a hash from the first argument
cmd/rpc/eth.go:1324
↓ 5 callers
Function
bytesToHex
(bytes: Uint8Array)
plugin/typescript/tutorial/src/rpc_test.ts:53
↓ 5 callers
Function
bytes_to_hex
Convert bytes to hex string.
plugin/python/tutorial/rpc_test.py:63
↓ 5 callers
Function
cleanHex
cleanHex() strips the 0x prefix from a hex string
cmd/rpc/eth.go:1458
↓ 5 callers
Function
colorStringWithFormat
colorStringWithFormat() returns a formatted string with color applied
lib/log.go:256
↓ 5 callers
Function
convertTransactions
(txs)
cmd/rpc/web/explorer/components/modal.jsx:63
↓ 5 callers
Method
copy
txn() returns a copy of the current transaction txn
store/txn.go:291
↓ 5 callers
Method
copy
copy() returns a shallow copy of the node
store/smt.go:1102
↓ 5 callers
Function
cpyObj
(v)
cmd/rpc/web/explorer/components/util.js:121
↓ 5 callers
Function
file_p2p_proto_rawDescGZIP
()
p2p/p2p.pb.go:319
↓ 5 callers
Function
getAdminRPCURL
()
cmd/rpc/web/wallet/components/api.js:17
↓ 5 callers
Method
greatestCommonPrefix
greatestCommonPrefix() calculates the greatest common prefix (GCP) between the current key and another key. - Starts at a given bit position (`bitPos`
store/smt.go:899
↓ 5 callers
Method
heightPaginated
heightPaginated is a helper function to abstract common workflows around a callback requiring a state machine and page parameters
cmd/rpc/query.go:673
↓ 5 callers
Function
intFromArgs
intFromArgs() extracts an integer from the first argument
cmd/rpc/eth.go:1333
↓ 5 callers
Method
keystoreHandler
keystoreHandler is a helper function that abstracts common workflows of keystore operations
cmd/rpc/admin.go:753
↓ 5 callers
Method
makeVersionedKey
makeVersionedKey() creates a versioned key with inverted version encoding k = [length-prefixed-key][InvertedVersion]
store/versioned_store.go:489
↓ 5 callers
Function
newClassGroup
NewClassGroupFromABDiscriminant() calculates c using D = b^2 - 4ac and returns a class group object
lib/crypto/classgroup.go:50
↓ 5 callers
Function
newNode
NODE CODE BELOW newNode() is a constructor for the node object
store/smt.go:1058
↓ 5 callers
Method
newTestDoubleSignEvidence
newTestDoubleSignEvidence() fabricates double sign evidence for the testing suite
bft/mock_test.go:412
↓ 5 callers
Function
newTestOrderId
(_ *testing.T, variant int)
lib/certificate_test.go:443
↓ 5 callers
Function
newTestP2PConfig
(t *testing.T)
p2p/p2p_test.go:558
↓ 5 callers
Function
newTestP2PNodeWithConfig
(t *testing.T, c lib.Config, noLog ...bool)
p2p/p2p_test.go:539
↓ 5 callers
Function
renderBasicTable
(tab)
cmd/rpc/web/explorer/components/modal.jsx:234
↓ 5 callers
Method
sendToPluginSync
sendToPluginSync() sends to the plugin and waits for a response, tracking FSM context
lib/plugin.go:430
↓ 5 callers
Method
simPrecommitPhase
simPrecommitPhase() simulates the PRECOMMIT phase of the BFT lifecycle
bft/mock_test.go:170
↓ 5 callers
Method
size
()
store/smt.go:1006
↓ 5 callers
Method
traverse
traverse: navigates the tree downward to locate the target or its closest position
store/smt.go:329
↓ 5 callers
Method
update
update() modifies or adds an operation to the txn
store/txn.go:143
↓ 5 callers
Method
url
(routeName, param string, admin ...bool)
cmd/rpc/client.go:1075
↓ 4 callers
Function
AccountPrefix
* - Prefixes are used to allow 'grouping' and organization in a schemaless key-value database environment - Segments are used to allow 'sub-groupings
fsm/key.go:63
↓ 4 callers
Method
AddPeer
AddPeer() takes an ephemeral tcp connection and an incomplete peerInfo and attempts to create a E2E encrypted channel with a fully authenticated peer
p2p/p2p.go:272
↓ 4 callers
Method
BlockTimeMS
BlockTimeMS() returns the expected block time in milliseconds
lib/config.go:213
↓ 4 callers
Method
Bytes
Bytes() returns the byte representation of the Public Key
lib/crypto/secp256k1.go:182
↓ 4 callers
Method
Bytes
Bytes() casts the address value back to a byte slice
lib/crypto/address.go:61
↓ 4 callers
Function
BytesToEthSECP256K1Public
BytesToEthSECP256K1Public() returns ETHSECP256K1PublicKey from bytes
lib/crypto/eth_secp256k1.go:47
↓ 4 callers
Function
CheckCache
CheckCache() is a convenience function that checks the signature cache for a combination and returns a callback for the caller to easily add the signa
lib/crypto/key_batch.go:212
↓ 4 callers
Method
CheckMempool
CheckMempool() Checks each transaction in the mempool and caches a block proposal
controller/tx.go:214
↓ 4 callers
Method
Close
retrieve value
lib/store.go:109
↓ 4 callers
Method
CommitteeIsRetired
CommitteeIsRetired checks if a committee is marked as 'retired' which prevents it from being subsidized for eternity
fsm/committee.go:557
↓ 4 callers
Function
DefaultMempoolConfig
DefaultMempoolConfig() returns the developer created Mempool options
lib/config.go:307
↓ 4 callers
Function
DefaultStateMachineConfig
DefaultStateMachineConfig returns FSM defaults
lib/config.go:171
↓ 4 callers
Method
DeleteTransaction
insert new unconfirmed transaction
lib/mempool.go:20
↓ 4 callers
Method
DeleteValidator
DeleteValidator() completely removes a validator from the state
fsm/validator.go:232
↓ 4 callers
Function
ErrCloseDB
(err error)
store/error.go:13
↓ 4 callers
Function
ErrInsufficientSupply
()
fsm/error.go:95
↓ 4 callers
Function
ErrInvalidBlockHash
()
lib/error.go:403
↓ 4 callers
Function
ErrInvalidKey
()
store/error.go:45
↓ 4 callers
Function
ErrInvalidPercentAllocation
()
lib/error.go:683
↓ 4 callers
Function
ErrMismatchResultsHash
()
lib/error.go:667
↓ 4 callers
Function
ErrNoValidators
()
lib/error.go:459
↓ 4 callers
Function
ErrValidatorUnstaking
()
fsm/error.go:107
↓ 4 callers
Function
ErrWrongChainId
()
lib/error.go:703
↓ 4 callers
Function
ErrWrongNetworkID
()
lib/error.go:691
↓ 4 callers
Method
Finish
Finish() signals the service to complete and returns the output - already running signals a stop in the running thread and returns - not running retur
lib/vdf.go:106
↓ 4 callers
Method
Flush
gracefully stop the database
lib/store.go:25
↓ 4 callers
Function
FormatInputIntoSeed
FormatInputIntoSeed() returns the 'seed data' for the VRF function `seed = lastProposerAddresses + height + round`
lib/consensus.go:833
↓ 4 callers
Method
GetBlockByHash
get Events for an event type
lib/store.go:70
↓ 4 callers
Method
GetDexBatches
GetDexBatches() retrieves the lists for all dex batches
fsm/dex.go:645
↓ 4 callers
Method
GetMajorityVote
GetMajorityVote() returns the Message and AggregateSignature with a VoteSet with a +2/3 majority from the Replicas NOTE: Votes for a specific Height-R
bft/vote.go:27
↓ 4 callers
Method
GetOrderBook
GetOrderBook() retrieves the order book for a committee from the state db
fsm/swap.go:333
↓ 4 callers
Method
GetRetiredCommittees
GetRetiredCommittees() returns a list of the retired chainIds
fsm/committee.go:568
↓ 4 callers
Method
GetSubsidizedCommittees
GetSubsidizedCommittees() returns a list of chainIds that receive a portion of the 'block reward' Think of these committees as 'automatically subsidiz
fsm/committee.go:73
↓ 4 callers
Method
GetTxByHash
(hash []byte)
lib/store.go:63
↓ 4 callers
Method
GetValidatorExists
GetValidatorExists() checks if the Validator already exists in the state
fsm/validator.go:38
↓ 4 callers
Method
HandleBatchDeposit
HandleBatchDeposit() handles local/remote liquidity deposits. local=true: x=local pool (actual token movement), y=counter mirror. local=false: x=count
fsm/dex.go:456
↓ 4 callers
Method
HandleMessageChangeParameter
HandleMessageChangeParameter() is the proper handler for an `Change-Parameter` message
fsm/message.go:292
← previous
next →
401–500 of 5,387, ranked by callers