Commit Graph

7 Commits

Author SHA1 Message Date
Ashwin Sekar 93271d91b0
gossip: notify state machine of duplicate proofs (#32963)
* gossip: notify state machine of duplicate proofs

* Add feature flag for ingesting duplicate proofs from Gossip.

* Use the Epoch the shred is in instead of the root bank epoch.

* Fix unittest by activating the feature.

* Add a test for feature disabled case.

* EpochSchedule is now not copyable, clone it explicitly.

* pr feedback: read epoch schedule on startup, add guard for ff recache

* pr feedback: bank_forks lock, -cached_slots_in_epoch, init ff

* pr feedback: bank.forks_try_read() -> read()

* pr feedback: fix local-cluster setup

* local-cluster: do not expose gossip internals, use retry mechanism instead

* local-cluster: split out case 4b into separate test and ignore

* pr feedback: avoid taking lock if ff is already found

* pr feedback: do not cache ff epoch

* pr feedback: bank_forks lock, revert to cached_slots_in_epoch

* pr feedback: move local variable into helper function

* pr feedback: use let else, remove epoch 0 hack

---------

Co-authored-by: Wen <crocoxu@gmail.com>
2024-01-26 07:58:37 -08:00
Brooks 725ab37bf4
clippy: Replaces .get(0) with .first() (#34048) 2023-11-13 17:22:17 -05:00
Tao Zhu af9c754690
Crates have identical build.rs to frozen-abi can just be symlink (#33787)
crates have identical build.rs to frozen-abi can just be symlink
2023-10-21 13:33:10 -05:00
Ryo Onodera 05ddbf3b91
Define generic AbiExample for OnceLock (#33520)
* Define generic AbiExample for OnceLock

* Guard with cfg...

cargo-test-sbf (governance/addin-mock/program, governance/program):
error[E0658]: use of unstable library feature 'once_cell'
   --> src/abi_example.rs:559:36
     |
 559 | impl<T: AbiExample> AbiExample for std::sync::OnceLock<T> {
     |                                    ^^^^^^^^^^^^^^^^^^^^^^
     |
     = note: see issue #74465 <https://github.com/rust-lang/rust/issues/74465> for more information
     = help: add `#![feature(once_cell)]` to the crate attributes to enable
2023-10-04 23:09:43 +09:00
Pankaj Garg 4488cc241f
Cleanup cargo deps in vote crate (#33407) 2023-09-26 08:26:51 -07:00
Jeff Washington (jwash) 7a8a492d4c
fix clippy error (#33317)
* fix clippy error

* fix fmt that somehow got merged
2023-09-19 20:28:55 -07:00
Pankaj Garg f50342a790
Split vote related code from runtime to its own crate (#32882)
* Move vote related code to its own crate

* Update imports in code and tests

* update programs/sbf/Cargo.lock

* fix check errors

* update abi_digest

* rebase fixes

* fixes after rebase
2023-09-19 10:46:37 -07:00