MCPcopy Create free account

hub / github.com/canopy-network/canopy / functions

Functions5,387 in github.com/canopy-network/canopy

↓ 11 callersFunctionfloorDivision
floorDivision() executes integer division for big.Int
lib/crypto/classgroup.go:468
↓ 11 callersFunctionformatUint64
(u uint64)
fsm/key.go:127
↓ 11 callersMethodget
(routeName, param string, ptr any, admin ...bool)
cmd/rpc/client.go:1092
↓ 11 callersMethodheightParams
heightParams is a helper function to abstract common workflows around a callback requiring a state machine
cmd/rpc/query.go:659
↓ 11 callersFunctionnewTxn
(t *testing.T, prefix []byte)
store/txn_test.go:17
↓ 11 callersFunctionstartTestP2PNode
(t *testing.T, n testP2PNode)
p2p/p2p_test.go:477
↓ 11 callersMethodwrite
write() outputs the log message with a timestamp to the configured writer
lib/log.go:194
↓ 10 callersMethodAdd
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 callersMethodAddToTotalSupply
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 callersMethodCommit
historical read only version of the store
lib/store.go:21
↓ 10 callersFunctionErrInvalidPluginSchema
(err error)
lib/error.go:884
↓ 10 callersFunctionErrNotSubscribed
()
lib/error.go:547
↓ 10 callersFunctionErrWrongStoreType
()
fsm/error.go:170
↓ 10 callersFunctionFromAny
FromAny() converts an anypb.Any type back into a proto.Message
lib/util.go:524
↓ 10 callersMethodHash
Hash() returns the cryptographic hash of the canonical Sign Bytes of the CertificateResult
lib/certificate.go:401
↓ 10 callersFunctionMemHash
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 callersFunctionNewPage
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 callersFunctionNewSendTransaction
NewSendTransaction() creates a SendTransaction object in the interface form of TransactionI
fsm/transaction.go:341
↓ 10 callersMethodRemoteAddr
()
p2p/encrypt.go:256
↓ 10 callersFunctionSafeMulDiv
SafeMulDiv computes (a * b) / c safely using big.Int.
lib/util.go:988
↓ 10 callersMethodSetCommittees
SetCommittees() sets the membership and staked supply for all an addresses' committees
fsm/committee.go:288
↓ 10 callersMethodSetHash
SetHash() computes and sets the BlockHash to BlockHeader.Hash
lib/block.go:100
↓ 10 callersMethodSignBytes
SignBytes() returns the canonical byte representation used to digitally sign the bytes of the structure
lib/certificate.go:224
↓ 10 callersMethodTimeMachine
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 callersMethodWaitTime
WaitTime() returns the wait time (wait and receive consensus messages) for a specific Phase.Round
bft/bft.go:723
↓ 10 callersFunctionnewStartedTestP2PNode
(t *testing.T)
p2p/p2p_test.go:472
↓ 10 callersMethodreadOnlyState
readOnlyState is a helper function to safely wrap TimeMachine access
cmd/rpc/server.go:285
↓ 9 callersMethodAddToStakedSupply
AddToStakedSupply() adds to the staked supply count (staked + delegated)
fsm/account.go:423
↓ 9 callersMethodCheck
()
fsm/gov_params.go:34
↓ 9 callersMethodCheckBasic
ORDERS CODE BELOW CheckBasic() performs stateless validation on an Orders object
lib/certificate.go:649
↓ 9 callersFunctionErrCommitDB
(err error)
store/error.go:17
↓ 9 callersFunctionErrInvalidSignerBitmap
(err error)
lib/error.go:523
↓ 9 callersMethodGetDelegatesPaginated
GetDelegatesPaginated() returns a page of delegates
fsm/committee.go:338
↓ 9 callersMethodGetHash
the canonical form the bytes were signed in
lib/tx.go:57
↓ 9 callersMethodHandleMessage
HandleMessage handles and routes incoming consensus message from a Validator peer
bft/msg.go:12
↓ 9 callersFunctionKeyForPaused
(maxPausedHeight uint64, address crypto.AddressI)
fsm/key.go:84
↓ 9 callersFunctionNewHexBytesFromString
NewHexBytesFromString() converts a hexadecimal string into HexBytes
lib/util.go:654
↓ 9 callersMethodPoolSub
PoolSub() removes tokens from the Pool structure
fsm/account.go:356
↓ 9 callersFunctioncheck
(a, b, c *big.Int, t *testing.T)
lib/crypto/classgroup_test.go:37
↓ 9 callersMethodequals
equals() returns true if two key objects are equivalent
store/smt.go:1017
↓ 9 callersFunctionfailInvariant
(t *testing.T, seed int64, step int, reason string, history []string, sim *dexSim)
fsm/dex_test.go:2906
↓ 9 callersFunctionrlockWithTrace
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 callersMethodsetNode
setNode() set a node object in a key value database
store/smt.go:583
↓ 9 callersFunctionstringToCommittees
stringToCommittees converts a comma separated string of committees to uint64
cmd/rpc/admin.go:778
↓ 9 callersFunctionvalidateIterators
(t *testing.T, prefix string, expectedKeys []string, iterators ...lib.IteratorI)
store/store_test.go:145
↓ 8 callersMethodAddTransactions
whether the mempool has this transaction already (de-duplicated by hash)
lib/mempool.go:19
↓ 8 callersMethodBytes
Bytes() gives the protobuf bytes representation of the private key
lib/crypto/bls.go:79
↓ 8 callersFunctionDecodeLengthPrefixed
DecodeLengthPrefixed() decodes a key that is delimited by the length of the segment in a single byte
lib/util.go:803
↓ 8 callersFunctionErrInvalidProtocolVersion
()
fsm/error.go:158
↓ 8 callersFunctionErrUnknownParam
()
fsm/error.go:135
↓ 8 callersMethodError
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 callersMethodGetBlockByHeight
get a block by hash
lib/store.go:71
↓ 8 callersMethodGetBlockHash
GetBlockHash() retrieves the hash from the block
bft/bft.go:871
↓ 8 callersMethodGetCommitteePaginated
GetCommitteePaginated() returns a 'page' of committee members ordered from the highest stake to lowest
fsm/committee.go:251
↓ 8 callersMethodGetDexBatch
GetDexBatch() retrieves a sell batch from the state store
fsm/dex.go:608
↓ 8 callersMethodGetNonSigners
GetNonSigners() returns all non-quorum-certificate-signers save in the state
fsm/byzantine.go:102
↓ 8 callersMethodID
ID() returns the self peer address
p2p/p2p.go:485
↓ 8 callersMethodIsValidDoubleSigner
IsValidDoubleSigner() checks to see if the double signer is valid for this specific height
bft/bft.go:976
↓ 8 callersMethodLoadRootChainId
LoadRootChainId() returns the unique identifier of the root chain
bft/bft.go:955
↓ 8 callersFunctionMarshalJSONIndent
MarshalJSONIndent() serializes a message into an indented JSON byte slice
lib/util.go:459
↓ 8 callersMethodReduced
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 callersMethodRemove
Remove() evicts a peer from the set
p2p/set.go:107
↓ 8 callersMethodSendTo
SendTo() sends a message to a specific peer based on their public key
p2p/set.go:236
↓ 8 callersMethodSendToPeers
SendToPeers() sends a message to all peers
p2p/set.go:252
↓ 8 callersMethodSign
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 callersMethodSignerEnabledAt
SignerEnabledAt() returns true if a signer is enabled at a certain bit
lib/crypto/key.go:63
↓ 8 callersFunctioncheckChainId
(i uint64)
fsm/message_helpers.go:969
↓ 8 callersFunctionfile_consensus_proto_rawDescGZIP
()
lib/consensus.pb.go:694
↓ 8 callersFunctionformatLocaleNumber
(num, minFractionDigits = 0, maxFractionDigits = 2)
cmd/rpc/web/explorer/components/util.js:199
↓ 8 callersMethodfromBytes
fromBytes() creates a new key object from existing encoded key bytes
store/smt.go:973
↓ 8 callersMethodheightAndIdRequest
(routeName string, height, id uint64, ptr any)
cmd/rpc/client.go:1048
↓ 8 callersMethodpaginatedHeightRequest
(routeName string, height uint64, p lib.PageParams, ptr any, filters ...lib.ValidatorFilters)
cmd/rpc/client.go:952
↓ 8 callersFunctionstrFromArgs
strFromArgs() extracts a string from the first argument
cmd/rpc/eth.go:1342
↓ 8 callersMethodwaitTime
waitTime() calculates the waiting time for a specific sleepTime configuration and Round number (helper)
bft/bft.go:752
↓ 8 callersMethodwithStore
withStore() executes a read only store function
cmd/rpc/query.go:940
↓ 7 callersFunctionAppend
Append() is a 'safe append' when the caller wants to re-use the 'a' slice
lib/util.go:945
↓ 7 callersMethodDial
Dial() tries to establish an outbound connection with a peer candidate
p2p/p2p.go:252
↓ 7 callersFunctionDownscaleTo6Decimals
DownscaleTo6Decimals converts from 18-decimal unit (Ethereum RPC) to 6-decimal (Canopy native)
fsm/ethereum.go:236
↓ 7 callersFunctionErrNilBlock
()
lib/error.go:383
↓ 7 callersFunctionGenerateVDF
* 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 callersMethodGetAll
GetAll() returns a snapshot of all peers in the book
p2p/book.go:285
↓ 7 callersMethodGetCommitteeData
GetCommitteeData() is a convenience function to retrieve the committee data from the master list
fsm/committee.go:480
↓ 7 callersMethodGetOrder
GetOrder() gets the sell order from state
fsm/swap.go:279
↓ 7 callersMethodHas
Has() returns if the set has a peer with a specific public key
p2p/set.go:274
↓ 7 callersFunctionNewAddressFromString
NewAddressFromString() returns the hex string implementation of an AddressI interface
lib/crypto/address.go:32
↓ 7 callersFunctionNewMultiBLSFromPoints
NewMultiBLSFromPoints() creates a multi public key from a list of G1 points on a BLS12381 curve
lib/crypto/bls.go:264
↓ 7 callersFunctionNewProtocolVersion
NewProtocolVersion() creates a properly formatted protocol version string
fsm/gov_params.go:197
↓ 7 callersMethodRoot
wrap the store in a discardable nested store
lib/store.go:16
↓ 7 callersMethodSet
Set() adds or updates the value for a key in the txn operations
store/txn.go:123
↓ 7 callersMethodSetDelegations
SetDelegations() sets the delegate 'membership' for an address, adding to the list and updating the supply pools
fsm/committee.go:375
↓ 7 callersMethodSetReadDeadline
(t time.Time)
p2p/encrypt.go:258
↓ 7 callersMethodSetValidatorUnstaking
UNSTAKING VALIDATORS BELOW SetValidatorUnstaking() updates a Validator as 'unstaking' and removes it from its respective committees NOTE: finish unsta
fsm/validator.go:263
↓ 7 callersMethodStop
Stop() stops the client
cmd/rpc/sock.go:617
↓ 7 callersFunctionValidatorPrefix
()
fsm/key.go:66
↓ 7 callersFunctionVerifyVDF
VerifyVDF() verifies VDF bytes given a seed and iterations
lib/crypto/vdf.go:33
↓ 7 callersMethodbitAt
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 callersFunctioncheckAmount
checkAmount() validates the amount sent in the Message
fsm/message_helpers.go:867
↓ 7 callersFunctionethDataToMsg
ethDataToMsg() converts the ethereum tx data (message proto bytes) to a message
fsm/ethereum.go:170
↓ 7 callersFunctionfile_gov_proto_rawDescGZIP
()
fsm/gov.pb.go:843
↓ 7 callersFunctionfile_peer_proto_rawDescGZIP
()
lib/peer.pb.go:588
← previousnext →201–300 of 5,387, ranked by callers