Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/paritytech/parity into wa…
Browse files Browse the repository at this point in the history
…rp_sync_on_light_client

* 'master' of https://github.com/paritytech/parity:
  docs: add changelog for 1.10.9 stable and 1.11.6 beta (openethereum#9069)
  Enable test in `miner/pool/test` (openethereum#9072)
  fetch: replace futures-timer with tokio-timer (openethereum#9066)
  remove util-error (openethereum#9054)
  • Loading branch information
ordian committed Jul 9, 2018
2 parents 5b01466 + 701692b commit cd7e7cf
Show file tree
Hide file tree
Showing 26 changed files with 211 additions and 195 deletions.
79 changes: 79 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,82 @@
## Parity [v1.11.6](https://github.com/paritytech/parity/releases/tag/v1.11.6) (2018-07-09)

Parity 1.11.6 is a bug-fix release to improve performance and stability.

The full list of included changes:

- Beta: 1.11.6 backports ([#9015](https://github.com/paritytech/parity/pull/9015))
- Parity-version: bump beta to 1.11.6
- Scripts: remove md5 checksums ([#8884](https://github.com/paritytech/parity/pull/8884))
- Add support for --chain tobalaba
- Convert indents to tabs :)
- Fixes for misbehavior reporting in AuthorityRound ([#8998](https://github.com/paritytech/parity/pull/8998))
- Aura: only report after checking for repeated skipped primaries
- Aura: refactor duplicate code for getting epoch validator set
- Aura: verify_external: report on validator set contract instance
- Aura: use correct validator set epoch number when reporting
- Aura: use epoch set when verifying blocks
- Aura: report skipped primaries when generating seal
- Aura: handle immediate transitions
- Aura: don't report skipped steps from genesis to first block
- Aura: fix reporting test
- Aura: refactor duplicate code to handle immediate_transitions
- Aura: let reporting fail on verify_block_basic
- Aura: add comment about possible failure of reporting
- Only return error log for rustls ([#9025](https://github.com/paritytech/parity/pull/9025))
- Transaction Pool improvements ([#8470](https://github.com/paritytech/parity/pull/8470))
- Don't use ethereum_types in transaction pool.
- Hide internal insertion_id.
- Fix tests.
- Review grumbles.
- Improve should_replace on NonceAndGasPrice ([#8980](https://github.com/paritytech/parity/pull/8980))
- Additional tests for NonceAndGasPrice::should_replace.
- Fix should_replace in the distinct sender case.
- Use natural priority ordering to simplify should_replace.
- Minimal effective gas price in the queue ([#8934](https://github.com/paritytech/parity/pull/8934))
- Minimal effective gas price.
- Fix naming, add test
- Fix minimal entry score and add test.
- Fix worst_transaction.
- Remove effective gas price threshold.
- Don't leak gas_price decisions out of Scoring.
- Never drop local transactions from different senders. ([#9002](https://github.com/paritytech/parity/pull/9002))
- Recently rejected cache for transaction queue ([#9005](https://github.com/paritytech/parity/pull/9005))
- Store recently rejected transactions.
- Don't cache AlreadyImported rejections.
- Make the size of transaction verification queue dependent on pool size.
- Add a test for recently rejected.
- Fix logging for recently rejected.
- Make rejection cache smaller.
- Obsolete test removed
- Obsolete test removed
- Construct cache with_capacity.
- Optimize pending transactions filter ([#9026](https://github.com/paritytech/parity/pull/9026))
- Rpc: return unordered transactions in pending transactions filter
- Ethcore: use LruCache for nonce cache
- Only clear the nonce cache when a block is retracted
- Revert "ethcore: use LruCache for nonce cache"
- This reverts commit b382c19.
- Use only cached nonces when computing pending hashes.
- Give filters their own locks, so that they don't block one another.
- Fix pending transaction count if not sealing.
- Clear cache only when block is enacted.
- Fix RPC tests.
- Address review comments.
- A last bunch of txqueue performance optimizations ([#9024](https://github.com/paritytech/parity/pull/9024))
- Clear cache only when block is enacted.
- Add tracing for cull.
- Cull split.
- Cull after creating pending block.
- Add constant, remove sync::read tracing.
- Reset debug.
- Remove excessive tracing.
- Use struct for NonceCache.
- Fix build
- Remove warnings.
- Fix build again.
- Miner: add missing macro use for trace_time
- Ci: remove md5 merge leftovers

## Parity [v1.11.5](https://github.com/paritytech/parity/releases/tag/v1.11.5) (2018-06-29)

Parity 1.11.5 is a bug-fix release to improve performance and stability.
Expand Down
23 changes: 1 addition & 22 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions docs/CHANGELOG-1.10.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
## Parity [v1.10.9](https://github.com/paritytech/parity/releases/tag/v1.10.9) (2018-07-07)

Parity 1.10.9 is a bug-fix release to improve performance and stability.

The full list of included changes:

- Stable: 1.10.9 backports ([#9016](https://github.com/paritytech/parity/pull/9016))
- Parity-version: bump stable to 1.10.9
- Scripts: remove md5 checksums ([#8884](https://github.com/paritytech/parity/pull/8884))
- Add support for --chain tobalaba ([#8870](https://github.com/paritytech/parity/pull/8870))
- Add support for --chain tobalaba
- Only return error log for rustls ([#9025](https://github.com/paritytech/parity/pull/9025))
- Fixes for misbehavior reporting in AuthorityRound ([#8998](https://github.com/paritytech/parity/pull/8998))
- Aura: only report after checking for repeated skipped primaries
- Aura: refactor duplicate code for getting epoch validator set
- Aura: verify_external: report on validator set contract instance
- Aura: use correct validator set epoch number when reporting
- Aura: use epoch set when verifying blocks
- Aura: report skipped primaries when generating seal
- Aura: handle immediate transitions
- Aura: don't report skipped steps from genesis to first block
- Aura: fix reporting test
- Aura: refactor duplicate code to handle immediate_transitions
- Aura: let reporting fail on verify_block_basic
- Aura: add comment about possible failure of reporting

## Parity [v1.10.8](https://github.com/paritytech/parity/releases/tag/v1.10.8) (2018-06-29)

Parity 1.10.8 is a bug-fix release to improve performance and stability.
Expand Down
1 change: 0 additions & 1 deletion ethcore/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ rlp_compress = { path = "../util/rlp_compress" }
rlp_derive = { path = "../util/rlp_derive" }
kvdb = { path = "../util/kvdb" }
kvdb-memorydb = { path = "../util/kvdb-memorydb" }
util-error = { path = "../util/error" }
snappy = { git = "https://github.com/paritytech/rust-snappy" }
stop-guard = { path = "../util/stop-guard" }
macros = { path = "../util/macros" }
Expand Down
3 changes: 1 addition & 2 deletions ethcore/src/client/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ use itertools::Itertools;
use journaldb;
use trie::{TrieSpec, TrieFactory, Trie};
use kvdb::{DBValue, KeyValueDB, DBTransaction};
use util_error::UtilError;

// other
use ethereum_types::{H256, Address, U256};
Expand Down Expand Up @@ -442,7 +441,7 @@ impl Importer {
{
trace_time!("import_old_block");
// verify the block, passing the chain for updating the epoch verifier.
let mut rng = OsRng::new().map_err(UtilError::from)?;
let mut rng = OsRng::new()?;
self.ancient_verifier.verify(&mut rng, &header, &chain)?;

// Commit results
Expand Down
2 changes: 1 addition & 1 deletion ethcore/src/client/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ impl Default for ClientConfig {
}
#[cfg(test)]
mod test {
use super::{DatabaseCompactionProfile};
use super::DatabaseCompactionProfile;

#[test]
fn test_default_compaction_profile() {
Expand Down
14 changes: 7 additions & 7 deletions ethcore/src/client/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
// along with Parity. If not, see <http://www.gnu.org/licenses/>.

use std::fmt::{Display, Formatter, Error as FmtError};
use util_error::UtilError;
use std::io;
use ethtrie::TrieError;

/// Client configuration errors.
#[derive(Debug)]
pub enum Error {
/// TrieDB-related error.
Trie(TrieError),
/// Util error
Util(UtilError),
/// Io error.
Io(io::Error),
}

impl From<TrieError> for Error {
Expand All @@ -33,9 +33,9 @@ impl From<TrieError> for Error {
}
}

impl From<UtilError> for Error {
fn from(err: UtilError) -> Self {
Error::Util(err)
impl From<io::Error> for Error {
fn from(err: io::Error) -> Self {
Error::Io(err)
}
}

Expand All @@ -49,7 +49,7 @@ impl Display for Error {
fn fmt(&self, f: &mut Formatter) -> Result<(), FmtError> {
match *self {
Error::Trie(ref err) => write!(f, "{}", err),
Error::Util(ref err) => write!(f, "{}", err),
Error::Io(ref err) => write!(f, "{}", err),
}
}
}
4 changes: 0 additions & 4 deletions ethcore/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
use std::{fmt, error};
use std::time::SystemTime;
use ethereum_types::{H256, U256, Address, Bloom};
use util_error::{self, UtilError};
use snappy::InvalidInput;
use unexpected::{Mismatch, OutOfBounds};
use ethtrie::TrieError;
Expand Down Expand Up @@ -206,7 +205,6 @@ impl From<Error> for BlockImportError {
match e {
Error(ErrorKind::Block(block_error), _) => BlockImportErrorKind::Block(block_error).into(),
Error(ErrorKind::Import(import_error), _) => BlockImportErrorKind::Import(import_error.into()).into(),
Error(ErrorKind::Util(util_error::ErrorKind::Decoder(decoder_err)), _) => BlockImportErrorKind::Decoder(decoder_err).into(),
_ => BlockImportErrorKind::Other(format!("other block import error: {:?}", e)).into(),
}
}
Expand Down Expand Up @@ -236,7 +234,6 @@ error_chain! {
}

links {
Util(UtilError, util_error::ErrorKind) #[doc = "Error concerning a utility"];
Import(ImportError, ImportErrorKind) #[doc = "Error concerning block import." ];
}

Expand Down Expand Up @@ -326,7 +323,6 @@ impl From<BlockImportError> for Error {
match err {
BlockImportError(BlockImportErrorKind::Block(e), _) => ErrorKind::Block(e).into(),
BlockImportError(BlockImportErrorKind::Import(e), _) => ErrorKind::Import(e).into(),
BlockImportError(BlockImportErrorKind::Other(s), _) => UtilError::from(s).into(),
_ => ErrorKind::Msg(format!("other block import error: {:?}", err)).into(),
}
}
Expand Down
1 change: 0 additions & 1 deletion ethcore/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ extern crate patricia_trie_ethereum as ethtrie;
extern crate triehash;
extern crate ansi_term;
extern crate unexpected;
extern crate util_error;
extern crate snappy;
extern crate ethabi;
extern crate rustc_hex;
Expand Down
8 changes: 5 additions & 3 deletions ethcore/src/snapshot/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ use io::IoChannel;

use ethereum_types::H256;
use parking_lot::{Mutex, RwLock, RwLockReadGuard};
use util_error::UtilError;
use bytes::Bytes;
use journaldb::Algorithm;
use snappy;
Expand Down Expand Up @@ -701,7 +700,7 @@ impl<T: ChainRestorationParams> Service<T> {

match is_done {
true => {
db.key_value().flush().map_err(UtilError::from)?;
db.key_value().flush()?;
drop(db);
return self.finalize_restoration(&mut *restoration);
},
Expand All @@ -714,7 +713,10 @@ impl<T: ChainRestorationParams> Service<T> {
}
}
};
result.and_then(|_| db.key_value().flush().map_err(|e| UtilError::from(e).into()))

result?;
db.key_value().flush()?;
Ok(())
}

/// Feed a state chunk to be processed synchronously.
Expand Down
13 changes: 7 additions & 6 deletions ethcore/src/state_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@

//! State database abstraction. For more info, see the doc for `StateDB`

use std::collections::{VecDeque, HashSet};
use std::io;
use std::sync::Arc;

use bloom_journal::{Bloom, BloomJournal};
use byteorder::{LittleEndian, ByteOrder};
use db::COL_ACCOUNT_BLOOM;
Expand All @@ -30,9 +34,6 @@ use lru_cache::LruCache;
use memory_cache::MemoryLruCache;
use parking_lot::Mutex;
use state::{self, Account};
use std::collections::{VecDeque, HashSet};
use std::sync::Arc;
use util_error::UtilError;

/// Value used to initialize bloom bitmap size.
///
Expand Down Expand Up @@ -181,7 +182,7 @@ impl StateDB {
}

/// Commit blooms journal to the database transaction
pub fn commit_bloom(batch: &mut DBTransaction, journal: BloomJournal) -> Result<(), UtilError> {
pub fn commit_bloom(batch: &mut DBTransaction, journal: BloomJournal) -> io::Result<()> {
assert!(journal.hash_functions <= 255);
batch.put(COL_ACCOUNT_BLOOM, ACCOUNT_BLOOM_HASHCOUNT_KEY, &[journal.hash_functions as u8]);
let mut key = [0u8; 8];
Expand All @@ -196,7 +197,7 @@ impl StateDB {
}

/// Journal all recent operations under the given era and ID.
pub fn journal_under(&mut self, batch: &mut DBTransaction, now: u64, id: &H256) -> Result<u32, UtilError> {
pub fn journal_under(&mut self, batch: &mut DBTransaction, now: u64, id: &H256) -> io::Result<u32> {
{
let mut bloom_lock = self.account_bloom.lock();
Self::commit_bloom(batch, bloom_lock.drain_journal())?;
Expand All @@ -209,7 +210,7 @@ impl StateDB {

/// Mark a given candidate from an ancient era as canonical, enacting its removals from the
/// backing database and reverting any non-canonical historical commit's insertions.
pub fn mark_canonical(&mut self, batch: &mut DBTransaction, end_era: u64, canon_id: &H256) -> Result<u32, UtilError> {
pub fn mark_canonical(&mut self, batch: &mut DBTransaction, end_era: u64, canon_id: &H256) -> io::Result<u32> {
self.db.mark_canonical(batch, end_era, canon_id)
}

Expand Down
2 changes: 1 addition & 1 deletion miner/src/pool/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,7 @@ fn should_avoid_reverifying_recently_rejected_transactions() {
assert_eq!(txq.status().status.transaction_count, 0);
}


#[test]
fn should_reject_early_in_case_gas_price_is_less_than_min_effective() {
// given
let txq = TransactionQueue::new(
Expand Down
Loading

0 comments on commit cd7e7cf

Please sign in to comment.