* - Improve validation of sender and receiving addresses
- Improve validation of sender and receiving shardIDs
- Run tests using go test cmd/client/wallet_validation/validation_test.go
* - Fix linting issues
- Fix test issue
- Move from wallet_validation to validation
* Update test:
- The local profile might eventually get updated to include more than 2 shards, in that case the test will fail. Use obviously invalid values (-1 / 99) for now.
* - Fix order of imports (std should come first)
- Fix typo
* Fix goimports linting
* Fix go import linting (again...)
* Fix go import linting
* Fix goimport linting
* Fix go import linting (sigh...)
* Fix goimports formatting using go fmt
* Update validation checking, also validate addresses supplied (--address) to:
- getFreeToken
- format
- balances
* Merge remote master into branch
* - Move wallet validation to cmd/client/wallet/main.go
- Move validation test to cmd/client/wallet/validation_test.go
* Refactor validateAddress
* [staking] Sign staking transaction with standalone staking-iterate CLI
* [staking] golint
* [staking] Fix for build, move transaction under staking/types
* [staking] Send RLP signed staking transaction, receive in RPC
* [staking] Organize staking packages, send over specific staking message
* [staking] Satisfy jenkins build in temp CLI staking-iterate
* [staking] Adjust naming of types
* [staking] Fold separate package into types as initial creation by RJ
block.Header is now a lightweight wrapper around an embedded
HeaderInterface value, which is implemented by both v0 and v1 headers.
It inherits all methods from the wrapped HeaderInterface, except it
overrides EncodeRLP, DecodeRLP, and Hash to handle tagged-RLP
encoding/decoding. (block.HeaderRegistry is the tagged RLP registry for
versioned headers.)
A ripple effect is that header instance creation now requires knowledge
of epoch. This logic is handled by blockfactory. blockfactory.Factory
is the interface, implemented by blockfactory.factory type. It uses a
chain config to pull in the right epoch for the right type.
As a convenience, blockfactory.NewTestHeader creates a new test-purpose
headers. Use this in contexts where the implied chain config is
TestChainConfig or the chain config does not matter.
Miscellaneous changes:
- block.HeaderFieldSetter now lives in its own file.
- The functionality of block.NewHeaderWith has been replaced by the
(*block.Header).With method.
The accompanying unit tests for (*block.Header).EncodeRLP and
(*block.Header).DecodeRLP() are the cross-sectional unit tests for the
functionality added by this. They make sure that v0 header is
encoded/decoded without tagged RLP envelope (compatibility mode), and v1
header is encoded/decoded with one. See comments of the RLP byte
sequence for differences.
* Manage shard chains as first class citizen
* Bring core.BlockChain's read/write semantics cleaner
* Reimplement the block reward in terms of on-chain committee info, not
hardcoded genesis committee.
utilize go:generate to convert the default wallet.ini file
into go constant `defaultWalletIni` defined in
`cmd/client/wallet/generated_ini.go` which will be used when
`.hmy/wallet.ini` doesn't exist under the current filesystem.