derekpierre
61adba7207
Even though the ritual is cached, the node still checks its status on chain on purpose (the endtimestamp could have been extended). Remove active ritual cache entry if ritual is ever deemed to be no longer active by the Coordinator contract.
2024-02-13 10:53:03 -05:00
derekpierre
c5b86572c9
Actor now uses cached Ritual object whenever available which has aggregated transcript bytes on it - this saves more RPC calls for already completed/active Ritual whose values (that we care about) don't change at the moment.
...
Aggregated transcript is no longer cached separately (but as part of cached Ritual object) so update code/tests accordingly.
2024-02-13 10:53:03 -05:00
derekpierre
635238f5a6
Cache an active Ritual object as part of DKGStorage. Now that the ritual object is cached, there is no need to separately cache the aggregated transcript.
2024-02-13 10:53:03 -05:00
derekpierre
611445f80e
Don't cache derived decryption shares - what in the hell was I thinking, they are ciphertext specific at the moment.
2024-02-13 10:53:03 -05:00
derekpierre
0351c7726e
Incorporate caching of validators list into _resolve_validators() method - much simpler set up that cleans up usages of resolve_validators() everywhere else.
2024-02-13 10:53:03 -05:00
derekpierre
31e1c18a69
Add ability to clear the cache values for a specific ritual - for now it beneficial for testing; perhaps can be good for future revoke functionality.
2024-02-13 10:53:03 -05:00
derekpierre
083df6664f
Fix missing return statement for getting decryption share.
2024-02-13 10:53:03 -05:00
derekpierre
b674732f71
Utilize DKGStorage cache more effectively to obtain validators, aggregated transcript, and decryption share for a ritual - this will reduce RPC calls, and additional computations.
2024-02-13 10:53:03 -05:00
derekpierre
f767865131
Remove storage of node's transcript bytes for each ritual - it isn't used
...
Allow caching of list of validators used in round 1 - allows potential reuse for round 2, and during threshold decryption if needed.
Allow caching of node's decryption share for a completed ritual - allows for reuse for the same ritual.
Use named constants as key values for entries in DKGStorage - just simpler.
2024-02-13 10:53:03 -05:00
derekpierre
6fe1a9462c
Update typehint for method to derive decryption share.
2024-02-13 10:53:03 -05:00
derekpierre
ddc1b454e5
Use `nucypher-contracts:main` as the canonical source for contract registries.
...
Add test to ensure github raw path is actually correct.
2024-02-13 10:53:03 -05:00
Kieran Prasch
35845d9185
Updates remote regstry source url to reference the main branch on nucypher/nuypher github.
2024-02-13 10:53:03 -05:00
KPrasch
b50e754c31
Correction of ABI ordering inside the registry for future diff preservation
2024-02-13 10:53:03 -05:00
KPrasch
b9d9119756
removes the /node_metadata GET endpoint.
2024-02-13 10:53:03 -05:00
KPrasch
00e8eff231
Update nucypher/blockchain/eth/agents.py
...
Co-authored-by: piotr-roslaniec <39299780+piotr-roslaniec@users.noreply.github.com>
2024-02-13 10:53:03 -05:00
KPrasch
fed7edcc9d
updates embeded registry to sync with nucypher-contracts v0.19.0
2024-02-13 10:53:03 -05:00
derekpierre
f8609a3d01
Add test for updated tx receipt processing logic which removes the txhash from dkg storage whenever the pending tx hash is determined to have been actually mined, either successfully (status=1) or not.
...
If the tx is already mined then the Coordinator contract should be the source of truth for how to proceed.
2024-02-13 10:53:03 -05:00
derekpierre
651f2601ad
Once a receipt is obtained clear the tx hash from the dkg storage utility.
2024-02-13 10:53:03 -05:00
derekpierre
077a2f4234
Perform all phase checks in one function including pending tx.
...
For pending tx we don't currently care about the receipt - we will care soon for retry/replacement functionality but that is expected to be handled by a separate task.
2024-02-13 10:53:03 -05:00
derekpierre
00788e9001
Remove use of index within Participant struct - we don't specifically use it.
2024-02-13 10:53:03 -05:00
derekpierre
e1a74366a0
Don't obtain entire ritual when only specific participant information is needed for determining participation state.
2024-02-13 10:53:03 -05:00
derekpierre
f2dff32a33
Add type hint to aggregate_transcripts call.
2024-02-13 10:53:03 -05:00
derekpierre
84dc5b96bb
Max results can be 0, but it should not be negative.
2024-02-13 10:53:03 -05:00
derekpierre
5939e6a00c
Raise RuntimeError whenever round 1 called for a ritual that the node is not participating in - participation state should have prevented call to perform_round_1.
...
Use dkg_size value on Ritual instead of length of providers.
Some code cleanup with comments.
2024-02-13 10:53:03 -05:00
KPrasch
ee472163eb
Return dkg phase fetching to operator as methods; Respond to RFCs in PR #3419
...
Co-Authored-By: derekpierre <derek.pierre@gmail.com>
2024-02-13 10:53:03 -05:00
derekpierre
89fa5a2d88
Make get_participants non-public since it is really an internal function used when getting a ritual object - it is never/should never be called separately.
2024-02-13 10:53:03 -05:00
KPrasch
38c26d81aa
respond to RFCs in PR #3419
2024-02-13 10:53:03 -05:00
Kieran Prasch
eabc61deaa
relocates the remaining Coordinator models to eth/models.py
2024-02-13 10:53:03 -05:00
Kieran Prasch
a3d8cb00e9
linting, code cleanup, localizes Participant constructor usage.
2024-02-13 10:53:03 -05:00
KPrasch
91c8486f7a
use dkg storage txhashes to determine if there is a tracked pending dkg transaction.
2024-02-13 10:53:03 -05:00
KPrasch
5f8d68fe08
bugfix: always handle transaction hashes instead of transcripts for dkg tracking. Updates mocks to return txhash instead of receipt for transcript and aggregation posting.
2024-02-13 10:53:03 -05:00
KPrasch
2a73c816be
agent layer: sets by default for transcript and aggregation posting
2024-02-13 10:53:03 -05:00
KPrasch
b959354b0d
annotations and commentary for dkg phase preconditions.
2024-02-13 10:53:03 -05:00
KPrasch
e5782c65f8
agent layer: isolates coordinator function interface exposure (abstracting page management to actors)
2024-02-13 10:53:03 -05:00
KPrasch
a9e4a87e6c
actor layer: isolate remotely fetched data models for dkg rounds
2024-02-13 10:53:03 -05:00
KPrasch
b2db18aa86
isolates ritual pending handlers
2024-02-13 10:53:03 -05:00
KPrasch
550ce7c8c7
linting
2024-02-13 10:53:03 -05:00
derekpierre
f80b7c939a
Implement pagination to obtain participants from contract, and Remove participants as an optional parameter from get_ritual since True was the default, and False was never used.
2024-02-13 10:53:03 -05:00
derekpierre
aaeeb0db10
Check whether ritual is active before checking whether the node is a participant in it.
2024-02-13 10:53:03 -05:00
derekpierre
623c4356a9
Obtain transcript if checking whether it has already been set for round 1, or else it will always be assumed to not be set.
2024-02-13 10:53:03 -05:00
derekpierre
c64e4bfc42
Have Ritual struct store ritual id instead of passing both of them together.
2024-02-13 10:53:03 -05:00
KPrasch
6fc96d3352
sync _UpAndDownInTheWater mocks
2024-02-13 10:53:03 -05:00
KPrasch
6dfe7f9953
Updates ritual and participant mocks; sync MockCoordinator
2024-02-13 10:53:03 -05:00
KPrasch
cdea26074d
annotates rpc calls
2024-02-13 10:53:03 -05:00
KPrasch
96cac14fd5
handle shared coordinator reads and dkg artifact preperation logic between ursula and decryptors.
2024-02-13 10:53:03 -05:00
KPrasch
9f8661c0bb
handle validator resolution independantly from transcript downloads.
2024-02-13 10:53:03 -05:00
KPrasch
2d1c044215
use an actor-layer abstraction for assembling coordinator data
2024-02-13 10:53:03 -05:00
KPrasch
2c26384c39
removes business logic from coordinator agent, plainly exposes participant views without mutation.
2024-02-13 10:53:03 -05:00
KPrasch
ba4c86066b
removes bulk data downloading interface from coordinator agent
2024-02-13 10:53:03 -05:00
Kieran Prasch
9632f97737
include index in the nucypher-local model of participants
2024-02-13 10:53:03 -05:00
Kieran Prasch
7fa08a25ad
disables transcript downloading by bob during retrieval
2024-02-13 10:53:03 -05:00
Kieran Prasch
955564c688
exposes paginated view of participants (with transcripts) in coordinator agent.
2024-02-13 10:53:03 -05:00
Kieran Prasch
5e834c6330
exposes new coordinator views for getParticipantProviders and isProviderParticipating
2024-02-13 10:53:03 -05:00
Kieran Prasch
9405a35b31
sets with_participants=False by default.
2024-02-13 10:53:03 -05:00
Kieran Prasch
00d15e3a3a
do not read peer transcript data when self-verifying ritual participation (when handling threshold decryption requests).
2024-02-13 10:53:03 -05:00
Kieran Prasch
381dd00163
code quality: unpack return of to avoid extra comprehensions
2024-02-13 10:53:03 -05:00
Kieran Prasch
a66f88d573
do not read peer transcript data when performing round 1.
2024-02-13 10:53:03 -05:00
Kieran Prasch
7caead29ca
bugfix: RitualError is not defined.
2024-02-13 10:53:03 -05:00
KPrasch
10b7c53c4b
Update nucypher/network/nodes.py
2024-02-13 10:53:03 -05:00
KPrasch
4d06ad441d
linting
2024-02-13 10:53:03 -05:00
KPrasch
356a8645f5
include config migration for node_storage deprecation
2024-02-13 10:53:03 -05:00
KPrasch
1fcf3c84a8
fully deprecates the node storage API
2024-02-13 10:53:03 -05:00
KPrasch
c98e31c366
disables ssl hostname checking
2024-02-13 10:53:03 -05:00
Kieran Prasch
bd173e97e4
linting
2024-02-13 10:53:03 -05:00
Kieran Prasch
2c1183bbce
apply black code formatting and ruff import sorting to select modules
2024-02-13 10:53:03 -05:00
Kieran Prasch
32fb9f5742
removes dead code
2024-02-13 10:53:03 -05:00
Kieran Prasch
9e6bc1dbc7
preserve node storage dependency injection for ursulas.
2024-02-13 10:53:03 -05:00
Kieran Prasch
0f05d3d4f5
customizes certificate handling request session adapter for ursula p2p services
2024-02-13 10:53:03 -05:00
Kieran Prasch
7ad2635b83
use NodeStorage as the implcit default, removes storage confiuration abilities.
2024-02-13 10:53:03 -05:00
Kieran Prasch
2a6c6a2b35
isolate cert caching from memory adapter
2024-02-13 10:53:03 -05:00
Kieran Prasch
1b6b61e334
Makes network middleware loally certificate agnostic
2024-02-13 10:53:03 -05:00
Kieran Prasch
13758d14a0
removes certificate filepath handling
2024-02-13 10:53:03 -05:00
Kieran Prasch
1ab6e2e121
collapse storages
2024-02-13 10:53:03 -05:00
Kieran Prasch
da58a4aae7
in-memory certificate handling utilities
2024-02-13 10:53:03 -05:00
KPrasch
1afe48211e
Bump version: 7.1.0 → 7.2.0
2024-02-13 10:53:03 -05:00
derekpierre
95ac122e49
Reduce the eagerness of the ActiveRitualTracker by having it scan for events every 2mins. instead of every 20s.
2024-01-25 15:31:01 +01:00
David Núñez
d37bbf88bc
Don't use gas strategies
...
Gas strategies are meant only for legacy transactions (pre-EIP1559). See https://web3py.readthedocs.io/en/stable/gas_price.html
2024-01-24 15:55:35 +01:00
KPrasch
6bc2d4bad2
include block height in the node's html status web page.
2024-01-24 11:45:21 +01:00
KPrasch
2fe61f5cc3
include latest event scanner block in json status endpoint
2024-01-24 11:45:21 +01:00
KPrasch
7bac254aae
use the threshold favicon instead of nucypher to fix http 404ing on the node status web page.
2024-01-23 20:47:44 +01:00
KPrasch
a58e11ea0b
handle both pending and validated transactions when logging from parsed dkg storage.
2024-01-23 20:47:44 +01:00
KPrasch
fb13103b14
fixes several log formatting issues.
2024-01-23 20:47:44 +01:00
Kieran Prasch
8af8133c2d
utilize the flask test client on Ursula to integration test ipv4 resolution from flask request headers.
2024-01-23 19:21:26 +01:00
KPrasch
55f8b2102b
respond to RFCs in PR #3398
2024-01-23 19:21:26 +01:00
KPrasch
28a0cc750e
removes (redundant) trusted proxy allow listing; documents incoming ip handling functions.
2024-01-23 19:21:26 +01:00
KPrasch
e553014446
properly handle both ipv4 and ipv6 addresses
2024-01-23 19:21:26 +01:00
KPrasch
a712706e7b
adopt the 'global' language convention pertaining to public IPv4 addresses
2024-01-23 19:21:26 +01:00
KPrasch
527640170c
renames _ipv4_to_ipv6 -> _ipv6_to_ipv4
2024-01-23 19:21:26 +01:00
KPrasch
28af3f9eda
Handle public IPv4 address resolution for incoming requests via /ping
2024-01-23 19:21:26 +01:00
derekpierre
eec504e54b
Round up the value of batch size and thread pool size which are both decimal factors of the threshold; without rounding up small threshold values can experience slower decryption executions for associated ritual.
2024-01-23 15:54:46 +01:00
derekpierre
edc4f939c1
Make last scanned block metric a class variable on ActiveRitualTracker.
2024-01-23 13:27:35 +01:00
derekpierre
8535e628c7
Added metric for tracking last scanned block by ritual tracker scanner task.
...
Added test.
2024-01-23 13:27:35 +01:00
derekpierre
931cdde08e
Use prometheus Summary metric for decryption request count/sum instead of Counter for richer metrics including time taken.
2024-01-23 13:27:35 +01:00
derekpierre
d4651d678b
Update "active_stake" value to be denominated in ether and not wei.
2024-01-23 13:27:35 +01:00
derekpierre
18764d7a08
Add specific metric for decryption successes. Renamed metric from errors to failures.
2024-01-23 13:27:35 +01:00
derekpierre
3a191041de
Increase robustness of prometheus metrics task by implementing a PrometheusMetricsTracker.
2024-01-23 13:27:35 +01:00
derekpierre
667ccbe389
Rename key for discovery status gauge.
2024-01-23 13:27:35 +01:00
derekpierre
e9ea0ddb23
Use the correct registry object to unregister some collectors.
2024-01-23 13:27:35 +01:00
derekpierre
5171c012ca
Add prometheus metrics for tracking threshold decryption requests and errors.
2024-01-23 13:27:35 +01:00
derekpierre
c76ef13f9d
Improve help text for --metrics-interval cli parameter.
2024-01-23 13:27:35 +01:00
derekpierre
ec22fcbc49
Fix comment.
2024-01-23 13:27:35 +01:00
derekpierre
e3bbd84ffd
Create OperatorMetricsCollector to collect data about matic balance and operator confirmation (better to check confirmation on child application).
...
Move operator confirmation metric from StakingProviderInfo collector to Operator collector.
2024-01-23 13:27:35 +01:00
derekpierre
236e03343f
Rename existing metrics values to remove _gauge suffix.
2024-01-23 13:27:35 +01:00
derekpierre
e86e2b7cc6
Make enabling prometheus optional.
...
Allow metrics-port to be specified via cli option.
2024-01-23 13:27:35 +01:00
KPrasch
8dbaaaa8fd
Apply suggestions from code review
...
Co-authored-by: Derek Pierre <derek.pierre@gmail.com>
2024-01-23 13:27:35 +01:00
Manuel Montenegro
253a2067e3
Remove unused metrics
2024-01-23 13:27:35 +01:00
Manuel Montenegro
9512d7b286
Convert node discovery metrics from enum to gauge
...
Actually, the two possible states for learning_status metric are
`stopped` and `running`. So a enum type metric can be considered an
overkill that introduces confusion to exported metrics.
2024-01-23 13:27:35 +01:00
Manuel Montenegro
933a28697d
Add metrics for root and child networks
...
Up to now, there is any distinction between root and child networks, so
the only metrics about Blockchain was related to root network.
This change splits the metrics into two networks.
2024-01-23 13:27:35 +01:00
Manuel Montenegro
920df0e47d
Remove Operator and Event metrics
...
- Event metrics collector was not being used at all, so we can safely
remove it.
- Operator metrics collector is exporting the operator eth balance,
which is not relevant anymore.
2024-01-23 13:27:35 +01:00
Manuel Montenegro
4cca43c0a6
Format code
2024-01-23 13:27:35 +01:00
Manuel Montenegro
e6c5293779
Move imports to the top of the file
...
Since commit de85e7fa
, prometheus is a required dependency for Ursula.
So conditional imports of prometheus are no longer necessary.
2024-01-23 13:27:35 +01:00
Manuel Montenegro
13948b2625
Remove unused code and TODO
2024-01-23 13:27:35 +01:00
Manuel Montenegro
6a72807aec
Add Prometheus metrics endpoint to running logs
2024-01-23 13:27:35 +01:00
Manuel Montenegro
7f82edd7ab
Make Prometheus exporter always run along Ursula
...
Prometheus metrics is going to be a necessary part for the Threshold
network. Through them, the network can know if the PRE nodes are meeting
the nodes requirement. This can be useful, for instance, to calculate
the staking rewards.
So, the export of these metrics must be mandatory and not an option that
the user can enable or disable using commands flags.
2024-01-23 13:27:35 +01:00
Manuel Montenegro
7f70c9a086
Disable default collector metrics
...
By default, prometheus exports 'process', 'gc' and 'platform' collector
metrics. This information is not useful in our case and introduces some
noise to the metrics, so they have been disabled.
2024-01-23 13:27:35 +01:00
Manuel Montenegro
11f973a97a
Rename host Prometheus metrics
...
- host_info has been renamed to client_info
- node_discovery has been renamed to node_discovery_status
- New field for client_info: `app: TACo`
2024-01-23 13:27:35 +01:00
Manuel Montenegro
40628ae991
Remove metrics prefix
2024-01-23 13:27:35 +01:00
Manuel Montenegro
ac1893cd50
Remove optional imports of Prometheus
...
Prometheus is now a dependency that is always installed along with
nucypher. For this reason, it doesn't make sense to check if Prometheus
is installed before importing it.
2024-01-23 13:27:35 +01:00
KPrasch
2ae6ce85b0
Merge pull request #3393 from cygnusv/nojoin
...
Optimize use of decryption request WorkerPool
2024-01-19 15:01:36 +01:00
David Núñez
55e653cf75
Tweak WorkerPool parameters
2024-01-19 12:13:15 +01:00
derekpierre
4100754976
Raise exception for sampling when there aren't enough nodes to sample.
2024-01-19 11:04:31 +01:00
derekpierre
bad425f17f
Raise exception when the reservoir of values to draw from is less than required successes.
2024-01-19 11:04:31 +01:00
Piotr Roslaniec
b0f9fe1897
fix darker linting
2024-01-18 12:41:45 +01:00
Piotr Roslaniec
04b3202877
set MAX_UPLOAD_CONTENT_LENGTH to 250kb
2024-01-18 12:41:45 +01:00
David Núñez
deb3391131
Increment DEFAULT_DECRYPTION_TIMEOUT to 30 sec
2024-01-17 16:32:52 +01:00
David Núñez
773fa467a6
Reraise exceptions inside TDec worker tasks as ThresholdDecryptionRequestFailed
2024-01-17 16:32:00 +01:00
David Núñez
a7af04beb8
Randomize sequence of addresses for decryption requests
2024-01-17 16:26:55 +01:00
David Núñez
d0c25cf8d4
Include batch_size as a parameter of ThresholdDecryptionRequestFactory
2024-01-17 15:35:12 +01:00
derekpierre
be8820786f
Implement a random stagger delay when nodes submit aggregated transcripts.
2024-01-17 09:31:32 -05:00
derekpierre
8a341dd87c
Use an increased modifier for posting aggregation in case node is the last node and needs more gas for additoinal logic of being the last node to submit aggregated transcript.
...
Basically a race condition for who will be last.
2024-01-17 09:31:32 -05:00
derekpierre
0d71361f88
Have the EventScanner take a break after crashing and then restarting.
2024-01-17 09:31:32 -05:00
derekpierre
172fefe74f
Obtain node ferveo public key from Coordinator contract instead of learning.
...
Co-authored-by: Kieran Prasch <kieranprasch@gmail.com>
2024-01-17 09:31:32 -05:00
David Núñez
7e8caefabb
Fix parameter typing
2024-01-17 12:56:16 +01:00
David Núñez
dedf747fe2
Fix incorrect exception message
2024-01-17 12:51:44 +01:00
David Núñez
70d7fe1319
Most importantly, no need to wait for all threads to finalize
...
This was making the whole process as slow as the slowest decryption request
2024-01-17 12:51:12 +01:00
David Núñez
e19dd65b3c
Wait enough time before firing a new batch of decryption requests
2024-01-17 12:50:26 +01:00
David Núñez
30a39c59d8
Batch size should start with a bit over the threshold, just in case
2024-01-17 12:48:49 +01:00
David Núñez
43df0adf7b
Fix parameter name
2024-01-17 12:47:02 +01:00
derekpierre
c0a59d48d7
Bump version: 7.0.4 → 7.1.0
2024-01-10 11:56:45 -05:00
derekpierre
0565509752
Sync tapir contract registry with latest contracts deployed to Tapir testnet.
2024-01-10 11:41:34 -05:00
derekpierre
4b81e5a59f
Update lynx contract registry.
2024-01-04 13:23:02 -05:00
derekpierre
99ebdfe8dc
Deprecate use of goerli blockchain; Lynx will now use Sepolia.
2024-01-04 13:23:02 -05:00
Kieran Prasch
a82253b66b
removes incorrect typing
2023-12-21 09:30:50 -05:00
derekpierre
8b8f65baf9
Bump version: 7.0.3 → 7.0.4
2023-12-15 09:54:02 -05:00
derekpierre
5d808a7ca1
Only sleep during block_until_ready when not (bonded and funded).
2023-12-15 09:48:39 -05:00
Kieran Prasch
4b029f707c
Bump version: 7.0.2 → 7.0.3
2023-12-11 18:19:16 +01:00
Kieran Prasch
050b774909
Startup poll rate 10s -> 120s
2023-12-11 18:15:35 +01:00
Kieran Prasch
9279dd2393
Bump version: 7.0.1 → 7.0.2
2023-12-07 18:50:22 +01:00
Kieran Prasch
a4270774a3
sync mainnet contract registry
2023-12-07 18:48:48 +01:00
Kieran Prasch
4a122bf0bd
Bump version: 7.0.0 → 7.0.1
2023-12-04 16:14:40 +01:00
derekpierre
363eb3975c
Always raise ConditionEvalError (previously EvalError) instead of returning then raising.
...
Update tests.
2023-12-01 13:59:03 -05:00
Kieran Prasch
c3d126f522
Bump version: 7.0.0-rc.10 → 7.0.0
2023-12-01 11:29:11 +01:00
Kieran Prasch
d55e60b978
sync lynx contract registry after upgrades to child app and coordinator
2023-11-29 16:13:35 +01:00
Kieran Prasch
f488733508
sync embedded contract registries
2023-11-28 15:20:51 +01:00
Kieran Prasch
d61a7487dc
Refactor EvalError as an exception class.
2023-11-28 14:22:41 +01:00
derekpierre
f3e90a74b6
Appease my OCD by putting the timeout parameter after context.
2023-11-28 13:42:45 +01:00
derekpierre
37490696c6
Clarify use of timeouts.
2023-11-28 13:42:45 +01:00
derekpierre
4398c63892
Use constants for timeout values for reencryption and decryption.
2023-11-28 13:42:45 +01:00
derekpierre
e151f1644a
Fix chaotic test given how participant public keys are now used.
2023-11-28 13:42:45 +01:00
derekpierre
fa45bb568f
Bob does not need to resolve the cohort himself, it will be performed by the `ThresholdAccessControlClient` - so it was redundant.
2023-11-28 13:42:45 +01:00
derekpierre
16b8a93943
Allow Bob.retrieve/retrieve_and_decrypt(...) to specify a decryption timeout - defaults to 10s
2023-11-28 13:42:45 +01:00
derekpierre
e8526f915d
It's ok not to resolve the entire cohort, we just need a threshold of them. In most cases the entire cohort should be learned about, but in the rare case of only a threshold known about that is fine.
2023-11-28 13:42:45 +01:00
derekpierre
65fb84281f
Allow Bob.threshold_decrypt(...) to specify a decryption timeout - defaults to 15s.
2023-11-28 13:42:45 +01:00
derekpierre
cfc7e1cf93
Update comment for base class ThresholdAccessControlClient.
2023-11-28 13:42:45 +01:00
derekpierre
5589bf16a8
Increase default connection timeout and allow overriding via env variable.
...
Increase default certificate retrieval timeout and allow overriding via env variable.
Better utilize connect/read timeout functionality for requests library calls.
Update TestMiddlewareClient to still work with new changes.
2023-11-28 13:42:45 +01:00
David Núñez
ac86e7f5cf
s/getOperatorFromStakingProvider/stakingProviderToOperator
2023-11-28 12:44:44 +01:00
David Núñez
c7fa7d835b
s/stakingProviderFromOperator/operatorToStakingProvider
...
Closes #3350
2023-11-28 12:44:44 +01:00
derekpierre
c0d12e14e4
Bump version: 7.0.0-rc.9 → 7.0.0-rc.10
2023-11-17 12:37:09 -05:00
derekpierre
fcc72af563
Update lynx contract registry to incorporate latest lynx deployment.
2023-11-17 12:24:11 -05:00
derekpierre
191e46cd78
Update polygon endpoint help string.
2023-11-17 12:20:36 -05:00
derekpierre
fb6a3ae800
Check whether ritual is active or expired before attempting to get ritual public key.
2023-11-17 12:20:36 -05:00
derekpierre
d6a1e3f01f
Update RitualStatus names to match Coordinator contract.
2023-11-17 12:20:36 -05:00
derekpierre
1cd6a09e25
Use CoordinatorAgent.is_ritual_active where appropriate.
2023-11-17 12:20:36 -05:00
derekpierre
66980d676b
Add is_ritual_active function to CoordinatorAgent.
2023-11-17 12:20:36 -05:00
derekpierre
ff51de058e
Consolidate swarm/get_staking_providers into one method that returns an iterable.
...
Update tests.
2023-11-17 12:18:06 -05:00
derekpierre
74b5495321
Some code clean up based on RFCs from #3341 .
2023-11-17 12:18:06 -05:00
derekpierre
2841392b06
Use class reference for exception instead of instance.
2023-11-17 12:18:06 -05:00
derekpierre
4ed1ef12c9
Fix linter errors.
2023-11-17 12:18:06 -05:00
derekpierre
bd5cab04b6
Accept base StakerSamplingApplicationAgent when making staker reservoir used for sampling - either TACoApplication (PRE) or TACoChildApplication (TACo CBD) can be used.
2023-11-17 12:18:06 -05:00
derekpierre
7b14234404
Additional methods for reading data from TACoChildApplication contract.
2023-11-17 12:18:06 -05:00
derekpierre
20f2702649
Commonize functionality for staker sampling for both TACoApplication and TACoChildApplication.
2023-11-17 12:18:06 -05:00
David Núñez
270a5c3902
Touches to context module
2023-11-16 16:45:11 +01:00
David Núñez
d82cbf4347
List of values in contexts are now resolved
2023-11-16 16:45:11 +01:00
David Núñez
8fde668e8d
Add deeper resolution of context variables
...
Now we can recursively resolve list of variables
2023-11-16 16:45:11 +01:00
David Núñez
470b72b64d
Introduce regex for context variable names
2023-11-16 16:45:11 +01:00
David Núñez
c52a41b0a8
Resolve circular dependency with ReturnValueTest
2023-11-16 16:45:11 +01:00
David Núñez
b43eb85cca
Relocate context variables resolution method to context module
2023-11-16 16:45:11 +01:00
derekpierre
672c8c8dfe
Collapse `_process_active_staking_providers_info` into `get_active_staking_providers`.
2023-11-10 09:37:45 -05:00
derekpierre
756b3ee2c7
Update StakingProviderInfo struct based on changes to TACoChildApplication.
2023-11-10 09:37:45 -05:00
derekpierre
f75ba8b85d
Update handling of the staking provider data returned from TACoApplication.getActiveStakingProviders
2023-11-10 09:37:45 -05:00
Kieran Prasch
0e2c4cdc87
Bump version: 7.0.0-rc.8 → 7.0.0-rc.9
2023-11-08 12:22:05 +01:00
Kieran Prasch
034c64ba3d
linting
2023-11-08 12:00:39 +01:00
Kieran Prasch
3b2d492b07
removes unused nucypher code
2023-11-08 12:00:39 +01:00
Kieran Prasch
6a8fdc0c3c
removes unused cli code
2023-11-08 12:00:39 +01:00
Kieran Prasch
b05f742d86
removes unused cli options
2023-11-08 12:00:39 +01:00
Kieran Prasch
aec953cdd9
removes unused constants
2023-11-08 12:00:39 +01:00
derekpierre
ca11706ac3
Update seed node URL for `seeds.nucypher.network` to include port 9151.
2023-11-08 11:51:29 +01:00
derekpierre
da983dd330
Ensure that registry domain is handle properly now that we are using TACoDomain objects instead of strings.
2023-11-08 11:51:29 +01:00
derekpierre
099a72e39e
Be more strict with chain field in Schema.
...
Update tests accordingly.
2023-11-08 11:51:29 +01:00
derekpierre
a620a2d86f
Be more eager validating return value schema.
...
Ensure index is non-negative integer.
2023-11-08 11:51:29 +01:00
Kieran Prasch
cda1d1b26b
returns decryption error map to 500
2023-11-02 15:27:05 +01:00
Kieran Prasch
ccbecbb91c
hanlde EvalError for tdec requests
2023-11-02 15:27:05 +01:00
Kieran Prasch
ba8abf29a2
respond to RFCs in PR #3298
2023-11-02 15:27:05 +01:00
Kieran Prasch
d063acd1c6
Decouples server logic from business logic during threhold decryption requests.
2023-11-02 15:27:05 +01:00
Kieran Prasch
b2eb7883b8
handle decryption share errors as a formal server response.
2023-11-02 15:27:05 +01:00
Kieran Prasch
598ad31376
Bump version: 7.0.0-rc.7 → 7.0.0-rc.8
2023-10-31 19:20:31 +01:00
Kieran Prasch
b2bfdb66ac
bugfix: fixes incorrect TACoDomain import
2023-10-31 18:33:39 +01:00
Kieran Prasch
70a47c10bf
Bump version: 7.0.0-rc.6 → 7.0.0-rc.7
2023-10-31 17:25:37 +01:00
Kieran Prasch
9a53f3c00f
lint
2023-10-31 17:23:43 +01:00
Kieran Prasch
fef10d1e67
improves the efficiency and completeness of startup RPC endpoint checks
2023-10-31 17:23:43 +01:00
Kieran Prasch
f9453a6216
expands TACoDomain equality check to include condition chains
2023-10-31 17:23:43 +01:00
Kieran Prasch
bd8fbc0626
linting
2023-10-31 17:23:43 +01:00
Kieran Prasch
d9d05b3efb
Require all domain RPC endpoints are active before node startup
2023-10-31 17:23:43 +01:00
Kieran Prasch
d63a6cb93d
Expands domains data model to include condition chains
2023-10-31 17:23:43 +01:00
Kieran Prasch
1d179cc276
Bump version: 7.0.0-rc.5 → 7.0.0-rc.6
2023-10-31 15:41:33 +01:00
Kieran Prasch
a73b5b7f3e
Cast domain to a string for metrics collection
2023-10-31 15:40:10 +01:00
Kieran Prasch
a10e3920ce
Bump version: 7.0.0-rc.4 → 7.0.0-rc.5
2023-10-31 15:10:17 +01:00
Kieran Prasch
63d2e0265c
Makes TACoDomain.__hash__ consistent with __eq__.
2023-10-31 14:30:15 +01:00
Kieran Prasch
c4d4523bec
TACoDomain equality check includes chain info.
2023-10-31 14:30:15 +01:00
Kieran Prasch
a5cf4a62c2
linting
2023-10-31 14:30:15 +01:00
Kieran Prasch
9599b9e632
Handle domains during CLI account selection of signers.
2023-10-31 14:30:15 +01:00
Kieran Prasch
3bbc951ea5
respond to RFCs in PR #3315
2023-10-31 14:30:15 +01:00
Kieran Prasch
0c528eaa7a
Linting and Newsfrag for PR #3315
2023-10-31 14:30:15 +01:00
Kieran Prasch
f4caacc4b1
update scripts usage of taco domains; conventionally use str() on domains usages
2023-10-31 14:30:15 +01:00
Kieran Prasch
7246e10f84
type hinting and removal of misleading comments.
2023-10-31 14:30:15 +01:00
Kieran Prasch
de8d96e8ea
use domain lookups sparingly and cache the lookups results
2023-10-31 14:30:15 +01:00
Kieran Prasch
ae9f4b40fa
Use a constant for the temporary domain
2023-10-31 14:30:15 +01:00
Kieran Prasch
63b3d4aee9
Use a single collection (SUPPORTED_DOMAINS) for supported domains.
2023-10-31 14:30:15 +01:00
Kieran Prasch
0df05d38f2
Conventionally import (collapsed) domains for namespacing
2023-10-31 14:30:15 +01:00
Kieran Prasch
b1afa231d5
use TACoDomain everywhere
2023-10-31 14:30:15 +01:00
Kieran Prasch
09bc914ce7
renames TEMPORARY_DOMAIN -> TEMPORARY_DOMAIN_NAME
2023-10-31 14:30:15 +01:00
Kieran Prasch
b538e58f57
use TACoDomain for internal APIs
2023-10-31 14:30:15 +01:00
Kieran Prasch
26be277d88
Turns TACoDomain into a concrete class literal
2023-10-31 14:30:15 +01:00
derekpierre
29c5b24064
Optimize resolution of context variables and adjustment of return value test by moving outside of providers for loop - it only needs to be done once.
2023-10-31 11:43:19 +01:00
derekpierre
b68652422e
Split out validity unit tests into specific condition class tests.
...
Add tests for more invalid cases across condition types.
Improve tests to ensure that expected message is raised in exceptions.
2023-10-31 11:43:19 +01:00
derekpierre
417758dd16
Fix exception message.
2023-10-31 11:43:19 +01:00
derekpierre
da928a8b77
Separate validation of condition method name from abi method name.
2023-10-31 11:43:19 +01:00
derekpierre
065f49b994
Remove unreachable code.
2023-10-31 11:43:19 +01:00
derekpierre
cde656991b
Reword exception when comparator value type does not match expected type.
2023-10-31 11:43:19 +01:00
derekpierre
754b9cee92
Fix bug where context variable not being checked for multiple output comparator value.
2023-10-31 11:43:19 +01:00
derekpierre
207bc5329b
Remove unnecessary utility function for `validate_condition_lingo`; instead ConditionLingo.from_dict() can be used.
2023-10-31 11:43:19 +01:00
Kieran Prasch
154ff7e4a3
remove unreachable code blocks
2023-10-31 11:43:19 +01:00
Kieran Prasch
9c93dee28e
eager validation of a contract function ABIs.
2023-10-31 11:43:19 +01:00
Kieran Prasch
dd23224c3a
apply code formatting
2023-10-30 23:13:12 +01:00
Kieran Prasch
d0cafca951
removes documentation build support.
2023-10-30 23:13:12 +01:00
Kieran Prasch
fc970602a3
apply code linting and formatting
2023-10-30 20:58:03 +01:00
Kieran Prasch
10e18fc353
removes dead cli code: show_staking
2023-10-30 20:58:03 +01:00
Kieran Prasch
c44cfc6fd6
Bump version: 7.0.0-rc.3 → 7.0.0-rc.4
2023-10-26 22:10:45 +02:00
derekpierre
c2f60e7a96
Apply RFC from #3303 .
2023-10-26 20:22:28 +02:00
derekpierre
bae37d4336
Catch TypeError instead of Exception when checking ability to serialize to JSON.
2023-10-26 20:22:28 +02:00
derekpierre
210a603c9d
Handle bytes when nested within lists/sub-lists comparator values/results.
2023-10-26 20:22:28 +02:00
derekpierre
b310defc0a
Additional refactoring when aligning comparator based on outputs.
2023-10-26 20:22:28 +02:00
Kieran Prasch
f1a475db8b
extract _validate_contract_type_or_function_abi to validation.py
2023-10-26 20:22:28 +02:00
Kieran Prasch
4336c4caae
Extract stateless condition type checkers to validation.py
2023-10-26 20:22:28 +02:00
Kieran Prasch
68b018d222
modularize condition type enforcement
2023-10-26 20:22:28 +02:00
derekpierre
28b23a7cc5
Apply RFCs from #3303 .
...
Co-authored-by: Kieran Prasch <kieranprasch@gmail.com>
2023-10-26 20:22:28 +02:00
derekpierre
1485234bda
Rename helper method and make it static.
2023-10-26 20:22:28 +02:00
derekpierre
92e8131de7
Properly handle non-JSON serializable value where possible or raise exception on creation of ReturnValueTest.
2023-10-26 20:22:28 +02:00
derekpierre
811c9ed41e
Improve helper function naming for clarity as it pertains to aligning comparator and ABI.
2023-10-26 20:22:28 +02:00
derekpierre
53780b36d2
Simple code cleanup.
2023-10-26 20:22:28 +02:00
derekpierre
b03a241fb3
Use our own implementation of collapse_if_tuple instead of web3's to avoid array dimension information from ABI.
2023-10-26 20:22:28 +02:00
derekpierre
6c7b4f7698
Improve handling of tuple output types (for one-level); still need to investigate one more additional level of tuple types i.e. tuple of tuple.
2023-10-26 20:22:28 +02:00
derekpierre
0ba36bf199
Some additional handling for tuples - still not complete; will revisit logic.
2023-10-26 20:22:28 +02:00
derekpierre
a7a98ebc7c
Commonize check for context variable when validating value type.
2023-10-26 20:22:28 +02:00
derekpierre
8880ff6a60
Don't modify passed-in object during processing.
2023-10-26 20:22:28 +02:00
derekpierre
d8e3f4de77
Utilize ABI information to properly process return value comparator types, and to account for bytes being returned from contract call, but hex used in return value comparator value test.
2023-10-26 20:22:28 +02:00
derekpierre
75c631382d
Handle the case where bytes are return from contract call, but can only be compared to hex in condition return value test since bytes are not JSON serializable for conditions.
2023-10-26 20:22:28 +02:00
Kieran Prasch
f893a7388e
Bump version: 7.0.0-rc.2 → 7.0.0-rc.3
2023-10-24 21:37:22 +02:00
KPrasch
be19bebd0e
Merge pull request #3290 from derekpierre/taco-rituals
...
Add `taco` CLI command to list rituals for a specific TACo domain
2023-10-20 11:05:04 +02:00
KPrasch
80aa3c5ca4
Merge pull request #3293 from derekpierre/what-not
...
Add Not Operator Functionality
2023-10-20 11:03:27 +02:00
KPrasch
1769abe26c
Merge pull request #3292 from manumonti/fix-ip-address
...
Fix nucypher CLI: ursula config ip-address
2023-10-20 11:03:09 +02:00
derekpierre
004ed8c594
Add common contract condition validation function that adjusts based on exception class provided.
2023-10-19 11:35:32 -04:00
derekpierre
4417139ed3
Add common validation compound condition function that adjusts based on exception class provided.
2023-10-19 11:17:06 -04:00
derekpierre
4844c7021d
Ensure that condition_type is properly validated.
...
Add tests.
2023-10-19 10:10:08 -04:00
derekpierre
9486f52c44
Fix schema validation - any validation of schema should only raise ValidationErrors.
...
Add tests.
2023-10-19 10:09:14 -04:00
KPrasch
533d4a3a42
Merge pull request #3287 from derekpierre/potpourri
...
Potpourri
2023-10-19 14:13:28 +02:00
derekpierre
d91eacefe3
Add "not" operator and evaluation to CompoundAccessCondition.
2023-10-18 19:44:59 -04:00
Kieran Prasch
f398990b23
Bump version: 7.0.0-rc.1 → 7.0.0-rc.2
2023-10-18 21:50:46 +02:00
Manuel Montenegro
6774502b64
Fix ursula config ip-address CLI command
...
Running the command `ursula config ip-address` results in error:
`"ip-address" is not a valid command`.
This is because, after checking the line `if action == "migrate"`, there
is a `elif` keyword. So, when action is not "migrate", the decision
branch runs the `elif action:` section.
2023-10-18 12:32:19 +02:00
Manuel Montenegro
990aee4440
Add quotes to config file path in literal
...
Copy-pasting the recommended command "nucypher ursula config migrate..."
results in error when the path of the config file has blank spaces.
2023-10-18 12:18:45 +02:00
derekpierre
7c65de4f1e
Use HTTPStatus constant instead of 200.
2023-10-17 20:12:56 -04:00
derekpierre
500dc6ac35
Update show_inactive value to True if specific ritual ids are queried.
2023-10-17 12:42:56 -04:00
derekpierre
9d8f050130
Always include "State", "Active" columns.
2023-10-17 12:32:22 -04:00
derekpierre
187a9c8783
Include Authority and AccessController entries in table output.
2023-10-17 12:26:48 -04:00
derekpierre
55f28b4e61
Add CLI command to list rituals for a specific TACo domain. There is the option to also include inactive ritual information as well.
2023-10-17 12:12:53 -04:00
derekpierre
2b88245e67
Increase decryption timeout.
2023-10-16 16:55:31 -04:00
derekpierre
f8cac1df40
Add label to Profiler so that output can be associated with a specific profiler when multiple profilers are used.
2023-10-16 16:55:31 -04:00
derekpierre
95c913c603
Allow worker pool to get larger than the default which is 20.
2023-10-16 16:55:31 -04:00
David Núñez
afc27972c1
Merge pull request #3285 from derekpierre/cache-chain-id
...
Reduce blockchain calls to get chain id
2023-10-16 15:17:25 -05:00
KPrasch
d9a96fc6cd
Merge pull request #3284 from nucypher/lynx-gh
...
Measure decryption time on simple testnet script. Update CI actions.
2023-10-16 18:38:08 +02:00
derekpierre
06321db6a5
Use functools for caching of the property.
2023-10-16 12:02:02 -04:00
derekpierre
97425b162e
Reduce calls made by client to get chain id whenever integer returned instead of hex - if integer there were 2 calls, which was unnecessary.
...
Add test for caching of chain id by EthereumClient object.
2023-10-16 10:53:20 -04:00
derekpierre
9d3fe20ac9
Cache chain id value so that less RPC calls are made to determine chain id - the answer is not going to change; insanity anyone.
2023-10-15 20:10:38 -04:00
derekpierre
78cc17a6af
Move Profiler to utilities so that it can be used in other areas of the code eg. other demos etc.
2023-10-14 11:36:59 -04:00
Kieran Prasch
2b1c7d6df2
Bump version: 6.2.0-dev → 7.0.0-rc.1
2023-10-13 15:55:43 +02:00
derekpierre
9d393cbc67
Connecting to endpoints was too eager with respect to the configuration object - the issue being that because connections are made, if the endpoint is faulty then the endpoint configuration can't be modified.
2023-10-12 15:59:10 -04:00
derekpierre
0c217680a2
Check whether ritual is expired before processing decryption request.
2023-10-10 09:12:29 -04:00
Kieran Prasch
27fca8adbf
Support ethereum/sepolia as a condition evaluation blockchain
2023-10-06 21:14:48 +02:00
derekpierre
bb41e2f388
Add Tapir contract registry from latest deployment.
2023-10-06 13:27:58 -04:00
derekpierre
edbf363dcd
Update contract registries for lynx and mainnet to latest format.
...
Remove legacy tapir contract registry.
2023-10-06 11:00:28 -04:00
derekpierre
e1564c741a
Fix bug in contract registry github url.
2023-10-06 08:38:00 -04:00
derekpierre
6e4563013b
Respond to RFC in #3262 .
2023-10-05 08:42:35 -04:00
derekpierre
2a0bd02203
Move TESTERCHAIN chain information out of domains and into testing constants.
2023-10-05 08:27:44 -04:00
derekpierre
4ed74fc0f2
Rename PolygonChain.POLYGON to PolygonChain.MAINNET.
...
Remove ORYX, IBEX domains.
2023-10-05 08:25:58 -04:00
derekpierre
247b93859e
Add unit test for structures in domains.py.
2023-10-05 06:46:15 -04:00
derekpierre
d8b9180921
Update domains/TACoDomain structure.
...
Added magic methods.
2023-10-05 06:20:13 -04:00
derekpierre
ee6a48070f
Remove policy_registry/policy_registry_filepath which are unused and unnecessary parameters.
2023-10-04 15:41:56 -04:00
derekpierre
681bc3e299
Remove unused/commented functions from NuCypherTokenActor.
2023-10-04 15:19:57 -04:00
derekpierre
7c4c43b1c8
Fix darker linting issues.
2023-10-04 15:15:06 -04:00
derekpierre
35681e9bd9
Don't create new TACoDomain object when one is already available via the superclass (Character).
2023-10-04 13:30:18 -04:00
derekpierre
9708efb0ba
Fix bug where filepath should be used with LocalRegistrySource and not with ContractRegistry directly.
...
Use domain as parameter instead of network when calling get_registry(...) in utils.
2023-10-04 13:30:18 -04:00
derekpierre
51ceff7035
Update TEMPORARY_DOMAIN tester chains to use "eth-tester" as chain name instead.
2023-10-04 13:30:18 -04:00
derekpierre
a5b8b805da
The use of the `blockchain_` prefix for blockchain providers and interfaces is redundant; so remove the prefix from those usages.
2023-10-04 13:30:18 -04:00
derekpierre
bee3c926d4
Rename networks module to domains, and remove NetworksInventory class; module contains all values and methods now.
2023-10-04 13:30:18 -04:00
derekpierre
0f119934f4
Update description to no longer include "proxy re-encryption".
2023-10-04 13:30:18 -04:00
derekpierre
4507580196
Update CLI --network option to be --domain.
...
Update subsequent function calls to use domain as well instead of network.
Update some constants to use _DOMAIN instead of _NETWORK.
2023-10-04 13:30:18 -04:00
derekpierre
aa6e53191f
Remove use of network when dealing with NetworksInventory class.
2023-10-04 13:30:18 -04:00
derekpierre
0ca3303b95
Remove IBEX as a supported domain. Update IBEX TACoDomain to use None for PolygonChain since it never used polygon.
2023-10-04 13:30:18 -04:00
derekpierre
2d2b67e5d2
Rename of various functions/constants from NetworksInventory to use domain instead of network.
...
Rename variables obtained by calling into NetworksInventory to use domain instead of network.
Rename NuCypherNetworkName CLI validation object into NuCypherDomainName.
2023-10-04 13:30:18 -04:00
derekpierre
8c2c358e1b
Initialize blockchain connection for both eth_endpoint and polygon_endpoint using common code.
2023-10-04 13:30:18 -04:00
derekpierre
b2b265b03f
Re-add unused `operator_signature_from_metadata` parameter, some concerns about usage - something to address later.
2023-10-04 13:30:18 -04:00
derekpierre
1c333bddaa
Deprecate condition_provider_uris in favour of condition_blockchain_endpoints.
2023-10-04 13:30:18 -04:00
derekpierre
05fba15c1e
More renames of provider_uri to blockchain_/eth_ endpoint.
2023-10-04 13:30:18 -04:00
derekpierre
fbed56665e
Update renames for call to from_seednode_metadata.
2023-10-04 13:30:18 -04:00
derekpierre
eafe4b65a9
Rename provider_uri parameter for ContractAgents.get_agent to blockchain_endpoint.
2023-10-04 13:30:18 -04:00
derekpierre
941b21f34f
More renames of instances of eth_provider_uri to either blockchain_endpoint or eth_endpoint.
2023-10-04 13:30:18 -04:00
derekpierre
8fcf422728
During Ursula interactive configuration, don't show NU balance since is/will be no longer applicable to Threshold Network. Show MATIC balance instead of ETH.
2023-10-04 13:30:18 -04:00
derekpierre
fa4051d504
Rename Eth/PolyNetwork to Eth/PolyChain to better reflect their usage.
2023-10-04 13:30:18 -04:00
derekpierre
45f00c20db
Rename members in ChainInfo to avoid smurfing.
2023-10-04 13:30:18 -04:00
derekpierre
74517534f5
Use correct value from enum for teacher nodes.
...
Add unit test for supported taco networks.
2023-10-04 13:30:18 -04:00
derekpierre
8d799f623d
Make sure Bob passes along polygon_endpoint parameter value to Character.
2023-10-04 13:30:18 -04:00
derekpierre
80d6d536ef
Temporary workaround until single registry changes are used.
2023-10-04 13:30:18 -04:00
derekpierre
c8b5264c7c
Rename eth_provider_uri to eth_endpoint in various spots specific to payment, config, characters.
2023-10-04 13:30:18 -04:00
derekpierre
738182ab98
Remove use of pre_payment_network and coordinator_network since the corresponding polygon network is always implied based on the TACo network used.
...
Remove coordinator_provider_uri, use of pre_payment_network.provider because all characters now define polygon_endpoint parameter.
2023-10-04 13:30:18 -04:00
derekpierre
32a3b432d7
Provide richer chain information from TACoNetwork class including chain id and name for underlying blockchain networks.
2023-10-04 13:30:18 -04:00
derekpierre
94dc933c73
Bump character configuration to v8 and add migration script.
2023-10-04 13:30:18 -04:00
derekpierre
33068070fc
Rename pre_payment_provider to polygon_endpoint as it pertains to Characters/Configurations/CLI parameters.
2023-10-04 13:30:18 -04:00
derekpierre
4166c7dae9
Rename eth_provider_uri to eth_endpoint as it pertains to Characters/nodes/CLI options.
2023-10-04 13:30:18 -04:00
derekpierre
9d869f5f08
Update calls to NetworksInventory as they pertain to unit tests passing.
2023-10-04 13:30:18 -04:00
derekpierre
751140384c
Update network selection logic via the CLI and update test.
2023-10-04 13:30:18 -04:00
derekpierre
21bce632d6
Create implicit mapping of TACo network name to entries for eth network and poly network.
...
Provider class level SUPPORTED_NETWORKS and SUPPORTED_NETWORK_NAMES constants.
2023-10-04 13:30:18 -04:00
Kieran Prasch
b7c7b23114
converts mainnet, lynx, and tapir registries to the new format; Removes historical registries.
2023-10-04 19:24:43 +02:00
Kieran Prasch
e1f81d9a5e
nucypher packages Base|InMemory|ContractRegistry -> ContractRegistry
2023-10-04 19:24:43 +02:00
Kieran Prasch
d441356336
Import and comment linting
2023-10-04 19:24:43 +02:00
Kieran Prasch
4c5a7ea140
Removes contract versioning from registry search terms
2023-10-04 19:24:43 +02:00
Kieran Prasch
f96c9ccd30
Reworks contract registry interfaces and data format; Simplified registry with reduced indirection and removed write functionality.
2023-10-04 19:24:43 +02:00
Kieran Prasch
313c7d210f
Use nucypher domain names as registry filenames
2023-10-04 19:24:43 +02:00
Kieran Prasch
54305130df
Removal of unused contract registry functionality
2023-10-04 19:24:43 +02:00
Kieran Prasch
52e54698fa
tapir supports sepolia
2023-10-04 19:24:43 +02:00
derekpierre
875bc34f6e
Update information printed by application status helper.
2023-09-28 09:13:52 -04:00
derekpierre
3df77e6e60
Change `nucypher status` to now be `nucypher taco` and modify names of sub-commands.
2023-09-28 09:13:52 -04:00
derekpierre
be56ddb179
Add `status` as a `nucypher` cli entry point i.e. `nucypher status`.
2023-09-28 09:13:52 -04:00
derekpierre
f402933100
Bring `nucypher status` command up to date and in line with latest TACo changes.
2023-09-28 09:13:52 -04:00
derekpierre
e8308b7dda
Update call to get logs from event to be snake case since web3py has updated such calls.
2023-09-28 09:13:52 -04:00
derekpierre
bfa258de53
Update list of contract names used for option_contract_names click cli option. Exclude legacy NuCypher Network contracts in favor of TACo.
2023-09-28 09:13:52 -04:00
derekpierre
716b19fac3
Update eth_provider_uri to provider_uri since agents/contracts can be for different chains etc. polygon.
2023-09-28 09:13:52 -04:00
derekpierre
c1a84c3df1
Allow InMemorySigner to accept an optional account private key.
2023-09-27 15:42:20 -04:00
Kieran Prasch
c2baae28d8
Introduces InMemorySigner
2023-09-27 19:34:01 +02:00
derekpierre
1e2f8a9fb2
Rename LynxMockTACoApplication to MockPolygonChild in Lynx child (Mumbai) registry.
2023-09-26 15:17:43 -04:00
derekpierre
74bd261eaf
Update lynx registry (Goerli) based on updated mock implementation and rename of LynxMockTACoChildApplication to MockPolygonRoot.
2023-09-26 15:05:57 -04:00
derekpierre
a91c1cbac8
Add lynx and mumbai contract registries based on lynx root/child deployments.
2023-09-25 21:05:33 -04:00
derekpierre
9f9ab1cb37
Update lynx registry to have TACoApplication.
2023-09-22 17:07:05 -04:00
derekpierre
eb550b8848
Modify mumbai contract registry based on alpha-13 lynx deployment.
2023-09-22 14:27:02 -04:00
derekpierre
c43981468b
Remove legacy support for NuCypher Network contract events as part of status command since custom Dispatcher proxy logic no longer supported.
2023-09-22 08:24:38 -04:00
derekpierre
7951f40abe
Remove unneeded (potentially N/A) owner() function call in base EthereumContractAgent class.
2023-09-22 08:24:38 -04:00
derekpierre
f9d6c5cd2a
Remove _proxy_name and _forward_address properties from EthereumContractAgent since custom Dispatcher proxy functionality is no longer supported when obtaining contract from registry.
2023-09-22 08:24:38 -04:00
derekpierre
712b653d9a
Remove additional custom Dispatcher proxy logic when obtaining contract from registry.
2023-09-22 08:24:38 -04:00
derekpierre
de028e6cfb
Remove AdjudicatorAgent.
2023-09-22 08:24:30 -04:00
derekpierre
869ef1fbda
Remove EconomicsFactory/Economics.
2023-09-21 12:31:21 -04:00
derekpierre
21aefb78cc
Fix issues with docs build related to child changes.
...
Fix ruff type checking issue.
2023-09-21 11:15:25 -04:00
derekpierre
4f9c8a6a98
Add comment why root application is used instead of child for operator bonding tracking.
2023-09-21 09:51:17 -04:00
derekpierre
9cbda4b9d8
Simplify block_until_ready logic for checking sync between root and child application for respective bonded addresses.
2023-09-21 09:51:17 -04:00
derekpierre
4c4a70d3ee
Rename `ether_balance` to `matic_balance`.
2023-09-21 09:51:17 -04:00
derekpierre
6f08f937de
Update tests for TACoChildApplicationAgent.staking_provider_info call for non-existent staking provider.
2023-09-21 09:51:16 -04:00
derekpierre
86131ccdc1
Clean up types file. PolicyInfo is no longer used from there, and StakingProviderInfo should be localized to TACoApplicationAgent which is the only user of it.
2023-09-21 09:51:16 -04:00
derekpierre
349348c90e
Tests for TACoChildApplicationAgent.
2023-09-21 09:51:16 -04:00
derekpierre
8b5e52d201
Fix linting error.
2023-09-21 09:51:16 -04:00
derekpierre
132869c7b7
Use TACoChildApplicationAgent and TACoRootApplicationAgent to correctly determine the state of operator bonding on startup.
2023-09-21 09:51:16 -04:00
derekpierre
d40cf86771
Rename TACoChildApplicationAgent to match case for TACoApplicationAgent.
2023-09-21 09:51:16 -04:00
derekpierre
69943ca51f
Remove confirm_operator_address() from TACoApplicationAgent since root contract function can only be called from the TACo child contract.
2023-09-21 09:51:16 -04:00
Kieran Prasch
9a6a09d46e
Introduces TacoChildApplication Agent
2023-09-21 09:51:16 -04:00
Kieran Prasch
c92302dbbe
embed provider public key bool check into `Operator.set_provider_public_key`
2023-09-15 16:54:40 +02:00
Kieran Prasch
21785246ed
operator.set_provider_public_key comment/todo for #3176
2023-09-15 10:53:28 -04:00
Kieran Prasch
1705b03427
Call the Coordinator contract directly when checking is provider public key needs on-chain setting.
2023-09-15 10:53:28 -04:00
Kieran Prasch
d31ada75b5
Ursula's funding qualification logs are MATIC; Include chain name or ID in ferveo key publication logs
2023-09-15 10:53:28 -04:00
derekpierre
0081ee1ce6
Don't migrate configurations from v4->v6, but instead do v4->v5->v6 to ensure proper changes are enacted.
...
Migration from v4->v5 missed deprecation of "db_filepath" configuration parameter.
Add tests for configuration migration.
2023-09-15 10:53:23 -04:00
derekpierre
dcbb7bfb80
Properly process condition_provider_uris configuration entry which can only be stored in the json configuration file as dictionary keyed by the string version of chain id.
...
The chain id is only stored in the configuration file as a string even though it is used in python as an integer.
When the UrsulaConfiguration is serialized to json the integer (chain id) is automatically stringified to be valid json. Therefore, when deserializing the configuration i.e. reading it in, chain must be read in as a string first then converted to integer.
2023-09-14 21:46:10 -04:00
derekpierre
fbc564f508
Migration script from v6 to v7 for Ursula's configuration file.
2023-09-14 16:26:05 -04:00
Kieran Prasch
7689cc0769
removal and reorg of 'trackers' in preperation for publishing ofprovider public key to Coordinator.
2023-09-14 16:26:05 -04:00
Kieran Prasch
0f29569568
Adapt nucypher to merged Operator, without Ritualist.
2023-09-14 16:26:05 -04:00
Kieran Prasch
48757c180f
Merge Ritualist into Operator.
2023-09-14 16:26:05 -04:00
derekpierre
3092746e29
Fix failing test that invlolves Vladimir.
2023-09-14 16:26:05 -04:00
derekpierre
894dc5ac81
Apply suggestions from review for #3213 .
2023-09-14 09:22:41 -04:00
Kieran Prasch
d270675296
Ursula on publishes ferveo public key on-chain when none is present to save gas.
2023-09-12 17:53:02 +02:00
derekpierre
ba002cc4e7
Use isEncryptionAuthorized() function on Coordinator agent itself via Coordinator agent, instead of trying to call access controller for ritual directly.
...
Pass ciphertext_header to is_encryption_authorized() function and not the hash of it.
2023-09-12 10:11:37 -04:00
derekpierre
10c7d6a6fa
Remove unused signing power from Enrico, and ensure that bytes are used for authorization.
2023-09-12 10:11:37 -04:00
derekpierre
df3a688122
Update NotEnoughUrsulas failure message to be clearer - it could be misinterpreted as an Ursula availability issue rather than a functional.
2023-09-12 10:00:30 -04:00
Kieran Prasch
9c78d599f7
Coordinator agent handles access controller call forwarding for on-chain authorizations
2023-09-12 12:43:57 +02:00
Kieran Prasch
b362b4fc79
cleanup imports
2023-09-12 12:43:00 +02:00
Kieran Prasch
72a09b7e7c
Establishes a home location for local interface ABIs, non-network specific for now.
2023-09-12 12:42:37 +02:00