From b67e4865b8c742a351a1a2d6e7f343eebe4d9249 Mon Sep 17 00:00:00 2001 From: Tutus Development Date: Fri, 19 Dec 2025 15:16:29 +0000 Subject: [PATCH] Add single-node consensus configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Create protocol.tutus.single.yml for local development - Update docker-compose to use consensus config with validator wallet - Magic 88890 for single-node, 1-second blocks, 1 validator 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- config/protocol.tutus.single.yml | 57 ++++++++++++++++++++++++++++++++ docker-compose.yml | 5 +-- 2 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 config/protocol.tutus.single.yml diff --git a/config/protocol.tutus.single.yml b/config/protocol.tutus.single.yml new file mode 100644 index 0000000..53232e4 --- /dev/null +++ b/config/protocol.tutus.single.yml @@ -0,0 +1,57 @@ +# Tutus Single-Node Consensus Configuration +# For local development and testing + +ProtocolConfiguration: + Magic: 88890 # Tutus single-node identifier + MaxTraceableBlocks: 200000 + TimePerBlock: 1s + MaxTimePerBlock: 5s + Genesis: + TimePerBlock: 1s + MemPoolSize: 50000 + StandbyCommittee: + - 02b3622bf4017bdfe317c58aed5f4c753f206b7db896046fa7d774bbc4bf7f8dc2 + ValidatorsCount: 1 + SeedList: + - localhost:10333 + VerifyTransactions: true + P2PSigExtensions: true + +ApplicationConfiguration: + SkipBlockVerification: false + DBConfiguration: + Type: "leveldb" + LevelDBOptions: + DataDirectoryPath: "/chains/tutus-single" + P2P: + Addresses: + - ":10333" + DialTimeout: 3s + ProtoTickInterval: 2s + PingInterval: 30s + PingTimeout: 90s + MaxPeers: 10 + AttemptConnPeers: 5 + MinPeers: 0 + Relay: true + Consensus: + Enabled: true + UnlockWallet: + Path: "/wallet.json" + Password: "one" + RPC: + Enabled: true + Addresses: + - ":10332" + MaxGasInvoke: 100 + EnableCORSWorkaround: true + SessionEnabled: true + SessionLifetime: 300s + Prometheus: + Enabled: true + Addresses: + - ":2112" + Pprof: + Enabled: false + Addresses: + - ":2113" diff --git a/docker-compose.yml b/docker-compose.yml index 7b3f346..7122a0f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,4 @@ -# Tutus Testnet - Single Node +# Tutus Single-Node Consensus # Run: docker-compose up -d networks: @@ -19,9 +19,10 @@ services: build: context: . dockerfile: Dockerfile - command: "node --config-file /config/protocol.tutus.testnet.yml --force-timestamp-logs" + command: "node --config-file /config/protocol.tutus.single.yml --force-timestamp-logs" volumes: - tutus_chain:/chains + - ./.docker/wallets/wallet1_solo.json:/wallet.json:ro ports: - "10333:10333" # P2P - "10332:10332" # RPC