-
Notifications
You must be signed in to change notification settings - Fork 20
#295 iterative execution #332
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
Changes from 1 commit
90a4e56
143913b
16c9bff
f2c0303
57f3b53
3369f67
af721bb
e512bb8
8dc5e29
8dce2a5
cef8f21
1bf8383
9672438
2d42b73
ac2755c
3519c61
bf313a2
3093fcc
e3c4e33
9b57e53
ccffcf4
4d685db
6f63338
4546926
7befc6b
b5010f8
5ebf76a
b464b1e
79088c6
52173a0
4fe15e9
607e74e
d9f762a
842ec7d
78de121
47cf219
0eebc1f
cec7a38
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -340,7 +340,7 @@ def __init__(self, solana_interactor: SolanaInteractor, neon_instruction: NeonIn | |
|
|
||
| def call_signed_iterative(self): | ||
| ''' Deprecated ''' | ||
| self.create_accounts_for_trx_if_needed() | ||
| self.create_accounts_for_trx() | ||
|
|
||
| logger.debug("Partial call") | ||
| call_txs = self.instruction.make_iterative_call_transaction() | ||
|
|
@@ -350,15 +350,15 @@ def call_signed_iterative(self): | |
|
|
||
|
|
||
| def call_signed_iterative_combined(self): | ||
| self.create_accounts_for_trx_if_needed() | ||
| self.create_accounts_for_trx() | ||
|
|
||
| return self.call_continue(CONTINUE_COMBINED) | ||
|
|
||
|
|
||
| def call_signed_with_holder_acc(self): | ||
| ''' Deprecated ''' | ||
| self.write_trx_to_holder_account() | ||
| self.create_accounts_for_trx_if_needed() | ||
| self.create_accounts_for_trx() | ||
|
|
||
| logger.debug("ExecuteTrxFromAccountDataIterative:") | ||
| call_txs = self.instruction.make_call_from_account_transaction() | ||
|
|
@@ -368,17 +368,20 @@ def call_signed_with_holder_acc(self): | |
|
|
||
| def call_signed_with_holder_combined(self): | ||
| self.write_trx_to_holder_account() | ||
| self.create_accounts_for_trx_if_needed() | ||
| self.create_accounts_for_trx() | ||
|
|
||
| return self.call_continue(CONTINUE_HOLDER_COMB) | ||
|
|
||
|
|
||
| def create_accounts_for_trx_if_needed(self): | ||
| if len(self.create_acc_trx.instructions): | ||
| logger.debug('create_accounts_for_trx') | ||
| precall_txs = Transaction() | ||
| precall_txs.add(self.create_acc_trx) | ||
| self.sender.send_measured_transaction(precall_txs, self.eth_trx, 'CreateAccountsForTrx') | ||
| def create_accounts_for_trx(self): | ||
| length = len(self.create_acc_trx.instructions) | ||
| if length == 0: | ||
| return | ||
|
|
||
| logger.debug(f"Create account for trx: {length}") | ||
| precall_txs = Transaction() | ||
| precall_txs.add(self.create_acc_trx) | ||
| self.sender.send_measured_transaction(precall_txs, self.eth_trx, 'CreateAccountsForTrx') | ||
|
|
||
|
|
||
| def write_trx_to_holder_account(self): | ||
|
|
@@ -403,8 +406,7 @@ def call_continue(self, instruction_type): | |
| try: | ||
| return_result = self.call_continue_bucked(instruction_type) | ||
| except Exception as err: | ||
| logger.debug("call_continue_bucked_combined exception:") | ||
| logger.debug(str(err)) | ||
| logger.debug("call_continue_bucked_combined exception: {}".format(str(err))) | ||
|
|
||
| if return_result is not None: | ||
| return return_result | ||
|
|
@@ -481,6 +483,7 @@ def call_continue_bucked(self, instruction_type): | |
|
|
||
| receipts.append(self.sender.send_transaction_unconfirmed(trx)) | ||
| except SendTransactionError as err: | ||
| logger.error(f"Failed to call continue bucked, error: {err}") | ||
| logger.debug(str(err)) | ||
| if str(err).startswith("Transaction simulation failed: Error processing Instruction 0: custom program error: 0x1"): | ||
|
||
| pass | ||
|
|
@@ -501,8 +504,7 @@ def call_continue_bucked(self, instruction_type): | |
|
|
||
|
|
||
| def collect_bucked_results(self, receipts, reason): | ||
| logger.debug("Collect bucked results:") | ||
| logger.debug("receipts %s", receipts) | ||
| logger.debug(f"Collected bucked results: {receipts}") | ||
| result_list = self.sender.collect_results(receipts, eth_trx=self.eth_trx, reason=reason) | ||
| for result in result_list: | ||
| # self.sender.get_measurements(result) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is not needed more
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Disagree |
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logger.error(f"Failed to call continue bucked, error: {err}")There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed