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
↓ 11 callers
Function
floorDivision
floorDivision() executes integer division for big.Int
lib/crypto/classgroup.go:468
↓ 11 callers
Function
formatUint64
(u uint64)
fsm/key.go:127
↓ 11 callers
Method
get
(routeName, param string, ptr any, admin ...bool)
cmd/rpc/client.go:1092
↓ 11 callers
Method
heightParams
heightParams is a helper function to abstract common workflows around a callback requiring a state machine
cmd/rpc/query.go:659
↓ 11 callers
Function
newTxn
(t *testing.T, prefix []byte)
store/txn_test.go:17
↓ 11 callers
Function
startTestP2PNode
(t *testing.T, n testP2PNode)
p2p/p2p_test.go:477
↓ 11 callers
Method
write
write() outputs the log message with a timestamp to the configured writer
lib/log.go:194
↓ 10 callers
Method
Add
Add inserts a new message into the cache if it doesn't already exist It removes the oldest message if the cache is full
lib/peer.go:261
↓ 10 callers
Method
AddToTotalSupply
SUPPLY CODE BELOW * Supply structure provides an organized view of the overall financial status, showing both the total amount available and how
fsm/account.go:410
↓ 10 callers
Method
Commit
historical read only version of the store
lib/store.go:21
↓ 10 callers
Function
ErrInvalidPluginSchema
(err error)
lib/error.go:884
↓ 10 callers
Function
ErrNotSubscribed
()
lib/error.go:547
↓ 10 callers
Function
ErrWrongStoreType
()
fsm/error.go:170
↓ 10 callers
Function
FromAny
FromAny() converts an anypb.Any type back into a proto.Message
lib/util.go:524
↓ 10 callers
Method
Hash
Hash() returns the cryptographic hash of the canonical Sign Bytes of the CertificateResult
lib/certificate.go:401
↓ 10 callers
Function
MemHash
MemHash is the hash function used by go map, it utilizes available hardware instructions(behaves as aeshash if aes instruction is available). NOTE: Th
lib/util.go:1038
↓ 10 callers
Function
NewPage
NewPage() returns a new instance of the Page object from the params and pageType Load() or LoadArray() is the likely next function call
lib/util.go:73
↓ 10 callers
Function
NewSendTransaction
NewSendTransaction() creates a SendTransaction object in the interface form of TransactionI
fsm/transaction.go:341
↓ 10 callers
Method
RemoteAddr
()
p2p/encrypt.go:256
↓ 10 callers
Function
SafeMulDiv
SafeMulDiv computes (a * b) / c safely using big.Int.
lib/util.go:988
↓ 10 callers
Method
SetCommittees
SetCommittees() sets the membership and staked supply for all an addresses' committees
fsm/committee.go:288
↓ 10 callers
Method
SetHash
SetHash() computes and sets the BlockHash to BlockHeader.Hash
lib/block.go:100
↓ 10 callers
Method
SignBytes
SignBytes() returns the canonical byte representation used to digitally sign the bytes of the structure
lib/certificate.go:224
↓ 10 callers
Method
TimeMachine
TimeMachine() creates a new StateMachine instance representing the blockchain state at a specified block height, allowing for a read-only view of the
fsm/state.go:307
↓ 10 callers
Method
WaitTime
WaitTime() returns the wait time (wait and receive consensus messages) for a specific Phase.Round
bft/bft.go:723
↓ 10 callers
Function
newStartedTestP2PNode
(t *testing.T)
p2p/p2p_test.go:472
↓ 10 callers
Method
readOnlyState
readOnlyState is a helper function to safely wrap TimeMachine access
cmd/rpc/server.go:285
↓ 9 callers
Method
AddToStakedSupply
AddToStakedSupply() adds to the staked supply count (staked + delegated)
fsm/account.go:423
↓ 9 callers
Method
Check
()
fsm/gov_params.go:34
↓ 9 callers
Method
CheckBasic
ORDERS CODE BELOW CheckBasic() performs stateless validation on an Orders object
lib/certificate.go:649
↓ 9 callers
Function
ErrCommitDB
(err error)
store/error.go:17
↓ 9 callers
Function
ErrInvalidSignerBitmap
(err error)
lib/error.go:523
↓ 9 callers
Method
GetDelegatesPaginated
GetDelegatesPaginated() returns a page of delegates
fsm/committee.go:338
↓ 9 callers
Method
GetHash
the canonical form the bytes were signed in
lib/tx.go:57
↓ 9 callers
Method
HandleMessage
HandleMessage handles and routes incoming consensus message from a Validator peer
bft/msg.go:12
↓ 9 callers
Function
KeyForPaused
(maxPausedHeight uint64, address crypto.AddressI)
fsm/key.go:84
↓ 9 callers
Function
NewHexBytesFromString
NewHexBytesFromString() converts a hexadecimal string into HexBytes
lib/util.go:654
↓ 9 callers
Method
PoolSub
PoolSub() removes tokens from the Pool structure
fsm/account.go:356
↓ 9 callers
Function
check
(a, b, c *big.Int, t *testing.T)
lib/crypto/classgroup_test.go:37
↓ 9 callers
Method
equals
equals() returns true if two key objects are equivalent
store/smt.go:1017
↓ 9 callers
Function
failInvariant
(t *testing.T, seed int64, step int, reason string, history []string, sim *dexSim)
fsm/dex_test.go:2906
↓ 9 callers
Function
rlockWithTrace
rlockWithTrace acquires a read lock and logs if the wait exceeds 100ms. The returned func must be called to unlock.
p2p/lock_trace.go:29
↓ 9 callers
Method
setNode
setNode() set a node object in a key value database
store/smt.go:583
↓ 9 callers
Function
stringToCommittees
stringToCommittees converts a comma separated string of committees to uint64
cmd/rpc/admin.go:778
↓ 9 callers
Function
validateIterators
(t *testing.T, prefix string, expectedKeys []string, iterators ...lib.IteratorI)
store/store_test.go:145
↓ 8 callers
Method
AddTransactions
whether the mempool has this transaction already (de-duplicated by hash)
lib/mempool.go:19
↓ 8 callers
Method
Bytes
Bytes() gives the protobuf bytes representation of the private key
lib/crypto/bls.go:79
↓ 8 callers
Function
DecodeLengthPrefixed
DecodeLengthPrefixed() decodes a key that is delimited by the length of the segment in a single byte
lib/util.go:803
↓ 8 callers
Function
ErrInvalidProtocolVersion
()
fsm/error.go:158
↓ 8 callers
Function
ErrUnknownParam
()
fsm/error.go:135
↓ 8 callers
Method
Error
Error() when an error occurs on the MultiConn execute a callback. Optionally pass a reputation delta to slash the peer
p2p/conn.go:321
↓ 8 callers
Method
GetBlockByHeight
get a block by hash
lib/store.go:71
↓ 8 callers
Method
GetBlockHash
GetBlockHash() retrieves the hash from the block
bft/bft.go:871
↓ 8 callers
Method
GetCommitteePaginated
GetCommitteePaginated() returns a 'page' of committee members ordered from the highest stake to lowest
fsm/committee.go:251
↓ 8 callers
Method
GetDexBatch
GetDexBatch() retrieves a sell batch from the state store
fsm/dex.go:608
↓ 8 callers
Method
GetNonSigners
GetNonSigners() returns all non-quorum-certificate-signers save in the state
fsm/byzantine.go:102
↓ 8 callers
Method
ID
ID() returns the self peer address
p2p/p2p.go:485
↓ 8 callers
Method
IsValidDoubleSigner
IsValidDoubleSigner() checks to see if the double signer is valid for this specific height
bft/bft.go:976
↓ 8 callers
Method
LoadRootChainId
LoadRootChainId() returns the unique identifier of the root chain
bft/bft.go:955
↓ 8 callers
Function
MarshalJSONIndent
MarshalJSONIndent() serializes a message into an indented JSON byte slice
lib/util.go:459
↓ 8 callers
Method
Reduced
Reduced() transforms a given class group element into a more compact and canonical representation of the group element reduction ensures that (a <= c)
lib/crypto/classgroup.go:261
↓ 8 callers
Method
Remove
Remove() evicts a peer from the set
p2p/set.go:107
↓ 8 callers
Method
SendTo
SendTo() sends a message to a specific peer based on their public key
p2p/set.go:236
↓ 8 callers
Method
SendToPeers
SendToPeers() sends a message to all peers
p2p/set.go:252
↓ 8 callers
Method
Sign
Sign() is a convenience method for performing a digital signature with this message using a Private Key and fills the 'signature' field of the Message
bft/msg.go:239
↓ 8 callers
Method
SignerEnabledAt
SignerEnabledAt() returns true if a signer is enabled at a certain bit
lib/crypto/key.go:63
↓ 8 callers
Function
checkChainId
(i uint64)
fsm/message_helpers.go:969
↓ 8 callers
Function
file_consensus_proto_rawDescGZIP
()
lib/consensus.pb.go:694
↓ 8 callers
Function
formatLocaleNumber
(num, minFractionDigits = 0, maxFractionDigits = 2)
cmd/rpc/web/explorer/components/util.js:199
↓ 8 callers
Method
fromBytes
fromBytes() creates a new key object from existing encoded key bytes
store/smt.go:973
↓ 8 callers
Method
heightAndIdRequest
(routeName string, height, id uint64, ptr any)
cmd/rpc/client.go:1048
↓ 8 callers
Method
paginatedHeightRequest
(routeName string, height uint64, p lib.PageParams, ptr any, filters ...lib.ValidatorFilters)
cmd/rpc/client.go:952
↓ 8 callers
Function
strFromArgs
strFromArgs() extracts a string from the first argument
cmd/rpc/eth.go:1342
↓ 8 callers
Method
waitTime
waitTime() calculates the waiting time for a specific sleepTime configuration and Round number (helper)
bft/bft.go:752
↓ 8 callers
Method
withStore
withStore() executes a read only store function
cmd/rpc/query.go:940
↓ 7 callers
Function
Append
Append() is a 'safe append' when the caller wants to re-use the 'a' slice
lib/util.go:945
↓ 7 callers
Method
Dial
Dial() tries to establish an outbound connection with a peer candidate
p2p/p2p.go:252
↓ 7 callers
Function
DownscaleTo6Decimals
DownscaleTo6Decimals converts from 18-decimal unit (Ethereum RPC) to 6-decimal (Canopy native)
fsm/ethereum.go:236
↓ 7 callers
Function
ErrNilBlock
()
lib/error.go:383
↓ 7 callers
Function
GenerateVDF
* Credit: The base for this implementation is github.com/harmony-one/vdf (last commit 2019) Canopy upgrades this code for (1) memory efficiency, (2
lib/crypto/vdf.go:19
↓ 7 callers
Method
GetAll
GetAll() returns a snapshot of all peers in the book
p2p/book.go:285
↓ 7 callers
Method
GetCommitteeData
GetCommitteeData() is a convenience function to retrieve the committee data from the master list
fsm/committee.go:480
↓ 7 callers
Method
GetOrder
GetOrder() gets the sell order from state
fsm/swap.go:279
↓ 7 callers
Method
Has
Has() returns if the set has a peer with a specific public key
p2p/set.go:274
↓ 7 callers
Function
NewAddressFromString
NewAddressFromString() returns the hex string implementation of an AddressI interface
lib/crypto/address.go:32
↓ 7 callers
Function
NewMultiBLSFromPoints
NewMultiBLSFromPoints() creates a multi public key from a list of G1 points on a BLS12381 curve
lib/crypto/bls.go:264
↓ 7 callers
Function
NewProtocolVersion
NewProtocolVersion() creates a properly formatted protocol version string
fsm/gov_params.go:197
↓ 7 callers
Method
Root
wrap the store in a discardable nested store
lib/store.go:16
↓ 7 callers
Method
Set
Set() adds or updates the value for a key in the txn operations
store/txn.go:123
↓ 7 callers
Method
SetDelegations
SetDelegations() sets the delegate 'membership' for an address, adding to the list and updating the supply pools
fsm/committee.go:375
↓ 7 callers
Method
SetReadDeadline
(t time.Time)
p2p/encrypt.go:258
↓ 7 callers
Method
SetValidatorUnstaking
UNSTAKING VALIDATORS BELOW SetValidatorUnstaking() updates a Validator as 'unstaking' and removes it from its respective committees NOTE: finish unsta
fsm/validator.go:263
↓ 7 callers
Method
Stop
Stop() stops the client
cmd/rpc/sock.go:617
↓ 7 callers
Function
ValidatorPrefix
()
fsm/key.go:66
↓ 7 callers
Function
VerifyVDF
VerifyVDF() verifies VDF bytes given a seed and iterations
lib/crypto/vdf.go:33
↓ 7 callers
Method
bitAt
bitAt() returns the bit value <0 or 1> at a 0 indexed position left to right (MSB) ex 1: [0,1,1,1]: bitPos=0 returns 0 and bitPos=1 returns 1 ex 2: [1
store/smt.go:916
↓ 7 callers
Function
checkAmount
checkAmount() validates the amount sent in the Message
fsm/message_helpers.go:867
↓ 7 callers
Function
ethDataToMsg
ethDataToMsg() converts the ethereum tx data (message proto bytes) to a message
fsm/ethereum.go:170
↓ 7 callers
Function
file_gov_proto_rawDescGZIP
()
fsm/gov.pb.go:843
↓ 7 callers
Function
file_peer_proto_rawDescGZIP
()
lib/peer.pb.go:588
← previous
next →
201–300 of 5,387, ranked by callers