Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

params/(confp|types): implement Aleth conversion test #92

Merged
merged 178 commits into from
Jan 2, 2020

Conversation

meowsbits
Copy link
Member

Fixes unmarshaling logic in genesis json umarshaler.

Signed-off-by: meows b5c6@protonmail.com

holiman and others added 30 commits November 17, 2019 15:10
Make it possible to load input from a file. Simlar to `--code` / `--codefile`, have `--input`/`--inputfile`.
* rpc: improve codec abstraction

rpc.ServerCodec is an opaque interface. There was only one way to get a
codec using existing APIs: rpc.NewJSONCodec. This change exports
newCodec (as NewFuncCodec) and NewJSONCodec (as NewCodec). It also makes
all codec methods non-public to avoid showing internals in godoc.

While here, remove codec options in tests because they are not
supported anymore.

* p2p/simulations: use github.com/gorilla/websocket

This package was the last remaining user of golang.org/x/net/websocket.
Migrating to the new library wasn't straightforward because it is no
longer possible to treat WebSocket connections as a net.Conn.

* vendor: delete golang.org/x/net/websocket

* rpc: fix godoc comments and run gofmt
* build: use golangci-lint

This changes build/ci.go to download and run golangci-lint instead
of gometalinter.

* core/state: fix unnecessary conversion

* p2p/simulations: fix lock copying (found by go vet)

* signer/core: fix unnecessary conversions

* crypto/ecies: remove unused function cmpPublic

* core/rawdb: remove unused function print

* core/state: remove unused function xTestFuzzCutter

* core/vm: disable TestWriteExpectedValues in a different way

* core/forkid: remove unused function checksum

* les: remove unused type proofsData

* cmd/utils: remove unused functions prefixedNames, prefixFor

* crypto/bn256: run goimports

* p2p/nat: fix goimports lint issue

* cmd/clef: avoid using unkeyed struct fields

* les: cancel context in testRequest

* rlp: delete unreachable code

* core: gofmt

* internal/build: simplify DownloadFile for Go 1.11 compatibility

* build: remove go test --short flag

* .travis.yml: disable build cache

* whisper/whisperv6: fix ineffectual assignment in TestWhisperIdentityManagement

* .golangci.yml: enable goconst and ineffassign linters

* build: print message when there are no lint issues

* internal/build: refactor download a bit
* travis: remove debug traces

* travis: Add travis_wait to the test run

* travis: increase travis_wait time
…(#20300)

* core: s/isEIP155/isEIP2/ (fix)

This signature variable name reflects a spec'd change
in gas cost for creating contracts as documented in EIP2 (Homestead HF).

https://github.com/ethereum/EIPs/blob/master/EIPS/eip-2.md#specification

* core: s/isEIP2/sIsHomestead/g

Use isHomestead since Homestead is what the caller
and rest of the code uses.
Adds flags akin to -coverage flag enabling the test runner
to use go test's -v flag, signaling verbose test log output.
This PR introduces clique_status which gives info about the health of
the clique network.

It's currently a bit PITA to find out how a clique network is
performing, and it can easily happen that sealers drop off -- and
everything is 'fine' until one more signer drops off, and the network
suddenly halts.

The new method provides the following stats:

- Which signers are currently active, and have signed blocks in the last
  N (set to 64) blocks?
- How many blocks has each signer signed?
- What is the difficulty in the last N blocks, compared to the
  theoretical maximum?
* core/rawdb: check hash before return data from ancient db

* core/rawdb: fix lint

* core/rawdb: calculate the hash in the fly
…ht client (#20318)

Also fix the input formatter on clique_getSnapshot and clique_getSigners
so that integers as well as hex number strings are accepted.
* rpc: remove 'exported or builtin' restriction for parameters

There is no technial reason for this restriction because package reflect
can create values of any type. Requiring parameters and return values to
be exported causes a lot of noise in package exports.

* rpc: fix staticcheck warnings
* miner: fix data race in tests

miner: fix linter

* miner: address comment
internal/ethapi: don't query wallets at every execution of gas estimation
This package only contained genesis data types and logic.
Refactored these files to genesis package at subdir.

This should help with goimports naming ugliness, which
doesn't love the named import paramtypes as params/types.

Signed-off-by: meows <b5c6@protonmail.com>
T stands for Type. This avoids name collisions with
vars name 'genesis' which are common.

Signed-off-by: meows <b5c6@protonmail.com>
Signed-off-by: meows <b5c6@protonmail.com>
Signed-off-by: meows <b5c6@protonmail.com>
Signed-off-by: meows <b5c6@protonmail.com>
Signed-off-by: meows <b5c6@protonmail.com>
Signed-off-by: meows <b5c6@protonmail.com>
Signed-off-by: meows <b5c6@protonmail.com>
Signed-off-by: meows <b5c6@protonmail.com>
…ange loop

Signed-off-by: meows <b5c6@protonmail.com>
Signed-off-by: meows <b5c6@protonmail.com>
Signed-off-by: meows <b5c6@protonmail.com>
…ing keys

Parity data type for builtin pricing activation rules
allow for duplicate keys, both in literal and decoded values.
In case of duplicate decoded values (literally strings),
according to JSON specification, lexicographically succeeding
values should overwrite earlier ones.

This implementation uses sort.Strings to take of this.

Signed-off-by: meows <b5c6@protonmail.com>
Hoping for bottom-wins JSON unmarshaling of a
map keyed on strings with duplicate fields, and not
wanting to use string pointers to really get too
far in to the thick of it.

Signed-off-by: meows <b5c6@protonmail.com>
meowsbits and others added 13 commits January 1, 2020 11:06
- Uses a throwaway method receiver var name for clarity
that that value is not used
- Renames 'One' method name to 'GlobalConfigurator'
- Initializes a single pointer value for empty global
configurator instead of allocating new for each use.

Resolves
etclabscore/core-geth#91 (comment)

Resolves
etclabscore/core-geth#91 (comment)

Signed-off-by: meows <b5c6@protonmail.com>
…al-test

params/types/parity: ensure lexicographical order for possibly-colliding builtin activation keys
params: install ecip1061 block activation numbers
Fix/lint, aka Achieve Perfection
cmd/echainspec,build: reimplement echainspec command
…t-as-configurer

params/confp: move testdata out of internal/ dir
…gurator

params/confp/(internal,generic): refactor configurator unmarshaler, w…
@meowsbits meowsbits merged commit 2a21bfa into feat/packages-refactor Jan 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.