package
0.0.0-20240806012525-31387fc58976
Repository: https://github.com/scdoproject/go-scdo.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

BigToAddress converts a big int to address.
BigToDecimal simply changes big int to decimal which will miss additional 0 in the last.
BigToHash converts a big int to Hash.
BytesToAddress converts the specified byte array to Address.
BytesToHash converts bytes to hash value.
ConvertInt64ToBytes converts a int64 value into a byte array.
CopyBytes copies and returns a new bytes from the specified source bytes.
Deserialize wrapper decode.
FileOrFolderExists checks if a file or folder exists.
GetDefaultDataFolder gets the default data Folder.
GetDefaultIPCPath gets the default IPC path.
GetPassword ask user for password interactively.
GetTempFolder gets the temp folder.
HexMustToAddres converts the specified HEX string to address.
HexToAddress converts the specified HEX string to address.
HexToHash return the hash form of the hex.
IsShardEnabled returns true if the LocalShardNumber is set.
LeftPadBytes zero-pads slice to the left up to length l.
MustHexToHash return the hash form of the hex; Panic if there is an error.
MustNewCache creates a LRU cache with specified size.
NewAddress converts a byte slice to a Address.
NewHeap creates a new heap with specified Less func.
PubKeyToAddress converts a ECC public key to an external address.
PubKeyToAddressOld converts a ECC public key to an external address.
RightPadBytes zero-pads slice to the right up to length l.
SaveFile save file.
Serialize wrapper encode.
SerializePanic serialize the input data to byte array.
SetPassword ask user input password twice and get the password interactively.
Shuffle shuffles items in slice.
StringToHash converts a string to the hash.
ValidAccountHex returns true if it is a valid account string.
ValidShard returns true if it is a valid shard number.

# Constants

AddressLen length in bytes.
AddressTypeContract is the address type for contract account.
AddressTypeExternal is the address type for external account.
AddressTypeReserved is the reserved address type for system contract.
BFT data folder.
BFT mineralgorithm.
BlockPackInterval it's an estimate time.
ConfirmedBlockNumber is the block number for confirmed a block, it should be more than 12 in product.
CPUMetricsRefreshTime is the time of metrics monitor cpu.
emery hard fork: update zpow consensus and evm.
EVMStackLimit increase evm stack limit to 8192.
ForkHeight after this height we change the content of block: hardFork.
HashLength the length of hash.
Height: fix the issue caused by forking from collapse database.
No description provided by the author
LightChainDir lightchain data directory based on config.DataRoot.
MetricsRefreshTime is the time of metrics sleep 1 minute.
No description provided by the author
ScdoNodeVersion for simpler display.
ScdoProtoName protoName of Scdo service.
ScdoVersion Version number of Scdo protocol.
ForkHeight after this height we change the content of block: hardFork.
Sha256Algorithm miner algorithm sha256.
ShardByte represents the number of bytes used for shard information, must be smaller than 8.
ShardCount represents the total number of shards.
SmartContractNonceFixHeight fix smart contract nonce bug when user use setNonce.
No description provided by the author
ForkHeight after this height we change the validation of tx: hardFork.
UndefinedShardNumber is the default value if shard number not specified.
No description provided by the author
zpow miner algorithm.

# Variables

Common big integers often used.
Common big integers often used.
Common big integers often used.
Common big integers often used.
Common big integers often used.
Common big integers often used.
Common big integers often used.
EmptyAddress presents an empty address.
EmptyHash empty hash.
ErrOnly0xPrefix the string is invalid length only 0x or 0X prefix.
LocalShardNumber defines the shard number of coinbase.
MaxSystemContractAddress max system contract address.
ScdoToWen base wen coin number.

# Structs

BaseHeapItem is base struct of any heap item.
Heap is a common used heap for generic type purpose.

# Interfaces

HeapItem is implemented by any type that support heap manipulations.

# Type aliases

Address we use public key as node id.
AddressType represents the address type.
Bytes is a array byte that is converted to hex string display format when marshal.
Hash the hash value generated by sha-3.