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

Add deposit/withdrawal and container payments tests with mainnet enabled #828

Merged
merged 9 commits into from
Aug 2, 2024

Conversation

evgeniiz321
Copy link
Contributor

closes #824

@evgeniiz321
Copy link
Contributor Author

Blocked by nspcc-dev/neofs-node#2894

@evgeniiz321 evgeniiz321 changed the title Add deposit/withdrawal test with mainnet enabled Add deposit/withdrawal and container payments tests with mainnet enabled Jul 19, 2024
@evgeniiz321 evgeniiz321 force-pushed the ISSUE-824 branch 2 times, most recently from 3c4320a to 922469e Compare July 23, 2024 13:37
Copy link
Member

@carpawell carpawell left a comment

Choose a reason for hiding this comment

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

Fact: NeoFS contract is deployed with a wrong wallet (I mean the third arg in the deploy call), tried it locally.

ir_alphabet_pubkey_from_neogo = wallet_utils.get_last_public_key_from_wallet_with_neogo(
self.neo_go(), self.default_wallet.path
)
time.sleep(10)
Copy link
Member

Choose a reason for hiding this comment

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

you can try to extend neo-go wrapper with their new --await flag, i think it is better and allows to drop sleep here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

--await should be specified to which command? ./neo-go wallet nep17 transfer doesn't have it, at least on v0.104.0 that is used in tests

   --wallet value, -w value        Path to the wallet file ('-' to read from stdin); conflicts with --wallet-config flag.
   --wallet-config value           Path to the wallet config file; conflicts with --wallet flag.
   --out value                     file (JSON) to put signature context with a transaction to
   --from value                    Address to send an asset from
   --to value                      Address to send an asset to
   --token value                   Token to use (hash or name (for NEO/GAS or imported tokens))
   --gas value, -g value           network fee to add to the transaction (prioritizing it)
   --sysgas value, -e value        system fee to add to the transaction (compensating for execution)
   --force                         Do not ask for a confirmation (and ignore errors)
   --amount value                  Amount of asset to send
   --rpc-endpoint value, -r value  RPC node address
   --timeout value, -s value       Timeout for the operation (default: 10s)

Copy link
Member

Choose a reason for hiding this comment

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

v0.104.0

WHY?

Copy link
Member

Choose a reason for hiding this comment

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

yes, your version is kinda old:

▶ neo-go --version                                           
NeoGo
Version: 0.106.2
GoVersion: go1.22.0

~                                                                                                                                                                                                 
▶ neo-go wallet nep17 transfer -h
NAME:
   neo-go wallet nep17 transfer - transfer NEP-17 tokens

USAGE:
   transfer -w wallet [--wallet-config path] [--await] --rpc-endpoint <node> --timeout <time> --from <addr> --to <addr> --token <hash-or-name> --amount string [data] [-- <cosigner1:Scope> [<cosigner2> [...]]]

DESCRIPTION:
   Transfers specified NEP-17 token amount with optional 'data' parameter and cosigners
   list attached to the transfer. See 'contract testinvokefunction' documentation
   for the details about 'data' parameter and cosigners syntax. If no 'data' is
   given then default nil value will be used. If no cosigners are given then the
   sender with CalledByEntry scope will be used as the only signer. When --await
   flag is used, the command waits for the transaction to be included in a block
   before exiting.


OPTIONS:
   --wallet value, -w value        Path to the wallet file ('-' to read from stdin); conflicts with --wallet-config flag.
   --wallet-config value           Path to the wallet config file; conflicts with --wallet flag.
   --out value                     file (JSON) to put signature context with a transaction to
   --from value                    Address to send an asset from
   --to value                      Address to send an asset to
   --token value                   Token to use (hash or name (for NEO/GAS or imported tokens))
   --gas value, -g value           network fee to add to the transaction (prioritizing it)
   --sysgas value, -e value        system fee to add to the transaction (compensating for execution)
   --force                         Do not ask for a confirmation (and ignore errors)
   --await                         wait for the transaction to be included in a block
   --amount value                  Amount of asset to send
   --rpc-endpoint value, -r value  RPC node address
   --timeout value, -s value       Timeout for the operation (default: 10s)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed, neo-go version bumped, await added, works ok.

neofs-testlib/neofs_testlib/env/env.py Outdated Show resolved Hide resolved
Evgeniy Zayats added 4 commits July 24, 2024 20:24
@evgeniiz321 evgeniiz321 force-pushed the ISSUE-824 branch 2 times, most recently from 7f8e838 to 2ea18cc Compare July 25, 2024 00:40
@carpawell
Copy link
Member

@evgeniiz321, what status here? Does everything work (it has "debug" commit)?

@evgeniiz321
Copy link
Contributor Author

@carpawell deposit/withdrawal test works ok, but there is a different problem with storage cleanup during tests, debug is for that

@evgeniiz321 evgeniiz321 marked this pull request as draft July 26, 2024 01:19
@evgeniiz321 evgeniiz321 force-pushed the ISSUE-824 branch 3 times, most recently from f5493aa to f9a8de0 Compare August 1, 2024 14:02
Evgeniy Zayats added 4 commits August 1, 2024 13:28
@evgeniiz321 evgeniiz321 marked this pull request as ready for review August 1, 2024 22:45
@evgeniiz321 evgeniiz321 requested a review from carpawell August 1, 2024 22:45
Copy link
Member

@roman-khimov roman-khimov left a comment

Choose a reason for hiding this comment

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

OK, let's move on.

@roman-khimov roman-khimov merged commit b316aaa into master Aug 2, 2024
4 of 5 checks passed
@roman-khimov roman-khimov deleted the ISSUE-824 branch August 2, 2024 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test deposit/withdrawals with mainnet-enabled setup
3 participants