Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
patch beta release pipeline (#10020)
Browse files Browse the repository at this point in the history
* version: bump beta to 2.2.4

* ci: move future releases to ethereum subdir on s3 (#10017)

* ci: move future releases to ethereum subdir on s3

* ci: redesign s3 bucket logic

* ci: use the releases bucket

* Handle failing case for update account cache in require (#9989)

* state: remove accidently merged test

* state: remove merge leftovers
  • Loading branch information
5chdn authored Dec 5, 2018
1 parent 6b0a280 commit f44d885
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 40 deletions.
12 changes: 6 additions & 6 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
description = "Parity Ethereum client"
name = "parity-ethereum"
# NOTE Make sure to update util/version/Cargo.toml as well
version = "2.2.3"
version = "2.2.4"
license = "GPL-3.0"
authors = ["Parity Technologies <admin@parity.io>"]

Expand Down
63 changes: 32 additions & 31 deletions ethcore/src/state/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1136,7 +1136,7 @@ impl<B: Backend> State<B> {
self.note_cache(a);

// at this point the entry is guaranteed to be in the cache.
Ok(RefMut::map(self.cache.borrow_mut(), |c| {
let mut account = RefMut::map(self.cache.borrow_mut(), |c| {
let entry = c.get_mut(a).expect("entry known to exist in the cache; qed");

match &mut entry.account {
Expand All @@ -1146,18 +1146,19 @@ impl<B: Backend> State<B> {

// set the dirty flag after changing account data.
entry.state = AccountState::Dirty;
match entry.account {
Some(ref mut account) => {
if require_code {
let addr_hash = account.address_hash(a);
let accountdb = self.factories.accountdb.readonly(self.db.as_hashdb(), addr_hash);
Self::update_account_cache(RequireCache::Code, account, &self.db, accountdb.as_hashdb());
}
account
},
_ => panic!("Required account must always exist; qed"),
entry.account.as_mut().expect("Required account must always exist; qed")
});

if require_code {
let addr_hash = account.address_hash(a);
let accountdb = self.factories.accountdb.readonly(self.db.as_hashdb(), addr_hash);

if !Self::update_account_cache(RequireCache::Code, &mut account, &self.db, accountdb.as_hashdb()) {
return Err(Box::new(TrieError::IncompleteDatabase(H256::from(a))))
}
}))
}

Ok(account)
}

/// Replace account code and storage. Creates account if it does not exist.
Expand Down Expand Up @@ -2591,12 +2592,12 @@ mod tests {
assert_eq!(diff_map.len(), 1);
assert!(diff_map.get(&a).is_some());
assert_eq!(diff_map.get(&a),
pod_account::diff_pod(Some(&PodAccount {
balance: U256::from(100),
nonce: U256::zero(),
code: Some(Default::default()),
storage: Default::default()
}), None).as_ref());
pod_account::diff_pod(Some(&PodAccount {
balance: U256::from(100),
nonce: U256::zero(),
code: Some(Default::default()),
storage: Default::default()
}), None).as_ref());
}

#[test]
Expand All @@ -2622,18 +2623,18 @@ mod tests {
assert_eq!(diff_map.len(), 1);
assert!(diff_map.get(&a).is_some());
assert_eq!(diff_map.get(&a),
pod_account::diff_pod(Some(&PodAccount {
balance: U256::zero(),
nonce: U256::zero(),
code: Some(Default::default()),
storage: vec![(H256::from(&U256::from(1u64)), H256::from(&U256::from(20u64)))]
.into_iter().collect(),
}), Some(&PodAccount {
balance: U256::zero(),
nonce: U256::zero(),
code: Some(Default::default()),
storage: vec![(H256::from(&U256::from(1u64)), H256::from(&U256::from(100u64)))]
.into_iter().collect(),
})).as_ref());
pod_account::diff_pod(Some(&PodAccount {
balance: U256::zero(),
nonce: U256::zero(),
code: Some(Default::default()),
storage: vec![(H256::from(&U256::from(1u64)), H256::from(&U256::from(20u64)))]
.into_iter().collect(),
}), Some(&PodAccount {
balance: U256::zero(),
nonce: U256::zero(),
code: Some(Default::default()),
storage: vec![(H256::from(&U256::from(1u64)), H256::from(&U256::from(100u64)))]
.into_iter().collect(),
})).as_ref());
}
}
2 changes: 1 addition & 1 deletion scripts/gitlab/publish-awss3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ aws configure set aws_secret_access_key $s3_secret

case "${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}" in
(beta|stable|nightly)
export S3_BUCKET=builds-parity-published;
export S3_BUCKET=releases.parity.io/ethereum;
;;
(*)
export S3_BUCKET=builds-parity;
Expand Down
2 changes: 1 addition & 1 deletion util/version/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[package]
name = "parity-version"
# NOTE: this value is used for Parity Ethereum version string (via env CARGO_PKG_VERSION)
version = "2.2.3"
version = "2.2.4"
authors = ["Parity Technologies <admin@parity.io>"]
build = "build.rs"

Expand Down

0 comments on commit f44d885

Please sign in to comment.