-
Notifications
You must be signed in to change notification settings - Fork 212
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: chain account kit cleanup #9818
Conversation
Deploying agoric-sdk with Cloudflare Pages
|
87b6cc6
to
88e497d
Compare
88e497d
to
8ef7968
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.
ok presuming 🚨 ->
@@ -100,16 +97,6 @@ export const prepareChainAccountKit = (zone, { watch, asVow }) => | |||
'ICA channel creation acknowledgement not yet received.', | |||
); | |||
}, | |||
getBalance(_denom) { | |||
// TODO https://github.com/Agoric/agoric-sdk/issues/9610 |
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.
re
no plans to implement them on IcaAccount|ChainAccount
#9610 seems like a plan to implement them. but yes, I suppose it's postponed.
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.
Yes there's a plan, but these would appear in CosmosOrchestrationAccount
. IcaAccount
is concerned with lower level things likes Ports and Connections
@@ -163,10 +163,12 @@ export const prepareChainAccountKit = (zone, { watch, asVow }) => | |||
this.state.connection = connection; | |||
this.state.remoteAddress = remoteAddr; | |||
this.state.localAddress = localAddr; | |||
const address = findAddressField(remoteAddr); | |||
if (!address) { | |||
console.error('🚨 failed to parse chain address', remoteAddr); |
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.
the red light is for "page somebody right away; an invariant was violated" per https://github.com/Agoric/agoric-sdk/wiki/Logging
But this can be triggered if the remote end mis-behaves. Seems like this should be a warning.
⚠️ indicates something that is not expected but was recovered from.
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.
LGTM, modulo updating the readme and error logging
@@ -9,11 +9,11 @@ classDiagram | |||
LCAKit --* LocalchainAccount | |||
ICQConnectionKit --* Port | |||
ICQConnectionKit --* Connection | |||
ChainAccountKit --* Port | |||
ChainAccountKit --* Connection | |||
IcaAccountKit --* Port |
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.
line 3 says,
As of 2024-05-29…
This change means that's not true anymore, but it's not accurate as of today either.
Please change the message to something like "Last verified 2024-05-29"
To update it before release I've added an item to #9757
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 didn't look closely in my find and replace but it's pretty dated. Please see: 72eabf7
565afc7
to
50b96c7
Compare
- these methods are part of OrchestrationAccountI, with no plans to implement them on IcaAccount|ChainAccount
- whether an address is parsable or not is not a consideration for the vstorage story (#9066) - instead, this should be interpreted as an unexpected error if this path is reached - throwing here would not solve much - this is a notifier divorced from the callsite. instead, - the caller will experience an error when they try and use UNPARSABLE_CHAIN_ADDRESS
- ChainAccountKit was a poor name - it implies this kit works for multiple chains - renamed to IcaAccountKit to convey it follows the ics27-1 protocol
50b96c7
to
58bdd14
Compare
refs: #9064
Description
UNPARSABLE_CHAIN_ADDRESS
ChainAccountKit
->IcaAccountKit
findAddressField
should treat an empty string as anUNPARSABLE_ADDRESS
IcaAccount.getPort()
Security Considerations
n/a
Scaling Considerations
n/a
Documentation Considerations
n/a
Testing Considerations
n/a
Upgrade Considerations
n/a