Skip to content

Node state & user actions executors#3460

Open
GuillaumeDSM wants to merge 5 commits into
devfrom
node_state
Open

Node state & user actions executors#3460
GuillaumeDSM wants to merge 5 commits into
devfrom
node_state

Conversation

@GuillaumeDSM
Copy link
Copy Markdown
Member

No description provided.

@GuillaumeDSM GuillaumeDSM self-assigned this May 12, 2026
@GuillaumeDSM GuillaumeDSM requested a review from Herklos as a code owner May 12, 2026 08:40
@GuillaumeDSM GuillaumeDSM changed the title Node state WIP Node state May 12, 2026
@GuillaumeDSM GuillaumeDSM marked this pull request as draft May 12, 2026 08:40
@GuillaumeDSM GuillaumeDSM force-pushed the node_state branch 4 times, most recently from 6a4ea91 to ec76bee Compare May 12, 2026 21:07
@GuillaumeDSM GuillaumeDSM marked this pull request as ready for review May 13, 2026 08:21
@GuillaumeDSM GuillaumeDSM changed the title WIP Node state Node state May 13, 2026
@GuillaumeDSM GuillaumeDSM changed the title Node state Node state & user actions executors May 13, 2026
Copy link
Copy Markdown
Contributor

@Herklos Herklos left a comment

Choose a reason for hiding this comment

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

Great tests!!

Comment on lines +78 to +80
def _derive_aes_key(self, wallet_private_key: str) -> bytes:
# Derive a 32-byte AES key from the wallet private key string using SHA-256.
return hashlib.sha256(wallet_private_key.encode("utf-8")).digest()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We should prefer HKDF (HMAC-based Key Derivation Function) from wallet private key (more secure than the current sha256), or even better from the signature of the salt (more secure that HKDF with wallet private key and so with AES key from private key sha256).

if workflow.workflow_id[:octobot_node.constants.PARENT_WORKFLOW_ID_LENGTH] in parent_workflow_ids
]

async def resolve_active_automation_workflow_ids_for_parent_id(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

import octobot_node.errors as node_errors


_DEFAULT_EXCHANGE_TYPE = "spot"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Shouldn't it be provided in the protocol instead?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

indeed!

@@ -1,3 +1,3 @@
starfish-sdk==2.0.0
starfish-sdk==2.3.0
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

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.

2 participants