Skip to content
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

Reduced max_operations_ttl to fix Parisnet Operation Injections #371

Merged
merged 1 commit into from
Jun 27, 2024

Conversation

igorsereda
Copy link
Collaborator

This PR fixes errors like

pytezos.rpc.node.RpcError: ({'id': 'failure',
  'kind': 'temporary',
  'msg': 'Operation ooRp9PH8nTAhdn2zyL5P9FyoFKgdfbV25R8YbnnEYvxxRz3c6vd is '
         'branched on either:\n'
         ' - a block BLM7z6yUZCZMzWEnFzsgRbTzfTev5m35Mf9CCXeBLuJTxu5LGtE which '
         'is too old (121 blocks in the past)\n'
         ' - a predecessor block from an alternative branch which is now '
         'unknown'},)

@igorsereda igorsereda self-assigned this Jun 27, 2024
Copy link

Test Results

1 110 tests  ±0   1 098 ✅ ±0   1m 45s ⏱️ -19s
    4 suites ±0      12 💤 ±0 
    4 files   ±0       0 ❌ ±0 

Results for commit ddee28a. ± Comparison against base commit 85a7ce8.

Copy link

github-actions bot commented Jun 27, 2024

Test Results

1 110 tests  ±0   1 098 ✅ ±0   2m 5s ⏱️ -1s
    4 suites ±0      12 💤 ±0 
    4 files   ±0       0 ❌ ±0 

Results for commit ddee28a. ± Comparison against base commit 85a7ce8.

♻️ This comment has been updated with latest results.

@ztepler
Copy link
Member

ztepler commented Jun 27, 2024

I tried to understand what was happening here and why this constant affects transactions at all.

As far as I understand, this MAX_OPERATIONS_TTL is used to calculate the branch here. As far as DEFAULT_OPERATIONS_TTL is 5 the branch will be equal to the head~115 block hash. And then the OperationGroup spawned with this branch, right?

Not sure why this logic is required, why not use more recent blocks?

I suppose this is because before Tenderbake (about two years ago) there was no finality and there was a chance that the chain would be forked, can someone confirm?

Anyway, I checked that this works both in the pariscnet and mainnet, so looks good to me.

@droserasprout droserasprout added this to the 3.13.1 milestone Jun 27, 2024
@droserasprout droserasprout merged commit ff4e439 into master Jun 27, 2024
17 checks passed
@droserasprout droserasprout deleted the fix/max_operations_ttl branch June 27, 2024 15:44
@droserasprout droserasprout modified the milestones: 3.13.1, 3.13.2 Jun 27, 2024
@droserasprout droserasprout added the bug Something isn't working label Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants