reth icon indicating copy to clipboard operation
reth copied to clipboard

feat(refractor): move imports to blockchain-tree-api crate

Open Abhishekkochar opened this issue 1 year ago • 6 comments
trafficstars

Fixes: #12513

Blocked by #13029

Abhishekkochar avatar Nov 15 '24 07:11 Abhishekkochar

@mattsse, Do you prefer BlockBuffer copy or move entirely to blockchain-tree-api?

Abhishekkochar avatar Nov 15 '24 08:11 Abhishekkochar

Do you prefer BlockBuffer copy or move entirely to blockchain-tree-api?

yeah for now that's the best solution because we currently use that in two places

mattsse avatar Nov 15 '24 08:11 mattsse

There is a cyclic dependency issue when copying BlockBuffer to tree_api. reth-network => reth-provider => reth-blockchain-tree-api => reth_network reth_network is being used for BlockBuffer.

reth-network utilising reth-provider for tests and bench. test-utils should be fine as it is primary being used for tests, however the main issue is when using for bench.

Abhishekkochar avatar Nov 18 '24 08:11 Abhishekkochar

I see, could you push your latest draft please, I believe we can work around this

mattsse avatar Nov 21 '24 13:11 mattsse

There is a cyclic dependency issue when copying BlockBuffer to tree_api. reth-network => reth-provider => reth-blockchain-tree-api => reth_network reth_network is being used for BlockBuffer.

reth-network utilising reth-provider for tests and bench. test-utils should be fine as it is primary being used for tests, however the main issue is when using for bench.

These are the changes for now. I will push final changes once we passed the cyclic dependency issue.

From what I understand, as long as the dependency is optional, we can subscribe that dependency via the required-feature in cargo file. However, this is already the case in reth-network cargo file. I'm sure I'm missing something here. Please feel free to correct me.

Abhishekkochar avatar Nov 25 '24 06:11 Abhishekkochar

currently working on removing that reth-provider dep: #13029

mattsse avatar Nov 30 '24 11:11 mattsse