This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
[[ -z $1 ]] && { echo "Pass [mordor|kotti] as ARG1"; exit 1; } | |
set -e | |
[[ -d $HOME/.faucet ]] && { echo "Backing up exiting .faucet datadir" && mv $HOME/.faucet $HOME/.faucet.bak; } | |
onexit() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"info": { | |
"title": "Lotus RPC API", | |
"version": "1.2.1" | |
}, | |
"methods": [ | |
{ | |
"deprecated": false, | |
"description": "```go\nfunc (c *FullNodeStruct) BeaconGetEntry(ctx context.Context, epoch abi.ChainEpoch) (*types.BeaconEntry, error) {\n\treturn c.Internal.BeaconGetEntry(ctx, epoch)\n}\n```", | |
"externalDocs": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# HTTP | |
curl -X POST $(curl icanhazip.com/v4):8545 --data '{"jsonrpc":"2.0","method":"trace_transaction","params":["0x552280896083bfe801a1f70c84011d1b4195a2c08d2221f80245380775cd6270"],"id":1}' -H "Content-Type: application/json | |
http --json POST http://localhost:8545 id:=$(date +%s) method='rpc_discover' params:='[]' | |
# Websocket | |
echo rpc.discover | websocat -B 650000 -n1 --jsonrpc ws://localhost:8546 | |
# IPC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Logs begin at Mon 2020-11-16 09:00:20 CST, end at Tue 2020-12-01 07:55:24 CST. -- | |
Dec 01 07:46:02 ubp52 systemd[1]: Starting core-geth classic service... | |
Dec 01 07:46:02 ubp52 sh[16822]: INFO [12-01|07:46:02.314|internal/debug/flags.go:212] Starting pprof server addr=http://127.0.0.1:6060/debug/pprof | |
Dec 01 07:46:02 ubp52 sh[16822]: INFO [12-01|07:46:02.314|geth/main.go:317] Starting Geth on Ethereum Classic... | |
Dec 01 07:46:02 ubp52 sh[16822]: INFO [12-01|07:46:02.314|cmd/utils/flags.go:1910] Enabling metrics collection | |
Dec 01 07:46:02 ubp52 sh[16822]: INFO [12-01|07:46:02.314|cmd/utils/flags.go:1930] Enabling stand-alone metrics HTTP endpoint address=0.0.0.0:6060 | |
Dec 01 07:46:02 ubp52 sh[16822]: INFO [12-01|07:46:02.315|metrics/exp/exp.go:62] Starting metrics server addr=http://0.0.0.0:6060/debug/metrics | |
Dec 01 07:46:02 ubp52 sh[16822]: ERROR[12-01|07:46:02.315|metrics/exp/exp.go:65] Failure in running metrics server err="listen tcp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"openrpc": "1.2.6", | |
"info": { | |
"title": "Lotus RPC API", | |
"version": "1.1.2+git.3ccacf2e2.dirty/generated=2020-10-30T10:50:39-05:00" | |
}, | |
"methods": [ | |
{ | |
"name": "Filecoin.BeaconGetEntry", | |
"description": "```go\nfunc (c *FullNodeStruct) BeaconGetEntry(ctx context.Context, epoch abi.ChainEpoch) (*types.BeaconEntry, error) {\n\treturn c.Internal.BeaconGetEntry(ctx, epoch)\n}\n```", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"info": { | |
"title": "Lotus RPC API", | |
"version": "1.2.1" | |
}, | |
"methods": [ | |
{ | |
"deprecated": false, | |
"description": "```go\nfunc (c *FullNodeStruct) BeaconGetEntry(ctx context.Context, epoch abi.ChainEpoch) (*types.BeaconEntry, error) {\n\treturn c.Internal.BeaconGetEntry(ctx, epoch)\n}\n```", | |
"externalDocs": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
cat <<EOF > /etc/systemd/system/coregeth_mordor.service | |
[Unit] | |
Description=CoreGeth Mordor | |
[Service] | |
Type=simple | |
User=root | |
Restart=always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/core/block_validator.go b/core/block_validator.go | |
index 37bea2b246..862ee952cc 100644 | |
--- a/core/block_validator.go | |
+++ b/core/block_validator.go | |
@@ -107,34 +107,19 @@ func (v *BlockValidator) ValidateState(block *types.Block, statedb *state.StateD | |
// ceil if the blocks are full. If the ceil is exceeded, it will always decrease | |
// the gas allowance. | |
func CalcGasLimit(parent *types.Block, gasFloor, gasCeil uint64) uint64 { | |
- // contrib = (parentGasUsed * 3 / 2) / 1024 | |
- contrib := (parent.GasUsed() + parent.GasUsed()/2) / vars.GasLimitBoundDivisor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var hashrateFloor = 20000; | |
for (;true;) { | |
var sleepInterval = 60; | |
if (!eth.mining) { | |
console.log(Date(), "starting miner") | |
miner.start(); | |
sleepInterval = 60*10; | |
} | |
var hashrate = miner.getHashrate(); | |
console.log(Date() , "hashrate", hashrate); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Is swap memory already in use? | |
root@my-computer:~$ free | |
total used free shared buff/cache available | |
Mem: 4039400 2454264 105892 1152 1479244 1346484 | |
Swap: 0 0 0 | |
root@my-computer:~$ touch /var/swap.img | |
root@my-computer:~$ chmod 600 /var/swap.img | |
root@my-computer:~$ swap_megabytes=1000 |
NewerOlder