-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: Waku v2 bridge #1
Conversation
"EnableDiscV5": true, | ||
"DiscoveryLimit": 20, | ||
"AutoUpdate": true, | ||
"PeerExchange": true |
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.
Since this will not run as light mode, probably makes sense to disable peer exchange (discv5 is enabled so peer discovery will still work)
fleet.json
Outdated
"Enabled": false | ||
}, | ||
"LogEnabled": true, | ||
"LogLevel": "DEBUG" |
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.
Should this be INFO?
bridge/status/status.go
Outdated
configFiles, | ||
) | ||
if err != nil { | ||
b.Log.WithError(err).Error("Failed to generate config") |
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.
Should it return or panic?
bridge/status/status.go
Outdated
|
||
createAccRequest := &requests.CreateAccount{ | ||
WalletSecretsConfig: requests.WalletSecretsConfig{ | ||
InfuraToken: os.Getenv("STATUS_BUILD_INFURA_TOKEN"), |
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.
What happens if the environment variable is not set? Will the returned configuration still be valid?
bridge/status/status.go
Outdated
const communityIdLength = 68 | ||
return chatId[0:communityIdLength] |
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.
Would it be a good idea to check if the chatId length is >= communityIdLength and fail otherwise?
bridge/status/status.go
Outdated
return "", fmt.Errorf("bridge %s not connected, dropping message %#v to bridge", b.Account, msg) | ||
} | ||
|
||
b.Log.Infof("=> Sending message %#v", msg) |
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.
should this be Debug?
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.
"ClusterConfig": { | ||
"ClusterID": 16, | ||
"Enabled": true, | ||
"Fleet": "shards.test", |
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.
Is use of shards.test
temporary or intentional and we plan to provide other options like status.prod
in the future?
func (b *Bstatus) JoinChannel(channel config.ChannelInfo) error { | ||
return b.joinCommunityChannel(channel) |
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.
What's the point of having a JoinChannel
that is just a wrapper around joinCommunityChannel
? I don't get it.
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.
There is no specific reason.
At some point I have 2 functions: joinCommunityChannel and joinPrivateChat.
walletDB, err := walletdatabase.InitializeDB(b.statusDataDir+"/"+"wallet.db", "", dbsetup.ReducedKDFIterationsNumber) | ||
if err != nil { | ||
return errors.Wrap(err, "Failed to initialize wallet db") | ||
} | ||
b.statusNode.SetWalletDB(walletDB) |
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.
Why do we need a wallet DB file? Can't this be in memory or not used at all? Kinda weird.
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.
CLI app also have it. I need to test if removing it has no impact on joining token-gated communities.
Issue #12610
Why was this closed? |
I want waku2 remain a developement branch for waku v2 integration. |
Sure. But considering the purpose of this repo, should we make |
Issue #12610