-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve GetFirstPublicKey
message
#276
Comments
Hey team! Please add your planning poker estimate with ZenHub @blackode @imnik11 @roychowdhuryrohit-dev @samuel-uniris |
Please add your planning poker estimate with ZenHub @apoorv-2204 |
@samuel-uniris, @blackode archethic-node/lib/archethic/db/embedded_impl/chain_index.ex Lines 486 to 513 in b4e7d2c
Using this function |
I guess you can use |
So Instead of using TransactionChain.get_first_transaction Here: archethic-node/lib/archethic/p2p/message.ex Lines 1229 to 1237 in 819b8af
Which eventually calls DB.get_first_chain_address()
So we should use So, what is required to do for this Issue. |
Also not exactly sure , what "As we are messing with first transaction and first public key concept." this meant. |
|
GetFirstPublicKey
implementation is not clear about the behavior expected and how it's used.Actually it should load the first public key, but finally its implementation:
archethic-node/lib/archethic/p2p/message.ex
Lines 1229 to 1237 in 819b8af
We are returning the first transaction public key or not found, but I think you should leverage more:
archethic-node/lib/archethic/transaction_chain.ex
Lines 70 to 74 in 819b8af
So we would not have not found return, but the just public key passed in case there are not previous public key.
As we are messing with first transaction and first public key concept.
Moreover, we are fetching the transaction data and fields, which will cause more I/O than just fetching the first public key from the indexing.
Related to #268
The text was updated successfully, but these errors were encountered: