Skip to content
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

Reports #104

Merged
merged 31 commits into from
Sep 5, 2022
Merged
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
f56f8e9
chore: SystemMessenger -> SystemRouter
ChiTimesChi Aug 31, 2022
f263bdf
chore: docs
ChiTimesChi Aug 31, 2022
069522e
chore: rename systemSender as well
ChiTimesChi Aug 31, 2022
df8f29a
feat: Report library
ChiTimesChi Aug 17, 2022
74affd7
add: verifying Reports in GuardRegistry
ChiTimesChi Aug 17, 2022
5bcfe01
chore: documentation
ChiTimesChi Aug 18, 2022
9141cc3
add: Notary check for a memory view on attestation
ChiTimesChi Aug 18, 2022
529f610
feat: ReportHub to accept and handle the reports
ChiTimesChi Aug 18, 2022
6af914e
tests: ReportHub
ChiTimesChi Aug 18, 2022
c02fd2d
chore: fix comment
ChiTimesChi Aug 18, 2022
edbe814
fix: don't force report flag on ReportHub level
ChiTimesChi Aug 18, 2022
fc2b57a
feat: Origin handling reports
ChiTimesChi Aug 19, 2022
13aa2d5
tests: origin.submitReport
ChiTimesChi Aug 19, 2022
e7cd5f1
fix: slash Notary on incorrect Valid Report
ChiTimesChi Aug 20, 2022
1dcd280
add: CorrectFraudReport event
ChiTimesChi Aug 20, 2022
28d9607
feat: Destination handling reports
ChiTimesChi Aug 20, 2022
00ad87f
add: pass report payload to _handleReport
ChiTimesChi Aug 21, 2022
f75a176
chore: better docs for ReportHub
ChiTimesChi Aug 21, 2022
2ac4219
regenerate contracts
trajan0x Aug 25, 2022
e592b44
chore: variables renaming
ChiTimesChi Sep 1, 2022
bc740c9
chore: fix wrong renaming, decorators, linter
ChiTimesChi Sep 1, 2022
b853eb8
feat: local chain system call
ChiTimesChi Sep 1, 2022
73e42d7
fix: update System Router interface
ChiTimesChi Sep 1, 2022
d63a3c9
fix merge conflict
trajan0x Sep 2, 2022
81444d8
Merge branch 'chore/rename-system-messenger' into feat/reports
ChiTimesChi Sep 2, 2022
d1789be
Merge branch 'feat/reports' into feat/reports-merge-fix
ChiTimesChi Sep 2, 2022
e1f828b
Merge pull request #160 from synapsecns/feat/reports-merge-fix
ChiTimesChi Sep 2, 2022
8294dad
fix merge conflicts
trajan0x Sep 2, 2022
1381d8f
minor fix
trajan0x Sep 2, 2022
add2f0c
formatting fix
trajan0x Sep 2, 2022
16b71b1
remove trailing space
trajan0x Sep 2, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Large diffs are not rendered by default.

577 changes: 557 additions & 20 deletions agents/contracts/destination/destination.abigen.go

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1,044 changes: 929 additions & 115 deletions agents/contracts/notarymanager/notarymanager.abigen.go

Large diffs are not rendered by default.

Large diffs are not rendered by default.

70 changes: 53 additions & 17 deletions agents/contracts/origin/filterer_generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@ import (

// IOriginFilterer ...
type IOriginFilterer interface {
// FilterCorrectFraudReport is a free log retrieval operation binding the contract event 0xa0248f358d0f7bb4c63d2bd5a3e521bb7aba00ccfde9442154e4950711a912f8.
//
// Solidity: event CorrectFraudReport(address indexed guard, bytes report)
FilterCorrectFraudReport(opts *bind.FilterOpts, guard []common.Address) (*OriginCorrectFraudReportIterator, error)
// WatchCorrectFraudReport is a free log subscription operation binding the contract event 0xa0248f358d0f7bb4c63d2bd5a3e521bb7aba00ccfde9442154e4950711a912f8.
//
// Solidity: event CorrectFraudReport(address indexed guard, bytes report)
WatchCorrectFraudReport(opts *bind.WatchOpts, sink chan<- *OriginCorrectFraudReport, guard []common.Address) (event.Subscription, error)
// ParseCorrectFraudReport is a log parse operation binding the contract event 0xa0248f358d0f7bb4c63d2bd5a3e521bb7aba00ccfde9442154e4950711a912f8.
//
// Solidity: event CorrectFraudReport(address indexed guard, bytes report)
ParseCorrectFraudReport(log types.Log) (*OriginCorrectFraudReport, error)
// FilterDispatch is a free log retrieval operation binding the contract event 0x718e547b45036b0526c0cd2f2e3de248b0e8c042c714ecfbee3f5811a5e6e785.
//
// Solidity: event Dispatch(bytes32 indexed messageHash, uint256 indexed leafIndex, uint64 indexed destinationAndNonce, bytes tips, bytes message)
Expand Down Expand Up @@ -49,6 +61,18 @@ type IOriginFilterer interface {
//
// Solidity: event DomainNotaryRemoved(address notary)
ParseDomainNotaryRemoved(log types.Log) (*OriginDomainNotaryRemoved, error)
// FilterFraudAttestation is a free log retrieval operation binding the contract event 0xa458d78fa8902ff24cc896d608e762eb06543f0541124e5582e928e1e4789423.
//
// Solidity: event FraudAttestation(address indexed notary, bytes attestation)
FilterFraudAttestation(opts *bind.FilterOpts, notary []common.Address) (*OriginFraudAttestationIterator, error)
// WatchFraudAttestation is a free log subscription operation binding the contract event 0xa458d78fa8902ff24cc896d608e762eb06543f0541124e5582e928e1e4789423.
//
// Solidity: event FraudAttestation(address indexed notary, bytes attestation)
WatchFraudAttestation(opts *bind.WatchOpts, sink chan<- *OriginFraudAttestation, notary []common.Address) (event.Subscription, error)
// ParseFraudAttestation is a log parse operation binding the contract event 0xa458d78fa8902ff24cc896d608e762eb06543f0541124e5582e928e1e4789423.
//
// Solidity: event FraudAttestation(address indexed notary, bytes attestation)
ParseFraudAttestation(log types.Log) (*OriginFraudAttestation, error)
// FilterGuardAdded is a free log retrieval operation binding the contract event 0x93405f05cd04f0d1bd875f2de00f1f3890484ffd0589248953bdfd29ba7f2f59.
//
// Solidity: event GuardAdded(address guard)
Expand All @@ -73,18 +97,30 @@ type IOriginFilterer interface {
//
// Solidity: event GuardRemoved(address guard)
ParseGuardRemoved(log types.Log) (*OriginGuardRemoved, error)
// FilterImproperAttestation is a free log retrieval operation binding the contract event 0x287e2c0e041ca31a0ce7a1ed8b91a7425b2520880947cdbe778c457ca4c48e5b.
// FilterGuardSlashed is a free log retrieval operation binding the contract event 0xf2b3869e9727d6dfa6823415649eb18a3bbb7cf9aa2af02af10aaf8d10e14095.
//
// Solidity: event GuardSlashed(address indexed guard, address indexed reporter)
FilterGuardSlashed(opts *bind.FilterOpts, guard []common.Address, reporter []common.Address) (*OriginGuardSlashedIterator, error)
// WatchGuardSlashed is a free log subscription operation binding the contract event 0xf2b3869e9727d6dfa6823415649eb18a3bbb7cf9aa2af02af10aaf8d10e14095.
//
// Solidity: event GuardSlashed(address indexed guard, address indexed reporter)
WatchGuardSlashed(opts *bind.WatchOpts, sink chan<- *OriginGuardSlashed, guard []common.Address, reporter []common.Address) (event.Subscription, error)
// ParseGuardSlashed is a log parse operation binding the contract event 0xf2b3869e9727d6dfa6823415649eb18a3bbb7cf9aa2af02af10aaf8d10e14095.
//
// Solidity: event GuardSlashed(address indexed guard, address indexed reporter)
ParseGuardSlashed(log types.Log) (*OriginGuardSlashed, error)
// FilterIncorrectReport is a free log retrieval operation binding the contract event 0x36670329f075c374c3847f464e4acdaa51fc70c69c52cb8317787b237088ec63.
//
// Solidity: event ImproperAttestation(address notary, bytes attestation)
FilterImproperAttestation(opts *bind.FilterOpts) (*OriginImproperAttestationIterator, error)
// WatchImproperAttestation is a free log subscription operation binding the contract event 0x287e2c0e041ca31a0ce7a1ed8b91a7425b2520880947cdbe778c457ca4c48e5b.
// Solidity: event IncorrectReport(address indexed guard, bytes report)
FilterIncorrectReport(opts *bind.FilterOpts, guard []common.Address) (*OriginIncorrectReportIterator, error)
// WatchIncorrectReport is a free log subscription operation binding the contract event 0x36670329f075c374c3847f464e4acdaa51fc70c69c52cb8317787b237088ec63.
//
// Solidity: event ImproperAttestation(address notary, bytes attestation)
WatchImproperAttestation(opts *bind.WatchOpts, sink chan<- *OriginImproperAttestation) (event.Subscription, error)
// ParseImproperAttestation is a log parse operation binding the contract event 0x287e2c0e041ca31a0ce7a1ed8b91a7425b2520880947cdbe778c457ca4c48e5b.
// Solidity: event IncorrectReport(address indexed guard, bytes report)
WatchIncorrectReport(opts *bind.WatchOpts, sink chan<- *OriginIncorrectReport, guard []common.Address) (event.Subscription, error)
// ParseIncorrectReport is a log parse operation binding the contract event 0x36670329f075c374c3847f464e4acdaa51fc70c69c52cb8317787b237088ec63.
//
// Solidity: event ImproperAttestation(address notary, bytes attestation)
ParseImproperAttestation(log types.Log) (*OriginImproperAttestation, error)
// Solidity: event IncorrectReport(address indexed guard, bytes report)
ParseIncorrectReport(log types.Log) (*OriginIncorrectReport, error)
// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498.
//
// Solidity: event Initialized(uint8 version)
Expand All @@ -109,17 +145,17 @@ type IOriginFilterer interface {
//
// Solidity: event NewNotaryManager(address notaryManager)
ParseNewNotaryManager(log types.Log) (*OriginNewNotaryManager, error)
// FilterNotarySlashed is a free log retrieval operation binding the contract event 0x9ad95700c0e79cb6384afc527c4e16b94a9c6e39ea2ba3824ad6f856bdc4a401.
// FilterNotarySlashed is a free log retrieval operation binding the contract event 0x70f97c2b606c3d7af38fff3f924c8396f5a05d266b5dc523d863ad27a1d7518a.
//
// Solidity: event NotarySlashed(address indexed notary, address indexed reporter)
FilterNotarySlashed(opts *bind.FilterOpts, notary []common.Address, reporter []common.Address) (*OriginNotarySlashedIterator, error)
// WatchNotarySlashed is a free log subscription operation binding the contract event 0x9ad95700c0e79cb6384afc527c4e16b94a9c6e39ea2ba3824ad6f856bdc4a401.
// Solidity: event NotarySlashed(address indexed notary, address indexed guard, address indexed reporter)
FilterNotarySlashed(opts *bind.FilterOpts, notary []common.Address, guard []common.Address, reporter []common.Address) (*OriginNotarySlashedIterator, error)
// WatchNotarySlashed is a free log subscription operation binding the contract event 0x70f97c2b606c3d7af38fff3f924c8396f5a05d266b5dc523d863ad27a1d7518a.
//
// Solidity: event NotarySlashed(address indexed notary, address indexed reporter)
WatchNotarySlashed(opts *bind.WatchOpts, sink chan<- *OriginNotarySlashed, notary []common.Address, reporter []common.Address) (event.Subscription, error)
// ParseNotarySlashed is a log parse operation binding the contract event 0x9ad95700c0e79cb6384afc527c4e16b94a9c6e39ea2ba3824ad6f856bdc4a401.
// Solidity: event NotarySlashed(address indexed notary, address indexed guard, address indexed reporter)
WatchNotarySlashed(opts *bind.WatchOpts, sink chan<- *OriginNotarySlashed, notary []common.Address, guard []common.Address, reporter []common.Address) (event.Subscription, error)
// ParseNotarySlashed is a log parse operation binding the contract event 0x70f97c2b606c3d7af38fff3f924c8396f5a05d266b5dc523d863ad27a1d7518a.
//
// Solidity: event NotarySlashed(address indexed notary, address indexed reporter)
// Solidity: event NotarySlashed(address indexed notary, address indexed guard, address indexed reporter)
ParseNotarySlashed(log types.Log) (*OriginNotarySlashed, error)
// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
//
Expand Down
8 changes: 4 additions & 4 deletions agents/contracts/origin/itransactor_generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ type IOriginTransactor interface {
//
// Solidity: function dispatch(uint32 _destination, bytes32 _recipientAddress, uint32 _optimisticSeconds, bytes _tips, bytes _messageBody) payable returns()
Dispatch(opts *bind.TransactOpts, _destination uint32, _recipientAddress [32]byte, _optimisticSeconds uint32, _tips []byte, _messageBody []byte) (*types.Transaction, error)
// ImproperAttestation is a paid mutator transaction binding the contract method 0x0afe7f90.
//
// Solidity: function improperAttestation(bytes _attestation) returns(bool)
ImproperAttestation(opts *bind.TransactOpts, _attestation []byte) (*types.Transaction, error)
// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8.
//
// Solidity: function initialize(address _notaryManager) returns()
Expand All @@ -38,6 +34,10 @@ type IOriginTransactor interface {
//
// Solidity: function setSystemRouter(address _systemRouter) returns()
SetSystemRouter(opts *bind.TransactOpts, _systemRouter common.Address) (*types.Transaction, error)
// SubmitReport is a paid mutator transaction binding the contract method 0x5815869d.
//
// Solidity: function submitReport(bytes _report) returns(bool)
SubmitReport(opts *bind.TransactOpts, _report []byte) (*types.Transaction, error)
// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
//
// Solidity: function transferOwnership(address newOwner) returns()
Expand Down
Loading