Commit graph

40 commits

Author SHA1 Message Date
bcf22c50a1 [#10] Use UpdateWithData call wrapper in Update methods
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
2023-06-19 11:17:51 +03:00
a8029c71cd [#21] Document contract storage schemes
Signed-off-by: Airat Arifullin a.arifullin@yadro.com
2023-05-12 14:51:21 +03:00
19a8ef2d02 Rename package name
Due to source code relocation from GitHub.

Signed-off-by: Alex Vanin <a.vanin@yadro.com>
2023-03-07 14:06:21 +03:00
Evgenii Stratonikov
6c805c1b4e Move from nspcc-dev to TrueCloudLab
Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
2022-12-13 11:12:48 +03:00
Evgenii Stratonikov
b4fdd854b7 [#259] nns: Check admin in Renew
Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
2022-08-29 12:03:24 +03:00
Evgenii Stratonikov
5b5ff8cb33 [#261] nns: Set expiration time based on arguments
Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
2022-08-29 12:03:24 +03:00
Evgenii Stratonikov
69b308e792 [#248] *: Fix integer types
When using contracts as a dependency, out-of-range `int` can cause
problems on 32-bit architectures. Contract byte-code hasn't changed.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-07-06 14:28:47 +03:00
Elizaveta Chichindaeva
335b04d9a6 [#240] English Check
Signed-off-by: Elizaveta Chichindaeva <elizaveta@nspcc.ru>
2022-04-26 23:22:06 +03:00
Angira Kekteeva
0aa7fd4189 [#238] nns: Fix maxDomainNameFragmentLength
maxDomainNameFragmentLength means maximum length of label of domain name

A label may contain zero to 63 characters. The null label, of length
zero, is reserved for the root zone. The full domain name may not exceed
the length of 253 characters in its textual representation

Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2022-04-05 14:57:06 +03:00
Evgenii Stratonikov
33d5568511 [#234] *: Fix some lint issues
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-03-28 10:27:25 +03:00
Alex Vanin
2b624a38cc [#231] Remove previous contract update code
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-03-23 18:48:14 +03:00
Evgenii Stratonikov
74e4bbb6b9 [#196] nns: remove duplicate records in _deploy
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-02-07 16:08:14 +03:00
Evgenii Stratonikov
74cc2d0aea [#204] *: check contract version during update
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-01-11 11:55:04 +03:00
Pavel Karpy
8718e146c9 [#200] nns: Provide additional data in Update
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-12-14 14:53:07 +03:00
Alex Vanin
2ff25b5985 [#194] nns: Leave container contract as owner of container zone
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-12-08 18:19:07 +03:00
Evgenii Stratonikov
4248424a44 nns: disallow conflicting records on register
Require no records '*.domain' to be present when registering domain.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-12-02 14:14:22 +03:00
Evgenii Stratonikov
f12c44fc78 nns: allow to register arbitrary-level domains
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-12-02 14:14:22 +03:00
Pavel Karpy
23d9799e51 [#185] *: Use neo-go's interop constants instead of local
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-12-02 13:09:50 +03:00
Pavel Karpy
2ee2344e5f [#184] *: Move all panics on witness checks in common
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-11-30 12:14:19 +03:00
Evgenii Stratonikov
c7a02f0259 [#180] nns: allow hyphen in names
Both amazon bucket naming rules and DNS label names prohibit hyphen as
first or last character, but allow it in the middle.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-11-30 11:50:40 +03:00
Evgenii Stratonikov
d8e42fcd16 nns: migrate roots from the old version
Now root is just a TLD and needs to have SOA record.
Set owner to committee and some default values for other
parameters.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-11-25 11:26:35 +03:00
Evgenii Stratonikov
d852229b74 nns: add version to the list of safe methods
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-11-25 11:26:35 +03:00
Evgenii Stratonikov
da7f7eb88f [#164] *: provide version as the last argument
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-11-19 13:38:15 +03:00
Evgenii Stratonikov
99c81fe26a [#165] nns: disallow duplicating records
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-11-19 10:36:05 +03:00
Evgenii Stratonikov
63673a5e54 [#139] nns: allow to resolve FQDN
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-10-26 14:00:28 +03:00
Evgenii Stratonikov
05d372e882 [#139] nns: check domain expiration for read functions
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-10-26 14:00:28 +03:00
Evgenii Stratonikov
552def9322 [#139] nns: require admin signature for registering subdomain
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-10-26 14:00:28 +03:00
Evgenii Stratonikov
e0dbd07f21 [#139] nns: replace root with TLD
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-10-26 14:00:28 +03:00
Evgenii Stratonikov
edbd137340 [#98] nns: add Version method
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-10-26 12:16:33 +03:00
Evgenii Stratonikov
c4e2e8dfbb [#135] nns: add getRecords to the safe methods list
Was introduced after renaming in #125.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-10-07 12:25:19 +03:00
Evgenii Stratonikov
555d4b8c04 [#137] nns: remove unused function
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-10-05 10:01:27 +03:00
Denis Kirillov
e136e63be2 [#125] Add migration
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-10-01 12:50:26 +03:00
Denis Kirillov
4a805dba43 [#125] Refactoring
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-10-01 12:50:26 +03:00
Denis Kirillov
2a4fc45c25 [#125] Add soa record type
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-10-01 12:50:26 +03:00
Denis Kirillov
b412909f40 [#125] Support multiple records of the same type
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-10-01 12:50:26 +03:00
Evgenii Stratonikov
5be532cf57 nns: remove migration in _deploy
No longer needed, see 978a43cec.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-09-30 21:03:09 +03:00
Evgenii Stratonikov
b2f6fb641a nns: provide AllowCall to management.Update
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-09-20 20:08:11 +03:00
Evgenii Stratonikov
978a43cec2 nns: migrate data from the old version
The old contract was compiled in a such way that `Update` used
all flags except `AllowCall`. Because of this it is impossible to
calculate the key of any record as it requires `Crypto` native contract.
Thus we iterate over all records and transform them into the
serialized representation (`std.Serialize` doesn't work either).
The `Name` field in the resulting structure is empty but this is not a
big deal, `getRecord` continues to work.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-09-20 20:08:11 +03:00
Evgenii Stratonikov
effa9b3863 nns: update to the latest version
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-09-20 20:08:11 +03:00
Evgenii Stratonikov
25a6b00cb9 nns: add implementation from neo-go
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-07-22 14:46:29 +03:00