Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for actor upgrades #1866

Merged
merged 40 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
ccb9c62
wip
fridrik01 Aug 30, 2023
3d5a07d
Add UpgradeInfo as ipld block to upgrade endpoint
fridrik01 Aug 31, 2023
d26bafb
Cleanup unused Abort enum
fridrik01 Aug 31, 2023
078f902
exit now returns to upgrade caller, still issue with block registry
fridrik01 Aug 31, 2023
4847d04
fix issue with block registry + initial handle success/failure
fridrik01 Sep 1, 2023
ab25ab3
several fixes
fridrik01 Sep 4, 2023
b26f589
simplify match arm in CM
fridrik01 Sep 4, 2023
85a9129
Improve error checking + more tests
fridrik01 Sep 5, 2023
aead419
Detect re-entrant upgrade
fridrik01 Sep 5, 2023
60ef934
Recursively calling upgrade returns correct block
fridrik01 Sep 5, 2023
b7a0cb0
fix lints
fridrik01 Sep 5, 2023
d219597
Add Entrypoint to send and refactor upgrade_actor to call send
fridrik01 Sep 6, 2023
6d28737
Support entrypoints with different number of params
fridrik01 Sep 8, 2023
5bff8a4
Update cargo.lock
fridrik01 Sep 8, 2023
cbea1d0
Wasm programs within infinite loop should result in SYS_ILLEGAL_INSTR…
fridrik01 Sep 8, 2023
ed2187d
Fix check for sys_out_of_gas
fridrik01 Sep 8, 2023
237b9ba
Use match where more appropriate
fridrik01 Sep 9, 2023
a782844
Preserve caller
fridrik01 Sep 28, 2023
f15f9b0
fixes after rebasing in ipld reachability
fridrik01 Sep 28, 2023
cd67d6d
Move upgrade logic to kernel
fridrik01 Oct 3, 2023
31f11f2
Refactor EntrypointParams into Entrypoint
fridrik01 Oct 3, 2023
22d00c5
Address review comments
fridrik01 Oct 3, 2023
e8ddd7d
error refactor
Stebalien Oct 4, 2023
9a7583c
fix tests after merging in stebs error refactor
fridrik01 Oct 5, 2023
8839e13
dedup processing send response
fridrik01 Oct 5, 2023
9807fef
put_reachable can never fail in kernel:upgrade_actor
fridrik01 Oct 5, 2023
c1ef6e3
reduce disk space by having fewer integration test files which broke CI
fridrik01 Oct 6, 2023
53aa0d5
minor fixes
fridrik01 Oct 17, 2023
1913868
Reject upgrades if actor already on call stack
fridrik01 Oct 18, 2023
c7e3498
Add test for calling upgrade on an actor alread on call stack
fridrik01 Oct 18, 2023
0f65803
Add actor call stack to call manager + detect reentrant upgrades in s…
fridrik01 Oct 19, 2023
816ed06
simplify call_manager interface for actor call stack
fridrik01 Oct 20, 2023
79653b6
Address review comments
fridrik01 Oct 24, 2023
caf8200
Rename SendResult to CallResult
fridrik01 Oct 24, 2023
f55904d
fix: take cid as ref in upgrade_actor
fridrik01 Oct 24, 2023
dc66e33
Refactor tests + add testcase for upgrading after self_destruct
fridrik01 Oct 24, 2023
700837c
fix: used wrong id when updating the code_cid in upgrade_actor
fridrik01 Oct 26, 2023
7d00218
Refactor and improve test cases for testing upgrade_actor
fridrik01 Oct 26, 2023
0a98555
fixup the error conditions
Stebalien Oct 26, 2023
84a47d1
disable the actor-upgrade feature by default
Stebalien Oct 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions fvm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,5 @@ cuda-supraseal = ["filecoin-proofs-api/cuda-supraseal"]
testing = []
arb = ["arbitrary", "quickcheck", "fvm_shared/arb", "cid/arb"]
m2-native = []
upgrade-actor = []
gas_calibration = []
10 changes: 6 additions & 4 deletions fvm/src/call_manager/backtrace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ use std::fmt::Display;

use fvm_shared::address::Address;
use fvm_shared::error::{ErrorNumber, ExitCode};
use fvm_shared::{ActorID, MethodNum};
use fvm_shared::ActorID;

use crate::kernel::SyscallError;

use super::Entrypoint;

/// A call backtrace records the actors an error was propagated through, from
/// the moment it was emitted. The original error is the _cause_. Backtraces are
/// useful for identifying the root cause of an error.
Expand Down Expand Up @@ -76,8 +78,8 @@ impl Backtrace {
pub struct Frame {
/// The actor that exited with this code.
pub source: ActorID,
/// The method that was invoked.
pub method: MethodNum,
/// The entrypoint that was invoked.
pub entrypoint: Entrypoint,
/// The exit code.
pub code: ExitCode,
/// The abort message.
Expand All @@ -90,7 +92,7 @@ impl Display for Frame {
f,
"{} (method {}) -- {} ({})",
Address::new_id(self.source),
self.method,
self.entrypoint,
&self.message,
self.code,
)
Expand Down
Loading
Loading