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

Fix/Morph client #2080

Merged
merged 4 commits into from
Nov 30, 2022
Merged

Fix/Morph client #2080

merged 4 commits into from
Nov 30, 2022

Conversation

carpawell
Copy link
Member

No description provided.

@carpawell carpawell added the bug Something isn't working label Nov 21, 2022
@carpawell carpawell self-assigned this Nov 21, 2022
@carpawell carpawell marked this pull request as ready for review November 21, 2022 16:29
@carpawell carpawell changed the title Fix/Morph CLI Fix/Morph client Nov 21, 2022
@codecov
Copy link

codecov bot commented Nov 21, 2022

Codecov Report

Merging #2080 (473ddac) into master (79130f7) will decrease coverage by 0.00%.
The diff coverage is 10.00%.

❗ Current head 473ddac differs from pull request most recent head 8121316. Consider uploading reports for the commit 8121316 to get more accurate results

@@            Coverage Diff             @@
##           master    #2080      +/-   ##
==========================================
- Coverage   30.61%   30.60%   -0.01%     
==========================================
  Files         380      380              
  Lines       28130    28139       +9     
==========================================
  Hits         8613     8613              
- Misses      18778    18787       +9     
  Partials      739      739              
Impacted Files Coverage Δ
pkg/services/object/get/prm.go 54.54% <0.00%> (-20.46%) ⬇️
pkg/services/object/get/assemble.go 89.23% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@sami-nspcc
Copy link

I have recieved a notification of a new pull request. I am starting the build of images and binaries for further testing. Build number is 3682

@alexchetaev alexchetaev added the U3 Regular label Nov 21, 2022
@sami-nspcc
Copy link

I am running integration tests

pkg/morph/client/constructor.go Show resolved Hide resolved
@@ -176,7 +175,7 @@ func (c *Client) DepositNotary(amount fixedn.Fixed8, delta uint32) (res util.Uin
big.NewInt(int64(amount)),
[]interface{}{c.acc.PrivateKey().GetScriptHash(), till})
if err != nil {
if !errors.Is(err, neorpc.ErrAlreadyExists) {
if !alreadyExistsError(err) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why didn't it work the old way?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that is a server error, i did not find any code that returns exactly that err on the client side, did i miss anything?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in fact, it seems like an unreachable code, cause all the TXs have their own nonce, i checked that

so ok, just dropped that commit

@carpawell carpawell marked this pull request as draft November 21, 2022 18:27
@sami-nspcc
Copy link

I have recieved a notification of a new pull request. I am starting the build of images and binaries for further testing. Build number is 3686

@carpawell carpawell marked this pull request as ready for review November 22, 2022 15:40
@sami-nspcc
Copy link

I am running integration tests

@sami-nspcc
Copy link

Test run is finished. Please download the tarball from link. Untar and use allure open to watch the report

@@ -133,7 +133,7 @@ func makeNotaryDeposit(c *cfg) (util.Uint256, error) {

// gasDivisor defines what part of GAS balance (1/gasDivisor)
// should be transferred to the notary service
gasDivisor = 2
gasDivisor = 3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about all other, more frequent cases?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i agree that it could not fix all the cases, i consider that as a hotfix: it will let a node survive two restarts in one block (+/- 8 sec). while that is a strange situation, we faced that in our deploys and are going to face it as a deployment rule for a while in the future

the true fix should try to analyze a current mempool. to be honest, i just do not know if it possible to do via RPC

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need this hotfix in master -- it "fixes" a rather peculiar and artificial scenario.
Let's discuss and fix it properly in another task.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, 2 is still a magic value anyway cause nobody knows what exact value is perfect for a deposit but it certainly does not allow making two deposits (caused for any reason) in a row

dropped

@sami-nspcc
Copy link

I have recieved a notification of a new pull request. I am starting the build of images and binaries for further testing. Build number is 3689

@sami-nspcc
Copy link

I am running integration tests

@sami-nspcc
Copy link

Test run is finished. Please download the tarball from link. Untar and use allure open to watch the report

@carpawell carpawell changed the title Fix/Morph client [SUPPORT] Fix/Morph client Nov 23, 2022
@sami-nspcc
Copy link

I have recieved a notification of a new pull request. I am starting the build of images and binaries for further testing. Build number is 3701

@sami-nspcc
Copy link

I am running integration tests

@carpawell carpawell changed the base branch from support/v0.34 to master November 24, 2022 10:27
@sami-nspcc
Copy link

I have recieved a notification of a new pull request. I am starting the build of images and binaries for further testing. Build number is 3704

@sami-nspcc
Copy link

I am running integration tests

@sami-nspcc
Copy link

Test run is finished. Please download the tarball from link. Untar and use allure open to watch the report

@@ -38,6 +38,8 @@ Changelog for NeoFS Node
- Panic in IR when performing HEAD requests (#2069)
- Write-cache flush duplication (#2074)
- Ignore error if a transaction already exists in a morph client (#2075)
- Pack arguments of `setPrice` invocation during contract update (#2078)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wut?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rebase mistake, dropped

CHANGELOG.md Outdated
@@ -41,6 +41,7 @@ Changelog for NeoFS Node
- Pack arguments of `setPrice` invocation during contract update (#2078)
- Closing `neo-go` WS clients on shutdown and switch processes (#2080)
- Making notary deposits with a zero GAS balance (#2080)
- Notary requests on the shutdown (#2075)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on shutdown

@@ -133,7 +133,7 @@ func makeNotaryDeposit(c *cfg) (util.Uint256, error) {

// gasDivisor defines what part of GAS balance (1/gasDivisor)
// should be transferred to the notary service
gasDivisor = 2
gasDivisor = 3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need this hotfix in master -- it "fixes" a rather peculiar and artificial scenario.
Let's discuss and fix it properly in another task.

@sami-nspcc
Copy link

I have recieved a notification of a new pull request. I am starting the build of images and binaries for further testing. Build number is 3732

@sami-nspcc
Copy link

I am running integration tests

@sami-nspcc
Copy link

I have recieved a notification of a new pull request. I am starting the build of images and binaries for further testing. Build number is 3733

@sami-nspcc
Copy link

I have recieved a notification of a new pull request. I am starting the build of images and binaries for further testing. Build number is 3734

@sami-nspcc
Copy link

I am running integration tests

@carpawell carpawell marked this pull request as draft November 30, 2022 09:42
@nspcc-dev nspcc-dev deleted a comment from fyrchik Nov 30, 2022
@sami-nspcc
Copy link

I have recieved a notification of a new pull request. I am starting the build of images and binaries for further testing. Build number is 3741

@nspcc-dev nspcc-dev deleted a comment from fyrchik Nov 30, 2022
@carpawell carpawell marked this pull request as ready for review November 30, 2022 09:47
@sami-nspcc
Copy link

I am running integration tests

@sami-nspcc
Copy link

Test run is finished. Please download the tarball from link. Untar and use allure open to watch the report

Could be related to "websocket users limit reached" on the `neo-go` server
side when an SN/IR is rebooting repeatedly.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
@sami-nspcc
Copy link

I have recieved a notification of a new pull request. I am starting the build of images and binaries for further testing. Build number is 3752

@sami-nspcc
Copy link

I am running integration tests

@fyrchik fyrchik merged commit 50d28b7 into nspcc-dev:master Nov 30, 2022
@sami-nspcc
Copy link

Test run is finished. Please download the tarball from link. Untar and use allure open to watch the report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working U3 Regular
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants