From 0f26a623349e7b01298d121e058ccbf067c4906a Mon Sep 17 00:00:00 2001 From: obscuren Date: Sun, 15 Mar 2015 12:19:26 +0100 Subject: [PATCH 1/5] Linux build links --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index bf4bf341b..a4e126a6e 100644 --- a/README.md +++ b/README.md @@ -47,10 +47,12 @@ If you intend to develop on go-ethereum, check the [Developers' Guide](https://g Automated (dev) builds ====================== -* [[Docker](https://registry.hub.docker.com/u/ethereum/client-go/)] -* [[OS X](http://build.ethdev.com/builds/OSX%20Go%20develop%20branch/Mist-OSX-latest.dmg)] +* [Docker](https://registry.hub.docker.com/u/ethereum/client-go/) +* [OS X](http://build.ethdev.com/builds/OSX%20Go%20develop%20branch/Mist-OSX-latest.dmg) +* Ubuntu + [Trusty](https://build.ethdev.com/builds/Linux%20Go%20develop%20deb%20i386-trusty/latest/ethereum-cli_0.9.0%2B192SNAPSHOT20150314224122trusty-0ubuntu1_i386.deb) + [utopic](https://build.ethdev.com/builds/Linux%20Go%20develop%20deb%20i386-utopic/latest/ethereum-cli_0.9.0%2B194SNAPSHOT20150314224124utopic-0ubuntu1_i386.deb) * [Windows] Coming soon™ -* [Linux] Coming soon™ Executables =========== From 8f84ddbbec307da961e8e3ee51749ab62424fa82 Mon Sep 17 00:00:00 2001 From: obscuren Date: Sun, 15 Mar 2015 12:19:26 +0100 Subject: [PATCH 2/5] Linux build links --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index bf4bf341b..72d639444 100644 --- a/README.md +++ b/README.md @@ -47,10 +47,12 @@ If you intend to develop on go-ethereum, check the [Developers' Guide](https://g Automated (dev) builds ====================== -* [[Docker](https://registry.hub.docker.com/u/ethereum/client-go/)] -* [[OS X](http://build.ethdev.com/builds/OSX%20Go%20develop%20branch/Mist-OSX-latest.dmg)] +* [Docker](https://registry.hub.docker.com/u/ethereum/client-go/) +* [OS X](http://build.ethdev.com/builds/OSX%20Go%20develop%20branch/Mist-OSX-latest.dmg) +* Ubuntu + [Trusty](https://build.ethdev.com/builds/Linux%20Go%20develop%20deb%20i386-trusty/latest/ethereum-cli_0.9.0%2B192SNAPSHOT20150314224122trusty-0ubuntu1_i386.deb) | + [utopic](https://build.ethdev.com/builds/Linux%20Go%20develop%20deb%20i386-utopic/latest/ethereum-cli_0.9.0%2B194SNAPSHOT20150314224124utopic-0ubuntu1_i386.deb) * [Windows] Coming soon™ -* [Linux] Coming soon™ Executables =========== From d2e75cc957b6f617fe17459dcaff90acf19762a1 Mon Sep 17 00:00:00 2001 From: obscuren Date: Sun, 15 Mar 2015 15:25:09 +0100 Subject: [PATCH 3/5] cleaning up unused code --- ethutil/rand.go | 24 ------------------------ ethutil/rand_test.go | 17 ----------------- ethutil/script_unix.go | 19 ------------------- ethutil/script_windows.go | 12 ------------ ethutil/set.go | 36 ------------------------------------ 5 files changed, 108 deletions(-) delete mode 100644 ethutil/rand.go delete mode 100644 ethutil/rand_test.go delete mode 100644 ethutil/script_unix.go delete mode 100644 ethutil/script_windows.go delete mode 100644 ethutil/set.go diff --git a/ethutil/rand.go b/ethutil/rand.go deleted file mode 100644 index 91dafec7e..000000000 --- a/ethutil/rand.go +++ /dev/null @@ -1,24 +0,0 @@ -package ethutil - -import ( - "crypto/rand" - "encoding/binary" - "io" -) - -func randomUint64(r io.Reader) (uint64, error) { - b := make([]byte, 8) - n, err := r.Read(b) - if n != len(b) { - return 0, io.ErrShortBuffer - } - if err != nil { - return 0, err - } - return binary.BigEndian.Uint64(b), nil -} - -// RandomUint64 returns a cryptographically random uint64 value. -func RandomUint64() (uint64, error) { - return randomUint64(rand.Reader) -} diff --git a/ethutil/rand_test.go b/ethutil/rand_test.go deleted file mode 100644 index c12698538..000000000 --- a/ethutil/rand_test.go +++ /dev/null @@ -1,17 +0,0 @@ -package ethutil - -import ( - checker "gopkg.in/check.v1" -) - -type RandomSuite struct{} - -var _ = checker.Suite(&RandomSuite{}) - -func (s *RandomSuite) TestRandomUint64(c *checker.C) { - res1, _ := RandomUint64() - res2, _ := RandomUint64() - c.Assert(res1, checker.NotNil) - c.Assert(res2, checker.NotNil) - c.Assert(res1, checker.Not(checker.Equals), res2) -} diff --git a/ethutil/script_unix.go b/ethutil/script_unix.go deleted file mode 100644 index 9250dda57..000000000 --- a/ethutil/script_unix.go +++ /dev/null @@ -1,19 +0,0 @@ -// +build !windows - -package ethutil - -import "github.com/ethereum/serpent-go" - -// General compile function -func Compile(script string, silent bool) (ret []byte, err error) { - if len(script) > 2 { - byteCode, err := serpent.Compile(script) - if err != nil { - return nil, err - } - - return byteCode, nil - } - - return nil, nil -} diff --git a/ethutil/script_windows.go b/ethutil/script_windows.go deleted file mode 100644 index 1dedc5f60..000000000 --- a/ethutil/script_windows.go +++ /dev/null @@ -1,12 +0,0 @@ -// +build windows - -package ethutil - -// General compile function -func Compile(script string, silent bool) (ret []byte, err error) { - if len(script) > 2 { - return nil, nil - } - - return nil, nil -} diff --git a/ethutil/set.go b/ethutil/set.go deleted file mode 100644 index 7955edac0..000000000 --- a/ethutil/set.go +++ /dev/null @@ -1,36 +0,0 @@ -package ethutil - -type Settable interface { - AsSet() UniqueSet -} - -type Stringable interface { - String() string -} - -type UniqueSet map[string]struct{} - -func NewSet(v ...Stringable) UniqueSet { - set := make(UniqueSet) - for _, val := range v { - set.Insert(val) - } - - return set -} - -func (self UniqueSet) Insert(k Stringable) UniqueSet { - self[k.String()] = struct{}{} - - return self -} - -func (self UniqueSet) Include(k Stringable) bool { - _, ok := self[k.String()] - - return ok -} - -func Set(s Settable) UniqueSet { - return s.AsSet() -} From 22fa59f131e67f6b8d04a12abbd82652b2c65d21 Mon Sep 17 00:00:00 2001 From: obscuren Date: Sun, 15 Mar 2015 21:47:35 +0100 Subject: [PATCH 4/5] moved to detail --- blockpool/blockpool.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blockpool/blockpool.go b/blockpool/blockpool.go index c3e20801a..bc998cd7b 100644 --- a/blockpool/blockpool.go +++ b/blockpool/blockpool.go @@ -199,7 +199,7 @@ func (self *BlockPool) Start() { case <-self.quit: return case <-timer.C: - plog.Debugf("status:\n%v", self.Status()) + plog.DebugDetailf("status:\n%v", self.Status()) } } }() From 0b8f66ed9ef177dc72442dd7ba337c6733e30344 Mon Sep 17 00:00:00 2001 From: obscuren Date: Sun, 15 Mar 2015 21:47:59 +0100 Subject: [PATCH 5/5] updated godep ethash --- Godeps/Godeps.json | 4 ++-- Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 988c21d4f..e6eab504d 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -22,8 +22,8 @@ }, { "ImportPath": "github.com/ethereum/ethash", - "Comment": "v23-11-g5376ec8", - "Rev": "5376ec8816d6bf787d4fc91a08b4527bc5e1f469" + "Comment": "v23-12-g149261a", + "Rev": "149261a5d7cafc3943cbcf1d370082ec70d81e8b" }, { "ImportPath": "github.com/ethereum/serpent-go", diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go b/Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go index 6f1302bb8..1f615058d 100644 --- a/Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go +++ b/Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go @@ -102,7 +102,9 @@ func makeParamsAndCache(chainManager pow.ChainManager, blockNum uint64) (*Params func (pow *Ethash) UpdateCache(force bool) error { pow.cacheMutex.Lock() - thisEpoch := pow.chainManager.CurrentBlock().NumberU64() + defer pow.cacheMutex.Unlock() + + thisEpoch := pow.chainManager.CurrentBlock().NumberU64() / epochLength if force || pow.paramsAndCache.Epoch != thisEpoch { var err error pow.paramsAndCache, err = makeParamsAndCache(pow.chainManager, pow.chainManager.CurrentBlock().NumberU64()) @@ -110,7 +112,7 @@ func (pow *Ethash) UpdateCache(force bool) error { panic(err) } } - pow.cacheMutex.Unlock() + return nil }