@@ -55,7 +55,7 @@ type ReportingPluginConfig struct {
5555
5656type ReportWithInfo [RI any ] struct {
5757 Report types.Report
58- // Metadata about the report passed to transmitter, keyring, etc... , e.g.
58+ // Metadata about the report passed to transmitter, keyring, etc., e.g.
5959 // to trace flow of report through the system.
6060 Info RI
6161}
@@ -108,15 +108,15 @@ type OutcomeContext struct {
108108// A ReportingPlugin allows plugging custom logic into the OCR3 protocol. The
109109// OCR protocol handles cryptography, networking, ensuring that a sufficient
110110// number of nodes is in agreement about any report, transmitting the report to
111- // the contract, etc... The ReportingPlugin handles application-specific logic.
111+ // the contract, etc. The ReportingPlugin handles application-specific logic.
112112// To do so, the ReportingPlugin defines a number of callbacks that are called
113113// by the OCR protocol logic at certain points in the protocol's execution flow.
114114// The report generated by the ReportingPlugin must be in a format understood by
115- // contract that the reports are transmitted to.
115+ // the contract that the reports are transmitted to.
116116//
117117// We assume that each correct node participating in the protocol instance will
118118// be running the same ReportingPlugin implementation. However, not all nodes
119- // may be correct; up to f nodes be faulty in arbitrary ways (aka byzantine
119+ // may be correct; up to f nodes may be faulty in arbitrary ways (aka byzantine
120120// faults). For example, faulty nodes could be down, have intermittent
121121// connectivity issues, send garbage messages, or be controlled by an adversary.
122122//
@@ -126,10 +126,10 @@ type OutcomeContext struct {
126126// the round. For each report, ShouldAcceptAttestedReport will be called, iff
127127// the oracle is in the set of transmitters for the report. If
128128// ShouldAcceptAttestedReport returns true, ShouldTransmitAcceptedReport will be
129- // called. However, an ReportingPlugin must also correctly handle the case where
129+ // called. However, a ReportingPlugin must also correctly handle the case where
130130// faults occur.
131131//
132- // In particular, an ReportingPlugin must deal with cases where:
132+ // In particular, a ReportingPlugin must deal with cases where:
133133//
134134// - only a subset of the functions on the ReportingPlugin are invoked for a
135135// given round
@@ -147,7 +147,7 @@ type OutcomeContext struct {
147147// call traces. E.g., the ReportingPlugin's Observation function may have been
148148// invoked on node A, but not on node B.
149149//
150- // All functions on an ReportingPlugin should be thread-safe.
150+ // All functions on a ReportingPlugin should be thread-safe.
151151//
152152// The execution of the functions in the ReportingPlugin is on the critical path
153153// of the protocol's execution. A blocking function may block the oracle from
@@ -160,10 +160,10 @@ type OutcomeContext struct {
160160// to configure timeouts.
161161//
162162// For a given OCR protocol instance, there can be many (consecutive) instances
163- // of an ReportingPlugin, e.g. due to software restarts. If you need
163+ // of a ReportingPlugin, e.g. due to software restarts. If you need
164164// ReportingPlugin state to survive across restarts, you should store it in the
165165// Outcome or persist it. A ReportingPlugin instance will only ever serve a
166- // single protocol instance. Outcomes and other state are are not preserved
166+ // single protocol instance. Outcomes and other state are not preserved
167167// between protocol instances. A fresh protocol instance will start with a clean
168168// state. Carrying state between different protocol instances is up to the
169169// ReportingPlugin logic.
@@ -179,7 +179,7 @@ type ReportingPlugin[RI any] interface {
179179 //
180180 // You may assume that the outctx.SeqNr is increasing monotonically (though
181181 // *not* strictly) across the lifetime of a protocol instance and that
182- // outctx.previousOutcome contains the consensus outcome with sequence
182+ // outctx.PreviousOutcome contains the consensus outcome with sequence
183183 // number (outctx.SeqNr-1).
184184 Query (ctx context.Context , outctx OutcomeContext ) (types.Query , error )
185185
@@ -188,18 +188,18 @@ type ReportingPlugin[RI any] interface {
188188 //
189189 // You may assume that the outctx.SeqNr is increasing monotonically (though
190190 // *not* strictly) across the lifetime of a protocol instance and that
191- // outctx.previousOutcome contains the consensus outcome with sequence
191+ // outctx.PreviousOutcome contains the consensus outcome with sequence
192192 // number (outctx.SeqNr-1).
193193 Observation (ctx context.Context , outctx OutcomeContext , query types.Query ) (types.Observation , error )
194194
195195 // Should return an error if an observation isn't well-formed.
196- // Non-well-formed observations will be discarded by the protocol. This
196+ // Non-well-formed observations will be discarded by the protocol. This
197197 // function should be pure. This is called for each observation, don't do
198198 // anything slow in here.
199199 //
200200 // You may assume that the outctx.SeqNr is increasing monotonically (though
201201 // *not* strictly) across the lifetime of a protocol instance and that
202- // outctx.previousOutcome contains the consensus outcome with sequence
202+ // outctx.PreviousOutcome contains the consensus outcome with sequence
203203 // number (outctx.SeqNr-1).
204204 ValidateObservation (ctx context.Context , outctx OutcomeContext , query types.Query , ao types.AttributedObservation ) error
205205
@@ -227,7 +227,7 @@ type ReportingPlugin[RI any] interface {
227227 //
228228 // You may assume that the outctx.SeqNr is increasing monotonically (though
229229 // *not* strictly) across the lifetime of a protocol instance and that
230- // outctx.previousOutcome contains the consensus outcome with sequence
230+ // outctx.PreviousOutcome contains the consensus outcome with sequence
231231 // number (outctx.SeqNr-1).
232232 //
233233 // You may assume that the provided list of attributed observations has been
@@ -244,10 +244,9 @@ type ReportingPlugin[RI any] interface {
244244 // This is likely to change in the future. It will likely be returning a
245245 // list of report batches, where each batch goes into its own Merkle tree.
246246 //
247- // You may assume that the outctx.SeqNr is increasing monotonically (though
247+ // You may assume that seqNr is increasing monotonically (though
248248 // *not* strictly) across the lifetime of a protocol instance and that
249- // outctx.previousOutcome contains the consensus outcome with sequence
250- // number (outctx.SeqNr-1).
249+ // outcome contains the consensus outcome with sequence number (seqNr-1).
251250 Reports (ctx context.Context , seqNr uint64 , outcome Outcome ) ([]ReportPlus [RI ], error )
252251
253252 // Decides whether a report should be accepted for transmission. Any report
@@ -269,7 +268,7 @@ type ReportingPlugin[RI any] interface {
269268 // As mentioned above, you should gracefully handle only a subset of a
270269 // ReportingPlugin's functions being invoked for a given report. For
271270 // example, due to reloading persisted pending transmissions from the
272- // database upon oracle restart, this function may be called with reports
271+ // database upon oracle restart, this function may be called with reports
273272 // that no other function of this instance of this interface has ever
274273 // been invoked on.
275274 ShouldTransmitAcceptedReport (ctx context.Context , seqNr uint64 , reportWithInfo ReportWithInfo [RI ]) (bool , error )
0 commit comments