Getting next available transaction id