Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #3670 +/- ##
==========================================
- Coverage 27.32% 27.22% -0.10%
==========================================
Files 657 659 +2
Lines 41827 42008 +181
==========================================
+ Hits 11429 11437 +8
- Misses 29335 29510 +175
+ Partials 1063 1061 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
03db265 to
36e3eae
Compare
f6c53ef to
fb20039
Compare
| old := err != nil && isMethodNotFoundError(err, method) | ||
| if old { | ||
| method = getMethod | ||
| if err != nil && isMethodNotFoundError(err, method) { |
There was a problem hiding this comment.
imo, fallback to old methods while we're sure it exists (our networks are always updated in sync with SNs) may hide unexpected errors. i would always call new methods in the same release IR is expected with new contracts
There was a problem hiding this comment.
While currently all nodes are controlled by NeoSPCC everywhere it might not be the case in future. In which case we can get both "new IR/old SN" (which we do get anyway during the upgrade and we usually keep enough compatibility for) and "old IR/new SN" combos in case someone decides to upgrade an SN before we're to update IR. This compatibility code can be very much helpful in this case.
| go s.mainnetListener.ListenWithError(ctx, mainnnetErr) // listen for neo:mainnet events | ||
|
|
||
| go func() { | ||
| if err := s.containerProcessor.AddContainerStructs(ctx); err != nil { |
There was a problem hiding this comment.
so the plan is to always send this tx at startup and sign every NR we receive from the chain?
There was a problem hiding this comment.
so it will be sent at every restart of this exact version of IR?
Brings nspcc-dev/neofs-contract#534. Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
d96ad08 to
3109ffb
Compare
| } | ||
|
|
||
| func (cp *Processor) approvePutContainer(ctx *putContainerContext, id cid.ID) { | ||
| func (cp *Processor) approvePutContainer(mainTx transaction.Transaction, cnr containerSDK.Container, id cid.ID) { |
There was a problem hiding this comment.
transaction.Transaction is almost never passed by value. Not that it's an error, but likely an inefficiency of some kind (unless there are some modifier of course, but I hope we already solved those).
There was a problem hiding this comment.
i use a simple pattern that if there is no change - there is no point in pointer
There was a problem hiding this comment.
This easily leads to excessive copying unless compiler has enough reasons to optimize it out.
If new method is missing, SN falls back to the old ones. Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
It's not needed in this case. Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
This will make it easier to support nspcc-dev/neofs-contract#534. Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
Will become available with nspcc-dev/neofs-contract#534 upgrade. If new method is missing, SN falls back to old methods. Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
3109ffb to
ab46198
Compare
It makes no sense to keep domain as struct field. Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
Passing explicit parameters is easier to understand. Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
Will become available with nspcc-dev/neofs-contract#534 upgrade. Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
ab46198 to
88fe603
Compare
|
Lint/tests |
Within nspcc-dev/neofs-contract#449, there is a need to store containers as VM structs. Since nspcc-dev/neofs-contract#534, struct items are stored for new containers. This also needs to be done for containers created before the upgrade. Since doing this in a contract update transaction turned out to be too GAS-intensive, this implements structuring through the IR background process. Specialized method is called iteratively doing the same thing, but for several containers at a time. Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
88fe603 to
c7b5407
Compare
|
fixed |
Uh oh!
There was an error while loading. Please reload this page.