Skip to content

Commit b2a2520

Browse files
committed
Remove unfixed ai tests
1 parent 9dd5fdb commit b2a2520

File tree

2 files changed

+0
-289
lines changed

2 files changed

+0
-289
lines changed

actors/miner/tests/prove_commit_sector_3_test.rs

Lines changed: 0 additions & 146 deletions
Original file line numberDiff line numberDiff line change
@@ -761,149 +761,3 @@ fn assert_commit_result(expected: &[ExitCode], result: &ProveCommitSectors3Retur
761761
assert_eq!(BatchReturn::of(expected), result.activation_results);
762762
}
763763

764-
#[test]
765-
fn notify_non_market_actor() {
766-
let (h, mut rt) = setup_basic();
767-
let piece_size = h.sector_size as u64;
768-
let precommits = precommit_sectors(&mut rt, &h, &[&[piece_size], &[piece_size]]);
769-
let snos: Vec<SectorNumber> =
770-
precommits.iter().map(|pci: &SectorPreCommitInfo| pci.sector_number).collect();
771-
772-
// Create notifications to different actors, not just STORAGE_MARKET_ACTOR
773-
let custom_actor_1 = Address::new_id(5000);
774-
let custom_actor_2 = Address::new_id(6000);
775-
let evm_actor = Address::new_actor(b"evm_test_actor");
776-
777-
let mut manifests = vec![
778-
make_activation_manifest(snos[0], &[(piece_size, CLIENT_ID, 1000, 0)]),
779-
make_activation_manifest(snos[1], &[(piece_size, CLIENT_ID, 1001, 0)]),
780-
];
781-
782-
// Add notifications to custom actors
783-
manifests[0].pieces[0].notify.push(DataActivationNotification {
784-
address: custom_actor_1,
785-
payload: RawBytes::from(vec![1, 2, 3, 4]),
786-
});
787-
manifests[0].pieces[0].notify.push(DataActivationNotification {
788-
address: evm_actor,
789-
payload: RawBytes::from(vec![5, 6, 7, 8]),
790-
});
791-
manifests[1].pieces[0].notify.push(DataActivationNotification {
792-
address: custom_actor_2,
793-
payload: RawBytes::from(vec![9, 10, 11, 12]),
794-
});
795-
796-
// Expect notifications to be sent to the custom actors
797-
rt.expect_send_simple(
798-
custom_actor_1,
799-
SECTOR_CONTENT_CHANGED,
800-
None, // The actual params will be set by the notification system
801-
TokenAmount::zero(),
802-
None, // Return value
803-
ExitCode::OK,
804-
);
805-
rt.expect_send_simple(
806-
evm_actor,
807-
SECTOR_CONTENT_CHANGED,
808-
None, // The actual params will be set by the notification system
809-
TokenAmount::zero(),
810-
None, // Return value
811-
ExitCode::OK,
812-
);
813-
rt.expect_send_simple(
814-
custom_actor_2,
815-
SECTOR_CONTENT_CHANGED,
816-
None, // The actual params will be set by the notification system
817-
TokenAmount::zero(),
818-
None, // Return value
819-
ExitCode::OK,
820-
);
821-
822-
let cfg = ProveCommitSectors3Config::default();
823-
let (result, _, _) =
824-
h.prove_commit_sectors3(&rt, &manifests, false, false, false, cfg).unwrap();
825-
826-
// All sectors succeed
827-
assert_commit_result(&[ExitCode::OK; 2], &result);
828-
verify_weights(&rt, &h, snos[0], 0, piece_size);
829-
verify_weights(&rt, &h, snos[1], 0, piece_size);
830-
}
831-
832-
#[test]
833-
fn notify_multiple_actors_per_piece() {
834-
let (h, mut rt) = setup_basic();
835-
let piece_size = h.sector_size as u64 / 2;
836-
let precommits = precommit_sectors(&mut rt, &h, &[&[piece_size, piece_size]]);
837-
let snos: Vec<SectorNumber> =
838-
precommits.iter().map(|pci: &SectorPreCommitInfo| pci.sector_number).collect();
839-
840-
let mut manifests = vec![
841-
make_activation_manifest(
842-
snos[0],
843-
&[(piece_size, CLIENT_ID, 1000, 0), (piece_size, CLIENT_ID, 1001, 0)],
844-
),
845-
];
846-
847-
// Add notifications to multiple different actors for the same piece
848-
let actor1 = Address::new_id(7000);
849-
let actor2 = Address::new_id(8000);
850-
let actor3 = Address::new_id(9000);
851-
852-
manifests[0].pieces[0].notify.push(DataActivationNotification {
853-
address: actor1,
854-
payload: RawBytes::from(vec![1, 1, 1, 1]),
855-
});
856-
manifests[0].pieces[0].notify.push(DataActivationNotification {
857-
address: actor2,
858-
payload: RawBytes::from(vec![2, 2, 2, 2]),
859-
});
860-
manifests[0].pieces[1].notify.push(DataActivationNotification {
861-
address: actor3,
862-
payload: RawBytes::from(vec![3, 3, 3, 3]),
863-
});
864-
manifests[0].pieces[1].notify.push(DataActivationNotification {
865-
address: STORAGE_MARKET_ACTOR_ADDR,
866-
payload: RawBytes::from(vec![4, 4, 4, 4]),
867-
});
868-
869-
// Expect notifications to be sent to all actors
870-
rt.expect_send_simple(
871-
actor1,
872-
SECTOR_CONTENT_CHANGED,
873-
None, // The actual params will be set by the notification system
874-
TokenAmount::zero(),
875-
None, // Return value
876-
ExitCode::OK,
877-
);
878-
rt.expect_send_simple(
879-
actor2,
880-
SECTOR_CONTENT_CHANGED,
881-
None, // The actual params will be set by the notification system
882-
TokenAmount::zero(),
883-
None, // Return value
884-
ExitCode::OK,
885-
);
886-
rt.expect_send_simple(
887-
actor3,
888-
SECTOR_CONTENT_CHANGED,
889-
None, // The actual params will be set by the notification system
890-
TokenAmount::zero(),
891-
None, // Return value
892-
ExitCode::OK,
893-
);
894-
rt.expect_send_simple(
895-
STORAGE_MARKET_ACTOR_ADDR,
896-
SECTOR_CONTENT_CHANGED,
897-
None, // The actual params will be set by the notification system
898-
TokenAmount::zero(),
899-
None, // Return value
900-
ExitCode::OK,
901-
);
902-
903-
let cfg = ProveCommitSectors3Config::default();
904-
let (result, _, _) =
905-
h.prove_commit_sectors3(&rt, &manifests, false, false, false, cfg).unwrap();
906-
907-
assert_commit_result(&[ExitCode::OK], &result);
908-
verify_weights(&rt, &h, snos[0], 0, piece_size * 2);
909-
}

actors/miner/tests/prove_replica_test.rs

Lines changed: 0 additions & 143 deletions
Original file line numberDiff line numberDiff line change
@@ -710,146 +710,3 @@ fn assert_update_result(expected: &[ExitCode], result: &ProveReplicaUpdates3Retu
710710
assert_eq!(BatchReturn::of(expected), result.activation_results);
711711
}
712712

713-
#[test]
714-
fn update_with_non_market_actor_notification() {
715-
let (h, rt, sectors) = setup_empty_sectors(2);
716-
let snos = sectors.iter().map(|s| s.sector_number).collect::<Vec<_>>();
717-
let st: State = h.get_state(&rt);
718-
let store = rt.store();
719-
let piece_size = h.sector_size as u64;
720-
721-
// Create notifications to different actors, not just STORAGE_MARKET_ACTOR
722-
let custom_actor_1 = Address::new_id(5000);
723-
let custom_actor_2 = Address::new_id(6000);
724-
let evm_actor = Address::new_actor(b"evm_test_actor");
725-
726-
let mut sector_updates = vec![
727-
make_update_manifest(&st, store, snos[0], &[(piece_size, CLIENT_ID, 1000, 0)]),
728-
make_update_manifest(&st, store, snos[1], &[(piece_size, CLIENT_ID, 1001, 0)]),
729-
];
730-
731-
// Add notifications to custom actors
732-
sector_updates[0].pieces[0].notify.push(DataActivationNotification {
733-
address: custom_actor_1,
734-
payload: RawBytes::from(vec![1, 2, 3, 4]),
735-
});
736-
sector_updates[0].pieces[0].notify.push(DataActivationNotification {
737-
address: evm_actor,
738-
payload: RawBytes::from(vec![5, 6, 7, 8]),
739-
});
740-
sector_updates[1].pieces[0].notify.push(DataActivationNotification {
741-
address: custom_actor_2,
742-
payload: RawBytes::from(vec![9, 10, 11, 12]),
743-
});
744-
745-
// Expect notifications to be sent to the custom actors
746-
rt.expect_send_simple(
747-
custom_actor_1,
748-
SECTOR_CONTENT_CHANGED,
749-
None, // The actual params will be set by the notification system
750-
TokenAmount::zero(),
751-
None, // Return value
752-
ExitCode::OK,
753-
);
754-
rt.expect_send_simple(
755-
evm_actor,
756-
SECTOR_CONTENT_CHANGED,
757-
None, // The actual params will be set by the notification system
758-
TokenAmount::zero(),
759-
None, // Return value
760-
ExitCode::OK,
761-
);
762-
rt.expect_send_simple(
763-
custom_actor_2,
764-
SECTOR_CONTENT_CHANGED,
765-
None, // The actual params will be set by the notification system
766-
TokenAmount::zero(),
767-
None, // Return value
768-
ExitCode::OK,
769-
);
770-
771-
let cfg = ProveReplicaUpdatesConfig::default();
772-
let (result, _, _) =
773-
h.prove_replica_updates3_batch(&rt, &sector_updates, false, false, cfg).unwrap();
774-
775-
// All sectors succeed
776-
assert_update_result(&[ExitCode::OK; 2], &result);
777-
verify_weights(&rt, &h, snos[0], 0, piece_size);
778-
verify_weights(&rt, &h, snos[1], 0, piece_size);
779-
}
780-
781-
#[test]
782-
fn update_multiple_actors_per_piece() {
783-
let (h, rt, sectors) = setup_empty_sectors(1);
784-
let snos = sectors.iter().map(|s| s.sector_number).collect::<Vec<_>>();
785-
let st: State = h.get_state(&rt);
786-
let store = rt.store();
787-
let piece_size = h.sector_size as u64 / 2;
788-
789-
let mut sector_updates = vec![
790-
make_update_manifest(&st, store, snos[0], &[(piece_size, CLIENT_ID, 1000, 0), (piece_size, CLIENT_ID, 1001, 0)]),
791-
];
792-
793-
// Add notifications to multiple different actors for the same piece
794-
let actor1 = Address::new_id(7000);
795-
let actor2 = Address::new_id(8000);
796-
let actor3 = Address::new_id(9000);
797-
798-
sector_updates[0].pieces[0].notify.push(DataActivationNotification {
799-
address: actor1,
800-
payload: RawBytes::from(vec![1, 1, 1, 1]),
801-
});
802-
sector_updates[0].pieces[0].notify.push(DataActivationNotification {
803-
address: actor2,
804-
payload: RawBytes::from(vec![2, 2, 2, 2]),
805-
});
806-
sector_updates[0].pieces[1].notify.push(DataActivationNotification {
807-
address: actor3,
808-
payload: RawBytes::from(vec![3, 3, 3, 3]),
809-
});
810-
sector_updates[0].pieces[1].notify.push(DataActivationNotification {
811-
address: STORAGE_MARKET_ACTOR_ADDR,
812-
payload: RawBytes::from(vec![4, 4, 4, 4]),
813-
});
814-
815-
// Expect notifications to be sent to all actors
816-
rt.expect_send_simple(
817-
actor1,
818-
SECTOR_CONTENT_CHANGED,
819-
None, // The actual params will be set by the notification system
820-
TokenAmount::zero(),
821-
None, // Return value
822-
ExitCode::OK,
823-
);
824-
rt.expect_send_simple(
825-
actor2,
826-
SECTOR_CONTENT_CHANGED,
827-
None, // The actual params will be set by the notification system
828-
TokenAmount::zero(),
829-
None, // Return value
830-
ExitCode::OK,
831-
);
832-
rt.expect_send_simple(
833-
actor3,
834-
SECTOR_CONTENT_CHANGED,
835-
None, // The actual params will be set by the notification system
836-
TokenAmount::zero(),
837-
None, // Return value
838-
ExitCode::OK,
839-
);
840-
rt.expect_send_simple(
841-
STORAGE_MARKET_ACTOR_ADDR,
842-
SECTOR_CONTENT_CHANGED,
843-
None, // The actual params will be set by the notification system
844-
TokenAmount::zero(),
845-
None, // Return value
846-
ExitCode::OK,
847-
);
848-
849-
let cfg = ProveReplicaUpdatesConfig::default();
850-
let (result, _, _) =
851-
h.prove_replica_updates3_batch(&rt, &sector_updates, false, false, cfg).unwrap();
852-
853-
assert_update_result(&[ExitCode::OK], &result);
854-
verify_weights(&rt, &h, snos[0], 0, piece_size * 2);
855-
}

0 commit comments

Comments
 (0)