Atlas Chain
Atlas chain is a truly fast, permissionless, secure and scalable public blockchain platform.
Building atlas requires both a Go (version 1.14 or later) and a C compiler. You can install them using your favourite package manager. Once the dependencies are installed, run
git clone https://github.com/mapprotocol/atlas.git
cd atlas
make atlas
Running atlas
-
Normal node
example command:
atlas <usual-flags> --datadir ./data1 --port 20201 --rpc console
-
Miner node
Notify! It needs to become validator.
It's best not to use
eth,personal
RPC When node is unlocked.If you need to use
eth,personal
RPC, it's best not to let anyone know in case someone transfers money without a password.example command:
atlas <usual-flags> --datadir ./data1 --port 20201 --unlock 0x6c5938b49bacde73a8db7c3a7da208846898bff5 --mine --miner.etherbase 0x6c5938b49bacde73a8db7c3a7da208846898bff5
-
Other help
Going
atlas -h
can get help infos.
Cross Chain Interface
Ethereum
a cross tx on the ethereum mainnet, the relayer which watch the ethereum will capture the tx and send the key information to the map atlas.
key info details:
type CrossTxProve struct {
Tx *BaseParams
Receipt *types.Receipt
Prove light.NodeList
TxIndex uint
}
type BaseParams struct {
From []byte
To []byte
Value *big.Int
}
BaseParams details: cross tx matedata.
parameter | type | comment |
---|---|---|
From | []byte | the sender of the transaction,use ethereum`s common package |
To | []byte | the receiver of the transaction,use ethereum`s common package |
Value | *big.Int | transaction value |
‘CrossTxProve'.'Receipt' is a receipt of the tx from ‘"github.com/ethereum/go-ethereum/core/types"'.
// Receipt represents the results of a transaction.
type Receipt struct {
// Consensus fields: These fields are defined by the Yellow Paper
Type uint8 `json:"type,omitempty"`
PostState []byte `json:"root"`
Status uint64 `json:"status"`
CumulativeGasUsed uint64 `json:"cumulativeGasUsed" gencodec:"required"`
Bloom Bloom `json:"logsBloom" gencodec:"required"`
Logs []*Log `json:"logs" gencodec:"required"`
// Implementation fields: These fields are added by geth when processing a transaction.
// They are stored in the chain database.
TxHash common.Hash `json:"transactionHash" gencodec:"required"`
ContractAddress common.Address `json:"contractAddress"`
GasUsed uint64 `json:"gasUsed" gencodec:"required"`
// Inclusion information: These fields provide information about the inclusion of the
// transaction corresponding to this receipt.
BlockHash common.Hash `json:"blockHash,omitempty"`
BlockNumber *big.Int `json:"blockNumber,omitempty"`
TransactionIndex uint `json:"transactionIndex"`
}
‘CrossTxProve'.'Prove' is a prove generated by the MPT tree composed of receipts of all transactions in the block. the type of ‘Prove' used in ‘"github.com/ethereum/go-ethereum/light"'
// NodeSet stores a set of trie nodes. It implements trie.Database and can also
// act as a cache for another trie.Database.
type NodeSet struct {
nodes map[string][]byte
order []string
dataSize int
lock sync.RWMutex
}
// NewNodeSet creates an empty node set
func NewNodeSet() *NodeSet {
return &NodeSet{
nodes: make(map[string][]byte),
}
}
‘CrossTxProve'.'TxIndex' the index of the current transaction in the block transaction list.