Commit graph

333 commits

Author SHA1 Message Date
Nguyen Ba Tam
f924946794 fix error deadlocked master node in case : try mine block Epoch when start node 2018-10-30 13:37:24 +07:00
Nguyen Ba Tam
e34b4fb790 m1 mine block but only broadcast block wait m2 validate 2018-10-24 16:25:36 +07:00
Tuna
740e6076e5 fix after reviewing 2018-10-23 10:07:02 +07:00
Nguyen Ba Tam
bcfb59fe14 Broadcast special Tx through pairRW 2018-10-23 10:02:48 +07:00
Tuna
6783932836
Revert "Revert "Randomization implementation"" 2018-10-05 14:58:48 +07:00
Tuna
40d4ba9e63
Merge pull request #203 from tomochain/revert-153-randomize
Revert "Randomization implementation"
2018-10-05 11:43:12 +07:00
Tuna
a8aead3957 minor fix for chainHeadCh 2018-10-05 10:55:05 +07:00
Tuna
c0a5890379
Revert "Randomization implementation" 2018-10-05 10:47:50 +07:00
DinhLN
ec764859fd Get randomize m2 offer from validators in smart contract.
Fixed get and build randomize for m2 from smart contract.

Fixed get m2 list from smart contract randomize.
2018-10-04 10:15:52 +07:00
Tuna
c9e13e2def adjust timeout for m1 2018-09-26 11:05:34 +07:00
Tuna
efb0d7d724 some msg make up 2018-09-06 11:29:02 +07:00
Nguyen Ba Tam
d284374279 convert update M1 method from async to sync 2018-09-06 11:22:45 +07:00
DinhLN
206c2cab4d Fixed move foundation wallet address to genesis config. 2018-08-17 11:03:40 +07:00
Nguyen Ba Tam
6bae36b4d5 Making posv as a separate package 2018-08-17 10:36:27 +07:00
Tuna
0cba36a6ba directly set mns to snapshot 2018-08-15 18:02:48 +07:00
Tuna
773f3a2d64 extend timeout to 10s 2018-08-02 11:27:44 +07:00
Tuna
3442205b15 move gap into genesis config 2018-07-31 11:52:12 +07:00
Tuna
f65014512d node waits to his turn until there is a new block comes in 2018-07-19 17:15:21 +07:00
Tuna
5a771ed6f0 node should also count to his turn in case some nodes are down 2018-07-17 11:04:52 +07:00
Tuna
a72d7782ae in case a masternode resigns, let him continue until end of the current epoch 2018-07-03 16:15:56 +07:00
Tuna
54a0bad209 get masternodes set from latest checkpoint block header instead of from snapshot 2018-06-29 15:50:03 +07:00
Tuna
ab9f40aeed update new set of masternodes at end of each epoch (distance = m1Gap) 2018-06-29 14:31:33 +07:00
dinhln89
68697e970b Fixed bug calculate reward and add unit test for it. 2018-06-27 16:52:53 +07:00
dinhln89
150e81c3e8 Refine code using log error when create tx sign. 2018-06-21 14:02:34 +07:00
dinhln89
124f587abf Refine code and fixed send tx sign for block signer. 2018-06-20 18:29:22 +07:00
Tuna
d91e00e170 reuse Clique voting strategy for now, leave header.Coinbase empty 2018-06-01 10:05:56 +07:00
Tuna
789e03f167 block 1 - all masternodes race to create 2018-06-01 10:02:06 +07:00
Tuna
cfdde4333e golint fix 2018-06-01 10:02:06 +07:00
Tuna
5494d3a7d0 masternode takes turn (circle) to propose block 2018-06-01 09:59:46 +07:00
Tuna
90ceb82c9c fix unittests 2018-05-31 17:35:45 +07:00
Tuna
0ae49c74fa fix import cycle 2018-05-31 16:34:17 +07:00
Tuna
a546ae74bd gofmt 2018-05-25 16:02:11 +07:00
Tuna
ce3e641085 use cross-package channel listenning to checkpoint 2018-05-22 17:45:09 +07:00
stompesi
fe6cf00f48 miner: remove duplicated code (#15968) 2018-03-16 14:13:52 +02:00
Péter Szilágyi
55599ee95d core, trie: intermediate mempool between trie and database (#15857)
This commit reduces database I/O by not writing every state trie to disk.
2018-02-05 17:40:32 +01:00
Jim McDonald
18a7d31338 miner: avoid unnecessary work (#15883) 2018-01-15 12:57:06 +02:00
Péter Szilágyi
6f69cdd109
all: switch gas limits from big.Int to uint64 2018-01-03 14:45:35 +02: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
Péter Szilágyi
6d6a5a9337 cmd, consensus, core, miner: instatx clique for --dev (#15323)
* cmd, consensus, core, miner: instatx clique for --dev

* cmd, consensus, clique: support configurable --dev block times

* cmd, core: allow --dev to use persistent storage too
2017-10-24 13:40:42 +03:00
terasum
e9382c6e9f miner: fix typo 2017-10-12 10:19:23 +08:00
Mark
cb5235eb07 miner: make starting of CPU agent more reliable (#15148) 2017-09-19 13:28:15 +02:00
Péter Szilágyi
10b3f97c9d core: only fire one chain head per batch (#15123)
* core: only fire one chain head per batch

* miner: announce chan events synchronously
2017-09-11 13:13:05 +03:00
Felix Lange
10181b57a9 core, eth/downloader: commit block data using batches (#15115)
* ethdb: add Putter interface and Has method

* ethdb: improve docs and add IdealBatchSize

* ethdb: remove memory batch lock

Batches are not safe for concurrent use.

* core: use ethdb.Putter for Write* functions

This covers the easy cases.

* core/state: simplify StateSync

* trie: optimize local node check

* ethdb: add ValueSize to Batch

* core: optimize HasHeader check

This avoids one random database read get the block number. For many uses
of HasHeader, the expectation is that it's actually there. Using Has
avoids a load + decode of the value.

* core: write fast sync block data in batches

Collect writes into batches up to the ideal size instead of issuing many
small, concurrent writes.

* eth/downloader: commit larger state batches

Collect nodes into a batch up to the ideal size instead of committing
whenever a node is received.

* core: optimize HasBlock check

This avoids a random database read to get the number.

* core: use numberCache in HasHeader

numberCache has higher capacity, increasing the odds of finding the
header without a database lookup.

* core: write imported block data using a batch

Restore batch writes of state and add blocks, tx entries, receipts to
the same batch. The change also simplifies the miner.

This commit also removes posting of logs when a forked block is imported.

* core: fix DB write error handling

* ethdb: use RLock for Has

* core: fix HasBlock comment
2017-09-09 19:03:07 +03:00
Mark
c1740e4540 core/types, miner: avoid tx sender miscaching (#14773) 2017-09-07 23:22:27 +02:00
Zsolt Felfoldi
4ea4d2dc34
core, eth: add bloombit indexer, filter based on it 2017-09-06 11:13:13 +03:00
Péter Szilágyi
da7d57e07c
core: make txpool operate on immutable state 2017-09-05 13:34:41 +03:00
Miya Chen
bf1e263128 core, light: send chain events using event.Feed (#14865) 2017-08-18 12:58:36 +02:00
Egon Elbre
faafeef79e miner: fix megacheck warnings 2017-08-07 13:41:22 +03:00
Péter Szilágyi
0ff35e170d core: remove redundant storage of transactions and receipts (#14801)
* core: remove redundant storage of transactions and receipts

* core, eth, internal: new transaction schema usage polishes

* eth: implement upgrade mechanism for db deduplication

* core, eth: drop old sequential key db upgrader

* eth: close last iterator on successful db upgrage

* core: prefix the lookup entries to make their purpose clearer
2017-07-14 19:39:53 +03:00
Felix Lange
9e5f03b6c4 core/state: access trie through Database interface, track errors (#14589)
With this commit, core/state's access to the underlying key/value database is
mediated through an interface. Database errors are tracked in StateDB and
returned by CommitTo or the new Error method.

Motivation for this change: We can remove the light client's duplicated copy of
core/state. The light client now supports node iteration, so tracing and storage
enumeration can work with the light client (not implemented in this commit).
2017-06-27 15:57:06 +02:00