Skip to content

Commit aa078c6

Browse files
pietrodimarco-dfinityIDX GitHub Automation
andauthored
feat(NRC): Implement RegistryClient with support for rewardable nodes computation (#5869)
Changes: - Add RegistryClient with support for rewardable nodes computation given two UTC days - Used as a wrapper for the registry store -> adapt canister code to make use of it - Add tests covering rewardable nodes computation - Add utils functions on `DayUTC` type - Add `chrono` and `indexmap` dep. - Golden state test performed in branch` pmarco/add-registry-to-nrc-golden-state-test` --------- Co-authored-by: IDX GitHub Automation <infra+github-automation@dfinity.org>
1 parent f56ac62 commit aa078c6

File tree

29 files changed

+1130
-186
lines changed

29 files changed

+1130
-186
lines changed

Cargo.Bazel.Fuzzing.json.lock

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"checksum": "9a08543b41c090959155c22a3c502e5bee0a06b8fd053b6c7f1f0c9463413ebf",
2+
"checksum": "dc542233ca41d39902fd314ea0f72fa3a7eaaf46cab14ff182bfb33a7cb24165",
33
"crates": {
44
"abnf 0.12.0": {
55
"name": "abnf",
@@ -13155,6 +13155,62 @@
1315513155
],
1315613156
"license_file": "LICENSE.txt"
1315713157
},
13158+
"chrono 0.4.41": {
13159+
"name": "chrono",
13160+
"version": "0.4.41",
13161+
"package_url": "https://github.com/chronotope/chrono",
13162+
"repository": {
13163+
"Git": {
13164+
"remote": "https://github.com/chronotope/chrono.git",
13165+
"commitish": {
13166+
"Rev": "d1de1d95ead4e59472622761ad545dc4a940992b"
13167+
}
13168+
}
13169+
},
13170+
"targets": [
13171+
{
13172+
"Library": {
13173+
"crate_name": "chrono",
13174+
"crate_root": "src/lib.rs",
13175+
"srcs": {
13176+
"allow_empty": true,
13177+
"include": [
13178+
"**/*.rs"
13179+
]
13180+
}
13181+
}
13182+
}
13183+
],
13184+
"library_target_name": "chrono",
13185+
"common_attrs": {
13186+
"compile_data_glob": [
13187+
"**"
13188+
],
13189+
"crate_features": {
13190+
"common": [
13191+
"alloc"
13192+
],
13193+
"selects": {}
13194+
},
13195+
"deps": {
13196+
"common": [
13197+
{
13198+
"id": "num-traits 0.2.19",
13199+
"target": "num_traits"
13200+
}
13201+
],
13202+
"selects": {}
13203+
},
13204+
"edition": "2021",
13205+
"version": "0.4.41"
13206+
},
13207+
"license": "MIT OR Apache-2.0",
13208+
"license_ids": [
13209+
"Apache-2.0",
13210+
"MIT"
13211+
],
13212+
"license_file": "LICENSE.txt"
13213+
},
1315813214
"ciborium 0.2.1": {
1315913215
"name": "ciborium",
1316013216
"version": "0.2.1",
@@ -20549,6 +20605,11 @@
2054920605
"id": "chrono 0.4.38",
2055020606
"target": "chrono"
2055120607
},
20608+
{
20609+
"id": "chrono 0.4.41",
20610+
"target": "chrono",
20611+
"alias": "chrono_canisters"
20612+
},
2055220613
{
2055320614
"id": "ciborium 0.2.1",
2055420615
"target": "ciborium"
@@ -93736,6 +93797,7 @@
9373693797
"cfg-if 1.0.0",
9373793798
"chacha20poly1305 0.10.1",
9373893799
"chrono 0.4.38",
93800+
"chrono 0.4.41",
9373993801
"ciborium 0.2.1",
9374093802
"cidr 0.2.3",
9374193803
"clap 4.5.20",

Cargo.Bazel.Fuzzing.toml.lock

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2127,7 +2127,7 @@ dependencies = [
21272127
"abnf_to_pest",
21282128
"base16",
21292129
"base64-url",
2130-
"chrono",
2130+
"chrono 0.4.38",
21312131
"ciborium",
21322132
"clap 3.2.25",
21332133
"codespan-reporting",
@@ -2223,6 +2223,14 @@ dependencies = [
22232223
"windows-targets 0.52.6",
22242224
]
22252225

2226+
[[package]]
2227+
name = "chrono"
2228+
version = "0.4.41"
2229+
source = "git+https://github.com/chronotope/chrono.git?tag=v0.4.41#d1de1d95ead4e59472622761ad545dc4a940992b"
2230+
dependencies = [
2231+
"num-traits",
2232+
]
2233+
22262234
[[package]]
22272235
name = "ciborium"
22282236
version = "0.2.1"
@@ -2382,7 +2390,7 @@ name = "cloudflare"
23822390
version = "0.12.0"
23832391
source = "git+https://github.com/dfinity/cloudflare-rs.git?rev=8b011d170d9d61eaad77bb9645371f6219285104#8b011d170d9d61eaad77bb9645371f6219285104"
23842392
dependencies = [
2385-
"chrono",
2393+
"chrono 0.4.38",
23862394
"http 0.2.12",
23872395
"percent-encoding",
23882396
"reqwest 0.11.27",
@@ -3496,7 +3504,8 @@ dependencies = [
34963504
"cddl",
34973505
"cfg-if 1.0.0",
34983506
"chacha20poly1305",
3499-
"chrono",
3507+
"chrono 0.4.38",
3508+
"chrono 0.4.41",
35003509
"ciborium",
35013510
"cidr",
35023511
"clap 4.5.20",
@@ -4319,7 +4328,7 @@ checksum = "c0a17f0708692024db9956b31d7a20163607d2745953f5ae8125ab368ba280ad"
43194328
dependencies = [
43204329
"arrayvec 0.7.4",
43214330
"bytes",
4322-
"chrono",
4331+
"chrono 0.4.38",
43234332
"const-hex",
43244333
"elliptic-curve 0.13.8",
43254334
"ethabi",
@@ -7039,7 +7048,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
70397048
checksum = "19501afb943ae5806548bc3ebd7f3374153ca057a38f480ef30adfde5ef09755"
70407049
dependencies = [
70417050
"base64 0.22.1",
7042-
"chrono",
7051+
"chrono 0.4.38",
70437052
"schemars",
70447053
"serde",
70457054
"serde-value",
@@ -7109,7 +7118,7 @@ checksum = "18ec0fcafd3add30b413b096a61d69b0a37f94d3f95b6f505a57ea3d27cec2a7"
71097118
dependencies = [
71107119
"base64 0.22.1",
71117120
"bytes",
7112-
"chrono",
7121+
"chrono 0.4.38",
71137122
"either",
71147123
"futures",
71157124
"home",
@@ -7145,7 +7154,7 @@ version = "0.94.2"
71457154
source = "registry+https://github.com/rust-lang/crates.io-index"
71467155
checksum = "a50c095f051dada37740d883b6d47ad0430e95082140718073b773c8a70f231c"
71477156
dependencies = [
7148-
"chrono",
7157+
"chrono 0.4.38",
71497158
"form_urlencoded",
71507159
"http 1.3.1",
71517160
"k8s-openapi",
@@ -8508,7 +8517,7 @@ dependencies = [
85088517
"arc-swap",
85098518
"base64 0.22.1",
85108519
"bytes",
8511-
"chrono",
8520+
"chrono 0.4.38",
85128521
"http 1.3.1",
85138522
"itertools 0.14.0",
85148523
"prometheus 0.14.0",
@@ -9826,7 +9835,7 @@ version = "0.2.4"
98269835
source = "registry+https://github.com/rust-lang/crates.io-index"
98279836
checksum = "0c2aa5feb83bf4b2c8919eaf563f51dbab41183de73ba2353c0e03cd7b6bd892"
98289837
dependencies = [
9829-
"chrono",
9838+
"chrono 0.4.38",
98309839
"itertools 0.10.5",
98319840
"once_cell",
98329841
"regex",
@@ -10387,7 +10396,7 @@ dependencies = [
1038710396
"bitvec",
1038810397
"bitvec-nom2",
1038910398
"bytes",
10390-
"chrono",
10399+
"chrono 0.4.38",
1039110400
"either",
1039210401
"jzon",
1039310402
"konst",
@@ -10888,7 +10897,7 @@ version = "0.2.0"
1088810897
source = "registry+https://github.com/rust-lang/crates.io-index"
1088910898
checksum = "8395b4f860856b740f20a296ea2cd4d823e81a2658cf05ef61be22916026a906"
1089010899
dependencies = [
10891-
"chrono",
10900+
"chrono 0.4.38",
1089210901
]
1089310902

1089410903
[[package]]
@@ -11113,7 +11122,7 @@ dependencies = [
1111311122
"async-web-client",
1111411123
"base64 0.22.1",
1111511124
"blocking",
11116-
"chrono",
11125+
"chrono 0.4.38",
1111711126
"futures",
1111811127
"futures-rustls",
1111911128
"http 1.3.1",
@@ -11746,7 +11755,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1174611755
checksum = "07ff71d2c147a7b57362cead5e22f772cd52f6ab31cfcd9edcd7f6aeb2a0afbe"
1174711756
dependencies = [
1174811757
"base64 0.13.1",
11749-
"chrono",
11758+
"chrono 0.4.38",
1175011759
"hex",
1175111760
"indexmap 1.9.3",
1175211761
"serde",
@@ -11762,7 +11771,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1176211771
checksum = "d6b6f7f2fcb69f747921f79f3926bd1e203fce4fef62c268dd3abfb6d86029aa"
1176311772
dependencies = [
1176411773
"base64 0.22.1",
11765-
"chrono",
11774+
"chrono 0.4.38",
1176611775
"hex",
1176711776
"indexmap 1.9.3",
1176811777
"indexmap 2.7.1",
@@ -14063,7 +14072,7 @@ checksum = "a23c883a3a494a5f55a6c1c326df3c84c69c91f0a337c9ae16f9bea279740fb2"
1406314072
dependencies = [
1406414073
"bytes",
1406514074
"cfg-if 1.0.0",
14066-
"chrono",
14075+
"chrono 0.4.38",
1406714076
"clap 4.5.20",
1406814077
"lalrpop 0.22.1",
1406914078
"lz4_flex",

Cargo.Bazel.json.lock

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"checksum": "ece8f43fda687f4da81726e2de89ee2d8cc1f63157802ec59b99f106f96325c8",
2+
"checksum": "3fa8aecfab013f061ffed0e5380dacb1de5bb6a520c30d888f1577d188d524f3",
33
"crates": {
44
"abnf 0.12.0": {
55
"name": "abnf",
@@ -13041,6 +13041,62 @@
1304113041
],
1304213042
"license_file": "LICENSE.txt"
1304313043
},
13044+
"chrono 0.4.41": {
13045+
"name": "chrono",
13046+
"version": "0.4.41",
13047+
"package_url": "https://github.com/chronotope/chrono",
13048+
"repository": {
13049+
"Git": {
13050+
"remote": "https://github.com/chronotope/chrono.git",
13051+
"commitish": {
13052+
"Rev": "d1de1d95ead4e59472622761ad545dc4a940992b"
13053+
}
13054+
}
13055+
},
13056+
"targets": [
13057+
{
13058+
"Library": {
13059+
"crate_name": "chrono",
13060+
"crate_root": "src/lib.rs",
13061+
"srcs": {
13062+
"allow_empty": true,
13063+
"include": [
13064+
"**/*.rs"
13065+
]
13066+
}
13067+
}
13068+
}
13069+
],
13070+
"library_target_name": "chrono",
13071+
"common_attrs": {
13072+
"compile_data_glob": [
13073+
"**"
13074+
],
13075+
"crate_features": {
13076+
"common": [
13077+
"alloc"
13078+
],
13079+
"selects": {}
13080+
},
13081+
"deps": {
13082+
"common": [
13083+
{
13084+
"id": "num-traits 0.2.19",
13085+
"target": "num_traits"
13086+
}
13087+
],
13088+
"selects": {}
13089+
},
13090+
"edition": "2021",
13091+
"version": "0.4.41"
13092+
},
13093+
"license": "MIT OR Apache-2.0",
13094+
"license_ids": [
13095+
"Apache-2.0",
13096+
"MIT"
13097+
],
13098+
"license_file": "LICENSE.txt"
13099+
},
1304413100
"ciborium 0.2.1": {
1304513101
"name": "ciborium",
1304613102
"version": "0.2.1",
@@ -20367,6 +20423,11 @@
2036720423
"id": "chrono 0.4.38",
2036820424
"target": "chrono"
2036920425
},
20426+
{
20427+
"id": "chrono 0.4.41",
20428+
"target": "chrono",
20429+
"alias": "chrono_canisters"
20430+
},
2037020431
{
2037120432
"id": "ciborium 0.2.1",
2037220433
"target": "ciborium"
@@ -93701,6 +93762,7 @@
9370193762
"cfg-if 1.0.0",
9370293763
"chacha20poly1305 0.10.1",
9370393764
"chrono 0.4.38",
93765+
"chrono 0.4.41",
9370493766
"ciborium 0.2.1",
9370593767
"cidr 0.2.3",
9370693768
"clap 4.5.20",

0 commit comments

Comments
 (0)