From 56dac74f71d4d1fffa3e240c7d3cee803dec788d Mon Sep 17 00:00:00 2001 From: obscuren Date: Mon, 15 Dec 2014 13:00:09 +0100 Subject: made mist in a compilable, workable state using the new refactored packages --- cmd/mist/main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cmd/mist/main.go') diff --git a/cmd/mist/main.go b/cmd/mist/main.go index 14336b4e8..1c0af5d8c 100644 --- a/cmd/mist/main.go +++ b/cmd/mist/main.go @@ -23,8 +23,8 @@ import ( "runtime" "time" - "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/cmd/utils" + "github.com/ethereum/go-ethereum/eth" "github.com/ethereum/go-ethereum/logger" "gopkg.in/qml.v1" ) @@ -58,8 +58,8 @@ func run() error { // create, import, export keys utils.KeyTasks(keyManager, KeyRing, GenAddr, SecretFile, ExportDir, NonInteractive) - clientIdentity := utils.NewClientIdentity(ClientIdentifier, Version, Identifier) - ethereum = utils.NewEthereum(db, clientIdentity, keyManager, UseUPnP, OutboundPort, MaxPeer) + clientIdentity := utils.NewClientIdentity(ClientIdentifier, Version, Identifier, string(keyManager.PublicKey())) + ethereum := utils.NewEthereum(db, clientIdentity, keyManager, utils.NatType(NatType, PMPGateway), OutboundPort, MaxPeer) if ShowGenesis { utils.ShowGenesis(ethereum) -- cgit v1.2.3 From 52ca80bdd22004525dd1decbf7f9698380bff2be Mon Sep 17 00:00:00 2001 From: obscuren Date: Mon, 15 Dec 2014 21:53:50 +0100 Subject: Fixed deref ptr The gui already waits and shuts down ethereum. There was no need to wait for an additional shutdown. --- cmd/mist/main.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'cmd/mist/main.go') diff --git a/cmd/mist/main.go b/cmd/mist/main.go index 1c0af5d8c..3ea6e8e91 100644 --- a/cmd/mist/main.go +++ b/cmd/mist/main.go @@ -69,6 +69,10 @@ func run() error { utils.StartRpc(ethereum, RpcPort) } + if StartWebSockets { + utils.StartWebSockets(ethereum) + } + gui := NewWindow(ethereum, config, clientIdentity, KeyRing, LogLevel) gui.stdLog = stdLog @@ -100,16 +104,10 @@ func main() { utils.HandleInterrupt() - if StartWebSockets { - utils.StartWebSockets(ethereum) - } - // we need to run the interrupt callbacks in case gui is closed // this skips if we got here by actual interrupt stopping the GUI if !interrupted { utils.RunInterruptCallbacks(os.Interrupt) } - // this blocks the thread - ethereum.WaitForShutdown() logger.Flush() } -- cgit v1.2.3 From f468a9a0e236f8467012ffe35c1d8ff58e30a81a Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 23 Dec 2014 15:46:46 +0100 Subject: Enable websockets for mist. Closes #218 --- cmd/mist/main.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cmd/mist/main.go') diff --git a/cmd/mist/main.go b/cmd/mist/main.go index eaf0af0c7..5f809f1c5 100644 --- a/cmd/mist/main.go +++ b/cmd/mist/main.go @@ -69,6 +69,10 @@ func run() error { utils.StartRpc(ethereum, RpcPort) } + if StartWebSockets { + utils.StartWebSockets(ethereum) + } + gui := NewWindow(ethereum, config, clientIdentity, KeyRing, LogLevel) gui.stdLog = stdLog -- cgit v1.2.3 From 09841b1c9b2553a4572590128580df37c8fa83ad Mon Sep 17 00:00:00 2001 From: obscuren Date: Sun, 4 Jan 2015 14:20:16 +0100 Subject: Cleaned up some of that util --- cmd/mist/main.go | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) (limited to 'cmd/mist/main.go') diff --git a/cmd/mist/main.go b/cmd/mist/main.go index 6f578ff48..cae666d45 100644 --- a/cmd/mist/main.go +++ b/cmd/mist/main.go @@ -26,6 +26,7 @@ import ( "github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/eth" "github.com/ethereum/go-ethereum/logger" + "github.com/ethereum/go-ethereum/p2p" "gopkg.in/qml.v1" ) @@ -35,6 +36,7 @@ const ( ) var ethereum *eth.Ethereum +var mainlogger = logger.NewLogger("MAIN") func run() error { // precedence: code-internal flag default < config file < environment variables < command line @@ -43,27 +45,24 @@ func run() error { tstart := time.Now() config := utils.InitConfig(VmType, ConfigFile, Datadir, "ETH") - utils.InitDataDir(Datadir) - - stdLog := utils.InitLogging(Datadir, LogFile, LogLevel, DebugFile) - - db := utils.NewDatabase() - err := utils.DBSanityCheck(db) + ethereum, err := eth.New(ð.Config{ + Name: ClientIdentifier, + Version: Version, + KeyStore: KeyStore, + DataDir: Datadir, + LogFile: LogFile, + LogLevel: LogLevel, + Identifier: Identifier, + MaxPeers: MaxPeer, + Port: OutboundPort, + NATType: PMPGateway, + PMPGateway: PMPGateway, + KeyRing: KeyRing, + }) if err != nil { - ErrorWindow(err) - - os.Exit(1) - } - keyManager := utils.NewKeyManager(KeyStore, Datadir, db) - - // create, import, export keys - utils.KeyTasks(keyManager, KeyRing, GenAddr, SecretFile, ExportDir, NonInteractive) - clientIdentity := utils.NewClientIdentity(ClientIdentifier, Version, Identifier, string(keyManager.PublicKey())) - ethereum := utils.NewEthereum(db, clientIdentity, keyManager, utils.NatType(NatType, PMPGateway), OutboundPort, MaxPeer) - - if ShowGenesis { - utils.ShowGenesis(ethereum) + mainlogger.Fatalln(err) } + utils.KeyTasks(ethereum.KeyManager(), KeyRing, GenAddr, SecretFile, ExportDir, NonInteractive) if StartRpc { utils.StartRpc(ethereum, RpcPort) @@ -73,8 +72,7 @@ func run() error { utils.StartWebSockets(ethereum) } - gui := NewWindow(ethereum, config, clientIdentity, KeyRing, LogLevel) - gui.stdLog = stdLog + gui := NewWindow(ethereum, config, ethereum.ClientIdentity().(*p2p.SimpleClientIdentity), KeyRing, LogLevel) utils.RegisterInterrupt(func(os.Signal) { gui.Stop() -- cgit v1.2.3 From 08b03afa4bb3a40d2faf6543bc884a8ece5be2a1 Mon Sep 17 00:00:00 2001 From: obscuren Date: Sun, 4 Jan 2015 14:28:08 +0100 Subject: Version bump --- cmd/mist/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd/mist/main.go') diff --git a/cmd/mist/main.go b/cmd/mist/main.go index cae666d45..ce5e8449a 100644 --- a/cmd/mist/main.go +++ b/cmd/mist/main.go @@ -32,7 +32,7 @@ import ( const ( ClientIdentifier = "Mist" - Version = "0.7.11" + Version = "0.8.0" ) var ethereum *eth.Ethereum -- cgit v1.2.3 From c9985bf563888d5f346408d2ff174167e8b65880 Mon Sep 17 00:00:00 2001 From: obscuren Date: Mon, 5 Jan 2015 19:53:53 +0100 Subject: Fixed peer window. Minor tweaks and fixes --- cmd/mist/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cmd/mist/main.go') diff --git a/cmd/mist/main.go b/cmd/mist/main.go index ce5e8449a..b8b58a36a 100644 --- a/cmd/mist/main.go +++ b/cmd/mist/main.go @@ -32,7 +32,7 @@ import ( const ( ClientIdentifier = "Mist" - Version = "0.8.0" + Version = "0.8.1" ) var ethereum *eth.Ethereum @@ -58,6 +58,7 @@ func run() error { NATType: PMPGateway, PMPGateway: PMPGateway, KeyRing: KeyRing, + Dial: true, }) if err != nil { mainlogger.Fatalln(err) -- cgit v1.2.3 From 117f66e82375b752cc6a9ff22aa0d398ac337bb4 Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 6 Jan 2015 12:13:57 +0100 Subject: Added license headers --- cmd/mist/main.go | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) (limited to 'cmd/mist/main.go') diff --git a/cmd/mist/main.go b/cmd/mist/main.go index b8b58a36a..eb0a80add 100644 --- a/cmd/mist/main.go +++ b/cmd/mist/main.go @@ -1,20 +1,23 @@ -// Copyright (c) 2013-2014, Jeffrey Wilcke. All rights reserved. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -// MA 02110-1301 USA - +/* + This file is part of go-ethereum + + go-ethereum is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + go-ethereum is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with go-ethereum. If not, see . +*/ +/** + * @authors + * Jeffrey Wilcke + */ package main import ( -- cgit v1.2.3 From a38bca3438960ab1eec6a522eebc6622a1096881 Mon Sep 17 00:00:00 2001 From: Taylor Gerring Date: Tue, 27 Jan 2015 12:40:52 -0600 Subject: Add wsport flag to Mist --- cmd/mist/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd/mist/main.go') diff --git a/cmd/mist/main.go b/cmd/mist/main.go index eb0a80add..bcfb7f2ec 100644 --- a/cmd/mist/main.go +++ b/cmd/mist/main.go @@ -73,7 +73,7 @@ func run() error { } if StartWebSockets { - utils.StartWebSockets(ethereum) + utils.StartWebSockets(ethereum, WsPort) } gui := NewWindow(ethereum, config, ethereum.ClientIdentity().(*p2p.SimpleClientIdentity), KeyRing, LogLevel) -- cgit v1.2.3 From fb7c03ff4dc759f7dd2fc5cee65b46111cbb7375 Mon Sep 17 00:00:00 2001 From: obscuren Date: Wed, 28 Jan 2015 14:51:54 +0100 Subject: switched to obscuren/qml --- cmd/mist/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd/mist/main.go') diff --git a/cmd/mist/main.go b/cmd/mist/main.go index eb0a80add..376a52576 100644 --- a/cmd/mist/main.go +++ b/cmd/mist/main.go @@ -30,7 +30,7 @@ import ( "github.com/ethereum/go-ethereum/eth" "github.com/ethereum/go-ethereum/logger" "github.com/ethereum/go-ethereum/p2p" - "gopkg.in/qml.v1" + "github.com/obscuren/qml" ) const ( -- cgit v1.2.3 From cebb149f5cfaf008240d7069fd220401950cc7ee Mon Sep 17 00:00:00 2001 From: obscuren Date: Wed, 28 Jan 2015 20:50:09 +0100 Subject: removed key while in the process of moving to the new key storage --- cmd/mist/main.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cmd/mist/main.go') diff --git a/cmd/mist/main.go b/cmd/mist/main.go index 6732d5aaa..ea984a4b5 100644 --- a/cmd/mist/main.go +++ b/cmd/mist/main.go @@ -30,6 +30,7 @@ import ( "github.com/ethereum/go-ethereum/eth" "github.com/ethereum/go-ethereum/logger" "github.com/ethereum/go-ethereum/p2p" + "github.com/ethereum/go-ethereum/ui/qt/webengine" "github.com/obscuren/qml" ) @@ -42,6 +43,8 @@ var ethereum *eth.Ethereum var mainlogger = logger.NewLogger("MAIN") func run() error { + webengine.Initialize() + // precedence: code-internal flag default < config file < environment variables < command line Init() // parsing command line -- cgit v1.2.3 From 3847e248dfc36dbc9d63f5388ad771a665dff793 Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 30 Jan 2015 14:37:07 +0100 Subject: Bumped version number --- cmd/mist/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd/mist/main.go') diff --git a/cmd/mist/main.go b/cmd/mist/main.go index ea984a4b5..a66288a3e 100644 --- a/cmd/mist/main.go +++ b/cmd/mist/main.go @@ -36,7 +36,7 @@ import ( const ( ClientIdentifier = "Mist" - Version = "0.8.1" + Version = "0.8.2" ) var ethereum *eth.Ethereum -- cgit v1.2.3 From 1f4ed49b4c3400c8f567a29c70d4fb26df97f305 Mon Sep 17 00:00:00 2001 From: Taylor Gerring Date: Mon, 2 Feb 2015 13:04:00 -0600 Subject: Move hardcoded seed node address to app flag Replaces functionality `-seed=true` with `-seed="ip:port"` --- cmd/mist/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd/mist/main.go') diff --git a/cmd/mist/main.go b/cmd/mist/main.go index a66288a3e..66872a241 100644 --- a/cmd/mist/main.go +++ b/cmd/mist/main.go @@ -84,7 +84,7 @@ func run() error { utils.RegisterInterrupt(func(os.Signal) { gui.Stop() }) - go utils.StartEthereum(ethereum, UseSeed) + go utils.StartEthereum(ethereum, SeedNode) fmt.Println("ETH stack took", time.Since(tstart)) -- cgit v1.2.3 From 56f777b2fc77275bc636562b66a08b19afe2ec56 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Thu, 5 Feb 2015 03:16:16 +0100 Subject: cmd/ethereum, cmd/mist, core, eth, javascript, xeth: fixes for new p2p API --- cmd/mist/main.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'cmd/mist/main.go') diff --git a/cmd/mist/main.go b/cmd/mist/main.go index 66872a241..17ab9467a 100644 --- a/cmd/mist/main.go +++ b/cmd/mist/main.go @@ -52,13 +52,11 @@ func run() error { config := utils.InitConfig(VmType, ConfigFile, Datadir, "ETH") ethereum, err := eth.New(ð.Config{ - Name: ClientIdentifier, - Version: Version, + Name: p2p.MakeName(ClientIdentifier, Version), KeyStore: KeyStore, DataDir: Datadir, LogFile: LogFile, LogLevel: LogLevel, - Identifier: Identifier, MaxPeers: MaxPeer, Port: OutboundPort, NATType: PMPGateway, @@ -79,7 +77,7 @@ func run() error { utils.StartWebSockets(ethereum, WsPort) } - gui := NewWindow(ethereum, config, ethereum.ClientIdentity().(*p2p.SimpleClientIdentity), KeyRing, LogLevel) + gui := NewWindow(ethereum, config, KeyRing, LogLevel) utils.RegisterInterrupt(func(os.Signal) { gui.Stop() -- cgit v1.2.3 From 028775a0863946c1e9ad51fe7b22faa5c59b2605 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Sat, 7 Feb 2015 00:38:36 +0100 Subject: cmd/ethereum, cmd/mist: add flag for discovery bootstrap nodes --- cmd/mist/main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cmd/mist/main.go') diff --git a/cmd/mist/main.go b/cmd/mist/main.go index 17ab9467a..5bae33088 100644 --- a/cmd/mist/main.go +++ b/cmd/mist/main.go @@ -59,8 +59,9 @@ func run() error { LogLevel: LogLevel, MaxPeers: MaxPeer, Port: OutboundPort, - NATType: PMPGateway, + NATType: NatType, PMPGateway: PMPGateway, + BootNodes: BootNodes, KeyRing: KeyRing, Dial: true, }) @@ -82,7 +83,7 @@ func run() error { utils.RegisterInterrupt(func(os.Signal) { gui.Stop() }) - go utils.StartEthereum(ethereum, SeedNode) + go utils.StartEthereum(ethereum) fmt.Println("ETH stack took", time.Since(tstart)) -- cgit v1.2.3 From a3cd2187194b79cd8b14c4ec4f1abca91a0147e0 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Tue, 10 Feb 2015 12:30:09 +0100 Subject: cmd/mist, cmd/ethereum: add CLI arguments for node key --- cmd/mist/main.go | 1 + 1 file changed, 1 insertion(+) (limited to 'cmd/mist/main.go') diff --git a/cmd/mist/main.go b/cmd/mist/main.go index 5bae33088..4d6bac9b7 100644 --- a/cmd/mist/main.go +++ b/cmd/mist/main.go @@ -62,6 +62,7 @@ func run() error { NATType: NatType, PMPGateway: PMPGateway, BootNodes: BootNodes, + NodeKey: NodeKey, KeyRing: KeyRing, Dial: true, }) -- cgit v1.2.3 From d0a2e655c9599f462bb20bd49bc69b8e1e330a21 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Wed, 11 Feb 2015 17:19:31 +0100 Subject: cmd/ethereum, cmd/mist, eth, p2p: use package p2p/nat This deletes the old NAT implementation. --- cmd/mist/main.go | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'cmd/mist/main.go') diff --git a/cmd/mist/main.go b/cmd/mist/main.go index 4d6bac9b7..52b5e4e94 100644 --- a/cmd/mist/main.go +++ b/cmd/mist/main.go @@ -52,19 +52,18 @@ func run() error { config := utils.InitConfig(VmType, ConfigFile, Datadir, "ETH") ethereum, err := eth.New(ð.Config{ - Name: p2p.MakeName(ClientIdentifier, Version), - KeyStore: KeyStore, - DataDir: Datadir, - LogFile: LogFile, - LogLevel: LogLevel, - MaxPeers: MaxPeer, - Port: OutboundPort, - NATType: NatType, - PMPGateway: PMPGateway, - BootNodes: BootNodes, - NodeKey: NodeKey, - KeyRing: KeyRing, - Dial: true, + Name: p2p.MakeName(ClientIdentifier, Version), + KeyStore: KeyStore, + DataDir: Datadir, + LogFile: LogFile, + LogLevel: LogLevel, + MaxPeers: MaxPeer, + Port: OutboundPort, + NAT: NAT, + BootNodes: BootNodes, + NodeKey: NodeKey, + KeyRing: KeyRing, + Dial: true, }) if err != nil { mainlogger.Fatalln(err) -- cgit v1.2.3 From 790de35e7ff5235c83e081faf00aff35640cdcc6 Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 13 Feb 2015 17:57:46 +0100 Subject: Fixed issue in peer window * Fixed issues where new peer window could cause a crash when entering an empty string --- cmd/mist/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd/mist/main.go') diff --git a/cmd/mist/main.go b/cmd/mist/main.go index 52b5e4e94..32222fbef 100644 --- a/cmd/mist/main.go +++ b/cmd/mist/main.go @@ -36,7 +36,7 @@ import ( const ( ClientIdentifier = "Mist" - Version = "0.8.2" + Version = "0.8.3" ) var ethereum *eth.Ethereum -- cgit v1.2.3 From 05b1ec008b771d9856e83a6269a5267eb18e1f51 Mon Sep 17 00:00:00 2001 From: obscuren Date: Wed, 18 Feb 2015 11:42:01 +0100 Subject: Disabled ability to disable whisper. Closes #334 --- cmd/mist/main.go | 1 + 1 file changed, 1 insertion(+) (limited to 'cmd/mist/main.go') diff --git a/cmd/mist/main.go b/cmd/mist/main.go index 32222fbef..14f561e99 100644 --- a/cmd/mist/main.go +++ b/cmd/mist/main.go @@ -60,6 +60,7 @@ func run() error { MaxPeers: MaxPeer, Port: OutboundPort, NAT: NAT, + Shh: true, BootNodes: BootNodes, NodeKey: NodeKey, KeyRing: KeyRing, -- cgit v1.2.3 From 5aff8bfb5918e53ba2590b25e6c17e1875870f6a Mon Sep 17 00:00:00 2001 From: Maran Date: Thu, 19 Feb 2015 10:38:36 +0100 Subject: Implement command line argument to set the amount of agents created by the miner Defaults to the amount of cores available on the CPU --- cmd/mist/main.go | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'cmd/mist/main.go') diff --git a/cmd/mist/main.go b/cmd/mist/main.go index 14f561e99..d41aa34bf 100644 --- a/cmd/mist/main.go +++ b/cmd/mist/main.go @@ -52,19 +52,20 @@ func run() error { config := utils.InitConfig(VmType, ConfigFile, Datadir, "ETH") ethereum, err := eth.New(ð.Config{ - Name: p2p.MakeName(ClientIdentifier, Version), - KeyStore: KeyStore, - DataDir: Datadir, - LogFile: LogFile, - LogLevel: LogLevel, - MaxPeers: MaxPeer, - Port: OutboundPort, - NAT: NAT, - Shh: true, - BootNodes: BootNodes, - NodeKey: NodeKey, - KeyRing: KeyRing, - Dial: true, + Name: p2p.MakeName(ClientIdentifier, Version), + KeyStore: KeyStore, + DataDir: Datadir, + LogFile: LogFile, + LogLevel: LogLevel, + MaxPeers: MaxPeer, + Port: OutboundPort, + NAT: NAT, + Shh: true, + BootNodes: BootNodes, + NodeKey: NodeKey, + KeyRing: KeyRing, + Dial: true, + MinerThreads: MinerThreads, }) if err != nil { mainlogger.Fatalln(err) -- cgit v1.2.3 From cc43ab9a810125239636143a91609389b19b49c7 Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 20 Feb 2015 18:05:46 +0100 Subject: Minor updates for release --- cmd/mist/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd/mist/main.go') diff --git a/cmd/mist/main.go b/cmd/mist/main.go index d41aa34bf..c7152347d 100644 --- a/cmd/mist/main.go +++ b/cmd/mist/main.go @@ -36,7 +36,7 @@ import ( const ( ClientIdentifier = "Mist" - Version = "0.8.3" + Version = "0.9.0" ) var ethereum *eth.Ethereum -- cgit v1.2.3