This repository has been archived by the owner on Nov 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Fetch parity-common
crates from crates.io
#9410
Merged
Merged
Changes from 27 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
e7cfd13
Fetch `parity-common` crates from crates.io
dvdplm 1cfb1ac
Add doc tests from `patricia-trie` to `patricia-trie-ethereum`
dvdplm e581603
[ethkey] upgrade ethereum-types
dvdplm 5f4503d
[whisper] update deps
dvdplm 683472d
[network] deps
dvdplm dcee52f
[network-devp2p] deps
dvdplm f1e2aed
[journaldb] deps
dvdplm a6782cb
[fastmap] deps
dvdplm d7c276e
[miner] deps and test fixes
dvdplm 77967b1
[machine] deps
dvdplm e43f580
[json] deps
dvdplm d329db2
[hw] deps
dvdplm 02c9999
[ethash] deps
dvdplm 7fbc9a3
[registrar] deps
dvdplm 442fb56
Update a few more dependencies with new ethabi-*
dvdplm 6ce1e66
[updater] Update deps
dvdplm 37c3528
deps
dvdplm 78b3b32
[ethcore] Update deps
dvdplm e678b0b
Use new parity-snappy and parity-rocksdb crates
dvdplm 8354d5f
Merge branch 'master' into dp/chore/fetch-dependencies-from-crates
dvdplm b0acc34
Updated submodules
dvdplm 51d405b
Use parity-snappy 0.1
dvdplm dd305a0
Use kvdb-rocksdb 0.1.2
dvdplm 1c53be0
Don't use latest ethereum/tests
dvdplm df88d32
Merge branch 'master' into dp/chore/fetch-dependencies-from-crates
dvdplm 14ed092
Fix merge conflicts errors
dvdplm cade563
Remove superseeded comment
dvdplm bedc7fd
Address grumbles: add newlines, add/remove spaces
dvdplm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -795,7 +795,7 @@ impl<Cost: CostType> Interpreter<Cost> { | |
TWO_POW_96 => a >> 96, | ||
TWO_POW_224 => a >> 224, | ||
TWO_POW_248 => a >> 248, | ||
_ => a.overflowing_div(b).0, | ||
_ => a/b, | ||
} | ||
} else { | ||
U256::zero() | ||
|
@@ -805,7 +805,7 @@ impl<Cost: CostType> Interpreter<Cost> { | |
let a = self.stack.pop_back(); | ||
let b = self.stack.pop_back(); | ||
self.stack.push(if !b.is_zero() { | ||
a.overflowing_rem(b).0 | ||
a % b | ||
} else { | ||
U256::zero() | ||
}); | ||
|
@@ -821,7 +821,7 @@ impl<Cost: CostType> Interpreter<Cost> { | |
} else if a == min && b == !U256::zero() { | ||
min | ||
} else { | ||
let c = a.overflowing_div(b).0; | ||
let c = a/b; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
set_sign(c, sign_a ^ sign_b) | ||
}); | ||
}, | ||
|
@@ -832,7 +832,7 @@ impl<Cost: CostType> Interpreter<Cost> { | |
let b = get_and_reset_sign(ub).0; | ||
|
||
self.stack.push(if !b.is_zero() { | ||
let c = a.overflowing_rem(b).0; | ||
let c = a % b; | ||
set_sign(c, sign_a) | ||
} else { | ||
U256::zero() | ||
|
@@ -920,7 +920,7 @@ impl<Cost: CostType> Interpreter<Cost> { | |
// upcast to 512 | ||
let a5 = U512::from(a); | ||
let res = a5.overflowing_add(U512::from(b)).0; | ||
let x = res.overflowing_rem(U512::from(c)).0; | ||
let x = res % U512::from(c); | ||
U256::from(x) | ||
} else { | ||
U256::zero() | ||
|
@@ -934,7 +934,7 @@ impl<Cost: CostType> Interpreter<Cost> { | |
self.stack.push(if !c.is_zero() { | ||
let a5 = U512::from(a); | ||
let res = a5.overflowing_mul(U512::from(b)).0; | ||
let x = res.overflowing_rem(U512::from(c)).0; | ||
let x = res % U512::from(c); | ||
U256::from(x) | ||
} else { | ||
U256::zero() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule wasm-tests
updated
from 0edbf8 to d17bfb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a / b
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is it changed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dvdplm Please change all those cases back.
Div
panics on default but we need overflowing behavior here, otherwise it breaks consensus.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like these methods were removed when going from
bigint
touint
, which makes sense since for unsigned integers div and rem should never overflow.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also had the same question though so it's better if @dvdplm confirms.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah right. I think it's this: paritytech/parity-common#32
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed, that's the PR. I think the reason they were there to begin with was an attempt to fulfill a trait that is no longer in rust (removed ~1.13?).