Derek Pierre
5c873acb3e
Merge pull request #3489 from derekpierre/starvation-protection
...
Ritual tx starvation protection
2024-04-24 19:14:50 -04:00
derekpierre
ace149be35
Add newsfragment for #3489 .
2024-04-24 18:58:04 -04:00
derekpierre
92262734b7
Update tests now that the on_broadcast_failure callback removes the tx from the atxm queue and resubmits a new tx.
2024-04-24 18:58:03 -04:00
derekpierre
394dc6018e
Resubmit tx within `on_broadcast_failure` callback; removes the queued tx and resubmits a new tx. This prevents other queued txs for other rituals from being starved by one failing tx for a specific ritual.
2024-04-24 18:57:53 -04:00
Derek Pierre
6089db5fa8
Merge pull request #3487 from derekpierre/logging-one-more-thing
...
One more thing: Individual logging observers need to adhere to log levels
2024-04-24 17:12:49 -04:00
derekpierre
49e295e0e7
Log message about verified operator to debug instead of info.
2024-04-24 16:08:57 -04:00
Derek Pierre
4072989457
Merge pull request #3486 from derekpierre/signer-tx
...
Fix inconsistent `sign_transaction` API return values
2024-04-24 15:47:54 -04:00
derekpierre
059b90b8ca
Add newsfragment for #3487 .
2024-04-23 08:18:44 -04:00
derekpierre
a0ee199e82
Add tests for observer wrapper functionality and its use with global observers.
2024-04-22 21:23:24 -04:00
derekpierre
27fe4c7f10
Observers themselves should adhere to log levels since other Loggers may be used which don't check log level before passing to observers.
2024-04-22 20:39:39 -04:00
derekpierre
1e32893d50
Add newsfragment for #3486 .
2024-04-22 20:38:36 -04:00
derekpierre
ce002ed0c9
Add unit tests for KeystoreSigner (similar to InMemorySigner) to maintain uniformity of API expectations.
2024-04-22 15:37:11 -04:00
derekpierre
be0aa76836
Fix failing tests.
2024-04-22 14:15:36 -04:00
derekpierre
2500fe1507
Fix inconsistent return from `sign_transaction`; either a SignedTransaction is returned or HexBytes. Reverting to lowest common denominator which is HexBytes (bytes). This issue was noticed while running the nucypher_dkg script which failed - it uses a keystore signer.
2024-04-22 14:15:28 -04:00
Derek Pierre
532745632b
Merge pull request #3483 from derekpierre/logging
...
Much Ado About Logging
2024-04-22 14:15:06 -04:00
derekpierre
45d82f6699
Add tests for checking the link between the StdoutEmitter and the underlying logging system.
2024-04-19 15:00:01 -04:00
derekpierre
3b1d576936
Update newsfragment.
2024-04-19 15:00:00 -04:00
derekpierre
83e0ea153a
Clean up StdoutEmitter and log to the logging system where appropriate.
2024-04-19 14:59:59 -04:00
derekpierre
e8828f0c14
Add test for context manager used to pause all logging; used during testing.
2024-04-19 14:59:58 -04:00
derekpierre
121bbbc4f4
Add tests for management of global observers for logging.
...
No-ops whenever trying to start/stop an already started/stopped global observer
Properly save and restore state within context manager for pausing logging.
2024-04-19 14:59:57 -04:00
derekpierre
3980420b61
Add test regarding logger's adherence to log levels when notifying observerss.
2024-04-19 14:59:56 -04:00
derekpierre
b7bddfd4fa
Add newsfragments for #3483 .
2024-04-19 14:59:55 -04:00
derekpierre
47944092bd
Separate text file logs from json file logs. JSON logs are overly verbose and should only be enabled if explicitly indicated (probably for monitoring/scraping of logs), and should not be enabled by default. It's setting should be kept separate from text file logging.
2024-04-19 14:59:47 -04:00
derekpierre
ba9e5c4240
Properly track observers so that the correct instances can be used for removal if necessary.
2024-04-19 11:11:31 -04:00
derekpierre
fafff095db
Use a proper console logger from twisted that properly formats messages.
2024-04-19 11:11:30 -04:00
derekpierre
9d012c4fc0
Logger should limit logging by underlying observers based on log level.
2024-04-19 11:11:25 -04:00
Derek Pierre
c313ea790d
Merge pull request #3484 from derekpierre/docker-login
...
GH Action Docker login
2024-04-19 08:46:26 -04:00
derekpierre
888f95ac57
Add dev newsfragment for #3484 .
2024-04-19 08:14:38 -04:00
derekpierre
1ec641d801
Update version of docker/login-action job to v3.
2024-04-19 08:12:17 -04:00
Derek Pierre
83a77133a5
Merge pull request #3479 from derekpierre/compatibility
...
Node/Contract Compatibility
2024-04-19 08:01:07 -04:00
derekpierre
2053e7cb4a
Minor update to README - update discord link and TACo section title.
2024-04-18 13:37:33 -04:00
derekpierre
23dd34aece
Add a test to reassure us that contract conditions work correctly even with overloaded functions once the relevant ABI is specified in the condition.
2024-04-18 13:37:32 -04:00
derekpierre
9db8d6c8ab
Add newsfragment for #3479 .
2024-04-18 13:37:31 -04:00
derekpierre
be76467192
Update embedded lynx contract registry based on latest lynx upgrade and updated registry from `nucypher-contracts`.
2024-04-18 13:37:30 -04:00
derekpierre
59a8901ed5
Agents need to better handle overloaded functions. Web3py does not resolve the function based on the number of args provided, so we need to resolve the function ourselves.
...
In some cases we've been lucky that the function we wanted to use was first to be returned instead of the other one, in which case the call will fail. This change makes the method to use more explicit by using the signature. Eventually the old function that was overloaded will be removed from the contract and is therefore no longer a problem - until then we need to properly/deterministically handle the overload case.
2024-04-18 13:37:29 -04:00
derekpierre
46b858d876
Update embedded mainnet contract registry based on updated registry from `nucypher-contracts`. This was missed from the last mainnet update but the nodes were fine because it pulls the registry from github as a priority over the embedded registry.
2024-04-18 13:37:27 -04:00
derekpierre
6064ee01b1
Remove old and no longer used code associated with operator information.
2024-04-18 13:37:26 -04:00
derekpierre
ccb5a7631a
Only retrieve struct values from contract based on number of expected fields in associated python struct. This better maintains compatibility whenever the struct in the contract adds fields.
2024-04-18 13:37:25 -04:00
Derek Pierre
7d87ff9171
Merge pull request #3476 from derekpierre/atxm-updates
...
DKG Fault Tolerance Improvements
2024-04-18 13:36:27 -04:00
derekpierre
238c4cb5aa
Add TODO for usages of the stdout emitter, should these just be log messages.
2024-04-17 13:20:26 -04:00
derekpierre
1673a7e7a4
Fix incorrect typehint for return value of method for executing synchronous transactions.
2024-04-17 13:20:25 -04:00
derekpierre
ba8f519d08
Check ritual status before resubmitting a tx to prevent infinite loops due to DKG ritual failures for other reasons eg. mismatch aggregated transcript from other node, timeout etc.
2024-04-17 13:20:02 -04:00
derekpierre
62b7a62faf
Relock dependency to use latest released version of ATxM - v0.3.0.
2024-04-16 09:27:19 -04:00
derekpierre
b6140df08c
Update tests now that a default on_broadcast callback is used if not provided.
2024-04-15 13:31:02 -04:00
derekpierre
59bc9f8bf4
Add a default on_broadcast callback implementation that simply prints broadcast tx information, if one is not provided.
...
The default behaviour is to print tx info that is basically the equivalent of want a synchronous tx would print - same reason that the StdoutEmitter is used instead of the logger.
Use common utility for determining cost of broadcasted tx.
2024-04-15 13:30:58 -04:00
derekpierre
1b1f314629
Add acceptance tests for failures during dkg rounds; ensure that failures are handled appropriately including with resubmitted txs in some cases.
2024-04-15 13:30:57 -04:00
derekpierre
c46c1a3775
Remove unnecessary/redundany wait for tx receipt.
2024-04-15 13:30:55 -04:00
derekpierre
e8f7c862c9
Rename test module so that other aspects of operator functionality can be tested in separate modules.
2024-04-15 13:30:54 -04:00
derekpierre
c032809a1e
Add unit tests for async tx hooks used for phases 1 and 2 of rituals.
2024-04-15 13:30:53 -04:00
derekpierre
5514f57d43
Add typehint for return of _setup_async_tx_hooks method for Operator.
2024-04-15 13:30:52 -04:00