Compare commits
1 Commits
issue-3056
...
issue-2952
| Author | SHA1 | Date | |
|---|---|---|---|
| bc70451b0c |
102
abcore/mainnet/config.toml
Normal file
102
abcore/mainnet/config.toml
Normal file
@@ -0,0 +1,102 @@
|
||||
[Eth]
|
||||
NetworkId = 36888
|
||||
SyncMode = "snap"
|
||||
EthDiscoveryURLs = []
|
||||
SnapDiscoveryURLs = []
|
||||
NoPruning = false
|
||||
NoPrefetch = false
|
||||
TxLookupLimit = 0
|
||||
TransactionHistory = 0
|
||||
StateHistory = 90000
|
||||
LightPeers = 100
|
||||
DatabaseCache = 512
|
||||
DatabaseFreezer = ""
|
||||
TrieCleanCache = 154
|
||||
TrieDirtyCache = 256
|
||||
TrieTimeout = 3600000000000
|
||||
SnapshotCache = 102
|
||||
Preimages = true
|
||||
FilterLogCacheSize = 32
|
||||
EnablePreimageRecording = false
|
||||
RPCGasCap = 50000000
|
||||
RPCEVMTimeout = 5000000000
|
||||
RPCTxFeeCap = 10000.0
|
||||
|
||||
[Eth.Miner]
|
||||
GasFloor = 0
|
||||
GasCeil = 63000000
|
||||
GasPrice = 50000000000000
|
||||
Recommit = 2000000000
|
||||
NewPayloadTimeout = 2000000000
|
||||
|
||||
[Eth.TxPool]
|
||||
Locals = []
|
||||
NoLocals = true
|
||||
Journal = "transactions.rlp"
|
||||
Rejournal = 3600000000000
|
||||
PriceLimit = 50000000000000
|
||||
PriceBump = 10
|
||||
AccountSlots = 65536
|
||||
GlobalSlots = 1048576
|
||||
AccountQueue = 65536
|
||||
GlobalQueue = 1048576
|
||||
Lifetime = 10800000000000
|
||||
|
||||
[Eth.BlobPool]
|
||||
Datadir = "blobpool"
|
||||
Datacap = 10737418240
|
||||
PriceBump = 100
|
||||
|
||||
[Eth.GPO]
|
||||
Blocks = 20
|
||||
Percentile = 60
|
||||
MaxHeaderHistory = 1024
|
||||
MaxBlockHistory = 1024
|
||||
MaxPrice = 5000000000000000
|
||||
IgnorePrice = 5000000000000000
|
||||
|
||||
[Node]
|
||||
DataDir = "/data"
|
||||
IPCPath = "geth.ipc"
|
||||
HTTPHost = "0.0.0.0"
|
||||
HTTPPort = 8545
|
||||
HTTPVirtualHosts = ["*"]
|
||||
HTTPModules = ["debug", "txpool", "net", "web3", "eth"]
|
||||
AuthAddr = "127.0.0.1"
|
||||
AuthPort = 8551
|
||||
AuthVirtualHosts = ["*"]
|
||||
WSHost = "0.0.0.0"
|
||||
WSPort = 8546
|
||||
WSModules = ["debug", "txpool", "net", "web3", "eth"]
|
||||
GraphQLVirtualHosts = ["*"]
|
||||
BatchRequestLimit = 1000
|
||||
BatchResponseMaxSize = 25000000
|
||||
|
||||
[Node.P2P]
|
||||
MaxPeers = 20
|
||||
NoDiscovery = false
|
||||
DiscoveryV4 = true
|
||||
BootstrapNodes = ["enode://3965529bc8c043ead2fa9d4f235c50b35e3eda45284654a51ddc140ae4a78c8e919cf6a8645e2f48f3089cb579d7d7e90de75544e2faa7ad5300a2c3990a7e5b@54.150.187.191:33333","enode://30cf5e0262b3c1a430183de31063944a6d0164f5ab9c052df942c0f53a635c14b0cea1bcc3b989dbf2297d5939f93165fc8fc817e398fb6b9487fb39a5f342ee@57.182.215.62:33333","enode://ebbb5b7bfb13fb783412e0cc77d390455a4ce7af26c4a129ce4af3e0a91c4ad83ccd84aa85e8bccd50d6d912b2efab4f04f49b57ffcbae03886fbe1c659f98d5@13.159.65.214:33333","enode://0b0bdeff5720854e600025bdea7efb85dd0441e156d5ec32342e6ce192e396b5088cb8427dcdfc6f661632400078960acc9627eaeffc516803e1b4108f184e85@13.112.116.187:33333","enode://12c5dc3ce362f5303b04e426e1ffa1bcad3d09996c95a4fe132edee222b06652f2a3ee0a3b4423a38084767e7fd349177ec4c4f0c9624b3183df3573d08f14be@57.182.84.6:33333"]
|
||||
StaticNodes = []
|
||||
TrustedNodes = []
|
||||
ListenAddr = ":33333"
|
||||
DiscAddr = ""
|
||||
EnableMsgEvents = false
|
||||
|
||||
[Node.HTTPTimeouts]
|
||||
ReadTimeout = 30000000000
|
||||
ReadHeaderTimeout = 30000000000
|
||||
WriteTimeout = 30000000000
|
||||
IdleTimeout = 120000000000
|
||||
|
||||
[Metrics]
|
||||
HTTP = "127.0.0.1"
|
||||
Port = 6060
|
||||
InfluxDBEndpoint = "http://localhost:8386"
|
||||
InfluxDBDatabase = "geth"
|
||||
InfluxDBUsername = "test"
|
||||
InfluxDBPassword = "test"
|
||||
InfluxDBTags = "host=localhost"
|
||||
InfluxDBToken = "test"
|
||||
InfluxDBBucket = "geth"
|
||||
InfluxDBOrganization = "geth"
|
||||
28
abcore/mainnet/genesis.json
Normal file
28
abcore/mainnet/genesis.json
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"config": {
|
||||
"chainId": 36888,
|
||||
"homesteadBlock": 0,
|
||||
"eip150Block": 0,
|
||||
"eip155Block": 0,
|
||||
"eip158Block": 0,
|
||||
"byzantiumBlock": 0,
|
||||
"constantinopleBlock": 0,
|
||||
"petersburgBlock": 0,
|
||||
"istanbulBlock": 0,
|
||||
"muirGlacierBlock": 0,
|
||||
"berlinBlock": 0,
|
||||
"clique": {
|
||||
"period": 3,
|
||||
"epoch": 30000
|
||||
}
|
||||
},
|
||||
"timestamp": "0x67fda368",
|
||||
"difficulty": "1",
|
||||
"gasLimit": "63000000",
|
||||
"extradata": "0x0000000000000000000000000000000000000000000000000000000000000000E9B95948d28EF808a9184d5fC98346EF3e56839c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||
"alloc": {
|
||||
"da8B88027Ac27532E1525DD67974c2377b450A08": {
|
||||
"balance": "100000000000000000000000000000"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,49 +1,64 @@
|
||||
#!/bin/sh
|
||||
# haqq entrypoint — family C, cosmos app with built-in EVM JSON-RPC (C2).
|
||||
# Uses the shared cometbft-common.sh helpers and injects official mainnet seeds.
|
||||
set -e
|
||||
. /usr/local/bin/cometbft-common.sh
|
||||
|
||||
HOME_DIR="/root/.haqqd"
|
||||
CONFIG_DIR="$HOME_DIR/config"
|
||||
CHAINID="${CHAINID:-haqq_11235-1}"
|
||||
CHAINNAME="${CHAINNAME:-mainnet}"
|
||||
API="${API:-eth,txpool,net,debug,web3}"
|
||||
GENESIS_URL="${GENESIS_URL:-https://raw.githubusercontent.com/haqq-network/${CHAINNAME}/master/genesis.json}"
|
||||
ADDRBOOK_URL="${ADDRBOOK_URL:-https://raw.githubusercontent.com/haqq-network/${CHAINNAME}/master/addrbook.json}"
|
||||
set -e # Exit on failure
|
||||
|
||||
# Official HAQQ mainnet seeds
|
||||
SEEDS="861e5892470275a394ebab407e8d62b1931843d3@192.248.181.17:26656,e1b058e5cfa2b836ddaa496b10911da62dcf182e@haqq-seed-de.allnodes.me:26656,e726816f42831689eab9378d5d577f1d06d25716@haqq-seed-us.allnodes.me:26656,0533e20e65912f72f2ad88a4c91eefbc634212d7@haqq-sync.rpc.p2p.world:26656,c45991e0098b9cacb8603caf4e1cdb7e6e5f87c0@eu.seed.haqq.network:26656,e37cb47590ba46b503269ef255873e9698244d8b@us.seed.haqq.network:26656,c593e93e1fb8be8b48d4e7bab514a227aa620bf8@as.seed.haqq.network:26656,0265238d4845e041868d610c100b88f485eeddfb@rpc.haqq.nodestake.top:666"
|
||||
echo "MONIKER: $MONIKER"
|
||||
|
||||
ct_apk curl
|
||||
CHAINID=${CHAINID:-haqq_11235-1}
|
||||
CHAINNAME=${CHAINNAME:-mainnet}
|
||||
API=${API:-eth,net,web3}
|
||||
|
||||
if haqqd init "$MONIKER" --chain-id "$CHAINID" --home "$HOME_DIR"; then
|
||||
ct_log "fresh init; fetching config"
|
||||
ct_fetch "$GENESIS_URL" "$CONFIG_DIR/genesis.json" required
|
||||
ct_fetch "$ADDRBOOK_URL" "$CONFIG_DIR/addrbook.json" optional
|
||||
ct_localize_home "$CONFIG_DIR"
|
||||
ct_set_min_gas_prices "$CONFIG_DIR/app.toml" "0.01hqq"
|
||||
CONFIG_DIR="/root/.haqqd/config"
|
||||
|
||||
# Create config directory
|
||||
mkdir -p "$CONFIG_DIR"
|
||||
|
||||
P2P_STRING="tcp:\\/\\/0\\.0\\.0\\.0\\:${P2P_PORT:-10465}"
|
||||
NAT_STRING="${IP}:${P2P_PORT:-10465}"
|
||||
|
||||
env
|
||||
|
||||
# this goes first because it won't overwrite shit
|
||||
apk add curl
|
||||
if [ $? -ne 0 ]; then exit 1; fi
|
||||
|
||||
if haqqd init ${MONIKER} --chain-id ${CHAINID} --home /root/.haqqd/; then
|
||||
# Define variables
|
||||
GENESIS_URL="https://raw.githubusercontent.com/haqq-network/${CHAINNAME}/master/genesis.json"
|
||||
ADDRESSBOOK_URL="https://raw.githubusercontent.com/haqq-network/${CHAINNAME}/master/addrbook.json"
|
||||
|
||||
# Download config files
|
||||
curl -sL "$GENESIS_URL" -o "$CONFIG_DIR/genesis.json"
|
||||
curl -sL "$ADDRESSBOOK_URL" -o "$CONFIG_DIR/addressbook.json"
|
||||
|
||||
# somehow it's better to make home static to /root
|
||||
sed -i 's|~/|/root/|g' "$CONFIG_DIR/config.toml"
|
||||
sed -i 's|~/|/root/|g' "$CONFIG_DIR/app.toml"
|
||||
else
|
||||
ct_log "already initialized, continuing"
|
||||
echo "Already initialized, continuing!" >&2
|
||||
fi
|
||||
|
||||
# Enable JSON-RPC with correct settings
|
||||
sed -i "/^\[json-rpc\]/,/^\[/{s|^enable = .*|enable = true|}" "$CONFIG_DIR/app.toml"
|
||||
|
||||
# apply a port change to the config
|
||||
sed -i "/^\[p2p\]/,/^\[/{s|^laddr = .*|laddr = \"$P2P_STRING\"|}" "$CONFIG_DIR/config.toml"
|
||||
#sed -i "s/^laddr = \".*\"/laddr = \"$P2P_STRING\"/" "$CONFIG_DIR/config.toml"
|
||||
sed -i "/^\[p2p\]/,/^\[/{s|^external_address = .*|external_address = \"$NAT_STRING\"|}" "$CONFIG_DIR/config.toml"
|
||||
|
||||
#sed -i 's/minimum-gas-prices = ""/minimum-gas-prices = "0.01hqq"/g' $CONFIG_DIR/app.toml
|
||||
|
||||
sed -i -e "s/^pruning *=.*/pruning = \"custom\"/" $CONFIG_DIR/app.toml
|
||||
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" $CONFIG_DIR/app.toml
|
||||
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"19\"/" $CONFIG_DIR/app.toml
|
||||
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $CONFIG_DIR/config.toml
|
||||
|
||||
sed -i "/^\[json-rpc\]/,/^\[/{s|^address = .*|address = \"0.0.0.0:8545\"|}" "$CONFIG_DIR/app.toml"
|
||||
sed -i "/^\[json-rpc\]/,/^\[/{s|^ws-address = .*|ws-address = \"0.0.0.0:8546\"|}" "$CONFIG_DIR/app.toml"
|
||||
sed -i "/^\[json-rpc\]/,/^\[/{s|^metrics-address = .*|metrics-address = \"0.0.0.0:6065\"|}" "$CONFIG_DIR/app.toml"
|
||||
sed -i "/^\[json-rpc\]/,/^\[/{s|^api = .*|api = \"$API\"|}" "$CONFIG_DIR/app.toml"
|
||||
|
||||
# Pruning + indexing settings
|
||||
sed -i -e "s/^pruning *=.*/pruning = \"custom\"/" "$CONFIG_DIR/app.toml"
|
||||
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" "$CONFIG_DIR/app.toml"
|
||||
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"19\"/" "$CONFIG_DIR/app.toml"
|
||||
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" "$CONFIG_DIR/config.toml"
|
||||
# Update moniker if set
|
||||
if [ -n "$MONIKER" ] && [ -f "$CONFIG_DIR/config.toml" ]; then
|
||||
sed -i "s/^moniker = \".*\"/moniker = \"$MONIKER\"/" "$CONFIG_DIR/config.toml"
|
||||
fi
|
||||
|
||||
# P2P: bind 0.0.0.0, advertise IP + port, inject official seeds
|
||||
ct_patch_p2p "$CONFIG_DIR/config.toml" "$IP" "${P2P_PORT:-10465}"
|
||||
ct_merge_seeds "$CONFIG_DIR/config.toml" "$SEEDS"
|
||||
ct_set_moniker "$CONFIG_DIR/config.toml" "$MONIKER"
|
||||
ct_seed_priv_validator_state "$HOME_DIR"
|
||||
|
||||
exec haqqd start --chain-id "$CHAINID" "$@"
|
||||
exec haqqd start --chain-id ${CHAINID} $@
|
||||
|
||||
Reference in New Issue
Block a user