Added NODE_URL_5 and MNEMONIC variables to .env and started the bot with monitoring and automation modes enabled on Goerli with 60 second polling and supported 0 WETH bond:
Submit Proposal: After this test proposal was resolved as approved, the bot posted it on-chain:
2023-10-11 10:51:22 [info]: {
"at": "oSnapAutomation",
"message": "Submitted oSnap Proposal π",
"mrkdwn": "Submitted oSnap proposal on supported oSnap module <https://goerli.etherscan.io/address/0xf2E0ed03c11B7A09afA1Ca8ECd376D13A1cb6b20|0xf2E...cb6b20> for outcome.eth in transaction <https://goerli.etherscan.io/tx/0x3dba80b82e1e48b0da411bb036a048b69488ff7c97be9c8ac560e0c8c8157dc6|0x3db...157dc6>. More details: <https://snapshot.org/#/outcome.eth/proposal/0xbba2a262cfea18e4e8b1eba9c269fd2a99a051811050967aaa3f8faeb6880106|Snapshot UI> and assertion: <https://testnet.oracle.uma.xyz/?transactionHash=0x3dba80b82e1e48b0da411bb036a048b69488ff7c97be9c8ac560e0c8c8157dc6&eventIndex=4|View in UI>.",
"notificationPath": "optimistic-governor",
"bot-identifier": "optimistic-governor"
}
Monitor Proposal: On the next polling iteration the monitoring bot also logged above proposal:
2023-10-11 10:52:45 [info]: {
"at": "OptimisticGovernorMonitor",
"message": "Verified Transactions Proposed π",
"mrkdwn": "<https://goerli.etherscan.io/address/0x9A8f92a830A5cB89a3816e3D267CB7791c16b04D|0x9A8...16b04D> made a proposal with hash 0xb600b7245b9097c9f1dd6cce1a8c1f12c50728380ddfd226879844fcb48d5db0 and assertion ID 0xb253d95eee49d831c2eade68fafcb453911564238885f75047d7bb28e32da4c7 on Optimistic Governor <https://goerli.etherscan.io/address/0xf2E0ed03c11B7A09afA1Ca8ECd376D13A1cb6b20|0xf2E...cb6b20> at Wed, 11 Oct 2023 10:51:12 GMT in transaction <https://goerli.etherscan.io/tx/0x3dba80b82e1e48b0da411bb036a048b69488ff7c97be9c8ac560e0c8c8157dc6|0x3db...157dc6>. Explanation: bafkreiba5gglj27wpnve3ewys22e7bxe4cqh6iznd652w6hzhrhqcgqkci. The proposal can be disputed till Wed, 11 Oct 2023 10:56:12 GMT: <https://testnet.oracle.uma.xyz/?transactionHash=0x3dba80b82e1e48b0da411bb036a048b69488ff7c97be9c8ac560e0c8c8157dc6&eventIndex=4|View in UI>. <https://dashboard.tenderly.co/public/Uma/uma/simulator/8e895921-2993-4bba-b409-a9e9add35a6d|Tenderly simulation successful>.",
"rules": "I assert that this transaction proposal is valid according to the following rules: Proposals approved on Snapshot, as verified at https://snapshot.org/#/outcome.eth, are valid as long as there is a minimum quorum of 0 and a minimum voting period of 0 hours and it does not appear that the Snapshot voting system is being exploited or is otherwise unavailable. The quorum and voting period are minimum requirements for a proposal to be valid. Quorum and voting period values set for a specific proposal in Snapshot should be used if they are more strict than the rules parameter. The explanation included with the on-chain proposal must be the unique IPFS identifier for the specific Snapshot proposal that was approved or a unique identifier for a proposal in an alternative voting system approved by DAO social consensus if Snapshot is being exploited or is otherwise unavailable.",
"notificationPath": "optimistic-governor",
"bot-identifier": "optimistic-governor"
}
Submit Execution: After the liveness passed the bot submitted the execution transaction:
2023-10-11 10:57:29 [info]: {
"at": "oSnapAutomation",
"message": "Submitted oSnap Execution π",
"mrkdwn": "Executed oSnap proposal with proposalHash 0xb600b7245b9097c9f1dd6cce1a8c1f12c50728380ddfd226879844fcb48d5db0 posted on oSnap module <https://goerli.etherscan.io/address/0xf2E0ed03c11B7A09afA1Ca8ECd376D13A1cb6b20|0xf2E...cb6b20> at Snapshot space outcome.eth in transaction <https://goerli.etherscan.io/tx/0x1f5edcf26c77daf6bbe145d826ddfe1a61f04d7da28dee8021b413f3160f9e3d|0x1f5...0f9e3d>.",
"notificationPath": "optimistic-governor",
"bot-identifier": "optimistic-governor"
}
Monitor Execution: On the next polling iteration the monitoring bot also logged above execution:
2023-10-11 10:58:32 [warn]: {
"at": "OptimisticGovernorMonitor",
"message": "Proposal Executed β ",
"mrkdwn": " Proposal with hash 0xb600b7245b9097c9f1dd6cce1a8c1f12c50728380ddfd226879844fcb48d5db0 and assertion ID 0xb253d95eee49d831c2eade68fafcb453911564238885f75047d7bb28e32da4c7 has been executed on Optimistic Governor <https://goerli.etherscan.io/address/0xf2E0ed03c11B7A09afA1Ca8ECd376D13A1cb6b20|0xf2E...cb6b20> in transaction <https://goerli.etherscan.io/tx/0x1f5edcf26c77daf6bbe145d826ddfe1a61f04d7da28dee8021b413f3160f9e3d|0x1f5...0f9e3d>",
"notificationPath": "optimistic-governor",
"bot-identifier": "optimistic-governor"
}
Monitor Wrong Proposal: After this test proposal was resolved as not approved, the bot did not propose this. Then after proposing it manually here, the bot logged it as unverified proposal:
Submit Dispute: After catching the unverified proposal above the bot submitted dispute:
2023-10-11 11:18:53 [info]: {
"at": "oSnapAutomation",
"message": "Submitted oSnap Dispute π¨",
"mrkdwn": "Submitted dispute on oSnap proposal with proposalHash 0xb600b7245b9097c9f1dd6cce1a8c1f12c50728380ddfd226879844fcb48d5db0 and assertionId 0x34935dfdcb5d79b1e6c63d4f00f2577f932b82a73cc4f1e072359b539047ae5e posted on oSnap module <https://goerli.etherscan.io/address/0xf2E0ed03c11B7A09afA1Ca8ECd376D13A1cb6b20|0xf2E...cb6b20> at Snapshot space outcome.eth in transaction <https://goerli.etherscan.io/tx/0x8f3380ec7ce89d5e077083e9a99c0e733255fab87d9f96c42d23536f261fc6f5|0x8f3...1fc6f5>. Reason for dispute: Proposal was not approved by majority",
"notificationPath": "optimistic-governor",
"bot-identifier": "optimistic-governor"
}
Monitor Dispute: On the next polling iteration the monitoring bot also logged above dispute:
2023-10-11 11:19:57 [error]: {
"at": "OptimisticGovernorMonitor",
"message": "Proposal Deleted ποΈ",
"mrkdwn": " Proposal with hash 0xb600b7245b9097c9f1dd6cce1a8c1f12c50728380ddfd226879844fcb48d5db0 and assertion ID 0x34935dfdcb5d79b1e6c63d4f00f2577f932b82a73cc4f1e072359b539047ae5e has been deleted from Optimistic Governor <https://goerli.etherscan.io/address/0xf2E0ed03c11B7A09afA1Ca8ECd376D13A1cb6b20|0xf2E...cb6b20> in transaction <https://goerli.etherscan.io/tx/0x8f3380ec7ce89d5e077083e9a99c0e733255fab87d9f96c42d23536f261fc6f5|0x8f3...1fc6f5>",
"notificationPath": "optimistic-governor",
"bot-identifier": "optimistic-governor"
}
should be able to detect if new osnap plugin is configured, make sure its the only plugin enabled, and then translate proposal data back into the original plugin format so bot can consume it.
Motivation
Bots need to support Snapshot proposals with the new oSnap plugin.
Summary
Adds support of new oSnap plugin to oSnap monitoring and automation bots.
Details
This may be unnecessary for some PRs. Catch-all for detailed explanations about the implementation decisions and implications of the change.
Testing
Check a box to describe how you tested these changes and list the steps for reviewers to test.
In order to check that adding oSnap plugin support does not break existing bots this was tested as in production on Goerli:
NODE_URL_5
andMNEMONIC
variables to.env
and started the bot with monitoring and automation modes enabled on Goerli with 60 second polling and supported 0 WETH bond:Issue(s)
Fixes https://linear.app/uma/issue/UMA-1794/add-translation-code-in-bot-to-handle-new-osnap-plugin-schema