Commit graph

66 commits

Author SHA1 Message Date
parmmarrushabh
9765dea721 add option genesis generator for POSV 2018-10-27 17:52:28 +05:30
MestryOmkar
e712c2a377 resolve file conflict 2018-10-26 17:02:28 +05:30
parmmarrushabh
dccf2ca3e9 Add signers and finality to block status rpc api. 2018-10-27 16:28:04 +05:30
parmmarrushabh
17f9e27d8c accept range compare 2018-10-26 16:00:12 +05:30
AnilChinchawale
2c49f07ec3 fix test reward 2018-10-26 15:55:32 +05:30
parmmarrushabh
97e089b50c Fixed random hash function for unit test. 2018-10-23 12:21:59 +05:30
parmmarrushabh
356a13e109 Fixed send tx sign using block hash instead of block number. 2018-10-23 11:50:56 +05:30
parmmarrushabh
2677b33b78 new blocksigner contract 2018-10-23 11:29:46 +05:30
AnilChinchawale
6a76879b85 Add unit test for calculate reward for signers at reward checkpoint. 2018-10-23 11:15:11 +05:30
AnilChinchawale
4788ad3d80 add smart contract randomize blocksigner 2018-10-22 10:24:57 +05:30
parmarrushabh
11c63d2180 update new blocksigner smartcontract 2018-10-22 10:10:11 +05:30
parmarrushabh
004b6e0045 fix unit test, safe cancel context 2018-10-22 18:14:27 +05:30
MestryOmkar
dceb579b68 bugfix: unexpected pre node 2018-10-21 17:18:36 +05:30
parmarrushabh
264a6dc9db Fixed calculate reward for holders. 2018-10-20 16:20:30 +05:30
parmarrushabh
cc878c6ab7 Add unit test for calculate reward for holders. 2018-10-20 16:08:26 +05:30
MestryOmkar
7184da404f Add reward calculate rates for masternode, voters and foudation wallet address 2018-10-20 16:00:07 +05:30
parmarrushabh
f51efe2fe6 change ivalidator to xdc validator name 2018-10-19 15:56:07 +05:30
MestryOmkar
dc10103bea Fixed add reward balance for candidate owner not coinbase address. 2018-10-19 15:52:55 +05:30
parmarrushabh
5b26898ad5 add randomize contract 2018-10-07 14:07:04 +05:30
parmarrushabh
3d11656c45 Fixed add ipc client global variable inject into ethereum instance. 2018-09-27 11:49:51 +05:30
MestryOmkar
c69251ddd2 update smart contract, hard-code first 3-masternodes 2018-09-25 11:43:29 +05:30
parmarrushabh
76153eea4a Fixed bug calculate reward and add unit test for it. 2018-09-22 10:12:05 +05:30
parmarrushabh
530f8e3656 Add unit test for calculate reward for signers at reward checkpoint. 2018-09-18 10:01:00 +05:30
MestryOmkar
725930f310 update smart contract 2018-09-12 18:25:20 +05:30
parmarrushabh
9b480b261d Fixed add unit test tx sign for validators. 2018-09-09 18:01:19 +05:30
parmarrushabh
00df3d6cc3 Add unit test for send tx sign for block signer. 2018-09-06 17:42:02 +05:30
AnilChinchawale
4e3cb79ff2 Refine code using log error when create tx sign. 2018-09-02 17:32:33 +05:30
parmarrushabh
9551a39a97 Fixed move method getBlockSingers by blockNumber to utils of contact … 2018-08-31 16:37:52 +05:30
MestryOmkar
f0b6c70a8e Refine code and fixed send tx sign for block signer. 2018-08-28 16:07:53 +05:30
MestryOmkar
b1abaff88e add validator voting smart contract 2018-08-02 12:22:27 +05:30
AnilChinchawale
f7fac4ec91 updated VALIDATOR_TEST.GO 2018-06-28 14:43:02 +05:30
AnilChinchawale
5e63e39cc3 updated CORRECT TEST LOG 2018-06-12 17:35:08 +05:30
AnilChinchawale
03cd215f38 updated ADDED VALIDATOR CONTRACT 2018-06-04 16:39:47 +05:30
Anton Evangelatov
764878d988 contracts/chequebook: increase interval between auto deposits (#16178) 2018-02-26 11:36:26 +02:00
Péter Szilágyi
1bf508b449
accounts/abi/bind: support event filtering in abigen 2018-01-24 10:54:13 +02:00
Felix Lange
5c2f1e0014 all: update generated code (#15808)
* core/types, core/vm, eth, tests: regenerate gencodec files

* Makefile: update devtools target

Install protoc-gen-go and print reminders about npm, solc and protoc.
Also switch to github.com/kevinburke/go-bindata because it's more
maintained.

* contracts/ens: update contracts and regenerate with solidity v0.4.19

The newer upstream version of the FIFSRegistrar contract doesn't set the
resolver anymore. The resolver is now deployed separately.

* contracts/release: regenerate with solidity v0.4.19

* contracts/chequebook: fix fallback and regenerate with solidity v0.4.19

The contract didn't have a fallback function, payments would be rejected
when compiled with newer solidity. References to 'mortal' and 'owned'
use the local file system so we can compile without network access.

* p2p/discv5: regenerate with recent stringer

* cmd/faucet: regenerate

* dashboard: regenerate

* eth/tracers: regenerate

* internal/jsre/deps: regenerate

* dashboard: avoid sed -i because it's not portable

* accounts/usbwallet/internal/trezor: fix go generate warnings
2018-01-08 14:15:57 +02:00
Péter Szilágyi
6f69cdd109
all: switch gas limits from big.Int to uint64 2018-01-03 14:45:35 +02:00
Zsolt Felfoldi
48648bc2f8 contracts/release: do not print error log if les backend has no peers 2017-12-18 16:26:17 +01:00
Ricardo Domingos
9ff9d04a69 all: fix code comment typos (#15547)
* console: fix typo in comment

* contracts/release: fix typo in comment

* core: fix typo in comment

* eth: fix typo in comment

* miner: fix typo in comment
2017-11-24 11:20:01 +02:00
Alex Beregszaszi
b31cc71ff6 contracts/chequebook: update for latest Solidity (#15425)
This changes behaviour: before if the owner/amount didn't match, it
resulted in a successful execution without doing anything; now it
results in a failed execution using the revert opcode (remainder gas
is not consumed).
2017-11-10 10:19:51 +01:00
Derek Chiang
d6a6180366 contracts/chequebook: fix two contract issues (#15086)
This patch fixes the following issues:

* The contract executes send() when it does not have enough balance.
* The contract always sends a total amount of zero.
2017-09-25 10:36:13 +02:00
Benoit Verkindt
e3db1236de contracts/chequebook: fix race in test (#15058) 2017-09-07 23:14:47 +02:00
Egon Elbre
26b2d6e1aa contracts: fix megacheck errors (#14916)
* contracts: fix megacheck errors

* contracts: drop useless sleep, lets see what breaks
2017-08-08 19:41:35 +03:00
Lewis Marshall
f3359d5e58 cmd/swarm: Support using Mainnet for resolving ENS names
Signed-off-by: Lewis Marshall <lewis@lmars.net>
2017-06-26 12:51:33 +02:00
S. Matthew English
061889d4ea rlp, trie, contracts, compression, consensus: improve comments (#14580) 2017-06-12 14:45:17 +02:00
Felix Lange
37dd9086ec core: refactor genesis handling
This commit solves several issues concerning the genesis block:

* Genesis/ChainConfig loading was handled by cmd/geth code. This left
  library users in the cold. They could specify a JSON-encoded
  string and overwrite the config, but didn't get any of the additional
  checks performed by geth.
* Decoding and writing of genesis JSON was conflated in
  WriteGenesisBlock. This made it a lot harder to embed the genesis
  block into the forthcoming config file loader. This commit changes
  things so there is a single Genesis type that represents genesis
  blocks. All uses of Write*Genesis* are changed to use the new type
  instead.
* If the chain config supplied by the user was incompatible with the
  current chain (i.e. the chain had already advanced beyond a scheduled
  fork), it got overwritten. This is not an issue in practice because
  previous forks have always had the highest total difficulty. It might
  matter in the future though. The new code reverts the local chain to
  the point of the fork when upgrading configuration.

The change to genesis block data removes compression library
dependencies from package core.
2017-03-23 15:58:43 +01:00
Felix Lange
c213fd1fd8 all: import "context" instead of "golang.org/x/net/context"
There is no need to depend on the old context package now that the
minimum Go version is 1.7. The move to "context" eliminates our weird
vendoring setup. Some vendored code still uses golang.org/x/net/context
and it is now vendored in the normal way.

This change triggered new vet checks around context.WithTimeout which
didn't fire with golang.org/x/net/context.
2017-03-22 20:49:15 +01:00
Péter Szilágyi
94c71c171f Merge pull request #3723 from karalabe/logger-updates-2
Logger updates
2017-02-28 16:55:37 +02:00
Felix Lange
5f7826270c all: unify big.Int zero checks, use common/math in more places (#3716)
* common/math: optimize PaddedBigBytes, use it more

name              old time/op    new time/op    delta
PaddedBigBytes-8    71.1ns ± 5%    46.1ns ± 1%  -35.15%  (p=0.000 n=20+19)

name              old alloc/op   new alloc/op   delta
PaddedBigBytes-8     48.0B ± 0%     32.0B ± 0%  -33.33%  (p=0.000 n=20+20)

* all: unify big.Int zero checks

Various checks were in use. This commit replaces them all with Int.Sign,
which is cheaper and less code.

eg templates:

    func before(x *big.Int) bool { return x.BitLen() == 0 }
    func after(x *big.Int) bool  { return x.Sign() == 0 }

    func before(x *big.Int) bool { return x.BitLen() > 0 }
    func after(x *big.Int) bool  { return x.Sign() != 0 }

    func before(x *big.Int) int { return x.Cmp(common.Big0) }
    func after(x *big.Int) int  { return x.Sign() }

* common/math, crypto/secp256k1: make ReadBits public in package math
2017-02-28 15:09:11 +01:00
Péter Szilágyi
e588e0ca2b
all: next batch of log polishes to contextual versions 2017-02-28 15:03:20 +02:00