Skip to content

Commit

Permalink
Bitfield improvements (#506)
Browse files Browse the repository at this point in the history
* Bitfield improvements

* Store prefix bits in separate variables

* Use the `Result` type alias in reader.rs

* Remove unused dependency

* Avoid creating vectors unnecessarily

* Rename union to merge

* Rename multi_union to union

* Combine first access with is_empty check

* Avoid traversing `self.unset` up front in `BitField::iter`

* Updates market actor (#496)

* initial market actor updates

* fix market actor errs

* fix linting issue

* made requested changes

* update error msg

* added verifreg to internal send and mockrt

* updated multimap error handling

* Update proofs to v4 (#507)

* Bump dep versions

* Refactor to new proofs types

* Switch to from trait and cleanup

* Update bootnodes and genesis for testnet (#509)

* Remove unnecessary >=

* Get rid of redundant `get_mut`

* Add UnverifiedBitField type in order to deserialize a bit field without verifying it

* Rename RLEPlus to RlePlus in accordance with Rust's naming conventions

* Remove pointless mutable reference

* Remove UnverifiedBitField

* Make sure that RlePlus::new returns an error on integer overflow

* Don't yield a run of length 0 whenever a short block has the value 0

Co-authored-by: Dustin Brickwood <dustinbrickwood204@gmail.com>
Co-authored-by: Austin Abell <austinabell8@gmail.com>
  • Loading branch information
3 people authored Jun 26, 2020
1 parent 8de380d commit 6e33c23
Show file tree
Hide file tree
Showing 16 changed files with 1,756 additions and 1,185 deletions.
3 changes: 2 additions & 1 deletion Cargo.lock

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

8 changes: 2 additions & 6 deletions blockchain/state_manager/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,9 @@ fn get_proving_set_raw<DB>(
where
DB: BlockStore,
{
let mut not_proving = actor_state
.faults
.clone()
.merge(&actor_state.recoveries)
.map_err(|_| Error::Other("Could not merge bitfield".to_string()))?;
let not_proving = &actor_state.faults | &actor_state.recoveries;

actor_state
.load_sector_infos(&*state_manager.get_block_store(), &mut not_proving)
.load_sector_infos(&*state_manager.get_block_store(), &not_proving)
.map_err(|err| Error::Other(format!("failed to get proving set :{:}", err)))
}
2 changes: 1 addition & 1 deletion utils/bitfield/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ bitvec = "0.17.3"
unsigned-varint = "0.4"
serde = { version = "1.0", features = ["derive"] }
serde_bytes = "0.11.3"
fnv = "1.0.6"
ahash = "0.3"

[dev-dependencies]
rand_xorshift = "0.2.0"
Expand Down
80 changes: 0 additions & 80 deletions utils/bitfield/src/bitvec_serde.rs

This file was deleted.

Loading

0 comments on commit 6e33c23

Please sign in to comment.