mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-04 06:53:12 +00:00
* update RLN contract abi functions and procs * Clean up debugging lines * Use more descriptive object field names for MembershipInfo * Fix formatting * fix group_manager after rebase to use new contract method sig * Fix linting for group_manager.nim * Test idcommitment to BE and debug logs * Improve IdCommitment logging * Update all keystore credentials to use BE format * Add workaround for groupmanager web3 eth_call * Add await to sendEthCallWithChainID * Add error handling for failed eth_call * Improve error handling for eth_call workaround * Revert keystore credentials back to using LE * Update toRateCommitment proc to use LE instead of BE * Add IdCommitment to calldata as BE * feat: Update rln contract deployment and tests (#3408) * update RLN contract abi functions and procs * update waku-rlnv2-contract submodule commit to latest * Add RlnV2 contract deployment using forge scripts * Clean up output of forge script command, debug logs to trace, warn to error * Move TestToken deployment to own proc * first implementation of token minting and approval * Update rln tests with usermessagelimit new minimum * Clean up code and error handling * Rework RLN tests WIP * Fix RLN test for new contract * RLN Tests updated * Fix formatting * Improve error logs * Fix error message formatting * Fix linting * Add pnpm dependency installation for rln tests * Update test dependencies in makefile * Minor updates, error messages etc * Code cleanup and change some debug logging to trace * Improve handling of Result return value * Use absolute path for waku-rlnv2-contract * Simplify token approval and balance check * Remove unused Anvil options * Add additional checks for stopAnvil process * Fix anvil process call to null * Add lock to tests for rln_group_manager_onchain * Debug for forge command * Verify paths * Install pnpm as global * Cleanup anvil running procs * Add check before installing anvil * CLean up onchain group_manager * Add proc to setup environment for contract deployer * Refactoring and improved error handling * Fix anvil install directory string * Fix linting in test_range_split * Add const for the contract address length * Add separate checks for why Approval transaction fails * Update RLN contract address and chainID for TWN
52 lines
2.5 KiB
Nim
52 lines
2.5 KiB
Nim
{.push raises: [].}
|
|
|
|
import stint, std/[nativesockets, options]
|
|
|
|
type WebSocketSecureConf* {.requiresInit.} = object
|
|
keyPath*: string
|
|
certPath*: string
|
|
|
|
type WebSocketConf* = object
|
|
port*: Port
|
|
secureConf*: Option[WebSocketSecureConf]
|
|
|
|
# TODO: Rename this type to match file name
|
|
|
|
type ClusterConf* = object
|
|
maxMessageSize*: string # TODO: static convert to a uint64
|
|
clusterId*: uint16
|
|
rlnRelay*: bool
|
|
rlnRelayEthContractAddress*: string
|
|
rlnRelayChainId*: UInt256
|
|
rlnRelayDynamic*: bool
|
|
rlnEpochSizeSec*: uint64
|
|
rlnRelayUserMessageLimit*: uint64
|
|
# TODO: should be uint16 like the `shards` parameter
|
|
numShardsInNetwork*: uint32
|
|
discv5Discovery*: bool
|
|
discv5BootstrapNodes*: seq[string]
|
|
|
|
# cluster-id=1 (aka The Waku Network)
|
|
# Cluster configuration corresponding to The Waku Network. Note that it
|
|
# overrides existing cli configuration
|
|
proc TheWakuNetworkConf*(T: type ClusterConf): ClusterConf =
|
|
const RelayChainId = 59141'u256
|
|
return ClusterConf(
|
|
maxMessageSize: "150KiB",
|
|
clusterId: 1,
|
|
rlnRelay: true,
|
|
rlnRelayEthContractAddress: "0xB9cd878C90E49F797B4431fBF4fb333108CB90e6",
|
|
rlnRelayDynamic: true,
|
|
rlnRelayChainId: RelayChainId,
|
|
rlnEpochSizeSec: 600,
|
|
rlnRelayUserMessageLimit: 100,
|
|
numShardsInNetwork: 8,
|
|
discv5Discovery: true,
|
|
discv5BootstrapNodes:
|
|
@[
|
|
"enr:-QESuED0qW1BCmF-oH_ARGPr97Nv767bl_43uoy70vrbah3EaCAdK3Q0iRQ6wkSTTpdrg_dU_NC2ydO8leSlRpBX4pxiAYJpZIJ2NIJpcIRA4VDAim11bHRpYWRkcnO4XAArNiZub2RlLTAxLmRvLWFtczMud2FrdS5zYW5kYm94LnN0YXR1cy5pbQZ2XwAtNiZub2RlLTAxLmRvLWFtczMud2FrdS5zYW5kYm94LnN0YXR1cy5pbQYfQN4DgnJzkwABCAAAAAEAAgADAAQABQAGAAeJc2VjcDI1NmsxoQOTd-h5owwj-cx7xrmbvQKU8CV3Fomfdvcv1MBc-67T5oN0Y3CCdl-DdWRwgiMohXdha3UyDw",
|
|
"enr:-QEkuED9X80QF_jcN9gA2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