-
Notifications
You must be signed in to change notification settings - Fork 229
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
improve error handling #11070
improve error handling #11070
Conversation
Deploying agoric-sdk with
|
Latest commit: |
741be79
|
Status: | ✅ Deploy successful! |
Preview URL: | https://df9806b2.agoric-sdk.pages.dev |
Branch Preview URL: | https://10968-audit-error-handling.agoric-sdk.pages.dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"clean up upon last attest" looks pretty important
I should perhaps look this over more carefully, but until I find some reason not to, I approve.
I presume "closes: #10968" is appropriate; for tracking purposes, I went ahead and added it to the description. |
1bfd098
to
5fe02af
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good stuff.
store.delete(txHash); | ||
|
||
if (found.length === pending.getSize()) { | ||
// all have reported so clean up |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so clean-up depends on availability of all operators.
doesn't seem ideal, but seems workable for the coming release.
await E(txNode).setValue(JSON.stringify(capData)); | ||
// Don't await, just writing to vstorage. | ||
void E.when(E(marshaller).toCapData(record), capData => | ||
E(txNode).setValue(JSON.stringify(capData)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should be using...
E(txNode).setValue(JSON.stringify(capData)), | |
E.sendOnly(txNode).setValue(JSON.stringify(capData)), |
I don't see any other use of it in agoric-sdk
production code, though.
pending.delete(operatorId); | ||
risks.delete(operatorId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose this change is covered by the revised remove operator
test, though I haven't studied it well enough to be certain.
// one attestation is now sufficient (half of two) but the only evidence was just removed | ||
await eventLoopIteration(); | ||
t.falsy(published); | ||
op2.operator.submitEvidence(evidence); | ||
await eventLoopIteration(); | ||
t.deepEqual(published, evidence); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
'0x000002': {}, | ||
'0x000003': {}, | ||
'0x000004': {}, | ||
'0x000005': {}, | ||
'0x000006': {}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so the lack of clean-up was visible right here in the snapshot? interesting.
Before this each third attest was treated as a new transaction
5fe02af
to
741be79
Compare
closes: #10968
Description
feat: clean up upon last attest
feat: check conflicting evidence before quorum
chore: clean up promise handling
replace debug() with trace() in PacketTools
docs: TxFeed does not inspect evidence
test: self disagreement
Security Considerations
slightly stricter check
Scaling Considerations
reduces growth of TxFeed's
pending
store (which would always have the third operator submission)Documentation Considerations
some new docs
Testing Considerations
some new tests
Upgrade Considerations
Fully backwards compatible