I am working on blockchain. My project is to store Role based access control policies(user-role assignment and role-permission assignment) in blockchain. Policies are written in 2 dimensional array (user name and his respective role are stored in array format, role and its respective permission are also stored in array format). I compiled and deployed this smart contract on Remix IDE(and also using geth). Through func1(), I gave 2D array(users-roles) as input and function successfully executed. Now, through another func2(), I gave 2D array(roles-permissions) as input and function successfully executed.
On executing func1() in Remix, block number(block 1) is displayed along with the transaction hash. On executing func2() in Remix, block number(block 2) is displayed along with the transaction hash.
My doubt is, does data given through different functions(func1() and func2()) are stored in same blocks of blockchain with transaction hash in different blocks and how this block is identified? If data is stored in the different blocks of blockchain, later when I cal func3() which takes username as input and gives roles that user possess, how does this function knows the block number in which user-role assignment(2D array stored using func1()) is stored??
Reply really helps a lot. Thank you.