Repository navigation
feat(IC-1579): TLA-code link for split_neuron - #913
Merged
Merged
Conversation
Unit tests likely won't work because of async access (due to how Rust execute tests) to the static global mutable InstrumentationStack
TODO: do requests/responses in the ledger directly
Rust analyzer doesn't seem to find the imports when they are defined in the workspace Cargo.toml
Completely reshuffled the structure of the code in the process of merging
The canister was growing too large; and a newtype is probably a good idea anyway.
Contributor
Author
|
@max-dfinity I've applied all the changes that we discussed (adapted a bit since moving the "logging" canister to governance enabled me to trim the Bazel targets more aggressively - that was a good suggestion, thanks). One blip now is that I pushed the test canister to just above 1.4 MB in size (i.e., just above the current limit). I've followed the instructions to add some headroom and set the limit to 1.7MB now, hopefully that's OK. |
max-dfinity
approved these changes
Oct 8, 2024
Contributor
|
LGTM, approved |
oggy-dfin
enabled auto-merge
October 9, 2024 13:46
andrew-lee-work
approved these changes
Oct 9, 2024
marko-k0
approved these changes
Oct 9, 2024
nikolay-komarevskiy
pushed a commit
that referenced
this pull request
Oct 11, 2024
This is the first change to link the behavior in the existing tests of the `split_neuron` method on the NNS governance with the corresponding TLA model. In this PR, only the pure Rust-based tests are instrumented to check the link; I plan to follow up with another PR linking the canister-based tests as well (this will require adding a new test-only query method to fetch the TLA traces), but I'm opening this now to allow Andy to work on `claim_neuron` concurrently. The PR consists of roughly four sets of changes: 1. Conditional (under the `tla` crate feature) instrumentation of production code 2. TLA model of split neuron and the mapping of the Rust state to TLA state (the `tla` module under governance) 3. Conditional checks in the Rust based tests of split neuron. These can be disabled permanently through `feature_flags.bzl` or on the temporarily on the Bazel command line with `--define tla_disabled=true` 4. The Bazel/Cargo config. There's perhaps a bit more splitting of Bazel targets into "regular" and `--test_feature` than optimal, due to the fact that the SNS `swap` depends on the `IcpLedgerCanister` even when not compiled into a canister, but I didn't dare try to change this. --------- Co-authored-by: IDX GitHub Automation <[email protected]>
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Oct 17, 2024
Follow up to #913, adding code link for claim_neuron.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is the first change to link the behavior in the existing tests of the
split_neuronmethod on the NNS governance with the corresponding TLA model. In this PR, only the pure Rust-based tests are instrumented to check the link; I plan to follow up with another PR linking the canister-based tests as well (this will require adding a new test-only query method to fetch the TLA traces), but I'm opening this now to allow Andy to work onclaim_neuronconcurrently.The PR consists of roughly four sets of changes:
tlacrate feature) instrumentation of production codetlamodule under governance)feature_flags.bzlor on the temporarily on the Bazel command line with--define tla_disabled=true--test_featurethan optimal, due to the fact that the SNSswapdepends on theIcpLedgerCanistereven when not compiled into a canister, but I didn't dare try to change this.