Testing Parallel Transfer on STEEM

in #steem9 hours ago

Different Memo

3 transfers all from @justyy to @justyy222 with amount 0.001 STEEM but different memo

Sent to 3 RPC nodes: all succeed.
Sent to 1 RPC nodes: only 1 succeed the rest fail with "Duplicate transaction check failed"

Same Memo

3 transfers all from @justyy to @justyy222 with amount 0.001 STEEM and same memo

Only 1 succeed the rest fail with "Duplicate transaction check failed"

In short:

  • Different memos → different transaction IDs → all succeed.
  • Same memo → identical transaction ID → only one accepted; others rejected as duplicates.

This confirms that the Steem blockchain ensures idempotency at the transaction level when the signed content is identical.

Here is the Python test code

import time
from concurrent.futures import ThreadPoolExecutor, as_completed
from steem import Steem

id = "FROM"
target = "TO"
amount = 0.001
wif = {"active": "XXXX" }

steem_nodes = [
    "https://api2.steemyy.com",
    "https://api.justyy.com",    
    "https://api.steemit.com",
]

# --- Worker function ---
def transfer_with_node(node, target, id, amount, unit):
    try:
        s = Steem(nodes=[node], keys=wif)
        print(f"[{node}] sending {amount} {unit} from @{id} to {target}")
        tx = s.transfer(target, amount=amount, asset=unit, memo="Testing transfer with ", account=id)
        return node, tx
    except Exception as e:
        return node, str(e)

# --- Run parallel transfers ---
nodes_to_use = steem_nodes

start = time.time()
with ThreadPoolExecutor(max_workers=len(nodes_to_use)) as executor:
    futures = []
    for node in nodes_to_use:
        futures.append(executor.submit(
            transfer_with_node, node, target, id, amount, "STEEM"
        ))

    for future in as_completed(futures):
        node, result = future.result()
        print(f"[{node}] result: {result}")

print(f"Done. Total time: {time.time() - start:.2f}s")

image.png

Thoughts

OK, that means that I can simplify my load-balancing logics. Just fan out the requests to multiple nodes and return the quickest response.

But i don't want to do this because it is against the idea of load balancing. Faning out requests ---> putting loads on RPC nodes.

Steem to the Moon🚀!

Support me, thank you!

Why you should vote me? My contributions
Please vote me as a witness or set me as a proxy via https://steemitwallet.com/~witnesses

image.png