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

chore(SwingSet): Improve anachrophobia messages #10469

Merged
merged 2 commits into from
Dec 9, 2024

Conversation

gibson042
Copy link
Member

@gibson042 gibson042 commented Nov 13, 2024

Description

Extracted from an error investigation in #10165.

-anachrophobia strikes ${vatID} on delivery ${deliveryNum}
+anachrophobia strikes ${vatID} syscalls for delivery ${deliveryNum}
-anachrophobia in ${vatID}: {extra,wrong} syscall
+anachrophobia in ${vatID} delivery ${deliveryNum}: {extra,wrong} syscall at index ${idx}
-anachrophobia in ${vatID}: missing syscalls
+anachrophobia in missing ${missing} syscall(s) at index ${syscallsMade.length}

Also capitalizes WRONG/MISSING/EXTRA after sc[${idx}]:, for increased visual distinction.

Security Considerations

None known; any consumer aware of vatIDs should also be allowed to know delivery numbers and constituent syscalls.

Scaling Considerations

n/a

Documentation Considerations

n/a

Testing Considerations

n/a

Upgrade Considerations

None known; this kernel output should be independent of consensus (and will be consistent across nodes using the same kernel code anyway).

@gibson042 gibson042 requested review from warner and mhofman November 13, 2024 20:22
@gibson042 gibson042 requested a review from a team as a code owner November 13, 2024 20:22
Copy link

cloudflare-workers-and-pages bot commented Nov 13, 2024

Deploying agoric-sdk with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1b6eb14
Status: ✅  Deploy successful!
Preview URL: https://1797d914.agoric-sdk.pages.dev
Branch Preview URL: https://gibson-2024-11-anachrophobia.agoric-sdk.pages.dev

View logs

Copy link
Member

@warner warner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. The weakly-held suggestions are optional.

@@ -107,7 +108,9 @@ export function makeSyscallSimulator(
let replayError; // sticky

const explain = () => {
console.log(`anachrophobia strikes ${vatID} on delivery ${deliveryNum}`);
console.log(
`anachrophobia strikes ${vatID} syscalls for delivery ${deliveryNum}`,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grammar nit, maybe "anachrophobia strikes vatID for syscalls on delivery deliveryNum"? It's the vat that's at fault, and it faulted during a delivery.

if (!expected) {
syscallStatus.push('extra');
const error = Error(`anachrophobia in ${vatID}: extra syscall`);
const error = Error(`${context}: extra syscall at index ${idx}`);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been using sc123 locally when marking syscall numbers (like b123 for block heights, c123 for cranks, d123 for deliveryNums), maybe this could say at index sc${idx} to reinforce the fact that we're talking about a syscallNum which could be correlated with one in a slogfile.

gibson042 added a commit that referenced this pull request Dec 9, 2024
… in anachrophobia messages

delivery d$N, syscall sc$N
#10469 (comment)
@gibson042 gibson042 added the automerge:rebase Automatically rebase updates, then merge label Dec 9, 2024
@gibson042 gibson042 force-pushed the gibson-2024-11-anachrophobia-cleanup branch from cd33813 to 1b6eb14 Compare December 9, 2024 17:15
@mergify mergify bot merged commit 56d1c14 into master Dec 9, 2024
81 checks passed
@mergify mergify bot deleted the gibson-2024-11-anachrophobia-cleanup branch December 9, 2024 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:rebase Automatically rebase updates, then merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants